Path: blob/master/SonicMania/Objects/Menu/LevelSelect.h
338 views
#ifndef OBJ_LEVELSELECT_H1#define OBJ_LEVELSELECT_H23#include "Game.h"45typedef enum {6LSELECT_PLAYER_NONE,7LSELECT_PLAYER_SONIC,8LSELECT_PLAYER_TAILS,9LSELECT_PLAYER_KNUCKLES,10#if MANIA_USE_PLUS11LSELECT_PLAYER_MIGHTY,12LSELECT_PLAYER_RAY,13#endif14} LevelSelectPlayerIDs;1516// Object Class17struct ObjectLevelSelect {18RSDK_OBJECT19#if MANIA_USE_PLUS20STATIC(int32 bgAniDuration, 240);21TABLE(int32 bgAniDurationTable[4], { 240, 3, 3, 3 });22TABLE(int32 cheat_RickyMode[9], { 1, 9, 7, 9, 0, 8, 1, 1, 255 });23TABLE(int32 cheat_AllEmeralds[5], { 4, 1, 2, 6, 255 });24TABLE(int32 cheat_MaxContinues[9], { 1, 9, 9, 2, 1, 1, 2, 4, 255 });25TABLE(int32 cheat_SwapGameMode[9], { 2, 0, 1, 8, 0, 6, 2, 3, 255 });26TABLE(int32 cheat_UnlockAllMedals[9], { 1, 9, 8, 9, 0, 5, 0, 1, 255 });27TABLE(int32 cheat_SuperDash[9], { 2, 0, 1, 7, 0, 8, 1, 5, 255 });28TABLE(int32 cheat_MaxControl[5], { 9, 0, 0, 1, 255 }); // says there's 9 values here in static obj & IDA but only 5 are loaded so it is what it is ig29TABLE(int32 cheat_ToggleSuperMusic[9], { 6, 2, 1, 4, 255, 0, 0, 0, 0 });30int32 bgAniFrame;31int32 startMusicID;32int32 soundTestMax;33uint16 sfxFail;34uint16 sfxRing;35uint16 sfxEmerald;36uint16 sfxContinue;37uint16 sfxMedalGot;38int32 *cheatCodePtrs[8];39int32 cheatCodePos[8];40void (*checkCheatActivated[8])(void);41#else42STATIC(int32 bgAniDuration, 240);43int32 bgAniFrame;44TABLE(int32 bgAniDurationTable[4], { 240, 3, 3, 3 });45int32 startMusicID;46int32 soundTestMax;47uint16 sfxFail;48#endif49};5051// Entity Class52struct EntityLevelSelect {53RSDK_ENTITY54StateMachine(state);55StateMachine(stateDraw);56int32 timer;57int32 labelID;58int32 soundTestID;59int32 leaderCharacterID;60int32 sidekickCharacterID;61EntityUIText *zoneNameLabels[32];62EntityUIText *stageIDLabels[32];63EntityUIText *soundTestLabel;64EntityUIPicture *zoneIcon;65EntityUIPicture *player1Icon;66EntityUIPicture *player2Icon;67#if MANIA_USE_PLUS68EntityUIText *pinballLabel;69#endif70int32 labelCount;71#if MANIA_USE_PLUS72int32 offsetUFO;73int32 offsetBSS;74int32 unused1;75int32 unused2;76int32 unused3;77int32 unused4;78#endif79};8081// Object Struct82extern ObjectLevelSelect *LevelSelect;8384// Standard Entity Events85void LevelSelect_Update(void);86void LevelSelect_LateUpdate(void);87void LevelSelect_StaticUpdate(void);88void LevelSelect_Draw(void);89void LevelSelect_Create(void *data);90void LevelSelect_StageLoad(void);91#if GAME_INCLUDE_EDITOR92void LevelSelect_EditorDraw(void);93void LevelSelect_EditorLoad(void);94#endif95void LevelSelect_Serialize(void);9697// Extra Entity Functions98#if MANIA_USE_PLUS99void LevelSelect_Cheat_AllEmeralds(void);100void LevelSelect_Cheat_ToggleSuperMusic(void);101void LevelSelect_Cheat_MaxContinues(void);102void LevelSelect_Cheat_MaxControl(void);103void LevelSelect_Cheat_RickyMode(void);104void LevelSelect_Cheat_SuperDash(void);105void LevelSelect_Cheat_SwapGameMode(void);106void LevelSelect_Cheat_UnlockAllMedals(void);107#endif108109void LevelSelect_Draw_Fade(void);110111void LevelSelect_State_Init(void);112void LevelSelect_State_FadeIn(void);113void LevelSelect_State_Navigate(void);114void LevelSelect_State_FadeOut(void);115116void LevelSelect_ManagePlayerIcon(void);117void LevelSelect_SetLabelHighlighted(bool32 highlight);118void LevelSelect_HandleColumnChange(void);119void LevelSelect_HandleNewStagePos(void);120121#endif //! OBJ_LEVELSELECT_H122123124