Move Unit Right+/Left-
(Redirected from 000846b0 - 00084754)
Jump to navigation
Jump to search
called by certain sprite animation commands. r5 is the input byte. (knockback animation stuff?) 000846b0: 94820070 lhu r2,0x0070(r4) Load Current Facing? 000846b4: 00000000 nop 000846b8: 30430c00 andi r3,r2,0x0c00 Get Facing 000846bc: 34020400 ori r2,r0,0x0400 000846c0: 10620019 beq r3,r2,0x00084728 Branch if Facing = West 000846c4: 28620401 slti r2,r3,0x0401 000846c8: 10400005 beq r2,r0,0x000846e0 Branch if Facing < 0x401 000846cc: 00000000 nop 000846d0: 10600010 beq r3,r0,0x00084714 Branch if Facing = South 000846d4: 00051600 sll r2,r5,0x18 000846d8: 080211d4 j 0x00084750 000846dc: 00000000 nop 000846e0: 34020800 ori r2,r0,0x0800 000846e4: 10620005 beq r3,r2,0x000846fc Branch if Facing = North 000846e8: 34020c00 ori r2,r0,0x0c00 000846ec: 10620014 beq r3,r2,0x00084740 Branch if Facing = East 000846f0: 00051600 sll r2,r5,0x18 000846f4: 080211d4 j 0x00084750 000846f8: 00000000 nop
- North*
000846fc: 00051600 sll r2,r5,0x18 00084700: 94830050 lhu r3,0x0050(r4) Load X ? 00084704: 00021603 sra r2,r2,0x18 00084708: 00431021 addu r2,r2,r3 0008470c: 080211d4 j 0x00084750 Jump to end 00084710: a4820050 sh r2,0x0050(r4) Save input + X as new X?
- South*
00084714: 94830050 lhu r3,0x0050(r4) 00084718: 00021603 sra r2,r2,0x18 0008471c: 00621823 subu r3,r3,r2 00084720: 080211d4 j 0x00084750 Jump to end 00084724: a4830050 sh r3,0x0050(r4) save X - Input as new X?
- West*
00084728: 00051600 sll r2,r5,0x18 0008472c: 94830054 lhu r3,0x0054(r4) Load Y ? 00084730: 00021603 sra r2,r2,0x18 00084734: 00431021 addu r2,r2,r3 00084738: 080211d4 j 0x00084750 Jump to end 0008473c: a4820054 sh r2,0x0054(r4) Save Y + Input as new Y?
- East*
00084740: 94830054 lhu r3,0x0054(r4) 00084744: 00021603 sra r2,r2,0x18 00084748: 00621823 subu r3,r3,r2 0008474c: a4830054 sh r3,0x0054(r4) Save Y - input as new Y? 00084750: 03e00008 jr r31 00084754: 00000000 nop