Check Vert Tolerance and if Tiles can be Chosen
Jump to navigation
Jump to search
Check Vert Tolerance and if Tiles can be Chosen 001792a4: 30a500ff andi r5,r5,0x00ff r5 = Ability Vertical 001792a8: 00052840 sll r5,r5,0x01 Vert * 2 001792ac: 308a00ff andi r10,r4,0x00ff r10 = Origin Height 001792b0: 00005821 addu r11,r0,r0 Tile Counter = 0 001792b4: 3c0e8019 lui r14,0x8019 001792b8: 25cef8cc addiu r14,r14,0xf8cc r14 = Tile Data Pointer 001792bc: 3c098019 lui r9,0x8019 001792c0: 25292dd8 addiu r9,r9,0x2dd8 r9 = ? Tile Data Pointer 001792c4: 01207821 addu r15,r9,r0 r15 = ? Tile Data Pointer 001792c8: 340d0500 ori r13,r0,0x0500 High ? Tile Mod = 0x500 001792cc: 340c0800 ori r12,r0,0x0800 High Tile Mod = 0x800 001792d0: 000b10c0 sll r2,r11,0x03 Tile Counter * 8 001792d4: 004e1821 addu r3,r2,r14 001792d8: 90620006 lbu r2,0x0006(r3) Load Tile's ? 001792dc: 00000000 nop 001792e0: 30420001 andi r2,r2,0x0001 001792e4: 1440000a bne r2,r0,0x 00179310 Branch if Tile cannot be targeted 001792e8: 2407ff01 addiu r7,r0,0xff01 Low Height = -255 001792ec: 90640002 lbu r4,0x0002(r3) Load Tile's Height 001792f0: 90630003 lbu r3,0x0003(r3) Load Tile's Halves + Depth 001792f4: 00042040 sll r4,r4,0x01 Height * 2 001792f8: 3062001f andi r2,r3,0x001f r2 = Halves 001792fc: 00822021 addu r4,r4,r2 Height * 2 + Halves 00179300: 00031942 srl r3,r3,0x05 r3 = Depth 00179304: 00031840 sll r3,r3,0x01 Depth * 2 00179308: 0805e4c6 j 0x 00179318 0017930c: 00833821 addu r7,r4,r3 Low Height = Height * 2 + Halves + Depth * 2 00179310: a1200000 sb r0,0x0000(r9) Store Low AoE = 0 00179314: a1200001 sb r0,0x0001(r9) Store Low Tile Targeted? = False 00179318: 018e1821 addu r3,r12,r14 r3 = Higher Elevation Tile Pointer 0017931c: 90620006 lbu r2,0x0006(r3) Load Tile's ? 00179320: 00000000 nop 00179324: 30420001 andi r2,r2,0x0001 00179328: 1440000a bne r2,r0,0x 00179354 Branch if Tile can't be targeted 0017932c: 01af4021 addu r8,r13,r15 r8 = Higher Elevation ? Tile Pointer 00179330: 90640002 lbu r4,0x0002(r3) Load Tile's Height 00179334: 90630003 lbu r3,0x0003(r3) Load Tile's Halves + Depth 00179338: 00042040 sll r4,r4,0x01 Height * 2 0017933c: 3062001f andi r2,r3,0x001f r2 = Halves 00179340: 00822021 addu r4,r4,r2 Height * 2 + Halves 00179344: 00031942 srl r3,r3,0x05 r3 = Depth 00179348: 00031840 sll r3,r3,0x01 Depth * 2 0017934c: 0805e4d8 j 0x 00179360 00179350: 00832021 addu r4,r4,r3 Tile Height = Height * 2 + Halves + Depth * 2 00179354: 2404ff01 addiu r4,r0,0xff01 High Height = -255 00179358: a1000000 sb r0,0x0000(r8) Store High AoE = 0 0017935c: a1000001 sb r0,0x0001(r8) Store High Tile Targeted? = False 00179360: 10c00006 beq r6,r0,0x 0017937c Branch if Top-down Targeting = False 00179364: 00e4102a slt r2,r7,r4 00179368: 14400003 bne r2,r0,0x 00179378 Branch if Low Height < High Height 0017936c: 00000000 nop (basically target from top down) 00179370: 0805e4df j 0x 0017937c 00179374: 2404ff01 addiu r4,r0,0xff01 High Height = -255 00179378: 2407ff01 addiu r7,r0,0xff01 Low Height = -255 0017937c: 00ea102a slt r2,r7,r10 00179380: 14400002 bne r2,r0,0x 0017938c Branch if Low Height < Origin Height 00179384: 01471823 subu r3,r10,r7 Low Vert = Origin Height - Low Height 00179388: 00ea1823 subu r3,r7,r10 Low Vert = Low Height - Origin Height 0017938c: 008a102a slt r2,r4,r10 00179390: 14400003 bne r2,r0,0x 001793a0 Branch if High Height < Origin Height 00179394: 00000000 nop 00179398: 0805e4e9 j 0x 001793a4 0017939c: 008a2023 subu r4,r4,r10 High Vert = High Height - Origin Height 001793a0: 01442023 subu r4,r10,r4 High Vert = Origin Height - High Height 001793a4: 0083102a slt r2,r4,r3 001793a8: 10400007 beq r2,r0,0x 001793c8 Branch if High Vert >= Low Vert 001793ac: 00a4102a slt r2,r5,r4 001793b0: a1200000 sb r0,0x0000(r9) Store Low AoE = 0 001793b4: 1040000a beq r2,r0,0x 001793e0 Branch if Ability Vert >= High Vert 001793b8: a1200001 sb r0,0x0001(r9) Store Low Tile Targeted? = False 001793bc: a1000000 sb r0,0x0000(r8) Store High AoE = 0 001793c0: 0805e4f8 j 0x 001793e0 001793c4: a1000001 sb r0,0x0001(r8) Store High Tile Targeted? = False 001793c8: 00a3102a slt r2,r5,r3 001793cc: a1000000 sb r0,0x0000(r8) Store High AoE = 0 001793d0: 10400003 beq r2,r0,0x 001793e0 Branch if Ability Vert >= Low Vert 001793d4: a1000001 sb r0,0x0001(r8) Store High Tile Targeted? = False 001793d8: a1200000 sb r0,0x0000(r9) Store Low AoE = 0 001793dc: a1200001 sb r0,0x0001(r9) Store Low Tile Targeted? = False 001793e0: 25290005 addiu r9,r9,0x0005 Low Tile Pointer += 5 001793e4: 25ad0005 addiu r13,r13,0x0005 High ? Tile Mod += 5 001793e8: 256b0001 addiu r11,r11,0x0001 Tile Counter ++ 001793ec: 29620100 slti r2,r11,0x0100 001793f0: 1440ffb7 bne r2,r0,0x 001792d0 Branch if Tile Counter < 0x100 001793f4: 258c0008 addiu r12,r12,0x0008 High Tile Mod += 8 001793f8: 03e00008 jr r31 001793fc: 00000000 nop