summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--asm/secret_base.s32
-rw-r--r--ld_script.txt2
-rw-r--r--src/secret_base.c18
3 files changed, 21 insertions, 31 deletions
diff --git a/asm/secret_base.s b/asm/secret_base.s
index 89ddc879f..81225ba4b 100644
--- a/asm/secret_base.s
+++ b/asm/secret_base.s
@@ -1701,37 +1701,7 @@ _080BC18A:
bx r1
thumb_func_end sub_80BC14C
- thumb_func_start sub_80BC190
-sub_80BC190: @ 80BC190
- push {r4,r5,lr}
- adds r5, r0, 0
- lsls r1, 24
- lsrs r1, 24
- lsls r4, r1, 2
- adds r4, r1
- lsls r4, 5
- ldr r0, _080BC1C8 @ =gSaveBlock1 + 0x1A0A
- adds r4, r0
- adds r0, r4, 0
- bl sub_80BB8A8
- adds r2, r0, 0
- lsls r2, 24
- lsrs r2, 24
- adds r0, r5, 0
- adds r1, r4, 0
- bl StringCopyN
- movs r1, 0xFF
- strb r1, [r0]
- ldr r1, _080BC1CC @ =gOtherText_PlayersBase
- adds r0, r5, 0
- bl StringAppend
- pop {r4,r5}
- pop {r1}
- bx r1
- .align 2, 0
-_080BC1C8: .4byte gSaveBlock1 + 0x1A0A
-_080BC1CC: .4byte gOtherText_PlayersBase
- thumb_func_end sub_80BC190
+.section .text_80BC1D0
thumb_func_start GetSecretBaseMapName
GetSecretBaseMapName: @ 80BC1D0
diff --git a/ld_script.txt b/ld_script.txt
index 25f5460a0..af5678637 100644
--- a/ld_script.txt
+++ b/ld_script.txt
@@ -170,6 +170,8 @@ SECTIONS {
asm/record_mixing.o(.text);
asm/sound_check_menu.o(.text);
asm/secret_base.o(.text);
+ src/secret_base.o(.text);
+ asm/secret_base.o(.text_80BC1D0);
asm/tv.o(.text);
src/tv.o(.text);
asm/tv.o(.text_80BE8EC);
diff --git a/src/secret_base.c b/src/secret_base.c
new file mode 100644
index 000000000..572dfaa1d
--- /dev/null
+++ b/src/secret_base.c
@@ -0,0 +1,18 @@
+#include "global.h"
+#include "string_util.h"
+#include "strings.h"
+#include "text.h"
+
+u8 sub_80BB8A8(void *);
+
+u8 *sub_80BC190(u8 *dest, u8 arg1) {
+ u8 local1;
+ u8 *str;
+
+ local1 = sub_80BB8A8(gSaveBlock1.secretBases[arg1].sbr_field_2);
+
+ str = StringCopyN(dest, gSaveBlock1.secretBases[arg1].sbr_field_2, local1);
+ str[0] = EOS;
+
+ return StringAppend(dest, gOtherText_PlayersBase);
+}