blob: 76b3e97832b7474d8f2ede16e9807b80e915133f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
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
|