Added IMMEDIATELOAD debug flag to skip all intro stuff

This commit is contained in:
MysterD 2020-07-30 20:42:39 -07:00
parent c80d11a87c
commit 2d2dff6647
6 changed files with 32 additions and 2 deletions

View File

@ -34,6 +34,8 @@ OSX_BUILD ?= 0
TARGET_ARCH ?= native
TARGET_BITS ?= 0
# Disable immediate load by default
IMMEDIATELOAD ?= 0
# Disable better camera by default
BETTERCAMERA ?= 0
# Disable no drawing distance by default
@ -540,6 +542,12 @@ endif
# Check for enhancement options
# Check for immediate load option
ifeq ($(IMMEDIATELOAD),1)
CC_CHECK += -DIMMEDIATELOAD
CFLAGS += -DIMMEDIATELOAD
endif
# Check for Puppycam option
ifeq ($(BETTERCAMERA),1)
CC_CHECK += -DBETTERCAMERA

View File

@ -1 +1 @@
make BETTERCAMERA=1 NODRAWINGDISTANCE=1 DEBUG=1 && winpty cgdb ./build/us_pc/sm64.us.f3dex2e.exe -ex 'run' -ex 'quit'
make BETTERCAMERA=1 NODRAWINGDISTANCE=1 DEBUG=1 IMMEDIATELOAD=1 && winpty cgdb ./build/us_pc/sm64.us.f3dex2e.exe -ex 'run' -ex 'quit'

View File

@ -1 +1 @@
make BETTERCAMERA=1 NODRAWINGDISTANCE=1 DEBUG=1 && winpty cgdb ./build/us_pc/sm64.us.f3dex2e.exe -ex 'break render_pause_courses_and_castle'
make BETTERCAMERA=1 NODRAWINGDISTANCE=1 DEBUG=1 IMMEDIATELOAD=1 && winpty cgdb ./build/us_pc/sm64.us.f3dex2e.exe -ex 'break render_pause_courses_and_castle'

View File

@ -3,7 +3,11 @@
#include "segment_symbols.h"
#include "level_commands.h"
#ifdef IMMEDIATELOAD
#include "levels/menu/header.h"
#else
#include "levels/intro/header.h"
#endif
#include "make_const_nonconst.h"
@ -12,6 +16,11 @@ const LevelScript level_script_entry[] = {
SLEEP(/*frames*/ 2),
BLACKOUT(/*active*/ FALSE),
SET_REG(/*value*/ 0),
#ifdef IMMEDIATELOAD
EXECUTE(/*seg*/ 0x14, /*script*/ _introSegmentRomStart, /*scriptEnd*/ _introSegmentRomEnd, /*entry*/ level_main_menu_entry_1),
JUMP(/*target*/ level_main_menu_entry_1),
#else
EXECUTE(/*seg*/ 0x14, /*script*/ _introSegmentRomStart, /*scriptEnd*/ _introSegmentRomEnd, /*entry*/ level_intro_entry_1),
JUMP(/*target*/ level_script_entry),
#endif
};

View File

@ -44,13 +44,17 @@ const LevelScript level_main_menu_entry_1[] = {
FREE_LEVEL_POOL(),
LOAD_AREA(/*area*/ 1),
SET_MENU_MUSIC(/*seq*/ 0x0021),
#ifndef IMMEDIATELOAD
TRANSITION(/*transType*/ WARP_TRANSITION_FADE_FROM_COLOR, /*time*/ 16, /*color*/ 0xFF, 0xFF, 0xFF),
#endif
CALL(/*arg*/ 0, /*func*/ lvl_init_menu_values_and_cursor_pos),
CALL_LOOP(/*arg*/ 0, /*func*/ lvl_update_obj_and_load_file_selected),
GET_OR_SET(/*op*/ OP_SET, /*var*/ VAR_CURR_SAVE_FILE_NUM),
STOP_MUSIC(/*fadeOutTime*/ 0x00BE),
#ifndef IMMEDIATELOAD
TRANSITION(/*transType*/ WARP_TRANSITION_FADE_INTO_COLOR, /*time*/ 16, /*color*/ 0xFF, 0xFF, 0xFF),
SLEEP(/*frames*/ 16),
#endif
CLEAR_LEVEL(),
SLEEP_BEFORE_EXIT(/*frames*/ 1),
SET_REG(/*value*/ LEVEL_CASTLE_GROUNDS),

View File

@ -1115,9 +1115,13 @@ void check_sound_mode_menu_clicked_buttons(struct Object *soundModeButton) {
* retuning sSelectedFileNum to a save value defined in fileNum.
*/
void load_main_menu_save_file(struct Object *fileButton, s32 fileNum) {
#ifdef IMMEDIATELOAD
sSelectedFileNum = fileNum;
#else
if (fileButton->oMenuButtonState == MENU_BUTTON_STATE_FULLSCREEN) {
sSelectedFileNum = fileNum;
}
#endif
}
/**
@ -1593,6 +1597,11 @@ void handle_cursor_button_input(void) {
sClickPos[1] = sCursorPos[1];
sCursorClickingTimer = 1;
}
#ifdef IMMEDIATELOAD
sClickPos[0] = sCursorPos[0];
sClickPos[1] = sCursorPos[1];
sCursorClickingTimer = 1;
#endif
}
}