Get Generic Human Formation Graphic Entry
Jump to navigation
Jump to search
# ROUTINE: GET FORMATION SPRITE ENTRY # Parameters: # r4 = (jobID) Job ID # r5 = (femaleFlag) Non-zero if unit is female, 0 otherwise (Seems to be either 0x40 or 0) # r6 = (buffer) Buffer in which to write formation entry 801258a4: 27bdffe8 addiu r29,r29,-0x0018 801258a8: 00041400 sll r2,r4,0x10 801258ac: 00021c03 sra r3,r2,0x10 # jobID 801258b0: 28620035 slti r2,r3,0x0035 801258b4: 10400006 beq r2,r0,0x801258d0 801258b8: afbf0010 sw r31,0x0010(r29) # if (jobID < 0x35) { // If Job is up to and including 0x34 Holy Knight (excluding 0x35 Chemist) 801258bc: 3c018019 lui r1,0x8019 801258c0: 00230821 addu r1,r1,r3 801258c4: 9023de34 lbu r3,-0x21cc(r1) # index = *0x8018de34 + jobID 801258c8: 08049647 j 0x8012591c 801258cc: 00031400 sll r2,r3,0x10 # } 801258d0: 3402005c ori r2,r0,0x005c 801258d4: 14620003 bne r3,r2,0x801258e4 # else if (jobID == 0x5c) // Dancer 801258d8: 3402005b ori r2,r0,0x005b 801258dc: 08049646 j 0x80125918 801258e0: 3403003b ori r3,r0,0x003b # index = 0x3b 801258e4: 14620003 bne r3,r2,0x801258f4 # else if (jobID == 0x5b) // Bard 801258e8: 3402005d ori r2,r0,0x005d 801258ec: 08049646 j 0x80125918 801258f0: 3403003a ori r3,r0,0x003a # index = 0x3a # else { 801258f4: 14620003 bne r3,r2,0x80125904 801258f8: 00041040 sll r2,r4,0x01 # if (jobID == 0x5d) { // Mime 801258fc: 08049642 j 0x80125908 80125900: 3403003c ori r3,r0,0x003c # index = 0x3c # } else { 80125904: 2443ff84 addiu r3,r2,-0x007c # index = (jobID * 2) - 0x7c # } 80125908: 00051400 sll r2,r5,0x10 8012590c: 10400003 beq r2,r0,0x8012591c # if (femaleFlag) { 80125910: 00031400 sll r2,r3,0x10 80125914: 24630001 addiu r3,r3,0x0001 # index = index + 1 80125918: 00031400 sll r2,r3,0x10 # } # } 8012591c: 00021403 sra r2,r2,0x10 # index 80125920: 00022040 sll r4,r2,0x01 # index * 2 80125924: 00822021 addu r4,r4,r2 # index * 3 80125928: 00042080 sll r4,r4,0x02 # index * 12 8012592c: 3c028019 lui r2,0x8019 80125930: 2442da44 addiu r2,r2,-0x25bc # 0x8018da44 80125934: 00822021 addu r4,r4,r2 # 0x8018da44 + (index * 12) 80125938: 00c02821 addu r5,r6,r0 # buffer 8012593c: 0c0088b7 jal 0x800222dc # bcopy (0x8018da44 + (index * 12), buffer, 12); 80125940: 3406000c ori r6,r0,0x000c # 12 80125944: 8fbf0010 lw r31,0x0010(r29) 80125948: 27bd0018 addiu r29,r29,0x0018 8012594c: 03e00008 jr r31 80125950: 00000000 nop