-
Notifications
You must be signed in to change notification settings - Fork 3
/
OKStruct.h
219 lines (178 loc) · 4.47 KB
/
OKStruct.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
#ifndef OKSTRUCT_H
#define OKSTRUCT_H
#include "MainInclude.h"
typedef struct OKHeader{
int Version;
CourseHeader MapHeader;
uint SectionViewPosition;
uint XLUSectionViewPosition;
uint SurfaceMapPosition;
uint Sky;
short SkyType, WeatherType;
uint Credits;
uint CourseName;
uint SerialKey;
uint Ghost;
uint Maps;
uint ObjectDataStart;
uint ObjectModelStart;
uint ObjectAnimationStart;
uint ObjectDataEnd;
uint BombOffset;
uint EchoStart;
uint EchoEnd;
char Tempo1, Tempo2, Tempo3, Tempo4;
uint MusicID;
int PathLength;
short WaterType,WaterLevel;
uint ScrollOffset;
uint ScrollEnd;
uint PathOffset;
} OKHeader;
typedef struct OKModel{
uint TextureAddress;
uint MeshAddress;
short MeshCount,MeshScale;
} OKModel;
typedef struct OKObjectList{
short ObjectIndex;
char SoundPlaying, ScriptID;
short OriginPosition[3];
short OriginAngle[3];
short OriginVelocity[3];
short OriginAngularVelocity[3];
} OKObjectList;
typedef struct OKSkeleton{
short Origin[3];
short MeshCount;
uint* MeshAddress; //array of offsets per MeshCount
} OKSkeleton;
typedef struct OKAnimationTable{
uint SkeletonOffset;
uint WalkAnimation;
uint TargetAnimation;
uint DeathAnimation;
} OKAnimationTable;
typedef struct SkeletonHeader{
OKSkeleton* BoneOffset;
int ChildCount;
} SkeletonHeader;
#define AnimationCount 3
// Update for new animation types.
typedef struct OKAnimationSet{
SkeletonHeader* SkeletonHeader[AnimationCount];
uint AnimationData[AnimationCount];
uint AnimationTable[AnimationCount];
uint AnimationSkeleton[AnimationCount];
} OKAnimationSet;
typedef struct OKObjectType{
short BehaviorClass, StatusClass;
short EffectClass, Range;
short Sight, Viewcone;
short MaxSpeed, RenderRadius;
short CollisionRadius, Hitbox;
short SoundRadius, SoundType;
char OKModelCount, OKXLUCount, GravityToggle, CameraAlignToggle;
int SoundID;//
OKModel* ObjectModel;
OKModel* ObjectXLU;//
OKAnimationSet* ObjectAnimations;
} OKObjectType;
typedef struct OKCollisionSphere{
float Radius;
float Scale;
short Position[3], BoxSize[3], Angle[3];
short CollisionType, EffectType;
} OKCollisionSphere;
typedef struct OKObject{
short ListIndex, SubBehaviorClass;
short AngularVelocity[3], PAD;
float TargetDistance;
uchar TurnStatus,WanderStatus,SearchStatus,EMPTYSTATUS;
short Counter[2];
short PathTarget,PlayerTarget;
Object ObjectData;
} OKObject;
typedef struct OKObjectHeader{
int ObjectTypeCount;
OKObjectType *ObjectTypeList;
int ObjectCount;
OKObjectList *ObjectList;
} OKObjectHeader;
typedef struct OKPathStruct{
short PathStart;
short PathStop;
uchar Type;
uchar Power;
uchar ColorR,ColorG,ColorB;
uchar AdjColorR,AdjColorG,AdjColorB;
} OKPathStruct;
#define SKY_CLEAR 0
#define SKY_CLOUD 1
#define SKY_STAR 2
#define SKY_WEATHER 3
#define WEATHER_SNOW 0
#define WEATHER_RAIN 1
#define PATH_ECHO 0
#define PATH_COLOR 1
#define PATH_CAMERA 2
#define PATH_AIRCONTROL 3
#define PATH_JUMP 4
#define PATH_NOSIMPLE 5
typedef struct OKRAMHeader{
int ScrollOffset;
int EchoOffset;
int CreditsOffset;
int CourseNameOffset;
int SerialKeyOffset;
int GhostOffset;
int MapsOffset;
OKObjectHeader ObjectHeader;
} OKRAMHeader;
typedef struct OKEngine{
short AccelerationCount; //Top Speed.
short Acceleration[10]; //Acceleration.
} OKEngine;
#define ENGINE_ACCEL 0
#define ENGINE_BALANCE 1
#define ENGINE_SPEED 2
#define BEHAVIOR_DEAD -1
#define BEHAVIOR_STATIC 0
#define BEHAVIOR_FLOAT 1
#define BEHAVIOR_PATH 2
#define BEHAVIOR_WANDER 3
#define BEHAVIOR_SEARCH 4
#define BEHAVIOR_BOUNCE 5
#define BEHAVIOR_FLEE 6
#define BEHAVIOR_STRAFE 7
#define SUBBEHAVIOR_DEAD -1
#define SUBBEHAVIOR_DOCILE 0
#define SUBBEHAVIOR_ALERT 1
#define SUBBEHAVIOR_CHASE 2
#define SUBBEHAVIOR_SURPRISE 3
// OKObject Result State
#define StateAnimMusicNote 0
#define StateAnimCrash 1
#define StateAnimPoomp 2
#define StateAnimBoing 3
#define StateAnimExplosion 4
#define StateAnimBonkStars 5
#define StateAnimLandingDust 6
#define StateMapObjectHit 7
#define StateLightningHit 8
#define StateBooTranslucent 9
#define StateBecomeBombOn 10
#define StateBecomeBombOff 11
#define StateFlattenedOn 12
#define StateFlattenedOff 13
#define StateMushroomBoost 14
#define StateSpinOutSaveable 15
#define StateSpinOut 16
#define StateGreenShellHit 17
#define StateRedShellHit 18
#define StateBonk 19
#define StateStarOn 20
#define StateGhostOn 21
#define StateStarOff 22
#define StateGhostOff 23
#endif