-
Notifications
You must be signed in to change notification settings - Fork 3
/
CKManager.h
117 lines (103 loc) · 3.56 KB
/
CKManager.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
#pragma once
#include "KObject.h"
#include "CKService.h"
#include <vector>
struct CKSound;
struct CTextureDictionary;
struct CKManager : CKCategory<0> {};
struct CKReflectableManager : CKMRSubclass<CKReflectableManager, CKMemberReflectable<CKManager>, 0xBADB01> {
void reflectMembers2(MemberListener &r, KEnvironment* kenv) {}
};
struct CKServiceManager : CKSubclass<CKManager, 1> {
std::vector<kobjref<CKService>> services;
template <typename T> T *addService(KEnvironment *kenv) {
static_assert(T::CATEGORY == CKService::CATEGORY, "T must be a service.");
T *srv = kenv->createAndInitObject<T>();
services.emplace_back(srv);
return srv;
}
void deserialize(KEnvironment* kenv, File *file, size_t length) override;
void serialize(KEnvironment* kenv, File *file) override;
};
struct CKGraphic : CKMRSubclass<CKGraphic, CKReflectableManager, 2> {
kobjref<CKObject> kgfcSgRootNode;
std::array<float, 4> kgfcUnk1 = { 1.0f,1.0f,1.0f,1.0f };
std::array<float, 4> kgfcUnk2 = { 1.0f,1.0f,1.0f,1.0f };
uint32_t kgfcUnk3 = 0xFF0000FF;
float kgfcUnk4 = 27.0f;
uint32_t kgfcUnk5 = 1;
uint8_t kgfcRomasterValue = 1;
void reflectMembers2(MemberListener &r, KEnvironment *kenv);
};
struct CKGraphicX2 : CKMRSubclass<CKGraphicX2, CKReflectableManager, 2> {
kobjref<CKObject> kgfcSgRootNode;
kobjref<CKObject> kgfcSgRootNode2; // OG
int32_t ckgUnk1;
float ckgUnk2;
int32_t ckgUnk3;
//int32_t ckgUnk4;
std::vector<kobjref<CKObject>> ckgGfxManagers;
struct VideoReplacement {
std::string texName;
uint8_t ckgUnk17;
int32_t ckgUnk18;
int32_t ckgUnk19;
int32_t ckgUnk20;
float ckgUnk21;
int32_t ogvrUnk1;
int32_t ogvrUnk2;
};
std::vector<VideoReplacement> ckgVideoReplacements;
kobjref<CTextureDictionary> ckgTexDict;
void reflectMembers2(MemberListener& r, KEnvironment* kenv);
};
struct CKSoundManager : CKMRSubclass<CKSoundManager, CKReflectableManager, 3> {
struct Tune {
std::string remasterPath; // Remaster only
float duration;
uint32_t arValue1, arValue2;
};
// uint32_t sizeFor_ksndmgrSndDicts;
std::vector<uint32_t> ksndmgrSndDicts;
kobjref<CKObject> ksndmgrSndDictID;
uint8_t ksndmgrUnk3 = 1;
uint8_t ksndmgrUnk4 = 1;
uint8_t ksndmgrX2UnkByte = 0; // XXL2+
Vector3 ksndmgrX2UnkVector; // XXL2+
float ksndmgrUnk5 = 1.0f;
float ksndmgrUnk6 = 1.0f;
float ksndmgrUnk7 = 0;
float ksndmgrUnk8 = 1.0f;
// uint32_t sizeFor_ksndmgrDings;
std::vector<Tune> ksndmgrDings;
float ksndmgrUnk11 = 0.7f;
float ksndmgrUnk12 = 0.3f;
float ksndmgrUnk13 = 1.5f;
float ksndmgrUnk14 = 1.0f;
uint32_t ksndmgrSampleRate = 22050; // XXL1 only
std::vector<kobjref<CKSound>> ksndmgrSoundObjects; // XXL2+
// OG+:
std::vector<kobjref<CKObject>> ogSoundOutputEffects;
std::vector<kobjref<CKObject>> ogSoundOutputEffects2;
std::array<float, 4> ogFloatValues;
// Global (GAME) variables (Arthur+):
std::array<float, 3> arGlobFloatValues1; // OG remove one of both
std::array<float, 3> arGlobFloatValues2;
// OG+:
std::vector<kobjref<CKObject>> ogGlobStreamWaves;
struct StreamType {
std::string strtName;
std::array<float, 4> strtValues;
};
std::vector<StreamType> ogGlobStreamTypes;
void reflectMembers2(MemberListener &r, KEnvironment *kenv);
void deserializeGlobal(KEnvironment* kenv, File* file, size_t length) override;
};
struct CKInput : CKSubclass<CKManager, 4> {
// TODO
std::vector<uint8_t> data;
void deserialize(KEnvironment* kenv, File* file, size_t length) {}
void serialize(KEnvironment* kenv, File* file) {}
void deserializeGlobal(KEnvironment* kenv, File* file, size_t length) override;
void serializeGlobal(KEnvironment* kenv, File* file) override;
};