Set Marlboro Spritesheet Change
Jump to navigation
Jump to search
00081c60: 27bdffe8 addiu r29,r29,-0x0018 00081c64: afbf0010 sw r31,0x0010(r29) 00081c68: 00804021 addu r8,r4,r0 # unit spritesheet 00081c6c: 340700ff ori r7,r0,0x00ff 00081c70: 00002821 addu r5,r0,r0 00081c74: 00042400 sll r4,r4,0x10 00081c78: 00042403 sra r4,r4,0x10 # input spritesheet 00081c7c: 00003021 addu r6,r0,r0 00081c80: 00c01821 addu r3,r6,r0 # 00081c84: 3c01800c lui r1,0x800c 00081c88: 00230821 addu r1,r1,r3 00081c8c: 90227ce9 lbu r2,0x7ce9(r1) # VRAM spritesheet data.1 (unit to queue?) 00081c90: 00000000 nop 00081c94: 10440023 beq r2,r4,0x00081d24 # branch if spritesheet here = input (used for marlboro, 0x92) success case 00081c98: 00000000 nop 00081c9c: 24a50001 addiu r5,r5,0x0001 00081ca0: 28a20009 slti r2,r5,0x0009 00081ca4: 1440fff6 bne r2,r0,0x00081c80 # loop for all 9 VRAM slots available 00081ca8: 246632d6 addiu r6,r3,0x32d6 # go to next 00081cac: 30e3ffff andi r3,r7,0xffff 00081cb0: 340200ff ori r2,r0,0x00ff 00081cb4: 1462000f bne r3,r2,0x00081cf4 # fail if sprites exist and they're not marlboro 00081cb8: 28a20009 slti r2,r5,0x0009 # 00081cbc: 00002821 addu r5,r0,r0 00081cc0: 00002021 addu r4,r0,r0 00081cc4: 00801821 addu r3,r4,r0 00081cc8: 3c01800c lui r1,0x800c 00081ccc: 00230821 addu r1,r1,r3 00081cd0: 90227ce8 lbu r2,0x7ce8(r1) # load unit currently here 00081cd4: 00000000 nop 00081cd8: 1040000a beq r2,r0,0x00081d04 # branch if they exist 00081cdc: 00000000 nop
uf VRAM does not contain marlboro & no sprites exist
00081ce0: 24a50001 addiu r5,r5,0x0001 # fail case? 00081ce4: 28a20009 slti r2,r5,0x0009 00081ce8: 1440fff6 bne r2,r0,0x00081cc4 # loop through all 9 available vram slots 00081cec: 246432d6 addiu r4,r3,0x32d6 00081cf0: 28a20009 slti r2,r5,0x0009 00081cf4: 10400010 beq r2,r0,0x00081d38 00081cf8: 30e2ffff andi r2,r7,0xffff 00081cfc: 08020751 j 0x00081d44 # end 00081d00: 00000000 nop
if VRAM does not contain marlboro spritesheet & units exist
00081d04: 3c01800c lui r1,0x800c 00081d08: 00240821 addu r1,r1,r4 00081d0c: a0287ce8 sb r8,0x7ce8(r1) # store unit ID as spritesheet input 00081d10: 3c01800c lui r1,0x800c 00081d14: 00240821 addu r1,r1,r4 00081d18: a0287ce9 sb r8,0x7ce9(r1) # store spritesheet input as spritesheet ID 00081d1c: 0802073c j 0x00081cf0 # try again 00081d20: 00a03821 addu r7,r5,r0 # r7 = r5
If VRAM contains Marlboro spritesheet:
00081d24: 3c01800c lui r1,0x800c 00081d28: 00260821 addu r1,r1,r6 00081d2c: a0287ce8 sb r8,0x7ce8(r1) # store spritesheet ID as VRAM unit MISC ID 00081d30: 0802072b j 0x00081cac 00081d34: 00a03821 addu r7,r5,r0
Fail error case (fail type 0xb r5 = VRAM battle sprite fail index)
00081d38: 0c011282 jal 0x00044a08 00081d3c: 3404000b ori r4,r0,0x000b 00081d40: 3402ffff ori r2,r0,0xffff 00081d44: 8fbf0010 lw r31,0x0010(r29) 00081d48: 27bd0018 addiu r29,r29,0x0018 00081d4c: 03e00008 jr r31 00081d50: 00000000 nop