Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
rubberduckycooly
GitHub Repository: rubberduckycooly/Sonic-Mania-Decompilation
Path: blob/master/SonicMania/Objects/PGZ/PaperRoller.h
338 views
1
#ifndef OBJ_PAPERROLLER_H
2
#define OBJ_PAPERROLLER_H
3
4
#include "Game.h"
5
6
// Object Class
7
struct ObjectPaperRoller {
8
RSDK_OBJECT
9
uint16 aniFrames;
10
uint16 sfxPaper;
11
uint32 colors[64];
12
};
13
14
// Entity Class
15
struct EntityPaperRoller {
16
RSDK_ENTITY
17
int32 length;
18
Vector2 startPos;
19
int32 unused;
20
int32 divotAngle;
21
int32 playerTimer[PLAYER_COUNT];
22
int32 lastJumpTimer[PLAYER_COUNT]; // not used, is set and updated, idk what it was for
23
Vector2 deformPosTop;
24
Vector2 deformPosBottom;
25
Hitbox hitbox;
26
Animator rollerAnimator;
27
Animator divotAnimator;
28
};
29
30
// Object Struct
31
extern ObjectPaperRoller *PaperRoller;
32
33
// Standard Entity Events
34
void PaperRoller_Update(void);
35
void PaperRoller_LateUpdate(void);
36
void PaperRoller_StaticUpdate(void);
37
void PaperRoller_Draw(void);
38
void PaperRoller_Create(void *data);
39
void PaperRoller_StageLoad(void);
40
#if GAME_INCLUDE_EDITOR
41
void PaperRoller_EditorDraw(void);
42
void PaperRoller_EditorLoad(void);
43
#endif
44
void PaperRoller_Serialize(void);
45
46
// Extra Entity Functions
47
void PaperRoller_DrawDeformedLine(int32 startX, int32 startY, int32 endX, int32 endY, int32 offsetX, int32 offsetY, int32 deformX, int32 deformY,
48
int32 len, uint32 *color);
49
void PaperRoller_DrawPaperLines(void);
50
void PaperRoller_DrawRollers(void);
51
void PaperRoller_HandleRollerCollisions(void);
52
void PaperRoller_HandlePrintCollisions(void);
53
54
#endif //! OBJ_PAPERROLLER_H
55
56