00089748 - 000897d8
Jump to navigation
Jump to search
division in my unit motion :puke: probably for relative motion? if 0x87 = 2 00089748: 00802821 addu r5,r4,r0 r5 = misc unit data pointer 0008974c: 8ca6008c lw r6,0x008c(r5) ? 00089750: 8ca30088 lw r3,0x0088(r5) 00089754: 8ca40090 lw r4,0x0090(r5) ? 00089758: 10600005 beq r3,r0,0x00089770 branch if 0x88 is 0 0008975c: 34020001 ori r2,r0,0x0001 00089760: 1062000b beq r3,r2,0x00089790 branch if 0x88 is 1 00089764: 00000000 nop 00089768: 080225f5 j 0x000897d4 do nothing otherwise. 0008976c: aca6008c sw r6,0x008c(r5) restore 0x8c into itself. if = 0 00089770: 3c03fffd lui r3,0xfffd 00089774: 3463c000 ori r3,r3,0xc000 r3 = 0xfffdc000 00089778: 0066001a div r3,r6 0008977c: 00003012 mflo r6 0xfffdc000/*0x8c? 00089780: 8ca4001c lw r4,0x001c(r5) height mod of unit * 0x4096 00089784: 34020001 ori r2,r0,0x0001 00089788: aca20088 sw r2,0x0088(r5) store 1 into 0x88 0008978c: 00832021 addu r4,r4,r3 height mod - 0x24000 if = 1 or = 0 00089790: 8ca3001c lw r3,0x001c(r5) height mod of unit 00089794: 00000000 nop 00089798: 0083102a slt r2,r4,r3 0008979c: 10400003 beq r2,r0,0x000897ac branch if greater than r4 (either previous height mod (if 0x88 is 1) or 'height - 0x24000') 000897a0: 00c31021 addu r2,r6,r3 000897a4: 080225ed j 0x000897b4 000897a8: aca2001c sw r2,0x001c(r5) store new height mod as old height mod + 0x8c 000897ac: aca4001c sw r4,0x001c(r5) store r4 as height mod 000897b0: a0a00087 sb r0,0x0087(r5) clear 0x87 000897b4: 8ca2001c lw r2,0x001c(r5) load height mod 000897b8: 00000000 nop 000897bc: 04410002 bgez r2,0x000897c8 branch if greater than 0 000897c0: 00000000 nop 000897c4: 24420fff addiu r2,r2,0x0fff + 0x0fff (not even negation?) 000897c8: 00021303 sra r2,r2,0x0c 000897cc: a4a20042 sh r2,0x0042(r5) store in this other height mod 000897d0: aca6008c sw r6,0x008c(r5) store 0x8c back (altered if math was done on it.) 000897d4: 03e00008 jr r31 000897d8: aca40090 sw r4,0x0090(r5) store height mod here for next argument