Add an option to bypass the mario startup screen.

This commit is contained in:
kelson8 2025-01-23 00:47:22 -05:00
parent 9cbfa1a818
commit ea3529eb8d

View File

@ -22,6 +22,10 @@
// TODO Figure out how to add to the games menu and switch to this, it should be possible.
// #define _LEVEL_SELECTOR
// Bypass the mario startup screen and make the game show the saves without pressing start.
// TODO Make this auto load save slot 1 for testing.
#define _FAST_LOADER
const LevelScript level_intro_entry_1[] = {
INIT_LEVEL(),
FIXED_LOAD(/*loadAddr*/ _goddardSegmentStart, /*romStart*/ _goddardSegmentRomStart, /*romEnd*/ _goddardSegmentRomEnd),
@ -44,8 +48,13 @@ const LevelScript level_intro_entry_1[] = {
#ifdef _LEVEL_SELECTOR //Level selector patch
EXIT_AND_EXECUTE(/*seg*/ 0x14, _introSegmentRomStart, _introSegmentRomEnd, level_intro_entry_4),
#elif defined(_FAST_LOADER)
// This bypasses the mario startup where it says to press start by enabling this.
EXIT_AND_EXECUTE(/*seg*/ 0x14, _introSegmentRomStart, _introSegmentRomEnd, level_main_menu_entry_1),
#else
// Normal load screen
EXIT_AND_EXECUTE(/*seg*/ 0x14, _introSegmentRomStart, _introSegmentRomEnd, level_intro_entry_2),
#endif //_LEVEL_SELECTOR
};
@ -70,9 +79,15 @@ const LevelScript level_intro_entry_2[] = {
TRANSITION(/*transType*/ WARP_TRANSITION_FADE_FROM_STAR, /*time*/ 20, /*color*/ 0x00, 0x00, 0x00),
SLEEP(/*frames*/ 20),
CALL_LOOP(/*arg*/ 1, /*func*/ lvl_intro_update),
// Original code
JUMP_IF(/*op*/ OP_EQ, /*arg*/ 100, script_intro_L1),
JUMP_IF(/*op*/ OP_EQ, /*arg*/ 101, script_intro_L2),
JUMP(script_intro_L4),
// This somewhat makes it load faster after going into the main menu and hitting start
// JUMP_IF(/*op*/ OP_EQ, /*arg*/ 100, level_main_menu_entry_1),
// JUMP_IF(/*op*/ OP_EQ, /*arg*/ 101, level_main_menu_entry_1),
// JUMP(level_main_menu_entry_1),
};
const LevelScript level_intro_entry_3[] = {