Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
rubberduckycooly
GitHub Repository: rubberduckycooly/Sonic-Mania-Decompilation
Path: blob/master/SonicMania/Objects/AIZ/AIZRockPile.h
338 views
1
#ifndef OBJ_AIZROCKPILE_H
2
#define OBJ_AIZROCKPILE_H
3
4
#include "Game.h"
5
6
#if MANIA_USE_PLUS
7
8
typedef enum {
9
AIZROCKPILE_SMALL,
10
AIZROCKPILE_MED,
11
AIZROCKPILE_BIG,
12
} AIZRockPileTypes;
13
14
// Object Class
15
struct ObjectAIZRockPile {
16
RSDK_OBJECT
17
TABLE(int32 rockPositions_small[8], { -0x40000, -0x40000, 0xC0000, -0x40000, -0xC0000, 0x40000, 0xC0000, 0x40000 });
18
TABLE(int32 rockSpeedsT_small[8], { -0x10000, -0x20000, 0x10000, -0x1E000, -0x1B000, -0x1C000, 0x1C000, -0x1C000 });
19
TABLE(int32 rockSpeedsL_small[8], { -0x30000, -0x30000, -0x2C000, -0x28000, -0x2C000, -0x28000, -0x28000, -0x20000 });
20
TABLE(int32 rockSpeedsR_small[8], { 0x2C000, -0x28000, 0x30000, -0x30000, 0x28000, -0x20000, 0x2C000, -0x28000 });
21
TABLE(int32 rockPositions_med[10], { -0x40000, -0xC0000, 0xB0000, -0xC0000, -0x40000, -0x40000, -0xC0000, 0xC0000, 0xC0000, 0xC0000 });
22
TABLE(int32 rockSpeedsT_med[10], { -0x30000, -0x30000, 0x2C000, -0x28000, -0x2C000, -0x28000, -0x28000, -0x20000, 0x28000, -0x18000 });
23
TABLE(int32 rockSpeedsL_med[12],
24
{ -0x30000, -0x30000, -0x2C000, -0x28000, -0x2C000, -0x28000, -0x28000, -0x20000, -0x28000, -0x18000, -0x24000, -0x18000 });
25
TABLE(int32 rockSpeedsR_med[12],
26
{ 0x2C000, -0x28000, 0x30000, -0x30000, 0x28000, -0x20000, 0x2C000, -0x28000, 0x24000, -0x18000, 0x28000, -0x18000 });
27
TABLE(int32 rockPositions_large[16], { -0x80000, -0x180000, 0xB0000, -0x1C0000, -0x40000, -0xC0000, 0xC0000, -0x40000, -0xC0000, 0x40000, 0x40000,
28
0xC0000, -0xC0000, 0x1C0000, 0xC0000, 0x1C0000 });
29
TABLE(int32 rockSpeedsT_large[16], { -0x30000, -0x30000, 0x2C000, -0x28000, -0x2C000, -0x28000, 0x28000, -0x20000, -0x28000, -0x18000, 0x24000,
30
-0x18000, -0x24000, -0x10000, 0x20000, -0x10000 });
31
TABLE(int32 rockSpeedsL_large[16], { -0x30000, -0x30000, -0x2C000, -0x28000, -0x2C000, -0x28000, -0x28000, -0x20000, -0x28000, -0x18000, -0x24000,
32
-0x18000, -0x24000, -0x10000, -0x20000, -0x10000 });
33
TABLE(int32 rockSpeedsR_large[16], { 0x2C000, -0x28000, 0x30000, -0x30000, 0x28000, -0x20000, 0x2C000, -0x28000, 0x24000, -0x18000, 0x28000,
34
-0x18000, 0x20000, -0x10000, 0x24000, -0x10000 });
35
uint16 aniFrames;
36
uint16 sfxBreak;
37
};
38
39
// Entity Class
40
struct EntityAIZRockPile {
41
RSDK_ENTITY
42
int32 size;
43
bool32 smashTop;
44
bool32 smashSides;
45
bool32 onlyKnux;
46
bool32 onlyMighty;
47
int32 *rockPositions;
48
int32 *rockSpeedsT;
49
int32 *rockSpeedsL;
50
int32 *rockSpeedsR;
51
Animator animator;
52
};
53
54
// Object Struct
55
extern ObjectAIZRockPile *AIZRockPile;
56
57
// Standard Entity Events
58
void AIZRockPile_Update(void);
59
void AIZRockPile_LateUpdate(void);
60
void AIZRockPile_StaticUpdate(void);
61
void AIZRockPile_Draw(void);
62
void AIZRockPile_Create(void *data);
63
void AIZRockPile_StageLoad(void);
64
#if GAME_INCLUDE_EDITOR
65
void AIZRockPile_EditorDraw(void);
66
void AIZRockPile_EditorLoad(void);
67
#endif
68
void AIZRockPile_Serialize(void);
69
70
// Extra Entity Functions
71
void AIZRockPile_SpawnRocks(int32 *speeds);
72
73
#endif
74
75
#endif //! OBJ_AIZROCKPILE_H
76
77