Vertical Fixed Routine
Jump to navigation
Jump to search
Vertical Fixed Routine r4 = Caster X r5 = Caster Y 0017a7bc: 308400ff andi r4,r4,0x00ff r4 = Caster X 0017a7c0: 30a500ff andi r5,r5,0x00ff r5 = Caster Y 0017a7c4: 00a05021 addu r10,r5,r0 r10 = Caster Y 0017a7c8: 2406ffe1 addiu r6,r0,-0x001f r6 = -0x001f 0017a7cc: 3c0c8019 lui r12,0x8019 0017a7d0: 258c2dd8 addiu r12,r12,0x2dd8 r12 = Tile Grid Data (0x192dd8) 0017a7d4: 258d0500 addiu r13,r12,0x0500 r13 = 0x1932d8 (?) 0017a7d8: 340b0001 ori r11,r0,0x0001 r11 = True 0017a7dc: 3c08800e lui r8,0x800e 0017a7e0: 91084e9c lbu r8,0x4e9c(r8) r8 = Max Map X 0017a7e4: 00000000 nop 0017a7e8: 01480018 mult r10,r8 Caster Y * Max X 0017a7ec: 00864821 addu r9,r4,r6 r9 = Caster X - 0x001f 0017a7f0: 00001012 mflo r2 0017a7f4: 00491821 addu r3,r2,r9 r3 = (Caster Y * Max X) + (Caster X - 0x001f) 0017a7f8: 00031080 sll r2,r3,0x02 0017a7fc: 00433821 addu r7,r2,r3 r7 = Tile ID 0017a800: 0520000a bltz r9,0x0017a82c Branch if Caster X -0x1f is negative 0017a804: 00ec1821 addu r3,r7,r12 r3 = Current Tile Data 0017a808: 0128102a slt r2,r9,r8 If Caster X- < Max X 0017a80c: 10400007 beq r2,r0,0x0017a82c Branch if False 0017a810: 00000000 nop 0017a814: 90620000 lbu r2,0x0000(r3) r2 = Current Tile's Range 0017a818: 00000000 nop 0017a81c: 10400003 beq r2,r0,0x0017a82c Branch if no Range 0017a820: 00ed1021 addu r2,r7,r13 r2 = Tile ID + 0x500 0017a824: a06b0001 sb r11,0x0001(r3) Current Tile = Targeted 0017a828: a04b0001 sb r11,0x0001(r2) Current Tile + 0x500 = Targeted 0017a82c: 24c60001 addiu r6,r6,0x0001 r6++ 0017a830: 28c20020 slti r2,r6,0x0020 if r6 < 0x20 0017a834: 1440ffe9 bne r2,r0,0x0017a7dc Branch if True 0017a838: 00804821 addu r9,r4,r0 r9 = Caster X 0017a83c: 2406ffe1 addiu r6,r0,-0x001f r6 = -0x001f 0017a840: 3c088019 lui r8,0x8019 0017a844: 25082dd8 addiu r8,r8,0x2dd8 r8 = Tile Grid Data (0x192dd8) 0017a848: 250b0500 addiu r11,r8,0x0500 r11 = 0x1932d8 (?) 0017a84c: 34070001 ori r7,r0,0x0001 r7 = True 0017a850: 3c02800e lui r2,0x800e 0017a854: 90424e9c lbu r2,0x4e9c(r2) r2 = Max Map X 0017a858: 00a65021 addu r10,r5,r6 r10 = Caster Y - 0x001f 0017a85c: 01420018 mult r10,r2 (Caster Y - 0x001f) * Max X 0017a860: 00001012 mflo r2 0017a864: 00491821 addu r3,r2,r9 r3 = (Caster Y - 0x001f) * Max X + Caster X 0017a868: 00031080 sll r2,r3,0x02 r2 = Tile ID 0017a86c: 00432021 addu r4,r2,r3 r4 = Tile ID + Tile ID 0017a870: 0540000d bltz r10,0x0017a8a8 Branch if (Caster Y - 0x001f) is negative 0017a874: 00881821 addu r3,r4,r8 r3 = Current Tile Data 0017a878: 3c02800e lui r2,0x800e 0017a87c: 90424ea0 lbu r2,0x4ea0(r2) r2 = Max Map Y 0017a880: 00000000 nop 0017a884: 0142102a slt r2,r10,r2 If (Caster Y - 0x001f) < Max Y 0017a888: 10400007 beq r2,r0,0x0017a8a8 Branch if False 0017a88c: 00000000 nop 0017a890: 90620000 lbu r2,0x0000(r3) r2 = Current Tile's Range 0017a894: 00000000 nop 0017a898: 10400003 beq r2,r0,0x0017a8a8 Branch if Range = 0 0017a89c: 008b1021 addu r2,r4,r11 r2 = Current Tile Data + 0x500 0017a8a0: a0670001 sb r7,0x0001(r3) Current Tile = Targeted 0017a8a4: a0470001 sb r7,0x0001(r2) Current Tile + 0x500 = Targeted 0017a8a8: 24c60001 addiu r6,r6,0x0001 r6++ 0017a8ac: 28c20020 slti r2,r6,0x0020 If r6 < 0x20 0017a8b0: 1440ffe7 bne r2,r0,0x0017a850 Branch Back if True 0017a8b4: 00000000 nop 0017a8b8: 03e00008 jr r31 0017a8bc: 00000000 nop