fork/training-mode-ce
git clone https://git.julia.blue/fork/training-mode-ce
4f5d26e
nix
1#ifndef MEX_H_SCENE 2#define MEX_H_SCENE 3 4#include "structs.h" 5#include "datatypes.h" 6#include "match.h" 7 8// Scene Enums 9enum SCENE_HEAP_KIND 10{ 11SCENEHEAPKIND_UNK0 , 12SCENEHEAPKIND_UNK1 , 13SCENEHEAPKIND_UNK2 , 14SCENEHEAPKIND_UNK3 ,// shrinks main heap, enables fighter cache? 15SCENEHEAPKIND_UNK4 , 16}; 17typedef enum MinorKind 18{ 19MNRKIND_TITLE ,// Title Screen 20MNRKIND_MNMA ,// Main Menu 21MNRKIND_MATCH ,// VS Dairantou (In-Game) 22MNRKIND_SUDDEATH ,// Sudden Death Dairantou (In-Game) 23MNRKIND_TRAIN ,// Training Mode Dairantou (In-Game) 24MNRKIND_RST ,// Result Screen 25MNRKIND_X6 ,// 26MNRKIND_DB ,// Debug Menu 27MNRKIND_CSS ,// CSS 28MNRKIND_SSS ,// SSS 29MNRKIND_XA ,// 30MNRKIND_TYGAL ,// Trophy Gallery 31MNRKIND_TYLOT ,// Trophy Lottery 32MNRKIND_TYCOL ,// Trophy Collection 33MNRKIND_ADVSPLSH ,// Adventure Mode Splash Screen 34MNRKIND_TYFALL ,// 1P Mode Trophy Falling Cutscene 35MNRKIND_ADVCGRT ,// Adventure Mode Congratulations 36MNRKIND_VI1 ,// VisualScene_Luigi 37MNRKIND_VI2 ,// VisualScene_BrinstarLava 38MNRKIND_VI3 ,// VisualScene_PlanetExplode 39MNRKIND_VI4 ,// VisualScene_3KirbysSpawn 40MNRKIND_VI5 ,// VisualScene_GiantKirbySpawns 41MNRKIND_VI6 ,// VisualScene_StarFoxDialog 42MNRKIND_VI7 ,// VisualScene_FZeroRace 43MNRKIND_VI8 ,// VisualScene_MetalMarioLuigi 44MNRKIND_VI9 ,// VisualScene_BowserTrophyFalls 45MNRKIND_VI10 ,// VisualScene_GigaBowserTransformation 46MNRKIND_VI11 ,// VisualScene_GigaBowserDefeated 47MNRKIND_OP ,// Opening Movie 48MNRKIND_1PENDMV ,// 1P Mode End Movie 49MNRKIND_HOWMV ,// How to Play Movie 50MNRKIND_OMAKE ,// Special Movie 51MNRKIND_CLSCSPLSH ,// TEST 52MNRKIND_ALSPLSH ,// TEST 53MNRKIND_GMOV ,// Game over 54MNRKIND_SOON ,// coming soon 55MNRKIND_TOSETUP ,// tournament setup 56MNRKIND_TOBRCK ,// tourn bracket 57MNRKIND_TOUNK ,// tourn unk 58MNRKIND_SPCLMSG ,// special msg 59MNRKIND_PROG ,// progressive 60MNRKIND_CHLG ,// challenger 61MNRKIND_CARD ,// memcard prompt 62MNRKIND_STAFF ,// credits 63MNRKIND_CAMWARN ,// camera mode memcard prompt 64MNRKIND_NULL ,// terminator 65}MinorKind ; 66typedef enum MajorKind 67{ 68MJRKIND_TITLE ,// Title Screen 69MJRKIND_MNMA ,// Main Menu 70MJRKIND_VS ,// 71MJRKIND_CLASSIC ,// 72MJRKIND_ADV ,// 73MJRKIND_ALLSTAR ,// 74MJRKIND_DBG ,// 75MJRKIND_DBGSOUND ,// 76MJRKIND_HANYUTESTCSS ,// 77MJRKIND_HANYUTESTSSS ,// 78MJRKIND_CAMWARN ,// camera mode memcard prompt 79MJRKIND_TYGAL ,// Trophy Gallery 80MJRKIND_TYLOT ,// Trophy Lottery 81MJRKIND_TYCOL ,// Trophy Collection 82MJRKIND_DBGFIGHT ,// 83MJRKIND_TARGETS ,// 84MJRKIND_VSSUDDEATH ,// 85MJRKIND_VSINVIS ,// 86MJRKIND_VSSLOW ,// 87MJRKIND_VSFAST ,// 88MJRKIND_CHLG ,// Challenger Approaching 89MJRKIND_CLSCEND ,// 90MJRKIND_ADVEND ,// 91MJRKIND_ALLSTAREND ,// 92MJRKIND_OP ,// 93MJRKIND_VIS ,// Visual Scene (cutscene) 94MJRKIND_DBGEND ,// Debug 1P Ending 95MJRKIND_TOURN ,// 96MJRKIND_TRAIN ,// 97MJRKIND_VSTINY ,// 98MJRKIND_VSGIANT ,// 99MJRKIND_VSSTAMINA ,// 100MJRKIND_HOMERUN ,// 101MJRKIND_10MAN ,// 102MJRKIND_100MAN ,// 103MJRKIND_3MIN ,// 104MJRKIND_15MIN ,// 105MJRKIND_ENDLESS ,// 106MJRKIND_CRUEL ,// 107MJRKIND_PROG ,// Progressive prompt 108MJRKIND_BOOT ,// 109MJRKIND_CARD ,// Memcard prompt 110MJRKIND_VSFIXEDCAM ,// 111MJRKIND_EVENT ,// 112MJRKIND_VSSNGLBTN ,// 113MJRKIND_NULL ,// terminator 114}MajorKind ; 115 116struct MajorSceneDesc 117{ 118u8 is_preload ; 119s8 major_id ; 120void (* cb_Load )(); 121void (* cb_Exit )(); 122void (* cb_Boot )(); 123MinorScene * minor_scene_arr ;// array of minor scenes 124char * file_name ;// m-ex specific, name of the file containing major scene code 125}; 126 127struct MinorSceneDesc 128{ 129s8 id ; 130void (* cb_Think )(); 131void (* cb_Load )(void * data ); 132void (* cb_Exit )(void * data ); 133char * file_name ;// m-ex specific, name of the file containing minor scene code 134}; 135 136struct MinorScene 137{ 138s8 minor_id ;// is -1 for last entry 139u8 heap_kind ;// heap behavior, (2) 140void * minor_prep ;// inits data for this minor (major exclusive) 141void * minor_decide ;// decides next minor scene 142u8 minor_kind ;// index for a re-useable list of scene functions. contains a load, think, and leave function. 143void * load_data ;// points to static data used throughout this minor. other minors may use the same pointer to exchange data between minors 144void * unload_data ;// points to static data used throughout this minor. other minors may use the same pointer to exchange data between minors 145}; 146 147struct SceneInfo 148{ 149u8 major_curr ;// 0x0 150u8 major_next ;// 0x1 151u8 major_prev ;// 0x2 152u8 minor_curr ;// 0x3 153u8 minor_next ;// 0x4 154u8 minor_prev ;// 0x5 155}; 156 157struct ScDataVS // should really call this FightData... fight meaning the in-game scene 158{ 159u8 x8 ;// 0x0 160u8 x9 ;// 0x1 161u8 xa ;// 0x2 162int xc ;// 0x4 163MatchInit match_init ;// 0x8 164}; 165 166struct ScDataRst 167{ 168int x0 ; 169int x4 ; 170int x8 ; 171MatchStandings match_standings ;// 0xC 172u8 unk [0x2278 ];// 0x? 173}; 174 175struct ScDataIntro 176{ 177u8 x0 ; 178u8 x1 ; 179u8 x2 ; 180u8 match_mode ;// 0x3 181u8 x4 ;// 182u8 x5 ;// 183u8 x6 ;// 184u8 match_event_mode ;// 0x7 185u8 x8 ;// 0x8 186u8 nametag_idx ;// 0x9 187u8 xa ; 188u8 left_num ; 189u8 right_num ; 190u8 p1_ckind ; 191u8 p2_ckind ; 192u8 p3_ckind ; 193u8 p4_ckind ; 194u8 p5_ckind ; 195u8 p6_ckind ; 196u8 p1_costume ; 197u8 p2_costume ; 198u8 p3_costume ; 199u8 p4_costume ; 200u8 p5_costume ; 201u8 p6_costume ; 202}; 203 204/*** Static Variables ***/ 205static SceneInfo * stc_scene_info = (void * )0x80479D30 ; 206 207/* 208Scene Change Notes 209 210MinorThink: run Scene_ExitMinor to execute Scene_Decide 211SceneDecide: run either Scene_SetNextMinor to enter another minor, OR Scene_SetNextMajor then Scene_ExitMajor to enter another major 212*/ 213 214u8 Scene_GetCurrentMajor (); 215MajorSceneDesc * Scene_GetMajorSceneDesc (); 216MinorSceneDesc * Scene_GetMinorSceneDesc (); 217u8 Scene_GetCurrentMinor (); 218void Scene_SetNextMajor (int major_id );// run this in scene decide! 219void Scene_ExitMajor ();// run this to cause a major scene change, usually ran in scene decide! 220void Scene_SetNextMinor (int minor_id );// run this in scene decide! 221void Scene_ExitMinor ();// run this to cause a minor scene change, usually ran in scene think! 222void CSS_DecideNext (MinorScene * minor_scene ,ScDataVS * css_data ); 223void CSS_ResetKOStars (); 224void CSS_InitMajorData (ScDataVS * major_data ); 225void CSS_InitMinorData (MinorScene * minor_scene ,ScDataVS * major_data ,int css_kind ); 226void SSS_InitMinorData (MinorScene * minor_scene ,ScDataVS * major_data ); 227void SSS_DecideNext (MinorScene * minor_scene ,ScDataVS * css_data ,int exit_minor_id ); 228void Match_InitMinorData (MinorScene * minor_scene ,ScDataVS * major_data ,void * init_cb ,void * startmelee_cb ); 229void Match_SetNametags (MatchInit * match_init ); 230#endif