Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
rubberduckycooly
GitHub Repository: rubberduckycooly/Sonic-Mania-Decompilation
Path: blob/master/SonicMania/Objects/SPZ/LEDPanel.h
338 views
1
#ifndef OBJ_LEDPANEL_H
2
#define OBJ_LEDPANEL_H
3
4
#include "Game.h"
5
6
#define LEDPANEL_TEXT_COUNT (8)
7
#define LEDPANEL_ROW_COUNT (2)
8
9
// Object Class
10
struct ObjectLEDPanel {
11
RSDK_OBJECT
12
uint16 aniFrames;
13
String text;
14
color panelColor;
15
};
16
17
// Entity Class
18
struct EntityLEDPanel {
19
RSDK_ENTITY
20
String text[LEDPANEL_TEXT_COUNT];
21
String seq[LEDPANEL_ROW_COUNT];
22
String *seqPtrs[LEDPANEL_ROW_COUNT];
23
int32 rowSeqPos[LEDPANEL_ROW_COUNT];
24
StateMachine(stateRow[LEDPANEL_ROW_COUNT]);
25
String *textPtrs[LEDPANEL_TEXT_COUNT];
26
String activeText[LEDPANEL_ROW_COUNT];
27
Vector2 textMovePos[LEDPANEL_ROW_COUNT];
28
Vector2 textPos[LEDPANEL_ROW_COUNT];
29
Vector2 textTargetPos[LEDPANEL_ROW_COUNT];
30
Vector2 textMoveVel[LEDPANEL_ROW_COUNT];
31
int32 activeTextSize[LEDPANEL_ROW_COUNT];
32
int32 activeTextLen[LEDPANEL_ROW_COUNT];
33
bool32 rowSignaled[LEDPANEL_ROW_COUNT];
34
Vector2 size;
35
int32 left;
36
int32 right;
37
int32 top;
38
int32 bottom;
39
int32 curXBoundaryL;
40
int32 curYBoundaryT;
41
int32 curXBoundaryR;
42
int32 curYBoundaryB;
43
int32 newXBoundaryL;
44
int32 newYBoundaryT;
45
int32 newXBoundaryR;
46
int32 newYBoundaryB;
47
Vector2 boundsMoveSpeed;
48
int32 rowDelay[LEDPANEL_ROW_COUNT];
49
uint8 row;
50
Animator animatorText;
51
};
52
53
// Object Struct
54
extern ObjectLEDPanel *LEDPanel;
55
56
// Standard Entity Events
57
void LEDPanel_Update(void);
58
void LEDPanel_LateUpdate(void);
59
void LEDPanel_StaticUpdate(void);
60
void LEDPanel_Draw(void);
61
void LEDPanel_Create(void *data);
62
void LEDPanel_StageLoad(void);
63
#if GAME_INCLUDE_EDITOR
64
void LEDPanel_EditorDraw(void);
65
void LEDPanel_EditorLoad(void);
66
#endif
67
void LEDPanel_Serialize(void);
68
69
// Extra Entity Functions
70
void LEDPanel_SetupActiveText(int32 index, String *src);
71
void LEDPanel_SetupTextPos(int32 index, int32 x, int32 y);
72
void LEDPanel_HandleCharacters(void);
73
74
void LEDPanel_StateText_Move(void);
75
void LEDPanel_StateText_Delay(void);
76
void LEDPanel_StateText_ChangeClipBounds(void);
77
void LEDPanel_StateText_WaitForSignal(void);
78
79
#endif //! OBJ_LEDPANEL_H
80
81