X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Fscripting%2Flevel.cpp;h=3c21ed0365b34e06c465df95264e612001a593a3;hb=f27ec33980c31a595f497d85b8ddee17c451975f;hp=d29e18b654c53a38764137e5af82f46d005ba786;hpb=60908c905544776c376421b8d3e12eeb936c068f;p=supertux.git diff --git a/src/scripting/level.cpp b/src/scripting/level.cpp index d29e18b65..3c21ed036 100644 --- a/src/scripting/level.cpp +++ b/src/scripting/level.cpp @@ -2,9 +2,9 @@ #include #include -#include "level.h" - -#define NOIMPL printf("%s not implemented.\n", __PRETTY_FUNCTION__); +#include "level.hpp" +#include "game_session.hpp" +#include "flip_level_transformer.hpp" namespace Scripting { @@ -15,14 +15,21 @@ namespace Scripting {} void - Level::finish() + Level::finish(bool win) + { + GameSession::current()->finish(win); + } + + void + Level::spawn(const std::string& sector, const std::string& spawnpoint) { - NOIMPL; + GameSession::current()->respawn(sector, spawnpoint); } void - Level::spawn(const std::string& , const std::string& ) + Level::flip_vertically() { - NOIMPL; + FlipLevelTransformer flip_transformer; + flip_transformer.transform(GameSession::current()->get_current_level()); } }