Range Panel Validation
Jump to navigation
Jump to search
r4 = Caster X +/- r5 = Caster Y +/- r6 = Height- r7 = Height+ 00179c9c: 00805021 addu r10,r4,r0 r10 = X 00179ca0: 05400036 bltz r10,0x00179d7c Quit if X is negative 00179ca4: 00a05821 addu r11,r5,r0 r11 = Y 00179ca8: 3c02800e lui r2,0x800e 00179cac: 90424e9c lbu r2,0x4e9c(r2) r2 = Max Map X 00179cb0: 00000000 nop 00179cb4: 0142102a slt r2,r10,r2 If X < Max X 00179cb8: 10400030 beq r2,r0,0x00179d7c Quit if False 00179cbc: 00000000 nop 00179cc0: 0560002e bltz r11,0x00179d7c Quit if Y is negative 00179cc4: 00000000 nop 00179cc8: 3c02800e lui r2,0x800e 00179ccc: 90424ea0 lbu r2,0x4ea0(r2) r2 = Max Map Y 00179cd0: 00000000 nop 00179cd4: 0162102a slt r2,r11,r2 If Y < Max Y 00179cd8: 10400028 beq r2,r0,0x00179d7c Quit if False 00179cdc: 00000000 nop 00179ce0: 04c10002 bgez r6,0x00179cec If Height- is negative 00179ce4: 00004021 addu r8,r0,r0 r8 = Low Tile (0) or High Tile (1) 00179ce8: 00003021 addu r6,r0,r0 Height- = 0 00179cec: 3c0e8019 lui r14,0x8019 00179cf0: 25cef8cc addiu r14,r14,-0x0734 r14 = Tile data (18f8cc) 00179cf4: 3c0d8019 lui r13,0x8019 00179cf8: 25ad2dd8 addiu r13,r13,0x2dd8 r13 = Tile Grid Data (192dd8) 00179cfc: 340c0001 ori r12,r0,0x0001 r12 = 1 00179d00: 3c02800e lui r2,0x800e 00179d04: 90424e9c lbu r2,0x4e9c(r2) r2 = Max Map X 00179d08: 00000000 nop 00179d0c: 01620018 mult r11,r2 Y * Max X 00179d10: 00081a00 sll r3,r8,0x08 r3 = Low(0) or High Tile(0x100) 00179d14: 00001012 mflo r2 00179d18: 00621821 addu r3,r3,r2 (Y * Max X) + Low/High 00179d1c: 006a1821 addu r3,r3,r10 (Y * Max X) + Low/High + X 00179d20: 000328c0 sll r5,r3,0x03 00179d24: 00ae2821 addu r5,r5,r14 r5 = Tile data 00179d28: 00031080 sll r2,r3,0x02 00179d2c: 00431021 addu r2,r2,r3 00179d30: 004d4821 addu r9,r2,r13 r9 = Tile Grid data 00179d34: 90a40002 lbu r4,0x0002(r5) r4 = Height 00179d38: 90a30003 lbu r3,0x0003(r5) r3 = Height(halves) 00179d3c: 00042040 sll r4,r4,0x01 00179d40: 3062001f andi r2,r3,0x001f r2 = Halves (ignore depth) 00179d44: 00822021 addu r4,r4,r2 r4 = Height + Halves 00179d48: 00031942 srl r3,r3,0x05 r3 = Depth (ignore halves) 00179d4c: 00031840 sll r3,r3,0x01 00179d50: 00832021 addu r4,r4,r3 r4 = Height + Halves + Depth 00179d54: 0086102a slt r2,r4,r6 If Caster Height < Height- 00179d58: 14400005 bne r2,r0,0x00179d70 Branch if True 00179d5c: 25080001 addiu r8,r8,0x0001 r8 = High Tile(1) 00179d60: 00e4102a slt r2,r7,r4 If Height+ < Caster Height 00179d64: 14400003 bne r2,r0,0x00179d74 Branch if True 00179d68: 29020002 slti r2,r8,0x0002 If not High Tile yet 00179d6c: a12c0000 sb r12,0x0000(r9) Tile is approved for Range 00179d70: 29020002 slti r2,r8,0x0002 If not High Tile yet 00179d74: 1440ffe2 bne r2,r0,0x00179d00 Branch back if True 00179d78: 00000000 nop 00179d7c: 03e00008 jr r31 00179d80: 00000000 nop