Index: nacltoons/data/res/util.lua |
diff --git a/nacltoons/data/res/util.lua b/nacltoons/data/res/util.lua |
index da978f5189559d4f271c15c28076819c70fbdf76..eba0add30546f1d3a7a0fcd932733e68cdf13019 100644 |
--- a/nacltoons/data/res/util.lua |
+++ b/nacltoons/data/res/util.lua |
@@ -31,8 +31,12 @@ end |
--- Create CCPoint from a lua table containing 2 elements. |
-- This is used to convert point data from .def files into |
-- the cocos2dx coordinate space. |
-function util.PointFromLua(point) |
- return CCPointMake(point[1] + game_obj.origin.x, point[2] + game_obj.origin.y) |
+function util.PointFromLua(point, relative) |
+ if relative then |
+ return ccp(point[1], point[2]) |
+ else |
+ return ccp(point[1] + game_obj.origin.x, point[2] + game_obj.origin.y) |
+ end |
end |
--- Convert CCPoint to b2Vec. |
@@ -79,7 +83,6 @@ function util.TableToString(tt, ignore_keys, key_map, indent) |
table.insert(sb, string.rep (' ', indent - 2)) |
table.insert(sb, '}\n') |
return table.concat(sb) |
- |
end |
if arg then |