mirror of
https://github.com/pret/pokediamond.git
synced 2026-09-09 01:26:32 -05:00
Some more function naming
This commit is contained in:
@@ -213,7 +213,7 @@ _0200251A:
|
||||
ldr r0, [r4, #0x0]
|
||||
sub r0, r0, #0x2
|
||||
str r0, [r4, #0x0]
|
||||
bl FUN_0201B8E0
|
||||
bl MsgArray_GetControlCode
|
||||
lsl r0, r0, #0x10
|
||||
ldr r1, _02002670 ; =0x0000FE06
|
||||
lsr r0, r0, #0x10
|
||||
@@ -255,7 +255,7 @@ _0200255E:
|
||||
_02002566:
|
||||
ldr r0, [r4, #0x0]
|
||||
mov r1, #0x0
|
||||
bl FUN_0201B914
|
||||
bl MsgArray_ControlCodeGetField
|
||||
lsl r0, r0, #0x10
|
||||
lsr r0, r0, #0x10
|
||||
cmp r0, #0xff
|
||||
@@ -295,7 +295,7 @@ _0200259E:
|
||||
_020025B4:
|
||||
ldr r0, [r4, #0x0]
|
||||
mov r1, #0x0
|
||||
bl FUN_0201B914
|
||||
bl MsgArray_ControlCodeGetField
|
||||
lsl r0, r0, #0x10
|
||||
lsr r3, r0, #0x10
|
||||
ldrb r1, [r4, #0xc]
|
||||
@@ -314,12 +314,12 @@ _020025B4:
|
||||
_020025DE:
|
||||
ldr r0, [r4, #0x0]
|
||||
mov r1, #0x0
|
||||
bl FUN_0201B914
|
||||
bl MsgArray_ControlCodeGetField
|
||||
add r1, r4, #0x0
|
||||
add r1, #0x26
|
||||
strb r0, [r1, #0x0]
|
||||
ldr r0, [r4, #0x0]
|
||||
bl FUN_0201B8B8
|
||||
bl MsgArray_SkipControlCode
|
||||
str r0, [r4, #0x0]
|
||||
mov r0, #0x6
|
||||
add r4, #0x24
|
||||
@@ -330,10 +330,10 @@ _020025DE:
|
||||
_02002600:
|
||||
ldr r0, [r4, #0x0]
|
||||
mov r1, #0x0
|
||||
bl FUN_0201B914
|
||||
bl MsgArray_ControlCodeGetField
|
||||
strh r0, [r4, #0x2a]
|
||||
ldr r0, [r4, #0x0]
|
||||
bl FUN_0201B8B8
|
||||
bl MsgArray_SkipControlCode
|
||||
str r0, [r4, #0x0]
|
||||
add sp, #0xc
|
||||
mov r0, #0x3
|
||||
@@ -341,19 +341,19 @@ _02002600:
|
||||
_02002618:
|
||||
ldr r0, [r4, #0x0]
|
||||
mov r1, #0x0
|
||||
bl FUN_0201B914
|
||||
bl MsgArray_ControlCodeGetField
|
||||
strb r0, [r4, #0xc]
|
||||
b _020026CA
|
||||
_02002624:
|
||||
ldr r0, [r4, #0x0]
|
||||
mov r1, #0x0
|
||||
bl FUN_0201B914
|
||||
bl MsgArray_ControlCodeGetField
|
||||
strb r0, [r4, #0xd]
|
||||
b _020026CA
|
||||
_02002630:
|
||||
ldr r0, [r4, #0x0]
|
||||
mov r1, #0x0
|
||||
bl FUN_0201B914
|
||||
bl MsgArray_ControlCodeGetField
|
||||
lsl r0, r0, #0x10
|
||||
lsr r0, r0, #0x10
|
||||
cmp r0, #0x64
|
||||
@@ -385,7 +385,7 @@ _02002674: .word 0x0000FFFC
|
||||
_02002678:
|
||||
ldr r0, [r4, #0x0]
|
||||
mov r1, #0x0
|
||||
bl FUN_0201B914
|
||||
bl MsgArray_ControlCodeGetField
|
||||
lsl r0, r0, #0x10
|
||||
lsr r1, r0, #0x10
|
||||
mov r0, #0xfe
|
||||
@@ -402,7 +402,7 @@ _02002678:
|
||||
add r0, r4, #0x0
|
||||
bl FUN_0200284C
|
||||
ldr r0, [r4, #0x0]
|
||||
bl FUN_0201B8B8
|
||||
bl MsgArray_SkipControlCode
|
||||
str r0, [r4, #0x0]
|
||||
add sp, #0xc
|
||||
mov r0, #0x3
|
||||
@@ -415,14 +415,14 @@ _020026AE:
|
||||
add r0, r4, #0x0
|
||||
bl FUN_0200284C
|
||||
ldr r0, [r4, #0x0]
|
||||
bl FUN_0201B8B8
|
||||
bl MsgArray_SkipControlCode
|
||||
str r0, [r4, #0x0]
|
||||
add sp, #0xc
|
||||
mov r0, #0x3
|
||||
pop {r3-r6, pc}
|
||||
_020026CA:
|
||||
ldr r0, [r4, #0x0]
|
||||
bl FUN_0201B8B8
|
||||
bl MsgArray_SkipControlCode
|
||||
str r0, [r4, #0x0]
|
||||
add sp, #0xc
|
||||
mov r0, #0x2
|
||||
|
||||
@@ -64,7 +64,7 @@ FUN_02002F58: ; 0x02002F58
|
||||
_02002F6C:
|
||||
cmp r2, r4
|
||||
bne _02002F76
|
||||
bl FUN_0201B8B8
|
||||
bl MsgArray_SkipControlCode
|
||||
b _02002F82
|
||||
_02002F76:
|
||||
cmp r2, r6
|
||||
@@ -113,7 +113,7 @@ _02002FB4:
|
||||
add r0, r0, r4
|
||||
add r0, #0x94
|
||||
ldr r0, [r0, #0x0]
|
||||
bl StringGetWidthNoSpacing
|
||||
bl StringGetWidth_SingleLine_HandleClearToControlCode
|
||||
pop {r3-r5, pc}
|
||||
.balign 4
|
||||
_02002FCC: .word UNK_02106FC8
|
||||
|
||||
@@ -1738,12 +1738,12 @@ _0200B7D4:
|
||||
cmp r1, r0
|
||||
bne _0200B82E
|
||||
add r0, r5, #0x0
|
||||
bl FUN_0201B8F8
|
||||
bl MsgArray_ControlCodeIsStrVar
|
||||
cmp r0, #0x0
|
||||
beq _0200B810
|
||||
add r0, r5, #0x0
|
||||
mov r1, #0x0
|
||||
bl FUN_0201B914
|
||||
bl MsgArray_ControlCodeGetField
|
||||
add r4, r0, #0x0
|
||||
ldr r0, [r7, #0x0]
|
||||
cmp r4, r0
|
||||
@@ -1757,13 +1757,13 @@ _0200B7F8:
|
||||
add r0, r6, #0x0
|
||||
bl FUN_02022048
|
||||
add r0, r5, #0x0
|
||||
bl FUN_0201B8B8
|
||||
bl MsgArray_SkipControlCode
|
||||
add r5, r0, #0x0
|
||||
b _0200B838
|
||||
_0200B810:
|
||||
add r0, r5, #0x0
|
||||
add r4, r5, #0x0
|
||||
bl FUN_0201B8B8
|
||||
bl MsgArray_SkipControlCode
|
||||
add r5, r0, #0x0
|
||||
cmp r4, r5
|
||||
bhs _0200B838
|
||||
|
||||
@@ -274,13 +274,13 @@ _020138E2:
|
||||
cmp r1, r6
|
||||
bne _020138FC
|
||||
add r0, r4, #0x0
|
||||
bl FUN_0201B8F8
|
||||
bl MsgArray_ControlCodeIsStrVar
|
||||
cmp r0, #0x0
|
||||
beq _020138F2
|
||||
add r5, r5, #0x1
|
||||
_020138F2:
|
||||
add r0, r4, #0x0
|
||||
bl FUN_0201B8B8
|
||||
bl MsgArray_SkipControlCode
|
||||
add r4, r0, #0x0
|
||||
b _020138FE
|
||||
_020138FC:
|
||||
|
||||
@@ -474,7 +474,7 @@ _020218EA:
|
||||
cmp r1, r0
|
||||
bne _02021900
|
||||
add r0, r4, #0x0
|
||||
bl FUN_0201B8B8
|
||||
bl MsgArray_SkipControlCode
|
||||
add r4, r0, #0x0
|
||||
ldrh r1, [r4, #0x0]
|
||||
ldr r0, _0202191C ; =0x0000FFFF
|
||||
|
||||
@@ -1140,10 +1140,10 @@
|
||||
.extern FUN_0201B6D0
|
||||
.extern FUN_0201B76C
|
||||
.extern FUN_0201B7DC
|
||||
.extern FUN_0201B8B8
|
||||
.extern FUN_0201B8E0
|
||||
.extern FUN_0201B8F8
|
||||
.extern FUN_0201B914
|
||||
.extern MsgArray_SkipControlCode
|
||||
.extern MsgArray_GetControlCode
|
||||
.extern MsgArray_ControlCodeIsStrVar
|
||||
.extern MsgArray_ControlCodeGetField
|
||||
.extern Sin
|
||||
.extern Cos
|
||||
.extern Sin_Wrap
|
||||
@@ -1388,7 +1388,7 @@
|
||||
.extern FUN_02021750
|
||||
.extern FUN_020218D8
|
||||
.extern StringGetWidth
|
||||
.extern StringGetWidthNoSpacing
|
||||
.extern StringGetWidth_SingleLine_HandleClearToControlCode
|
||||
.extern String_ctor
|
||||
.extern String_dtor
|
||||
.extern StringSetEmpty
|
||||
@@ -8399,3 +8399,4 @@
|
||||
.extern MOD06_0224CB54
|
||||
.extern gSineTable
|
||||
.extern CARDi_IdentifyBackupCore
|
||||
.extern CARDi_InitCommon
|
||||
|
||||
@@ -5046,7 +5046,7 @@ _021D9B9C:
|
||||
pop {r3, r4, r5, r6, r7, pc}
|
||||
_021D9BB6:
|
||||
mov r0, ip
|
||||
bl FUN_0201B8B8
|
||||
bl MsgArray_SkipControlCode
|
||||
str r0, [r4, #4]
|
||||
mov r0, #1
|
||||
b _021D9BD0
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
#include "global.h"
|
||||
#include "unk_0201B8B88.h"
|
||||
#include "unk_0201B8B8.h"
|
||||
|
||||
#pragma thumb on
|
||||
|
||||
const u16 * FUN_0201B8B8(const u16 * r4)
|
||||
const u16 * MsgArray_SkipControlCode(const u16 * r4)
|
||||
{
|
||||
GF_ASSERT(*r4 == 0xFFFE);
|
||||
if (*r4 == 0xFFFE) {
|
||||
@@ -14,18 +14,18 @@ const u16 * FUN_0201B8B8(const u16 * r4)
|
||||
return r4;
|
||||
}
|
||||
|
||||
u16 FUN_0201B8E0(const u16 * r4)
|
||||
u16 MsgArray_GetControlCode(const u16 * r4)
|
||||
{
|
||||
GF_ASSERT(*r4 == 0xFFFE);
|
||||
return r4[1];
|
||||
}
|
||||
|
||||
BOOL FUN_0201B8F8(const u16 * r4)
|
||||
BOOL MsgArray_ControlCodeIsStrVar(const u16 * r4)
|
||||
{
|
||||
return (FUN_0201B8E0(r4) & 0xFF00) == 0x100;
|
||||
return (MsgArray_GetControlCode(r4) & 0xFF00) == 0x100;
|
||||
}
|
||||
|
||||
u16 FUN_0201B914(const u16 * r5, u32 r4)
|
||||
u16 MsgArray_ControlCodeGetField(const u16 * r5, u32 r4)
|
||||
{
|
||||
GF_ASSERT(*r5 == 0xFFFE);
|
||||
GF_ASSERT(r4 < r5[2]);
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#include "string16.h"
|
||||
#include "heap.h"
|
||||
#include "string_util.h"
|
||||
#include "unk_0201B8B88.h"
|
||||
#include "unk_0201B8B8.h"
|
||||
|
||||
#pragma thumb on
|
||||
|
||||
@@ -18,9 +18,9 @@ int StringGetWidth(struct UnkStruct_0202199C * r7, const u16 * arr, u32 r6)
|
||||
{
|
||||
if (*arr == 0xFFFE)
|
||||
{
|
||||
arr = FUN_0201B8B8(arr);
|
||||
arr = MsgArray_SkipControlCode(arr);
|
||||
}
|
||||
else if (*arr == 0xE000)
|
||||
else if (*arr == 0xE000) // newline
|
||||
{
|
||||
if (ret < r4 - r6)
|
||||
ret = (int)(r4 - r6);
|
||||
@@ -38,18 +38,18 @@ int StringGetWidth(struct UnkStruct_0202199C * r7, const u16 * arr, u32 r6)
|
||||
return ret;
|
||||
}
|
||||
|
||||
int StringGetWidthNoSpacing(struct UnkStruct_0202199C * r6, const u16 * arr)
|
||||
int StringGetWidth_SingleLine_HandleClearToControlCode(struct UnkStruct_0202199C * r6, const u16 * arr)
|
||||
{
|
||||
int ret = 0;
|
||||
while (*arr != 0xFFFF)
|
||||
{
|
||||
if (*arr == 0xFFFE)
|
||||
{
|
||||
if (FUN_0201B8E0(arr) == 0x0203)
|
||||
if (MsgArray_GetControlCode(arr) == 515)
|
||||
{
|
||||
ret = FUN_0201B914(arr, 0) - 12;
|
||||
ret = MsgArray_ControlCodeGetField(arr, 0) - 12;
|
||||
}
|
||||
arr = FUN_0201B8B8(arr);
|
||||
arr = MsgArray_SkipControlCode(arr);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -109,17 +109,17 @@ struct String * StringDup(struct String * src, u32 heap_id)
|
||||
return dest;
|
||||
}
|
||||
|
||||
const u16 UNK_020EE67C[10] = {
|
||||
static const u16 sCharset_JP[10] = {
|
||||
0xA2, 0xA3, 0xA4, 0xA5, 0xA6,
|
||||
0xA7, 0xA8, 0xA9, 0xAA, 0xAB
|
||||
};
|
||||
|
||||
const u16 UNK_020EE690[10] = {
|
||||
static const u16 sCharset_EN[10] = {
|
||||
0x121, 0x122, 0x123, 0x124, 0x125,
|
||||
0x126, 0x127, 0x128, 0x129, 0x12A
|
||||
};
|
||||
|
||||
const u32 UNK_020EE6A4[10] = {
|
||||
static const u32 sPowersOfTen[10] = {
|
||||
1,
|
||||
10,
|
||||
100,
|
||||
@@ -141,7 +141,7 @@ void String16_FormatInteger(struct String * str, int num, u32 ndigits, int strCo
|
||||
|
||||
if (str->maxsize > ndigits + isNegative)
|
||||
{
|
||||
charbase = (whichCharset == 0) ? UNK_020EE67C : UNK_020EE690;
|
||||
charbase = (whichCharset == 0) ? sCharset_JP : sCharset_EN;
|
||||
StringSetEmpty(str);
|
||||
if (isNegative)
|
||||
{
|
||||
@@ -149,7 +149,7 @@ void String16_FormatInteger(struct String * str, int num, u32 ndigits, int strCo
|
||||
u16 hyphen = (u16)((whichCharset == 0) ? 0x00F1 : 0x01BE);
|
||||
str->data[str->size++] = hyphen;
|
||||
}
|
||||
u32 dividend = UNK_020EE6A4[ndigits - 1];
|
||||
u32 dividend = sPowersOfTen[ndigits - 1];
|
||||
while (dividend != 0)
|
||||
{
|
||||
u16 digit = (u16)(num / dividend);
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
#ifndef POKEDIAMOND_STRING16_H
|
||||
#define POKEDIAMOND_STRING16_H
|
||||
|
||||
#include "string_util.h"
|
||||
|
||||
struct String
|
||||
{
|
||||
u16 maxsize;
|
||||
@@ -24,7 +26,7 @@ void CopyU16ArrayToStringN(struct String *, u16 *, u32); // copy
|
||||
void StringSetEmpty(struct String *); // set empty
|
||||
struct String * StringDup(struct String *, u32 heap_id);
|
||||
int StringGetWidth(struct UnkStruct_0202199C * r7, const u16 * arr, u32 r6);
|
||||
int StringGetWidthNoSpacing(struct UnkStruct_0202199C * r6, const u16 * arr);
|
||||
int StringGetWidth_SingleLine_HandleClearToControlCode(struct UnkStruct_0202199C * r6, const u16 * arr);
|
||||
void String_dtor(struct String * str);
|
||||
void StringCopy(struct String * dest, struct String * src);
|
||||
void String16_FormatInteger(struct String * str, int num, u32 ndigits, int strConvMode, BOOL whichCharset);
|
||||
|
||||
9
include/unk_0201B8B8.h
Normal file
9
include/unk_0201B8B8.h
Normal file
@@ -0,0 +1,9 @@
|
||||
#ifndef POKEDIAMOND_UNK_0201B8B88_H
|
||||
#define POKEDIAMOND_UNK_0201B8B88_H
|
||||
|
||||
const u16 * MsgArray_SkipControlCode(const u16 * r4);
|
||||
u16 MsgArray_GetControlCode(const u16 * r4);
|
||||
BOOL MsgArray_ControlCodeIsStrVar(const u16 * r4);
|
||||
u16 MsgArray_ControlCodeGetField(const u16 * r5, u32 r4);
|
||||
|
||||
#endif //POKEDIAMOND_UNK_0201B8B88_H
|
||||
@@ -1,9 +0,0 @@
|
||||
#ifndef POKEDIAMOND_UNK_0201B8B88_H
|
||||
#define POKEDIAMOND_UNK_0201B8B88_H
|
||||
|
||||
const u16 * FUN_0201B8B8(const u16 * r4);
|
||||
u16 FUN_0201B8E0(const u16 * r4);
|
||||
BOOL FUN_0201B8F8(const u16 * r4);
|
||||
u16 FUN_0201B914(const u16 * r5, u32 r4);
|
||||
|
||||
#endif //POKEDIAMOND_UNK_0201B8B88_H
|
||||
Reference in New Issue
Block a user