Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
rubberduckycooly
GitHub Repository: rubberduckycooly/Sonic-Mania-Decompilation
Path: blob/master/SonicMania/Objects/PGZ/Newspaper.h
338 views
1
#ifndef OBJ_NEWSPAPER_H
2
#define OBJ_NEWSPAPER_H
3
4
#include "Game.h"
5
6
#if MANIA_USE_PLUS
7
typedef enum {
8
NEWSPAPER_WHITE_FG,
9
NEWSPAPER_BLUE_FG,
10
NEWSPAPER_WHITE_BG,
11
NEWSPAPER_BLUE_BG,
12
} NewspaperTypes;
13
#endif
14
15
// Object Class
16
struct ObjectNewspaper {
17
RSDK_OBJECT
18
uint16 aniFrames;
19
#if MANIA_USE_PLUS
20
uint16 sfxPaperStack;
21
#endif
22
};
23
24
// Entity Class
25
struct EntityNewspaper {
26
RSDK_ENTITY
27
#if MANIA_USE_PLUS
28
StateMachine(state);
29
Hitbox hitbox;
30
uint8 type;
31
int32 timer;
32
Animator animator;
33
#else
34
StateMachine(state);
35
StateMachine(stateCollide);
36
int32 type;
37
Vector2 amplitude;
38
int32 node;
39
bool32 hasTension;
40
int8 frameID;
41
uint8 collision;
42
Vector2 tileOrigin;
43
Vector2 centerPos;
44
Vector2 drawPos;
45
Vector2 collisionOffset;
46
int32 stood;
47
int32 timer;
48
int32 stoodAngle;
49
uint8 stoodPlayers;
50
uint8 pushPlayersL;
51
uint8 pushPlayersR;
52
Hitbox hitbox;
53
Animator animator;
54
int32 childCount;
55
#endif
56
};
57
58
// Object Struct
59
extern ObjectNewspaper *Newspaper;
60
61
// Standard Entity Events
62
void Newspaper_Update(void);
63
void Newspaper_LateUpdate(void);
64
void Newspaper_StaticUpdate(void);
65
void Newspaper_Draw(void);
66
void Newspaper_Create(void *data);
67
void Newspaper_StageLoad(void);
68
#if GAME_INCLUDE_EDITOR
69
void Newspaper_EditorDraw(void);
70
void Newspaper_EditorLoad(void);
71
#endif
72
void Newspaper_Serialize(void);
73
74
// Extra Entity Functions
75
#if MANIA_USE_PLUS
76
void Newspaper_HandleInteractions(void);
77
#endif
78
79
#endif //! OBJ_NEWSPAPER_H
80
81