diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/script_system.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/script_system.cpp b/src/script_system.cpp index 3325b79..50ea60a 100644 --- a/src/script_system.cpp +++ b/src/script_system.cpp | |||
@@ -22,6 +22,11 @@ ScriptSystem::ScriptSystem(Game& game) : game_(game) { | |||
22 | "x", [] (const vec2i& v) { return v.x(); }, | 22 | "x", [] (const vec2i& v) { return v.x(); }, |
23 | "y", [] (const vec2i& v) { return v.y(); }); | 23 | "y", [] (const vec2i& v) { return v.y(); }); |
24 | 24 | ||
25 | engine_.new_usertype<Zone>( | ||
26 | "zone", | ||
27 | "ul", &Zone::ul, | ||
28 | "dr", &Zone::dr); | ||
29 | |||
25 | engine_.new_usertype<SpriteFrame>( | 30 | engine_.new_usertype<SpriteFrame>( |
26 | "spriteframe", | 31 | "spriteframe", |
27 | "center", &SpriteFrame::center, | 32 | "center", &SpriteFrame::center, |
@@ -117,9 +122,11 @@ ScriptSystem::ScriptSystem(Game& game) : game_(game) { | |||
117 | 122 | ||
118 | engine_.new_usertype<Map>( | 123 | engine_.new_usertype<Map>( |
119 | "map", | 124 | "map", |
125 | "getName", &Map::getName, | ||
120 | "getWarpPoint", &Map::getWarpPoint, | 126 | "getWarpPoint", &Map::getWarpPoint, |
121 | "hasMusic", &Map::hasMusic, | 127 | "hasMusic", &Map::hasMusic, |
122 | "getMusic", &Map::getMusic); | 128 | "getMusic", &Map::getMusic, |
129 | "getZone", &Map::getZone); | ||
123 | 130 | ||
124 | engine_.set_function( | 131 | engine_.set_function( |
125 | "message", | 132 | "message", |