diff options
author | pixel <pixel> | 2003-12-25 15:14:02 +0000 |
---|---|---|
committer | pixel <pixel> | 2003-12-25 15:14:02 +0000 |
commit | 0177d50e3ae979872e5d8c60a7b4ca97b2ba9f5b (patch) | |
tree | 30f9433d06190aa03607000b9ab4593c08bed927 /PE/rebuildmenus.cpp | |
parent | dc5101a46405b2d19892c3fde00268ef0344ddaf (diff) |
Final push :-P
Diffstat (limited to 'PE/rebuildmenus.cpp')
-rw-r--r-- | PE/rebuildmenus.cpp | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/PE/rebuildmenus.cpp b/PE/rebuildmenus.cpp new file mode 100644 index 0000000..76b3e97 --- /dev/null +++ b/PE/rebuildmenus.cpp @@ -0,0 +1,67 @@ +#include <Main.h> +#include <Input.h> +#include <Output.h> + +CODE_BEGINS +virtual int startup(void) throw (GeneralException) { + int i, p; + Handle * inter = new Output("concat.out"); + Handle * f, * out; + String fname; + + inter->writeU32(4); + + for (i = 0; i < 4; i++) { + inter->writeU32(0); + } + + for (i = 0; i < 4; i++) { + fname = "menus" + String(i) + ".out"; + f = new Input(fname); + + p = inter->tell(); + + inter->seek(i * 4 + 4); + inter->writeU32(p); + inter->seek(0, SEEK_END); + + copy(f, inter); + + delete f; + } + + delete inter; + + out = new Output("menus.bin"); + out->writeU32(11); + + for (i = 0; i < 11; i++) { + out->writeU32(0); + } + + for (i = 0; i < 11; i++) { + if (i == 0) { + fname = "concat.out"; + } else if (i < 10) { + fname = "../../various/0001/0" + String(i) + ".out"; + } else { + fname = "../../various/0001/10.out"; + } + f = new Input(fname); + + p = out->tell(); + + out->seek(i * 4 + 4); + out->writeU32(p); + out->seek(0, SEEK_END); + + copy(f, out); + + delete f; + } + + delete out; + + return 0; +} +CODE_ENDS |