Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
rubberduckycooly
GitHub Repository: rubberduckycooly/Sonic-Mania-Decompilation
Path: blob/master/SonicMania/Objects/Global/DebugMode.h
338 views
1
#ifndef OBJ_DEBUGMODE_H
2
#define OBJ_DEBUGMODE_H
3
4
#include "Game.h"
5
6
#define DEBUGMODE_ADD_OBJ(object) DebugMode_AddObject(object->classID, object##_DebugDraw, object##_DebugSpawn)
7
#define DEBUGMODE_OBJECT_COUNT (0x100)
8
9
// Object Class
10
struct ObjectDebugMode {
11
RSDK_OBJECT
12
// Never used, only set, prolly leftover from S1/S2
13
int16 classIDs[DEBUGMODE_OBJECT_COUNT];
14
StateMachine(draw[DEBUGMODE_OBJECT_COUNT]);
15
StateMachine(spawn[DEBUGMODE_OBJECT_COUNT]);
16
Animator animator;
17
int32 itemID;
18
int32 itemCount;
19
bool32 debugActive;
20
uint8 itemType;
21
uint8 itemTypeCount;
22
int32 unused1; // no clue, though it could be "exitTimer" assuming this was based on v4's debugMode object?
23
};
24
25
// Entity Class
26
struct EntityDebugMode {
27
RSDK_ENTITY
28
};
29
30
// Object Struct
31
extern ObjectDebugMode *DebugMode;
32
33
// Standard Entity Events
34
void DebugMode_Update(void);
35
void DebugMode_LateUpdate(void);
36
void DebugMode_StaticUpdate(void);
37
void DebugMode_Draw(void);
38
void DebugMode_Create(void *data);
39
void DebugMode_StageLoad(void);
40
#if GAME_INCLUDE_EDITOR
41
void DebugMode_EditorDraw(void);
42
void DebugMode_EditorLoad(void);
43
#endif
44
void DebugMode_Serialize(void);
45
46
// Extra Entity Functions
47
void DebugMode_NullState(void);
48
void DebugMode_AddObject(uint16 id, void (*draw)(void), void (*spawn)(void));
49
50
#endif //! OBJ_DEBUGMODE_H
51
52