mirror of
https://github.com/pmret/papermario.git
synced 2024-11-18 17:02:46 +01:00
191 lines
8.8 KiB
ArmAsm
191 lines
8.8 KiB
ArmAsm
.set noat # allow manual use of $at
|
|
.set noreorder # don't insert nops after branches
|
|
|
|
.include "include/macro.inc"
|
|
|
|
glabel func_80045D00
|
|
/* 021100 80045D00 27BDFFE0 */ addiu $sp, $sp, -0x20
|
|
/* 021104 80045D04 AFB00010 */ sw $s0, 0x10($sp)
|
|
/* 021108 80045D08 0080802D */ daddu $s0, $a0, $zero
|
|
/* 02110C 80045D0C AFB10014 */ sw $s1, 0x14($sp)
|
|
/* 021110 80045D10 AFBF0018 */ sw $ra, 0x18($sp)
|
|
/* 021114 80045D14 0C011722 */ jal func_80045C88
|
|
/* 021118 80045D18 00A0882D */ daddu $s1, $a1, $zero
|
|
/* 02111C 80045D1C 0040182D */ daddu $v1, $v0, $zero
|
|
/* 021120 80045D20 10600011 */ beqz $v1, .L80045D68
|
|
/* 021124 80045D24 00000000 */ nop
|
|
/* 021128 80045D28 3C028004 */ lui $v0, 0x8004
|
|
/* 02112C 80045D2C 24425D7C */ addiu $v0, $v0, 0x5d7c
|
|
/* 021130 80045D30 AC620004 */ sw $v0, 4($v1)
|
|
/* 021134 80045D34 3C028004 */ lui $v0, 0x8004
|
|
/* 021138 80045D38 24425ED0 */ addiu $v0, $v0, 0x5ed0
|
|
/* 02113C 80045D3C AC62000C */ sw $v0, 0xc($v1)
|
|
/* 021140 80045D40 24020001 */ addiu $v0, $zero, 1
|
|
/* 021144 80045D44 A0620017 */ sb $v0, 0x17($v1)
|
|
/* 021148 80045D48 24020001 */ addiu $v0, $zero, 1
|
|
/* 02114C 80045D4C AC600000 */ sw $zero, ($v1)
|
|
/* 021150 80045D50 AC600008 */ sw $zero, 8($v1)
|
|
/* 021154 80045D54 A4700012 */ sh $s0, 0x12($v1)
|
|
/* 021158 80045D58 A4710014 */ sh $s1, 0x14($v1)
|
|
/* 02115C 80045D5C A0600016 */ sb $zero, 0x16($v1)
|
|
/* 021160 80045D60 3C01800A */ lui $at, 0x800a
|
|
/* 021164 80045D64 AC220F40 */ sw $v0, 0xf40($at)
|
|
.L80045D68:
|
|
/* 021168 80045D68 8FBF0018 */ lw $ra, 0x18($sp)
|
|
/* 02116C 80045D6C 8FB10014 */ lw $s1, 0x14($sp)
|
|
/* 021170 80045D70 8FB00010 */ lw $s0, 0x10($sp)
|
|
/* 021174 80045D74 03E00008 */ jr $ra
|
|
/* 021178 80045D78 27BD0020 */ addiu $sp, $sp, 0x20
|
|
|
|
/* 02117C 80045D7C 27BDFFE8 */ addiu $sp, $sp, -0x18
|
|
/* 021180 80045D80 AFB00010 */ sw $s0, 0x10($sp)
|
|
/* 021184 80045D84 0080802D */ daddu $s0, $a0, $zero
|
|
/* 021188 80045D88 AFBF0014 */ sw $ra, 0x14($sp)
|
|
/* 02118C 80045D8C 82030016 */ lb $v1, 0x16($s0)
|
|
/* 021190 80045D90 2C620005 */ sltiu $v0, $v1, 5
|
|
/* 021194 80045D94 10400020 */ beqz $v0, .L80045E18
|
|
/* 021198 80045D98 0000202D */ daddu $a0, $zero, $zero
|
|
/* 02119C 80045D9C 00031080 */ sll $v0, $v1, 2
|
|
/* 0211A0 80045DA0 3C01800A */ lui $at, 0x800a
|
|
/* 0211A4 80045DA4 00220821 */ addu $at, $at, $v0
|
|
/* 0211A8 80045DA8 8C2286B0 */ lw $v0, -0x7950($at)
|
|
/* 0211AC 80045DAC 00400008 */ jr $v0
|
|
/* 0211B0 80045DB0 00000000 */ nop
|
|
/* 0211B4 80045DB4 24020001 */ addiu $v0, $zero, 1
|
|
/* 0211B8 80045DB8 08011786 */ j .L80045E18
|
|
/* 0211BC 80045DBC A2020016 */ sb $v0, 0x16($s0)
|
|
|
|
/* 0211C0 80045DC0 24020002 */ addiu $v0, $zero, 2
|
|
/* 0211C4 80045DC4 08011786 */ j .L80045E18
|
|
/* 0211C8 80045DC8 A2020016 */ sb $v0, 0x16($s0)
|
|
|
|
/* 0211CC 80045DCC 3C028007 */ lui $v0, 0x8007
|
|
/* 0211D0 80045DD0 8C42419C */ lw $v0, 0x419c($v0)
|
|
/* 0211D4 80045DD4 8C420010 */ lw $v0, 0x10($v0)
|
|
/* 0211D8 80045DD8 3042C000 */ andi $v0, $v0, 0xc000
|
|
/* 0211DC 80045DDC 54400001 */ bnel $v0, $zero, .L80045DE4
|
|
/* 0211E0 80045DE0 A6000014 */ sh $zero, 0x14($s0)
|
|
.L80045DE4:
|
|
/* 0211E4 80045DE4 86020014 */ lh $v0, 0x14($s0)
|
|
/* 0211E8 80045DE8 96030014 */ lhu $v1, 0x14($s0)
|
|
/* 0211EC 80045DEC 10400003 */ beqz $v0, .L80045DFC
|
|
/* 0211F0 80045DF0 2462FFFF */ addiu $v0, $v1, -1
|
|
/* 0211F4 80045DF4 08011786 */ j .L80045E18
|
|
/* 0211F8 80045DF8 A6020014 */ sh $v0, 0x14($s0)
|
|
|
|
.L80045DFC:
|
|
/* 0211FC 80045DFC 24020003 */ addiu $v0, $zero, 3
|
|
/* 021200 80045E00 08011786 */ j .L80045E18
|
|
/* 021204 80045E04 A2020016 */ sb $v0, 0x16($s0)
|
|
|
|
/* 021208 80045E08 24020004 */ addiu $v0, $zero, 4
|
|
/* 02120C 80045E0C 08011786 */ j .L80045E18
|
|
/* 021210 80045E10 A2020016 */ sb $v0, 0x16($s0)
|
|
|
|
/* 021214 80045E14 24040001 */ addiu $a0, $zero, 1
|
|
.L80045E18:
|
|
/* 021218 80045E18 10800008 */ beqz $a0, .L80045E3C
|
|
/* 02121C 80045E1C 00000000 */ nop
|
|
/* 021220 80045E20 24040009 */ addiu $a0, $zero, 9
|
|
/* 021224 80045E24 0C051F9F */ jal func_80147E7C
|
|
/* 021228 80045E28 24050002 */ addiu $a1, $zero, 2
|
|
/* 02122C 80045E2C 3C01800A */ lui $at, 0x800a
|
|
/* 021230 80045E30 AC200F40 */ sw $zero, 0xf40($at)
|
|
/* 021234 80045E34 0C011731 */ jal func_80045CC4
|
|
/* 021238 80045E38 0200202D */ daddu $a0, $s0, $zero
|
|
.L80045E3C:
|
|
/* 02123C 80045E3C 8FBF0014 */ lw $ra, 0x14($sp)
|
|
/* 021240 80045E40 8FB00010 */ lw $s0, 0x10($sp)
|
|
/* 021244 80045E44 03E00008 */ jr $ra
|
|
/* 021248 80045E48 27BD0018 */ addiu $sp, $sp, 0x18
|
|
|
|
/* 02124C 80045E4C 27BDFFD8 */ addiu $sp, $sp, -0x28
|
|
/* 021250 80045E50 AFBF0024 */ sw $ra, 0x24($sp)
|
|
/* 021254 80045E54 AFB20020 */ sw $s2, 0x20($sp)
|
|
/* 021258 80045E58 AFB1001C */ sw $s1, 0x1c($sp)
|
|
/* 02125C 80045E5C AFB00018 */ sw $s0, 0x18($sp)
|
|
/* 021260 80045E60 84820012 */ lh $v0, 0x12($a0)
|
|
/* 021264 80045E64 24D00006 */ addiu $s0, $a2, 6
|
|
/* 021268 80045E68 00021080 */ sll $v0, $v0, 2
|
|
/* 02126C 80045E6C 3C128008 */ lui $s2, 0x8008
|
|
/* 021270 80045E70 02429021 */ addu $s2, $s2, $v0
|
|
/* 021274 80045E74 8E528168 */ lw $s2, -0x7e98($s2)
|
|
/* 021278 80045E78 24B1000F */ addiu $s1, $a1, 0xf
|
|
/* 02127C 80045E7C 0C04992C */ jal func_801264B0
|
|
/* 021280 80045E80 0240202D */ daddu $a0, $s2, $zero
|
|
/* 021284 80045E84 0240202D */ daddu $a0, $s2, $zero
|
|
/* 021288 80045E88 2442FFFF */ addiu $v0, $v0, -1
|
|
/* 02128C 80045E8C 00021040 */ sll $v0, $v0, 1
|
|
/* 021290 80045E90 3C068008 */ lui $a2, 0x8008
|
|
/* 021294 80045E94 00C23021 */ addu $a2, $a2, $v0
|
|
/* 021298 80045E98 84C68164 */ lh $a2, -0x7e9c($a2)
|
|
/* 02129C 80045E9C 2402000F */ addiu $v0, $zero, 0xf
|
|
/* 0212A0 80045EA0 0220282D */ daddu $a1, $s1, $zero
|
|
/* 0212A4 80045EA4 240700FF */ addiu $a3, $zero, 0xff
|
|
/* 0212A8 80045EA8 AFA20010 */ sw $v0, 0x10($sp)
|
|
/* 0212AC 80045EAC AFA00014 */ sw $zero, 0x14($sp)
|
|
/* 0212B0 80045EB0 0C04993B */ jal draw_string
|
|
/* 0212B4 80045EB4 02063021 */ addu $a2, $s0, $a2
|
|
/* 0212B8 80045EB8 8FBF0024 */ lw $ra, 0x24($sp)
|
|
/* 0212BC 80045EBC 8FB20020 */ lw $s2, 0x20($sp)
|
|
/* 0212C0 80045EC0 8FB1001C */ lw $s1, 0x1c($sp)
|
|
/* 0212C4 80045EC4 8FB00018 */ lw $s0, 0x18($sp)
|
|
/* 0212C8 80045EC8 03E00008 */ jr $ra
|
|
/* 0212CC 80045ECC 27BD0028 */ addiu $sp, $sp, 0x28
|
|
|
|
/* 0212D0 80045ED0 27BDFFC8 */ addiu $sp, $sp, -0x38
|
|
/* 0212D4 80045ED4 AFB20030 */ sw $s2, 0x30($sp)
|
|
/* 0212D8 80045ED8 0080902D */ daddu $s2, $a0, $zero
|
|
/* 0212DC 80045EDC AFBF0034 */ sw $ra, 0x34($sp)
|
|
/* 0212E0 80045EE0 AFB1002C */ sw $s1, 0x2c($sp)
|
|
/* 0212E4 80045EE4 AFB00028 */ sw $s0, 0x28($sp)
|
|
/* 0212E8 80045EE8 82420017 */ lb $v0, 0x17($s2)
|
|
/* 0212EC 80045EEC 10400027 */ beqz $v0, .L80045F8C
|
|
/* 0212F0 80045EF0 00000000 */ nop
|
|
/* 0212F4 80045EF4 86420012 */ lh $v0, 0x12($s2)
|
|
/* 0212F8 80045EF8 A2400017 */ sb $zero, 0x17($s2)
|
|
/* 0212FC 80045EFC 00021080 */ sll $v0, $v0, 2
|
|
/* 021300 80045F00 3C108008 */ lui $s0, 0x8008
|
|
/* 021304 80045F04 02028021 */ addu $s0, $s0, $v0
|
|
/* 021308 80045F08 8E108168 */ lw $s0, -0x7e98($s0)
|
|
/* 02130C 80045F0C 0000282D */ daddu $a1, $zero, $zero
|
|
/* 021310 80045F10 0C04991D */ jal get_string_width
|
|
/* 021314 80045F14 0200202D */ daddu $a0, $s0, $zero
|
|
/* 021318 80045F18 0200202D */ daddu $a0, $s0, $zero
|
|
/* 02131C 80045F1C 2451001E */ addiu $s1, $v0, 0x1e
|
|
/* 021320 80045F20 001117C2 */ srl $v0, $s1, 0x1f
|
|
/* 021324 80045F24 02221021 */ addu $v0, $s1, $v0
|
|
/* 021328 80045F28 00021043 */ sra $v0, $v0, 1
|
|
/* 02132C 80045F2C 241000A0 */ addiu $s0, $zero, 0xa0
|
|
/* 021330 80045F30 0C04992C */ jal func_801264B0
|
|
/* 021334 80045F34 02028023 */ subu $s0, $s0, $v0
|
|
/* 021338 80045F38 24040009 */ addiu $a0, $zero, 9
|
|
/* 02133C 80045F3C 2442FFFF */ addiu $v0, $v0, -1
|
|
/* 021340 80045F40 00021040 */ sll $v0, $v0, 1
|
|
/* 021344 80045F44 0200282D */ daddu $a1, $s0, $zero
|
|
/* 021348 80045F48 3C038008 */ lui $v1, 0x8008
|
|
/* 02134C 80045F4C 00621821 */ addu $v1, $v1, $v0
|
|
/* 021350 80045F50 84638160 */ lh $v1, -0x7ea0($v1)
|
|
/* 021354 80045F54 3C028004 */ lui $v0, 0x8004
|
|
/* 021358 80045F58 24425E4C */ addiu $v0, $v0, 0x5e4c
|
|
/* 02135C 80045F5C AFA20018 */ sw $v0, 0x18($sp)
|
|
/* 021360 80045F60 2402FFFF */ addiu $v0, $zero, -1
|
|
/* 021364 80045F64 24060050 */ addiu $a2, $zero, 0x50
|
|
/* 021368 80045F68 0220382D */ daddu $a3, $s1, $zero
|
|
/* 02136C 80045F6C AFA00014 */ sw $zero, 0x14($sp)
|
|
/* 021370 80045F70 AFB2001C */ sw $s2, 0x1c($sp)
|
|
/* 021374 80045F74 AFA20020 */ sw $v0, 0x20($sp)
|
|
/* 021378 80045F78 0C051F32 */ jal func_80147CC8
|
|
/* 02137C 80045F7C AFA30010 */ sw $v1, 0x10($sp)
|
|
/* 021380 80045F80 24040009 */ addiu $a0, $zero, 9
|
|
/* 021384 80045F84 0C051F9F */ jal func_80147E7C
|
|
/* 021388 80045F88 24050001 */ addiu $a1, $zero, 1
|
|
.L80045F8C:
|
|
/* 02138C 80045F8C 8FBF0034 */ lw $ra, 0x34($sp)
|
|
/* 021390 80045F90 8FB20030 */ lw $s2, 0x30($sp)
|
|
/* 021394 80045F94 8FB1002C */ lw $s1, 0x2c($sp)
|
|
/* 021398 80045F98 8FB00028 */ lw $s0, 0x28($sp)
|
|
/* 02139C 80045F9C 03E00008 */ jr $ra
|
|
/* 0213A0 80045FA0 27BD0038 */ addiu $sp, $sp, 0x38
|
|
|