Difference between revisions of "Linear/3-direction AoE Calculation"
Jump to navigation
Jump to search
(Created page with " 0017be68: 27bdffc0 addiu r29,r29,0xffc0 0017be6c: afb30034 sw r19,0x0034(r29) 0017be70: 00a09821 addu r19,r5,r0 r19 = Directions 0017be74: 27a50010 addiu r5,r29,0x0010 r...") |
|||
Line 7: | Line 7: | ||
0017be80: afb20030 sw r18,0x0030(r29) | 0017be80: afb20030 sw r18,0x0030(r29) | ||
0017be84: afb1002c sw r17,0x002c(r29) | 0017be84: afb1002c sw r17,0x002c(r29) | ||
− | 0017be88: 0c01788b jal 0x0005e22c [[Transfer | + | 0017be88: 0c01788b jal 0x0005e22c [[Transfer Target ID? Through Mount Data]] |
0017be8c: afb00028 sw r16,0x0028(r29) | 0017be8c: afb00028 sw r16,0x0028(r29) | ||
0017be90: 93a30010 lbu r3,0x0010(r29) Load Attacker/Self ID? | 0017be90: 93a30010 lbu r3,0x0010(r29) Load Attacker/Self ID? |
Revision as of 21:08, 11 June 2016
0017be68: 27bdffc0 addiu r29,r29,0xffc0 0017be6c: afb30034 sw r19,0x0034(r29) 0017be70: 00a09821 addu r19,r5,r0 r19 = Directions 0017be74: 27a50010 addiu r5,r29,0x0010 r5 = Stack Pointer 0017be78: afbf003c sw r31,0x003c(r29) 0017be7c: afb40038 sw r20,0x0038(r29) 0017be80: afb20030 sw r18,0x0030(r29) 0017be84: afb1002c sw r17,0x002c(r29) 0017be88: 0c01788b jal 0x0005e22c Transfer Target ID? Through Mount Data 0017be8c: afb00028 sw r16,0x0028(r29) 0017be90: 93a30010 lbu r3,0x0010(r29) Load Attacker/Self ID? 0017be94: 87b2001c lh r18,0x001c(r29) Load Target X 0017be98: 87b40020 lh r20,0x0020(r29) Load Target Y 0017be9c: 34020001 ori r2,r0,0x0001 r2 = 1 0017bea0: 3c018019 lui r1,0x8019 0017bea4: ac22f4f8 sw r2,-0x0b08(r1) Store ? = 1 0017bea8: 000310c0 sll r2,r3,0x03 ID * 8 0017beac: 00431023 subu r2,r2,r3 ID * 7 0017beb0: 00021180 sll r2,r2,0x06 ID * 448 0017beb4: 3c038019 lui r3,0x8019 0017beb8: 246308cc addiu r3,r3,0x08cc 0017bebc: 00431021 addu r2,r2,r3 0017bec0: 90510047 lbu r17,0x0047(r2) Load Unit's X 0017bec4: 90500048 lbu r16,0x0048(r2) Load Unit's Y 0017bec8: 0232182a slt r3,r17,r18 0017becc: 10600010 beq r3,r0,0x0017bf10 Branch if Unit X >= Target X 0017bed0: 00002021 addu r4,r0,r0 Direction = 0 0017bed4: 02202821 addu r5,r17,r0 r5 = Unit's X 0017bed8: 0c05f011 jal 0x0017c044 Linear Attack Tile Calculation 0017bedc: 02003021 addu r6,r16,r0 r6 = Unit's Y 0017bee0: 326300ff andi r3,r19,0x00ff r3 = Directions 0017bee4: 34020003 ori r2,r0,0x0003 r2 = 3 0017bee8: 1462000a bne r3,r2,0x0017bf14 Branch if Directions != 3 0017beec: 0251102a slt r2,r18,r17 0017bef0: 34040006 ori r4,r0,0x0006 Direction = 6 0017bef4: 02202821 addu r5,r17,r0 r5 = Unit's X 0017bef8: 0c05f011 jal 0x0017c044 Linear Attack Tile Calculation 0017befc: 02003021 addu r6,r16,r0 r6 = Unit's Y 0017bf00: 34040004 ori r4,r0,0x0004 Direction = 4 0017bf04: 02202821 addu r5,r17,r0 r5 = Unit's X 0017bf08: 0c05f011 jal 0x0017c044 Linear Attack Tile Calculation 0017bf0c: 02003021 addu r6,r16,r0 r6 = Unit's Y 0017bf10: 0251102a slt r2,r18,r17 0017bf14: 10400010 beq r2,r0,0x0017bf58 Branch if Target X >= Unit X 0017bf18: 34040002 ori r4,r0,0x0002 Direction = 2 0017bf1c: 02202821 addu r5,r17,r0 r5 = Unit's X 0017bf20: 0c05f011 jal 0x0017c044 Linear Attack Tile Calculation 0017bf24: 02003021 addu r6,r16,r0 r6 = Unit's Y 0017bf28: 326300ff andi r3,r19,0x00ff r3 = Directions 0017bf2c: 34020003 ori r2,r0,0x0003 r2 = 3 0017bf30: 1462000a bne r3,r2,0x0017bf5c Branch if Directions != 3 0017bf34: 0214102a slt r2,r16,r20 0017bf38: 34040006 ori r4,r0,0x0006 Direction = 6 0017bf3c: 02202821 addu r5,r17,r0 r5 = Unit X 0017bf40: 0c05f011 jal 0x0017c044 Linear Attack Tile Calculation 0017bf44: 02003021 addu r6,r16,r0 r6 = Unit Y 0017bf48: 34040004 ori r4,r0,0x0004 Direction = 4 0017bf4c: 02202821 addu r5,r17,r0 r5 = Unit X 0017bf50: 0c05f011 jal 0x0017c044 Linear Attack Tile Calculation 0017bf54: 02003021 addu r6,r16,r0 r6 = Unit Y 0017bf58: 0214102a slt r2,r16,r20 0017bf5c: 10400010 beq r2,r0,0x0017bfa0 Branch if Unit Y >= Target Y 0017bf60: 34040006 ori r4,r0,0x0006 Direction = 6 0017bf64: 02202821 addu r5,r17,r0 r5 = Unit X 0017bf68: 0c05f011 jal 0x0017c044 Linear Attack Tile Calculation 0017bf6c: 02003021 addu r6,r16,r0 r6 = Unit Y 0017bf70: 326300ff andi r3,r19,0x00ff r3 = Directions 0017bf74: 34020003 ori r2,r0,0x0003 r2 = 3 0017bf78: 1462000a bne r3,r2,0x0017bfa4 Branch if Directions != 3 0017bf7c: 0290102a slt r2,r20,r16 0017bf80: 00002021 addu r4,r0,r0 Direction = 0 0017bf84: 02202821 addu r5,r17,r0 r5 = Unit X 0017bf88: 0c05f011 jal 0x0017c044 Linear Attack Tile Calculation 0017bf8c: 02003021 addu r6,r16,r0 r6 = Unit Y 0017bf90: 34040002 ori r4,r0,0x0002 Direction = 2 0017bf94: 02202821 addu r5,r17,r0 r5 = Unit X 0017bf98: 0c05f011 jal 0x0017c044 Linear Attack Tile Calculation 0017bf9c: 02003021 addu r6,r16,r0 r6 = Unit Y 0017bfa0: 0290102a slt r2,r20,r16 0017bfa4: 10400010 beq r2,r0,0x0017bfe8 Branch if Target Y >= Unit Y 0017bfa8: 34040004 ori r4,r0,0x0004 Direction = 4 0017bfac: 02202821 addu r5,r17,r0 r5 = Unit X 0017bfb0: 0c05f011 jal 0x0017c044 Linear Attack Tile Calculation 0017bfb4: 02003021 addu r6,r16,r0 r6 = Unit Y 0017bfb8: 326300ff andi r3,r19,0x00ff r3 = Directions 0017bfbc: 34020003 ori r2,r0,0x0003 r2 = 3 0017bfc0: 1462000a bne r3,r2,0x0017bfec Branch if Directions != 3 0017bfc4: 00002021 addu r4,r0,r0 Counter = 0 0017bfc8: 34040002 ori r4,r0,0x0002 Direction = 2 0017bfcc: 02202821 addu r5,r17,r0 r5 = Unit X 0017bfd0: 0c05f011 jal 0x0017c044 Linear Attack Tile Calculation 0017bfd4: 02003021 addu r6,r16,r0 r6 = Unit Y 0017bfd8: 00002021 addu r4,r0,r0 Direction = 0 0017bfdc: 02202821 addu r5,r17,r0 r5 = Unit X 0017bfe0: 0c05f011 jal 0x0017c044 Linear Attack Tile Calculation 0017bfe4: 02003021 addu r6,r16,r0 r6 = Unit Y 0017bfe8: 00002021 addu r4,r0,r0 Counter = 0 0017bfec: 3c038019 lui r3,0x8019 0017bff0: 24632dd8 addiu r3,r3,0x2dd8 0017bff4: 90620001 lbu r2,0x0001(r3) Load Tile Targeted? Flag 0017bff8: 00000000 nop 0017bffc: 14400003 bne r2,r0,0x0017c00c Branch if Tile is Targeted? 0017c000: 00000000 nop 0017c004: 0805f004 j 0x0017c010 0017c008: a0600000 sb r0,0x0000(r3) AoE = 0 0017c00c: a0600001 sb r0,0x0001(r3) Tile Targeted? = False 0017c010: 24840001 addiu r4,r4,0x0001 Counter ++ 0017c014: 28820200 slti r2,r4,0x0200 0017c018: 1440fff6 bne r2,r0,0x0017bff4 Branch if Counter < 0x200 0017c01c: 24630005 addiu r3,r3,0x0005 Pointer += 5 0017c020: 8fbf003c lw r31,0x003c(r29) 0017c024: 8fb40038 lw r20,0x0038(r29) 0017c028: 8fb30034 lw r19,0x0034(r29) 0017c02c: 8fb20030 lw r18,0x0030(r29) 0017c030: 8fb1002c lw r17,0x002c(r29) 0017c034: 8fb00028 lw r16,0x0028(r29) 0017c038: 27bd0040 addiu r29,r29,0x0040 0017c03c: 03e00008 jr r31 0017c040: 00000000 nop