diff options
Diffstat (limited to 'src/script_system.cpp')
-rw-r--r-- | src/script_system.cpp | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/src/script_system.cpp b/src/script_system.cpp index 1846de2..7f9f908 100644 --- a/src/script_system.cpp +++ b/src/script_system.cpp | |||
@@ -97,7 +97,17 @@ ScriptSystem::ScriptSystem(Game& game) : game_(game) { | |||
97 | "mixer", | 97 | "mixer", |
98 | "playSound", &Mixer::playSound, | 98 | "playSound", &Mixer::playSound, |
99 | "loopSound", &Mixer::loopSound, | 99 | "loopSound", &Mixer::loopSound, |
100 | "stopChannel", &Mixer::stopChannel); | 100 | "stopChannel", &Mixer::stopChannel, |
101 | "playMusic", &Mixer::playMusic, | ||
102 | "fadeoutMusic", &Mixer::fadeoutMusic, | ||
103 | "isPlayingMusic", &Mixer::isPlayingMusic, | ||
104 | "getPlayingTrack", &Mixer::getPlayingTrack); | ||
105 | |||
106 | engine_.new_usertype<Map>( | ||
107 | "map", | ||
108 | "getWarpPoint", &Map::getWarpPoint, | ||
109 | "hasMusic", &Map::hasMusic, | ||
110 | "getMusic", &Map::getMusic); | ||
101 | 111 | ||
102 | engine_.set_function( | 112 | engine_.set_function( |
103 | "message", | 113 | "message", |
@@ -190,9 +200,9 @@ ScriptSystem::ScriptSystem(Game& game) : game_(game) { | |||
190 | }); | 200 | }); |
191 | 201 | ||
192 | engine_.set_function( | 202 | engine_.set_function( |
193 | "getWarpPoint", | 203 | "getMap", |
194 | [&] (std::string warp) { | 204 | [&] () -> const Map& { |
195 | return game_.getMap().getWarpPoint(warp); | 205 | return game_.getMap(); |
196 | }); | 206 | }); |
197 | 207 | ||
198 | engine_.set_function( | 208 | engine_.set_function( |