-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy patharchiver.d
More file actions
247 lines (192 loc) · 8.28 KB
/
archiver.d
File metadata and controls
247 lines (192 loc) · 8.28 KB
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
/*
* Archiver functions
*/
const int zARC_FLAG_WRITE_HEADER = 0;
const int zARC_FLAG_WRITE_BRIEF_HEADER = 1;
const int zARC_FLAG_NO_SPY_MESSAGES = 2;
const int zARC_MODE_BINARY = 0;
const int zARC_MODE_ASCII = 1;
const int zARC_MODE_ASCII_PROPS = 2;
const int zARC_MODE_BINARY_SAFE = 3;
/*
* zCArchiverFactory_CreateArchiverFromMode
*/
func int zCArchiverFactory_CreateArchiverFromMode(var int archiveMode)
{
//0x0086F9AC class zCArchiverFactory zarcFactory
const int zarcFactory_addr_G1 = 8845740;
//0x008D472C class zCArchiverFactory zarcFactory
const int zarcFactory_addr_G2 = 9258796;
//0x0050ACC0 private: class zCArchiver * __thiscall zCArchiverFactory::CreateArchiverFromMode(enum zTArchiveMode)
const int zCArchiverFactory__CreateArchiverFromMode_G1 = 5287104;
//0x0051ACD0 private: class zCArchiver * __thiscall zCArchiverFactory::CreateArchiverFromMode(enum zTArchiveMode)
const int zCArchiverFactory__CreateArchiverFromMode_G2 = 5352656;
var int retVal;
const int call = 0;
if (CALL_Begin(call)) {
CALL_PutRetValTo(_@(retVal));
CALL_IntParam(_@(archiveMode));
CALL__thiscall(MEMINT_SwitchG1G2(zarcFactory_addr_G1, zarcFactory_addr_G2), MEMINT_SwitchG1G2(zCArchiverFactory__CreateArchiverFromMode_G1, zCArchiverFactory__CreateArchiverFromMode_G2));
call = CALL_End();
};
return + retVal;
};
/*
* zCArchiverFactory_CreateArchiverWrite_FileName
*/
func int zCArchiverFactory_CreateArchiverWrite_FileName(var string fileName, var int archiveMode, var int saveGame, var int arcFlags)
{
//0x0086F9AC class zCArchiverFactory zarcFactory
const int zarcFactory_addr_G1 = 8845740;
//0x008D472C class zCArchiverFactory zarcFactory
const int zarcFactory_addr_G2 = 9258796;
//0x0050AF80 public: virtual class zCArchiver * __thiscall zCArchiverFactory::CreateArchiverWrite(class zSTRING const &,enum zTArchiveMode,int,int)
const int zCArchiverFactory__CreateArchiverWrite_G1 = 5287808;
//0x0051AF20 public: virtual class zCArchiver * __thiscall zCArchiverFactory::CreateArchiverWrite(class zSTRING const &,enum zTArchiveMode,int,int)
const int zCArchiverFactory__CreateArchiverWrite_G2 = 5353248;
CALL_IntParam(arcFlags);
CALL_IntParam(saveGame);
CALL_IntParam(archiveMode);
CALL_zStringPtrParam(fileName);
CALL__thiscall(MEMINT_SwitchG1G2(zarcFactory_addr_G1, zarcFactory_addr_G2), MEMINT_SwitchG1G2(zCArchiverFactory__CreateArchiverWrite_G1, zCArchiverFactory__CreateArchiverWrite_G2));
return + CALL_RetValAsPtr();
};
/*
* zCArchiverFactory_CreateArchiverWrite
*/
func int zCArchiverFactory_CreateArchiverWrite(var int filePtr, var int archiveMode, var int saveGame, var int arcFlags)
{
//0x0086F9AC class zCArchiverFactory zarcFactory
const int zarcFactory_addr_G1 = 8845740;
//0x008D472C class zCArchiverFactory zarcFactory
const int zarcFactory_addr_G2 = 9258796;
//0x0050B000 public: virtual class zCArchiver * __thiscall zCArchiverFactory::CreateArchiverWrite(class zFILE *,enum zTArchiveMode,int,int)
const int zCArchiverFactory__CreateArchiverWrite_G1 = 5287936;
//0x0051AFA0 public: virtual class zCArchiver * __thiscall zCArchiverFactory::CreateArchiverWrite(class zFILE *,enum zTArchiveMode,int,int)
const int zCArchiverFactory__CreateArchiverWrite_G2 = 5353376;
var int retVal;
const int call = 0;
if (CALL_Begin(call)) {
CALL_PutRetValTo(_@(retVal));
CALL_IntParam(_@(arcFlags));
CALL_IntParam(_@(saveGame));
CALL_IntParam(_@(archiveMode));
CALL_PtrParam(_@(filePtr));
CALL__thiscall(MEMINT_SwitchG1G2(zarcFactory_addr_G1, zarcFactory_addr_G2), MEMINT_SwitchG1G2(zCArchiverFactory__CreateArchiverWrite_G1, zCArchiverFactory__CreateArchiverWrite_G2));
call = CALL_End();
};
return + retVal;
};
/*
* zCArchiverFactory_CreateArchiverRead_FileName
*/
func int zCArchiverFactory_CreateArchiverRead_FileName(var string fileName, var int arcFlags)
{
//0x0086F9AC class zCArchiverFactory zarcFactory
const int zarcFactory_addr_G1 = 8845740;
//0x008D472C class zCArchiverFactory zarcFactory
const int zarcFactory_addr_G2 = 9258796;
//0x0050A2B0 public: virtual class zCArchiver * __thiscall zCArchiverFactory::CreateArchiverRead(class zSTRING const &,int)
const int zCArchiverFactory__CreateArchiverRead_G1 = 5284528;
//0x0051A120 public: virtual class zCArchiver * __thiscall zCArchiverFactory::CreateArchiverRead(class zSTRING const &,int)
const int zCArchiverFactory__CreateArchiverRead_G2 = 5349664;
CALL_IntParam(arcFlags);
CALL_zStringPtrParam(fileName);
CALL__thiscall(MEMINT_SwitchG1G2(zarcFactory_addr_G1, zarcFactory_addr_G2), MEMINT_SwitchG1G2(zCArchiverFactory__CreateArchiverRead_G1, zCArchiverFactory__CreateArchiverRead_G2));
return + CALL_RetValAsPtr();
};
/*
* zCArchiverFactory_CreateArchiverRead
*/
func int zCArchiverFactory_CreateArchiverRead(var int filePtr, var int arcFlags)
{
//0x0086F9AC class zCArchiverFactory zarcFactory
const int zarcFactory_addr_G1 = 8845740;
//0x008D472C class zCArchiverFactory zarcFactory
const int zarcFactory_addr_G2 = 9258796;
//0x0050A240 public: virtual class zCArchiver * __thiscall zCArchiverFactory::CreateArchiverRead(class zFILE *,int)
const int zCArchiverFactory__CreateArchiverRead_G1 = 5284416;
//0x0051A0B0 public: virtual class zCArchiver * __thiscall zCArchiverFactory::CreateArchiverRead(class zFILE *,int)
const int zCArchiverFactory__CreateArchiverRead_G2 = 5349552;
var int retVal;
const int call = 0;
if (CALL_Begin(call)) {
CALL_PutRetValTo(_@(retVal));
CALL_IntParam(_@(arcFlags));
CALL_PtrParam(_@(filePtr));
CALL__thiscall(MEMINT_SwitchG1G2(zarcFactory_addr_G1, zarcFactory_addr_G2), MEMINT_SwitchG1G2(zCArchiverFactory__CreateArchiverRead_G1, zCArchiverFactory__CreateArchiverRead_G2));
call = CALL_End();
};
return + retVal;
};
/*
* zCArchiverGeneric_WriteObject
*/
func void zCArchiverGeneric_WriteObject(var int archiverPtr, var int objectPtr)
{
//0x00514310 public: virtual void __fastcall zCArchiverGeneric::WriteObject(class zCObject *)
const int zCArchiverGeneric__WriteObject_G1 = 5325584;
//0x00524EC0 public: virtual void __fastcall zCArchiverGeneric::WriteObject(class zCObject *)
const int zCArchiverGeneric__WriteObject_G2 = 5394112;
if (!archiverPtr) { return; };
const int call = 0;
if (CALL_Begin(call)) {
CALL__fastcall(_@(archiverPtr), _@(objectPtr), MEMINT_SwitchG1G2(zCArchiverGeneric__WriteObject_G1, zCArchiverGeneric__WriteObject_G2));
call = CALL_End();
};
};
/*
* zCArchiverGeneric_EndOfArchive
*/
func int zCArchiverGeneric_EndOfArchive(var int archiverPtr)
{
//0x00512200 public: virtual int __fastcall zCArchiverGeneric::EndOfArchive(void)
const int zCArchiverGeneric__EndOfArchive_G1 = 5317120;
//0x00522650 public: virtual int __fastcall zCArchiverGeneric::EndOfArchive(void)
const int zCArchiverGeneric__EndOfArchive_G2 = 5383760;
if (!archiverPtr) { return 0; };
var int retVal;
const int null = 0;
const int call = 0;
if (CALL_Begin(call)) {
CALL_PutRetValTo(_@(retVal));
CALL__fastcall(_@(archiverPtr), _@(null), MEMINT_SwitchG1G2(zCArchiverGeneric__EndOfArchive_G1, zCArchiverGeneric__EndOfArchive_G2));
call = CALL_End();
};
return + retVal;
};
/*
* zCArchiverGeneric_ReadObject
*/
func int zCArchiverGeneric_ReadObject(var int archiverPtr, var int objectPtr)
{
//0x005161B0 public: virtual class zCObject * __fastcall zCArchiverGeneric::ReadObject(class zCObject *)
const int zCArchiverGeneric__ReadObject_G1 = 5333424;
//0x00526DF0 public: virtual class zCObject * __fastcall zCArchiverGeneric::ReadObject(class zCObject *)
const int zCArchiverGeneric__ReadObject_G2 = 5402096;
if (!archiverPtr) { return 0; };
var int retVal;
const int call = 0;
if (CALL_Begin(call)) {
CALL_PutRetValTo(_@(retVal));
CALL__fastcall(_@(archiverPtr), _@(objectPtr), MEMINT_SwitchG1G2(zCArchiverGeneric__ReadObject_G1, zCArchiverGeneric__ReadObject_G2));
call = CALL_End();
};
return + retVal;
};
/*
* zCArchiverGeneric_Close
*/
func void zCArchiverGeneric_Close(var int archiverPtr)
{
//0x00512080 public: virtual void __thiscall zCArchiverGeneric::Close(void)
const int zCArchiverGeneric__Close_G1 = 5316736;
//0x00522470 public: virtual void __thiscall zCArchiverGeneric::Close(void)
const int zCArchiverGeneric__Close_G2 = 5383280;
if (!archiverPtr) { return; };
const int call = 0;
if (CALL_Begin(call)) {
CALL__thiscall(_@(archiverPtr), MEMINT_SwitchG1G2(zCArchiverGeneric__Close_G1, zCArchiverGeneric__Close_G2));
call = CALL_End();
};
};