summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPikalaxALT <pikalaxalt@gmail.com>2018-02-27 08:47:47 -0500
committerPikalaxALT <pikalaxalt@gmail.com>2018-02-27 08:47:47 -0500
commit7f7b182ca4430b488e6f6b502a53697154df6b86 (patch)
treed87af52902428e347b3dc85abcb0380645d23abc
parent5162393c166ab9a37ec22993df6588080f1a9aa0 (diff)
sub_81D1574
-rw-r--r--asm/pokenav.s40
-rw-r--r--ld_script.txt2
-rw-r--r--src/match_call.c32
3 files changed, 36 insertions, 38 deletions
diff --git a/asm/pokenav.s b/asm/pokenav.s
index 56bf3d41f..ae792ae76 100644
--- a/asm/pokenav.s
+++ b/asm/pokenav.s
@@ -20697,44 +20697,8 @@ _081D156A:
.pool
thumb_func_end sub_81D1538
- thumb_func_start sub_81D1574
-sub_81D1574: @ 81D1574
- push {lr}
- ldrb r0, [r0]
- cmp r0, 0x5
- bhi _081D15A4
- lsls r0, 2
- ldr r1, =_081D158C
- adds r0, r1
- ldr r0, [r0]
- mov pc, r0
- .pool
- .align 2, 0
-_081D158C:
- .4byte _081D15A4
- .4byte _081D15A8
- .4byte _081D15AC
- .4byte _081D15B4
- .4byte _081D15B0
- .4byte _081D15A8
-_081D15A4:
- movs r0, 0
- b _081D15B6
-_081D15A8:
- movs r0, 0x1
- b _081D15B6
-_081D15AC:
- movs r0, 0x2
- b _081D15B6
-_081D15B0:
- movs r0, 0x3
- b _081D15B6
-_081D15B4:
- movs r0, 0x4
-_081D15B6:
- pop {r1}
- bx r1
- thumb_func_end sub_81D1574
+// MATCH CALL
+ .section .text.after.match.call
thumb_func_start sub_81D15BC
sub_81D15BC: @ 81D15BC
diff --git a/ld_script.txt b/ld_script.txt
index 4c7b40dd9..bcfd6b079 100644
--- a/ld_script.txt
+++ b/ld_script.txt
@@ -264,6 +264,8 @@ SECTIONS {
src/pokemon_summary_screen.o(.text);
asm/pokemon_summary_screen.o(.text);
asm/pokenav.o(.text);
+ src/match_call.o(.text);
+ asm/pokenav.o(.text.after.match.call);
src/rayquaza_scene.o(.text);
src/walda_phrase.o(.text);
asm/contest_link_81D9DE4.o(.text);
diff --git a/src/match_call.c b/src/match_call.c
new file mode 100644
index 000000000..d435ea8a6
--- /dev/null
+++ b/src/match_call.c
@@ -0,0 +1,32 @@
+
+// Includes
+#include "global.h"
+
+// Static type declarations
+
+// Static RAM declarations
+
+// Static ROM declarations
+
+// .rodata
+
+// .text
+
+u32 sub_81D1574(u8 *a)
+{
+ switch (*a)
+ {
+ case 0:
+ default:
+ return 0;
+ case 1:
+ case 5:
+ return 1;
+ case 2:
+ return 2;
+ case 4:
+ return 3;
+ case 3:
+ return 4;
+ }
+}