Movement/action direction setting
Jump to navigation
Jump to search
0007273c: 27bdffd0 addiu r29,r29,0xffd0 00072740: afb00028 sw r16,0x0028(r29) 00072744: 00808021 addu r16,r4,r0 00072748: 12000072 beq r16,r0,0x00072914 0007274c: afbf002c sw r31,0x002c(r29) 00072750: afa00020 sw r0,0x0020(r29) 00072754: 10a00009 beq r5,r0,0x0007277c 00072758: afa00018 sw r0,0x0018(r29) 0007275c: 84a20040 lh r2,0x0040(r5) 00072760: 86030040 lh r3,0x0040(r16) 00072764: 00000000 nop 00072768: 00431023 subu r2,r2,r3 0007276c: afa20018 sw r2,0x0018(r29) 00072770: 84a20044 lh r2,0x0044(r5) 00072774: 0801ca04 j 0x00072810 00072778: 00000000 nop 0007277c: 8e040134 lw r4,0x0134(r16) load unit data 00072780: 00000000 nop 00072784: 90830178 lbu r3,0x0178(r4) load tile/target specific 00072788: 34020005 ori r2,r0,0x0005 0007278c: 14620014 bne r3,r2,0x000727e0 branch if not Tile specific ability 00072790: 00000000 nop 00072794: 8483017a lh r3,0x017a(r4) load X target panel 00072798: 00000000 nop 0007279c: 000310c0 sll r2,r3,0x03 000727a0: 00431023 subu r2,r2,r3 000727a4: 86030040 lh r3,0x0040(r16) load X mod 000727a8: 00021080 sll r2,r2,0x02 000727ac: 2463fff2 addiu r3,r3,0xfff2 000727b0: 00431023 subu r2,r2,r3 000727b4: afa20018 sw r2,0x0018(r29) store X panel? 000727b8: 8e020134 lw r2,0x0134(r16) load unit data 000727bc: 00000000 nop 000727c0: 8443017e lh r3,0x017e(r2) load Y target panel 000727c4: 00000000 nop 000727c8: 000310c0 sll r2,r3,0x03 000727cc: 00431023 subu r2,r2,r3 000727d0: 86030044 lh r3,0x0044(r16) load Y mod 000727d4: 00021080 sll r2,r2,0x02 000727d8: 0801ca05 j 0x00072814 000727dc: 2463fff2 addiu r3,r3,0xfff2 000727e0: 90840179 lbu r4,0x0179(r4) load target ID 000727e4: 0c01e9c9 jal 0x0007a724 find the first unit? 000727e8: 00000000 nop 000727ec: 00402021 addu r4,r2,r0 000727f0: 1080000c beq r4,r0,0x00072824 000727f4: 3c030008 lui r3,0x0008 000727f8: 84820040 lh r2,0x0040(r4) 000727fc: 86030040 lh r3,0x0040(r16) 00072800: 00000000 nop 00072804: 00431023 subu r2,r2,r3 00072808: afa20018 sw r2,0x0018(r29) store some distance? 0007280c: 84820044 lh r2,0x0044(r4) 00072810: 86030044 lh r3,0x0044(r16) 00072814: 00000000 nop 00072818: 00431023 subu r2,r2,r3 0007281c: afa20020 sw r2,0x0020(r29) store some distance? 00072820: 3c030008 lui r3,0x0008 00072824: 8e020140 lw r2,0x0140(r16) load status flags 00072828: 34630074 ori r3,r3,0x0074 0007282c: 00431024 and r2,r2,r3 00072830: 14400038 bne r2,r0,0x00072914 branch if statii found 00072834: 340201b8 ori r2,r0,0x01b8 00072838: 860301ac lh r3,0x01ac(r16) load reaction ability? 0007283c: 00000000 nop 00072840: 10620034 beq r3,r2,0x00072914 branch if = 0x1b8 (reflect) 00072844: 00000000 nop 00072848: 8fa20018 lw r2,0x0018(r29) load some distance 0007284c: 00000000 nop 00072850: 14400005 bne r2,r0,0x00072868 branch if distance stored 00072854: 00000000 nop 00072858: 8fa20020 lw r2,0x0020(r29) load some distance 0007285c: 00000000 nop 00072860: 1040002c beq r2,r0,0x00072914 branch if no distance stored 00072864: 00000000 nop 00072868: 0c01c9c3 jal 0x0007270c attack direction (turning sprite towards target) 0007286c: 02002021 addu r4,r16,r0 00072870: 8fa40020 lw r4,0x0020(r29) 00072874: 8fa50018 lw r5,0x0018(r29) 00072878: 0c00763a jal 0x0001d8e8 graphics processing? 0007287c: 00042023 subu r4,r0,r4 00072880: 2442fe00 addiu r2,r2,0xfe00 00072884: 8e030134 lw r3,0x0134(r16) load unit data 00072888: 9205007c lbu r5,0x007c(r16) X coordinate to move to 0007288c: 9206007d lbu r6,0x007d(r16) Y coordinate to move to 00072890: 9207007e lbu r7,0x007e(r16) map level to move to 00072894: 30420c00 andi r2,r2,0x0c00 00072898: a6020070 sh r2,0x0070(r16) store attack facing 0007289c: 9064018a lbu r4,0x018a(r3) load unit ID 000728a0: 04410002 bgez r2,0x000728ac 000728a4: 00000000 nop 000728a8: 244203ff addiu r2,r2,0x03ff 000728ac: 00021282 srl r2,r2,0x0a 000728b0: 0c05ff77 jal 0x0017fddc set rider/mounts X/Y 000728b4: afa20010 sw r2,0x0010(r29) 000728b8: 92020130 lbu r2,0x0130(r16) load skip rider/mount x/y direction data byte 000728bc: 00000000 nop 000728c0: 10400014 beq r2,r0,0x00072914 branch if 0 000728c4: 00000000 nop 000728c8: 92040131 lbu r4,0x0131(r16) load unit ID? 000728cc: 0c01e9b9 jal 0x0007a6e4 get misc unit data 000728d0: 00000000 nop 000728d4: 96030070 lhu r3,0x0070(r16) load attack facing 000728d8: 00000000 nop 000728dc: a4430070 sh r3,0x0070(r2) store attack facing 000728e0: 8e020134 lw r2,0x0134(r16) load unit data 000728e4: 86030070 lh r3,0x0070(r16) load attack facing 000728e8: 9205007c lbu r5,0x007c(r16) load X 000728ec: 9206007d lbu r6,0x007d(r16) load Y 000728f0: 9207007e lbu r7,0x007e(r16) load map level 000728f4: 9044018a lbu r4,0x018a(r2) load unit ID 000728f8: 04610003 bgez r3,0x00072908 000728fc: 00031282 srl r2,r3,0x0a 00072900: 246303ff addiu r3,r3,0x03ff 00072904: 00031282 srl r2,r3,0x0a 00072908: 304200ff andi r2,r2,0x00ff 0007290c: 0c05ff77 jal 0x0017fddc set rider/mount data 00072910: afa20010 sw r2,0x0010(r29) 00072914: 8fbf002c lw r31,0x002c(r29) 00072918: 8fb00028 lw r16,0x0028(r29) 0007291c: 27bd0030 addiu r29,r29,0x0030 00072920: 03e00008 jr r31 00072924: 00000000 nop