diff options
Diffstat (limited to 'Xenogears/script-comp.cpp')
-rw-r--r-- | Xenogears/script-comp.cpp | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/Xenogears/script-comp.cpp b/Xenogears/script-comp.cpp index ee71d8f..76eab1d 100644 --- a/Xenogears/script-comp.cpp +++ b/Xenogears/script-comp.cpp @@ -2,6 +2,15 @@ #include "Input.h" #include "Output.h" #include "generic.h" +#include "Main.h" + +CODE_BEGINS +public: +Appli() : lzss_o(new lzss()) {} +virtual ~Appli() { delete lzss_o; } +private: + +lzss * lzss_o; void process_one_file(Handle * f, Handle * d, int n) { String nom_du_fichier; @@ -38,7 +47,7 @@ void process_one_file(Handle * f, Handle * d, int n) { d->write(&true_length, 4); d->seek(0, SEEK_END); - lzss_comp(f_part, d, &delta); + lzss_o->lzss_comp(f_part, d, &delta); delete f_part; @@ -58,7 +67,7 @@ void process_one_file(Handle * f, Handle * d, int n) { free(datas); } -int main(int argc, char ** argv) +virtual int startup() throw (GeneralException) { Handle * f_script_comp, * f_new_script; int i; @@ -95,4 +104,7 @@ int main(int argc, char ** argv) num++; } printm(M_BARE, "Done !\n"); + + return 0; } +CODE_ENDS |