mirror of
https://github.com/pret/pmd-red.git
synced 2025-02-25 15:50:37 +00:00
split to decomp type name string functions
This commit is contained in:
parent
cbe3f0265b
commit
95b06d5d6b
@ -147124,7 +147124,7 @@ sub_805B0D0:
|
||||
movs r2, 0
|
||||
bl sub_8045B94
|
||||
adds r0, r6, 0
|
||||
bl sub_8092334
|
||||
bl GetUnformattedTypeString
|
||||
adds r1, r0, 0
|
||||
ldr r0, _0805B144
|
||||
bl strcpy
|
||||
@ -176685,7 +176685,7 @@ _0806A0AA:
|
||||
movs r2, 0
|
||||
bl sub_8045B94
|
||||
ldrb r0, [r4]
|
||||
bl sub_8092334
|
||||
bl GetUnformattedTypeString
|
||||
adds r1, r0, 0
|
||||
ldr r0, _0806A118
|
||||
bl strcpy
|
||||
@ -176759,7 +176759,7 @@ sub_806A120:
|
||||
movs r2, 0
|
||||
bl sub_8045B94
|
||||
adds r0, r4, 0
|
||||
bl sub_8092334
|
||||
bl GetUnformattedTypeString
|
||||
adds r1, r0, 0
|
||||
ldr r0, _0806A1A8
|
||||
bl strcpy
|
||||
|
@ -3894,7 +3894,7 @@ _0808FB44:
|
||||
bl sub_8014FF0
|
||||
mov r3, r10
|
||||
ldrb r0, [r3, 0x16]
|
||||
bl sub_8092344
|
||||
bl GetFormattedTypeString
|
||||
adds r2, r0, 0
|
||||
str r4, [sp]
|
||||
movs r0, 0x38
|
||||
@ -3905,7 +3905,7 @@ _0808FB44:
|
||||
ldrb r0, [r1, 0x17]
|
||||
cmp r0, 0
|
||||
beq _0808FB94
|
||||
bl sub_8092344
|
||||
bl GetFormattedTypeString
|
||||
adds r2, r0, 0
|
||||
str r4, [sp]
|
||||
movs r0, 0x60
|
||||
|
13618
asm/code_809017C.s
13618
asm/code_809017C.s
File diff suppressed because it is too large
Load Diff
13624
asm/code_8092334.s
Normal file
13624
asm/code_8092334.s
Normal file
File diff suppressed because it is too large
Load Diff
@ -10071,31 +10071,39 @@ gUnknown_810AA90: @ 810AA90
|
||||
|
||||
.global gUnknown_810AC60
|
||||
gUnknown_810AC60: @ 810AC60
|
||||
.incbin "baserom.gba", 0x10AC60, 0x2
|
||||
.byte 0x0C, 0x00
|
||||
|
||||
.global gUnknown_810AC62
|
||||
gUnknown_810AC62: @ 810AC62
|
||||
.incbin "baserom.gba", 0x10AC62, 0x2
|
||||
.byte 0x0C, 0x00
|
||||
|
||||
.global gUnknown_810AC64
|
||||
gUnknown_810AC64: @ 810AC64
|
||||
.incbin "baserom.gba", 0x10AC64, 0x2
|
||||
.byte 0x08, 0x00
|
||||
|
||||
.global gUnknown_810AC66
|
||||
gUnknown_810AC66: @ 810AC66
|
||||
.incbin "baserom.gba", 0x10AC66, 0x2
|
||||
.byte 0x08, 0x00
|
||||
|
||||
.global gUnknown_810AC68
|
||||
gUnknown_810AC68: @ 810AC68
|
||||
.incbin "baserom.gba", 0x10AC68, 0x2
|
||||
.byte 0x08, 0x00
|
||||
|
||||
.global gUnknown_810AC6A
|
||||
gUnknown_810AC6A: @ 810AC6A
|
||||
.incbin "baserom.gba", 0x10AC6A, 0x12
|
||||
.byte 0x00, 0x0E, 0x03, 0x04
|
||||
.byte 0x0C, 0x09, 0x02, 0x0E
|
||||
.byte 0x11, 0x0A, 0x0D, 0x10
|
||||
.byte 0x08, 0x07, 0x01, 0x11
|
||||
.byte 0x10, 0x05
|
||||
|
||||
.global gUnknown_810AC7C
|
||||
gUnknown_810AC7C: @ 810AC7C
|
||||
.incbin "baserom.gba", 0x10AC7C, 0x14
|
||||
.byte 0x01, 0x01, 0x00, 0x00
|
||||
.byte 0x00, 0x00, 0x00, 0x01
|
||||
.byte 0x01, 0x01, 0x01, 0x00
|
||||
.byte 0x01, 0x01, 0x01, 0x00
|
||||
.byte 0x00, 0x01, 0x00, 0x00
|
||||
|
||||
.global gUnknown_810AC90
|
||||
gUnknown_810AC90: @ 810AC90
|
||||
@ -10103,19 +10111,19 @@ gUnknown_810AC90: @ 810AC90
|
||||
|
||||
.global gUnknown_810ACB8
|
||||
gUnknown_810ACB8: @ 810ACB8
|
||||
.incbin "baserom.gba", 0x10ACB8, 0x2
|
||||
.byte 0x4D, 0x01
|
||||
|
||||
.global gUnknown_810ACBA
|
||||
gUnknown_810ACBA: @ 810ACBA
|
||||
.incbin "baserom.gba", 0x10ACBA, 0x2
|
||||
.byte 0x4D, 0x01
|
||||
|
||||
.global gUnknown_810ACBC
|
||||
gUnknown_810ACBC: @ 810ACBC
|
||||
.incbin "baserom.gba", 0x10ACBC, 0x2
|
||||
.byte 0x4D, 0x01
|
||||
|
||||
.global gUnknown_810ACBE
|
||||
gUnknown_810ACBE: @ 810ACBE
|
||||
.incbin "baserom.gba", 0x10ACBE, 0x2
|
||||
.byte 0x4D, 0x01
|
||||
|
||||
.global gUnknown_810ACC0
|
||||
gUnknown_810ACC0: @ 810ACC0
|
||||
@ -10127,8 +10135,8 @@ gUnknown_810AD0C: @ 810AD0C
|
||||
|
||||
.include "data/text/type_names.inc"
|
||||
|
||||
.global gUnknown_810AE24
|
||||
gUnknown_810AE24: @ 810AE24
|
||||
.global gFormattedTypeStrings
|
||||
gFormattedTypeStrings: @ 810AE24
|
||||
.incbin "baserom.gba", 0x10AE24, 0x12C
|
||||
|
||||
.global gUnknown_810AF50
|
||||
@ -10157,11 +10165,16 @@ gUnknown_810CC0C: @ 810CC0C
|
||||
|
||||
.global gUnknown_810CF00
|
||||
gUnknown_810CF00: @ 810CF00
|
||||
.incbin "baserom.gba", 0x10CF00, 0xC
|
||||
.byte 0xF0, 0xCE, 0x10, 0x08 @ (pointer to range string)
|
||||
.asciz "Type"
|
||||
.align 2,0
|
||||
|
||||
.global gUnknown_810CF0C
|
||||
gUnknown_810CF0C: @ 810CF0C
|
||||
.incbin "baserom.gba", 0x10CF0C, 0x10
|
||||
.byte 0x04, 0xCF, 0x10, 0x08 @ (pointer to type string)
|
||||
.asciz "Power"
|
||||
.align 2,0
|
||||
.byte 0x10, 0xCF, 0x10, 0x08 @ (pointer to power string)
|
||||
|
||||
.global gUnknown_810CF1C
|
||||
gUnknown_810CF1C: @ 810CF1C
|
||||
|
@ -1,4 +1,4 @@
|
||||
gUnknown_810AD4C:: @ 810AD4C
|
||||
gUnformattedTypeStrings:: @ 810AD4C
|
||||
@ (Table of pointers to each string)
|
||||
.byte 0x1c, 0xae, 0x10, 0x08
|
||||
.byte 0x14, 0xae, 0x10, 0x08
|
||||
|
@ -78,6 +78,8 @@ SECTIONS {
|
||||
asm/code_808DAB4.o(.text);
|
||||
src/dungeon.o(.text);
|
||||
asm/code_809017C.o(.text);
|
||||
src/code_8092334.o(.text);
|
||||
asm/code_8092334.o(.text);
|
||||
asm/code_8098468.o(.text);
|
||||
asm/m4a_1.o(.text);
|
||||
src/m4a_2.o(.text);
|
||||
|
26
src/code_8092334.c
Normal file
26
src/code_8092334.c
Normal file
@ -0,0 +1,26 @@
|
||||
#include "global.h"
|
||||
|
||||
extern u32 gUnformattedTypeStrings[]; // unformatted type names
|
||||
extern u32 gFormattedTypeStrings[]; // formatted type names
|
||||
extern u8 gUnknown_810AC7C[];
|
||||
extern u8 gUnknown_810AC6A[];
|
||||
|
||||
u32 GetUnformattedTypeString(u8 type)
|
||||
{
|
||||
return gUnformattedTypeStrings[type];
|
||||
}
|
||||
|
||||
u32 GetFormattedTypeString(u8 type)
|
||||
{
|
||||
return gFormattedTypeStrings[type];
|
||||
}
|
||||
|
||||
u8 sub_8092354(u8 r0)
|
||||
{
|
||||
return gUnknown_810AC7C[r0];
|
||||
}
|
||||
|
||||
u8 sub_8092364(u8 r0)
|
||||
{
|
||||
return gUnknown_810AC6A[r0];
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user