-
Notifications
You must be signed in to change notification settings - Fork 3
/
CKHook.h
78 lines (62 loc) · 2.15 KB
/
CKHook.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
#pragma once
#include "KObject.h"
#include "CKUtils.h"
#include "Events.h"
struct CKHookLife;
struct CKSceneNode;
struct CKHook : CKMRSubclass<CKHook, CKMemberReflectable<CKCategory<2>>, 0> {
kobjref<CKHook> next;
uint32_t unk1 = 0;
kobjref<CKHookLife> life;
KPostponedRef<CKSceneNode> node;
// XXL2+:
kobjref<CKHook> x2next; // might serve as a "next life", including only hooks that have life
uint32_t x2UnkA, x2Sector = 0;
// Addendum:
int activeSector = -2;
void reflectMembers2(MemberListener& r, KEnvironment* kenv);
void onLevelLoaded(KEnvironment *kenv) override;
int getAddendumVersion() override;
void deserializeAddendum(KEnvironment* kenv, File* file, int version) override;
void serializeAddendum(KEnvironment* kenv, File* file) override;
virtual void update() {}
};
struct CKHookLife : CKCategory<3> {
kobjref<CKHook> hook;
kobjref<CKHookLife> nextLife;
uint32_t unk1 = 0;
void deserialize(KEnvironment* kenv, File *file, size_t length) override;
void serialize(KEnvironment* kenv, File *file) override;
};
// TO REMOVE
template <class D, class T, int N> using CKHookSubclass = CKMRSubclass<D, T, N>;
// ===== Common hooks =====
struct CKGrpBonusPool;
struct CKCrateCpnt;
struct CDynamicGround;
struct CKHkCrate : CKHookSubclass<CKHkCrate, CKHook, 112> {
kobjref<CDynamicGround> ckhcUnk0;
kobjref<CKCrateCpnt> ckhcUnk1;
void reflectMembers2(MemberListener& r, KEnvironment* kenv);
};
struct CKHkBasicBonus : CKHookSubclass<CKHkBasicBonus, CKHook, 114> {
kobjref<CKHkBasicBonus> nextBonus;
kobjref<CKGrpBonusPool> pool;
kobjref<CKObject> cpnt;
kobjref<CKObject> hero;
std::array<float, 7> somenums;
void reflectMembers2(MemberListener& r, KEnvironment* kenv);
};
struct CKHkLight : CKHookSubclass<CKHkLight, CKHook, 195> {
kobjref<CKObject> lightGrpLight;
EventNode lightEvtSeq1;
EventNode lightEvtSeq2;
EventNode lightEvtSeq3;
EventNode lightEvtSeq4;
void reflectMembers2(MemberListener& r, KEnvironment* kenv);
};
struct CKHkSkyLife : CKSubclass<CKHookLife, 112> {
uint32_t skyColor, cloudColor;
void deserialize(KEnvironment* kenv, File* file, size_t length) override;
void serialize(KEnvironment* kenv, File* file) override;
};