]> Dogcows Code - chaz/yoink/blobdiff - src/Moof/Script.hh
converted tilemap scripts to lua
[chaz/yoink] / src / Moof / Script.hh
index 553e31a0717be1b242a5e0f8a2377212f4492157..2fe275e161aae3a7bd0e14bd15d94dd7907692cb 100644 (file)
@@ -126,6 +126,18 @@ struct Script
                        index(i),
                        state(s) {}
 
+               /**
+                * A copied value presently points to the same value, except the real
+                * index is used.  That means that if a value that refers to a frame
+                * referenced from the top of the stack will have its normalized index
+                * copied into the new value object.
+                */
+
+               Value(const Value& copy) :
+                       index(copy.getRealIndex()),
+                       state(copy.state) {}
+
+
                // check the type of the value
                bool isBoolean() const   { return (bool)lua_isboolean(state, index); }
                bool isFunction() const  { return (bool)lua_isfunction(state, index); }
This page took 0.018189 seconds and 4 git commands to generate.