Skip to content

Commit 9e93982

Browse files
committed
improved fast isabelle with blocking of all inputs except A
1 parent ee3e45a commit 9e93982

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

Includes/Address/Addresses.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
#include "types.h"
44

55
static const u32 ADDRESSES[][8] = {
6+
{ 0x541FF8, 0x541534, 0x541040, 0x541040, 0x54092C, 0x54092C, 0x540650, 0x540650 }, //Block key inputs except A
67
{ 0x316F40, 0x317148, 0x316E84, 0x316E84, 0x316ECC, 0x316ECC, 0x316EDC, 0x316EDC }, //GET_HOUSE_CHECK_DATA
78
{ 0x30F770, 0x30FBB4, 0x30F820, 0x30F820, 0x30F88C, 0x30F88C, 0x30F744, 0x30F744 }, //GET_HOUSE_SAVE_FROM_PLAYER_OFFSET
89
{ 0x6FB9E8, 0x6FAE98, 0x6FAA08, 0x6FA9E0, 0x6FA1B4, 0x6FA18C, 0x6F9D5C, 0x6F9D34 }, //GET_ROOM_SIZE

Sources/Folders/MiscCodes.cpp

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -470,10 +470,12 @@ namespace CTRPluginFramework {
470470
}
471471
//Fast Isabelle (Fast Text + Game Speed when in the Isabelle greeting room)
472472
void fastisabelle(MenuEntry *entry) {
473+
static Address blockKeys(0x541FF8);
473474
static Address speed(0x54DDB4);
474475
static Address fastt(0x5FC6AC);
475476
static Address fastt2 = fastt.MoveOffset(8);
476477

478+
static bool blockKeysPatchedByIsabelle = false;
477479
static bool speedPatchedByIsabelle = false;
478480
static bool fastTalkPatchedByIsabelle = false;
479481

@@ -496,6 +498,13 @@ namespace CTRPluginFramework {
496498
fastt2.Patch(0xE3500001);
497499
fastTalkPatchedByIsabelle = true;
498500
}
501+
502+
503+
if (!blockKeysPatchedByIsabelle) {
504+
blockKeys.Patch(0xEA000068); //Block all keys except A
505+
blockKeysPatchedByIsabelle = true;
506+
}
507+
499508
Controller::InjectKey(Key::A);
500509
}
501510
else {
@@ -509,6 +518,11 @@ namespace CTRPluginFramework {
509518
fastt2.Unpatch();
510519
fastTalkPatchedByIsabelle = false;
511520
}
521+
522+
if (blockKeysPatchedByIsabelle) {
523+
blockKeys.Unpatch();
524+
blockKeysPatchedByIsabelle = false;
525+
}
512526
}
513527
}
514528
}

0 commit comments

Comments
 (0)