X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fscripting%2Ffunctions.cpp;h=b88070c4cb95c2bc24ba49574b03d617829c4404;hb=4ea7f61e85d522a60bed03d12878cae7ed7bc3ad;hp=245feac382fe7db55025900b36cb6f5227dfffdc;hpb=279b6366abe71756cb26a841cda8ed63128cb52d;p=supertux.git diff --git a/src/scripting/functions.cpp b/src/scripting/functions.cpp index 245feac38..b88070c4c 100644 --- a/src/scripting/functions.cpp +++ b/src/scripting/functions.cpp @@ -36,9 +36,7 @@ #include "scripting/squirrel_util.hpp" #include "scripting/time_scheduler.hpp" -extern float g_game_speed; - -namespace Scripting { +namespace scripting { SQInteger display(HSQUIRRELVM vm) { @@ -89,7 +87,7 @@ void abort_screenfade() std::string translate(const std::string& text) { - return dictionary_manager.get_dictionary().translate(text); + return dictionary_manager->get_dictionary().translate(text); } void display_text_file(const std::string& filename) @@ -99,7 +97,7 @@ void display_text_file(const std::string& filename) void load_worldmap(const std::string& filename) { - using namespace WorldMapNS; + using namespace worldmap; g_screen_manager->push_screen(new WorldMap(filename)); } @@ -152,7 +150,7 @@ void debug_draw_solids_only(bool enable) void debug_worldmap_ghost(bool enable) { - using namespace WorldMapNS; + using namespace worldmap; if(WorldMap::current() == NULL) throw std::runtime_error("Can't change ghost mode without active WorldMap"); @@ -162,7 +160,7 @@ void debug_worldmap_ghost(bool enable) void save_state() { - using namespace WorldMapNS; + using namespace worldmap; if(World::current() == NULL || WorldMap::current() == NULL) throw std::runtime_error("Can't save state without active World"); @@ -173,7 +171,7 @@ void save_state() void update_worldmap() { - using namespace WorldMapNS; + using namespace worldmap; if(WorldMap::current() == NULL) throw std::runtime_error("Can't update Worldmap: none active"); @@ -212,7 +210,7 @@ void play_sound(const std::string& filename) void grease() { if (!validate_sector_player()) return; - ::Player* tux = Sector::current()->player; // Scripting::Player != ::Player + ::Player* tux = Sector::current()->player; // scripting::Player != ::Player tux->get_physic().set_velocity_x(tux->get_physic().get_velocity_x()*3); }