Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
rubberduckycooly
GitHub Repository: rubberduckycooly/Sonic-Mania-Decompilation
Path: blob/master/SonicMania/Objects/ERZ/PhantomHand.h
338 views
1
#ifndef OBJ_PHANTOMHAND_H
2
#define OBJ_PHANTOMHAND_H
3
4
#include "Game.h"
5
6
// Object Class
7
struct ObjectPhantomHand {
8
RSDK_OBJECT
9
TABLE(int32 debrisInfo[41], { 10, 0, 0, -0x20000, -0x10000, 1, 0, -0x10000, -0x10000, 2, 0, 0x10000, -0x10000, 3, 0, 0x20000,
10
-0x10000, 4, 0, -0x20000, -0x8000, 5, 0, -0x10000, -0x8000, 6, 0, 0x10000, -0x8000, 7, 0, 0x20000,
11
0x8000, 8, 0, 0x20000, -0x8000, 9, 0, 0x20000, -0x4000 });
12
bool32 grabbedPlayers[PLAYER_COUNT];
13
Hitbox hitbox;
14
uint16 aniFrames;
15
};
16
17
// Entity Class
18
struct EntityPhantomHand {
19
RSDK_ENTITY
20
StateMachine(state);
21
int32 grabTimer;
22
int32 timer;
23
int32 timerDecreaseSpeed;
24
int32 scaleAngle;
25
Vector2 targetPos;
26
Entity *parent;
27
bool32 doScanlineCB;
28
Animator handAnimator;
29
Animator crystalAnimator;
30
Animator shineAnimator;
31
};
32
33
// Object Struct
34
extern ObjectPhantomHand *PhantomHand;
35
36
// Standard Entity Events
37
void PhantomHand_Update(void);
38
void PhantomHand_LateUpdate(void);
39
void PhantomHand_StaticUpdate(void);
40
void PhantomHand_Draw(void);
41
void PhantomHand_Create(void *data);
42
void PhantomHand_StageLoad(void);
43
#if GAME_INCLUDE_EDITOR
44
void PhantomHand_EditorDraw(void);
45
void PhantomHand_EditorLoad(void);
46
#endif
47
void PhantomHand_Serialize(void);
48
49
// Extra Entity Functions
50
void PhantomHand_CheckPlayerGrab(int32 playerX, int32 playerY);
51
52
void PhantomHand_State_Summon(void);
53
void PhantomHand_State_Appear(void);
54
void PhantomHand_State_TryGrabPlayer(void); // 1P
55
void PhantomHand_State_TryGrabPlayers(void); // 2P or more
56
void PhantomHand_State_GrabbedPlayer(void);
57
void PhantomHand_State_Clasp(void);
58
void PhantomHand_State_Crystalize(void);
59
void PhantomHand_State_Shine(void);
60
void PhantomHand_State_BreakApart(void);
61
void PhantomHand_State_Disappear(void);
62
63
#endif //! OBJ_PHANTOMHAND_H
64
65