0x6c024
Jump to navigation
Jump to search
# ROUTINE: ? 0x6c024 # Parameters: # r4 = (unitMiscData) Unit misc data pointer # r5 = (p2) ? Sometimes = 0? (0x6c2bc result?) 8006c024: 27bdffd8 addiu r29,r29,-0x0028 8006c028: afb00010 sw r16,0x0010(r29) 8006c02c: 00808021 addu r16,r4,r0 # unitMiscData 8006c030: afbf0020 sw r31,0x0020(r29) 8006c034: afb3001c sw r19,0x001c(r29) 8006c038: afb20018 sw r18,0x0018(r29) 8006c03c: afb10014 sw r17,0x0014(r29) 8006c040: 9203009c lbu r3,0x009c(r16) # unitMiscData.NumTilesToMove 8006c044: 8e020098 lw r2,0x0098(r16) # unitMiscData.NumTilesMovedSoFar 8006c048: 00000000 nop 8006c04c: 10430093 beq r2,r3,0x8006c29c # if (unitMiscData.NumTilesToMove == unitMiscData.NumTilesMovedSoFar), return (exit the routine) 8006c050: 00a09021 addu r18,r5,r0 # p2 8006c054: 92050080 lbu r5,0x0080(r16) # unitMiscData.MovingX 8006c058: 92060081 lbu r6,0x0081(r16) # unitMiscData.MovingY 8006c05c: 92070082 lbu r7,0x0082(r16) # unitMiscData.MovingHigherElevation 8006c060: 0c01e974 jal 0x8007a5d0 # overlappingUnitMiscData = Get Overlapping Unit Misc Data Pointer # (unitMiscData, unitMiscData.MovingX, unitMiscData.MovingY, unitMiscData.MovingHigherElevation) 8006c064: 00000000 nop 8006c068: 8e030098 lw r3,0x0098(r16) # unitMiscData.NumTilesMovedSoFar 8006c06c: 00000000 nop 8006c070: 1060008a beq r3,r0,0x8006c29c # if (unitMiscData.NumTilesMovedSoFar == 0), return 8006c074: 00403821 addu r7,r2,r0 # overlappingUnitMiscData 8006c078: 00701021 addu r2,r3,r16 # unitMiscData.NumTilesMovedSoFar + unitMiscData 8006c07c: 9042009c lbu r2,0x009c(r2) # unitMiscData.MovementBytes[unitMiscData.NumTilesMovedSoFar] 8006c080: 00000000 nop 8006c084: 00021102 srl r2,r2,0x04 # unitMiscData.MovementBytes[unitMiscData.NumTilesMovedSoFar] >> 4 8006c088: 30420001 andi r2,r2,0x0001 # (unitMiscData.MovementBytes[unitMiscData.NumTilesMovedSoFar] >> 4) & 1 8006c08c: 14400083 bne r2,r0,0x8006c29c # if (((unitMiscData.MovementBytes[unitMiscData.NumTilesMovedSoFar] >> 4) & 1) != 0), return 8006c090: 00000000 nop 8006c094: 10e00081 beq r7,r0,0x8006c29c # if (overlappingUnitMiscData == null), return 8006c098: 00000000 nop 8006c09c: 90e30080 lbu r3,0x0080(r7) # overlappingUnitMiscData.MovingX 8006c0a0: 00000000 nop 8006c0a4: 000310c0 sll r2,r3,0x03 # overlappingUnitMiscData.MovingX * 8 8006c0a8: 00431023 subu r2,r2,r3 # overlappingUnitMiscData.MovingX * 7 8006c0ac: 00021080 sll r2,r2,0x02 # overlappingUnitMiscData.MovingX * 28 8006c0b0: 90e30081 lbu r3,0x0081(r7) # overlappingUnitMiscData.MovingY 8006c0b4: 2445000e addiu r5,r2,0x000e # (overlappingUnitMiscData.MovingX * 28) + 14 8006c0b8: 000310c0 sll r2,r3,0x03 # overlappingUnitMiscData.MovingY * 8 8006c0bc: 00431023 subu r2,r2,r3 # overlappingUnitMiscData.MovingY * 7 8006c0c0: 00021080 sll r2,r2,0x02 # overlappingUnitMiscData.MovingY * 28 8006c0c4: 2446000e addiu r6,r2,0x000e # (overlappingUnitMiscData.MovingY * 28) + 14 8006c0c8: 34020001 ori r2,r0,0x0001 # 1 8006c0cc: 12420025 beq r18,r2,0x8006c164 8006c0d0: 2a420002 slti r2,r18,0x0002 8006c0d4: 10400005 beq r2,r0,0x8006c0ec 8006c0d8: 00000000 nop 8006c0dc: 12400011 beq r18,r0,0x8006c124 8006c0e0: 2a220008 slti r2,r17,0x0008 8006c0e4: 0801b062 j 0x8006c188 8006c0e8: 00000000 nop 8006c0ec: 34020002 ori r2,r0,0x0002 8006c0f0: 12420005 beq r18,r2,0x8006c108 8006c0f4: 34020003 ori r2,r0,0x0003 8006c0f8: 12420011 beq r18,r2,0x8006c140 8006c0fc: 2a220008 slti r2,r17,0x0008 8006c100: 0801b062 j 0x8006c188 8006c104: 00000000 nop 8006c108: 92020081 lbu r2,0x0081(r16) 8006c10c: 00000000 nop 8006c110: 000218c0 sll r3,r2,0x03 8006c114: 00621823 subu r3,r3,r2 8006c118: 86020044 lh r2,0x0044(r16) 8006c11c: 0801b05f j 0x8006c17c 8006c120: 00031880 sll r3,r3,0x02 8006c124: 92020081 lbu r2,0x0081(r16) 8006c128: 00000000 nop 8006c12c: 000218c0 sll r3,r2,0x03 8006c130: 00621823 subu r3,r3,r2 8006c134: 86020044 lh r2,0x0044(r16) 8006c138: 0801b056 j 0x8006c158 8006c13c: 00031880 sll r3,r3,0x02 8006c140: 92020080 lbu r2,0x0080(r16) 8006c144: 00000000 nop 8006c148: 000218c0 sll r3,r2,0x03 8006c14c: 00621823 subu r3,r3,r2 8006c150: 00031880 sll r3,r3,0x02 8006c154: 86020040 lh r2,0x0040(r16) 8006c158: 2463000e addiu r3,r3,0x000e 8006c15c: 0801b061 j 0x8006c184 8006c160: 00438823 subu r17,r2,r3 8006c164: 92020080 lbu r2,0x0080(r16) 8006c168: 00000000 nop 8006c16c: 000218c0 sll r3,r2,0x03 8006c170: 00621823 subu r3,r3,r2 8006c174: 00031880 sll r3,r3,0x02 8006c178: 86020040 lh r2,0x0040(r16) 8006c17c: 2463000e addiu r3,r3,0x000e 8006c180: 00628823 subu r17,r3,r2 8006c184: 2a220008 slti r2,r17,0x0008 8006c188: 14400003 bne r2,r0,0x8006c198 8006c18c: 2631fff9 addiu r17,r17,-0x0007 8006c190: 34110007 ori r17,r0,0x0007 8006c194: 2631fff9 addiu r17,r17,-0x0007 8006c198: 00111023 subu r2,r0,r17 8006c19c: 00021840 sll r3,r2,0x01 8006c1a0: 00621821 addu r3,r3,r2 8006c1a4: 000327c2 srl r4,r3,0x1f 8006c1a8: 8e020098 lw r2,0x0098(r16) 8006c1ac: 00641821 addu r3,r3,r4 8006c1b0: 00501021 addu r2,r2,r16 8006c1b4: 9042009d lbu r2,0x009d(r2) 8006c1b8: 00038843 sra r17,r3,0x01 8006c1bc: 00021982 srl r3,r2,0x06 8006c1c0: 34020001 ori r2,r0,0x0001 8006c1c4: 10620010 beq r3,r2,0x8006c208 8006c1c8: 28620002 slti r2,r3,0x0002 8006c1cc: 10400005 beq r2,r0,0x8006c1e4 8006c1d0: 00000000 nop 8006c1d4: 1060000a beq r3,r0,0x8006c200 8006c1d8: 00000000 nop 8006c1dc: 0801b087 j 0x8006c21c 8006c1e0: 00000000 nop 8006c1e4: 34020002 ori r2,r0,0x0002 8006c1e8: 10620009 beq r3,r2,0x8006c210 8006c1ec: 34020003 ori r2,r0,0x0003 8006c1f0: 10620009 beq r3,r2,0x8006c218 8006c1f4: 00000000 nop 8006c1f8: 0801b087 j 0x8006c21c 8006c1fc: 00000000 nop 8006c200: 0801b087 j 0x8006c21c 8006c204: 34130001 ori r19,r0,0x0001 8006c208: 0801b087 j 0x8006c21c 8006c20c: 34130003 ori r19,r0,0x0003 8006c210: 0801b087 j 0x8006c21c 8006c214: 00009821 addu r19,r0,r0 8006c218: 34130002 ori r19,r0,0x0002 8006c21c: 3c018009 lui r1,0x8009 8006c220: ac206240 sw r0,0x6240(r1) 8006c224: 3a630002 xori r3,r19,0x0002 8006c228: 3a440002 xori r4,r18,0x0002 8006c22c: 16530008 bne r18,r19,0x8006c250 8006c230: 00000000 nop 8006c234: 3c028009 lui r2,0x8009 8006c238: 8c426240 lw r2,0x6240(r2) 8006c23c: 00000000 nop 8006c240: 1053000c beq r2,r19,0x8006c274 8006c244: 00000000 nop 8006c248: 0801b099 j 0x8006c264 8006c24c: 00000000 nop 8006c250: 3c028009 lui r2,0x8009 8006c254: 8c426240 lw r2,0x6240(r2) 8006c258: 00000000 nop 8006c25c: 10440005 beq r2,r4,0x8006c274 8006c260: 00000000 nop 8006c264: 1443000a bne r2,r3,0x8006c290 8006c268: 00000000 nop 8006c26c: 3c028009 lui r2,0x8009 8006c270: 8c426240 lw r2,0x6240(r2) 8006c274: 00000000 nop 8006c278: 24420001 addiu r2,r2,0x0001 8006c27c: 3c018009 lui r1,0x8009 8006c280: ac226240 sw r2,0x6240(r1) 8006c284: 28420004 slti r2,r2,0x0004 8006c288: 1440ffe8 bne r2,r0,0x8006c22c 8006c28c: 00000000 nop 8006c290: 00e02021 addu r4,r7,r0 8006c294: 0c01af6a jal 0x8006bda8 8006c298: 02203821 addu r7,r17,r0 8006c29c: 8fbf0020 lw r31,0x0020(r29) 8006c2a0: 8fb3001c lw r19,0x001c(r29) 8006c2a4: 8fb20018 lw r18,0x0018(r29) 8006c2a8: 8fb10014 lw r17,0x0014(r29) 8006c2ac: 8fb00010 lw r16,0x0010(r29) 8006c2b0: 27bd0028 addiu r29,r29,0x0028 8006c2b4: 03e00008 jr r31 8006c2b8: 00000000 nop