split out string utility data

This commit is contained in:
YamaArashi 2015-11-24 12:29:15 -08:00
parent c0502849fa
commit e417efb820
3 changed files with 75 additions and 30 deletions

View File

@ -342,7 +342,7 @@ ConvertIntToDecimalString: ; 8008CC0
adds r5, r0, 0
cmp r5, 0
ble @08008D60
ldr r0, =gUnknown_082EC7D4
ldr r0, =gDigits
mov r8, r0
@08008CEE:
adds r0, r6, 0
@ -442,7 +442,7 @@ ConvertUnsignedIntToDecimalString: ; 8008D70
adds r5, r0, 0
cmp r5, 0
ble @08008E10
ldr r0, =gUnknown_082EC7D4
ldr r0, =gDigits
mov r8, r0
@08008D9E:
adds r0, r6, 0
@ -552,7 +552,7 @@ ConvertIntToHexString: ; 8008E20
adds r5, r1, 0
cmp r5, 0
ble @08008ECA
ldr r0, =gUnknown_082EC7D4
ldr r0, =gDigits
mov r9, r0
@08008E5E:
mov r0, r8
@ -943,7 +943,7 @@ GetExpandedStringRef: ; 80090D8
push {lr}
cmp r0, 0xD
bhi @080090F0
ldr r1, =gUnknown_082EC818
ldr r1, =gStringRefFunctionTable
lsls r0, 2
adds r0, r1
ldr r0, [r0]
@ -1224,7 +1224,7 @@ GetExtendedControlCodeLength: ; 800927C
movs r0, 0
cmp r1, 0x18
bhi @0800928E
ldr r0, =gUnknown_082EC850
ldr r0, =gExtendedControlCodeLengths
adds r0, r1, r0
ldrb r0, [r0]
@0800928E:

View File

@ -194,32 +194,10 @@ gUnknown_82EC7CC: ; 82EC7CC
.2byte 0x0004
.2byte 0x0008
gUnknown_082EC7D4: ; 82EC7D4
.incbin "base_emerald.gba", 0x2ec7d4, 0x10
; 82EC7D4
.include "data/string_util.s"
gPowersOfTen: ; 82EC7E4
.4byte 1
.4byte 10
.4byte 100
.4byte 1000
.4byte 10000
.4byte 100000
.4byte 1000000
.4byte 10000000
.4byte 100000000
.4byte 1000000000
gUnknown_082EC80C: ; 82EC80C
.incbin "base_emerald.gba", 0x2ec80c, 0x4
gUnknown_082EC810: ; 82EC810
.incbin "base_emerald.gba", 0x2ec810, 0x8
gUnknown_082EC818: ; 82EC818
.incbin "base_emerald.gba", 0x2ec818, 0x38
gUnknown_082EC850: ; 82EC850
.incbin "base_emerald.gba", 0x2ec850, 0x1c
.align 2, 0
gUnknown_082EC86C: ; 82EC86C
.incbin "base_emerald.gba", 0x2ec86c, 0x20

67
data/string_util.s Normal file
View File

@ -0,0 +1,67 @@
gDigits: ; 82EC7D4
.charmapstr "0123456789ABCDEF"
.align 2, 0
gPowersOfTen: ; 82EC7E4
.4byte 1
.4byte 10
.4byte 100
.4byte 1000
.4byte 10000
.4byte 100000
.4byte 1000000
.4byte 10000000
.4byte 100000000
.4byte 1000000000
gUnknown_082EC80C: ; 82EC80C
.incbin "base_emerald.gba", 0x2ec80c, 0x4
gUnknown_082EC810: ; 82EC810
.incbin "base_emerald.gba", 0x2ec810, 0x8
.align 2, 0
gStringRefFunctionTable: ; 82EC818
.4byte StringRef_GetPossiblyUnusedStringVar
.4byte StringRef_GetPlayerName
.4byte StringRef_GetStringVar1
.4byte StringRef_GetStringVar2
.4byte StringRef_GetStringVar3
.4byte StringRef_GetDummiedOutGenderDependentString
.4byte StringRef_GetRivalName
.4byte StringRef_GetEmeraldString
.4byte StringRef_GetAquaString
.4byte StringRef_GetMagmaString
.4byte StringRef_GetArchieString
.4byte StringRef_GetMaxieString
.4byte StringRef_GetKyogreString
.4byte StringRef_GetGroudonString
gExtendedControlCodeLengths: ; 82EC850
.byte 1
.byte 2
.byte 2
.byte 2
.byte 4
.byte 2
.byte 2
.byte 1
.byte 2
.byte 1
.byte 1
.byte 3
.byte 2
.byte 2
.byte 2
.byte 1
.byte 3
.byte 2
.byte 2
.byte 2
.byte 2
.byte 1
.byte 1
.byte 1
.byte 1