Set Idle Animation based on status (not MON)
Jump to navigation
Jump to search
called for moving. unsure how exactly Change of animation is fiddled with outside of here, the math doesn't seem to add up (New animation = 2 * (CA - 1)) 00082df8: 27bdffe0 addiu r29,r29,0xffe0 00082dfc: afb10014 sw r17,0x0014(r29) 00082e00: 00808821 addu r17,r4,r0 r17 = Misc. unit data pointer 00082e04: afbf0018 sw r31,0x0018(r29) 00082e08: afb00010 sw r16,0x0010(r29) 00082e0c: 92230130 lbu r3,0x0130(r17) Load Mount/rider value 00082e10: 34020001 ori r2,r0,0x0001 r2 = 1 00082e14: 1062002c beq r3,r2,0x00082ec8 $branch to end (?)if unit is riding another unit 00082e18: 34040032 ori r4,r0,0x0032 change of animation = 32 (not... jump, 31 * 2? 62 doesn't seem right either...) 00082e1c: 0c0209e3 jal 0x0008278c Movement validation - float/fly? 00082e20: 02202021 addu r4,r17,r0 r4 = Misc unit data pointer 00082e24: 304200ff andi r2,r2,0x00ff Reduce height mod to 1 byte 00082e28: 0440001b bltz r2,0x00082e98 branch if height is < 0 00082e2c: 28420002 slti r2,r2,0x0002 r2 = 1 if r2 < 0x2 00082e30: 10400019 beq r2,r0,0x00082e98 Branch if height is not between 0 and 2 00082e34: 00000000 nop 00082e38: 8e230038 lw r3,0x0038(r17) Load special movement flags(?) and also like another half word? 00082e3c: 00000000 nop 00082e40: 28623000 slti r2,r3,0x3000 r2 = true if r3 < 0x3000 (?) 00082e44: 14400003 bne r2,r0,0x00082e54 #branch if so 00082e48: 28621401 slti r2,r3,0x1401 |r2 = true if r3 <= 0x1400 00082e4c: 08020b98 j 0x00082e60 @jump ahead 00082e50: 3410000d ori r16,r0,0x000d |r16 = 0x0d (travelling?) 00082e54: 10400002 beq r2,r0,0x00082e60 #branch if r3 <= 0x1400 00082e58: 3410000c ori r16,r0,0x000c |r16 = 0x0c (travelling slowly?) 00082e5c: 3410000e ori r16,r0,0x000e |r16 = 0x0e (travelling quickly?) 00082e60: 92230130 lbu r3,0x0130(r17) |load Mount/Rider value 00082e64: 34020002 ori r2,r0,0x0002 |r2 = 2 00082e68: 14620015 bne r3,r2,0x00082ec0 %branch if not mount for another unit 00082e6c: 00000000 nop | 00082e70: 92240131 lbu r4,0x0131(r17) |Load mount/mountee target ID 00082e74: 0c01e9b9 jal 0x0007a6e4 |-->Find Current Misc Unit Data Pointer (external ID)? 00082e78: 00000000 nop | 00082e7c: 10400010 beq r2,r0,0x00082ec0 %branch if mount/mountee is not a unit 00082e80: 34040032 ori r4,r0,0x0032 |change of animation = 0x32 (not jump, again...?) 00082e84: 86250070 lh r5,0x0070(r17) |load current facing 00082e88: 0c02065e jal 0x00081978 |-->Store unit animation and facing value 00082e8c: 00403021 addu r6,r2,r0 |mount/mountee misc. unit data pointer 00082e90: 08020bb0 j 0x00082ec0 %jump to end 00082e94: 00000000 nop 00082e98: 8e230038 lw r3,0x0038(r17) load special movement flags? 00082e9c: 00000000 nop 00082ea0: 28623000 slti r2,r3,0x3000 set if < 0x3000 00082ea4: 14400003 bne r2,r0,0x00082eb4 branch if so 00082ea8: 28621401 slti r2,r3,0x1401 set if <= 0x1400 00082eac: 08020bb0 j 0x00082ec0 jump to end 00082eb0: 3410000a ori r16,r0,0x000a r16 = 0x0a (travelling?) 00082eb4: 10400002 beq r2,r0,0x00082ec0 branch if <= 0x1400 00082eb8: 34100009 ori r16,r0,0x0009 r16 = 0x09 (stationary?) 00082ebc: 3410000b ori r16,r0,0x000b r16 = 0x0b (travelling very quickly?) 00082ec0: 12000004 beq r16,r0,0x00082ed4 branch if animation turns up 0 00082ec4: 02002021 addu r4,r16,r0 change of animation = r16 00082ec8: 86250070 lh r5,0x0070(r17) $Load current facing 00082ecc: 0c02065e jal 0x00081978 Store unit animation and facing value 00082ed0: 02203021 addu r6,r17,r0 r6 = misc unit data pointer 00082ed4: 8fbf0018 lw r31,0x0018(r29) 00082ed8: 8fb10014 lw r17,0x0014(r29) 00082edc: 8fb00010 lw r16,0x0010(r29) 00082ee0: 27bd0020 addiu r29,r29,0x0020 00082ee4: 03e00008 jr r31 00082ee8: 00000000 nop