From: Ingo Ruhnke Date: Sat, 21 Nov 2009 02:52:01 +0000 (+0000) Subject: Renamed namespaces to all lowercase X-Git-Url: https://git.octo.it/?p=supertux.git;a=commitdiff_plain;h=13e56e5b8d9727128667bb42c3aa4850b4a8dd00 Renamed namespaces to all lowercase SVN-Revision: 6077 --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 74474820a..addf132db 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -214,7 +214,7 @@ IF(GENERATE_WRAPPER) COMMAND cd ${SUPERTUX_SOURCE_DIR} && ${CMAKE_CXX_COMPILER} ARGS -x "c++" -E -CC -DSCRIPTING_API src/scripting/wrapper.interface.hpp -o ${SUPERTUX_BINARY_DIR}/miniswig.tmp -I${SUPERTUX_SOURCE_DIR}/src COMMAND tools/miniswig/miniswig - ARGS --input miniswig.tmp --output-cpp ${SUPERTUX_SOURCE_DIR}/src/scripting/wrapper.cpp --output-hpp ${SUPERTUX_SOURCE_DIR}/src/scripting/wrapper.hpp --module supertux --select-namespace Scripting + ARGS --input miniswig.tmp --output-cpp ${SUPERTUX_SOURCE_DIR}/src/scripting/wrapper.cpp --output-hpp ${SUPERTUX_SOURCE_DIR}/src/scripting/wrapper.hpp --module supertux --select-namespace scripting DEPENDS tools/miniswig/miniswig IMPLICIT_DEPENDS CXX ${SUPERTUX_SOURCE_DIR}/src/scripting/wrapper.interface.hpp ) diff --git a/SConscript b/SConscript index 08da37b0a..69b425af2 100644 --- a/SConscript +++ b/SConscript @@ -20,9 +20,10 @@ class Project: self.build_tinygettext() self.build_binreloc() self.build_findlocale() + self.build_miniswig() self.build_supertux() self.build_tests() - + def build_tinygettext(self): env = Environment(CPPPATH=[".", "src"]) env.ParseConfig("sdl-config --libs --cflags") @@ -43,6 +44,37 @@ class Project: Glob("external/squirrel/sqstdlib/*.cpp") + Glob("external/squirrel/sqstdlib/*.c")) + def build_miniswig(self): + env = Environment(CPPPATH=[".", "tools/miniswig/"]) + miniswig_bin = env.Program('miniswig', + ['tools/miniswig/parser.yy', + 'tools/miniswig/lexer.ll', + 'tools/miniswig/create_docu.cpp', + 'tools/miniswig/xmlwriter.cpp', + 'tools/miniswig/create_wrapper.cpp', + 'tools/miniswig/main.cpp', + 'tools/miniswig/tree.cpp']) + + # env = self.env.Clone() + # env.Append(MINISWIG=miniswig_bin) + + # env.Depends(env.Command('src/scripting/miniswig.tmp', 'src/scripting/wrapper.interface.hpp', + # ["$CXX -E -Isrc/ -x c -CC $SOURCE -o $TARGET -DSCRIPTING_API"]), + # ['src/scripting/interface.hpp', + # 'src/scripting/game_objects.hpp']) + + # env.Depends(env.Command(['src/scripting/wrapper.cpp', 'src/scripting/wrapper.hpp'], 'src/scripting/miniswig.tmp', + # ["$MINISWIG --input $SOURCE --output-cpp ${TARGETS[0]} --output-hpp ${TARGETS[1]} "+ + # "--module windstille --select-namespace Scripting"]), + # miniswig_bin) + + # g++ -x "c++" -E -CC -DSCRIPTING_API src/scripting/wrapper.interface.hpp -o miniswig.tmp -Isrc + # tools/miniswig/miniswig --input miniswig.tmp \ + # --output-cpp src/scripting/wrapper.cpp \ + # --output-hpp src/scripting/wrapper.hpp \ + # --module supertux \ + # --select-namespace scripting + def build_supertux(self): self.env = Environment(CPPPATH=["external/squirrel/include/", "external/findlocale/", @@ -52,13 +84,13 @@ class Project: "src/", "/usr/include/AL/", # yuck "."], - CXXFLAGS=["-O0", "-g3", + CXXFLAGS=["-O2", "-g3", "-ansi", "-pedantic", "-Wall", "-Wextra", "-Wnon-virtual-dtor", - # "-Weffc++", + "-Weffc++", # "-Wconversion", "-Werror", # "-Wshadow", diff --git a/TODO b/TODO index 7eae2a48e..c735da1c4 100644 --- a/TODO +++ b/TODO @@ -118,4 +118,41 @@ supertux/ * implement PNG screenshot +* GL_ARB_texture_non_power_of_two returns 1 on MatroxG450, while it + returns "Missing" in glew info, something wrong + +SuperTux Editor +=============== + +* +/- zoom buttons do not zoom to the center of the screen + +* Object Tool should behave more like Inkscape: + + - LMB on an object to select + - LMB on the background to start a select-rectangle + - LMB+move to drag objects it around + - Shift+LMB to add an object to the selection + - RMB for context menu + +* Select Tool should be removed (identical to Object Tool) + +* replace tool crashes: + + Note: Applications can use GLib.ExceptionManager.UnhandledException to handle the exception. +System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary. + at System.Collections.Generic.Dictionary`2[System.Object,System.Single].get_Item (System.Object key) [0x00000] + at LayerListWidget.VisibilityDataFunc (Gtk.TreeViewColumn Column, Gtk.CellRenderer Renderer, TreeModel Model, TreeIter Iter) [0x00000] + at GtkSharp.TreeCellDataFuncWrapper.NativeCallback (IntPtr tree_column, IntPtr cell, IntPtr tree_model, IntPtr iter, IntPtr data) [0x00000] + at GLib.ExceptionManager.RaiseUnhandledException(System.Exception e, Boolean is_terminal) + at GtkSharp.TreeCellDataFuncWrapper.NativeCallback(IntPtr tree_column, IntPtr cell, IntPtr tree_model, IntPtr iter, IntPtr data) + at Gtk.Application.gtk_main() + at Gtk.Application.Run() + at Application.Main(System.String[] args) + +* Replace Tool should document its functions in a status bar message + +* Path Tool doesn't seem to do anything + +* Tiles Tool doesn't display the current tile + # EOF # diff --git a/src/badguy/willowisp.cpp b/src/badguy/willowisp.cpp index 3ed8f9f1a..754959398 100644 --- a/src/badguy/willowisp.cpp +++ b/src/badguy/willowisp.cpp @@ -278,7 +278,7 @@ WillOWisp::expose(HSQUIRRELVM vm, SQInteger table_idx) return; std::cout << "Expose me '" << name << "'\n"; - Scripting::WillOWisp* interface = static_cast (this); + scripting::WillOWisp* interface = static_cast (this); expose_object(vm, table_idx, interface, name); } @@ -289,7 +289,7 @@ WillOWisp::unexpose(HSQUIRRELVM vm, SQInteger table_idx) return; std::cout << "UnExpose me '" << name << "'\n"; - Scripting::unexpose_object(vm, table_idx, name); + scripting::unexpose_object(vm, table_idx, name); } IMPLEMENT_FACTORY(WillOWisp, "willowisp"); diff --git a/src/badguy/willowisp.hpp b/src/badguy/willowisp.hpp index 9076e6a8f..19e4bb133 100644 --- a/src/badguy/willowisp.hpp +++ b/src/badguy/willowisp.hpp @@ -27,7 +27,7 @@ class SoundSource; #include "supertux/script_interface.hpp" class WillOWisp : public BadGuy, - public Scripting::WillOWisp, + public scripting::WillOWisp, public ScriptInterface { public: diff --git a/src/object/ambient_sound.cpp b/src/object/ambient_sound.cpp index 942ab9a26..63c26f26c 100644 --- a/src/object/ambient_sound.cpp +++ b/src/object/ambient_sound.cpp @@ -235,14 +235,14 @@ AmbientSound::draw(DrawingContext &) void AmbientSound::expose(HSQUIRRELVM vm, SQInteger table_idx) { - Scripting::AmbientSound* interface = static_cast (this); + scripting::AmbientSound* interface = static_cast (this); expose_object(vm, table_idx, interface, name, false); } void AmbientSound::unexpose(HSQUIRRELVM vm, SQInteger table_idx) { - Scripting::unexpose_object(vm, table_idx, name); + scripting::unexpose_object(vm, table_idx, name); } void diff --git a/src/object/ambient_sound.hpp b/src/object/ambient_sound.hpp index fc7bd1f9a..8567c323c 100644 --- a/src/object/ambient_sound.hpp +++ b/src/object/ambient_sound.hpp @@ -49,7 +49,7 @@ class SoundSource; class AmbientSound : public GameObject, public ScriptInterface, - public Scripting::AmbientSound + public scripting::AmbientSound { public: AmbientSound(const Reader& lisp); diff --git a/src/object/camera.cpp b/src/object/camera.cpp index 9c858d332..4ecf5b59c 100644 --- a/src/object/camera.cpp +++ b/src/object/camera.cpp @@ -146,7 +146,7 @@ void Camera::expose(HSQUIRRELVM vm, SQInteger table_idx) { if(name.empty()) return; - Scripting::Camera* interface = new Scripting::Camera(this); + scripting::Camera* interface = new scripting::Camera(this); expose_object(vm, table_idx, interface, name, true); } @@ -154,7 +154,7 @@ void Camera::unexpose(HSQUIRRELVM vm, SQInteger table_idx) { if(name.empty()) return; - Scripting::unexpose_object(vm, table_idx, name); + scripting::unexpose_object(vm, table_idx, name); } void diff --git a/src/object/candle.cpp b/src/object/candle.cpp index f4b28a1e7..23c168597 100644 --- a/src/object/candle.cpp +++ b/src/object/candle.cpp @@ -70,7 +70,7 @@ void Candle::expose(HSQUIRRELVM vm, SQInteger table_idx) { if (name.empty()) return; - Scripting::Candle* interface = new Scripting::Candle(this); + scripting::Candle* interface = new scripting::Candle(this); expose_object(vm, table_idx, interface, name, true); } @@ -78,7 +78,7 @@ void Candle::unexpose(HSQUIRRELVM vm, SQInteger table_idx) { if (name.empty()) return; - Scripting::unexpose_object(vm, table_idx, name); + scripting::unexpose_object(vm, table_idx, name); } void diff --git a/src/object/display_effect.cpp b/src/object/display_effect.cpp index ef46f6ec9..b32e83976 100644 --- a/src/object/display_effect.cpp +++ b/src/object/display_effect.cpp @@ -44,14 +44,14 @@ void DisplayEffect::expose(HSQUIRRELVM vm, SQInteger table_idx) { if (name.empty()) return; - expose_object(vm, table_idx, dynamic_cast(this), name, false); + expose_object(vm, table_idx, dynamic_cast(this), name, false); } void DisplayEffect::unexpose(HSQUIRRELVM vm, SQInteger table_idx) { if (name.empty()) return; - Scripting::unexpose_object(vm, table_idx, name); + scripting::unexpose_object(vm, table_idx, name); } void diff --git a/src/object/display_effect.hpp b/src/object/display_effect.hpp index 3d6a8e4cf..00f471011 100644 --- a/src/object/display_effect.hpp +++ b/src/object/display_effect.hpp @@ -22,7 +22,7 @@ #include "supertux/script_interface.hpp" class DisplayEffect : public GameObject, - public Scripting::DisplayEffect, + public scripting::DisplayEffect, public ScriptInterface { public: diff --git a/src/object/level_time.cpp b/src/object/level_time.cpp index 7c39d89ab..bc32397ea 100644 --- a/src/object/level_time.cpp +++ b/src/object/level_time.cpp @@ -46,7 +46,7 @@ void LevelTime::expose(HSQUIRRELVM vm, SQInteger table_idx) { if (name.empty()) return; - Scripting::LevelTime* interface = new Scripting::LevelTime(this); + scripting::LevelTime* interface = new scripting::LevelTime(this); expose_object(vm, table_idx, interface, name, true); } @@ -54,7 +54,7 @@ void LevelTime::unexpose(HSQUIRRELVM vm, SQInteger table_idx) { if (name.empty()) return; - Scripting::unexpose_object(vm, table_idx, name); + scripting::unexpose_object(vm, table_idx, name); } void diff --git a/src/object/platform.cpp b/src/object/platform.cpp index 794ff7612..2575edcf2 100644 --- a/src/object/platform.cpp +++ b/src/object/platform.cpp @@ -133,7 +133,7 @@ void Platform::expose(HSQUIRRELVM vm, SQInteger table_idx) { if (name.empty()) return; - Scripting::Platform* interface = new Scripting::Platform(this); + scripting::Platform* interface = new scripting::Platform(this); expose_object(vm, table_idx, interface, name, true); } @@ -141,7 +141,7 @@ void Platform::unexpose(HSQUIRRELVM vm, SQInteger table_idx) { if (name.empty()) return; - Scripting::unexpose_object(vm, table_idx, name); + scripting::unexpose_object(vm, table_idx, name); } IMPLEMENT_FACTORY(Platform, "platform"); diff --git a/src/object/player.cpp b/src/object/player.cpp index a58f4aacf..e394c0e11 100644 --- a/src/object/player.cpp +++ b/src/object/player.cpp @@ -221,7 +221,7 @@ Player::expose(HSQUIRRELVM vm, SQInteger table_idx) if (name.empty()) return; - Scripting::expose_object(vm, table_idx, dynamic_cast(this), name, false); + scripting::expose_object(vm, table_idx, dynamic_cast(this), name, false); } void @@ -230,7 +230,7 @@ Player::unexpose(HSQUIRRELVM vm, SQInteger table_idx) if (name.empty()) return; - Scripting::unexpose_object(vm, table_idx, name); + scripting::unexpose_object(vm, table_idx, name); } float @@ -1366,7 +1366,7 @@ Player::bounce(BadGuy& ) physic.set_velocity_y(-300); } -//Scripting Functions Below +//scripting Functions Below void Player::deactivate() diff --git a/src/object/player.hpp b/src/object/player.hpp index 85771058f..0db526c48 100644 --- a/src/object/player.hpp +++ b/src/object/player.hpp @@ -45,7 +45,7 @@ class Camera; class PlayerStatus; class Player : public MovingObject, - public Scripting::Player, + public scripting::Player, public ScriptInterface { public: diff --git a/src/object/scripted_object.cpp b/src/object/scripted_object.cpp index 56a1fd5da..726a21ba6 100644 --- a/src/object/scripted_object.cpp +++ b/src/object/scripted_object.cpp @@ -59,14 +59,14 @@ void ScriptedObject::expose(HSQUIRRELVM vm, SQInteger table_idx) { if (name.empty()) return; - expose_object(vm, table_idx, dynamic_cast(this), name, false); + expose_object(vm, table_idx, dynamic_cast(this), name, false); } void ScriptedObject::unexpose(HSQUIRRELVM vm, SQInteger table_idx) { if (name.empty()) return; - Scripting::unexpose_object(vm, table_idx, name); + scripting::unexpose_object(vm, table_idx, name); } void diff --git a/src/object/scripted_object.hpp b/src/object/scripted_object.hpp index 8a605e9f9..f3ae63238 100644 --- a/src/object/scripted_object.hpp +++ b/src/object/scripted_object.hpp @@ -23,7 +23,7 @@ #include "supertux/script_interface.hpp" class ScriptedObject : public MovingSprite, - public Scripting::ScriptedObject, + public scripting::ScriptedObject, public ScriptInterface { public: @@ -38,7 +38,7 @@ public: void collision_solid(const CollisionHit& hit); HitResponse collision(GameObject& other, const CollisionHit& hit); - // --- Scripting Interface stuff --- + // --- scripting Interface stuff --- void set_action(const std::string& animation); std::string get_action(); diff --git a/src/object/text_object.cpp b/src/object/text_object.cpp index be2276b07..ba4a98c01 100644 --- a/src/object/text_object.cpp +++ b/src/object/text_object.cpp @@ -46,7 +46,7 @@ TextObject::expose(HSQUIRRELVM vm, SQInteger table_idx) if (name.empty()) return; - Scripting::expose_object(vm, table_idx, dynamic_cast(this), name, false); + scripting::expose_object(vm, table_idx, dynamic_cast(this), name, false); } void @@ -55,7 +55,7 @@ TextObject::unexpose(HSQUIRRELVM vm, SQInteger table_idx) if (name.empty()) return; - Scripting::unexpose_object(vm, table_idx, name); + scripting::unexpose_object(vm, table_idx, name); } void diff --git a/src/object/text_object.hpp b/src/object/text_object.hpp index 8ec495a6d..24c96a2cc 100644 --- a/src/object/text_object.hpp +++ b/src/object/text_object.hpp @@ -27,7 +27,7 @@ class Font; /** A text object intended for scripts that want to tell a story */ class TextObject : public GameObject, - public Scripting::Text, + public scripting::Text, public ScriptInterface { static Color default_color; diff --git a/src/object/thunderstorm.cpp b/src/object/thunderstorm.cpp index 61e60df30..6a8aeff73 100644 --- a/src/object/thunderstorm.cpp +++ b/src/object/thunderstorm.cpp @@ -85,7 +85,7 @@ void Thunderstorm::expose(HSQUIRRELVM vm, SQInteger table_idx) { if (name == "") return; - Scripting::Thunderstorm* interface = new Scripting::Thunderstorm(this); + scripting::Thunderstorm* interface = new scripting::Thunderstorm(this); expose_object(vm, table_idx, interface, name, true); } @@ -93,7 +93,7 @@ void Thunderstorm::unexpose(HSQUIRRELVM vm, SQInteger table_idx) { if (name == "") return; - Scripting::unexpose_object(vm, table_idx, name); + scripting::unexpose_object(vm, table_idx, name); } void diff --git a/src/object/tilemap.cpp b/src/object/tilemap.cpp index 7dd4bb854..fd5747c52 100644 --- a/src/object/tilemap.cpp +++ b/src/object/tilemap.cpp @@ -252,7 +252,7 @@ void TileMap::expose(HSQUIRRELVM vm, SQInteger table_idx) { if (name.empty()) return; - Scripting::TileMap* interface = new Scripting::TileMap(this); + scripting::TileMap* interface = new scripting::TileMap(this); expose_object(vm, table_idx, interface, name, true); } @@ -260,7 +260,7 @@ void TileMap::unexpose(HSQUIRRELVM vm, SQInteger table_idx) { if (name.empty()) return; - Scripting::unexpose_object(vm, table_idx, name); + scripting::unexpose_object(vm, table_idx, name); } void diff --git a/src/object/wind.cpp b/src/object/wind.cpp index 7a9c6f1e3..2e6cd85d8 100644 --- a/src/object/wind.cpp +++ b/src/object/wind.cpp @@ -95,7 +95,7 @@ Wind::expose(HSQUIRRELVM vm, SQInteger table_idx) if (name == "") return; - Scripting::Wind* interface = new Scripting::Wind(this); + scripting::Wind* interface = new scripting::Wind(this); expose_object(vm, table_idx, interface, name, true); } @@ -105,7 +105,7 @@ Wind::unexpose(HSQUIRRELVM vm, SQInteger table_idx) if (name == "") return; - Scripting::unexpose_object(vm, table_idx, name); + scripting::unexpose_object(vm, table_idx, name); } void diff --git a/src/scripting/ambient_sound.hpp b/src/scripting/ambient_sound.hpp index 998b4f23c..43a267a4e 100644 --- a/src/scripting/ambient_sound.hpp +++ b/src/scripting/ambient_sound.hpp @@ -17,7 +17,7 @@ #ifndef HEADER_SUPERTUX_SCRIPTING_AMBIENT_SOUND_HPP #define HEADER_SUPERTUX_SCRIPTING_AMBIENT_SOUND_HPP -namespace Scripting { +namespace scripting { class AmbientSound { diff --git a/src/scripting/anchor_points.hpp b/src/scripting/anchor_points.hpp index 6b30ee02d..df81c02e5 100644 --- a/src/scripting/anchor_points.hpp +++ b/src/scripting/anchor_points.hpp @@ -17,7 +17,7 @@ #ifndef HEADER_SUPERTUX_SCRIPTING_ANCHOR_POINTS_HPP #define HEADER_SUPERTUX_SCRIPTING_ANCHOR_POINTS_HPP -namespace Scripting { +namespace scripting { // TODO get these from the definitions in anchor.h (needs miniswig update) static const int ANCHOR_TOP = 0x0010; diff --git a/src/scripting/camera.cpp b/src/scripting/camera.cpp index d50fec297..cb04acf88 100644 --- a/src/scripting/camera.cpp +++ b/src/scripting/camera.cpp @@ -21,7 +21,7 @@ #define NOIMPL log_fatal << __FUNCTION__ << " not implemented." -namespace Scripting { +namespace scripting { Camera::Camera(::Camera* camera) : camera(camera) { } diff --git a/src/scripting/camera.hpp b/src/scripting/camera.hpp index 036060d91..b35a2388c 100644 --- a/src/scripting/camera.hpp +++ b/src/scripting/camera.hpp @@ -22,7 +22,7 @@ class Camera; typedef Camera _Camera; #endif -namespace Scripting { +namespace scripting { class Camera { diff --git a/src/scripting/candle.cpp b/src/scripting/candle.cpp index c12f8ac24..3bec7d55d 100644 --- a/src/scripting/candle.cpp +++ b/src/scripting/candle.cpp @@ -19,7 +19,7 @@ #define NOIMPL log_fatal << __PRETTY_FUNCTION__ << " not implemented." -namespace Scripting { +namespace scripting { Candle::Candle(::Candle* candle) : candle(candle) diff --git a/src/scripting/candle.hpp b/src/scripting/candle.hpp index c8ad57e1c..d9cb895b0 100644 --- a/src/scripting/candle.hpp +++ b/src/scripting/candle.hpp @@ -22,7 +22,7 @@ class Candle; typedef Candle _Candle; #endif -namespace Scripting { +namespace scripting { class Candle { diff --git a/src/scripting/display_effect.hpp b/src/scripting/display_effect.hpp index 064ecb690..7ba55d26e 100644 --- a/src/scripting/display_effect.hpp +++ b/src/scripting/display_effect.hpp @@ -17,7 +17,7 @@ #ifndef HEADER_SUPERTUX_SCRIPTING_DISPLAY_EFFECT_HPP #define HEADER_SUPERTUX_SCRIPTING_DISPLAY_EFFECT_HPP -namespace Scripting { +namespace scripting { class DisplayEffect { diff --git a/src/scripting/floating_image.cpp b/src/scripting/floating_image.cpp index 1410827e7..b45eb0906 100644 --- a/src/scripting/floating_image.cpp +++ b/src/scripting/floating_image.cpp @@ -21,12 +21,12 @@ #include "supertux/sector.hpp" #include "worldmap/worldmap.hpp" -namespace Scripting { +namespace scripting { FloatingImage::FloatingImage(const std::string& spritefile) : floating_image() { - using namespace WorldMapNS; + using namespace worldmap; floating_image = new _FloatingImage(spritefile); if(Sector::current() != NULL) { diff --git a/src/scripting/floating_image.hpp b/src/scripting/floating_image.hpp index ba6f4a922..4365e0939 100644 --- a/src/scripting/floating_image.hpp +++ b/src/scripting/floating_image.hpp @@ -26,7 +26,7 @@ class FloatingImage; typedef FloatingImage _FloatingImage; #endif -namespace Scripting { +namespace scripting { class FloatingImage { diff --git a/src/scripting/functions.cpp b/src/scripting/functions.cpp index fa2fad434..b88070c4c 100644 --- a/src/scripting/functions.cpp +++ b/src/scripting/functions.cpp @@ -36,7 +36,7 @@ #include "scripting/squirrel_util.hpp" #include "scripting/time_scheduler.hpp" -namespace Scripting { +namespace scripting { SQInteger display(HSQUIRRELVM vm) { @@ -97,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)); } @@ -150,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"); @@ -160,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"); @@ -171,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"); @@ -210,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); } diff --git a/src/scripting/functions.hpp b/src/scripting/functions.hpp index 9c2b58fce..6eb807444 100644 --- a/src/scripting/functions.hpp +++ b/src/scripting/functions.hpp @@ -25,7 +25,7 @@ #define __custom(x) #endif -namespace Scripting { +namespace scripting { /** * Display the value of the argument. This is useful for inspecting tables. @@ -212,7 +212,7 @@ void record_demo(const std::string& filename); */ void play_demo(const std::string& filename); -} // namespace Scripting +} // namespace scripting #endif diff --git a/src/scripting/level.cpp b/src/scripting/level.cpp index be7e6360c..c630e95b1 100644 --- a/src/scripting/level.cpp +++ b/src/scripting/level.cpp @@ -17,7 +17,7 @@ #include "supertux/flip_level_transformer.hpp" #include "supertux/game_session.hpp" -namespace Scripting { +namespace scripting { void Level_finish(bool win) { diff --git a/src/scripting/level.hpp b/src/scripting/level.hpp index fc94c4713..ad8adab99 100644 --- a/src/scripting/level.hpp +++ b/src/scripting/level.hpp @@ -17,7 +17,7 @@ #ifndef HEADER_SUPERTUX_SCRIPTING_LEVEL_HPP #define HEADER_SUPERTUX_SCRIPTING_LEVEL_HPP -namespace Scripting { +namespace scripting { /** Instantly finish the currently played level */ void Level_finish(bool win); diff --git a/src/scripting/level_time.cpp b/src/scripting/level_time.cpp index e47b35e79..e4e390e10 100644 --- a/src/scripting/level_time.cpp +++ b/src/scripting/level_time.cpp @@ -19,7 +19,7 @@ #define NOIMPL log_fatal << __PRETTY_FUNCTION__ << " not implemented." -namespace Scripting { +namespace scripting { LevelTime::LevelTime(::LevelTime* level_time) : level_time(level_time) diff --git a/src/scripting/level_time.hpp b/src/scripting/level_time.hpp index aa38ee069..defc33c7e 100644 --- a/src/scripting/level_time.hpp +++ b/src/scripting/level_time.hpp @@ -22,7 +22,7 @@ class LevelTime; typedef LevelTime _LevelTime; #endif -namespace Scripting { +namespace scripting { class LevelTime { diff --git a/src/scripting/platform.cpp b/src/scripting/platform.cpp index 7adfde6c7..390879294 100644 --- a/src/scripting/platform.cpp +++ b/src/scripting/platform.cpp @@ -19,7 +19,7 @@ #define NOIMPL log_fatal << __PRETTY_FUNCTION__ << " not implemented." -namespace Scripting { +namespace scripting { Platform::Platform(::Platform* platform) : platform(platform) diff --git a/src/scripting/platform.hpp b/src/scripting/platform.hpp index a1184753e..9ffafbf20 100644 --- a/src/scripting/platform.hpp +++ b/src/scripting/platform.hpp @@ -22,7 +22,7 @@ class Platform; typedef Platform _Platform; #endif -namespace Scripting { +namespace scripting { class Platform { diff --git a/src/scripting/player.hpp b/src/scripting/player.hpp index 5d0ed5ca6..80e04cefd 100644 --- a/src/scripting/player.hpp +++ b/src/scripting/player.hpp @@ -21,7 +21,7 @@ #include #endif -namespace Scripting { +namespace scripting { class Player { diff --git a/src/scripting/scripted_object.hpp b/src/scripting/scripted_object.hpp index 8def2731f..27da30b18 100644 --- a/src/scripting/scripted_object.hpp +++ b/src/scripting/scripted_object.hpp @@ -17,7 +17,7 @@ #ifndef HEADER_SUPERTUX_SCRIPTING_SCRIPTED_OBJECT_HPP #define HEADER_SUPERTUX_SCRIPTING_SCRIPTED_OBJECT_HPP -namespace Scripting { +namespace scripting { class ScriptedObject { diff --git a/src/scripting/serialize.cpp b/src/scripting/serialize.cpp index 5dbc6d1f9..ff3c859bc 100644 --- a/src/scripting/serialize.cpp +++ b/src/scripting/serialize.cpp @@ -22,7 +22,7 @@ #include "lisp/list_iterator.hpp" #include "scripting/squirrel_error.hpp" -namespace Scripting { +namespace scripting { void load_squirrel_table(HSQUIRRELVM vm, SQInteger table_idx, const Reader& lisp) { @@ -64,7 +64,7 @@ void load_squirrel_table(HSQUIRRELVM vm, SQInteger table_idx, const Reader& lisp } if(SQ_FAILED(sq_createslot(vm, table_idx))) - throw Scripting::SquirrelError(vm, "Couldn't create new index"); + throw scripting::SquirrelError(vm, "Couldn't create new index"); } } @@ -128,6 +128,6 @@ void save_squirrel_table(HSQUIRRELVM vm, SQInteger table_idx, Writer& writer) sq_pop(vm, 1); } -} // namespace Scripting +} // namespace scripting /* EOF */ diff --git a/src/scripting/serialize.hpp b/src/scripting/serialize.hpp index 036327914..6749608e4 100644 --- a/src/scripting/serialize.hpp +++ b/src/scripting/serialize.hpp @@ -22,12 +22,12 @@ #include "util/writer_fwd.hpp" #include "util/reader_fwd.hpp" -namespace Scripting { +namespace scripting { void save_squirrel_table(HSQUIRRELVM vm, SQInteger table_idx, Writer& writer); void load_squirrel_table(HSQUIRRELVM vm, SQInteger table_idx, const Reader& lisp); -} // namespace Scripting +} // namespace scripting #endif diff --git a/src/scripting/squirrel_error.cpp b/src/scripting/squirrel_error.cpp index 672ca2577..f83964113 100644 --- a/src/scripting/squirrel_error.cpp +++ b/src/scripting/squirrel_error.cpp @@ -17,7 +17,7 @@ #include "scripting/squirrel_error.hpp" #include -namespace Scripting { +namespace scripting { SquirrelError::SquirrelError(HSQUIRRELVM v, const std::string& message) throw() : message() diff --git a/src/scripting/squirrel_error.hpp b/src/scripting/squirrel_error.hpp index 256b32352..bdeb0e3ff 100644 --- a/src/scripting/squirrel_error.hpp +++ b/src/scripting/squirrel_error.hpp @@ -20,7 +20,7 @@ #include #include -namespace Scripting { +namespace scripting { /** Exception class for squirrel errors, it takes a squirrelvm and uses * sq_geterror() to retrieve additional information about the last error that diff --git a/src/scripting/squirrel_util.cpp b/src/scripting/squirrel_util.cpp index b123f7600..ffc7b4f08 100644 --- a/src/scripting/squirrel_util.cpp +++ b/src/scripting/squirrel_util.cpp @@ -34,7 +34,7 @@ static HSQREMOTEDBG debugger = NULL; #endif -namespace Scripting { +namespace scripting { HSQUIRRELVM global_vm = NULL; @@ -97,7 +97,7 @@ void init_squirrel(bool enable_debugger) try { std::string filename = "scripts/default.nut"; IFileStream stream(filename); - Scripting::compile_and_run(global_vm, stream, filename); + scripting::compile_and_run(global_vm, stream, filename); } catch(std::exception& e) { log_warning << "Couldn't load default.nut: " << e.what() << std::endl; } @@ -387,7 +387,7 @@ void store_float(HSQUIRRELVM vm, const char* name, float val) sq_pushstring(vm, name, -1); sq_pushfloat(vm, val); if(SQ_FAILED(sq_createslot(vm, -3))) - throw Scripting::SquirrelError(vm, "Couldn't add float value to table"); + throw scripting::SquirrelError(vm, "Couldn't add float value to table"); } void store_int(HSQUIRRELVM vm, const char* name, int val) @@ -395,7 +395,7 @@ void store_int(HSQUIRRELVM vm, const char* name, int val) sq_pushstring(vm, name, -1); sq_pushinteger(vm, val); if(SQ_FAILED(sq_createslot(vm, -3))) - throw Scripting::SquirrelError(vm, "Couldn't add int value to table"); + throw scripting::SquirrelError(vm, "Couldn't add int value to table"); } void store_string(HSQUIRRELVM vm, const char* name, const std::string& val) @@ -403,7 +403,7 @@ void store_string(HSQUIRRELVM vm, const char* name, const std::string& val) sq_pushstring(vm, name, -1); sq_pushstring(vm, val.c_str(), val.length()); if(SQ_FAILED(sq_createslot(vm, -3))) - throw Scripting::SquirrelError(vm, "Couldn't add float value to table"); + throw scripting::SquirrelError(vm, "Couldn't add float value to table"); } void store_bool(HSQUIRRELVM vm, const char* name, bool val) @@ -411,7 +411,7 @@ void store_bool(HSQUIRRELVM vm, const char* name, bool val) sq_pushstring(vm, name, -1); sq_pushbool(vm, val ? SQTrue : SQFalse); if(SQ_FAILED(sq_createslot(vm, -3))) - throw Scripting::SquirrelError(vm, "Couldn't add float value to table"); + throw scripting::SquirrelError(vm, "Couldn't add float value to table"); } bool has_float(HSQUIRRELVM vm, const char* name) @@ -443,14 +443,14 @@ float read_float(HSQUIRRELVM vm, const char* name) if(SQ_FAILED(sq_get(vm, -2))) { std::ostringstream msg; msg << "Couldn't get float value for '" << name << "' from table"; - throw Scripting::SquirrelError(vm, msg.str()); + throw scripting::SquirrelError(vm, msg.str()); } float result; if(SQ_FAILED(sq_getfloat(vm, -1, &result))) { std::ostringstream msg; msg << "Couldn't get float value for '" << name << "' from table"; - throw Scripting::SquirrelError(vm, msg.str()); + throw scripting::SquirrelError(vm, msg.str()); } sq_pop(vm, 1); @@ -463,14 +463,14 @@ int read_int(HSQUIRRELVM vm, const char* name) if(SQ_FAILED(sq_get(vm, -2))) { std::ostringstream msg; msg << "Couldn't get int value for '" << name << "' from table"; - throw Scripting::SquirrelError(vm, msg.str()); + throw scripting::SquirrelError(vm, msg.str()); } SQInteger result; if(SQ_FAILED(sq_getinteger(vm, -1, &result))) { std::ostringstream msg; msg << "Couldn't get int value for '" << name << "' from table"; - throw Scripting::SquirrelError(vm, msg.str()); + throw scripting::SquirrelError(vm, msg.str()); } sq_pop(vm, 1); @@ -483,14 +483,14 @@ std::string read_string(HSQUIRRELVM vm, const char* name) if(SQ_FAILED(sq_get(vm, -2))) { std::ostringstream msg; msg << "Couldn't get string value for '" << name << "' from table"; - throw Scripting::SquirrelError(vm, msg.str()); + throw scripting::SquirrelError(vm, msg.str()); } const char* result; if(SQ_FAILED(sq_getstring(vm, -1, &result))) { std::ostringstream msg; msg << "Couldn't get string value for '" << name << "' from table"; - throw Scripting::SquirrelError(vm, msg.str()); + throw scripting::SquirrelError(vm, msg.str()); } sq_pop(vm, 1); @@ -503,14 +503,14 @@ bool read_bool(HSQUIRRELVM vm, const char* name) if(SQ_FAILED(sq_get(vm, -2))) { std::ostringstream msg; msg << "Couldn't get bool value for '" << name << "' from table"; - throw Scripting::SquirrelError(vm, msg.str()); + throw scripting::SquirrelError(vm, msg.str()); } SQBool result; if(SQ_FAILED(sq_getbool(vm, -1, &result))) { std::ostringstream msg; msg << "Couldn't get bool value for '" << name << "' from table"; - throw Scripting::SquirrelError(vm, msg.str()); + throw scripting::SquirrelError(vm, msg.str()); } sq_pop(vm, 1); diff --git a/src/scripting/squirrel_util.hpp b/src/scripting/squirrel_util.hpp index 2648b5f08..f419bdf54 100644 --- a/src/scripting/squirrel_util.hpp +++ b/src/scripting/squirrel_util.hpp @@ -22,7 +22,7 @@ #include "scripting/squirrel_error.hpp" #include "scripting/wrapper.hpp" -namespace Scripting { +namespace scripting { extern HSQUIRRELVM global_vm; @@ -47,7 +47,7 @@ void expose_object(HSQUIRRELVM v, SQInteger table_idx, T* object, const std::string& name, bool free = false) { sq_pushstring(v, name.c_str(), -1); - Scripting::create_squirrel_instance(v, object, free); + scripting::create_squirrel_instance(v, object, free); if(table_idx < 0) table_idx -= 2; @@ -56,7 +56,7 @@ void expose_object(HSQUIRRELVM v, SQInteger table_idx, T* object, if(SQ_FAILED(sq_createslot(v, table_idx))) { std::ostringstream msg; msg << "Couldn't register object '" << name << "' in squirrel table"; - throw Scripting::SquirrelError(v, msg.str()); + throw scripting::SquirrelError(v, msg.str()); } } @@ -71,7 +71,7 @@ static inline void unexpose_object(HSQUIRRELVM v, SQInteger table_idx, if(SQ_FAILED(sq_deleteslot(v, table_idx, SQFalse))) { std::ostringstream msg; msg << "Couldn't unregister object '" << name << "' in squirrel root table"; - throw Scripting::SquirrelError(v, msg.str()); + throw scripting::SquirrelError(v, msg.str()); } } diff --git a/src/scripting/ssector.hpp b/src/scripting/ssector.hpp index 8cb785c98..b4677e865 100644 --- a/src/scripting/ssector.hpp +++ b/src/scripting/ssector.hpp @@ -1,4 +1,4 @@ -// SuperTux - Sector Scripting +// SuperTux - Sector scripting // Copyright (C) 2006 Wolfgang Becker // // This program is free software: you can redistribute it and/or modify @@ -17,7 +17,7 @@ #ifndef HEADER_SUPERTUX_SCRIPTING_SSECTOR_HPP #define HEADER_SUPERTUX_SCRIPTING_SSECTOR_HPP -namespace Scripting { +namespace scripting { class SSector { diff --git a/src/scripting/text.hpp b/src/scripting/text.hpp index 7a7e31c4e..af2b300db 100644 --- a/src/scripting/text.hpp +++ b/src/scripting/text.hpp @@ -17,7 +17,7 @@ #ifndef HEADER_SUPERTUX_SCRIPTING_TEXT_HPP #define HEADER_SUPERTUX_SCRIPTING_TEXT_HPP -namespace Scripting { +namespace scripting { class Text { diff --git a/src/scripting/thread_queue.cpp b/src/scripting/thread_queue.cpp index c9ecff26a..86162431a 100644 --- a/src/scripting/thread_queue.cpp +++ b/src/scripting/thread_queue.cpp @@ -19,7 +19,7 @@ #include "scripting/squirrel_util.hpp" #include "util/log.hpp" -namespace Scripting +namespace scripting { ThreadQueue::ThreadQueue() : diff --git a/src/scripting/thread_queue.hpp b/src/scripting/thread_queue.hpp index 8015cccf4..351c954c1 100644 --- a/src/scripting/thread_queue.hpp +++ b/src/scripting/thread_queue.hpp @@ -20,7 +20,7 @@ #include #include -namespace Scripting { +namespace scripting { /** * Keeps a list of SquirrelThreads that wait for a wakeup event diff --git a/src/scripting/thunderstorm.cpp b/src/scripting/thunderstorm.cpp index e83d667aa..00e927e3a 100644 --- a/src/scripting/thunderstorm.cpp +++ b/src/scripting/thunderstorm.cpp @@ -18,7 +18,7 @@ #define NOIMPL log_fatal << __PRETTY_FUNCTION__ << " not implemented." -namespace Scripting { +namespace scripting { Thunderstorm::Thunderstorm(::Thunderstorm* thunderstorm) : thunderstorm(thunderstorm) diff --git a/src/scripting/thunderstorm.hpp b/src/scripting/thunderstorm.hpp index 8548932c7..c8e05c78f 100644 --- a/src/scripting/thunderstorm.hpp +++ b/src/scripting/thunderstorm.hpp @@ -22,7 +22,7 @@ class Thunderstorm; typedef Thunderstorm _Thunderstorm; #endif -namespace Scripting { +namespace scripting { class Thunderstorm { diff --git a/src/scripting/tilemap.cpp b/src/scripting/tilemap.cpp index ac2d1616a..709bea213 100644 --- a/src/scripting/tilemap.cpp +++ b/src/scripting/tilemap.cpp @@ -19,7 +19,7 @@ #define NOIMPL log_fatal << __PRETTY_FUNCTION__ << " not implemented." -namespace Scripting { +namespace scripting { TileMap::TileMap(::TileMap* tilemap) : tilemap(tilemap) diff --git a/src/scripting/tilemap.hpp b/src/scripting/tilemap.hpp index 3c402b307..fc6d972ee 100644 --- a/src/scripting/tilemap.hpp +++ b/src/scripting/tilemap.hpp @@ -22,7 +22,7 @@ class TileMap; typedef TileMap _TileMap; #endif -namespace Scripting { +namespace scripting { class TileMap { diff --git a/src/scripting/time_scheduler.cpp b/src/scripting/time_scheduler.cpp index 3b484f606..b210371ff 100644 --- a/src/scripting/time_scheduler.cpp +++ b/src/scripting/time_scheduler.cpp @@ -20,7 +20,7 @@ #include "scripting/time_scheduler.hpp" #include "util/log.hpp" -namespace Scripting { +namespace scripting { TimeScheduler* TimeScheduler::instance = NULL; diff --git a/src/scripting/time_scheduler.hpp b/src/scripting/time_scheduler.hpp index 0729011bd..90d390fb3 100644 --- a/src/scripting/time_scheduler.hpp +++ b/src/scripting/time_scheduler.hpp @@ -19,7 +19,7 @@ #include -namespace Scripting { +namespace scripting { /** * This class keeps a list of squirrel threads that are scheduled for a certain diff --git a/src/scripting/willowisp.hpp b/src/scripting/willowisp.hpp index b61af1b25..29f4cb9f8 100644 --- a/src/scripting/willowisp.hpp +++ b/src/scripting/willowisp.hpp @@ -17,7 +17,7 @@ #ifndef HEADER_SUPERTUX_SCRIPTING_WILLOWISP_HPP #define HEADER_SUPERTUX_SCRIPTING_WILLOWISP_HPP -namespace Scripting { +namespace scripting { class WillOWisp { diff --git a/src/scripting/wind.cpp b/src/scripting/wind.cpp index e44b92e54..32d8d5ad9 100644 --- a/src/scripting/wind.cpp +++ b/src/scripting/wind.cpp @@ -19,7 +19,7 @@ #define NOIMPL log_fatal << __PRETTY_FUNCTION__ << " not implemented." -namespace Scripting { +namespace scripting { Wind::Wind(::Wind* wind) : wind(wind) diff --git a/src/scripting/wind.hpp b/src/scripting/wind.hpp index cac409707..e564908b4 100644 --- a/src/scripting/wind.hpp +++ b/src/scripting/wind.hpp @@ -22,7 +22,7 @@ class Wind; typedef Wind _Wind; #endif -namespace Scripting { +namespace scripting { class Wind { @@ -47,7 +47,7 @@ private: #endif }; -} // namespace Scripting +} // namespace scripting #endif diff --git a/src/scripting/wrapper.cpp b/src/scripting/wrapper.cpp index 65e0ce4b5..08d04ef6c 100644 --- a/src/scripting/wrapper.cpp +++ b/src/scripting/wrapper.cpp @@ -9,12 +9,12 @@ #include "scripting/squirrel_error.hpp" #include "scripting/wrapper.interface.hpp" -namespace Scripting { -namespace Wrapper { +namespace scripting { +namespace wrapper { static SQInteger AmbientSound_release_hook(SQUserPointer ptr, SQInteger ) { - Scripting::AmbientSound* _this = reinterpret_cast (ptr); + scripting::AmbientSound* _this = reinterpret_cast (ptr); delete _this; return 0; } @@ -26,7 +26,7 @@ static SQInteger AmbientSound_set_pos_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("'set_pos' called without instance")); return SQ_ERROR; } - Scripting::AmbientSound* _this = reinterpret_cast (data); + scripting::AmbientSound* _this = reinterpret_cast (data); SQFloat arg0; if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) { sq_throwerror(vm, _SC("Argument 1 not a float")); @@ -60,7 +60,7 @@ static SQInteger AmbientSound_get_pos_x_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("'get_pos_x' called without instance")); return SQ_ERROR; } - Scripting::AmbientSound* _this = reinterpret_cast (data); + scripting::AmbientSound* _this = reinterpret_cast (data); try { float return_value = _this->get_pos_x(); @@ -85,7 +85,7 @@ static SQInteger AmbientSound_get_pos_y_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("'get_pos_y' called without instance")); return SQ_ERROR; } - Scripting::AmbientSound* _this = reinterpret_cast (data); + scripting::AmbientSound* _this = reinterpret_cast (data); try { float return_value = _this->get_pos_y(); @@ -105,7 +105,7 @@ static SQInteger AmbientSound_get_pos_y_wrapper(HSQUIRRELVM vm) static SQInteger Camera_release_hook(SQUserPointer ptr, SQInteger ) { - Scripting::Camera* _this = reinterpret_cast (ptr); + scripting::Camera* _this = reinterpret_cast (ptr); delete _this; return 0; } @@ -117,7 +117,7 @@ static SQInteger Camera_reload_config_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("'reload_config' called without instance")); return SQ_ERROR; } - Scripting::Camera* _this = reinterpret_cast (data); + scripting::Camera* _this = reinterpret_cast (data); try { _this->reload_config(); @@ -141,7 +141,7 @@ static SQInteger Camera_shake_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("'shake' called without instance")); return SQ_ERROR; } - Scripting::Camera* _this = reinterpret_cast (data); + scripting::Camera* _this = reinterpret_cast (data); SQFloat arg0; if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) { sq_throwerror(vm, _SC("Argument 1 not a float")); @@ -180,7 +180,7 @@ static SQInteger Camera_set_pos_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("'set_pos' called without instance")); return SQ_ERROR; } - Scripting::Camera* _this = reinterpret_cast (data); + scripting::Camera* _this = reinterpret_cast (data); SQFloat arg0; if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) { sq_throwerror(vm, _SC("Argument 1 not a float")); @@ -214,7 +214,7 @@ static SQInteger Camera_set_mode_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("'set_mode' called without instance")); return SQ_ERROR; } - Scripting::Camera* _this = reinterpret_cast (data); + scripting::Camera* _this = reinterpret_cast (data); const SQChar* arg0; if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) { sq_throwerror(vm, _SC("Argument 1 not a string")); @@ -243,7 +243,7 @@ static SQInteger Camera_scroll_to_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("'scroll_to' called without instance")); return SQ_ERROR; } - Scripting::Camera* _this = reinterpret_cast (data); + scripting::Camera* _this = reinterpret_cast (data); SQFloat arg0; if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) { sq_throwerror(vm, _SC("Argument 1 not a float")); @@ -277,7 +277,7 @@ static SQInteger Camera_scroll_to_wrapper(HSQUIRRELVM vm) static SQInteger Candle_release_hook(SQUserPointer ptr, SQInteger ) { - Scripting::Candle* _this = reinterpret_cast (ptr); + scripting::Candle* _this = reinterpret_cast (ptr); delete _this; return 0; } @@ -289,7 +289,7 @@ static SQInteger Candle_get_burning_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("'get_burning' called without instance")); return SQ_ERROR; } - Scripting::Candle* _this = reinterpret_cast (data); + scripting::Candle* _this = reinterpret_cast (data); try { bool return_value = _this->get_burning(); @@ -314,7 +314,7 @@ static SQInteger Candle_set_burning_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("'set_burning' called without instance")); return SQ_ERROR; } - Scripting::Candle* _this = reinterpret_cast (data); + scripting::Candle* _this = reinterpret_cast (data); SQBool arg0; if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) { sq_throwerror(vm, _SC("Argument 1 not a bool")); @@ -338,7 +338,7 @@ static SQInteger Candle_set_burning_wrapper(HSQUIRRELVM vm) static SQInteger DisplayEffect_release_hook(SQUserPointer ptr, SQInteger ) { - Scripting::DisplayEffect* _this = reinterpret_cast (ptr); + scripting::DisplayEffect* _this = reinterpret_cast (ptr); delete _this; return 0; } @@ -350,7 +350,7 @@ static SQInteger DisplayEffect_fade_out_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("'fade_out' called without instance")); return SQ_ERROR; } - Scripting::DisplayEffect* _this = reinterpret_cast (data); + scripting::DisplayEffect* _this = reinterpret_cast (data); SQFloat arg0; if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) { sq_throwerror(vm, _SC("Argument 1 not a float")); @@ -379,7 +379,7 @@ static SQInteger DisplayEffect_fade_in_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("'fade_in' called without instance")); return SQ_ERROR; } - Scripting::DisplayEffect* _this = reinterpret_cast (data); + scripting::DisplayEffect* _this = reinterpret_cast (data); SQFloat arg0; if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) { sq_throwerror(vm, _SC("Argument 1 not a float")); @@ -408,7 +408,7 @@ static SQInteger DisplayEffect_set_black_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("'set_black' called without instance")); return SQ_ERROR; } - Scripting::DisplayEffect* _this = reinterpret_cast (data); + scripting::DisplayEffect* _this = reinterpret_cast (data); SQBool arg0; if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) { sq_throwerror(vm, _SC("Argument 1 not a bool")); @@ -437,7 +437,7 @@ static SQInteger DisplayEffect_is_black_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("'is_black' called without instance")); return SQ_ERROR; } - Scripting::DisplayEffect* _this = reinterpret_cast (data); + scripting::DisplayEffect* _this = reinterpret_cast (data); try { bool return_value = _this->is_black(); @@ -462,7 +462,7 @@ static SQInteger DisplayEffect_sixteen_to_nine_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("'sixteen_to_nine' called without instance")); return SQ_ERROR; } - Scripting::DisplayEffect* _this = reinterpret_cast (data); + scripting::DisplayEffect* _this = reinterpret_cast (data); SQFloat arg0; if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) { sq_throwerror(vm, _SC("Argument 1 not a float")); @@ -491,7 +491,7 @@ static SQInteger DisplayEffect_four_to_three_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("'four_to_three' called without instance")); return SQ_ERROR; } - Scripting::DisplayEffect* _this = reinterpret_cast (data); + scripting::DisplayEffect* _this = reinterpret_cast (data); SQFloat arg0; if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) { sq_throwerror(vm, _SC("Argument 1 not a float")); @@ -515,7 +515,7 @@ static SQInteger DisplayEffect_four_to_three_wrapper(HSQUIRRELVM vm) static SQInteger FloatingImage_release_hook(SQUserPointer ptr, SQInteger ) { - Scripting::FloatingImage* _this = reinterpret_cast (ptr); + scripting::FloatingImage* _this = reinterpret_cast (ptr); delete _this; return 0; } @@ -529,7 +529,7 @@ static SQInteger FloatingImage_constructor_wrapper(HSQUIRRELVM vm) } try { - Scripting::FloatingImage* _this = new Scripting::FloatingImage(arg0); + scripting::FloatingImage* _this = new scripting::FloatingImage(arg0); if(SQ_FAILED(sq_setinstanceup(vm, 1, _this))) { sq_throwerror(vm, _SC("Couldn't setup instance of 'FloatingImage' class")); return SQ_ERROR; @@ -555,7 +555,7 @@ static SQInteger FloatingImage_set_layer_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("'set_layer' called without instance")); return SQ_ERROR; } - Scripting::FloatingImage* _this = reinterpret_cast (data); + scripting::FloatingImage* _this = reinterpret_cast (data); SQInteger arg0; if(SQ_FAILED(sq_getinteger(vm, 2, &arg0))) { sq_throwerror(vm, _SC("Argument 1 not an integer")); @@ -584,7 +584,7 @@ static SQInteger FloatingImage_get_layer_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("'get_layer' called without instance")); return SQ_ERROR; } - Scripting::FloatingImage* _this = reinterpret_cast (data); + scripting::FloatingImage* _this = reinterpret_cast (data); try { int return_value = _this->get_layer(); @@ -609,7 +609,7 @@ static SQInteger FloatingImage_set_pos_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("'set_pos' called without instance")); return SQ_ERROR; } - Scripting::FloatingImage* _this = reinterpret_cast (data); + scripting::FloatingImage* _this = reinterpret_cast (data); SQFloat arg0; if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) { sq_throwerror(vm, _SC("Argument 1 not a float")); @@ -643,7 +643,7 @@ static SQInteger FloatingImage_get_pos_x_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("'get_pos_x' called without instance")); return SQ_ERROR; } - Scripting::FloatingImage* _this = reinterpret_cast (data); + scripting::FloatingImage* _this = reinterpret_cast (data); try { float return_value = _this->get_pos_x(); @@ -668,7 +668,7 @@ static SQInteger FloatingImage_get_pos_y_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("'get_pos_y' called without instance")); return SQ_ERROR; } - Scripting::FloatingImage* _this = reinterpret_cast (data); + scripting::FloatingImage* _this = reinterpret_cast (data); try { float return_value = _this->get_pos_y(); @@ -693,7 +693,7 @@ static SQInteger FloatingImage_set_anchor_point_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("'set_anchor_point' called without instance")); return SQ_ERROR; } - Scripting::FloatingImage* _this = reinterpret_cast (data); + scripting::FloatingImage* _this = reinterpret_cast (data); SQInteger arg0; if(SQ_FAILED(sq_getinteger(vm, 2, &arg0))) { sq_throwerror(vm, _SC("Argument 1 not an integer")); @@ -722,7 +722,7 @@ static SQInteger FloatingImage_get_anchor_point_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("'get_anchor_point' called without instance")); return SQ_ERROR; } - Scripting::FloatingImage* _this = reinterpret_cast (data); + scripting::FloatingImage* _this = reinterpret_cast (data); try { int return_value = _this->get_anchor_point(); @@ -747,7 +747,7 @@ static SQInteger FloatingImage_set_visible_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("'set_visible' called without instance")); return SQ_ERROR; } - Scripting::FloatingImage* _this = reinterpret_cast (data); + scripting::FloatingImage* _this = reinterpret_cast (data); SQBool arg0; if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) { sq_throwerror(vm, _SC("Argument 1 not a bool")); @@ -776,7 +776,7 @@ static SQInteger FloatingImage_get_visible_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("'get_visible' called without instance")); return SQ_ERROR; } - Scripting::FloatingImage* _this = reinterpret_cast (data); + scripting::FloatingImage* _this = reinterpret_cast (data); try { bool return_value = _this->get_visible(); @@ -801,7 +801,7 @@ static SQInteger FloatingImage_set_action_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("'set_action' called without instance")); return SQ_ERROR; } - Scripting::FloatingImage* _this = reinterpret_cast (data); + scripting::FloatingImage* _this = reinterpret_cast (data); const SQChar* arg0; if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) { sq_throwerror(vm, _SC("Argument 1 not a string")); @@ -830,7 +830,7 @@ static SQInteger FloatingImage_get_action_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("'get_action' called without instance")); return SQ_ERROR; } - Scripting::FloatingImage* _this = reinterpret_cast (data); + scripting::FloatingImage* _this = reinterpret_cast (data); try { std::string return_value = _this->get_action(); @@ -855,7 +855,7 @@ static SQInteger FloatingImage_fade_in_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("'fade_in' called without instance")); return SQ_ERROR; } - Scripting::FloatingImage* _this = reinterpret_cast (data); + scripting::FloatingImage* _this = reinterpret_cast (data); SQFloat arg0; if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) { sq_throwerror(vm, _SC("Argument 1 not a float")); @@ -884,7 +884,7 @@ static SQInteger FloatingImage_fade_out_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("'fade_out' called without instance")); return SQ_ERROR; } - Scripting::FloatingImage* _this = reinterpret_cast (data); + scripting::FloatingImage* _this = reinterpret_cast (data); SQFloat arg0; if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) { sq_throwerror(vm, _SC("Argument 1 not a float")); @@ -908,7 +908,7 @@ static SQInteger FloatingImage_fade_out_wrapper(HSQUIRRELVM vm) static SQInteger LevelTime_release_hook(SQUserPointer ptr, SQInteger ) { - Scripting::LevelTime* _this = reinterpret_cast (ptr); + scripting::LevelTime* _this = reinterpret_cast (ptr); delete _this; return 0; } @@ -920,7 +920,7 @@ static SQInteger LevelTime_start_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("'start' called without instance")); return SQ_ERROR; } - Scripting::LevelTime* _this = reinterpret_cast (data); + scripting::LevelTime* _this = reinterpret_cast (data); try { _this->start(); @@ -944,7 +944,7 @@ static SQInteger LevelTime_stop_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("'stop' called without instance")); return SQ_ERROR; } - Scripting::LevelTime* _this = reinterpret_cast (data); + scripting::LevelTime* _this = reinterpret_cast (data); try { _this->stop(); @@ -968,7 +968,7 @@ static SQInteger LevelTime_get_time_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("'get_time' called without instance")); return SQ_ERROR; } - Scripting::LevelTime* _this = reinterpret_cast (data); + scripting::LevelTime* _this = reinterpret_cast (data); try { float return_value = _this->get_time(); @@ -993,7 +993,7 @@ static SQInteger LevelTime_set_time_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("'set_time' called without instance")); return SQ_ERROR; } - Scripting::LevelTime* _this = reinterpret_cast (data); + scripting::LevelTime* _this = reinterpret_cast (data); SQFloat arg0; if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) { sq_throwerror(vm, _SC("Argument 1 not a float")); @@ -1017,7 +1017,7 @@ static SQInteger LevelTime_set_time_wrapper(HSQUIRRELVM vm) static SQInteger Platform_release_hook(SQUserPointer ptr, SQInteger ) { - Scripting::Platform* _this = reinterpret_cast (ptr); + scripting::Platform* _this = reinterpret_cast (ptr); delete _this; return 0; } @@ -1029,7 +1029,7 @@ static SQInteger Platform_goto_node_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("'goto_node' called without instance")); return SQ_ERROR; } - Scripting::Platform* _this = reinterpret_cast (data); + scripting::Platform* _this = reinterpret_cast (data); SQInteger arg0; if(SQ_FAILED(sq_getinteger(vm, 2, &arg0))) { sq_throwerror(vm, _SC("Argument 1 not an integer")); @@ -1058,7 +1058,7 @@ static SQInteger Platform_start_moving_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("'start_moving' called without instance")); return SQ_ERROR; } - Scripting::Platform* _this = reinterpret_cast (data); + scripting::Platform* _this = reinterpret_cast (data); try { _this->start_moving(); @@ -1082,7 +1082,7 @@ static SQInteger Platform_stop_moving_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("'stop_moving' called without instance")); return SQ_ERROR; } - Scripting::Platform* _this = reinterpret_cast (data); + scripting::Platform* _this = reinterpret_cast (data); try { _this->stop_moving(); @@ -1101,7 +1101,7 @@ static SQInteger Platform_stop_moving_wrapper(HSQUIRRELVM vm) static SQInteger Player_release_hook(SQUserPointer ptr, SQInteger ) { - Scripting::Player* _this = reinterpret_cast (ptr); + scripting::Player* _this = reinterpret_cast (ptr); delete _this; return 0; } @@ -1113,7 +1113,7 @@ static SQInteger Player_add_bonus_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("'add_bonus' called without instance")); return SQ_ERROR; } - Scripting::Player* _this = reinterpret_cast (data); + scripting::Player* _this = reinterpret_cast (data); const SQChar* arg0; if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) { sq_throwerror(vm, _SC("Argument 1 not a string")); @@ -1143,7 +1143,7 @@ static SQInteger Player_add_coins_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("'add_coins' called without instance")); return SQ_ERROR; } - Scripting::Player* _this = reinterpret_cast (data); + scripting::Player* _this = reinterpret_cast (data); SQInteger arg0; if(SQ_FAILED(sq_getinteger(vm, 2, &arg0))) { sq_throwerror(vm, _SC("Argument 1 not an integer")); @@ -1172,7 +1172,7 @@ static SQInteger Player_make_invincible_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("'make_invincible' called without instance")); return SQ_ERROR; } - Scripting::Player* _this = reinterpret_cast (data); + scripting::Player* _this = reinterpret_cast (data); try { _this->make_invincible(); @@ -1196,7 +1196,7 @@ static SQInteger Player_deactivate_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("'deactivate' called without instance")); return SQ_ERROR; } - Scripting::Player* _this = reinterpret_cast (data); + scripting::Player* _this = reinterpret_cast (data); try { _this->deactivate(); @@ -1220,7 +1220,7 @@ static SQInteger Player_activate_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("'activate' called without instance")); return SQ_ERROR; } - Scripting::Player* _this = reinterpret_cast (data); + scripting::Player* _this = reinterpret_cast (data); try { _this->activate(); @@ -1244,7 +1244,7 @@ static SQInteger Player_walk_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("'walk' called without instance")); return SQ_ERROR; } - Scripting::Player* _this = reinterpret_cast (data); + scripting::Player* _this = reinterpret_cast (data); SQFloat arg0; if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) { sq_throwerror(vm, _SC("Argument 1 not a float")); @@ -1273,7 +1273,7 @@ static SQInteger Player_set_visible_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("'set_visible' called without instance")); return SQ_ERROR; } - Scripting::Player* _this = reinterpret_cast (data); + scripting::Player* _this = reinterpret_cast (data); SQBool arg0; if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) { sq_throwerror(vm, _SC("Argument 1 not a bool")); @@ -1302,7 +1302,7 @@ static SQInteger Player_get_visible_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("'get_visible' called without instance")); return SQ_ERROR; } - Scripting::Player* _this = reinterpret_cast (data); + scripting::Player* _this = reinterpret_cast (data); try { bool return_value = _this->get_visible(); @@ -1327,7 +1327,7 @@ static SQInteger Player_kill_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("'kill' called without instance")); return SQ_ERROR; } - Scripting::Player* _this = reinterpret_cast (data); + scripting::Player* _this = reinterpret_cast (data); SQBool arg0; if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) { sq_throwerror(vm, _SC("Argument 1 not a bool")); @@ -1356,7 +1356,7 @@ static SQInteger Player_set_ghost_mode_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("'set_ghost_mode' called without instance")); return SQ_ERROR; } - Scripting::Player* _this = reinterpret_cast (data); + scripting::Player* _this = reinterpret_cast (data); SQBool arg0; if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) { sq_throwerror(vm, _SC("Argument 1 not a bool")); @@ -1385,7 +1385,7 @@ static SQInteger Player_get_ghost_mode_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("'get_ghost_mode' called without instance")); return SQ_ERROR; } - Scripting::Player* _this = reinterpret_cast (data); + scripting::Player* _this = reinterpret_cast (data); try { bool return_value = _this->get_ghost_mode(); @@ -1410,7 +1410,7 @@ static SQInteger Player_do_cheer_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("'do_cheer' called without instance")); return SQ_ERROR; } - Scripting::Player* _this = reinterpret_cast (data); + scripting::Player* _this = reinterpret_cast (data); try { _this->do_cheer(); @@ -1434,7 +1434,7 @@ static SQInteger Player_do_duck_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("'do_duck' called without instance")); return SQ_ERROR; } - Scripting::Player* _this = reinterpret_cast (data); + scripting::Player* _this = reinterpret_cast (data); try { _this->do_duck(); @@ -1458,7 +1458,7 @@ static SQInteger Player_do_standup_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("'do_standup' called without instance")); return SQ_ERROR; } - Scripting::Player* _this = reinterpret_cast (data); + scripting::Player* _this = reinterpret_cast (data); try { _this->do_standup(); @@ -1482,7 +1482,7 @@ static SQInteger Player_do_backflip_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("'do_backflip' called without instance")); return SQ_ERROR; } - Scripting::Player* _this = reinterpret_cast (data); + scripting::Player* _this = reinterpret_cast (data); try { _this->do_backflip(); @@ -1506,7 +1506,7 @@ static SQInteger Player_do_jump_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("'do_jump' called without instance")); return SQ_ERROR; } - Scripting::Player* _this = reinterpret_cast (data); + scripting::Player* _this = reinterpret_cast (data); SQFloat arg0; if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) { sq_throwerror(vm, _SC("Argument 1 not a float")); @@ -1535,7 +1535,7 @@ static SQInteger Player_trigger_sequence_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("'trigger_sequence' called without instance")); return SQ_ERROR; } - Scripting::Player* _this = reinterpret_cast (data); + scripting::Player* _this = reinterpret_cast (data); const SQChar* arg0; if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) { sq_throwerror(vm, _SC("Argument 1 not a string")); @@ -1564,7 +1564,7 @@ static SQInteger Player_use_scripting_controller_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("'use_scripting_controller' called without instance")); return SQ_ERROR; } - Scripting::Player* _this = reinterpret_cast (data); + scripting::Player* _this = reinterpret_cast (data); SQBool arg0; if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) { sq_throwerror(vm, _SC("Argument 1 not a bool")); @@ -1593,7 +1593,7 @@ static SQInteger Player_do_scripting_controller_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("'do_scripting_controller' called without instance")); return SQ_ERROR; } - Scripting::Player* _this = reinterpret_cast (data); + scripting::Player* _this = reinterpret_cast (data); const SQChar* arg0; if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) { sq_throwerror(vm, _SC("Argument 1 not a string")); @@ -1622,7 +1622,7 @@ static SQInteger Player_do_scripting_controller_wrapper(HSQUIRRELVM vm) static SQInteger ScriptedObject_release_hook(SQUserPointer ptr, SQInteger ) { - Scripting::ScriptedObject* _this = reinterpret_cast (ptr); + scripting::ScriptedObject* _this = reinterpret_cast (ptr); delete _this; return 0; } @@ -1634,7 +1634,7 @@ static SQInteger ScriptedObject_set_action_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("'set_action' called without instance")); return SQ_ERROR; } - Scripting::ScriptedObject* _this = reinterpret_cast (data); + scripting::ScriptedObject* _this = reinterpret_cast (data); const SQChar* arg0; if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) { sq_throwerror(vm, _SC("Argument 1 not a string")); @@ -1663,7 +1663,7 @@ static SQInteger ScriptedObject_get_action_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("'get_action' called without instance")); return SQ_ERROR; } - Scripting::ScriptedObject* _this = reinterpret_cast (data); + scripting::ScriptedObject* _this = reinterpret_cast (data); try { std::string return_value = _this->get_action(); @@ -1688,7 +1688,7 @@ static SQInteger ScriptedObject_move_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("'move' called without instance")); return SQ_ERROR; } - Scripting::ScriptedObject* _this = reinterpret_cast (data); + scripting::ScriptedObject* _this = reinterpret_cast (data); SQFloat arg0; if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) { sq_throwerror(vm, _SC("Argument 1 not a float")); @@ -1722,7 +1722,7 @@ static SQInteger ScriptedObject_set_pos_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("'set_pos' called without instance")); return SQ_ERROR; } - Scripting::ScriptedObject* _this = reinterpret_cast (data); + scripting::ScriptedObject* _this = reinterpret_cast (data); SQFloat arg0; if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) { sq_throwerror(vm, _SC("Argument 1 not a float")); @@ -1756,7 +1756,7 @@ static SQInteger ScriptedObject_get_pos_x_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("'get_pos_x' called without instance")); return SQ_ERROR; } - Scripting::ScriptedObject* _this = reinterpret_cast (data); + scripting::ScriptedObject* _this = reinterpret_cast (data); try { float return_value = _this->get_pos_x(); @@ -1781,7 +1781,7 @@ static SQInteger ScriptedObject_get_pos_y_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("'get_pos_y' called without instance")); return SQ_ERROR; } - Scripting::ScriptedObject* _this = reinterpret_cast (data); + scripting::ScriptedObject* _this = reinterpret_cast (data); try { float return_value = _this->get_pos_y(); @@ -1806,7 +1806,7 @@ static SQInteger ScriptedObject_set_velocity_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("'set_velocity' called without instance")); return SQ_ERROR; } - Scripting::ScriptedObject* _this = reinterpret_cast (data); + scripting::ScriptedObject* _this = reinterpret_cast (data); SQFloat arg0; if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) { sq_throwerror(vm, _SC("Argument 1 not a float")); @@ -1840,7 +1840,7 @@ static SQInteger ScriptedObject_get_velocity_x_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("'get_velocity_x' called without instance")); return SQ_ERROR; } - Scripting::ScriptedObject* _this = reinterpret_cast (data); + scripting::ScriptedObject* _this = reinterpret_cast (data); try { float return_value = _this->get_velocity_x(); @@ -1865,7 +1865,7 @@ static SQInteger ScriptedObject_get_velocity_y_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("'get_velocity_y' called without instance")); return SQ_ERROR; } - Scripting::ScriptedObject* _this = reinterpret_cast (data); + scripting::ScriptedObject* _this = reinterpret_cast (data); try { float return_value = _this->get_velocity_y(); @@ -1890,7 +1890,7 @@ static SQInteger ScriptedObject_set_visible_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("'set_visible' called without instance")); return SQ_ERROR; } - Scripting::ScriptedObject* _this = reinterpret_cast (data); + scripting::ScriptedObject* _this = reinterpret_cast (data); SQBool arg0; if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) { sq_throwerror(vm, _SC("Argument 1 not a bool")); @@ -1919,7 +1919,7 @@ static SQInteger ScriptedObject_is_visible_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("'is_visible' called without instance")); return SQ_ERROR; } - Scripting::ScriptedObject* _this = reinterpret_cast (data); + scripting::ScriptedObject* _this = reinterpret_cast (data); try { bool return_value = _this->is_visible(); @@ -1944,7 +1944,7 @@ static SQInteger ScriptedObject_set_solid_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("'set_solid' called without instance")); return SQ_ERROR; } - Scripting::ScriptedObject* _this = reinterpret_cast (data); + scripting::ScriptedObject* _this = reinterpret_cast (data); SQBool arg0; if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) { sq_throwerror(vm, _SC("Argument 1 not a bool")); @@ -1973,7 +1973,7 @@ static SQInteger ScriptedObject_is_solid_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("'is_solid' called without instance")); return SQ_ERROR; } - Scripting::ScriptedObject* _this = reinterpret_cast (data); + scripting::ScriptedObject* _this = reinterpret_cast (data); try { bool return_value = _this->is_solid(); @@ -1998,7 +1998,7 @@ static SQInteger ScriptedObject_get_name_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("'get_name' called without instance")); return SQ_ERROR; } - Scripting::ScriptedObject* _this = reinterpret_cast (data); + scripting::ScriptedObject* _this = reinterpret_cast (data); try { std::string return_value = _this->get_name(); @@ -2018,7 +2018,7 @@ static SQInteger ScriptedObject_get_name_wrapper(HSQUIRRELVM vm) static SQInteger SSector_release_hook(SQUserPointer ptr, SQInteger ) { - Scripting::SSector* _this = reinterpret_cast (ptr); + scripting::SSector* _this = reinterpret_cast (ptr); delete _this; return 0; } @@ -2030,7 +2030,7 @@ static SQInteger SSector_set_ambient_light_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("'set_ambient_light' called without instance")); return SQ_ERROR; } - Scripting::SSector* _this = reinterpret_cast (data); + scripting::SSector* _this = reinterpret_cast (data); SQFloat arg0; if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) { sq_throwerror(vm, _SC("Argument 1 not a float")); @@ -2069,7 +2069,7 @@ static SQInteger SSector_get_ambient_red_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("'get_ambient_red' called without instance")); return SQ_ERROR; } - Scripting::SSector* _this = reinterpret_cast (data); + scripting::SSector* _this = reinterpret_cast (data); try { float return_value = _this->get_ambient_red(); @@ -2094,7 +2094,7 @@ static SQInteger SSector_get_ambient_green_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("'get_ambient_green' called without instance")); return SQ_ERROR; } - Scripting::SSector* _this = reinterpret_cast (data); + scripting::SSector* _this = reinterpret_cast (data); try { float return_value = _this->get_ambient_green(); @@ -2119,7 +2119,7 @@ static SQInteger SSector_get_ambient_blue_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("'get_ambient_blue' called without instance")); return SQ_ERROR; } - Scripting::SSector* _this = reinterpret_cast (data); + scripting::SSector* _this = reinterpret_cast (data); try { float return_value = _this->get_ambient_blue(); @@ -2144,7 +2144,7 @@ static SQInteger SSector_set_gravity_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("'set_gravity' called without instance")); return SQ_ERROR; } - Scripting::SSector* _this = reinterpret_cast (data); + scripting::SSector* _this = reinterpret_cast (data); SQFloat arg0; if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) { sq_throwerror(vm, _SC("Argument 1 not a float")); @@ -2168,7 +2168,7 @@ static SQInteger SSector_set_gravity_wrapper(HSQUIRRELVM vm) static SQInteger Text_release_hook(SQUserPointer ptr, SQInteger ) { - Scripting::Text* _this = reinterpret_cast (ptr); + scripting::Text* _this = reinterpret_cast (ptr); delete _this; return 0; } @@ -2180,7 +2180,7 @@ static SQInteger Text_set_text_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("'set_text' called without instance")); return SQ_ERROR; } - Scripting::Text* _this = reinterpret_cast (data); + scripting::Text* _this = reinterpret_cast (data); const SQChar* arg0; if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) { sq_throwerror(vm, _SC("Argument 1 not a string")); @@ -2209,7 +2209,7 @@ static SQInteger Text_set_font_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("'set_font' called without instance")); return SQ_ERROR; } - Scripting::Text* _this = reinterpret_cast (data); + scripting::Text* _this = reinterpret_cast (data); const SQChar* arg0; if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) { sq_throwerror(vm, _SC("Argument 1 not a string")); @@ -2238,7 +2238,7 @@ static SQInteger Text_fade_in_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("'fade_in' called without instance")); return SQ_ERROR; } - Scripting::Text* _this = reinterpret_cast (data); + scripting::Text* _this = reinterpret_cast (data); SQFloat arg0; if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) { sq_throwerror(vm, _SC("Argument 1 not a float")); @@ -2267,7 +2267,7 @@ static SQInteger Text_fade_out_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("'fade_out' called without instance")); return SQ_ERROR; } - Scripting::Text* _this = reinterpret_cast (data); + scripting::Text* _this = reinterpret_cast (data); SQFloat arg0; if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) { sq_throwerror(vm, _SC("Argument 1 not a float")); @@ -2296,7 +2296,7 @@ static SQInteger Text_set_visible_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("'set_visible' called without instance")); return SQ_ERROR; } - Scripting::Text* _this = reinterpret_cast (data); + scripting::Text* _this = reinterpret_cast (data); SQBool arg0; if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) { sq_throwerror(vm, _SC("Argument 1 not a bool")); @@ -2325,7 +2325,7 @@ static SQInteger Text_set_centered_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("'set_centered' called without instance")); return SQ_ERROR; } - Scripting::Text* _this = reinterpret_cast (data); + scripting::Text* _this = reinterpret_cast (data); SQBool arg0; if(SQ_FAILED(sq_getbool(vm, 2, &arg0))) { sq_throwerror(vm, _SC("Argument 1 not a bool")); @@ -2354,7 +2354,7 @@ static SQInteger Text_set_pos_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("'set_pos' called without instance")); return SQ_ERROR; } - Scripting::Text* _this = reinterpret_cast (data); + scripting::Text* _this = reinterpret_cast (data); SQFloat arg0; if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) { sq_throwerror(vm, _SC("Argument 1 not a float")); @@ -2388,7 +2388,7 @@ static SQInteger Text_get_pos_x_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("'get_pos_x' called without instance")); return SQ_ERROR; } - Scripting::Text* _this = reinterpret_cast (data); + scripting::Text* _this = reinterpret_cast (data); try { float return_value = _this->get_pos_x(); @@ -2413,7 +2413,7 @@ static SQInteger Text_get_pos_y_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("'get_pos_y' called without instance")); return SQ_ERROR; } - Scripting::Text* _this = reinterpret_cast (data); + scripting::Text* _this = reinterpret_cast (data); try { float return_value = _this->get_pos_y(); @@ -2438,7 +2438,7 @@ static SQInteger Text_set_anchor_point_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("'set_anchor_point' called without instance")); return SQ_ERROR; } - Scripting::Text* _this = reinterpret_cast (data); + scripting::Text* _this = reinterpret_cast (data); SQInteger arg0; if(SQ_FAILED(sq_getinteger(vm, 2, &arg0))) { sq_throwerror(vm, _SC("Argument 1 not an integer")); @@ -2467,7 +2467,7 @@ static SQInteger Text_get_anchor_point_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("'get_anchor_point' called without instance")); return SQ_ERROR; } - Scripting::Text* _this = reinterpret_cast (data); + scripting::Text* _this = reinterpret_cast (data); try { int return_value = _this->get_anchor_point(); @@ -2487,7 +2487,7 @@ static SQInteger Text_get_anchor_point_wrapper(HSQUIRRELVM vm) static SQInteger Thunderstorm_release_hook(SQUserPointer ptr, SQInteger ) { - Scripting::Thunderstorm* _this = reinterpret_cast (ptr); + scripting::Thunderstorm* _this = reinterpret_cast (ptr); delete _this; return 0; } @@ -2499,7 +2499,7 @@ static SQInteger Thunderstorm_start_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("'start' called without instance")); return SQ_ERROR; } - Scripting::Thunderstorm* _this = reinterpret_cast (data); + scripting::Thunderstorm* _this = reinterpret_cast (data); try { _this->start(); @@ -2523,7 +2523,7 @@ static SQInteger Thunderstorm_stop_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("'stop' called without instance")); return SQ_ERROR; } - Scripting::Thunderstorm* _this = reinterpret_cast (data); + scripting::Thunderstorm* _this = reinterpret_cast (data); try { _this->stop(); @@ -2547,7 +2547,7 @@ static SQInteger Thunderstorm_thunder_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("'thunder' called without instance")); return SQ_ERROR; } - Scripting::Thunderstorm* _this = reinterpret_cast (data); + scripting::Thunderstorm* _this = reinterpret_cast (data); try { _this->thunder(); @@ -2571,7 +2571,7 @@ static SQInteger Thunderstorm_lightning_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("'lightning' called without instance")); return SQ_ERROR; } - Scripting::Thunderstorm* _this = reinterpret_cast (data); + scripting::Thunderstorm* _this = reinterpret_cast (data); try { _this->lightning(); @@ -2595,7 +2595,7 @@ static SQInteger Thunderstorm_flash_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("'flash' called without instance")); return SQ_ERROR; } - Scripting::Thunderstorm* _this = reinterpret_cast (data); + scripting::Thunderstorm* _this = reinterpret_cast (data); try { _this->flash(); @@ -2619,7 +2619,7 @@ static SQInteger Thunderstorm_electrify_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("'electrify' called without instance")); return SQ_ERROR; } - Scripting::Thunderstorm* _this = reinterpret_cast (data); + scripting::Thunderstorm* _this = reinterpret_cast (data); try { _this->electrify(); @@ -2638,7 +2638,7 @@ static SQInteger Thunderstorm_electrify_wrapper(HSQUIRRELVM vm) static SQInteger TileMap_release_hook(SQUserPointer ptr, SQInteger ) { - Scripting::TileMap* _this = reinterpret_cast (ptr); + scripting::TileMap* _this = reinterpret_cast (ptr); delete _this; return 0; } @@ -2650,7 +2650,7 @@ static SQInteger TileMap_goto_node_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("'goto_node' called without instance")); return SQ_ERROR; } - Scripting::TileMap* _this = reinterpret_cast (data); + scripting::TileMap* _this = reinterpret_cast (data); SQInteger arg0; if(SQ_FAILED(sq_getinteger(vm, 2, &arg0))) { sq_throwerror(vm, _SC("Argument 1 not an integer")); @@ -2679,7 +2679,7 @@ static SQInteger TileMap_start_moving_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("'start_moving' called without instance")); return SQ_ERROR; } - Scripting::TileMap* _this = reinterpret_cast (data); + scripting::TileMap* _this = reinterpret_cast (data); try { _this->start_moving(); @@ -2703,7 +2703,7 @@ static SQInteger TileMap_stop_moving_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("'stop_moving' called without instance")); return SQ_ERROR; } - Scripting::TileMap* _this = reinterpret_cast (data); + scripting::TileMap* _this = reinterpret_cast (data); try { _this->stop_moving(); @@ -2727,7 +2727,7 @@ static SQInteger TileMap_fade_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("'fade' called without instance")); return SQ_ERROR; } - Scripting::TileMap* _this = reinterpret_cast (data); + scripting::TileMap* _this = reinterpret_cast (data); SQFloat arg0; if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) { sq_throwerror(vm, _SC("Argument 1 not a float")); @@ -2761,7 +2761,7 @@ static SQInteger TileMap_set_alpha_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("'set_alpha' called without instance")); return SQ_ERROR; } - Scripting::TileMap* _this = reinterpret_cast (data); + scripting::TileMap* _this = reinterpret_cast (data); SQFloat arg0; if(SQ_FAILED(sq_getfloat(vm, 2, &arg0))) { sq_throwerror(vm, _SC("Argument 1 not a float")); @@ -2790,7 +2790,7 @@ static SQInteger TileMap_get_alpha_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("'get_alpha' called without instance")); return SQ_ERROR; } - Scripting::TileMap* _this = reinterpret_cast (data); + scripting::TileMap* _this = reinterpret_cast (data); try { float return_value = _this->get_alpha(); @@ -2810,7 +2810,7 @@ static SQInteger TileMap_get_alpha_wrapper(HSQUIRRELVM vm) static SQInteger WillOWisp_release_hook(SQUserPointer ptr, SQInteger ) { - Scripting::WillOWisp* _this = reinterpret_cast (ptr); + scripting::WillOWisp* _this = reinterpret_cast (ptr); delete _this; return 0; } @@ -2822,7 +2822,7 @@ static SQInteger WillOWisp_goto_node_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("'goto_node' called without instance")); return SQ_ERROR; } - Scripting::WillOWisp* _this = reinterpret_cast (data); + scripting::WillOWisp* _this = reinterpret_cast (data); SQInteger arg0; if(SQ_FAILED(sq_getinteger(vm, 2, &arg0))) { sq_throwerror(vm, _SC("Argument 1 not an integer")); @@ -2851,7 +2851,7 @@ static SQInteger WillOWisp_set_state_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("'set_state' called without instance")); return SQ_ERROR; } - Scripting::WillOWisp* _this = reinterpret_cast (data); + scripting::WillOWisp* _this = reinterpret_cast (data); const SQChar* arg0; if(SQ_FAILED(sq_getstring(vm, 2, &arg0))) { sq_throwerror(vm, _SC("Argument 1 not a string")); @@ -2880,7 +2880,7 @@ static SQInteger WillOWisp_start_moving_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("'start_moving' called without instance")); return SQ_ERROR; } - Scripting::WillOWisp* _this = reinterpret_cast (data); + scripting::WillOWisp* _this = reinterpret_cast (data); try { _this->start_moving(); @@ -2904,7 +2904,7 @@ static SQInteger WillOWisp_stop_moving_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("'stop_moving' called without instance")); return SQ_ERROR; } - Scripting::WillOWisp* _this = reinterpret_cast (data); + scripting::WillOWisp* _this = reinterpret_cast (data); try { _this->stop_moving(); @@ -2923,7 +2923,7 @@ static SQInteger WillOWisp_stop_moving_wrapper(HSQUIRRELVM vm) static SQInteger Wind_release_hook(SQUserPointer ptr, SQInteger ) { - Scripting::Wind* _this = reinterpret_cast (ptr); + scripting::Wind* _this = reinterpret_cast (ptr); delete _this; return 0; } @@ -2935,7 +2935,7 @@ static SQInteger Wind_start_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("'start' called without instance")); return SQ_ERROR; } - Scripting::Wind* _this = reinterpret_cast (data); + scripting::Wind* _this = reinterpret_cast (data); try { _this->start(); @@ -2959,7 +2959,7 @@ static SQInteger Wind_stop_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("'stop' called without instance")); return SQ_ERROR; } - Scripting::Wind* _this = reinterpret_cast (data); + scripting::Wind* _this = reinterpret_cast (data); try { _this->stop(); @@ -2978,7 +2978,7 @@ static SQInteger Wind_stop_wrapper(HSQUIRRELVM vm) static SQInteger display_wrapper(HSQUIRRELVM vm) { - return Scripting::display(vm); + return scripting::display(vm); } static SQInteger print_stacktrace_wrapper(HSQUIRRELVM vm) @@ -2986,7 +2986,7 @@ static SQInteger print_stacktrace_wrapper(HSQUIRRELVM vm) HSQUIRRELVM arg0 = vm; try { - Scripting::print_stacktrace(arg0); + scripting::print_stacktrace(arg0); return 0; @@ -3002,7 +3002,7 @@ static SQInteger print_stacktrace_wrapper(HSQUIRRELVM vm) static SQInteger get_current_thread_wrapper(HSQUIRRELVM vm) { - return Scripting::get_current_thread(vm); + return scripting::get_current_thread(vm); } static SQInteger display_text_file_wrapper(HSQUIRRELVM vm) @@ -3014,7 +3014,7 @@ static SQInteger display_text_file_wrapper(HSQUIRRELVM vm) } try { - Scripting::display_text_file(arg0); + scripting::display_text_file(arg0); return 0; @@ -3037,7 +3037,7 @@ static SQInteger load_worldmap_wrapper(HSQUIRRELVM vm) } try { - Scripting::load_worldmap(arg0); + scripting::load_worldmap(arg0); return 0; @@ -3060,7 +3060,7 @@ static SQInteger load_level_wrapper(HSQUIRRELVM vm) } try { - Scripting::load_level(arg0); + scripting::load_level(arg0); return 0; @@ -3084,7 +3084,7 @@ static SQInteger wait_wrapper(HSQUIRRELVM vm) } try { - Scripting::wait(arg0, static_cast (arg1)); + scripting::wait(arg0, static_cast (arg1)); return sq_suspendvm(vm); @@ -3103,7 +3103,7 @@ static SQInteger wait_for_screenswitch_wrapper(HSQUIRRELVM vm) HSQUIRRELVM arg0 = vm; try { - Scripting::wait_for_screenswitch(arg0); + scripting::wait_for_screenswitch(arg0); return sq_suspendvm(vm); @@ -3122,7 +3122,7 @@ static SQInteger exit_screen_wrapper(HSQUIRRELVM vm) (void) vm; try { - Scripting::exit_screen(); + scripting::exit_screen(); return 0; @@ -3145,7 +3145,7 @@ static SQInteger fadeout_screen_wrapper(HSQUIRRELVM vm) } try { - Scripting::fadeout_screen(static_cast (arg0)); + scripting::fadeout_screen(static_cast (arg0)); return 0; @@ -3178,7 +3178,7 @@ static SQInteger shrink_screen_wrapper(HSQUIRRELVM vm) } try { - Scripting::shrink_screen(static_cast (arg0), static_cast (arg1), static_cast (arg2)); + scripting::shrink_screen(static_cast (arg0), static_cast (arg1), static_cast (arg2)); return 0; @@ -3197,7 +3197,7 @@ static SQInteger abort_screenfade_wrapper(HSQUIRRELVM vm) (void) vm; try { - Scripting::abort_screenfade(); + scripting::abort_screenfade(); return 0; @@ -3220,7 +3220,7 @@ static SQInteger translate_wrapper(HSQUIRRELVM vm) } try { - std::string return_value = Scripting::translate(arg0); + std::string return_value = scripting::translate(arg0); sq_pushstring(vm, return_value.c_str(), return_value.size()); return 1; @@ -3245,7 +3245,7 @@ static SQInteger import_wrapper(HSQUIRRELVM vm) } try { - Scripting::import(arg0, arg1); + scripting::import(arg0, arg1); return 0; @@ -3264,7 +3264,7 @@ static SQInteger save_state_wrapper(HSQUIRRELVM vm) (void) vm; try { - Scripting::save_state(); + scripting::save_state(); return 0; @@ -3283,7 +3283,7 @@ static SQInteger update_worldmap_wrapper(HSQUIRRELVM vm) (void) vm; try { - Scripting::update_worldmap(); + scripting::update_worldmap(); return 0; @@ -3306,7 +3306,7 @@ static SQInteger debug_collrects_wrapper(HSQUIRRELVM vm) } try { - Scripting::debug_collrects(arg0 == SQTrue); + scripting::debug_collrects(arg0 == SQTrue); return 0; @@ -3329,7 +3329,7 @@ static SQInteger debug_show_fps_wrapper(HSQUIRRELVM vm) } try { - Scripting::debug_show_fps(arg0 == SQTrue); + scripting::debug_show_fps(arg0 == SQTrue); return 0; @@ -3352,7 +3352,7 @@ static SQInteger debug_draw_solids_only_wrapper(HSQUIRRELVM vm) } try { - Scripting::debug_draw_solids_only(arg0 == SQTrue); + scripting::debug_draw_solids_only(arg0 == SQTrue); return 0; @@ -3375,7 +3375,7 @@ static SQInteger debug_worldmap_ghost_wrapper(HSQUIRRELVM vm) } try { - Scripting::debug_worldmap_ghost(arg0 == SQTrue); + scripting::debug_worldmap_ghost(arg0 == SQTrue); return 0; @@ -3398,7 +3398,7 @@ static SQInteger play_music_wrapper(HSQUIRRELVM vm) } try { - Scripting::play_music(arg0); + scripting::play_music(arg0); return 0; @@ -3421,7 +3421,7 @@ static SQInteger play_sound_wrapper(HSQUIRRELVM vm) } try { - Scripting::play_sound(arg0); + scripting::play_sound(arg0); return 0; @@ -3444,7 +3444,7 @@ static SQInteger set_game_speed_wrapper(HSQUIRRELVM vm) } try { - Scripting::set_game_speed(static_cast (arg0)); + scripting::set_game_speed(static_cast (arg0)); return 0; @@ -3463,7 +3463,7 @@ static SQInteger grease_wrapper(HSQUIRRELVM vm) (void) vm; try { - Scripting::grease(); + scripting::grease(); return 0; @@ -3482,7 +3482,7 @@ static SQInteger invincible_wrapper(HSQUIRRELVM vm) (void) vm; try { - Scripting::invincible(); + scripting::invincible(); return 0; @@ -3501,7 +3501,7 @@ static SQInteger ghost_wrapper(HSQUIRRELVM vm) (void) vm; try { - Scripting::ghost(); + scripting::ghost(); return 0; @@ -3520,7 +3520,7 @@ static SQInteger mortal_wrapper(HSQUIRRELVM vm) (void) vm; try { - Scripting::mortal(); + scripting::mortal(); return 0; @@ -3539,7 +3539,7 @@ static SQInteger restart_wrapper(HSQUIRRELVM vm) (void) vm; try { - Scripting::restart(); + scripting::restart(); return 0; @@ -3558,7 +3558,7 @@ static SQInteger whereami_wrapper(HSQUIRRELVM vm) (void) vm; try { - Scripting::whereami(); + scripting::whereami(); return 0; @@ -3577,7 +3577,7 @@ static SQInteger gotoend_wrapper(HSQUIRRELVM vm) (void) vm; try { - Scripting::gotoend(); + scripting::gotoend(); return 0; @@ -3596,7 +3596,7 @@ static SQInteger camera_wrapper(HSQUIRRELVM vm) (void) vm; try { - Scripting::camera(); + scripting::camera(); return 0; @@ -3619,7 +3619,7 @@ static SQInteger set_gamma_wrapper(HSQUIRRELVM vm) } try { - Scripting::set_gamma(static_cast (arg0)); + scripting::set_gamma(static_cast (arg0)); return 0; @@ -3638,7 +3638,7 @@ static SQInteger quit_wrapper(HSQUIRRELVM vm) (void) vm; try { - Scripting::quit(); + scripting::quit(); return 0; @@ -3656,7 +3656,7 @@ static SQInteger rand_wrapper(HSQUIRRELVM vm) { try { - int return_value = Scripting::rand(); + int return_value = scripting::rand(); sq_pushinteger(vm, return_value); return 1; @@ -3680,7 +3680,7 @@ static SQInteger record_demo_wrapper(HSQUIRRELVM vm) } try { - Scripting::record_demo(arg0); + scripting::record_demo(arg0); return 0; @@ -3703,7 +3703,7 @@ static SQInteger play_demo_wrapper(HSQUIRRELVM vm) } try { - Scripting::play_demo(arg0); + scripting::play_demo(arg0); return 0; @@ -3726,7 +3726,7 @@ static SQInteger Level_finish_wrapper(HSQUIRRELVM vm) } try { - Scripting::Level_finish(arg0 == SQTrue); + scripting::Level_finish(arg0 == SQTrue); return 0; @@ -3754,7 +3754,7 @@ static SQInteger Level_spawn_wrapper(HSQUIRRELVM vm) } try { - Scripting::Level_spawn(arg0, arg1); + scripting::Level_spawn(arg0, arg1); return 0; @@ -3773,7 +3773,7 @@ static SQInteger Level_flip_vertically_wrapper(HSQUIRRELVM vm) (void) vm; try { - Scripting::Level_flip_vertically(); + scripting::Level_flip_vertically(); return 0; @@ -3792,7 +3792,7 @@ static SQInteger Level_toggle_pause_wrapper(HSQUIRRELVM vm) (void) vm; try { - Scripting::Level_toggle_pause(); + scripting::Level_toggle_pause(); return 0; @@ -3815,7 +3815,7 @@ static SQInteger Level_edit_wrapper(HSQUIRRELVM vm) } try { - Scripting::Level_edit(arg0 == SQTrue); + scripting::Level_edit(arg0 == SQTrue); return 0; @@ -3829,10 +3829,10 @@ static SQInteger Level_edit_wrapper(HSQUIRRELVM vm) } -} // end of namespace Wrapper -void create_squirrel_instance(HSQUIRRELVM v, Scripting::AmbientSound* object, bool setup_releasehook) +} // namespace wrapper +void create_squirrel_instance(HSQUIRRELVM v, scripting::AmbientSound* object, bool setup_releasehook) { - using namespace Wrapper; + using namespace wrapper; sq_pushroottable(v); sq_pushstring(v, "AmbientSound", -1); @@ -3856,9 +3856,9 @@ void create_squirrel_instance(HSQUIRRELVM v, Scripting::AmbientSound* object, bo sq_remove(v, -2); // remove root table } -void create_squirrel_instance(HSQUIRRELVM v, Scripting::Camera* object, bool setup_releasehook) +void create_squirrel_instance(HSQUIRRELVM v, scripting::Camera* object, bool setup_releasehook) { - using namespace Wrapper; + using namespace wrapper; sq_pushroottable(v); sq_pushstring(v, "Camera", -1); @@ -3882,9 +3882,9 @@ void create_squirrel_instance(HSQUIRRELVM v, Scripting::Camera* object, bool set sq_remove(v, -2); // remove root table } -void create_squirrel_instance(HSQUIRRELVM v, Scripting::Candle* object, bool setup_releasehook) +void create_squirrel_instance(HSQUIRRELVM v, scripting::Candle* object, bool setup_releasehook) { - using namespace Wrapper; + using namespace wrapper; sq_pushroottable(v); sq_pushstring(v, "Candle", -1); @@ -3908,9 +3908,9 @@ void create_squirrel_instance(HSQUIRRELVM v, Scripting::Candle* object, bool set sq_remove(v, -2); // remove root table } -void create_squirrel_instance(HSQUIRRELVM v, Scripting::DisplayEffect* object, bool setup_releasehook) +void create_squirrel_instance(HSQUIRRELVM v, scripting::DisplayEffect* object, bool setup_releasehook) { - using namespace Wrapper; + using namespace wrapper; sq_pushroottable(v); sq_pushstring(v, "DisplayEffect", -1); @@ -3934,9 +3934,9 @@ void create_squirrel_instance(HSQUIRRELVM v, Scripting::DisplayEffect* object, b sq_remove(v, -2); // remove root table } -void create_squirrel_instance(HSQUIRRELVM v, Scripting::FloatingImage* object, bool setup_releasehook) +void create_squirrel_instance(HSQUIRRELVM v, scripting::FloatingImage* object, bool setup_releasehook) { - using namespace Wrapper; + using namespace wrapper; sq_pushroottable(v); sq_pushstring(v, "FloatingImage", -1); @@ -3960,9 +3960,9 @@ void create_squirrel_instance(HSQUIRRELVM v, Scripting::FloatingImage* object, b sq_remove(v, -2); // remove root table } -void create_squirrel_instance(HSQUIRRELVM v, Scripting::LevelTime* object, bool setup_releasehook) +void create_squirrel_instance(HSQUIRRELVM v, scripting::LevelTime* object, bool setup_releasehook) { - using namespace Wrapper; + using namespace wrapper; sq_pushroottable(v); sq_pushstring(v, "LevelTime", -1); @@ -3986,9 +3986,9 @@ void create_squirrel_instance(HSQUIRRELVM v, Scripting::LevelTime* object, bool sq_remove(v, -2); // remove root table } -void create_squirrel_instance(HSQUIRRELVM v, Scripting::Platform* object, bool setup_releasehook) +void create_squirrel_instance(HSQUIRRELVM v, scripting::Platform* object, bool setup_releasehook) { - using namespace Wrapper; + using namespace wrapper; sq_pushroottable(v); sq_pushstring(v, "Platform", -1); @@ -4012,9 +4012,9 @@ void create_squirrel_instance(HSQUIRRELVM v, Scripting::Platform* object, bool s sq_remove(v, -2); // remove root table } -void create_squirrel_instance(HSQUIRRELVM v, Scripting::Player* object, bool setup_releasehook) +void create_squirrel_instance(HSQUIRRELVM v, scripting::Player* object, bool setup_releasehook) { - using namespace Wrapper; + using namespace wrapper; sq_pushroottable(v); sq_pushstring(v, "Player", -1); @@ -4038,9 +4038,9 @@ void create_squirrel_instance(HSQUIRRELVM v, Scripting::Player* object, bool set sq_remove(v, -2); // remove root table } -void create_squirrel_instance(HSQUIRRELVM v, Scripting::ScriptedObject* object, bool setup_releasehook) +void create_squirrel_instance(HSQUIRRELVM v, scripting::ScriptedObject* object, bool setup_releasehook) { - using namespace Wrapper; + using namespace wrapper; sq_pushroottable(v); sq_pushstring(v, "ScriptedObject", -1); @@ -4064,9 +4064,9 @@ void create_squirrel_instance(HSQUIRRELVM v, Scripting::ScriptedObject* object, sq_remove(v, -2); // remove root table } -void create_squirrel_instance(HSQUIRRELVM v, Scripting::SSector* object, bool setup_releasehook) +void create_squirrel_instance(HSQUIRRELVM v, scripting::SSector* object, bool setup_releasehook) { - using namespace Wrapper; + using namespace wrapper; sq_pushroottable(v); sq_pushstring(v, "SSector", -1); @@ -4090,9 +4090,9 @@ void create_squirrel_instance(HSQUIRRELVM v, Scripting::SSector* object, bool se sq_remove(v, -2); // remove root table } -void create_squirrel_instance(HSQUIRRELVM v, Scripting::Text* object, bool setup_releasehook) +void create_squirrel_instance(HSQUIRRELVM v, scripting::Text* object, bool setup_releasehook) { - using namespace Wrapper; + using namespace wrapper; sq_pushroottable(v); sq_pushstring(v, "Text", -1); @@ -4116,9 +4116,9 @@ void create_squirrel_instance(HSQUIRRELVM v, Scripting::Text* object, bool setup sq_remove(v, -2); // remove root table } -void create_squirrel_instance(HSQUIRRELVM v, Scripting::Thunderstorm* object, bool setup_releasehook) +void create_squirrel_instance(HSQUIRRELVM v, scripting::Thunderstorm* object, bool setup_releasehook) { - using namespace Wrapper; + using namespace wrapper; sq_pushroottable(v); sq_pushstring(v, "Thunderstorm", -1); @@ -4142,9 +4142,9 @@ void create_squirrel_instance(HSQUIRRELVM v, Scripting::Thunderstorm* object, bo sq_remove(v, -2); // remove root table } -void create_squirrel_instance(HSQUIRRELVM v, Scripting::TileMap* object, bool setup_releasehook) +void create_squirrel_instance(HSQUIRRELVM v, scripting::TileMap* object, bool setup_releasehook) { - using namespace Wrapper; + using namespace wrapper; sq_pushroottable(v); sq_pushstring(v, "TileMap", -1); @@ -4168,9 +4168,9 @@ void create_squirrel_instance(HSQUIRRELVM v, Scripting::TileMap* object, bool se sq_remove(v, -2); // remove root table } -void create_squirrel_instance(HSQUIRRELVM v, Scripting::WillOWisp* object, bool setup_releasehook) +void create_squirrel_instance(HSQUIRRELVM v, scripting::WillOWisp* object, bool setup_releasehook) { - using namespace Wrapper; + using namespace wrapper; sq_pushroottable(v); sq_pushstring(v, "WillOWisp", -1); @@ -4194,9 +4194,9 @@ void create_squirrel_instance(HSQUIRRELVM v, Scripting::WillOWisp* object, bool sq_remove(v, -2); // remove root table } -void create_squirrel_instance(HSQUIRRELVM v, Scripting::Wind* object, bool setup_releasehook) +void create_squirrel_instance(HSQUIRRELVM v, scripting::Wind* object, bool setup_releasehook) { - using namespace Wrapper; + using namespace wrapper; sq_pushroottable(v); sq_pushstring(v, "Wind", -1); @@ -4222,7 +4222,7 @@ void create_squirrel_instance(HSQUIRRELVM v, Scripting::Wind* object, bool setup void register_supertux_wrapper(HSQUIRRELVM v) { - using namespace Wrapper; + using namespace wrapper; sq_pushstring(v, "ANCHOR_TOP", -1); sq_pushinteger(v, 16); @@ -5460,6 +5460,6 @@ void register_supertux_wrapper(HSQUIRRELVM v) } -} // end of namespace Scripting +} // namespace scripting /* EOF */ diff --git a/src/scripting/wrapper.hpp b/src/scripting/wrapper.hpp index e816f8b0a..4ce603f20 100644 --- a/src/scripting/wrapper.hpp +++ b/src/scripting/wrapper.hpp @@ -6,40 +6,40 @@ #ifndef HEADER_SUPERTUX_SCRIPTING_WRAPPER_HPP #define HEADER_SUPERTUX_SCRIPTING_WRAPPER_HPP -namespace Scripting { +namespace scripting { void register_supertux_wrapper(HSQUIRRELVM v); class AmbientSound; -void create_squirrel_instance(HSQUIRRELVM v, Scripting::AmbientSound* object, bool setup_releasehook = false); +void create_squirrel_instance(HSQUIRRELVM v, scripting::AmbientSound* object, bool setup_releasehook = false); class Camera; -void create_squirrel_instance(HSQUIRRELVM v, Scripting::Camera* object, bool setup_releasehook = false); +void create_squirrel_instance(HSQUIRRELVM v, scripting::Camera* object, bool setup_releasehook = false); class Candle; -void create_squirrel_instance(HSQUIRRELVM v, Scripting::Candle* object, bool setup_releasehook = false); +void create_squirrel_instance(HSQUIRRELVM v, scripting::Candle* object, bool setup_releasehook = false); class DisplayEffect; -void create_squirrel_instance(HSQUIRRELVM v, Scripting::DisplayEffect* object, bool setup_releasehook = false); +void create_squirrel_instance(HSQUIRRELVM v, scripting::DisplayEffect* object, bool setup_releasehook = false); class FloatingImage; -void create_squirrel_instance(HSQUIRRELVM v, Scripting::FloatingImage* object, bool setup_releasehook = false); +void create_squirrel_instance(HSQUIRRELVM v, scripting::FloatingImage* object, bool setup_releasehook = false); class LevelTime; -void create_squirrel_instance(HSQUIRRELVM v, Scripting::LevelTime* object, bool setup_releasehook = false); +void create_squirrel_instance(HSQUIRRELVM v, scripting::LevelTime* object, bool setup_releasehook = false); class Platform; -void create_squirrel_instance(HSQUIRRELVM v, Scripting::Platform* object, bool setup_releasehook = false); +void create_squirrel_instance(HSQUIRRELVM v, scripting::Platform* object, bool setup_releasehook = false); class Player; -void create_squirrel_instance(HSQUIRRELVM v, Scripting::Player* object, bool setup_releasehook = false); +void create_squirrel_instance(HSQUIRRELVM v, scripting::Player* object, bool setup_releasehook = false); class ScriptedObject; -void create_squirrel_instance(HSQUIRRELVM v, Scripting::ScriptedObject* object, bool setup_releasehook = false); +void create_squirrel_instance(HSQUIRRELVM v, scripting::ScriptedObject* object, bool setup_releasehook = false); class SSector; -void create_squirrel_instance(HSQUIRRELVM v, Scripting::SSector* object, bool setup_releasehook = false); +void create_squirrel_instance(HSQUIRRELVM v, scripting::SSector* object, bool setup_releasehook = false); class Text; -void create_squirrel_instance(HSQUIRRELVM v, Scripting::Text* object, bool setup_releasehook = false); +void create_squirrel_instance(HSQUIRRELVM v, scripting::Text* object, bool setup_releasehook = false); class Thunderstorm; -void create_squirrel_instance(HSQUIRRELVM v, Scripting::Thunderstorm* object, bool setup_releasehook = false); +void create_squirrel_instance(HSQUIRRELVM v, scripting::Thunderstorm* object, bool setup_releasehook = false); class TileMap; -void create_squirrel_instance(HSQUIRRELVM v, Scripting::TileMap* object, bool setup_releasehook = false); +void create_squirrel_instance(HSQUIRRELVM v, scripting::TileMap* object, bool setup_releasehook = false); class WillOWisp; -void create_squirrel_instance(HSQUIRRELVM v, Scripting::WillOWisp* object, bool setup_releasehook = false); +void create_squirrel_instance(HSQUIRRELVM v, scripting::WillOWisp* object, bool setup_releasehook = false); class Wind; -void create_squirrel_instance(HSQUIRRELVM v, Scripting::Wind* object, bool setup_releasehook = false); +void create_squirrel_instance(HSQUIRRELVM v, scripting::Wind* object, bool setup_releasehook = false); } diff --git a/src/supertux/colorscheme.cpp b/src/supertux/colorscheme.cpp index f0b74ed98..112288d40 100644 --- a/src/supertux/colorscheme.cpp +++ b/src/supertux/colorscheme.cpp @@ -44,7 +44,7 @@ namespace Climbable { Color text_color(1.0,1.0,0.6); } -namespace WorldMapNS { +namespace worldmap { namespace WorldMap { Color level_title_color(1.0,1.0,1.0); Color message_color(1.0,1.0,0.6); diff --git a/src/supertux/console.cpp b/src/supertux/console.cpp index 860869b58..ba171d013 100644 --- a/src/supertux/console.cpp +++ b/src/supertux/console.cpp @@ -51,7 +51,7 @@ Console::Console() : Console::~Console() { if(vm != NULL) { - sq_release(Scripting::global_vm, &vm_object); + sq_release(scripting::global_vm, &vm_object); } } @@ -81,15 +81,15 @@ void Console::ready_vm() { if(vm == NULL) { - vm = Scripting::global_vm; + vm = scripting::global_vm; HSQUIRRELVM new_vm = sq_newthread(vm, 16); if(new_vm == NULL) - throw Scripting::SquirrelError(vm, "Couldn't create new VM thread for console"); + throw scripting::SquirrelError(vm, "Couldn't create new VM thread for console"); // store reference to thread sq_resetobject(&vm_object); if(SQ_FAILED(sq_getstackobj(vm, -1, &vm_object))) - throw Scripting::SquirrelError(vm, "Couldn't get vm object for console"); + throw scripting::SquirrelError(vm, "Couldn't get vm object for console"); sq_addref(vm, &vm_object); sq_pop(vm, 1); @@ -97,7 +97,7 @@ Console::ready_vm() sq_newtable(new_vm); sq_pushroottable(new_vm); if(SQ_FAILED(sq_setdelegate(new_vm, -2))) - throw Scripting::SquirrelError(new_vm, "Couldn't set console_table delegate"); + throw scripting::SquirrelError(new_vm, "Couldn't set console_table delegate"); sq_setroottable(new_vm); @@ -106,7 +106,7 @@ Console::ready_vm() try { std::string filename = "scripts/console.nut"; IFileStream stream(filename); - Scripting::compile_and_run(vm, stream, filename); + scripting::compile_and_run(vm, stream, filename); } catch(std::exception& e) { log_warning << "Couldn't load console.nut: " << e.what() << std::endl; } @@ -116,7 +116,7 @@ Console::ready_vm() void Console::execute_script(const std::string& command) { - using namespace Scripting; + using namespace scripting; ready_vm(); diff --git a/src/supertux/game_session.cpp b/src/supertux/game_session.cpp index 4cded8f6f..b1396bf21 100644 --- a/src/supertux/game_session.cpp +++ b/src/supertux/game_session.cpp @@ -274,7 +274,7 @@ GameSession::force_ghost_mode() HSQUIRRELVM GameSession::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(); @@ -491,7 +491,7 @@ GameSession::update(float elapsed_time) void GameSession::finish(bool win) { - using namespace WorldMapNS; + using namespace worldmap; if (edit_mode) { force_ghost_mode(); diff --git a/src/supertux/main.cpp b/src/supertux/main.cpp index 0913daeb9..73e4e7d9a 100644 --- a/src/supertux/main.cpp +++ b/src/supertux/main.cpp @@ -568,7 +568,7 @@ Main::main(int argc, char** argv) Console::instance->init_graphics(); timelog("scripting"); - Scripting::init_squirrel(g_config->enable_script_debugger); + scripting::init_squirrel(g_config->enable_script_debugger); timelog("resources"); Resources::load_shared(); @@ -586,7 +586,7 @@ Main::main(int argc, char** argv) if(g_config->start_level.size() > 4 && g_config->start_level.compare(g_config->start_level.size() - 5, 5, ".stwm") == 0) { init_rand(); - g_screen_manager->push_screen(new WorldMapNS::WorldMap( + g_screen_manager->push_screen(new worldmap::WorldMap( FileSystem::basename(g_config->start_level))); } else { init_rand();//If level uses random eg. for @@ -633,7 +633,7 @@ Main::main(int argc, char** argv) g_main_controller = NULL; delete Console::instance; Console::instance = NULL; - Scripting::exit_squirrel(); + scripting::exit_squirrel(); delete texture_manager; texture_manager = NULL; SDL_Quit(); diff --git a/src/supertux/menu/addon_menu.cpp b/src/supertux/menu/addon_menu.cpp index d9f293b50..bf4e9b527 100644 --- a/src/supertux/menu/addon_menu.cpp +++ b/src/supertux/menu/addon_menu.cpp @@ -32,7 +32,8 @@ bool generate_addons_menu_sorter(const Addon* a1, const Addon* a2) } // namespace -AddonMenu::AddonMenu() +AddonMenu::AddonMenu() : + m_addons() { refresh(); } diff --git a/src/supertux/menu/contrib_menu.cpp b/src/supertux/menu/contrib_menu.cpp index 8652ed06d..5b6ee413d 100644 --- a/src/supertux/menu/contrib_menu.cpp +++ b/src/supertux/menu/contrib_menu.cpp @@ -24,7 +24,9 @@ #include "supertux/world.hpp" #include "util/gettext.hpp" -ContribMenu::ContribMenu() +ContribMenu::ContribMenu() : + m_contrib_world_menu(), + m_contrib_worlds() { /** Generating contrib levels list by making use of Level Subset */ std::vector level_worlds; @@ -36,7 +38,6 @@ ContribMenu::ContribMenu() } PHYSFS_freeList(files); - add_label(_("Contrib Levels")); add_hl(); diff --git a/src/supertux/menu/main_menu.cpp b/src/supertux/menu/main_menu.cpp index e498739ec..05aa91491 100644 --- a/src/supertux/menu/main_menu.cpp +++ b/src/supertux/menu/main_menu.cpp @@ -32,7 +32,8 @@ MainMenu::MainMenu() : m_addon_menu(), - m_contrib_menu() + m_contrib_menu(), + m_main_world() { set_pos(SCREEN_WIDTH/2, SCREEN_HEIGHT/2 + 35); add_entry(MNID_STARTGAME, _("Start Game")); diff --git a/src/supertux/screen_manager.cpp b/src/supertux/screen_manager.cpp index 011d9bc0f..493aaecb3 100644 --- a/src/supertux/screen_manager.cpp +++ b/src/supertux/screen_manager.cpp @@ -54,13 +54,13 @@ ScreenManager::ScreenManager() : screen_stack(), screenshot_requested(false) { - using namespace Scripting; + using namespace scripting; TimeScheduler::instance = new TimeScheduler(); } ScreenManager::~ScreenManager() { - using namespace Scripting; + using namespace scripting; delete TimeScheduler::instance; TimeScheduler::instance = NULL; @@ -176,8 +176,8 @@ ScreenManager::draw(DrawingContext& context) void ScreenManager::update_gamelogic(float elapsed_time) { - Scripting::update_debugger(); - Scripting::TimeScheduler::instance->update(game_time); + scripting::update_debugger(); + scripting::TimeScheduler::instance->update(game_time); current_screen->update(elapsed_time); if (MenuManager::current() != NULL) MenuManager::current()->update(); diff --git a/src/supertux/screen_manager.hpp b/src/supertux/screen_manager.hpp index 1cb5ffcbd..075136515 100644 --- a/src/supertux/screen_manager.hpp +++ b/src/supertux/screen_manager.hpp @@ -52,7 +52,7 @@ public: void set_screen_fade(ScreenFade* fade); /// threads that wait for a screenswitch - Scripting::ThreadQueue waiting_threads; + scripting::ThreadQueue waiting_threads; private: void draw_fps(DrawingContext& context, float fps); 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; } diff --git a/src/supertux/sector.hpp b/src/supertux/sector.hpp index 0b19f0e70..80d5c267b 100644 --- a/src/supertux/sector.hpp +++ b/src/supertux/sector.hpp @@ -60,7 +60,7 @@ enum MusicType { * * Sectors contain GameObjects, e.g. Badguys and Players. */ -class Sector : public Scripting::SSector, +class Sector : public scripting::SSector, public Currenton { public: @@ -179,7 +179,7 @@ public: typedef std::vector SpawnPoints; typedef std::vector Portables; - // --- Scripting --- + // --- scripting --- /** * get/set color of ambient light */ diff --git a/src/supertux/statistics.cpp b/src/supertux/statistics.cpp index b3aa2e036..3dea0f62a 100644 --- a/src/supertux/statistics.cpp +++ b/src/supertux/statistics.cpp @@ -93,13 +93,13 @@ Statistics::serialize_to_squirrel(HSQUIRRELVM vm) sq_pushstring(vm, "statistics", -1); sq_newtable(vm); - if (coins != nv_coins) Scripting::store_int(vm, "coins-collected", coins); - if (total_coins != nv_coins) Scripting::store_int(vm, "coins-collected-total", total_coins); - if (badguys != nv_badguys) Scripting::store_int(vm, "badguys-killed", badguys); - if (total_badguys != nv_badguys) Scripting::store_int(vm, "badguys-killed-total", total_badguys); - if (time != nv_time) Scripting::store_float(vm, "time-needed", time); - if (secrets != nv_secrets) Scripting::store_int(vm, "secrets-found", secrets); - if (total_secrets != nv_secrets) Scripting::store_int(vm, "secrets-found-total", total_secrets); + if (coins != nv_coins) scripting::store_int(vm, "coins-collected", coins); + if (total_coins != nv_coins) scripting::store_int(vm, "coins-collected-total", total_coins); + if (badguys != nv_badguys) scripting::store_int(vm, "badguys-killed", badguys); + if (total_badguys != nv_badguys) scripting::store_int(vm, "badguys-killed-total", total_badguys); + if (time != nv_time) scripting::store_float(vm, "time-needed", time); + if (secrets != nv_secrets) scripting::store_int(vm, "secrets-found", secrets); + if (total_secrets != nv_secrets) scripting::store_int(vm, "secrets-found-total", total_secrets); sq_createslot(vm, -3); } @@ -110,13 +110,13 @@ Statistics::unserialize_from_squirrel(HSQUIRRELVM vm) if(SQ_FAILED(sq_get(vm, -2))) { return; } - Scripting::get_int(vm, "coins-collected", coins); - Scripting::get_int(vm, "coins-collected-total", total_coins); - Scripting::get_int(vm, "badguys-killed", badguys); - Scripting::get_int(vm, "badguys-killed-total", total_badguys); - Scripting::get_float(vm, "time-needed", time); - Scripting::get_int(vm, "secrets-found", secrets); - Scripting::get_int(vm, "secrets-found-total", total_secrets); + scripting::get_int(vm, "coins-collected", coins); + scripting::get_int(vm, "coins-collected-total", total_coins); + scripting::get_int(vm, "badguys-killed", badguys); + scripting::get_int(vm, "badguys-killed-total", total_badguys); + scripting::get_float(vm, "time-needed", time); + scripting::get_int(vm, "secrets-found", secrets); + scripting::get_int(vm, "secrets-found-total", total_secrets); sq_pop(vm, 1); } diff --git a/src/supertux/world.cpp b/src/supertux/world.cpp index 3b75fdf66..e41fb3de7 100644 --- a/src/supertux/world.cpp +++ b/src/supertux/world.cpp @@ -48,7 +48,7 @@ World::World() : World::~World() { - sq_release(Scripting::global_vm, &world_thread); + sq_release(scripting::global_vm, &world_thread); if(current_ == this) current_ = NULL; } @@ -119,18 +119,18 @@ World::load(const std::string& filename) void World::run() { - using namespace Scripting; + using namespace scripting; current_ = this; // create new squirrel table for persistent game state - HSQUIRRELVM vm = Scripting::global_vm; + HSQUIRRELVM vm = scripting::global_vm; sq_pushroottable(vm); sq_pushstring(vm, "state", -1); sq_newtable(vm); if(SQ_FAILED(sq_createslot(vm, -3))) - throw Scripting::SquirrelError(vm, "Couldn't create state table"); + throw scripting::SquirrelError(vm, "Couldn't create state table"); sq_pop(vm, 1); load_state(); @@ -144,7 +144,7 @@ World::run() compile_and_run(object_to_vm(world_thread), in, filename); } catch(std::exception& ) { // fallback: try to load worldmap worldmap.stwm - using namespace WorldMapNS; + using namespace worldmap; g_screen_manager->push_screen(new WorldMap(basedir + "worldmap.stwm")); } } @@ -152,14 +152,14 @@ World::run() void World::save_state() { - using namespace Scripting; + using namespace scripting; lisp::Writer writer(savegame_filename); writer.start_list("supertux-savegame"); writer.write("version", 1); - using namespace WorldMapNS; + using namespace worldmap; if(WorldMap::current() != NULL) { std::ostringstream title; title << WorldMap::current()->get_title(); @@ -177,7 +177,7 @@ World::save_state() sq_pushroottable(global_vm); sq_pushstring(global_vm, "state", -1); if(SQ_SUCCEEDED(sq_get(global_vm, -2))) { - Scripting::save_squirrel_table(global_vm, -1, writer); + scripting::save_squirrel_table(global_vm, -1, writer); sq_pop(global_vm, 1); } sq_pop(global_vm, 1); @@ -189,7 +189,7 @@ World::save_state() void World::load_state() { - using namespace Scripting; + using namespace scripting; try { lisp::Parser parser; diff --git a/src/video/gl/gl_renderer.cpp b/src/video/gl/gl_renderer.cpp index 12086fc70..1e1f2d762 100644 --- a/src/video/gl/gl_renderer.cpp +++ b/src/video/gl/gl_renderer.cpp @@ -199,6 +199,7 @@ GLRenderer::GLRenderer() : throw std::runtime_error(out.str()); } log_info << "Using GLEW " << glewGetString(GLEW_VERSION) << std::endl; + log_info << "GL_ARB_texture_non_power_of_two: " << GL_ARB_texture_non_power_of_two << std::endl; #endif } diff --git a/src/worldmap/direction.cpp b/src/worldmap/direction.cpp index d0eac612d..e249437ad 100644 --- a/src/worldmap/direction.cpp +++ b/src/worldmap/direction.cpp @@ -18,7 +18,7 @@ #include "util/log.hpp" -namespace WorldMapNS { +namespace worldmap { Direction reverse_dir(Direction direction) { @@ -75,6 +75,6 @@ string_to_direction(const std::string& directory) } } -} // namespace WorldMapNS +} // namespace worldmap /* EOF */ diff --git a/src/worldmap/direction.hpp b/src/worldmap/direction.hpp index 764c9c07f..b4aa2d75a 100644 --- a/src/worldmap/direction.hpp +++ b/src/worldmap/direction.hpp @@ -19,7 +19,7 @@ #include -namespace WorldMapNS { +namespace worldmap { enum Direction { D_NONE, D_WEST, D_EAST, D_NORTH, D_SOUTH }; @@ -27,7 +27,7 @@ Direction reverse_dir(Direction direction); Direction string_to_direction(const std::string& directory); std::string direction_to_string(Direction direction); -} // namespace WorldMapNS +} // namespace worldmap #endif diff --git a/src/worldmap/level.cpp b/src/worldmap/level.cpp index 3529a4c59..3b502a7e9 100644 --- a/src/worldmap/level.cpp +++ b/src/worldmap/level.cpp @@ -27,7 +27,7 @@ #include "video/drawing_context.hpp" #include "worldmap/level.hpp" -namespace WorldMapNS { +namespace worldmap { LevelTile::LevelTile(const std::string& basedir, const Reader& lisp) : pos(), diff --git a/src/worldmap/level.hpp b/src/worldmap/level.hpp index 8c3e859df..b4961b424 100644 --- a/src/worldmap/level.hpp +++ b/src/worldmap/level.hpp @@ -28,7 +28,7 @@ class Sprite; -namespace WorldMapNS { +namespace worldmap { class LevelTile : public GameObject { @@ -66,7 +66,7 @@ private: LevelTile& operator=(const LevelTile&); }; -} // namespace WorldMapNS +} // namespace worldmap #endif diff --git a/src/worldmap/spawn_point.cpp b/src/worldmap/spawn_point.cpp index e805fc0f6..d7728fc04 100644 --- a/src/worldmap/spawn_point.cpp +++ b/src/worldmap/spawn_point.cpp @@ -21,7 +21,7 @@ #include "util/reader.hpp" #include "worldmap/spawn_point.hpp" -namespace WorldMapNS { +namespace worldmap { // from worldmap.cpp Direction string_to_direction(const std::string& directory); diff --git a/src/worldmap/spawn_point.hpp b/src/worldmap/spawn_point.hpp index ba98c9f27..dc48c98ff 100644 --- a/src/worldmap/spawn_point.hpp +++ b/src/worldmap/spawn_point.hpp @@ -24,7 +24,7 @@ #include "supertux/game_object.hpp" #include "worldmap/direction.hpp" -namespace WorldMapNS { +namespace worldmap { class SpawnPoint { diff --git a/src/worldmap/special_tile.cpp b/src/worldmap/special_tile.cpp index 9fba90b46..d804496ac 100644 --- a/src/worldmap/special_tile.cpp +++ b/src/worldmap/special_tile.cpp @@ -22,7 +22,7 @@ #include "video/drawing_context.hpp" #include "worldmap/special_tile.hpp" -namespace WorldMapNS { +namespace worldmap { SpecialTile::SpecialTile(const Reader& lisp) : pos(), diff --git a/src/worldmap/special_tile.hpp b/src/worldmap/special_tile.hpp index b17abe58e..6fd13de59 100644 --- a/src/worldmap/special_tile.hpp +++ b/src/worldmap/special_tile.hpp @@ -27,7 +27,7 @@ class Sprite; -namespace WorldMapNS { +namespace worldmap { class SpecialTile : public GameObject { @@ -61,7 +61,7 @@ public: bool apply_action_west; }; -} // namespace WorldMapNS +} // namespace worldmap #endif diff --git a/src/worldmap/sprite_change.cpp b/src/worldmap/sprite_change.cpp index 48c425ae2..e35c5584c 100644 --- a/src/worldmap/sprite_change.cpp +++ b/src/worldmap/sprite_change.cpp @@ -21,7 +21,7 @@ #include "video/drawing_context.hpp" #include "worldmap/sprite_change.hpp" -namespace WorldMapNS { +namespace worldmap { SpriteChange::SpriteChange(const Reader& lisp) : pos(), diff --git a/src/worldmap/sprite_change.hpp b/src/worldmap/sprite_change.hpp index fc9b9a2d4..0f7843e31 100644 --- a/src/worldmap/sprite_change.hpp +++ b/src/worldmap/sprite_change.hpp @@ -27,7 +27,7 @@ class Sprite; -namespace WorldMapNS { +namespace worldmap { class SpriteChange : public GameObject { @@ -75,7 +75,7 @@ private: static std::list all_sprite_changes; }; -} // namespace WorldMapNS +} // namespace worldmap #endif diff --git a/src/worldmap/teleporter.cpp b/src/worldmap/teleporter.cpp index 620a500cf..ab709d49a 100644 --- a/src/worldmap/teleporter.cpp +++ b/src/worldmap/teleporter.cpp @@ -21,7 +21,7 @@ #include "video/drawing_context.hpp" #include "worldmap/teleporter.hpp" -namespace WorldMapNS { +namespace worldmap { Teleporter::Teleporter(const Reader& lisp) : pos(), @@ -56,6 +56,6 @@ Teleporter::update(float ) { } -} // namespace WorldMapNS +} // namespace worldmap /* EOF */ diff --git a/src/worldmap/teleporter.hpp b/src/worldmap/teleporter.hpp index 18c423671..210e5467c 100644 --- a/src/worldmap/teleporter.hpp +++ b/src/worldmap/teleporter.hpp @@ -26,7 +26,7 @@ class Sprite; -namespace WorldMapNS { +namespace worldmap { class Teleporter : public GameObject { @@ -56,7 +56,7 @@ public: std::string message; }; -} // namespace WorldMapNS +} // namespace worldmap #endif diff --git a/src/worldmap/tux.cpp b/src/worldmap/tux.cpp index a98cfd92e..dfbe6efbf 100644 --- a/src/worldmap/tux.cpp +++ b/src/worldmap/tux.cpp @@ -25,7 +25,7 @@ #include "worldmap/level.hpp" #include "worldmap/tux.hpp" -namespace WorldMapNS { +namespace worldmap { static const float TUXSPEED = 200; static const float map_message_TIME = 2.8f; diff --git a/src/worldmap/tux.hpp b/src/worldmap/tux.hpp index 745f505f9..a4a485203 100644 --- a/src/worldmap/tux.hpp +++ b/src/worldmap/tux.hpp @@ -22,7 +22,7 @@ class Sprite; -namespace WorldMapNS { +namespace worldmap { class WorldMap; @@ -75,7 +75,7 @@ private: Tux& operator=(const Tux&); }; -} // namespace WorldMapNS +} // namespace worldmap #endif diff --git a/src/worldmap/worldmap.cpp b/src/worldmap/worldmap.cpp index 0f91b0adf..7f3a71d83 100644 --- a/src/worldmap/worldmap.cpp +++ b/src/worldmap/worldmap.cpp @@ -72,7 +72,7 @@ static const float CAMERA_PAN_SPEED = 5.0; -namespace WorldMapNS { +namespace worldmap { WorldMap* WorldMap::current_ = NULL; @@ -116,17 +116,17 @@ WorldMap::WorldMap(const std::string& filename, const std::string& force_spawnpo worldmap_menu.reset(new WorldmapMenu()); // create a new squirrel table for the worldmap - 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 worldmap_table delegate"); + throw scripting::SquirrelError(global_vm, "Couldn't set worldmap_table delegate"); sq_resetobject(&worldmap_table); if(SQ_FAILED(sq_getstackobj(global_vm, -1, &worldmap_table))) - throw Scripting::SquirrelError(global_vm, "Couldn't get table from stack"); + throw scripting::SquirrelError(global_vm, "Couldn't get table from stack"); sq_addref(global_vm, &worldmap_table); sq_pop(global_vm, 1); @@ -139,7 +139,7 @@ WorldMap::WorldMap(const std::string& filename, const std::string& force_spawnpo WorldMap::~WorldMap() { - using namespace Scripting; + using namespace scripting; if(free_tileset) delete tileset; @@ -187,7 +187,7 @@ WorldMap::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, worldmap_table); interface->expose(vm, -1); sq_pop(vm, 1); @@ -199,7 +199,7 @@ WorldMap::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, worldmap_table); try { @@ -885,7 +885,7 @@ WorldMap::setup() tux->setup(); // register worldmap_table as worldmap in scripting - using namespace Scripting; + using namespace scripting; sq_pushroottable(global_vm); sq_pushstring(global_vm, "worldmap", -1); @@ -911,7 +911,7 @@ WorldMap::setup() void WorldMap::leave() { - using namespace Scripting; + using namespace scripting; // save state of world and player save_state(); @@ -927,7 +927,7 @@ WorldMap::leave() void WorldMap::save_state() { - using namespace Scripting; + using namespace scripting; HSQUIRRELVM vm = global_vm; int oldtop = sq_gettop(vm); @@ -937,7 +937,7 @@ WorldMap::save_state() sq_pushroottable(vm); sq_pushstring(vm, "state", -1); if(SQ_FAILED(sq_get(vm, -2))) - throw Scripting::SquirrelError(vm, "Couldn't get state table"); + throw scripting::SquirrelError(vm, "Couldn't get state table"); // get or create worlds table sq_pushstring(vm, "worlds", -1); @@ -945,11 +945,11 @@ WorldMap::save_state() sq_pushstring(vm, "worlds", -1); sq_newtable(vm); if(SQ_FAILED(sq_createslot(vm, -3))) - throw Scripting::SquirrelError(vm, "Couldn't create state.worlds"); + throw scripting::SquirrelError(vm, "Couldn't create state.worlds"); sq_pushstring(vm, "worlds", -1); if(SQ_FAILED(sq_get(vm, -2))) - throw Scripting::SquirrelError(vm, "Couldn't create.get state.worlds"); + throw scripting::SquirrelError(vm, "Couldn't create.get state.worlds"); } sq_pushstring(vm, map_filename.c_str(), map_filename.length()); @@ -1006,7 +1006,7 @@ WorldMap::save_state() void WorldMap::load_state() { - using namespace Scripting; + using namespace scripting; HSQUIRRELVM vm = global_vm; int oldtop = sq_gettop(vm); @@ -1016,22 +1016,22 @@ WorldMap::load_state() sq_pushroottable(vm); sq_pushstring(vm, "state", -1); if(SQ_FAILED(sq_get(vm, -2))) - throw Scripting::SquirrelError(vm, "Couldn't get state table"); + throw scripting::SquirrelError(vm, "Couldn't get state table"); // get worlds table sq_pushstring(vm, "worlds", -1); if(SQ_FAILED(sq_get(vm, -2))) - throw Scripting::SquirrelError(vm, "Couldn't get state.worlds"); + throw scripting::SquirrelError(vm, "Couldn't get state.worlds"); // get table for our world sq_pushstring(vm, map_filename.c_str(), map_filename.length()); if(SQ_FAILED(sq_get(vm, -2))) - throw Scripting::SquirrelError(vm, "Couldn't get state.worlds.mapfilename"); + throw scripting::SquirrelError(vm, "Couldn't get state.worlds.mapfilename"); // load tux sq_pushstring(vm, "tux", -1); if(SQ_FAILED(sq_get(vm, -2))) - throw Scripting::SquirrelError(vm, "Couldn't get tux"); + throw scripting::SquirrelError(vm, "Couldn't get tux"); Vector p; p.x = read_float(vm, "x"); @@ -1045,7 +1045,7 @@ WorldMap::load_state() // load levels sq_pushstring(vm, "levels", -1); if(SQ_FAILED(sq_get(vm, -2))) - throw Scripting::SquirrelError(vm, "Couldn't get levels"); + throw scripting::SquirrelError(vm, "Couldn't get levels"); for(LevelTiles::iterator i = levels.begin(); i != levels.end(); ++i) { LevelTile* level = *i; @@ -1095,7 +1095,7 @@ WorldMap::solved_level_count() HSQUIRRELVM WorldMap::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(); @@ -1148,6 +1148,6 @@ WorldMap::get_height() const return height; } -} // namespace WorldMapNS +} // namespace worldmap /* EOF */ diff --git a/src/worldmap/worldmap.hpp b/src/worldmap/worldmap.hpp index b22cea131..f206ad1cc 100644 --- a/src/worldmap/worldmap.hpp +++ b/src/worldmap/worldmap.hpp @@ -42,7 +42,7 @@ class Menu; class GameObject; class TileMap; -namespace WorldMapNS { +namespace worldmap { class Tux; class LevelTile; @@ -58,10 +58,6 @@ enum { WEST_EAST_WAY }; -std::string direction_to_string(Direction d); -Direction string_to_direction(const std::string& d); -Direction reverse_dir(Direction d); - /** * Screen that runs a WorldMap, which lets the player choose a Level. */ @@ -237,7 +233,7 @@ private: WorldMap& operator=(const WorldMap&); }; -} // namespace WorldMapNS +} // namespace worldmap #endif diff --git a/tools/miniswig/create_wrapper.cpp b/tools/miniswig/create_wrapper.cpp index 826a9aba8..1317167dd 100644 --- a/tools/miniswig/create_wrapper.cpp +++ b/tools/miniswig/create_wrapper.cpp @@ -29,7 +29,7 @@ WrapperCreator::create_wrapper(Namespace* ns) << "#ifndef HEADER_SUPERTUX_SCRIPTING_WRAPPER_HPP\n" //TODO avoid hardcoding << "#define HEADER_SUPERTUX_SCRIPTING_WRAPPER_HPP\n" << "\n" - << "namespace Scripting {\n" + << "namespace scripting {\n" << "\n"; hppout << "void register_" << modulename << "_wrapper(HSQUIRRELVM v);\n" @@ -66,8 +66,8 @@ WrapperCreator::create_wrapper(Namespace* ns) << "#include \"scripting/squirrel_error.hpp\"\n" << "#include \"scripting/wrapper.interface.hpp\"\n" << "\n" - << "namespace Scripting {\n" - << "namespace Wrapper {\n" + << "namespace scripting {\n" + << "namespace wrapper {\n" << "\n"; for(std::vector::iterator i = ns->types.begin(); @@ -82,7 +82,7 @@ WrapperCreator::create_wrapper(Namespace* ns) create_function_wrapper(0, *i); } - out << "} // end of namespace Wrapper\n"; + out << "} // namespace wrapper\n"; for(std::vector::iterator i = ns->types.begin(); i != ns->types.end(); ++i) { @@ -94,7 +94,7 @@ WrapperCreator::create_wrapper(Namespace* ns) out << "void register_" << modulename << "_wrapper(HSQUIRRELVM v)\n" << "{\n" - << ind << "using namespace Wrapper;\n" + << ind << "using namespace wrapper;\n" << "\n"; create_register_constants_code(ns); @@ -103,7 +103,7 @@ WrapperCreator::create_wrapper(Namespace* ns) out << "}\n" << "\n" - << "} // end of namespace Scripting\n" + << "} // namespace scripting\n" << "\n" << "/* EOF */\n"; } @@ -519,7 +519,7 @@ WrapperCreator::create_squirrel_instance(Class* _class) << ns_prefix << _class->name << "* object, bool setup_releasehook)\n" << "{\n" - << ind << "using namespace Wrapper;\n" + << ind << "using namespace wrapper;\n" << "\n" << ind << "sq_pushroottable(v);\n" << ind << "sq_pushstring(v, \"" << _class->name << "\", -1);\n"