through sub_810491C
This commit is contained in:
@@ -5,285 +5,6 @@
|
|||||||
|
|
||||||
.text
|
.text
|
||||||
|
|
||||||
thumb_func_start sub_81047B0
|
|
||||||
sub_81047B0: @ 81047B0
|
|
||||||
push {r4,lr}
|
|
||||||
adds r4, r0, 0
|
|
||||||
ldrb r0, [r4]
|
|
||||||
cmp r0, 0xFF
|
|
||||||
beq _081047C2
|
|
||||||
bl RemoveWindow
|
|
||||||
movs r0, 0xFF
|
|
||||||
strb r0, [r4]
|
|
||||||
_081047C2:
|
|
||||||
pop {r4}
|
|
||||||
pop {r0}
|
|
||||||
bx r0
|
|
||||||
thumb_func_end sub_81047B0
|
|
||||||
|
|
||||||
thumb_func_start sub_81047C8
|
|
||||||
sub_81047C8: @ 81047C8
|
|
||||||
push {r4-r7,lr}
|
|
||||||
sub sp, 0x18
|
|
||||||
mov r12, r2
|
|
||||||
ldr r2, [sp, 0x2C]
|
|
||||||
ldr r4, [sp, 0x30]
|
|
||||||
lsls r0, 24
|
|
||||||
lsrs r7, r0, 24
|
|
||||||
lsls r1, 24
|
|
||||||
lsrs r5, r1, 24
|
|
||||||
lsls r3, 24
|
|
||||||
lsrs r6, r3, 24
|
|
||||||
lsls r2, 24
|
|
||||||
lsrs r3, r2, 24
|
|
||||||
lsls r4, 24
|
|
||||||
lsrs r0, r4, 24
|
|
||||||
cmp r0, 0x4
|
|
||||||
bhi _08104852
|
|
||||||
lsls r0, 2
|
|
||||||
ldr r1, _081047F4 @ =_081047F8
|
|
||||||
adds r0, r1
|
|
||||||
ldr r0, [r0]
|
|
||||||
mov pc, r0
|
|
||||||
.align 2, 0
|
|
||||||
_081047F4: .4byte _081047F8
|
|
||||||
.align 2, 0
|
|
||||||
_081047F8:
|
|
||||||
.4byte _0810480C
|
|
||||||
.4byte _0810481A
|
|
||||||
.4byte _08104828
|
|
||||||
.4byte _08104836
|
|
||||||
.4byte _08104844
|
|
||||||
_0810480C:
|
|
||||||
add r1, sp, 0x14
|
|
||||||
movs r0, 0
|
|
||||||
strb r0, [r1]
|
|
||||||
movs r0, 0x1
|
|
||||||
strb r0, [r1, 0x1]
|
|
||||||
movs r0, 0x3
|
|
||||||
b _08104850
|
|
||||||
_0810481A:
|
|
||||||
add r1, sp, 0x14
|
|
||||||
movs r0, 0
|
|
||||||
strb r0, [r1]
|
|
||||||
movs r0, 0x5
|
|
||||||
strb r0, [r1, 0x1]
|
|
||||||
movs r0, 0x1
|
|
||||||
b _08104850
|
|
||||||
_08104828:
|
|
||||||
add r1, sp, 0x14
|
|
||||||
movs r0, 0
|
|
||||||
strb r0, [r1]
|
|
||||||
movs r0, 0xF
|
|
||||||
strb r0, [r1, 0x1]
|
|
||||||
movs r0, 0xE
|
|
||||||
b _08104850
|
|
||||||
_08104836:
|
|
||||||
add r1, sp, 0x14
|
|
||||||
movs r0, 0
|
|
||||||
strb r0, [r1]
|
|
||||||
movs r0, 0xB
|
|
||||||
strb r0, [r1, 0x1]
|
|
||||||
movs r0, 0x1
|
|
||||||
b _08104850
|
|
||||||
_08104844:
|
|
||||||
add r1, sp, 0x14
|
|
||||||
movs r0, 0
|
|
||||||
strb r0, [r1]
|
|
||||||
movs r0, 0x1
|
|
||||||
strb r0, [r1, 0x1]
|
|
||||||
movs r0, 0x2
|
|
||||||
_08104850:
|
|
||||||
strb r0, [r1, 0x2]
|
|
||||||
_08104852:
|
|
||||||
negs r0, r5
|
|
||||||
orrs r0, r5
|
|
||||||
lsrs r0, 31
|
|
||||||
str r0, [sp]
|
|
||||||
movs r0, 0
|
|
||||||
str r0, [sp, 0x4]
|
|
||||||
add r0, sp, 0x14
|
|
||||||
str r0, [sp, 0x8]
|
|
||||||
movs r0, 0x1
|
|
||||||
negs r0, r0
|
|
||||||
str r0, [sp, 0xC]
|
|
||||||
mov r0, r12
|
|
||||||
str r0, [sp, 0x10]
|
|
||||||
adds r0, r7, 0
|
|
||||||
adds r1, r5, 0
|
|
||||||
adds r2, r6, 0
|
|
||||||
bl AddTextPrinterParameterized4
|
|
||||||
add sp, 0x18
|
|
||||||
pop {r4-r7}
|
|
||||||
pop {r0}
|
|
||||||
bx r0
|
|
||||||
thumb_func_end sub_81047C8
|
|
||||||
|
|
||||||
thumb_func_start sub_8104880
|
|
||||||
sub_8104880: @ 8104880
|
|
||||||
push {r4-r7,lr}
|
|
||||||
mov r7, r10
|
|
||||||
mov r6, r9
|
|
||||||
mov r5, r8
|
|
||||||
push {r5-r7}
|
|
||||||
sub sp, 0xC
|
|
||||||
mov r9, r0
|
|
||||||
mov r10, r1
|
|
||||||
adds r4, r2, 0
|
|
||||||
ldr r6, [sp, 0x2C]
|
|
||||||
ldr r0, [sp, 0x30]
|
|
||||||
mov r8, r0
|
|
||||||
mov r0, r9
|
|
||||||
lsls r0, 24
|
|
||||||
lsrs r0, 24
|
|
||||||
mov r9, r0
|
|
||||||
mov r0, r10
|
|
||||||
lsls r0, 24
|
|
||||||
lsrs r0, 24
|
|
||||||
mov r10, r0
|
|
||||||
lsls r4, 16
|
|
||||||
lsrs r4, 16
|
|
||||||
lsls r3, 24
|
|
||||||
lsrs r7, r3, 24
|
|
||||||
lsls r6, 24
|
|
||||||
lsrs r6, 24
|
|
||||||
mov r0, r8
|
|
||||||
lsls r0, 24
|
|
||||||
lsrs r0, 24
|
|
||||||
mov r8, r0
|
|
||||||
add r5, sp, 0x8
|
|
||||||
adds r0, r4, 0
|
|
||||||
movs r1, 0x64
|
|
||||||
bl __udivsi3
|
|
||||||
adds r0, 0xA1
|
|
||||||
strb r0, [r5]
|
|
||||||
add r5, sp, 0x8
|
|
||||||
adds r0, r4, 0
|
|
||||||
movs r1, 0x64
|
|
||||||
bl __umodsi3
|
|
||||||
adds r4, r0, 0
|
|
||||||
lsls r4, 16
|
|
||||||
lsrs r4, 16
|
|
||||||
adds r0, r4, 0
|
|
||||||
movs r1, 0xA
|
|
||||||
bl __udivsi3
|
|
||||||
adds r0, 0xA1
|
|
||||||
strb r0, [r5, 0x1]
|
|
||||||
add r5, sp, 0x8
|
|
||||||
adds r0, r4, 0
|
|
||||||
movs r1, 0xA
|
|
||||||
bl __umodsi3
|
|
||||||
adds r0, 0xA1
|
|
||||||
strb r0, [r5, 0x2]
|
|
||||||
add r1, sp, 0x8
|
|
||||||
movs r0, 0xFF
|
|
||||||
strb r0, [r1, 0x3]
|
|
||||||
str r6, [sp]
|
|
||||||
mov r0, r8
|
|
||||||
str r0, [sp, 0x4]
|
|
||||||
mov r0, r9
|
|
||||||
mov r1, r10
|
|
||||||
add r2, sp, 0x8
|
|
||||||
adds r3, r7, 0
|
|
||||||
bl sub_81047C8
|
|
||||||
add sp, 0xC
|
|
||||||
pop {r3-r5}
|
|
||||||
mov r8, r3
|
|
||||||
mov r9, r4
|
|
||||||
mov r10, r5
|
|
||||||
pop {r4-r7}
|
|
||||||
pop {r0}
|
|
||||||
bx r0
|
|
||||||
thumb_func_end sub_8104880
|
|
||||||
|
|
||||||
thumb_func_start sub_810491C
|
|
||||||
sub_810491C: @ 810491C
|
|
||||||
push {r4-r7,lr}
|
|
||||||
mov r7, r10
|
|
||||||
mov r6, r9
|
|
||||||
mov r5, r8
|
|
||||||
push {r5-r7}
|
|
||||||
sub sp, 0x10
|
|
||||||
adds r5, r2, 0
|
|
||||||
ldr r2, [sp, 0x30]
|
|
||||||
ldr r4, [sp, 0x34]
|
|
||||||
lsls r0, 24
|
|
||||||
lsrs r0, 24
|
|
||||||
str r0, [sp, 0xC]
|
|
||||||
lsls r1, 24
|
|
||||||
lsrs r1, 24
|
|
||||||
mov r10, r1
|
|
||||||
lsls r5, 16
|
|
||||||
lsrs r5, 16
|
|
||||||
lsls r3, 24
|
|
||||||
lsrs r3, 24
|
|
||||||
mov r9, r3
|
|
||||||
lsls r2, 24
|
|
||||||
lsrs r2, 24
|
|
||||||
mov r8, r2
|
|
||||||
lsls r4, 24
|
|
||||||
lsrs r7, r4, 24
|
|
||||||
add r4, sp, 0x8
|
|
||||||
adds r0, r5, 0
|
|
||||||
movs r1, 0x64
|
|
||||||
bl __udivsi3
|
|
||||||
adds r0, 0xA1
|
|
||||||
strb r0, [r4]
|
|
||||||
add r6, sp, 0x8
|
|
||||||
adds r0, r5, 0
|
|
||||||
movs r1, 0x64
|
|
||||||
bl __umodsi3
|
|
||||||
adds r4, r0, 0
|
|
||||||
lsls r4, 16
|
|
||||||
lsrs r4, 16
|
|
||||||
adds r0, r4, 0
|
|
||||||
movs r1, 0xA
|
|
||||||
bl __udivsi3
|
|
||||||
adds r0, 0xA1
|
|
||||||
strb r0, [r6, 0x1]
|
|
||||||
add r5, sp, 0x8
|
|
||||||
adds r0, r4, 0
|
|
||||||
movs r1, 0xA
|
|
||||||
bl __umodsi3
|
|
||||||
adds r0, 0xA1
|
|
||||||
strb r0, [r5, 0x2]
|
|
||||||
add r1, sp, 0x8
|
|
||||||
movs r0, 0xFF
|
|
||||||
strb r0, [r1, 0x3]
|
|
||||||
adds r0, r1, 0
|
|
||||||
ldrb r0, [r0]
|
|
||||||
cmp r0, 0xA1
|
|
||||||
bne _081049A8
|
|
||||||
movs r3, 0
|
|
||||||
mov r2, sp
|
|
||||||
adds r2, 0xA
|
|
||||||
_0810499A:
|
|
||||||
strb r3, [r1]
|
|
||||||
adds r1, 0x1
|
|
||||||
cmp r1, r2
|
|
||||||
bgt _081049A8
|
|
||||||
ldrb r0, [r1]
|
|
||||||
cmp r0, 0xA1
|
|
||||||
beq _0810499A
|
|
||||||
_081049A8:
|
|
||||||
mov r0, r8
|
|
||||||
str r0, [sp]
|
|
||||||
str r7, [sp, 0x4]
|
|
||||||
ldr r0, [sp, 0xC]
|
|
||||||
mov r1, r10
|
|
||||||
add r2, sp, 0x8
|
|
||||||
mov r3, r9
|
|
||||||
bl sub_81047C8
|
|
||||||
add sp, 0x10
|
|
||||||
pop {r3-r5}
|
|
||||||
mov r8, r3
|
|
||||||
mov r9, r4
|
|
||||||
mov r10, r5
|
|
||||||
pop {r4-r7}
|
|
||||||
pop {r0}
|
|
||||||
bx r0
|
|
||||||
thumb_func_end sub_810491C
|
|
||||||
|
|
||||||
thumb_func_start sub_81049CC
|
thumb_func_start sub_81049CC
|
||||||
sub_81049CC: @ 81049CC
|
sub_81049CC: @ 81049CC
|
||||||
push {lr}
|
push {lr}
|
||||||
|
|||||||
+73
-3
@@ -96,9 +96,9 @@ u8 sub_8104234(void);
|
|||||||
int sub_8104284(void);
|
int sub_8104284(void);
|
||||||
void sub_81042EC(u8 taskId);
|
void sub_81042EC(u8 taskId);
|
||||||
bool32 sub_8104664(u8 a0);
|
bool32 sub_8104664(u8 a0);
|
||||||
void sub_81047B0(u8 *a0);
|
void sub_81047B0(u8 *windowId_p);
|
||||||
void sub_81047C8(u8 a0, u8 a1, const u8 *a2, u8 a3, u8 a4, u8 a5);
|
void sub_81047C8(u8 windowId, u8 fontId, const u8 *str, u8 x, u8 y, u8 colorIdx);
|
||||||
void sub_810491C(u8 a0, u8 a1, u16 a2, u8 a3, u8 a4, u8 a5);
|
void sub_810491C(u8 windowId, u8 fontId, u16 num, u8 x, u8 y, u8 colorIdx);
|
||||||
void sub_8104A34(u8 windowId, u8 a1, u16 species, u8 a3, u8 y);
|
void sub_8104A34(u8 windowId, u8 a1, u16 species, u8 a3, u8 y);
|
||||||
u16 sub_8104BBC(u8 a0, u8 a1);
|
u16 sub_8104BBC(u8 a0, u8 a1);
|
||||||
void sub_8104C2C(const u8 *a0);
|
void sub_8104C2C(const u8 *a0);
|
||||||
@@ -1594,3 +1594,73 @@ bool32 sub_8104664(u8 a0)
|
|||||||
"\tbx r1");
|
"\tbx r1");
|
||||||
}
|
}
|
||||||
#endif //NONMATCHING
|
#endif //NONMATCHING
|
||||||
|
|
||||||
|
void sub_81047B0(u8 *windowId_p)
|
||||||
|
{
|
||||||
|
if (*windowId_p != 0xFF)
|
||||||
|
{
|
||||||
|
RemoveWindow(*windowId_p);
|
||||||
|
*windowId_p = 0xFF;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void sub_81047C8(u8 windowId, u8 fontId, const u8 *str, u8 x, u8 y, u8 colorIdx)
|
||||||
|
{
|
||||||
|
u8 textColor[3];
|
||||||
|
switch (colorIdx)
|
||||||
|
{
|
||||||
|
case 0:
|
||||||
|
textColor[0] = 0;
|
||||||
|
textColor[1] = 1;
|
||||||
|
textColor[2] = 3;
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
textColor[0] = 0;
|
||||||
|
textColor[1] = 5;
|
||||||
|
textColor[2] = 1;
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
textColor[0] = 0;
|
||||||
|
textColor[1] = 15;
|
||||||
|
textColor[2] = 14;
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
textColor[0] = 0;
|
||||||
|
textColor[1] = 11;
|
||||||
|
textColor[2] = 1;
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
textColor[0] = 0;
|
||||||
|
textColor[1] = 1;
|
||||||
|
textColor[2] = 2;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
AddTextPrinterParameterized4(windowId, fontId, x, y, fontId == 0 ? 0 : 1, 0, textColor, -1, str);
|
||||||
|
}
|
||||||
|
|
||||||
|
void sub_8104880(u8 windowId, u8 fontId, u16 num, u8 x, u8 y, u8 colorIdx)
|
||||||
|
{
|
||||||
|
u8 buff[4];
|
||||||
|
buff[0] = (num / 100) + CHAR_0;
|
||||||
|
buff[1] = ((num %= 100) / 10) + CHAR_0;
|
||||||
|
buff[2] = (num % 10) + CHAR_0;
|
||||||
|
buff[3] = EOS;
|
||||||
|
sub_81047C8(windowId, fontId, buff, x, y, colorIdx);
|
||||||
|
}
|
||||||
|
|
||||||
|
void sub_810491C(u8 windowId, u8 fontId, u16 num, u8 x, u8 y, u8 colorIdx)
|
||||||
|
{
|
||||||
|
u8 buff[4];
|
||||||
|
int i;
|
||||||
|
buff[0] = (num / 100) + CHAR_0;
|
||||||
|
buff[1] = ((num %= 100) / 10) + CHAR_0;
|
||||||
|
buff[2] = (num % 10) + CHAR_0;
|
||||||
|
buff[3] = EOS;
|
||||||
|
for (i = 0; i < 3; i++)
|
||||||
|
{
|
||||||
|
if (buff[i] != CHAR_0)
|
||||||
|
break;
|
||||||
|
buff[i] = CHAR_SPACE;
|
||||||
|
}
|
||||||
|
sub_81047C8(windowId, fontId, buff, x, y, colorIdx);
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user