@@ -218,67 +218,52 @@ struct FMalloc
218
218
struct FStruct
219
219
{
220
220
void * base;
221
- private:
222
- int bitfield = 0 ;
223
- unsigned long currentField = NULL ;
224
221
public:
225
222
FStruct (void *base) {
226
223
this ->base = base;
227
224
};
228
225
UObject *popObject () {
229
- bitfield = 0 ;
230
226
class UObject *object = ((UObject **)(this ->base ))[0 ];
231
227
this ->base = (void *)((UObject **)this ->base + 1 );
232
228
return object;
233
229
};
234
230
struct FName *popFName () {
235
- bitfield = 0 ;
236
231
struct FName *object = (FName *)(this ->base );
237
232
this ->base = (void *)((FName *)this ->base + 1 );
238
233
return object;
239
234
};
240
235
struct FString *popFString () {
241
- bitfield = 0 ;
242
236
struct FString *object = (FString *)(this ->base );
243
237
this ->base = (void *)((FString *)this ->base + 1 );
244
238
return object;
245
239
};
246
240
struct FVector *popFVector () {
247
- bitfield = 0 ;
248
241
struct FVector *object = (FVector *)(this ->base );
249
242
this ->base = (void *)((int )this ->base + 0xC );
250
243
return object;
251
244
};
252
245
float *popFloat () {
253
- bitfield = 0 ;
254
246
float *object = (float *)(this ->base );
255
247
this ->base = (void *)((float *)this ->base + 1 );
256
248
return object;
257
249
};
258
250
unsigned char popByte () {
259
- bitfield = 0 ;
260
251
unsigned char object = ((char *)(this ->base ))[0 ];
261
252
this ->base = (void *)((char *)this ->base + 1 );
262
253
return object;
263
254
};
264
255
int popInt () {
265
- bitfield = 0 ;
266
256
int object = ((int *)(this ->base ))[0 ];
267
257
this ->base = (void *)((int *)this ->base + 1 );
268
258
return object;
269
259
};
270
260
unsigned long popULong () {
271
- bitfield = 0 ;
272
261
unsigned long object = ((unsigned long *)(this ->base ))[0 ];
273
262
this ->base = (void *)((unsigned long *)this ->base + 1 );
274
263
return object;
275
264
};
276
265
bool popBool () {
277
- if (bitfield % 64 == 0 ) {
278
- currentField = popULong ();
279
- bitfield = 0 ;
280
- }
281
- return (currentField & (1 << (63 - bitfield++))) == 1 ;
266
+ return (bool )popULong ();
282
267
};
283
268
};
284
269
@@ -292,71 +277,55 @@ struct FFrame : public FOutputDevice
292
277
struct FFrame * PreviousFrame;
293
278
struct FOutParmRec * Outparams;
294
279
295
- private:
296
- int bitfield = 0 ;
297
- unsigned long currentField = NULL ;
298
280
public:
299
281
void SkipFunction () {
300
282
while ((this ->Code ++)[0 ] != 0x16 )
301
283
;
302
284
}
303
285
UObject *popObject () {
304
- bitfield = 0 ;
305
286
UObject *obj = nullptr ;
306
287
BL2SDK::pFrameStep (this , this ->Object , &obj);
307
288
return obj;
308
289
};
309
290
struct FName *popFName () {
310
- bitfield = 0 ;
311
291
FName *obj = new FName ();
312
292
BL2SDK::pFrameStep (this , this ->Object , obj);
313
293
return obj;
314
294
};
315
295
struct FString *popFString () {
316
- bitfield = 0 ;
317
296
FString *obj = new FString ();
318
297
BL2SDK::pFrameStep (this , this ->Object , obj);
319
298
return obj;
320
299
};
321
300
float popFloat () {
322
- bitfield = 0 ;
323
301
float obj = 0 ;
324
302
BL2SDK::pFrameStep (this , this ->Object , &obj);
325
303
return obj;
326
304
};
327
305
unsigned char popByte () {
328
- bitfield = 0 ;
329
306
unsigned char obj = 0 ;
330
307
BL2SDK::pFrameStep (this , this ->Object , &obj);
331
308
return obj;
332
309
};
333
310
int popInt () {
334
- bitfield = 0 ;
335
311
int obj = 0 ;
336
312
BL2SDK::pFrameStep (this , this ->Object , &obj);
337
313
return obj;
338
314
};
339
315
unsigned long popULong () {
340
- bitfield = 0 ;
341
316
unsigned long obj = 0 ;
342
317
BL2SDK::pFrameStep (this , this ->Object , &obj);
343
318
return obj;
344
319
};
345
320
bool popBool () {
346
- if (bitfield % 64 == 0 ) {
347
- currentField = popULong ();
348
- bitfield = 0 ;
349
- }
350
- return (currentField & (1 << (63 - bitfield++))) == 1 ;
321
+ return (bool )popULong ();
351
322
};
352
323
TArray<UObject *> *popTArrayObjects () {
353
- bitfield = 0 ;
354
324
TArray<UObject *> *obj = new TArray<UObject *>();
355
325
BL2SDK::pFrameStep (this , this ->Object , obj);
356
326
return obj;
357
327
};
358
328
py::tuple popRawTArray () {
359
- bitfield = 0 ;
360
329
TArray<void *> *obj = &TArray<void *>();
361
330
BL2SDK::pFrameStep (this , this ->Object , obj);
362
331
return py::make_tuple (FStruct ((void *)obj->Data ), obj->Count );
0 commit comments