Path: blob/master/SonicMania/Objects/SPZ/LEDPanel.h
338 views
#ifndef OBJ_LEDPANEL_H1#define OBJ_LEDPANEL_H23#include "Game.h"45#define LEDPANEL_TEXT_COUNT (8)6#define LEDPANEL_ROW_COUNT (2)78// Object Class9struct ObjectLEDPanel {10RSDK_OBJECT11uint16 aniFrames;12String text;13color panelColor;14};1516// Entity Class17struct EntityLEDPanel {18RSDK_ENTITY19String text[LEDPANEL_TEXT_COUNT];20String seq[LEDPANEL_ROW_COUNT];21String *seqPtrs[LEDPANEL_ROW_COUNT];22int32 rowSeqPos[LEDPANEL_ROW_COUNT];23StateMachine(stateRow[LEDPANEL_ROW_COUNT]);24String *textPtrs[LEDPANEL_TEXT_COUNT];25String activeText[LEDPANEL_ROW_COUNT];26Vector2 textMovePos[LEDPANEL_ROW_COUNT];27Vector2 textPos[LEDPANEL_ROW_COUNT];28Vector2 textTargetPos[LEDPANEL_ROW_COUNT];29Vector2 textMoveVel[LEDPANEL_ROW_COUNT];30int32 activeTextSize[LEDPANEL_ROW_COUNT];31int32 activeTextLen[LEDPANEL_ROW_COUNT];32bool32 rowSignaled[LEDPANEL_ROW_COUNT];33Vector2 size;34int32 left;35int32 right;36int32 top;37int32 bottom;38int32 curXBoundaryL;39int32 curYBoundaryT;40int32 curXBoundaryR;41int32 curYBoundaryB;42int32 newXBoundaryL;43int32 newYBoundaryT;44int32 newXBoundaryR;45int32 newYBoundaryB;46Vector2 boundsMoveSpeed;47int32 rowDelay[LEDPANEL_ROW_COUNT];48uint8 row;49Animator animatorText;50};5152// Object Struct53extern ObjectLEDPanel *LEDPanel;5455// Standard Entity Events56void LEDPanel_Update(void);57void LEDPanel_LateUpdate(void);58void LEDPanel_StaticUpdate(void);59void LEDPanel_Draw(void);60void LEDPanel_Create(void *data);61void LEDPanel_StageLoad(void);62#if GAME_INCLUDE_EDITOR63void LEDPanel_EditorDraw(void);64void LEDPanel_EditorLoad(void);65#endif66void LEDPanel_Serialize(void);6768// Extra Entity Functions69void LEDPanel_SetupActiveText(int32 index, String *src);70void LEDPanel_SetupTextPos(int32 index, int32 x, int32 y);71void LEDPanel_HandleCharacters(void);7273void LEDPanel_StateText_Move(void);74void LEDPanel_StateText_Delay(void);75void LEDPanel_StateText_ChangeClipBounds(void);76void LEDPanel_StateText_WaitForSignal(void);7778#endif //! OBJ_LEDPANEL_H798081