summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--asm/secret_base.s24
-rw-r--r--include/vars.h2
-rwxr-xr-xsrc/secret_base_80bb4ac.c6
3 files changed, 8 insertions, 24 deletions
diff --git a/asm/secret_base.s b/asm/secret_base.s
index cf2ce3968..88a4cb311 100644
--- a/asm/secret_base.s
+++ b/asm/secret_base.s
@@ -6,30 +6,6 @@
.section .text_b
- thumb_func_start sub_80BBB24
-sub_80BBB24: @ 80BBB24
- push {lr}
- ldr r0, _080BBB40 @ =gMapHeader
- ldrb r0, [r0, 0x17]
- cmp r0, 0x9
- bne _080BBB48
- ldr r0, _080BBB44 @ =0x00004097
- bl VarGet
- lsls r0, 16
- cmp r0, 0
- bne _080BBB48
- movs r0, 0
- b _080BBB4A
- .align 2, 0
-_080BBB40: .4byte gMapHeader
-_080BBB44: .4byte 0x00004097
-_080BBB48:
- movs r0, 0x1
-_080BBB4A:
- pop {r1}
- bx r1
- thumb_func_end sub_80BBB24
-
thumb_func_start sub_80BBB50
sub_80BBB50: @ 80BBB50
push {r4,lr}
diff --git a/include/vars.h b/include/vars.h
index 07c96482e..6a23695fb 100644
--- a/include/vars.h
+++ b/include/vars.h
@@ -28,6 +28,8 @@
#define VAR_0x4054 0x4054
+#define VAR_0x4097 0x4097
+
#define VAR_PORTHOLE 0x40B4
#endif // GUARD_VARS_H
diff --git a/src/secret_base_80bb4ac.c b/src/secret_base_80bb4ac.c
index f1237681c..b5790ef4d 100755
--- a/src/secret_base_80bb4ac.c
+++ b/src/secret_base_80bb4ac.c
@@ -235,3 +235,9 @@ void sub_80BBAF0(void) {
fade_screen(1, 0);
saved_warp2_set(0, gSaveBlock1.location.mapGroup, gSaveBlock1.location.mapNum, -1);
}
+
+u8 sub_80BBB24(void) {
+ if (gMapHeader.mapType == 9 && VarGet(VAR_0x4097) == 0)
+ return 0;
+ return 1;
+}