Skip to content

Make L Button Be Turbo A When L=A Option Is Set

Alice_Not_Waifu edited this page Jan 21, 2024 · 4 revisions

By devolov

This addition makes it so that holding the L button is the same as turbo A, so getting through long blocks of text is now a breeze.

In src/main.c find static void ReadKeys(void), and go to if (JOY_HELD(L_BUTTON)) (line 284 for me). Add the line below.

    if (JOY_HELD(L_BUTTON))
+   {
        gMain.heldKeys |= A_BUTTON;
+       gMain.newKeys ^= A_BUTTON;
+   }

If you'd like L=A to be the default in a new game: Go to src/new_game.c and find static void SetDefaultOptions(void) (line 89 for me). Add the line below.
No more sore-thumbs while scrolling through Professor Birch's intro!

Note: This default will only overwrite on a fresh sav file. If there was an older save file that you're overwriting to start a new game, it'll hold the attributes of the older sav file. This is what I'd think is preferable, but wanted this to be known for anyone expecting otherwise.

static void SetDefaultOptions(void)
{
    gSaveBlock2Ptr->optionsTextSpeed = OPTIONS_TEXT_SPEED_FAST;
    gSaveBlock2Ptr->optionsBattleStyle = OPTIONS_BATTLE_STYLE_SHIFT;
    gSaveBlock2Ptr->optionsBattleSceneOff = FALSE;
    gSaveBlock2Ptr->regionMapZoom = FALSE;
+   gSaveBlock2Ptr->optionsButtonMode = OPTIONS_BUTTON_MODE_L_EQUALS_A;
}
Clone this wiki locally