Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
rubberduckycooly
GitHub Repository: rubberduckycooly/Sonic-Mania-Decompilation
Path: blob/master/SonicMania/Objects/Puyo/PuyoAI.h
338 views
1
#ifndef OBJ_PUYOAI_H
2
#define OBJ_PUYOAI_H
3
4
#include "Game.h"
5
6
// Object Class
7
struct ObjectPuyoAI {
8
RSDK_OBJECT
9
TABLE(int32 controlIntervals[5], { 16, 12, 8, 4, 0 });
10
TABLE(int32 controlChances[5], { 40, 30, 20, 10, 0 });
11
uint8 isAI[2];
12
int32 lastBeanY[2];
13
int32 desiredColumn[2];
14
int32 desiredRotation[2];
15
int32 controlInterval[2];
16
int32 controlChance[2];
17
};
18
19
// Entity Class
20
struct EntityPuyoAI {
21
RSDK_ENTITY
22
};
23
24
// Object Struct
25
extern ObjectPuyoAI *PuyoAI;
26
27
// Standard Entity Events
28
void PuyoAI_Update(void);
29
void PuyoAI_LateUpdate(void);
30
void PuyoAI_StaticUpdate(void);
31
void PuyoAI_Draw(void);
32
void PuyoAI_Create(void *data);
33
void PuyoAI_StageLoad(void);
34
#if GAME_INCLUDE_EDITOR
35
void PuyoAI_EditorDraw(void);
36
void PuyoAI_EditorLoad(void);
37
#endif
38
void PuyoAI_Serialize(void);
39
40
// Extra Entity Functions
41
Vector2 PuyoAI_GetBeanPos(int32 playerID);
42
void PuyoAI_PrepareAction(int32 playerID);
43
int32 PuyoAI_GetChainComboSize(int32 playerID, EntityPuyoBean *bean, EntityPuyoBean *partner, int32 beanX, int32 beanY, int32 partnerX,
44
int32 partnerY);
45
void PuyoAI_SetupInputs(EntityPuyoBean *bean, bool32 rotationDisabled);
46
void PuyoAI_Input_AI(void);
47
48
#endif //! OBJ_PUYOAI_H
49
50