Name warp-related defines and add option to disable intro demo

This commit is contained in:
Arceveti
2021-09-23 17:37:05 -07:00
parent 9b59eb0256
commit 6fcbb42632
23 changed files with 233 additions and 213 deletions

View File

@@ -44,11 +44,11 @@ static const LevelScript script_exec_level_table[2
#undef DEFINE_LEVEL
#undef STUB_LEVEL
static const LevelScript script_L1[6];
static const LevelScript script_L2[6];
static const LevelScript goto_intro_splash_screen[6];
static const LevelScript goto_ending[6];
static const LevelScript goto_mario_head_regular[6];
static const LevelScript goto_mario_head_dizzy[6];
static const LevelScript script_L5[6];
static const LevelScript goto_debug_level_select[6];
#define STUB_LEVEL(_0, _1, _2, _3, _4, _5, _6, _7, _8)
#define DEFINE_LEVEL(_0, _1, _2, folder, _4, _5, _6, _7, _8, _9, _10) static const LevelScript script_exec_ ## folder [6 + 1];
@@ -101,7 +101,6 @@ const LevelScript level_main_scripts_entry[] = {
LOAD_MODEL_FROM_GEO(MODEL_MARIOS_METAL_CAP, marios_metal_cap_geo),
LOAD_MODEL_FROM_GEO(MODEL_MARIOS_WING_CAP, marios_wing_cap_geo),
LOAD_MODEL_FROM_GEO(MODEL_MARIOS_CAP, marios_cap_geo),
//LOAD_MODEL_FROM_GEO(MODEL_MARIOS_CAP, marios_cap_geo), // repeated
LOAD_MODEL_FROM_GEO(MODEL_BOWSER_KEY_CUTSCENE, bowser_key_cutscene_geo),
LOAD_MODEL_FROM_GEO(MODEL_BOWSER_KEY, bowser_key_geo),
LOAD_MODEL_FROM_GEO(MODEL_RED_FLAME_SHADOW, red_flame_shadow_geo),
@@ -115,22 +114,22 @@ const LevelScript level_main_scripts_entry[] = {
FREE_LEVEL_POOL(),
CALL(/*arg*/ 0, /*func*/ lvl_init_from_save_file),
LOOP_BEGIN(),
EXECUTE(/*seg*/ 0x14, _menuSegmentRomStart, _menuSegmentRomEnd, level_main_menu_entry_2),
EXECUTE(/*seg*/ 0x14, _menuSegmentRomStart, _menuSegmentRomEnd, level_main_menu_entry_act_select),
JUMP_LINK(script_exec_level_table),
SLEEP(/*frames*/ 1),
LOOP_UNTIL(/*op*/ OP_LT, /*arg*/ 0),
JUMP_IF(/*op*/ OP_EQ, /*arg*/ -1, script_L2),
JUMP_IF(/*op*/ OP_EQ, /*arg*/ -2, goto_mario_head_regular),
JUMP_IF(/*op*/ OP_EQ, /*arg*/ -3, goto_mario_head_dizzy),
JUMP_IF(/*op*/ OP_EQ, /*arg*/ -8, script_L1),
JUMP_IF(/*op*/ OP_EQ, /*arg*/ -9, script_L5),
LOOP_UNTIL(/*op*/ OP_LT, /*arg*/ WARP_SPECIAL_NONE),
JUMP_IF( /*op*/ OP_EQ, /*arg*/ WARP_SPECIAL_ENDING, goto_ending),
JUMP_IF( /*op*/ OP_EQ, /*arg*/ WARP_SPECIAL_MARIO_HEAD_REGULAR, goto_mario_head_regular),
JUMP_IF( /*op*/ OP_EQ, /*arg*/ WARP_SPECIAL_MARIO_HEAD_DIZZY, goto_mario_head_dizzy),
JUMP_IF( /*op*/ OP_EQ, /*arg*/ WARP_SPECIAL_INTRO_SPLASH_SCREEN, goto_intro_splash_screen),
JUMP_IF( /*op*/ OP_EQ, /*arg*/ WARP_SPECIAL_LEVEL_SELECT, goto_debug_level_select),
};
static const LevelScript script_L1[] = {
static const LevelScript goto_intro_splash_screen[] = {
EXIT_AND_EXECUTE_WITH_CODE(/*seg*/ 0x14, _introSegmentRomStart, _introSegmentRomEnd, level_intro_splash_screen, _introSegmentBssStart, _introSegmentBssEnd),
};
static const LevelScript script_L2[] = {
static const LevelScript goto_ending[] = {
EXIT_AND_EXECUTE_WITH_CODE(/*seg*/ 0x0E, _endingSegmentRomStart, _endingSegmentRomEnd, level_ending_entry, _endingSegmentBssStart, _endingSegmentBssEnd),
};
@@ -142,8 +141,8 @@ static const LevelScript goto_mario_head_dizzy[] = {
EXIT_AND_EXECUTE_WITH_CODE(/*seg*/ 0x14, _introSegmentRomStart, _introSegmentRomEnd, level_intro_mario_head_dizzy, _introSegmentBssStart, _introSegmentBssEnd),
};
static const LevelScript script_L5[] = {
EXIT_AND_EXECUTE_WITH_CODE(/*seg*/ 0x14, _introSegmentRomStart, _introSegmentRomEnd, level_intro_entry_4, _introSegmentBssStart, _introSegmentBssEnd),
static const LevelScript goto_debug_level_select[] = {
EXIT_AND_EXECUTE_WITH_CODE(/*seg*/ 0x14, _introSegmentRomStart, _introSegmentRomEnd, level_intro_entry_level_select, _introSegmentBssStart, _introSegmentBssEnd),
};
// Include the level jumptable.