Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
rubberduckycooly
GitHub Repository: rubberduckycooly/Sonic-Mania-Decompilation
Path: blob/master/SonicMania/Objects/Common/ParallaxSprite.h
338 views
1
#ifndef OBJ_PARALLAXSPRITE_H
2
#define OBJ_PARALLAXSPRITE_H
3
4
#include "Game.h"
5
6
typedef enum {
7
PARALLAXSPRITE_ATTR_STANDARD,
8
PARALLAXSPRITE_ATTR_WINDMILL,
9
PARALLAXSPRITE_ATTR_COLORS,
10
PARALLAXSPRITE_ATTR_EMITTER,
11
PARALLAXSPRITE_ATTR_PARTICLE,
12
PARALLAXSPRITE_ATTR_BLENDHIGH,
13
PARALLAXSPRITE_ATTR_SHIFT,
14
} ParallaxSpriteAttributes;
15
16
typedef enum {
17
PARALLAXSPRITE_NONE,
18
} ParallaxSpriteAniIDs;
19
20
// Object Class
21
struct ObjectParallaxSprite {
22
RSDK_OBJECT
23
uint16 aniFrames;
24
};
25
26
// Entity Class
27
struct EntityParallaxSprite {
28
RSDK_ENTITY
29
StateMachine(state);
30
Animator animator;
31
uint8 aniID;
32
uint8 attribute;
33
Vector2 parallaxFactor;
34
Vector2 scrollSpeed;
35
Vector2 loopPoint;
36
bool32 hiddenAtStart;
37
color color1;
38
color color2;
39
Vector2 acceleration;
40
Vector2 scrollPos;
41
int32 sprX;
42
int32 timerSpeed;
43
int32 xSpeed;
44
};
45
46
// Object Struct
47
extern ObjectParallaxSprite *ParallaxSprite;
48
49
// Standard Entity Events
50
void ParallaxSprite_Update(void);
51
void ParallaxSprite_LateUpdate(void);
52
void ParallaxSprite_StaticUpdate(void);
53
void ParallaxSprite_Draw(void);
54
void ParallaxSprite_Create(void *data);
55
void ParallaxSprite_StageLoad(void);
56
#if GAME_INCLUDE_EDITOR
57
void ParallaxSprite_EditorDraw(void);
58
void ParallaxSprite_EditorLoad(void);
59
#endif
60
void ParallaxSprite_Serialize(void);
61
62
// Extra Entity Functions
63
void ParallaxSprite_State_Normal(void);
64
void ParallaxSprite_State_Emitter(void);
65
void ParallaxSprite_State_Particle(void);
66
void ParallaxSprite_State_FadeIntoHalf(void);
67
void ParallaxSprite_State_FadeOut(void);
68
69
#endif //! OBJ_PARALLAXSPRITE_H
70
71