Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
rubberduckycooly
GitHub Repository: rubberduckycooly/Sonic-Mania-Decompilation
Path: blob/master/SonicMania/Objects/AIZ/MonkeyDude.h
338 views
1
#ifndef OBJ_MONKEYDUDE_H
2
#define OBJ_MONKEYDUDE_H
3
4
#include "Game.h"
5
6
#define MonkeyDude_ArmJointCount (4)
7
8
// Object Class
9
struct ObjectMonkeyDude {
10
RSDK_OBJECT
11
Hitbox hitboxBadnik;
12
Hitbox hitboxCoconut;
13
Animator armAnimator;
14
Animator tailAnimator;
15
Animator coconutAnimator;
16
uint16 aniFrames;
17
#if MANIA_USE_PLUS
18
uint16 sfxDrop;
19
#endif
20
};
21
22
// Entity Class
23
struct EntityMonkeyDude {
24
RSDK_ENTITY
25
StateMachine(state);
26
int32 timer;
27
int32 activeArmNodes;
28
int32 currentAngle;
29
StateMachine(armStates[MonkeyDude_ArmJointCount]);
30
int32 armAngles[MonkeyDude_ArmJointCount];
31
int32 armMoveDir[MonkeyDude_ArmJointCount];
32
int32 armTimers[MonkeyDude_ArmJointCount];
33
uint8 armNodeID;
34
Vector2 startPos;
35
uint8 startDir;
36
int32 armY;
37
int32 moveCount;
38
int32 nummoves;
39
int32 throwCount;
40
int32 angleVel;
41
Animator bodyAnimator;
42
Animator handAnimator;
43
int32 coconutFrame;
44
};
45
46
// Object Struct
47
extern ObjectMonkeyDude *MonkeyDude;
48
49
// Standard Entity Events
50
void MonkeyDude_Update(void);
51
void MonkeyDude_LateUpdate(void);
52
void MonkeyDude_StaticUpdate(void);
53
void MonkeyDude_Draw(void);
54
void MonkeyDude_Create(void *data);
55
void MonkeyDude_StageLoad(void);
56
#if GAME_INCLUDE_EDITOR
57
void MonkeyDude_EditorDraw(void);
58
void MonkeyDude_EditorLoad(void);
59
#endif
60
void MonkeyDude_Serialize(void);
61
62
// Extra Entity Functions
63
void MonkeyDude_DebugDraw(void);
64
void MonkeyDude_DebugSpawn(void);
65
66
void MonkeyDude_State_Init(void);
67
void MonkeyDude_HandleBodyPart(void);
68
#if MANIA_USE_PLUS
69
void MonkeyDude_HandleStates(void);
70
#endif
71
void MonkeyDude_State_Laugh(void);
72
void MonkeyDude_State_MoveArm(void);
73
void MonkeyDude_State_MoveBody(void);
74
void MonkeyDude_StateBody_ArmRaise(void);
75
void MonkeyDude_StateBody_Throw(void);
76
#if MANIA_USE_PLUS
77
void MonkeyDude_State_Coconut(void);
78
#endif
79
80
#endif //! OBJ_MONKEYDUDE_H
81
82