Path: blob/master/SonicMania/Objects/Puyo/PuyoMatch.h
338 views
#ifndef OBJ_PUYOMATCH_H1#define OBJ_PUYOMATCH_H23#include "Game.h"45// Object Class6struct ObjectPuyoMatch {7RSDK_OBJECT8int32 comboPower;9TABLE(int32 comboBonus[24], { 4, 20, 24, 32, 48, 96, 160, 240, 320, 480, 600, 700, 800, 900, 999, 999, 999, 999, 999, 999, 999, 999, 999, 999 });10TABLE(int32 unusedTable[24], { 0, 8, 16, 32, 64, 96, 128, 160, 192, 224, 256, 288, 320, 352, 384, 416, 448, 480, 512, 544, 576, 608, 640, 672 });11TABLE(int32 beanBonusTable[8], { 0, 2, 3, 4, 5, 6, 7, 10 });12TABLE(int32 concurrentBonusTable[6], { 0, 0, 3, 6, 12, 24 });13TABLE(int32 beanDropColumnIDs[24], { 0, 2, 5, 1, 3, 4, 5, 3, 4, 0, 1, 2, 3, 1, 0, 4, 2, 5, 0, 2, 1, 3, 5, 4 });14uint16 aniFrames;15};1617// Entity Class18struct EntityPuyoMatch {19RSDK_ENTITY20StateMachine(state);21StateMachine(stateInput);22StateMachine(matchWinCB);23StateMachine(matchLoseCB);24int32 playerID;25int32 score;26int32 comboScore;27int32 selectedLevel;28int32 comboCount;29int32 comboBeanCount;30int32 *comboBonusTable;31int32 concurrentBonus;32int32 beanBonus;33int32 timer;34int32 junkDropCount;35int32 junkBeanCount;36Vector2 beanDropPos;37EntityPuyoBean *beanPtr;38int32 matchKey;39Animator beanLAnimator;40Animator beanRAnimator;41Animator lightAnimator;42Animator junkPreviewAnimator;43Animator unusedAnimator;44};4546// Object Struct47extern ObjectPuyoMatch *PuyoMatch;4849// Standard Entity Events50void PuyoMatch_Update(void);51void PuyoMatch_LateUpdate(void);52void PuyoMatch_StaticUpdate(void);53void PuyoMatch_Draw(void);54void PuyoMatch_Create(void *data);55void PuyoMatch_StageLoad(void);56#if GAME_INCLUDE_EDITOR57void PuyoMatch_EditorDraw(void);58void PuyoMatch_EditorLoad(void);59#endif60void PuyoMatch_Serialize(void);6162// Extra Entity Functions63void PuyoMatch_AddPuyoCombo(int32 playerID, int32 score);64void PuyoMatch_SetupNextBeans(EntityPuyoMatch *match);65void PuyoMatch_DropNextBeans(void);66void PuyoMatch_DropJunkBeans(void);67void PuyoMatch_DrawJunkBeanPreviews(void);6869void PuyoMatch_State_HandleMatch(void);70void PuyoMatch_State_HandleCombos(void);71void PuyoMatch_State_HandleComboEnd(void);72void PuyoMatch_State_Lose(void);7374#endif //! OBJ_PUYOMATCH_H757677