summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPixel <pixel@nobis-crew.org>2013-06-22 20:57:20 -0700
committerPixel <pixel@nobis-crew.org>2013-06-22 20:57:20 -0700
commit1a315c0460c96e81797d0e5fc3d6874f4aa6cf44 (patch)
tree77ef20aafc11026ce3750dbbf83bde353a9c7984
parentec9fd39b37b1ec047e13fcd2a6dbf0763e82afad (diff)
Taking the 'var' argument into account.
-rw-r--r--VP-roomwork.lua16
1 files changed, 8 insertions, 8 deletions
diff --git a/VP-roomwork.lua b/VP-roomwork.lua
index 2986d9d..839b5af 100644
--- a/VP-roomwork.lua
+++ b/VP-roomwork.lua
@@ -42,10 +42,10 @@ function patch_logic(logic, windows, activate_debug)
if not window then return end
- psh5 = orB(andB(psh5, 0xff800000), window.x)
- psh4 = orB(andB(psh4, 0xff800000), window.y)
- psh3 = orB(andB(psh3, 0xff800000), window.width)
- psh2 = orB(andB(psh2, 0xff800000), window.height)
+ if window.x and window.x ~= "var" then psh5 = orB(andB(psh5, 0xff800000), window.x) end
+ if window.y and window.y ~= "var" then psh4 = orB(andB(psh4, 0xff800000), window.y) end
+ if window.width and window.width ~= "var" then psh3 = orB(andB(psh3, 0xff800000), window.width) end
+ if window.height and window.height ~= "var" then psh2 = orB(andB(psh2, 0xff800000), window.height) end
patch_opcode(PC - 2, psh2)
patch_opcode(PC - 3, psh3)
@@ -86,10 +86,10 @@ function patch_logic(logic, windows, activate_debug)
local window = windows[txtptr + ptr_start]
if not window then return end
- if andB(psh3, 0xff000000) ~= 0x0B000000 and window.height then psh3 = orB(andB(psh3, 0xff800000), window.height) end
- if andB(psh4, 0xff000000) ~= 0x0B000000 and window.width then psh4 = orB(andB(psh4, 0xff800000), window.width) end
- if andB(psh5, 0xff000000) ~= 0x0B000000 and window.y then psh5 = orB(andB(psh5, 0xff800000), window.y) end
- if andB(psh6, 0xff000000) ~= 0x0B000000 and window.x then psh6 = orB(andB(psh6, 0xff800000), window.x) end
+ if andB(psh3, 0xff000000) ~= 0x0B000000 and window.height and window.height ~= "var" then psh3 = orB(andB(psh3, 0xff800000), window.height) end
+ if andB(psh4, 0xff000000) ~= 0x0B000000 and window.width and window.width ~= "var" then psh4 = orB(andB(psh4, 0xff800000), window.width) end
+ if andB(psh5, 0xff000000) ~= 0x0B000000 and window.y and window.y ~= "var" then psh5 = orB(andB(psh5, 0xff800000), window.y) end
+ if andB(psh6, 0xff000000) ~= 0x0B000000 and window.x and window.x ~= "var" then psh6 = orB(andB(psh6, 0xff800000), window.x) end
patch_opcode(PC - 3, psh3)
patch_opcode(PC - 4, psh4)