-
Notifications
You must be signed in to change notification settings - Fork 1
/
ReversedStructsUnpacked.h
2174 lines (1932 loc) · 49.1 KB
/
ReversedStructsUnpacked.h
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
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
#ifndef __REVERSEDSTRUCTSUNPACKED_H__
#define __REVERSEDSTRUCTSUNPACKED_H__
#include <d3d11.h>
#include <dxgi1_2.h>
#include <dinput.h>
#include "SteamApi.h"
#include "Math.h"
#include "SDK\Common.h"
#include "SDK\CSaveDataDevice.h"
#include "SDK\CCamera.h"
#include "SDK\Entity\CBehavior.h"
#include "SDK\Entity\Pl0000.h"
#include "SDK\Entity\Pl0013.h"
#include "SDK\Entity\Pl1010.h"
#define _MM_RSHUFFLE(mask, x, y, z, w) \
(x) = ((mask & 0xC) >> 2); \
(y) = ((mask & 0x30) >> 4); \
(z) = ((mask & 0xC0) >> 6); \
(w) = (mask & 0x3)
#define ALIGN(size, align) (((size) + (align) - 1) & ~(align))
// nier uses this https://github.com/rmind/tlsf
// debug build has strings
/*
Used to convert from object id to object name
Can be also used to convert from object name to object id
*/
struct ObjectIdConvert
{
int32_t m_ObjectIdBase;
const char* m_szPrefix;
};
/*
Nier Automata's BannedWord::cChecker
*/
class BannedWordChecker
{
public:
struct BannedWordBinaryHeader
{
uint32_t uWordCount;
};
struct WordEntry
{
DWORD dwLength;
LPWSTR lpszBannedWord;
};
virtual void* function0(BYTE flags);
void* m_pBuffer;
QWORD m_qwBufferSize;
WordEntry* m_pEntries;
uint32_t m_uWordCount;
};
struct Sound
{
const char* m_szName;
uint32_t m_uFNV1Hash;
DWORD m_Flags; //probably a bitflag - (values I've seen, 0x05000000, 0x7000000, 0x00000000, 0x800000 [mute probably])
};
struct ItemHashEntry
{
int32_t GroupID;
int32_t Idx;
uint32_t Crc32;
};
class Pl0000;
struct SoundEmitter
{
Pl0000* m_pEntity; // this is some lower interface like behaviour
int32_t m_iBoneId;
};
class CUnknown_t
{
DWORD id; //0x0000 idk?
char aligment[4]; //0x0004
void* punk; //0x0008
void* punk2; //0x0010
void* pFunction; //0x0018
};
struct CHeapInstance;
/*
CXML is a pure virtual interface with all 82 vfuncs pure virtuals
Size of struct is ?? (??) bytes
*/
//struct CXmlBinary //: CXML
//{
// void* lpVtbl;
// QWORD m_pHeap; // don't exactly know what heap struct this is
// QWORD* m_pData;
// void* m_pBXM;
// BXMEntry* m_pEntries; // m_pBXM + 16
// BXMNameOridinal* m_pNameOridinals; // m_dwFlags & 1 ? 8 * nQWords : 4 * nQWords;
// const char** m_pszNames;
// DWORD m_dwFlags; // 1u = m_uQWordCount >= 0xFFFF
//};
struct CObjReadSystem
{
// Size of struct 0x58
struct Work
{
// FileRead::Listener, Hw::cRBTreeNodeTemp<ObjReadSystem::Work>
// Size of struct 0xB8
struct CObjReadSystem::Work::Desc
{
DWORD dword0;
CObjReadSystem::Work::Desc* m_pParent;
CObjReadSystem::Work::Desc* m_pRight;
CObjReadSystem::Work::Desc* m_pLeft;
int32_t m_Crc32;
volatile int32_t m_0x20;
int32_t gap2c;
DWORD m_dw0x30;
DWORD m_dwType;
char m_szFilename[64];
int32_t m_objectId;
DWORD m_dw0x78;
QWORD m_qw0x80;
SIZE_T m_nBytes;
CHeapInstance* m_pHeap;
DWORD m_dwFlags98;
DWORD m_dw0x9C;
DWORD m_dw0xA0;
DWORD m_dw0xA4;
CObjReadSystem::Work* m_pWork;
char pad[8];
};
// this this is shit
struct Info
{
BYTE gap0[32];
DWORD m_crc32;
CObjReadSystem::Work::Desc* m_pDescription;
};
void* m_pVtbl; //0x0000
char gap8[16]; //0x0008
struct CObjReadSystem::Work* m_pPrev; //0x0018
struct CObjReadSystem::Work* m_pNext; //0x0020
DWORD m_flags; //0x0028
int32_t m_ObjectId;
int32_t m_objectid2;
int32_t m_objectid3;
CObjReadSystem::Work::Desc* m_pUnknown; //0x0038 | Hw::cRBTreeNodeTemp<ObjReadSystem::Work>
HANDLE m_hSemaphore2; //0x0040
void* m_pDatPtr; //0x0048
void* m_pDatPtr2; //0x0050
void* m_unk1; //0x0058
void* m_unk2;
};
struct ObjConstructType
{
uint32_t m_uObjectId;
int32_t m_iSetType;
};
// Size of struct 0xCC
struct ObjType
{
uint32_t m_uObjectId;
int32_t m_iSetType;
char pad[0xC4];
};
int32_t m_iObjectId;
int32_t m_iType;
int32_t m_iUnk;
CReadWriteLock m_Lock;
BYTE gap3C[8];
ObjType* m_pTypes;
BYTE gap50[36];
DWORD* pdword70;
BYTE gap78[8];
QWORD qword88;
ObjConstructType m_ContructTypes[16]; // cause & 0xF
};
struct CTextureBatch;
struct TextureFile;
// they might be Vector4's
struct CAxisAlignedBoundingBox
{
Vector3Aligned m_vMax;
Vector3Aligned m_vMin;
};
struct CollisionInfo;
struct CCollisionUnk
{
char gap00[8];
CReadWriteLock m_Lock;
BYTE gap34[60];
QWORD qword70;
BYTE gap78[16];
DWORD dword88;
};
struct CCollisionUnknown
{
CCollisionUnk* m_pUnknownArray;
CCollisionUnk** m_ppUnknownArray;
int32_t m_nAllocatedEntries;
int32_t m_nFreeEntries;
};
struct CCollisionDataSegment
{
void* m_pVtbl;
BYTE gap8[8];
Vector3Aligned m_vMin;
Vector3Aligned m_vMax;
QWORD qword30;
QWORD qword38;
QWORD qword40;
QWORD qword48;
QWORD qword50;
QWORD qword58;
QWORD qword60;
QWORD qword68;
BYTE gap70[4];
QWORD qword74;
DWORD dword7C;
QWORD qword80;
};
struct CCollisionObjectName
{
char* m_szName;
int32_t m_bInitalized;
};
struct CCollisionTreeNode;
// TODO:
class CCollisionDataObjectBase
{
public:
virtual __int64 function0(char a1);
virtual __int64 function1();
virtual __int64 function2();
virtual void function3(CollisionInfo* a2, __int64 a3, CAxisAlignedBoundingBox* a4);
virtual void CheckSphere(CollisionInfo* a2, __int64 a3, CAxisAlignedBoundingBox* a4);
virtual void function5(CollisionInfo* a2, __int64 a3, CAxisAlignedBoundingBox* a4);
virtual void CheckBox(CollisionInfo* a2, __int64 a3, CAxisAlignedBoundingBox* a4);
virtual void function7(float* a2, __int64 a3, CAxisAlignedBoundingBox* a4);
virtual void CheckCapsule(CollisionInfo* a2, __int64 a3, CAxisAlignedBoundingBox* a4);
};
/*
* CCollisionDataObjectImpl : public CCollisionDataObjectBase
*
* Size of struct is 0x120 (288) bytes
*/
class CCollisionDataObject
{
public:
virtual __int64 function0(char a1);
virtual __int64 function1();
virtual __int64 function2();
virtual void function3(CollisionInfo* a2, __int64 a3, CAxisAlignedBoundingBox* a4);
virtual void CheckSphere(CollisionInfo* a2, __int64 a3, CAxisAlignedBoundingBox* a4);
virtual void function5(CollisionInfo* a2, __int64 a3, CAxisAlignedBoundingBox* a4);
virtual void CheckBox(CollisionInfo* a2, __int64 a3, CAxisAlignedBoundingBox* a4);
virtual void function7(float* a2, __int64 a3, CAxisAlignedBoundingBox* a4);
virtual void CheckCapsule(CollisionInfo* a2, __int64 a3, CAxisAlignedBoundingBox* a4);
//void* vtbl; //0x0000
//char pad[8]; //0x0008
CAxisAlignedBoundingBox m_AABB; //0x0010
DWORD dword30; //0x0030
DWORD m_uScenePropIndex; //0x0034 changes when a scene is loaded therefore appears to be an index
DWORD dword38; //0x0038
BYTE gap3C[20]; //0x003C
QWORD qword50;
QWORD qword58;
CCollisionDataSegment* qword60;
CCollisionDataSegment* qword68;
char gap5C[4];
QWORD qword78;
QWORD qword80;
CCollisionObjectName* m_pNames;
int32_t m_nNames;
char gap94[4];
CCollisionDataSegment* m_pSegments;
int32_t m_nSegments;
char gapA4[4];
uint16_t* m_pBoneMaps;
int32_t m_nBoneMaps;
char gapB4[74];
QWORD qword100;
CCollisionTreeNode* m_pCollisionTrees;
CCollisionTreeNode* m_pCollisionTree;
int32_t m_nCollisionTreeNodes;
};
VALIDATE_OFFSET(CCollisionDataObject, m_AABB, 0x10);
VALIDATE_OFFSET(CCollisionDataObject, m_uScenePropIndex, 0x34);
VALIDATE_OFFSET(CCollisionDataObject, m_pSegments, 0x98);
VALIDATE_OFFSET(CCollisionDataObject, m_pCollisionTree, 0x110);
VALIDATE_SIZE(CCollisionDataObject, 0x120);
struct CCollisionDataEntry
{
CCollisionDataObject* m_pObject;
struct CCollisionDataEntry* m_pNext;
};
struct CCollisionDataObjectManager;
struct CCollisionData
{
CCollisionDataEntry* m_pEntries;
CCollisionDataEntry** m_ppEntries;
int32_t m_nAllocatedEntries;
int32_t m_nFreeEntries;
CCollisionDataObjectManager* m_pOwner;
CCollisionDataEntry* m_pEntries2;
};
struct CCollisionVertex
{
Vector4 m_vPosition;
Vector4 m_vBoneWeights;
uint32_t m_uBones[4];
};
struct CCollisionBatch
{
CCollisionVertex* m_pVertices;
unsigned __int16* m_pIndices;
int32_t m_iBoneIndex;
int32_t m_iVertexCount;
int32_t m_iIndiceCount;
int32_t m_iPrimitiveCount;
};
struct CCollisionMesh
{
DWORD m_uBatchType;
int32_t m_iNameIndex;
DWORD m_uFlags;
BYTE gapC[4];
DWORD dword10;
BYTE gap14[4];
CCollisionBatch* m_pBatches;
int32_t m_iBatchCount;
};
struct CCollisionTreeNode
{
Vector3Aligned m_vP1;
Vector3Aligned m_vP2;
unsigned __int16* m_pMeshIndices;
int32_t m_uMeshIndexCount;
int32_t m_iLeft;
int32_t m_iRight;
int32_t m_iUnk;
};
struct CCollisionContext
{
uint32_t m_uReferenceCount;
char** m_pNames;
int32_t m_nNameCount;
CCollisionMesh* m_pMeshes;
int32_t m_iMeshCount;
QWORD m_pBoneMap;
DWORD m_uBoneMapCount;
QWORD m_pBoneMap2;
DWORD m_uBoneMap2Count;
QWORD m_pMeshMaps;
DWORD m_uMeshCount;
CCollisionTreeNode* m_pColTree;
int32_t m_iColTreeNodeCount;
QWORD m_pPrimitives;
QWORD qword70;
};
struct COLHdr
{
union {
char id[4];
uint32_t magic;
};
uint32_t version;
uint32_t offsetNames;
int32_t nameCount;
uint32_t offsetMeshes;
int32_t meshCount;
uint32_t offsetBoneMap;
uint32_t boneMapCount;
uint32_t offsetBoneMap2;
uint32_t boneMap2Count;
uint32_t offsetMeshMap;
int32_t meshMapCount;
uint32_t offsetColTreeNodes;
int32_t colTreeNodesCount;
};
// CRedBlackTreeNode<T>*
struct CCollisionContextNode
{
DWORD dword0;
CCollisionContextNode* m_pRoot;
CCollisionContextNode* m_pRight;
CCollisionContextNode* m_pLeft;
CCollisionContext m_Context;
COLHdr* m_pColFile;
CCollisionContextNode* m_pNext;
CCollisionContextNode* m_pPrevious;
};
struct CHeapInfo;
// Size of struct is 0xC8 (200) bytes
struct CCollisionDataObjectManager
{
CReadWriteLock m_Lock;
CCollisionData m_Data;
CCollisionUnknown m_Unknown;
DWORD dword74;
CCollisionContextNode* m_pCollisionContext2;
CCollisionContextNode** m_ppCollisionContexts;
int32_t m_nAllocatedCollisionTrees;
int32_t m_nFreeCollisionTrees;
CCollisionContextNode* m_pCollisionContext;
CCollisionContextNode* m_pCurrentCollision;
int32_t m_nUsedCollisionTrees;
DWORD dwordA4;
CHeapInfo* m_pHeapInfo;
CHeapInfo* m_HeapInfo;
QWORD qwordB0;
DWORD dwordB8;
DWORD dwordBC;
};
struct __declspec(align(16)) CollisionInfo
{
Vector4 m_vPosition;
Vector3Aligned m_vMax;
__m128 m_vDirA3A2;
Vector3Aligned m_vRight;
float m_flLength_v20;
};
typedef struct WTBHeader
{
union {
char Id[4]; // 0x00
uint32_t Magic;
};
int32_t unknown;
int32_t uTexCount;
uint32_t ofsTexOfs;
uint32_t ofsTexSizes;
uint32_t ofsTexFlags;
uint32_t uTexIdxOffset;
uint32_t uTexInfoOffset;
} WTBHeader, WTBHdr, WTAHeader, WTAHdr;
class CModelAnalyzer;
struct CMaterialInfo
{
CModelAnalyzer* m_pModelAnalyzer;
CMaterialDescription m_Desc;
};
struct CModelEntryData; //forward def maybe temp
class CModelExtendWork;
struct CTextureResourceManager
{
CReadWriteLock m_Lock;
BYTE gap2C[52];
DWORD dword60;
DWORD dword64;
CTextureData* m_pTextureData;
QWORD qword70;
CTextureResource* m_pTextures;
QWORD qword80;
};
class CModelWork;
struct CVertexLayout;
class CObjHit
{
void* m_pVtbl; //0x0000
char _0x0008[136]; //0x0008
Vector4 m_vec[2]; //0x0090
};
struct CSamplerState;
struct CAnimationListEntry
{
EntityHandle m_hAnimationNode;
Animation::Motion::NodePlay* m_pNode; // Animation::Motion::Node
};
struct __declspec(align(8)) CAnimationList
{
uint32 m_uSize;
uint32 m_uItems;
uint32 m_uSlot;
uint32 m_uShift;
CAnimationListEntry* m_pEntries;
CReadWriteLock m_Lock;
};
// Found by Dennis
// Address = 0x14160EB40
struct Sun
{
Vector2 m_vPosition; //0x0000
char _0x0008[56]; //0x0008
Vector4 m_vColor; //0x0040
float m_flBloom; //0x0044
};
class CDialogWindow
{
void* lpVtbl;
float fl0x28;
float fl0x2C;
float fl0x30;
float fl0x34;
};
struct Keyboard_t
{
IDirectInputDevice8A* pDevice;
BOOL bAcquired;
HKL Layout;
};
struct Mouse_t
{
HWND hWnd;
IDirectInputDevice8A* pDevice;
BOOL bAcquired;
BOOL bShowCursor;
BOOL bShowCursorOld;
int32_t field_1C;
int32_t field_20;
BOOL bClipCursor;
int32_t field_28;
float fl_field_2C;
float fl_field_30;
};
enum eControllerButtons
{
DPAD_LEFT = 0x1,
DPAD_RIGHT = 0x2,
DPAD_DOWN = 0x4,
DPAD_UP = 0x8,
A = 0x10,
B = 0x20,
X = 0x40,
Y = 0x80,
START = 0x100,
BACK = 0x200,
LEFT_SHOULDER = 0x400,
LEFT_THUMB = 0x1000,
RIGHT_SHOULDER = 0x2000,
RIGHT_THUMB = 0x8000
};
struct CGamePadDevice
{
void* m_vtbl;
DWORD m_dwUnk8;
DWORD m_dwUnkC;
DWORD m_dw10;
DWORD m_dw14;
DWORD m_dw18;
DWORD m_dwUserIndexs[4];
};
struct controller_input_state2
{
DWORD dwunk; //0x0000
BOOL bUpdated; //0x0004
float m_flThumbLX; //0x0008
float m_flThumbLY; //0x000C
float m_flThumbRX; //0x0010
float m_flThumbRY; //0x0014
float m_flLeftTrigger; //0x0018
float m_flRightTrigger; //0x001C
uint32_t m_uButtons; //0x0020 | eControllerButtons
};
/*
Size of struct is 0x80 (128) bytes
*/
struct controller_input
{
controller_input_state2 state;
BYTE gap20[24];
char char38[64];
BOOL m_bVibrate;
};
/*
Size of struct is 0x18 (24) bytes
*/
struct controller_vibration
{
BOOL m_bVibrate; //0x00
float m_flLeftVibration; //0x04
float m_flRightVibration; //0x08
DWORD dw0x0C; //0x0C
DWORD dw0x10; //0x10
BOOL m_bOldVibrate; //0x14
};
// apperantly 128 bytes according to stack memset, but asm says 32 bytes
struct controller_input_state
{
BOOL bUpdated; //0x0000
float m_flThumbLX; //0x0004
float m_flThumbLY; //0x0008
float m_flThumbRX; //0x000C
float m_flThumbRY; //0x0010
float m_flLeftTrigger; //0x0014
float m_flRightTrigger; //0x0018
DWORD m_dwButtons; //0x001C | eConrollerButtons
};
// left and right mouse can be swapped
enum eMouseButtons
{
MOUSE_BUTTON0 = 1,
MOUSE_BUTTON1 = 2,
MOUSE_MIDDLE = 4
};
struct CMouseInputContext
{
DWORD dword0; //possibly bool
DWORD m_bShowCursorOld;
DWORD dword8;
LONG m_lWidth;
LONG m_lHeight;
float m_flDeltaX;
float m_flDeltaY;
float m_flDeltaZ;
uint32_t m_fButtons; // eMouseButtons
};
class CGraphicContextDx11;
class CGraphicDeviceDx11;
struct CConstantBufferInfo;
struct CGraphicCommand
{
CModelEntryData* m_pModelData; //0x00
void* m_p0x008; //0x08
void* m_pCallback; //0x10
CShaderSetting* m_pSetting; //0x18
BYTE gap18[16]; //0x20
QWORD qword30; //0x30
BYTE gap38[88]; //0x38
BYTE m_SamplerIndex; //0x90
BYTE gap91[7]; //0x91
BYTE m_PrimitiveWorkIndex; //0x98
BYTE gap99[23]; //0x99
CModelEntry* m_pModelEntry; //0xB0
BYTE gapB8[8]; //0xB8
int32_t m_iVertexIndex; //0xC0
int32_t m_iInputLayout; //0xC4
uint32_t unsignedCC; //0xCC
};
VALIDATE_OFFSET(CGraphicCommand, qword30, 0x30);
VALIDATE_OFFSET(CGraphicCommand, m_SamplerIndex, 0x90);
VALIDATE_OFFSET(CGraphicCommand, m_pModelEntry, 0xB0);
VALIDATE_OFFSET(CGraphicCommand, m_iVertexIndex, 0xC0);
class CGraphics;
struct CGraphicCommandList
{
__int64(__fastcall* m_pCallback)(CGraphics*, CGraphics*, CGraphicCommand*); // seems rdx is a garbage pointer
CGraphicCommand* m_pCommand;
struct CGraphicCommandList* m_pPrevious;
struct CGraphicCommandList* m_pNext;
uint32_t m_uFlags;
int32_t m_iCommandIndex;
CHAR pad28[8];
};
VALIDATE_SIZE(CGraphicCommandList, 0x30);
struct COtManagerPtr98
{
CGraphicCommand* m_pCommands;
CGraphicCommandList* m_pCmdLists;
int32_t m_iCommandIndex;
BYTE gap14[4];
int32_t* m_pTags;
};
/*
This is from memcpy
This must mean everything after is a different struct
Size of struct is 0xA8 (168) bytes
*/
struct COtManager
{
void* m_pVtbl; //0x00
BYTE gap8[72]; //0x08
//0x10 | embededd struct
CGraphicCommandList** m_pCmdLists; //0x50
BYTE gap58[8]; //0x58
int32_t* qword60; //0x60
CGraphicCommandList* m_pActiveList; //0x68
int32_t m_iGraphicListCount; //0x70
int32_t m_nMaxGraphicListCount; //0x74
volatile uint64_t m_uCmdIndex; //0x78
uint64_t m_uCmdCount; //0x80
DWORD m_uMaxTagCount; //0x88
DWORD dword8C; //0x8C
int32_t signed90; //0x90
BYTE gap94[4]; //0x94
COtManagerPtr98* m_ptr98; //0x98
BYTE gapA0[4]; //0xA0
BOOL m_bGraphicListInitalized; //0xA4
};
VALIDATE_OFFSET(COtManager, m_bGraphicListInitalized, 0xA4);
VALIDATE_SIZE(COtManager, 0xA8);
class COsMainWindow
{
public:
void* m_vtbl;
HWND m_hWindow;
union
{
struct { POINT m_WindowPosition; int32_t m_iWidth; int32_t m_iHeight; };
RECT m_windowRect;
};
BYTE gap20[4];
BOOL m_bUpdateRect;
BYTE gap28[8];
BOOL m_bMouse[3];
};
class CUserInfoBase
{
virtual ~CUserInfoBase();
};
struct CpkMountInfo
{
const char* m_szName;
int32_t m_iLoadOrder;
};
struct CpkLoader
{
uint32_t m_uCpkCount; //0x00
char alignment[4]; //0x04
void(*LoadCpks)(uint32_t index, const char* szCpkName); //0x08
void(*UnloadCpks)(uint32_t index); //0x10
QWORD qw0x18; //0x18
DWORD m_uMaxCpkCount;
QWORD qwMaxCpkCount;
};
struct CpkLoad_t
{
int32_t m_Status;
BYTE gap4[4];
QWORD ptr8;
void* gap10;
BYTE gap18[8];
PBYTE pBuffer;
DWORD hBinder;
BYTE gap28[28];
QWORD szVersion;
void* gap50;
BYTE gap58[368];
DWORD dword1C8;
BYTE gap1CC[4];
QWORD qword1D0;
QWORD qword1D8;
QWORD qword1E0;
const char* szCpkPath;
DWORD dword1F0;
DWORD dword1F4;
void* ptr1F8;
DWORD dword200[2];
void* fnptr208;
void* fnptr210;
CpkLoad_t* pNext;
void* fnptr220;
void* fnptr228;
void* fnptr230;
void* fnptr238;
DWORD dword240;
DWORD dword244;
DWORD dword248;
DWORD dword24C;
DWORD dword250;
DWORD dword254;
DWORD dword258;
DWORD dword25C;
DWORD dword260;
DWORD dword264;
DWORD dword268;
DWORD dword26C;
DWORD dword270;
DWORD dword274;
DWORD dword278;
DWORD dword27C;
DWORD dword280;
DWORD dword284;
DWORD dword288;
DWORD dword28C;
DWORD dword290;
DWORD dword294;
DWORD dword298;
DWORD dword29C;
DWORD dword2A0;
DWORD dword2A4;
DWORD dword2A8;
DWORD dword2AC;
const char* sz2B0;
QWORD dword2B8;
DWORD dword2C0;
QWORD dword2C4;
};
struct CpkBinderHandle
{
void* ptr0;
BYTE gap0[16];
QWORD fnptr18;
BYTE gap20[8];
DWORD dword28;
DWORD dword2C;
DWORD dword30;
const char* szCpkName;
BYTE gap40[24];
QWORD qword58;
CpkLoad_t* pCpkLoad;
};
struct CpkEntry
{
BOOL m_bInUse;
DWORD dw2;
CpkBinderHandle* m_pBinderHandle;
DWORD m_binderid;
DWORD m_Status;
int32_t m_iLoadOrder;
DWORD dw7;
};
struct CHeapInstance;
template<typename T>
struct CConstructionInfo
{
uint32_t m_uObjectId; //0x0000
char alignment[4]; //0x0004
T* (*Constructor)(CHeapInfo* pHeapInfo);//0x0008
QWORD m_GroupId; //0x0010
const char* m_szName; //0x0018
void* pUnk; //0x0020
};
template<typename T>
struct CUIConstructorInfo
{
DWORD id; //0x0000
DWORD dword04; //0x0004
DWORD dword08; //0x0008
DWORD dword0C; //0x000C
T* (*Constructor)(CHeapInfo* pHeapInfo);//0x0010
};
enum DialogUIWhiteType
{
DialogUIWhiteType_YesNo = 0,
DialogUIWhiteType_Ok
};
enum DialogUIBlackType
{
DialogUIBlackType_YesNo = 0,
DialogUIBlackType_Message,
DialogUIBlackType_QuitRetry,
DialogUIBlackType_Persistent
};
/*
Event::Work maybe??? probs
Size of struct 0x60 (96) bytes
*/
struct CPhase
{
BYTE byte0;
BYTE gap1[19];
DWORD dword14;
DWORD dword18;
DWORD dword1C;
VOID* m_pEvent; // 0x20 Event::ReadUnit*
char pad[0x38]; // 0x28
};
struct CPhaseManager
{
StaticArray<CPhase*, 8> m_Phases;
};
// Red-Black tree
struct PuidMixin
{
struct PuidMixin* m_pHead; // 0x0000
struct PuidMixin* m_pRight; // 0x0008
struct PuidMixin* m_pLeft; // 0x0010
char _0x0018; // 0x0018
bool m_bLast; // 0x0019
char _0x0020[6]; // 0x0020
uint32_t m_uDescriptionHash; // 0x0026 FIXME: ???? this might be wrong
char alignment[4]; // 0x0030
char* m_szDescription; // 0x0038
UINT64 m_uReferenceCount; // 0x0040
};
/*
SceneStateHead
size = 0x20 (32) bytes
*/
struct SceneStateHead
{
};
// this has a doubly linked list for sure prbably a different struct tho
// that is 32 bytes that is the head
// RED BLACK TREE iirc
struct SceneState
{
SceneStateHead* m_pHead; //0x0000
SceneState* m_pNext; //0x0008
SceneState* m_pLast; //0x0010
char _0x0018; //0x0018
bool m_bLast; //0x0019 not 100%
char _0x0020[6]; //0x0020
DWORD m_DescriptionHash; //crc32
char alignment[4];
char* m_szDescription;