Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
rubberduckycooly
GitHub Repository: rubberduckycooly/Sonic-Mania-Decompilation
Path: blob/master/SonicMania/Objects/FBZ/FBZStorm.h
338 views
1
#ifndef OBJ_FBZSTORM_H
2
#define OBJ_FBZSTORM_H
3
4
#include "Game.h"
5
6
// Object Class
7
struct ObjectFBZStorm {
8
RSDK_OBJECT
9
TABLE(int32 thunderFade[20],
10
{ 0x40, 0x80, 0xC0, 0x100, 0x100, 0x80, 0x00, 0x20, 0x40, 0x80, 0xC0, 0x100, 0x100, 0xC0, 0x80, 0x60, 0x40, 0x20, 0x10, 0x00 });
11
Vector2 raindropPositions[0x100];
12
uint16 aniFrames;
13
uint16 sfxRain;
14
bool32 playingRainSfx; // should be uint8 according to the static vars file, bool32 actually *breaks* outsideBank, but that's how mania is so..
15
uint16 sfxThunder;
16
STATIC(uint8 outsideBank, 1);
17
};
18
19
// Entity Class
20
struct EntityFBZStorm {
21
RSDK_ENTITY
22
StateMachine(state);
23
int32 thunderTimer;
24
int32 blendAmount;
25
int32 stormAngle[SCREEN_COUNT];
26
int32 screenPosX[SCREEN_COUNT];
27
bool32 enabled;
28
Animator animator;
29
};
30
31
// Object Struct
32
extern ObjectFBZStorm *FBZStorm;
33
34
// Standard Entity Events
35
void FBZStorm_Update(void);
36
void FBZStorm_LateUpdate(void);
37
void FBZStorm_StaticUpdate(void);
38
void FBZStorm_Draw(void);
39
void FBZStorm_Create(void *data);
40
void FBZStorm_StageLoad(void);
41
#if GAME_INCLUDE_EDITOR
42
void FBZStorm_EditorDraw(void);
43
void FBZStorm_EditorLoad(void);
44
#endif
45
void FBZStorm_Serialize(void);
46
47
// Extra Entity Functions
48
void FBZStorm_State_WaitForActive(void);
49
void FBZStorm_State_StormStart(void);
50
void FBZStorm_State_StormFinish(void);
51
void FBZStorm_State_Storming(void);
52
void FBZStorm_State_Thunder(void);
53
54
#endif //! OBJ_FBZSTORM_H
55
56