Facing Evade Calculation
Jump to navigation
Jump to search
Facing Evade Calculation 001854fc: 3c058019 lui r5,0x8019 00185500: 8ca52d98 lw r5,0x2d98(r5) Load Target's Data Pointer 00185504: 3c048019 lui r4,0x8019 00185508: 8c842d94 lw r4,0x2d94(r4) Load Attacker's Data Pointer 0018550c: 90a30047 lbu r3,0x0047(r5) Load Target's X Coordinate 00185510: 90820047 lbu r2,0x0047(r4) Load Attacker's X Coordinate 00185514: 00000000 nop 00185518: 00624023 subu r8,r3,r2 r8 = TX - AX 0018551c: 90820048 lbu r2,0x0048(r4) Load Attacker's Y Coordinate 00185520: 05010002 bgez r8,0x0018552c Branch if TX >= AX 00185524: 01002021 addu r4,r8,r0 r4 = TX - AX 00185528: 00042023 subu r4,r0,r4 r4 = AX - TX 0018552c: 90a30048 lbu r3,0x0048(r5) Load Target's Y Coordinate 00185530: 308400ff andi r4,r4,0x00ff r4 = X Difference 00185534: 00623823 subu r7,r3,r2 r7 = TY - AY 00185538: 04e10002 bgez r7,0x00185544 Branch if TY > AY 0018553c: 00e01021 addu r2,r7,r0 r2 = TY - AY 00185540: 00021023 subu r2,r0,r2 r2 = AY - TY 00185544: 304300ff andi r3,r2,0x00ff r3 = Y Difference 00185548: 0064102b sltu r2,r3,r4 0018554c: 1040001d beq r2,r0,0x001855c4 Branch if Y Difference >= X Difference 00185550: 34060001 ori r6,r0,0x0001 r6 = 1 (Side) 00185554: 1900000c blez r8,0x00185588 Branch if TX <= AX 00185558: 00000000 nop 0018555c: 94a20048 lhu r2,0x0048(r5) Load Target's Y + Facing 00185560: 00000000 nop 00185564: 30430f00 andi r3,r2,0x0f00 Leave only Target's Facing 00185568: 34020100 ori r2,r0,0x0100 0018556c: 14620003 bne r3,r2,0x0018557c Branch if Target isn't facing West 00185570: 34020300 ori r2,r0,0x0300 00185574: 08061562 j 0x00185588 Jump past remaining direction checks 00185578: 00003021 addu r6,r0,r0 r6 = 0 (Front) 0018557c: 14620002 bne r3,r2,0x00185588 Branch if Target isn't facing East 00185580: 00000000 nop 00185584: 34060002 ori r6,r0,0x0002 r6 = 2 (Back) 00185588: 05010058 bgez r8,0x001856ec Branch if TX >= AX (TX = AX) 0018558c: 00000000 nop 00185590: 3c028019 lui r2,0x8019 00185594: 8c422d98 lw r2,0x2d98(r2) Load Target's Data Pointer 00185598: 00000000 nop 0018559c: 94420048 lhu r2,0x0048(r2) Load Target's Y + Facing 001855a0: 00000000 nop 001855a4: 30430f00 andi r3,r2,0x0f00 Leave only Facing 001855a8: 34020300 ori r2,r0,0x0300 001855ac: 10620048 beq r3,r2,0x001856d0 Branch if Target is facing East 001855b0: 34020100 ori r2,r0,0x0100 001855b4: 1462004d bne r3,r2,0x001856ec Branch if Target is not facing West 001855b8: 00000000 nop 001855bc: 080615bb j 0x001856ec Jump past Y direction checks 001855c0: 34060002 ori r6,r0,0x0002 r6 = 2 (Back) 001855c4: 0083102b sltu r2,r4,r 3 001855c8: 1040001c beq r2,r0,0x0018563c Branch if X Difference >= Y Difference (X = Y) 001855cc: 00000000 nop 001855d0: 18e0000b blez r7,0x00185600 Branch if TY <= AY 001855d4: 00000000 nop 001855d8: 94a20048 lhu r2,0x0048(r5) Load Target's Y + Facing 001855dc: 00000000 nop 001855e0: 30430f00 andi r3,r2,0x0f00 Leave only Facin g 001855e4: 14600003 bne r3,r0,0x001855f4 Branch if Target is not facing South 001855e8: 34020200 ori r2,r0,0x0200 001855ec: 08061580 j 0x00185600 Jump past remaining facing checks 001855f0: 00003021 addu r6,r0,r0 r6 = 0 (Front) 001855f4: 14620002 bne r3,r2,0x00185600 Branch if Target is not facing North 001855f8: 00000000 nop 001855fc: 34060002 ori r6,r0,0x0002 r6 = 2 (Back) 00185600: 04e1003a bgez r7,0x001856ec Branch if TY >= AY (TY = AY) 00185604: 00000000 nop 00185608: 3c028019 lui r2,0x8019 0018560c: 8c422d98 lw r2,0x2d98(r2) Load Target's Data Pointer 00185610: 00000000 nop 00185614: 94420048 lhu r2,0x0048(r2) Load Target's Y + Facing 00185618: 00000000 nop 0018561c: 30430f00 andi r3,r2,0x0f00 Leave only Facing 00185620: 34020200 ori r2,r0,0x0200 00185624: 1062002a beq r3,r2,0x001856d0 Branch if Target is facing North 00185628: 00000000 nop 0018562c: 1460002f bne r3,r0,0x001856ec Branch if Target is not facing South 00185630: 00000000 nop 00185634: 080615bb j 0x001856ec 00185638: 34060002 ori r6,r0,0x0002 r6 = 2 (Back) 0018563c: 19000006 blez r8,0x00185658 Branch if TX <= AX 00185640: 34030100 ori r3,r0,0x0100 00185644: 94a20048 lhu r2,0x0048(r5) Load Target's Y + Facing 00185648: 00000000 nop 0018564c: 30420f00 andi r2,r2,0x0f00 Leave only Facing 00185650: 1043001f beq r2,r3,0x001856d0 Branch if Target is facing West 00185654: 00000000 nop 00185658: 05010009 bgez r8,0x00185680 Branch if TX >= AX 0018565c: 34030300 ori r3,r0,0x0300 00185660: 3c028019 lui r2,0x8019 00185664: 8c422d98 lw r2,0x2d98(r2) Load Target Pointer 00185668: 00000000 nop 0018566c: 94420048 lhu r2,0x0048(r2) Load Target's Y + Facing 00185670: 00000000 nop 00185674: 30420f00 andi r2,r2,0x0f00 Leave only Facing 00185678: 10430015 beq r2,r3,0x001856d0 Branch if Target is facing East 0018567c: 00000000 nop 00185680: 18e00009 blez r7,0x001856a8 Branch if TY <= AY 00185684: 00000000 nop 00185688: 3c028019 lui r2,0x8019 0018568c: 8c422d98 lw r2,0x2d98(r2) Load Target Pointer 00185690: 00000000 nop 00185694: 94420048 lhu r2,0x0048(r2) Load Target's Y + Facing 00185698: 00000000 nop 0018569c: 30420f00 andi r2,r2,0x0f00 Leave only Facing 001856a0: 1040000b beq r2,r0,0x001856d0 Branch if Facing South 001856a4: 00000000 nop 001856a8: 04e1000b bgez r7,0x001856d8 Branch if TY >= AY 001856ac: 34030200 ori r3,r0,0x0200 001856b0: 3c028019 lui r2,0x8019 001856b4: 8c422d98 lw r2,0x2d98(r2) Load Target Pointer 001856b8: 00000000 nop 001856bc: 94420048 lh u r2,0x0048(r2) Load Target's Y + Facing 001856c0: 00000000 no p 001856c4: 30420f00 andi r2,r2,0x0f00 Leave only Facin g 001856c8: 14430003 bne r2,r3,0x001856d8 Branch if Target is not facing North 001856cc: 00000000 nop 001856d0: 080615bb j 0x001856ec 001856d4: 00003021 addu r6,r0,r0 r6 = 0 (Front) 001856d8: 15000004 bne r8,r0,0x001856ec Branch if TX - AX is not 0 001856dc: 00000000 nop 001856e0: 14e00002 bne r7,r0,0x001856ec Branch if TY - AY is not 0 001856e4: 00000000 nop 001856e8: 34060002 ori r6,r0,0x0002 r6 = 2 (Back) 001856ec: 3c038019 lui r3,0x8019 001856f0: 246338e2 addiu r3,r3,0x38e2 001856f4: a0660000 sb r6,0x0000(r3) Store Facing Mod 001856f8: 90620000 lbu r2,0x0000(r3) Load Facing Mod >_> 001856fc: 00000000 nop 00185700: 10400003 beq r2,r0,0x00185710 Branch if Facing Mod = 0 (Facing Front) 00185704: 00000000 nop 00185708: 3c018019 lui r1,0x8019 0018570c: a02038e1 sb r0,0x38e1(r1) Class Evade = 0 00185710: 90630000 lbu r3,0x0000(r3) Load Facing Mod 00185714: 34020002 ori r2,r0,0x0002 00185718: 14620005 bne r3,r2,0x00185730 Branch if Facing Mod != 2 (not facing Back) 0018571c: 00000000 nop 00185720: 3c018019 lui r1,0x8019 00185724: a02038df sb r0,0x38df(r1) Weapon Evade = 0 00185728: 3c018019 lui r1,0x8019 0018572c: a02038e0 sb r0,0x38e0(r1) Shield Evade = 0 00185730: 03e00008 jr r31 00185734: 00000000 nop
Return Locations
- Battle.bin
00188548: Physical Evade Calculation 00188598: Physical Evade Calculation(Charge)