User Tools

Site Tools


super_mario_64:minor_decomp_tweaks

Minor decomp tweaks

Here's a collection of minor tweaks you can do in the Super Mario 64 decompilation project.

Skip Peach intro

To skip the intro peach cutscene on the bridge when you start a new file, in init_level in level_update.c, change:

if (gCurrDemoInput != NULL) {
    set_mario_action(gMarioState, ACT_IDLE, 0);
} else if (gDebugLevelSelect == 0) {
    if (gMarioState->action != ACT_UNINITIALIZED) {
        if (save_file_exists(gCurrSaveFileNum - 1)) {
            set_mario_action(gMarioState, ACT_IDLE, 0);
        } else {
            set_mario_action(gMarioState, ACT_INTRO_CUTSCENE, 0);
            val4 = 1;
        }
    }
}

to

if (gCurrDemoInput != NULL) {
    set_mario_action(gMarioState, ACT_IDLE, 0);
} else if (gDebugLevelSelect == 0) {
    if (gMarioState->action != ACT_UNINITIALIZED) {
            set_mario_action(gMarioState, ACT_IDLE, 0);
    }
}

This tweak was originally posted by “Revo” in the N64 Decompilation discord.

Skip Lakitu cutscene

To skip the lakitu cutscene on the bridge when you start a new file, in bhv_camera_lakitu_init in camera_lakitu.inc.c, change:

if (o->oBehParams2ndByte != CAMERA_LAKITU_BP_FOLLOW_CAMERA) {
        // Despawn unless this is the very beginning of the game
        if (gNeverEnteredCastle != TRUE) {
            obj_mark_for_deletion(o);
        }
    } else {
        spawn_object_relative_with_scale(CLOUD_BP_LAKITU_CLOUD, 0, 0, 0, 2.0f, o, MODEL_MIST, bhvCloud);
    }

to

if (o->oBehParams2ndByte != CAMERA_LAKITU_BP_FOLLOW_CAMERA) {
        // Always despawn
        obj_mark_for_deletion(o);
    } else {
        spawn_object_relative_with_scale(CLOUD_BP_LAKITU_CLOUD, 0, 0, 0, 2.0f, o, MODEL_MIST, bhvCloud);
    }

Skip Mario head (Goddard) sequence

To skip the mario head sequence when you start the game, change

exit_and_execute /*seg*/ 0x14, /*script*/ _introSegmentRomStart, /*scriptEnd*/ _introSegmentRomEnd, /*entry*/ level_intro_entry_2

to

exit_and_execute /*seg*/ 0x14, /*script*/ _introSegmentRomStart, /*scriptEnd*/ _introSegmentRomEnd, /*entry*/ L1

in levels/intro/script.s at line 20.

This tweak was originally posted by “Revo” in the N64 Decompilation discord.

Skip initial title screen

In order to skip the very first title screen, change levels/entry.c. Choose any menu or level you want to start with. Put that levels script in the EXECUTE line as the entry parameter. For example, in order to start with the file select menu, change level_intro_entry_1 into script_intro_L1:

EXECUTE(/*seg*/ 0x14, /*script*/ _introSegmentRomStart, /*scriptEnd*/ _introSegmentRomEnd, /*entry*/ script_intro_L1),

Ensure to #include the level's header.h file in the top.

super_mario_64/minor_decomp_tweaks.txt · Last modified: 2022/02/18 11:22 by sc22