X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fsupertux%2Fsector.cpp;h=717c12172d9c64e6f2a841247c75eadbc81cc280;hb=13e56e5b8d9727128667bb42c3aa4850b4a8dd00;hp=24c43ab751856427074d125686af05365b36e320;hpb=045255cdf0a58161b908d769bc0bde1778c33e14;p=supertux.git diff --git a/src/supertux/sector.cpp b/src/supertux/sector.cpp index 24c43ab75..717c12172 100644 --- a/src/supertux/sector.cpp +++ b/src/supertux/sector.cpp @@ -90,25 +90,25 @@ Sector::Sector(Level* parent) : sound_manager->preload("sounds/shoot.wav"); // create a new squirrel table for the sector - using namespace Scripting; + using namespace scripting; sq_collectgarbage(global_vm); sq_newtable(global_vm); sq_pushroottable(global_vm); if(SQ_FAILED(sq_setdelegate(global_vm, -2))) - throw Scripting::SquirrelError(global_vm, "Couldn't set sector_table delegate"); + throw scripting::SquirrelError(global_vm, "Couldn't set sector_table delegate"); sq_resetobject(§or_table); if(SQ_FAILED(sq_getstackobj(global_vm, -1, §or_table))) - throw Scripting::SquirrelError(global_vm, "Couldn't get sector table"); + throw scripting::SquirrelError(global_vm, "Couldn't get sector table"); sq_addref(global_vm, §or_table); sq_pop(global_vm, 1); } Sector::~Sector() { - using namespace Scripting; + using namespace scripting; deactivate(); @@ -465,7 +465,7 @@ Sector::fix_old_tiles() HSQUIRRELVM Sector::run_script(std::istream& in, const std::string& sourcename) { - using namespace Scripting; + using namespace scripting; // garbage collect thread list for(ScriptList::iterator i = scripts.begin(); @@ -555,12 +555,12 @@ Sector::activate(const Vector& player_pos) _current = this; // register sectortable as sector in scripting - HSQUIRRELVM vm = Scripting::global_vm; + HSQUIRRELVM vm = scripting::global_vm; sq_pushroottable(vm); sq_pushstring(vm, "sector", -1); sq_pushobject(vm, sector_table); if(SQ_FAILED(sq_createslot(vm, -3))) - throw Scripting::SquirrelError(vm, "Couldn't set sector in roottable"); + throw scripting::SquirrelError(vm, "Couldn't set sector in roottable"); sq_pop(vm, 1); for(GameObjects::iterator i = gameobjects.begin(); @@ -616,11 +616,11 @@ Sector::deactivate() return; // remove sector entry from global vm - HSQUIRRELVM vm = Scripting::global_vm; + HSQUIRRELVM vm = scripting::global_vm; sq_pushroottable(vm); sq_pushstring(vm, "sector", -1); if(SQ_FAILED(sq_deleteslot(vm, -2, SQFalse))) - throw Scripting::SquirrelError(vm, "Couldn't unset sector in roottable"); + throw scripting::SquirrelError(vm, "Couldn't unset sector in roottable"); sq_pop(vm, 1); for(GameObjects::iterator i = gameobjects.begin(); @@ -768,7 +768,7 @@ Sector::try_expose(GameObject* object) { ScriptInterface* interface = dynamic_cast (object); if(interface != NULL) { - HSQUIRRELVM vm = Scripting::global_vm; + HSQUIRRELVM vm = scripting::global_vm; sq_pushobject(vm, sector_table); interface->expose(vm, -1); sq_pop(vm, 1); @@ -778,9 +778,9 @@ Sector::try_expose(GameObject* object) void Sector::try_expose_me() { - HSQUIRRELVM vm = Scripting::global_vm; + HSQUIRRELVM vm = scripting::global_vm; sq_pushobject(vm, sector_table); - Scripting::SSector* interface = static_cast (this); + scripting::SSector* interface = static_cast (this); expose_object(vm, -1, interface, "settings", false); sq_pop(vm, 1); } @@ -811,7 +811,7 @@ Sector::try_unexpose(GameObject* object) { ScriptInterface* interface = dynamic_cast (object); if(interface != NULL) { - HSQUIRRELVM vm = Scripting::global_vm; + HSQUIRRELVM vm = scripting::global_vm; SQInteger oldtop = sq_gettop(vm); sq_pushobject(vm, sector_table); try { @@ -826,11 +826,11 @@ Sector::try_unexpose(GameObject* object) void Sector::try_unexpose_me() { - HSQUIRRELVM vm = Scripting::global_vm; + HSQUIRRELVM vm = scripting::global_vm; SQInteger oldtop = sq_gettop(vm); sq_pushobject(vm, sector_table); try { - Scripting::unexpose_object(vm, -1, "settings"); + scripting::unexpose_object(vm, -1, "settings"); } catch(std::exception& e) { log_warning << "Couldn't unregister object: " << e.what() << std::endl; }