Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
rubberduckycooly
GitHub Repository: rubberduckycooly/Sonic-Mania-Decompilation
Path: blob/master/SonicMania/Objects/OOZ/OOZSetup.h
338 views
1
#ifndef OBJ_OOZSETUP_H
2
#define OBJ_OOZSETUP_H
3
4
#include "Game.h"
5
6
typedef enum { OOZ_WARPDOOR_EFFECT_TO_SUB = 1, OOZ_WARPDOOR_EFFECT_FROM_SUB = 2 } OOZWarpDoorEffects;
7
typedef enum { OOZSETUP_FLAMES, OOZSETUP_FADE } OOZSetupTypes;
8
9
typedef enum { OOZ_TFLAGS_NORMAL, OOZ_TFLAGS_OILPOOL, OOZ_TFLAGS_OILSTRIP, OOZ_TFLAGS_OILSLIDE, OOZ_TFLAGS_OILFALL } TileFlagsOOZ;
10
11
typedef enum { OOZ_GENERICTRIGGER_ACHIEVEMENT } GenericTriggerTypesOOZ;
12
13
// Object Class
14
struct ObjectOOZSetup {
15
RSDK_OBJECT
16
int32 palTimer;
17
uint16 aniTiles;
18
TileLayer *background1;
19
TABLE(int32 deformData[64], { 1, 2, 1, 3, 1, 2, 2, 1, 2, 3, 1, 2, 1, 2, 0, 0, 2, 0, 3, 2, 2, 3, 2, 2, 1, 3, 0, 0, 1, 0, 1, 3,
20
1, 2, 1, 3, 1, 2, 2, 1, 2, 3, 1, 2, 1, 2, 0, 0, 2, 0, 3, 2, 2, 3, 2, 2, 1, 3, 0, 0, 1, 0, 1, 3 });
21
int32 oilAniTimer;
22
int32 glowLightAniFrame;
23
STATIC(int32 glowLightAniTimer, 60);
24
TABLE(int32 glowLightAniDurations[9], { 60, 60, 3, 3, 3, 3, 3, 3, 4 });
25
int32 swimmingPlayerCount;
26
int32 smogTimer;
27
int32 useSmogEffect;
28
uint8 flameTimers[0x20000];
29
uint8 *flameTimerPtrs[400];
30
Vector2 flamePositions[400];
31
uint16 flameCount;
32
uint8 activePlayers;
33
#if MANIA_USE_PLUS
34
Animator flameAnimator;
35
Animator animator;
36
uint16 solFrames;
37
uint16 splashFrames;
38
#else
39
Animator flameAnimator;
40
uint16 solFrames;
41
#endif
42
bool32 hasAchievement;
43
Entity *cutscenePtr;
44
};
45
46
// Entity Class
47
struct EntityOOZSetup {
48
RSDK_ENTITY
49
uint8 type;
50
};
51
52
// Object Struct
53
extern ObjectOOZSetup *OOZSetup;
54
55
// Standard Entity Events
56
void OOZSetup_Update(void);
57
void OOZSetup_LateUpdate(void);
58
void OOZSetup_StaticUpdate(void);
59
void OOZSetup_Draw(void);
60
void OOZSetup_Create(void *data);
61
void OOZSetup_StageLoad(void);
62
#if GAME_INCLUDE_EDITOR
63
void OOZSetup_EditorDraw(void);
64
void OOZSetup_EditorLoad(void);
65
#endif
66
void OOZSetup_Serialize(void);
67
68
// Extra Entity Functions
69
bool32 OOZSetup_SfxCheck_Flame2(void);
70
bool32 OOZSetup_SfxCheck_Slide(void);
71
bool32 OOZSetup_SfxCheck_OilSwim(void);
72
73
void OOZSetup_Draw_Flames(void);
74
void OOZSetup_HandleActiveFlames(void);
75
bool32 OOZSetup_StartFire(int32 posX, int32 posY, int32 angle);
76
77
void OOZSetup_Trigger_AwardAchievement(void);
78
79
void OOZSetup_PlayerState_OilPool(void);
80
void OOZSetup_PlayerState_OilStrip(void);
81
void OOZSetup_PlayerState_OilSlide(void);
82
void OOZSetup_PlayerState_OilFall(void);
83
84
#endif //! OBJ_OOZSETUP_H
85
86