00086dc4 - 00086f28
Jump to navigation
Jump to search
Who the hell made this page? god damn. move this somewhere else, and put the actual code for the routine in the title! thank you! - Talcall
00086b44: 27bdffb8 addiu r29,r29,0xffb8 00086b48: afb00038 sw r16,0x0038(r29) 00086b4c: 3c10800a lui r16,0x800a 00086b50: 26108a24 addiu r16,r16,0x8a24 GPU Rotation matrix 00086b54: 02002021 addu r4,r16,r0 00086b58: afbf0044 sw r31,0x0044(r29) 00086b5c: afb20040 sw r18,0x0040(r29) 00086b60: 0c00742a jal 0x0001d0a8 store rotation matrix elements 00086b64: afb1003c sw r17,0x003c(r29) 00086b68: 0c00744e jal 0x0001d138 store translation vectors 00086b6c: 02002021 addu r4,r16,r0 00086b70: 3c11800a lui r17,0x800a 00086b74: 8e318a54 lw r17,-0x75ac(r17) load misc data 00086b78: 00000000 nop 00086b7c: 1220008a beq r17,r0,0x00086da8 00086b80: 3c129249 lui r18,0x9249 00086b84: 36522493 ori r18,r18,0x2493 00086b88: 27b00020 addiu r16,r29,0x0020 r17 = next units misc data <loop> 00086b8c: 02002021 addu r4,r16,r0 00086b90: 0c01ee5b jal 0x0007b96c store some X/Y/Height 00086b94: 02202821 addu r5,r17,r0 00086b98: 02002021 addu r4,r16,r0 00086b9c: 27a50010 addiu r5,r29,0x0010 00086ba0: 0c00755e jal 0x0001d578 multiply vectors/matrix 00086ba4: 2626012c addiu r6,r17,0x012c r6 = misc data + 0x12c 00086ba8: 96220012 lhu r2,0x0012(r17) load byte 0x12 00086bac: 00000000 nop 00086bb0: 30420002 andi r2,r2,0x0002 00086bb4: 10400005 beq r2,r0,0x00086bcc branch if not 0x02 (reflecting?) 00086bb8: 00000000 nop if reflecting? 00086bbc: 97a20010 lhu r2,0x0010(r29) load ?? 00086bc0: 96230058 lhu r3,0x0058(r17) load ?? 00086bc4: 08021af7 j 0x00086bdc 00086bc8: 00431023 subu r2,r2,r3 if not reflecting 00086bcc: 97a20010 lhu r2,0x0010(r29) 00086bd0: 96230058 lhu r3,0x0058(r17) 00086bd4: 00000000 nop 00086bd8: 00431021 addu r2,r2,r3 00086bdc: a6220120 sh r2,0x0120(r17) store difference / sum 00086be0: 96220012 lhu r2,0x0012(r17) 00086be4: 00000000 nop 00086be8: 30420004 andi r2,r2,0x0004 00086bec: 10400005 beq r2,r0,0x00086c04 branch if not ?? 00086bf0: 00000000 nop 00086bf4: 97a20014 lhu r2,0x0014(r29) 00086bf8: 9623005a lhu r3,0x005a(r17) 00086bfc: 08021b05 j 0x00086c14 skip next 00086c00: 00431023 subu r2,r2,r3 if 0x04 active 00086c04: 97a20014 lhu r2,0x0014(r29) 00086c08: 9623005a lhu r3,0x005a(r17) 00086c0c: 00000000 nop 00086c10: 00431021 addu r2,r2,r3 ?? + ?? 00086c14: a6220122 sh r2,0x0122(r17) 00086c18: 96220040 lhu r2,0x0040(r17) load X mod 00086c1c: 00000000 nop 00086c20: 00021400 sll r2,r2,0x10 00086c24: 00022c03 sra r5,r2,0x10 00086c28: 00b20018 mult r5,r18 Xmod * 92494293 00086c2c: 96230044 lhu r3,0x0044(r17) load Y mod 00086c30: 00002010 mfhi r4 00086c34: 00031c00 sll r3,r3,0x10 00086c38: 00033c03 sra r7,r3,0x10 00086c3c: 00f20018 mult r7,r18 Ymod * 92494293 00086c40: 9226007e lbu r6,0x007e(r17) load map level 00086c44: 000217c3 sra r2,r2,0x1f 00086c48: 00031fc3 sra r3,r3,0x1f 00086c4c: 00852021 addu r4,r4,r5 00086c50: 00042103 sra r4,r4,0x04 00086c54: 00822023 subu r4,r4,r2 00086c58: 00042400 sll r4,r4,0x10 00086c5c: 00042403 sra r4,r4,0x10 00086c60: 00002810 mfhi r5 00086c64: 00a72821 addu r5,r5,r7 00086c68: 00052903 sra r5,r5,0x04 00086c6c: 00a32823 subu r5,r5,r3 00086c70: 00052c00 sll r5,r5,0x10 00086c74: 0c060fed jal 0x00183fb4 get tile's data pointer 00086c78: 00052c03 sra r5,r5,0x10 00086c7c: 9223007f lbu r3,0x007f(r17) load ?? 00086c80: 00000000 nop 00086c84: 1060000e beq r3,r0,0x00086cc0 branch if ?? 00086c88: 00408021 addu r16,r2,r0 00086c8c: 92020000 lbu r2,0x0000(r16) load tile type? 00086c90: 00000000 nop 00086c94: 30420040 andi r2,r2,0x0040 00086c98: 10400005 beq r2,r0,0x00086cb0 branch if not 0x40? 00086c9c: 27a40020 addiu r4,r29,0x0020 If tile = 0x40 00086ca0: 0c01edaa jal 0x0007b6a8 some calculations 00086ca4: 27a50028 addiu r5,r29,0x0028 00086ca8: 08021b3b j 0x00086cec 00086cac: 00000000 nop 00086cb0: 0c01eda2 jal 0x0007b688 same as 7b6a8 but different input value 00086cb4: 27a50028 addiu r5,r29,0x0028 00086cb8: 08021b3b j 0x00086cec 00086cbc: 00000000 nop 00086cc0: 92020000 lbu r2,0x0000(r16) load tile type 00086cc4: 00000000 nop 00086cc8: 30420040 andi r2,r2,0x0040 00086ccc: 10400005 beq r2,r0,0x00086ce4 branch if not 0x40 00086cd0: 27a40020 addiu r4,r29,0x0020 00086cd4: 0c01ee53 jal 0x0007b94c distance calculations? 00086cd8: 27a50028 addiu r5,r29,0x0028 00086cdc: 08021b3b j 0x00086cec 00086ce0: 00000000 nop 00086ce4: 0c01ee4b jal 0x0007b92c some calculation based on 80097786 00086ce8: 27a50028 addiu r5,r29,0x0028 Move in water 00086cec: 8e240134 lw r4,0x0134(r17) load unit data 00086cf0: 00000000 nop 00086cf4: 1080001d beq r4,r0,0x00086d6c 00086cf8: 00000000 nop 00086cfc: 0c05fc08 jal 0x0017f020 float/fly movements 00086d00: 00000000 nop 00086d04: 00401821 addu r3,r2,r0 00086d08: 30620010 andi r2,r3,0x0010 00086d0c: 10400009 beq r2,r0,0x00086d34 branch if not move in water? 00086d10: 30620040 andi r2,r3,0x0040 00086d14: 92020003 lbu r2,0x0003(r16) load depth 00086d18: 00000000 nop 00086d1c: 304200e0 andi r2,r2,0x00e0 remove some depth flag 00086d20: 10400013 beq r2,r0,0x00086d70 branch if depth = 0? 00086d24: 27a40028 addiu r4,r29,0x0028 00086d28: 97a2002a lhu r2,0x002a(r29) 00086d2c: 08021b5a j 0x00086d68 00086d30: 2442fff4 addiu r2,r2,0xfff4 00086d34: 1440000e bne r2,r0,0x00086d70 branch if has float? 00086d38: 27a40028 addiu r4,r29,0x0028 00086d3c: 30620020 andi r2,r3,0x0020 00086d40: 1440000c bne r2,r0,0x00086d74 branch if has walk on water? 00086d44: 27a50010 addiu r5,r29,0x0010 00086d48: 92020003 lbu r2,0x0003(r16) load depth 00086d4c: 00000000 nop 00086d50: 00021142 srl r2,r2,0x05 00086d54: 00021840 sll r3,r2,0x01 00086d58: 00621821 addu r3,r3,r2 00086d5c: 97a2002a lhu r2,0x002a(r29) 00086d60: 00031880 sll r3,r3,0x02 00086d64: 00431023 subu r2,r2,r3 00086d68: a7a2002a sh r2,0x002a(r29) 00086d6c: 27a40028 addiu r4,r29,0x0028 00086d70: 27a50010 addiu r5,r29,0x0010 00086d74: 0c00755e jal 0x0001d578 multiply translation vector/matrix 00086d78: 27a60030 addiu r6,r29,0x0030 00086d7c: 8fa20018 lw r2,0x0018(r29) 00086d80: 00000000 nop 00086d84: 04410002 bgez r2,0x00086d90 00086d88: 00000000 nop 00086d8c: 24420003 addiu r2,r2,0x0003 00086d90: 00021083 sra r2,r2,0x02 00086d94: ae220128 sw r2,0x0128(r17) 00086d98: 8e310000 lw r17,0x0000(r17) get previous units misc data 00086d9c: 00000000 nop 00086da0: 1620ff7a bne r17,r0,0x00086b8c branch if not first unit 00086da4: 27b00020 addiu r16,r29,0x0020 00086da8: 8fbf0044 lw r31,0x0044(r29) 00086dac: 8fb20040 lw r18,0x0040(r29) 00086db0: 8fb1003c lw r17,0x003c(r29) 00086db4: 8fb00038 lw r16,0x0038(r29) 00086db8: 27bd0048 addiu r29,r29,0x0048 00086dbc: 03e00008 jr r31 00086dc0: 00000000 nop