From: Arvid Norlander Date: Sun, 28 Jan 2007 13:23:57 +0000 (+0000) Subject: Fixed trailing whitespaces in all(?) source files of supertux, also fixed some svn... X-Git-Url: https://git.octo.it/?p=supertux.git;a=commitdiff_plain;h=a983f6648d43492632c41e2b7519b70458b53cf4 Fixed trailing whitespaces in all(?) source files of supertux, also fixed some svn properties on some files. (svn:mime-type for images; svn:keywords and svn:eol-style for some source files) SVN-Revision: 4701 --- diff --git a/src/addon.cpp b/src/addon.cpp index 9f0235723..4057502df 100644 --- a/src/addon.cpp +++ b/src/addon.cpp @@ -23,16 +23,15 @@ #include "addon_manager.hpp" void -Addon::install() +Addon::install() { AddonManager& adm = AddonManager::get_instance(); adm.install(*this); } void -Addon::remove() +Addon::remove() { AddonManager& adm = AddonManager::get_instance(); adm.remove(*this); } - diff --git a/src/addon.hpp b/src/addon.hpp index 9e9bcc1b0..22615120d 100644 --- a/src/addon.hpp +++ b/src/addon.hpp @@ -48,4 +48,3 @@ public: }; #endif - diff --git a/src/addon_manager.cpp b/src/addon_manager.cpp index 3181bb77c..dcbbdf126 100644 --- a/src/addon_manager.cpp +++ b/src/addon_manager.cpp @@ -36,7 +36,7 @@ #ifdef HAVE_LIBCURL namespace { - size_t my_curl_string_append(void *ptr, size_t size, size_t nmemb, void *string_ptr) + size_t my_curl_string_append(void *ptr, size_t size, size_t nmemb, void *string_ptr) { std::string& s = *static_cast(string_ptr); std::string buf(static_cast(ptr), size * nmemb); @@ -44,8 +44,8 @@ namespace { log_debug << "read " << size * nmemb << " bytes of data..." << std::endl; return size * nmemb; } - - size_t my_curl_physfs_write(void *ptr, size_t size, size_t nmemb, void *f_p) + + size_t my_curl_physfs_write(void *ptr, size_t size, size_t nmemb, void *f_p) { PHYSFS_file* f = static_cast(f_p); PHYSFS_sint64 written = PHYSFS_write(f, ptr, size, nmemb); @@ -56,7 +56,7 @@ namespace { } #endif -AddonManager& +AddonManager& AddonManager::get_instance() { static AddonManager instance; @@ -76,8 +76,8 @@ AddonManager::~AddonManager() curl_global_cleanup(); #endif } - -std::vector + +std::vector AddonManager::get_addons() const { std::vector addons; @@ -99,11 +99,11 @@ AddonManager::get_addons() const // make sure it looks like an archive static const std::string archiveExt = ".zip"; if (fileName.compare(fileName.length()-archiveExt.length(), archiveExt.length(), archiveExt) != 0) continue; - + // make sure it exists struct stat stats; if (stat(fileName.c_str(), &stats) != 0) continue; - + // make sure it's an actual file if (!S_ISREG(stats.st_mode)) continue; @@ -112,13 +112,13 @@ AddonManager::get_addons() const std::string::size_type n = fileName.rfind(dirSep) + 1; if (n == std::string::npos) n = 0; std::string title = fileName.substr(n, fileName.length() - n - archiveExt.length()); - + Addon addon; addon.title = title; addon.fname = fileName; addon.isInstalled = true; - addons.push_back(addon); + addons.push_back(addon); } #ifdef HAVE_LIBCURL @@ -165,12 +165,12 @@ AddonManager::get_addons() const static const std::string archiveExt = ".zip"; if (url.compare(url.length()-archiveExt.length(), archiveExt.length(), archiveExt) != 0) continue; - // extract nice title + // extract nice title std::string::size_type n = url.rfind('/') + 1; if (n == std::string::npos) n = 0; std::string title = url.substr(n, url.length() - n - archiveExt.length()); - // construct file name + // construct file name std::string fname = url.substr(n); // make sure it does not contain weird characters @@ -182,17 +182,17 @@ AddonManager::get_addons() const addon.url = url; addon.isInstalled = false; - addons.push_back(addon); + addons.push_back(addon); } #endif - + return addons; } void -AddonManager::install(const Addon& - #ifdef HAVE_LIBCURL +AddonManager::install(const Addon& + #ifdef HAVE_LIBCURL addon #endif ) @@ -219,7 +219,7 @@ AddonManager::install(const Addon& PHYSFS_close(f); free(url); - + static const std::string writeDir = PHYSFS_getWriteDir(); static const std::string dirSep = PHYSFS_getDirSeparator(); std::string fullFilename = writeDir + dirSep + addon.fname; @@ -229,10 +229,9 @@ AddonManager::install(const Addon& } -void +void AddonManager::remove(const Addon& addon) { PHYSFS_removeFromSearchPath(addon.fname.c_str()); unlink(addon.fname.c_str()); } - diff --git a/src/addon_manager.hpp b/src/addon_manager.hpp index f56e65aec..ba53b7249 100644 --- a/src/addon_manager.hpp +++ b/src/addon_manager.hpp @@ -54,4 +54,3 @@ protected: }; #endif - diff --git a/src/audio/sound_manager.cpp b/src/audio/sound_manager.cpp index af6da5ca4..7d285ffb3 100644 --- a/src/audio/sound_manager.cpp +++ b/src/audio/sound_manager.cpp @@ -139,7 +139,7 @@ SoundManager::intern_create_sound_source(const std::string& filename) } else { // Load sound file std::auto_ptr file (load_sound_file(filename)); - + if(file->size < 100000) { buffer = load_file_into_buffer(file.get()); buffers.insert(std::make_pair(filename, buffer)); @@ -159,7 +159,7 @@ SoundManager::create_sound_source(const std::string& filename) { if(!sound_enabled) return create_dummy_sound_source(); - + try { return intern_create_sound_source(filename); } catch(std::exception &e) { diff --git a/src/badguy/badguy.cpp b/src/badguy/badguy.cpp index e7bc8e63e..fcf3b1f42 100644 --- a/src/badguy/badguy.cpp +++ b/src/badguy/badguy.cpp @@ -62,7 +62,7 @@ BadGuy::BadGuy(const lisp::Lisp& reader, const std::string& sprite_name, int lay reader.get("direction", dir_str); start_dir = str2dir( dir_str ); dir = start_dir; - + reader.get("dead-script", dead_script); draw_dead_script_hint = (dead_script != ""); @@ -176,7 +176,7 @@ BadGuy::collision_tile(uint32_t tile_attributes) if(tile_attributes & Tile::HURTS) { if (tile_attributes & Tile::FIRE) { if (is_flammable()) ignite(); - } + } else if (tile_attributes & Tile::ICE) { if (is_freezable()) freeze(); } @@ -283,7 +283,7 @@ BadGuy::collision_bullet(Bullet& bullet, const CollisionHit& hit) bullet.ricochet(*this, hit); return FORCE_MOVE; } - } + } else if (is_ignited()) { if(bullet.get_type() == ICE_BONUS) { // ice bullets extinguish ignited badguys @@ -545,26 +545,25 @@ BadGuy::is_frozen() const return frozen; } -void -BadGuy::ignite() +void +BadGuy::ignite() { kill_fall(); } -void -BadGuy::extinguish() +void +BadGuy::extinguish() { } -bool -BadGuy::is_flammable() const +bool +BadGuy::is_flammable() const { return true; } -bool -BadGuy::is_ignited() const +bool +BadGuy::is_ignited() const { return ignited; } - diff --git a/src/badguy/badguy.hpp b/src/badguy/badguy.hpp index a6f019797..f7ebbfffc 100644 --- a/src/badguy/badguy.hpp +++ b/src/badguy/badguy.hpp @@ -107,7 +107,7 @@ public: * Returns whether to call ignite() when a badguy gets hit by a fire bullet */ virtual bool is_flammable() const; - + /** * Returns whether this badguys is currently on fire */ @@ -224,7 +224,7 @@ protected: bool frozen; bool ignited; /**< true if this badguy is currently on fire */ - + std::string dead_script; /**< script to execute when badguy is killed */ bool draw_dead_script_hint; /**< whether to draw a visual indication that this Badguy triggers a script */ diff --git a/src/badguy/mole.cpp b/src/badguy/mole.cpp index 73c187741..513274352 100644 --- a/src/badguy/mole.cpp +++ b/src/badguy/mole.cpp @@ -132,7 +132,7 @@ Mole::active_update(float elapsed_time) } -void +void Mole::set_state(MoleState new_state) { switch (new_state) { @@ -166,4 +166,3 @@ Mole::set_state(MoleState new_state) } IMPLEMENT_FACTORY(Mole, "mole") - diff --git a/src/badguy/stalactite.cpp b/src/badguy/stalactite.cpp index 6117e2dd1..8bde2fbd3 100644 --- a/src/badguy/stalactite.cpp +++ b/src/badguy/stalactite.cpp @@ -99,7 +99,7 @@ Stalactite::collision_player(Player& player) return FORCE_MOVE; } -HitResponse +HitResponse Stalactite::collision_badguy(BadGuy& other, const CollisionHit& hit) { if (state == STALACTITE_SQUISHED) return FORCE_MOVE; @@ -130,7 +130,7 @@ Stalactite::draw(DrawingContext& context) if(get_state() != STATE_ACTIVE) return; - + if(state == STALACTITE_SQUISHED) { sprite->draw(context, get_pos(), LAYER_OBJECTS); return; diff --git a/src/badguy/walking_badguy.cpp b/src/badguy/walking_badguy.cpp index 37816dc68..a3c05625d 100644 --- a/src/badguy/walking_badguy.cpp +++ b/src/badguy/walking_badguy.cpp @@ -123,17 +123,15 @@ WalkingBadguy::unfreeze() WalkingBadguy::activate(); } - -float + +float WalkingBadguy::get_velocity_y() const { return physic.get_velocity_y(); } -void +void WalkingBadguy::set_velocity_y(float vy) { physic.set_velocity_y(vy); } - - diff --git a/src/badguy/walking_badguy.hpp b/src/badguy/walking_badguy.hpp index b6a934b75..f8afc5071 100644 --- a/src/badguy/walking_badguy.hpp +++ b/src/badguy/walking_badguy.hpp @@ -39,7 +39,7 @@ public: HitResponse collision_badguy(BadGuy& badguy, const CollisionHit& hit); void freeze(); void unfreeze(); - + float get_velocity_y() const; void set_velocity_y(float vy); diff --git a/src/game_object.cpp b/src/game_object.cpp index ee63ec1c1..1faa7bd3f 100644 --- a/src/game_object.cpp +++ b/src/game_object.cpp @@ -38,4 +38,3 @@ GameObject::~GameObject() entry = next; } } - diff --git a/src/game_object.hpp b/src/game_object.hpp index 76b0883c6..f463f88d4 100644 --- a/src/game_object.hpp +++ b/src/game_object.hpp @@ -105,4 +105,3 @@ protected: }; #endif /*SUPERTUX_GAMEOBJECT_H*/ - diff --git a/src/game_session.hpp b/src/game_session.hpp index 87d0b3e0a..4e76139bd 100644 --- a/src/game_session.hpp +++ b/src/game_session.hpp @@ -65,7 +65,7 @@ public: void set_reset_point(const std::string& sectorname, const Vector& pos); std::string get_reset_point_sectorname() { return reset_sector; } - + Vector get_reset_point_pos() { return reset_pos; } diff --git a/src/main.cpp b/src/main.cpp index 801bf45fc..730809896 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -185,11 +185,11 @@ static void init_physfs(const char* argv0) #ifdef ENABLE_BINRELOC char* dir; - br_init (NULL); - dir = br_find_data_dir(APPDATADIR); + br_init (NULL); + dir = br_find_data_dir(APPDATADIR); datadir = dir; datadir += "/" PACKAGE_NAME; - free(dir); + free(dir); #else datadir = APPDATADIR; diff --git a/src/mainloop.cpp b/src/mainloop.cpp index 55bc630ea..52ccf6092 100644 --- a/src/mainloop.cpp +++ b/src/mainloop.cpp @@ -237,7 +237,7 @@ MainLoop::run() int frames = 0; - if (elapsed_ticks > TICKS_PER_FRAME) { + if (elapsed_ticks > TICKS_PER_FRAME) { while(elapsed_ticks > TICKS_PER_FRAME && frames < MAX_FRAME_SKIP) { elapsed_ticks -= TICKS_PER_FRAME; float timestep = 1.0 / LOGICAL_FPS; diff --git a/src/object/ambient_sound.hpp b/src/object/ambient_sound.hpp index 8f4dbbce0..a7a14bca7 100644 --- a/src/object/ambient_sound.hpp +++ b/src/object/ambient_sound.hpp @@ -67,15 +67,15 @@ public: return position; } - /** + /** * @name Scriptable Methods - * @{ + * @{ */ void set_pos(float x, float y); float get_pos_x() const; float get_pos_y() const; - /** - * @} + /** + * @} */ protected: diff --git a/src/object/bullet.cpp b/src/object/bullet.cpp index 564b7ba0f..c761735d5 100644 --- a/src/object/bullet.cpp +++ b/src/object/bullet.cpp @@ -95,7 +95,7 @@ Bullet::collision_solid(const CollisionHit& hit) } } -void +void Bullet::ricochet(GameObject& , const CollisionHit& hit) { collision_solid(hit); diff --git a/src/object/bullet.hpp b/src/object/bullet.hpp index 789144722..c3464d7d5 100644 --- a/src/object/bullet.hpp +++ b/src/object/bullet.hpp @@ -42,7 +42,7 @@ public: * Note that the @c hit parameter is filled in as perceived by the object, not by the bullet. */ void ricochet(GameObject& other, const CollisionHit& hit); - + BonusType get_type() { return type; diff --git a/src/object/camera.cpp b/src/object/camera.cpp index e14353ccb..b6f2a01cd 100644 --- a/src/object/camera.cpp +++ b/src/object/camera.cpp @@ -322,11 +322,11 @@ Camera::update_scroll_normal(float elapsed_time) // when suddenly changing directions while scrolling into the other direction. // abort scrolling, since tux might be going left/right at a relatively small // part of the map (like when jumping upwards) - - // Find out direction in which the player walks: We want to try and show a + + // Find out direction in which the player walks: We want to try and show a // bit more of what's in front of the player and less of what's behind - LeftRightScrollChange walkDirection; + LeftRightScrollChange walkDirection; if (player->physic.get_velocity_x() < -EPSILON) walkDirection = LEFT; else if (player->physic.get_velocity_x() > EPSILON) walkDirection = RIGHT; else if (player->dir == ::LEFT) walkDirection = LEFT; diff --git a/src/object/candle.hpp b/src/object/candle.hpp index f461a067f..c82db5e31 100644 --- a/src/object/candle.hpp +++ b/src/object/candle.hpp @@ -42,15 +42,15 @@ public: virtual void expose(HSQUIRRELVM vm, SQInteger table_idx); virtual void unexpose(HSQUIRRELVM vm, SQInteger table_idx); - /** + /** * @name Scriptable Methods - * @{ + * @{ */ void puff_smoke(); /**< spawn a puff of smoke */ bool get_burning(); /**< returns true if candle is lighted */ void set_burning(bool burning); /**< true: light candle, false: extinguish candle */ - /** - * @} + /** + * @} */ private: diff --git a/src/object/display_effect.hpp b/src/object/display_effect.hpp index d10ab8001..8c3f8572e 100644 --- a/src/object/display_effect.hpp +++ b/src/object/display_effect.hpp @@ -38,9 +38,9 @@ public: void draw(DrawingContext& context); - /** + /** * @name Scriptable Methods - * @{ + * @{ */ void fade_out(float fadetime); @@ -50,8 +50,8 @@ public: void sixteen_to_nine(float fadetime); void four_to_three(float fadetime); - /** - * @} + /** + * @} */ private: diff --git a/src/object/endsequence.cpp b/src/object/endsequence.cpp index 4f17cf9f1..c9a91d330 100644 --- a/src/object/endsequence.cpp +++ b/src/object/endsequence.cpp @@ -51,7 +51,7 @@ void EndSequence::update(float elapsed_time) { if (!isrunning) return; - running(elapsed_time); + running(elapsed_time); } void @@ -65,7 +65,7 @@ EndSequence::start() if (isrunning) return; isrunning = true; isdone = false; - + Player& tux = *Sector::current()->player; end_sequence_controller = new CodeController(); tux.set_controller(end_sequence_controller); @@ -100,7 +100,7 @@ EndSequence::is_done() { return isdone; } - + void EndSequence::starting() { @@ -129,4 +129,3 @@ void EndSequence::stopping() { } - diff --git a/src/object/endsequence.hpp b/src/object/endsequence.hpp index 07f1267c7..68cb0e5df 100644 --- a/src/object/endsequence.hpp +++ b/src/object/endsequence.hpp @@ -31,7 +31,7 @@ class EndSequence : public GameObject public: EndSequence(); virtual ~EndSequence(); - + virtual void update(float elapsed_time); virtual void draw(DrawingContext& context); diff --git a/src/object/firefly.cpp b/src/object/firefly.cpp index dc537cc2c..bd4f70a15 100644 --- a/src/object/firefly.cpp +++ b/src/object/firefly.cpp @@ -49,7 +49,7 @@ Firefly::Firefly(const lisp::Lisp& lisp) reactivate(); } -void +void Firefly::reactivate() { if(GameSession::current()->get_reset_point_pos() == initial_position){ diff --git a/src/object/floating_image.hpp b/src/object/floating_image.hpp index 897e879ff..19797dbaf 100644 --- a/src/object/floating_image.hpp +++ b/src/object/floating_image.hpp @@ -64,7 +64,7 @@ public: void set_action(const std::string& action); std::string get_action(); - + void fade_in(float fadetime); void fade_out(float fadetime); diff --git a/src/object/lantern.hpp b/src/object/lantern.hpp index c5352dfc5..5bf7dc729 100644 --- a/src/object/lantern.hpp +++ b/src/object/lantern.hpp @@ -26,7 +26,7 @@ /** * Lantern. A portable Light Source. */ -class Lantern : public Rock +class Lantern : public Rock { public: Lantern(const lisp::Lisp& reader); diff --git a/src/object/level_time.cpp b/src/object/level_time.cpp index 65a8e3697..5ac1ba2cd 100644 --- a/src/object/level_time.cpp +++ b/src/object/level_time.cpp @@ -116,8 +116,8 @@ LevelTime::stop() { running = false; } - -float + +float LevelTime::get_time() { return time_left; diff --git a/src/object/level_time.hpp b/src/object/level_time.hpp index 45f001a6e..2ef9c8c69 100644 --- a/src/object/level_time.hpp +++ b/src/object/level_time.hpp @@ -31,23 +31,23 @@ class LevelTime : public GameObject, public ScriptInterface { public: LevelTime(const lisp::Lisp& reader); - + virtual void expose(HSQUIRRELVM vm, SQInteger table_idx); virtual void unexpose(HSQUIRRELVM vm, SQInteger table_idx); void update(float elapsed_time); void draw(DrawingContext& context); - /** + /** * @name Scriptable Methods - * @{ + * @{ */ /** * Resumes the countdown */ void start(); - + /** * Pauses the countdown */ @@ -63,8 +63,8 @@ public: */ void set_time(float time_left); - /** - * @} + /** + * @} */ private: diff --git a/src/object/light.cpp b/src/object/light.cpp index f11e1c2d1..a0abfcf39 100644 --- a/src/object/light.cpp +++ b/src/object/light.cpp @@ -55,4 +55,3 @@ Light::draw(DrawingContext& context) context.pop_target(); } - diff --git a/src/object/magicblock.cpp b/src/object/magicblock.cpp index 1c7e3cc95..9d0caf8b0 100644 --- a/src/object/magicblock.cpp +++ b/src/object/magicblock.cpp @@ -2,7 +2,7 @@ // // SuperTux - MagicBlock // -// Magic Blocks are tile-like game objects that are sensitive to +// Magic Blocks are tile-like game objects that are sensitive to // lighting conditions. They are rendered in a color and // will only be solid as long as light of the same color shines // on the block. @@ -73,7 +73,7 @@ MagicBlock::MagicBlock(const lisp::Lisp& lisp) void MagicBlock::update(float elapsed_time) { - //Check if center of this block is on screen. + //Check if center of this block is on screen. //Don't update if not, because there is no light off screen. float screen_left = Sector::current()->camera->get_translation().x; float screen_top = Sector::current()->camera->get_translation().y; diff --git a/src/object/magicblock.hpp b/src/object/magicblock.hpp index fcb15f69f..3509e7332 100644 --- a/src/object/magicblock.hpp +++ b/src/object/magicblock.hpp @@ -1,8 +1,8 @@ // $Id$ // // SuperTux - MagicBlock -// -// Magic Blocks are tile-like game objects that are sensitive to +// +// Magic Blocks are tile-like game objects that are sensitive to // lighting conditions. They are rendered in a color and // will only be solid as long as light of the same color shines // on the block. The black block becomes solid, if any kind of diff --git a/src/object/moving_sprite.cpp b/src/object/moving_sprite.cpp index 5096c95e9..0c746a5bd 100644 --- a/src/object/moving_sprite.cpp +++ b/src/object/moving_sprite.cpp @@ -146,4 +146,3 @@ MovingSprite::set_action(const std::string& action, int loops, AnchorPoint ancho set_size(w, h); set_pos(get_anchor_pos(old_bbox, w, h, anchorPoint)); } - diff --git a/src/object/platform.hpp b/src/object/platform.hpp index 0815a7118..a9567ed08 100644 --- a/src/object/platform.hpp +++ b/src/object/platform.hpp @@ -44,9 +44,9 @@ public: return speed; } - /** + /** * @name Scriptable Methods - * @{ + * @{ */ /** Move platform until at given node, then stop */ @@ -58,8 +58,8 @@ public: /** Stop platform at next node */ void stop_moving(); - /** - * @} + /** + * @} */ virtual void expose(HSQUIRRELVM vm, SQInteger table_idx); diff --git a/src/object/player.cpp b/src/object/player.cpp index 41aed424b..bcde741c4 100644 --- a/src/object/player.cpp +++ b/src/object/player.cpp @@ -197,7 +197,7 @@ Player::get_speedlimit() void Player::set_speedlimit(float newlimit) { - speedlimit=newlimit; + speedlimit=newlimit; } void @@ -659,7 +659,7 @@ Player::handle_input() } } -void +void Player::try_grab() { if(controller->hold(Controller::ACTION) && !grabbed_object diff --git a/src/object/player.hpp b/src/object/player.hpp index 8e1264879..dc23f2ffb 100644 --- a/src/object/player.hpp +++ b/src/object/player.hpp @@ -90,8 +90,8 @@ public: PlayerStatus* player_status; bool duck; bool dead; - //Tux can only go this fast. If set to 0 no special limit is used, only the default limits. - void set_speedlimit(float newlimit); + //Tux can only go this fast. If set to 0 no special limit is used, only the default limits. + void set_speedlimit(float newlimit); float get_speedlimit(); private: diff --git a/src/object/pulsing_light.cpp b/src/object/pulsing_light.cpp index 4f3fd9d14..c5d5872b2 100644 --- a/src/object/pulsing_light.cpp +++ b/src/object/pulsing_light.cpp @@ -56,4 +56,3 @@ PulsingLight::draw(DrawingContext& context) color = old_color; } - diff --git a/src/object/pushbutton.cpp b/src/object/pushbutton.cpp index 45012f33b..30e364c40 100644 --- a/src/object/pushbutton.cpp +++ b/src/object/pushbutton.cpp @@ -71,7 +71,7 @@ PushButton::collision(GameObject& other, const CollisionHit& hit) // play sound sound_manager->play(BUTTON_SOUND); - + // run script std::istringstream stream(script); Sector::current()->run_script(stream, "PushButton"); @@ -80,4 +80,3 @@ PushButton::collision(GameObject& other, const CollisionHit& hit) } IMPLEMENT_FACTORY(PushButton, "pushbutton"); - diff --git a/src/object/scripted_object.hpp b/src/object/scripted_object.hpp index 9ac72c56e..e7d6f9dbf 100644 --- a/src/object/scripted_object.hpp +++ b/src/object/scripted_object.hpp @@ -27,7 +27,7 @@ #include "script_interface.hpp" #include "scripting/scripted_object.hpp" -class ScriptedObject : public MovingSprite, public UsesPhysic, +class ScriptedObject : public MovingSprite, public UsesPhysic, public Scripting::ScriptedObject, public ScriptInterface { public: diff --git a/src/object/thunderstorm.hpp b/src/object/thunderstorm.hpp index 7aa8173ee..5a7fbe808 100644 --- a/src/object/thunderstorm.hpp +++ b/src/object/thunderstorm.hpp @@ -40,9 +40,9 @@ public: virtual void expose(HSQUIRRELVM vm, SQInteger table_idx); virtual void unexpose(HSQUIRRELVM vm, SQInteger table_idx); - /** + /** * @name Scriptable Methods - * @{ + * @{ */ /** @@ -75,8 +75,8 @@ public: */ void electrify(); - /** - * @} + /** + * @} */ private: diff --git a/src/object/tilemap.cpp b/src/object/tilemap.cpp index d7b770a71..e7d6367f2 100644 --- a/src/object/tilemap.cpp +++ b/src/object/tilemap.cpp @@ -79,7 +79,7 @@ TileMap::TileMap(const lisp::Lisp& reader, TileManager* new_tile_manager) set_x_offset(v.x); set_y_offset(v.y); } - + std::string draw_target_s = "normal"; reader.get("draw-target", draw_target_s); if (draw_target_s == "normal") draw_target = DrawingContext::NORMAL; @@ -288,8 +288,8 @@ TileMap::resize(int new_width, int new_height, int fill_id) width = new_width; } -void -TileMap::set_solid(bool solid) +void +TileMap::set_solid(bool solid) { this->solid = solid; } @@ -333,7 +333,7 @@ TileMap::change_all(uint32_t oldtile, uint32_t newtile) } } -void +void TileMap::fade(float alpha, float seconds) { this->alpha = alpha; diff --git a/src/object/tilemap.hpp b/src/object/tilemap.hpp index 73c0f5722..69a5b2ada 100644 --- a/src/object/tilemap.hpp +++ b/src/object/tilemap.hpp @@ -64,7 +64,7 @@ public: /** Stop tilemap at next node */ void stop_moving(); - + virtual void expose(HSQUIRRELVM vm, SQInteger table_idx); virtual void unexpose(HSQUIRRELVM vm, SQInteger table_idx); @@ -156,7 +156,7 @@ private: float alpha; /**< requested tilemap opacity */ float current_alpha; /**< current tilemap opacity */ float remaining_fade_time; /**< seconds until requested tilemap opacity is reached */ - + std::auto_ptr path; std::auto_ptr walker; diff --git a/src/object/wind.hpp b/src/object/wind.hpp index 864ca8088..e52add7c1 100644 --- a/src/object/wind.hpp +++ b/src/object/wind.hpp @@ -40,9 +40,9 @@ public: void draw(DrawingContext& context); HitResponse collision(GameObject& other, const CollisionHit& hit); - /** + /** * @name Scriptable Methods - * @{ + * @{ */ /** @@ -55,8 +55,8 @@ public: */ void stop(); - /** - * @} + /** + * @} */ virtual void expose(HSQUIRRELVM vm, SQInteger table_idx); diff --git a/src/player_status.cpp b/src/player_status.cpp index 8279e17b1..1f233bd4b 100644 --- a/src/player_status.cpp +++ b/src/player_status.cpp @@ -168,4 +168,3 @@ PlayerStatus::operator= (const PlayerStatus& other) score_multiplier = other.score_multiplier; max_score_multiplier = other.max_score_multiplier; } - diff --git a/src/scripting/level_time.hpp b/src/scripting/level_time.hpp index 972923d6c..39b2b5856 100644 --- a/src/scripting/level_time.hpp +++ b/src/scripting/level_time.hpp @@ -40,7 +40,7 @@ public: * Resumes the countdown */ void start(); - + /** * Pauses the countdown */ diff --git a/src/scripting/wrapper.cpp b/src/scripting/wrapper.cpp index 5b086ebb7..b19a3f0a1 100644 --- a/src/scripting/wrapper.cpp +++ b/src/scripting/wrapper.cpp @@ -38,12 +38,12 @@ static SQInteger DisplayEffect_fade_out_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("Argument 1 not a float")); return SQ_ERROR; } - + try { _this->fade_out(static_cast (arg0)); - + return 0; - + } catch(std::exception& e) { sq_throwerror(vm, e.what()); return SQ_ERROR; @@ -51,7 +51,7 @@ static SQInteger DisplayEffect_fade_out_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("Unexpected exception while executing function 'fade_out'")); return SQ_ERROR; } - + } static SQInteger DisplayEffect_fade_in_wrapper(HSQUIRRELVM vm) @@ -67,12 +67,12 @@ static SQInteger DisplayEffect_fade_in_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("Argument 1 not a float")); return SQ_ERROR; } - + try { _this->fade_in(static_cast (arg0)); - + return 0; - + } catch(std::exception& e) { sq_throwerror(vm, e.what()); return SQ_ERROR; @@ -80,7 +80,7 @@ static SQInteger DisplayEffect_fade_in_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("Unexpected exception while executing function 'fade_in'")); return SQ_ERROR; } - + } static SQInteger DisplayEffect_set_black_wrapper(HSQUIRRELVM vm) @@ -96,12 +96,12 @@ static SQInteger DisplayEffect_set_black_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("Argument 1 not a bool")); return SQ_ERROR; } - + try { _this->set_black(arg0 == SQTrue); - + return 0; - + } catch(std::exception& e) { sq_throwerror(vm, e.what()); return SQ_ERROR; @@ -109,7 +109,7 @@ static SQInteger DisplayEffect_set_black_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_black'")); return SQ_ERROR; } - + } static SQInteger DisplayEffect_is_black_wrapper(HSQUIRRELVM vm) @@ -120,13 +120,13 @@ static SQInteger DisplayEffect_is_black_wrapper(HSQUIRRELVM vm) return SQ_ERROR; } Scripting::DisplayEffect* _this = reinterpret_cast (data); - + try { bool return_value = _this->is_black(); - + sq_pushbool(vm, return_value); return 1; - + } catch(std::exception& e) { sq_throwerror(vm, e.what()); return SQ_ERROR; @@ -134,7 +134,7 @@ static SQInteger DisplayEffect_is_black_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("Unexpected exception while executing function 'is_black'")); return SQ_ERROR; } - + } static SQInteger DisplayEffect_sixteen_to_nine_wrapper(HSQUIRRELVM vm) @@ -150,12 +150,12 @@ static SQInteger DisplayEffect_sixteen_to_nine_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("Argument 1 not a float")); return SQ_ERROR; } - + try { _this->sixteen_to_nine(static_cast (arg0)); - + return 0; - + } catch(std::exception& e) { sq_throwerror(vm, e.what()); return SQ_ERROR; @@ -163,7 +163,7 @@ static SQInteger DisplayEffect_sixteen_to_nine_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("Unexpected exception while executing function 'sixteen_to_nine'")); return SQ_ERROR; } - + } static SQInteger DisplayEffect_four_to_three_wrapper(HSQUIRRELVM vm) @@ -179,12 +179,12 @@ static SQInteger DisplayEffect_four_to_three_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("Argument 1 not a float")); return SQ_ERROR; } - + try { _this->four_to_three(static_cast (arg0)); - + return 0; - + } catch(std::exception& e) { sq_throwerror(vm, e.what()); return SQ_ERROR; @@ -192,7 +192,7 @@ static SQInteger DisplayEffect_four_to_three_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("Unexpected exception while executing function 'four_to_three'")); return SQ_ERROR; } - + } static SQInteger Camera_release_hook(SQUserPointer ptr, SQInteger ) @@ -225,12 +225,12 @@ static SQInteger Camera_shake_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("Argument 3 not a float")); return SQ_ERROR; } - + try { _this->shake(static_cast (arg0), static_cast (arg1), static_cast (arg2)); - + return 0; - + } catch(std::exception& e) { sq_throwerror(vm, e.what()); return SQ_ERROR; @@ -238,7 +238,7 @@ static SQInteger Camera_shake_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("Unexpected exception while executing function 'shake'")); return SQ_ERROR; } - + } static SQInteger Camera_set_pos_wrapper(HSQUIRRELVM vm) @@ -259,12 +259,12 @@ static SQInteger Camera_set_pos_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("Argument 2 not a float")); return SQ_ERROR; } - + try { _this->set_pos(static_cast (arg0), static_cast (arg1)); - + return 0; - + } catch(std::exception& e) { sq_throwerror(vm, e.what()); return SQ_ERROR; @@ -272,7 +272,7 @@ static SQInteger Camera_set_pos_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_pos'")); return SQ_ERROR; } - + } static SQInteger Camera_set_mode_wrapper(HSQUIRRELVM vm) @@ -288,12 +288,12 @@ static SQInteger Camera_set_mode_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("Argument 1 not a string")); return SQ_ERROR; } - + try { _this->set_mode(arg0); - + return 0; - + } catch(std::exception& e) { sq_throwerror(vm, e.what()); return SQ_ERROR; @@ -301,7 +301,7 @@ static SQInteger Camera_set_mode_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_mode'")); return SQ_ERROR; } - + } static SQInteger Camera_scroll_to_wrapper(HSQUIRRELVM vm) @@ -327,12 +327,12 @@ static SQInteger Camera_scroll_to_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("Argument 3 not a float")); return SQ_ERROR; } - + try { _this->scroll_to(static_cast (arg0), static_cast (arg1), static_cast (arg2)); - + return 0; - + } catch(std::exception& e) { sq_throwerror(vm, e.what()); return SQ_ERROR; @@ -340,7 +340,7 @@ static SQInteger Camera_scroll_to_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("Unexpected exception while executing function 'scroll_to'")); return SQ_ERROR; } - + } static SQInteger Level_release_hook(SQUserPointer ptr, SQInteger ) @@ -363,12 +363,12 @@ static SQInteger Level_finish_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("Argument 1 not a bool")); return SQ_ERROR; } - + try { _this->finish(arg0 == SQTrue); - + return 0; - + } catch(std::exception& e) { sq_throwerror(vm, e.what()); return SQ_ERROR; @@ -376,7 +376,7 @@ static SQInteger Level_finish_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("Unexpected exception while executing function 'finish'")); return SQ_ERROR; } - + } static SQInteger Level_spawn_wrapper(HSQUIRRELVM vm) @@ -397,12 +397,12 @@ static SQInteger Level_spawn_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("Argument 2 not a string")); return SQ_ERROR; } - + try { _this->spawn(arg0, arg1); - + return 0; - + } catch(std::exception& e) { sq_throwerror(vm, e.what()); return SQ_ERROR; @@ -410,7 +410,7 @@ static SQInteger Level_spawn_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("Unexpected exception while executing function 'spawn'")); return SQ_ERROR; } - + } static SQInteger Level_flip_vertically_wrapper(HSQUIRRELVM vm) @@ -421,12 +421,12 @@ static SQInteger Level_flip_vertically_wrapper(HSQUIRRELVM vm) return SQ_ERROR; } Scripting::Level* _this = reinterpret_cast (data); - + try { _this->flip_vertically(); - + return 0; - + } catch(std::exception& e) { sq_throwerror(vm, e.what()); return SQ_ERROR; @@ -434,7 +434,7 @@ static SQInteger Level_flip_vertically_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("Unexpected exception while executing function 'flip_vertically'")); return SQ_ERROR; } - + } static SQInteger Level_toggle_pause_wrapper(HSQUIRRELVM vm) @@ -445,12 +445,12 @@ static SQInteger Level_toggle_pause_wrapper(HSQUIRRELVM vm) return SQ_ERROR; } Scripting::Level* _this = reinterpret_cast (data); - + try { _this->toggle_pause(); - + return 0; - + } catch(std::exception& e) { sq_throwerror(vm, e.what()); return SQ_ERROR; @@ -458,7 +458,7 @@ static SQInteger Level_toggle_pause_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("Unexpected exception while executing function 'toggle_pause'")); return SQ_ERROR; } - + } static SQInteger ScriptedObject_release_hook(SQUserPointer ptr, SQInteger ) @@ -481,12 +481,12 @@ static SQInteger ScriptedObject_set_action_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("Argument 1 not a string")); return SQ_ERROR; } - + try { _this->set_action(arg0); - + return 0; - + } catch(std::exception& e) { sq_throwerror(vm, e.what()); return SQ_ERROR; @@ -494,7 +494,7 @@ static SQInteger ScriptedObject_set_action_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_action'")); return SQ_ERROR; } - + } static SQInteger ScriptedObject_get_action_wrapper(HSQUIRRELVM vm) @@ -505,13 +505,13 @@ static SQInteger ScriptedObject_get_action_wrapper(HSQUIRRELVM vm) return SQ_ERROR; } Scripting::ScriptedObject* _this = reinterpret_cast (data); - + try { std::string return_value = _this->get_action(); - + sq_pushstring(vm, return_value.c_str(), return_value.size()); return 1; - + } catch(std::exception& e) { sq_throwerror(vm, e.what()); return SQ_ERROR; @@ -519,7 +519,7 @@ static SQInteger ScriptedObject_get_action_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_action'")); return SQ_ERROR; } - + } static SQInteger ScriptedObject_move_wrapper(HSQUIRRELVM vm) @@ -540,12 +540,12 @@ static SQInteger ScriptedObject_move_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("Argument 2 not a float")); return SQ_ERROR; } - + try { _this->move(static_cast (arg0), static_cast (arg1)); - + return 0; - + } catch(std::exception& e) { sq_throwerror(vm, e.what()); return SQ_ERROR; @@ -553,7 +553,7 @@ static SQInteger ScriptedObject_move_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("Unexpected exception while executing function 'move'")); return SQ_ERROR; } - + } static SQInteger ScriptedObject_set_pos_wrapper(HSQUIRRELVM vm) @@ -574,12 +574,12 @@ static SQInteger ScriptedObject_set_pos_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("Argument 2 not a float")); return SQ_ERROR; } - + try { _this->set_pos(static_cast (arg0), static_cast (arg1)); - + return 0; - + } catch(std::exception& e) { sq_throwerror(vm, e.what()); return SQ_ERROR; @@ -587,7 +587,7 @@ static SQInteger ScriptedObject_set_pos_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_pos'")); return SQ_ERROR; } - + } static SQInteger ScriptedObject_get_pos_x_wrapper(HSQUIRRELVM vm) @@ -598,13 +598,13 @@ static SQInteger ScriptedObject_get_pos_x_wrapper(HSQUIRRELVM vm) return SQ_ERROR; } Scripting::ScriptedObject* _this = reinterpret_cast (data); - + try { float return_value = _this->get_pos_x(); - + sq_pushfloat(vm, return_value); return 1; - + } catch(std::exception& e) { sq_throwerror(vm, e.what()); return SQ_ERROR; @@ -612,7 +612,7 @@ static SQInteger ScriptedObject_get_pos_x_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_pos_x'")); return SQ_ERROR; } - + } static SQInteger ScriptedObject_get_pos_y_wrapper(HSQUIRRELVM vm) @@ -623,13 +623,13 @@ static SQInteger ScriptedObject_get_pos_y_wrapper(HSQUIRRELVM vm) return SQ_ERROR; } Scripting::ScriptedObject* _this = reinterpret_cast (data); - + try { float return_value = _this->get_pos_y(); - + sq_pushfloat(vm, return_value); return 1; - + } catch(std::exception& e) { sq_throwerror(vm, e.what()); return SQ_ERROR; @@ -637,7 +637,7 @@ static SQInteger ScriptedObject_get_pos_y_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_pos_y'")); return SQ_ERROR; } - + } static SQInteger ScriptedObject_set_velocity_wrapper(HSQUIRRELVM vm) @@ -658,12 +658,12 @@ static SQInteger ScriptedObject_set_velocity_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("Argument 2 not a float")); return SQ_ERROR; } - + try { _this->set_velocity(static_cast (arg0), static_cast (arg1)); - + return 0; - + } catch(std::exception& e) { sq_throwerror(vm, e.what()); return SQ_ERROR; @@ -671,7 +671,7 @@ static SQInteger ScriptedObject_set_velocity_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_velocity'")); return SQ_ERROR; } - + } static SQInteger ScriptedObject_get_velocity_x_wrapper(HSQUIRRELVM vm) @@ -682,13 +682,13 @@ static SQInteger ScriptedObject_get_velocity_x_wrapper(HSQUIRRELVM vm) return SQ_ERROR; } Scripting::ScriptedObject* _this = reinterpret_cast (data); - + try { float return_value = _this->get_velocity_x(); - + sq_pushfloat(vm, return_value); return 1; - + } catch(std::exception& e) { sq_throwerror(vm, e.what()); return SQ_ERROR; @@ -696,7 +696,7 @@ static SQInteger ScriptedObject_get_velocity_x_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_velocity_x'")); return SQ_ERROR; } - + } static SQInteger ScriptedObject_get_velocity_y_wrapper(HSQUIRRELVM vm) @@ -707,13 +707,13 @@ static SQInteger ScriptedObject_get_velocity_y_wrapper(HSQUIRRELVM vm) return SQ_ERROR; } Scripting::ScriptedObject* _this = reinterpret_cast (data); - + try { float return_value = _this->get_velocity_y(); - + sq_pushfloat(vm, return_value); return 1; - + } catch(std::exception& e) { sq_throwerror(vm, e.what()); return SQ_ERROR; @@ -721,7 +721,7 @@ static SQInteger ScriptedObject_get_velocity_y_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_velocity_y'")); return SQ_ERROR; } - + } static SQInteger ScriptedObject_set_visible_wrapper(HSQUIRRELVM vm) @@ -737,12 +737,12 @@ static SQInteger ScriptedObject_set_visible_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("Argument 1 not a bool")); return SQ_ERROR; } - + try { _this->set_visible(arg0 == SQTrue); - + return 0; - + } catch(std::exception& e) { sq_throwerror(vm, e.what()); return SQ_ERROR; @@ -750,7 +750,7 @@ static SQInteger ScriptedObject_set_visible_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_visible'")); return SQ_ERROR; } - + } static SQInteger ScriptedObject_is_visible_wrapper(HSQUIRRELVM vm) @@ -761,13 +761,13 @@ static SQInteger ScriptedObject_is_visible_wrapper(HSQUIRRELVM vm) return SQ_ERROR; } Scripting::ScriptedObject* _this = reinterpret_cast (data); - + try { bool return_value = _this->is_visible(); - + sq_pushbool(vm, return_value); return 1; - + } catch(std::exception& e) { sq_throwerror(vm, e.what()); return SQ_ERROR; @@ -775,7 +775,7 @@ static SQInteger ScriptedObject_is_visible_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("Unexpected exception while executing function 'is_visible'")); return SQ_ERROR; } - + } static SQInteger ScriptedObject_set_solid_wrapper(HSQUIRRELVM vm) @@ -791,12 +791,12 @@ static SQInteger ScriptedObject_set_solid_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("Argument 1 not a bool")); return SQ_ERROR; } - + try { _this->set_solid(arg0 == SQTrue); - + return 0; - + } catch(std::exception& e) { sq_throwerror(vm, e.what()); return SQ_ERROR; @@ -804,7 +804,7 @@ static SQInteger ScriptedObject_set_solid_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_solid'")); return SQ_ERROR; } - + } static SQInteger ScriptedObject_is_solid_wrapper(HSQUIRRELVM vm) @@ -815,13 +815,13 @@ static SQInteger ScriptedObject_is_solid_wrapper(HSQUIRRELVM vm) return SQ_ERROR; } Scripting::ScriptedObject* _this = reinterpret_cast (data); - + try { bool return_value = _this->is_solid(); - + sq_pushbool(vm, return_value); return 1; - + } catch(std::exception& e) { sq_throwerror(vm, e.what()); return SQ_ERROR; @@ -829,7 +829,7 @@ static SQInteger ScriptedObject_is_solid_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("Unexpected exception while executing function 'is_solid'")); return SQ_ERROR; } - + } static SQInteger ScriptedObject_get_name_wrapper(HSQUIRRELVM vm) @@ -840,13 +840,13 @@ static SQInteger ScriptedObject_get_name_wrapper(HSQUIRRELVM vm) return SQ_ERROR; } Scripting::ScriptedObject* _this = reinterpret_cast (data); - + try { std::string return_value = _this->get_name(); - + sq_pushstring(vm, return_value.c_str(), return_value.size()); return 1; - + } catch(std::exception& e) { sq_throwerror(vm, e.what()); return SQ_ERROR; @@ -854,7 +854,7 @@ static SQInteger ScriptedObject_get_name_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_name'")); return SQ_ERROR; } - + } static SQInteger Text_release_hook(SQUserPointer ptr, SQInteger ) @@ -877,12 +877,12 @@ static SQInteger Text_set_text_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("Argument 1 not a string")); return SQ_ERROR; } - + try { _this->set_text(arg0); - + return 0; - + } catch(std::exception& e) { sq_throwerror(vm, e.what()); return SQ_ERROR; @@ -890,7 +890,7 @@ static SQInteger Text_set_text_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_text'")); return SQ_ERROR; } - + } static SQInteger Text_set_font_wrapper(HSQUIRRELVM vm) @@ -906,12 +906,12 @@ static SQInteger Text_set_font_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("Argument 1 not a string")); return SQ_ERROR; } - + try { _this->set_font(arg0); - + return 0; - + } catch(std::exception& e) { sq_throwerror(vm, e.what()); return SQ_ERROR; @@ -919,7 +919,7 @@ static SQInteger Text_set_font_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_font'")); return SQ_ERROR; } - + } static SQInteger Text_fade_in_wrapper(HSQUIRRELVM vm) @@ -935,12 +935,12 @@ static SQInteger Text_fade_in_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("Argument 1 not a float")); return SQ_ERROR; } - + try { _this->fade_in(static_cast (arg0)); - + return 0; - + } catch(std::exception& e) { sq_throwerror(vm, e.what()); return SQ_ERROR; @@ -948,7 +948,7 @@ static SQInteger Text_fade_in_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("Unexpected exception while executing function 'fade_in'")); return SQ_ERROR; } - + } static SQInteger Text_fade_out_wrapper(HSQUIRRELVM vm) @@ -964,12 +964,12 @@ static SQInteger Text_fade_out_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("Argument 1 not a float")); return SQ_ERROR; } - + try { _this->fade_out(static_cast (arg0)); - + return 0; - + } catch(std::exception& e) { sq_throwerror(vm, e.what()); return SQ_ERROR; @@ -977,7 +977,7 @@ static SQInteger Text_fade_out_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("Unexpected exception while executing function 'fade_out'")); return SQ_ERROR; } - + } static SQInteger Text_set_visible_wrapper(HSQUIRRELVM vm) @@ -993,12 +993,12 @@ static SQInteger Text_set_visible_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("Argument 1 not a bool")); return SQ_ERROR; } - + try { _this->set_visible(arg0 == SQTrue); - + return 0; - + } catch(std::exception& e) { sq_throwerror(vm, e.what()); return SQ_ERROR; @@ -1006,7 +1006,7 @@ static SQInteger Text_set_visible_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_visible'")); return SQ_ERROR; } - + } static SQInteger Text_set_centered_wrapper(HSQUIRRELVM vm) @@ -1022,12 +1022,12 @@ static SQInteger Text_set_centered_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("Argument 1 not a bool")); return SQ_ERROR; } - + try { _this->set_centered(arg0 == SQTrue); - + return 0; - + } catch(std::exception& e) { sq_throwerror(vm, e.what()); return SQ_ERROR; @@ -1035,7 +1035,7 @@ static SQInteger Text_set_centered_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_centered'")); return SQ_ERROR; } - + } static SQInteger Player_release_hook(SQUserPointer ptr, SQInteger ) @@ -1058,13 +1058,13 @@ static SQInteger Player_add_bonus_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("Argument 1 not a string")); return SQ_ERROR; } - + try { bool return_value = _this->add_bonus(arg0); - + sq_pushbool(vm, return_value); return 1; - + } catch(std::exception& e) { sq_throwerror(vm, e.what()); return SQ_ERROR; @@ -1072,7 +1072,7 @@ static SQInteger Player_add_bonus_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("Unexpected exception while executing function 'add_bonus'")); return SQ_ERROR; } - + } static SQInteger Player_add_coins_wrapper(HSQUIRRELVM vm) @@ -1088,12 +1088,12 @@ static SQInteger Player_add_coins_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("Argument 1 not an integer")); return SQ_ERROR; } - + try { _this->add_coins(static_cast (arg0)); - + return 0; - + } catch(std::exception& e) { sq_throwerror(vm, e.what()); return SQ_ERROR; @@ -1101,7 +1101,7 @@ static SQInteger Player_add_coins_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("Unexpected exception while executing function 'add_coins'")); return SQ_ERROR; } - + } static SQInteger Player_make_invincible_wrapper(HSQUIRRELVM vm) @@ -1112,12 +1112,12 @@ static SQInteger Player_make_invincible_wrapper(HSQUIRRELVM vm) return SQ_ERROR; } Scripting::Player* _this = reinterpret_cast (data); - + try { _this->make_invincible(); - + return 0; - + } catch(std::exception& e) { sq_throwerror(vm, e.what()); return SQ_ERROR; @@ -1125,7 +1125,7 @@ static SQInteger Player_make_invincible_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("Unexpected exception while executing function 'make_invincible'")); return SQ_ERROR; } - + } static SQInteger Player_deactivate_wrapper(HSQUIRRELVM vm) @@ -1136,12 +1136,12 @@ static SQInteger Player_deactivate_wrapper(HSQUIRRELVM vm) return SQ_ERROR; } Scripting::Player* _this = reinterpret_cast (data); - + try { _this->deactivate(); - + return 0; - + } catch(std::exception& e) { sq_throwerror(vm, e.what()); return SQ_ERROR; @@ -1149,7 +1149,7 @@ static SQInteger Player_deactivate_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("Unexpected exception while executing function 'deactivate'")); return SQ_ERROR; } - + } static SQInteger Player_activate_wrapper(HSQUIRRELVM vm) @@ -1160,12 +1160,12 @@ static SQInteger Player_activate_wrapper(HSQUIRRELVM vm) return SQ_ERROR; } Scripting::Player* _this = reinterpret_cast (data); - + try { _this->activate(); - + return 0; - + } catch(std::exception& e) { sq_throwerror(vm, e.what()); return SQ_ERROR; @@ -1173,7 +1173,7 @@ static SQInteger Player_activate_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("Unexpected exception while executing function 'activate'")); return SQ_ERROR; } - + } static SQInteger Player_walk_wrapper(HSQUIRRELVM vm) @@ -1189,12 +1189,12 @@ static SQInteger Player_walk_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("Argument 1 not a float")); return SQ_ERROR; } - + try { _this->walk(static_cast (arg0)); - + return 0; - + } catch(std::exception& e) { sq_throwerror(vm, e.what()); return SQ_ERROR; @@ -1202,7 +1202,7 @@ static SQInteger Player_walk_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("Unexpected exception while executing function 'walk'")); return SQ_ERROR; } - + } static SQInteger Player_set_visible_wrapper(HSQUIRRELVM vm) @@ -1218,12 +1218,12 @@ static SQInteger Player_set_visible_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("Argument 1 not a bool")); return SQ_ERROR; } - + try { _this->set_visible(arg0 == SQTrue); - + return 0; - + } catch(std::exception& e) { sq_throwerror(vm, e.what()); return SQ_ERROR; @@ -1231,7 +1231,7 @@ static SQInteger Player_set_visible_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_visible'")); return SQ_ERROR; } - + } static SQInteger Player_get_visible_wrapper(HSQUIRRELVM vm) @@ -1242,13 +1242,13 @@ static SQInteger Player_get_visible_wrapper(HSQUIRRELVM vm) return SQ_ERROR; } Scripting::Player* _this = reinterpret_cast (data); - + try { bool return_value = _this->get_visible(); - + sq_pushbool(vm, return_value); return 1; - + } catch(std::exception& e) { sq_throwerror(vm, e.what()); return SQ_ERROR; @@ -1256,7 +1256,7 @@ static SQInteger Player_get_visible_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_visible'")); return SQ_ERROR; } - + } static SQInteger Player_kill_wrapper(HSQUIRRELVM vm) @@ -1272,12 +1272,12 @@ static SQInteger Player_kill_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("Argument 1 not a bool")); return SQ_ERROR; } - + try { _this->kill(arg0 == SQTrue); - + return 0; - + } catch(std::exception& e) { sq_throwerror(vm, e.what()); return SQ_ERROR; @@ -1285,7 +1285,7 @@ static SQInteger Player_kill_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("Unexpected exception while executing function 'kill'")); return SQ_ERROR; } - + } static SQInteger Player_set_ghost_mode_wrapper(HSQUIRRELVM vm) @@ -1301,12 +1301,12 @@ static SQInteger Player_set_ghost_mode_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("Argument 1 not a bool")); return SQ_ERROR; } - + try { _this->set_ghost_mode(arg0 == SQTrue); - + return 0; - + } catch(std::exception& e) { sq_throwerror(vm, e.what()); return SQ_ERROR; @@ -1314,7 +1314,7 @@ static SQInteger Player_set_ghost_mode_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_ghost_mode'")); return SQ_ERROR; } - + } static SQInteger Player_get_ghost_mode_wrapper(HSQUIRRELVM vm) @@ -1325,13 +1325,13 @@ static SQInteger Player_get_ghost_mode_wrapper(HSQUIRRELVM vm) return SQ_ERROR; } Scripting::Player* _this = reinterpret_cast (data); - + try { bool return_value = _this->get_ghost_mode(); - + sq_pushbool(vm, return_value); return 1; - + } catch(std::exception& e) { sq_throwerror(vm, e.what()); return SQ_ERROR; @@ -1339,7 +1339,7 @@ static SQInteger Player_get_ghost_mode_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_ghost_mode'")); return SQ_ERROR; } - + } static SQInteger Player_do_cheer_wrapper(HSQUIRRELVM vm) @@ -1350,12 +1350,12 @@ static SQInteger Player_do_cheer_wrapper(HSQUIRRELVM vm) return SQ_ERROR; } Scripting::Player* _this = reinterpret_cast (data); - + try { _this->do_cheer(); - + return 0; - + } catch(std::exception& e) { sq_throwerror(vm, e.what()); return SQ_ERROR; @@ -1363,7 +1363,7 @@ static SQInteger Player_do_cheer_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("Unexpected exception while executing function 'do_cheer'")); return SQ_ERROR; } - + } static SQInteger Player_do_duck_wrapper(HSQUIRRELVM vm) @@ -1374,12 +1374,12 @@ static SQInteger Player_do_duck_wrapper(HSQUIRRELVM vm) return SQ_ERROR; } Scripting::Player* _this = reinterpret_cast (data); - + try { _this->do_duck(); - + return 0; - + } catch(std::exception& e) { sq_throwerror(vm, e.what()); return SQ_ERROR; @@ -1387,7 +1387,7 @@ static SQInteger Player_do_duck_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("Unexpected exception while executing function 'do_duck'")); return SQ_ERROR; } - + } static SQInteger Player_do_standup_wrapper(HSQUIRRELVM vm) @@ -1398,12 +1398,12 @@ static SQInteger Player_do_standup_wrapper(HSQUIRRELVM vm) return SQ_ERROR; } Scripting::Player* _this = reinterpret_cast (data); - + try { _this->do_standup(); - + return 0; - + } catch(std::exception& e) { sq_throwerror(vm, e.what()); return SQ_ERROR; @@ -1411,7 +1411,7 @@ static SQInteger Player_do_standup_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("Unexpected exception while executing function 'do_standup'")); return SQ_ERROR; } - + } static SQInteger Player_do_backflip_wrapper(HSQUIRRELVM vm) @@ -1422,12 +1422,12 @@ static SQInteger Player_do_backflip_wrapper(HSQUIRRELVM vm) return SQ_ERROR; } Scripting::Player* _this = reinterpret_cast (data); - + try { _this->do_backflip(); - + return 0; - + } catch(std::exception& e) { sq_throwerror(vm, e.what()); return SQ_ERROR; @@ -1435,7 +1435,7 @@ static SQInteger Player_do_backflip_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("Unexpected exception while executing function 'do_backflip'")); return SQ_ERROR; } - + } static SQInteger Player_do_jump_wrapper(HSQUIRRELVM vm) @@ -1451,12 +1451,12 @@ static SQInteger Player_do_jump_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("Argument 1 not a float")); return SQ_ERROR; } - + try { _this->do_jump(static_cast (arg0)); - + return 0; - + } catch(std::exception& e) { sq_throwerror(vm, e.what()); return SQ_ERROR; @@ -1464,7 +1464,7 @@ static SQInteger Player_do_jump_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("Unexpected exception while executing function 'do_jump'")); return SQ_ERROR; } - + } static SQInteger Player_trigger_sequence_wrapper(HSQUIRRELVM vm) @@ -1480,12 +1480,12 @@ static SQInteger Player_trigger_sequence_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("Argument 1 not a string")); return SQ_ERROR; } - + try { _this->trigger_sequence(arg0); - + return 0; - + } catch(std::exception& e) { sq_throwerror(vm, e.what()); return SQ_ERROR; @@ -1493,7 +1493,7 @@ static SQInteger Player_trigger_sequence_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("Unexpected exception while executing function 'trigger_sequence'")); return SQ_ERROR; } - + } static SQInteger FloatingImage_release_hook(SQUserPointer ptr, SQInteger ) @@ -1510,7 +1510,7 @@ static SQInteger FloatingImage_constructor_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("Argument 1 not a string")); return SQ_ERROR; } - + try { Scripting::FloatingImage* _this = new Scripting::FloatingImage(arg0); if(SQ_FAILED(sq_setinstanceup(vm, 1, _this))) { @@ -1518,9 +1518,9 @@ static SQInteger FloatingImage_constructor_wrapper(HSQUIRRELVM vm) return SQ_ERROR; } sq_setreleasehook(vm, 1, FloatingImage_release_hook); - + return 0; - + } catch(std::exception& e) { sq_throwerror(vm, e.what()); return SQ_ERROR; @@ -1528,7 +1528,7 @@ static SQInteger FloatingImage_constructor_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("Unexpected exception while executing function 'constructor'")); return SQ_ERROR; } - + } static SQInteger FloatingImage_set_layer_wrapper(HSQUIRRELVM vm) @@ -1544,12 +1544,12 @@ static SQInteger FloatingImage_set_layer_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("Argument 1 not an integer")); return SQ_ERROR; } - + try { _this->set_layer(static_cast (arg0)); - + return 0; - + } catch(std::exception& e) { sq_throwerror(vm, e.what()); return SQ_ERROR; @@ -1557,7 +1557,7 @@ static SQInteger FloatingImage_set_layer_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_layer'")); return SQ_ERROR; } - + } static SQInteger FloatingImage_get_layer_wrapper(HSQUIRRELVM vm) @@ -1568,13 +1568,13 @@ static SQInteger FloatingImage_get_layer_wrapper(HSQUIRRELVM vm) return SQ_ERROR; } Scripting::FloatingImage* _this = reinterpret_cast (data); - + try { int return_value = _this->get_layer(); - + sq_pushinteger(vm, return_value); return 1; - + } catch(std::exception& e) { sq_throwerror(vm, e.what()); return SQ_ERROR; @@ -1582,7 +1582,7 @@ static SQInteger FloatingImage_get_layer_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_layer'")); return SQ_ERROR; } - + } static SQInteger FloatingImage_set_pos_wrapper(HSQUIRRELVM vm) @@ -1603,12 +1603,12 @@ static SQInteger FloatingImage_set_pos_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("Argument 2 not a float")); return SQ_ERROR; } - + try { _this->set_pos(static_cast (arg0), static_cast (arg1)); - + return 0; - + } catch(std::exception& e) { sq_throwerror(vm, e.what()); return SQ_ERROR; @@ -1616,7 +1616,7 @@ static SQInteger FloatingImage_set_pos_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_pos'")); return SQ_ERROR; } - + } static SQInteger FloatingImage_get_pos_x_wrapper(HSQUIRRELVM vm) @@ -1627,13 +1627,13 @@ static SQInteger FloatingImage_get_pos_x_wrapper(HSQUIRRELVM vm) return SQ_ERROR; } Scripting::FloatingImage* _this = reinterpret_cast (data); - + try { float return_value = _this->get_pos_x(); - + sq_pushfloat(vm, return_value); return 1; - + } catch(std::exception& e) { sq_throwerror(vm, e.what()); return SQ_ERROR; @@ -1641,7 +1641,7 @@ static SQInteger FloatingImage_get_pos_x_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_pos_x'")); return SQ_ERROR; } - + } static SQInteger FloatingImage_get_pos_y_wrapper(HSQUIRRELVM vm) @@ -1652,13 +1652,13 @@ static SQInteger FloatingImage_get_pos_y_wrapper(HSQUIRRELVM vm) return SQ_ERROR; } Scripting::FloatingImage* _this = reinterpret_cast (data); - + try { float return_value = _this->get_pos_y(); - + sq_pushfloat(vm, return_value); return 1; - + } catch(std::exception& e) { sq_throwerror(vm, e.what()); return SQ_ERROR; @@ -1666,7 +1666,7 @@ static SQInteger FloatingImage_get_pos_y_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_pos_y'")); return SQ_ERROR; } - + } static SQInteger FloatingImage_set_anchor_point_wrapper(HSQUIRRELVM vm) @@ -1682,12 +1682,12 @@ static SQInteger FloatingImage_set_anchor_point_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("Argument 1 not an integer")); return SQ_ERROR; } - + try { _this->set_anchor_point(static_cast (arg0)); - + return 0; - + } catch(std::exception& e) { sq_throwerror(vm, e.what()); return SQ_ERROR; @@ -1695,7 +1695,7 @@ static SQInteger FloatingImage_set_anchor_point_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_anchor_point'")); return SQ_ERROR; } - + } static SQInteger FloatingImage_get_anchor_point_wrapper(HSQUIRRELVM vm) @@ -1706,13 +1706,13 @@ static SQInteger FloatingImage_get_anchor_point_wrapper(HSQUIRRELVM vm) return SQ_ERROR; } Scripting::FloatingImage* _this = reinterpret_cast (data); - + try { int return_value = _this->get_anchor_point(); - + sq_pushinteger(vm, return_value); return 1; - + } catch(std::exception& e) { sq_throwerror(vm, e.what()); return SQ_ERROR; @@ -1720,7 +1720,7 @@ static SQInteger FloatingImage_get_anchor_point_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_anchor_point'")); return SQ_ERROR; } - + } static SQInteger FloatingImage_set_visible_wrapper(HSQUIRRELVM vm) @@ -1736,12 +1736,12 @@ static SQInteger FloatingImage_set_visible_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("Argument 1 not a bool")); return SQ_ERROR; } - + try { _this->set_visible(arg0 == SQTrue); - + return 0; - + } catch(std::exception& e) { sq_throwerror(vm, e.what()); return SQ_ERROR; @@ -1749,7 +1749,7 @@ static SQInteger FloatingImage_set_visible_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_visible'")); return SQ_ERROR; } - + } static SQInteger FloatingImage_get_visible_wrapper(HSQUIRRELVM vm) @@ -1760,13 +1760,13 @@ static SQInteger FloatingImage_get_visible_wrapper(HSQUIRRELVM vm) return SQ_ERROR; } Scripting::FloatingImage* _this = reinterpret_cast (data); - + try { bool return_value = _this->get_visible(); - + sq_pushbool(vm, return_value); return 1; - + } catch(std::exception& e) { sq_throwerror(vm, e.what()); return SQ_ERROR; @@ -1774,7 +1774,7 @@ static SQInteger FloatingImage_get_visible_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_visible'")); return SQ_ERROR; } - + } static SQInteger FloatingImage_set_action_wrapper(HSQUIRRELVM vm) @@ -1790,12 +1790,12 @@ static SQInteger FloatingImage_set_action_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("Argument 1 not a string")); return SQ_ERROR; } - + try { _this->set_action(arg0); - + return 0; - + } catch(std::exception& e) { sq_throwerror(vm, e.what()); return SQ_ERROR; @@ -1803,7 +1803,7 @@ static SQInteger FloatingImage_set_action_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_action'")); return SQ_ERROR; } - + } static SQInteger FloatingImage_get_action_wrapper(HSQUIRRELVM vm) @@ -1814,13 +1814,13 @@ static SQInteger FloatingImage_get_action_wrapper(HSQUIRRELVM vm) return SQ_ERROR; } Scripting::FloatingImage* _this = reinterpret_cast (data); - + try { std::string return_value = _this->get_action(); - + sq_pushstring(vm, return_value.c_str(), return_value.size()); return 1; - + } catch(std::exception& e) { sq_throwerror(vm, e.what()); return SQ_ERROR; @@ -1828,7 +1828,7 @@ static SQInteger FloatingImage_get_action_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_action'")); return SQ_ERROR; } - + } static SQInteger FloatingImage_fade_in_wrapper(HSQUIRRELVM vm) @@ -1844,12 +1844,12 @@ static SQInteger FloatingImage_fade_in_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("Argument 1 not a float")); return SQ_ERROR; } - + try { _this->fade_in(static_cast (arg0)); - + return 0; - + } catch(std::exception& e) { sq_throwerror(vm, e.what()); return SQ_ERROR; @@ -1857,7 +1857,7 @@ static SQInteger FloatingImage_fade_in_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("Unexpected exception while executing function 'fade_in'")); return SQ_ERROR; } - + } static SQInteger FloatingImage_fade_out_wrapper(HSQUIRRELVM vm) @@ -1873,12 +1873,12 @@ static SQInteger FloatingImage_fade_out_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("Argument 1 not a float")); return SQ_ERROR; } - + try { _this->fade_out(static_cast (arg0)); - + return 0; - + } catch(std::exception& e) { sq_throwerror(vm, e.what()); return SQ_ERROR; @@ -1886,7 +1886,7 @@ static SQInteger FloatingImage_fade_out_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("Unexpected exception while executing function 'fade_out'")); return SQ_ERROR; } - + } static SQInteger Platform_release_hook(SQUserPointer ptr, SQInteger ) @@ -1909,12 +1909,12 @@ static SQInteger Platform_goto_node_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("Argument 1 not an integer")); return SQ_ERROR; } - + try { _this->goto_node(static_cast (arg0)); - + return 0; - + } catch(std::exception& e) { sq_throwerror(vm, e.what()); return SQ_ERROR; @@ -1922,7 +1922,7 @@ static SQInteger Platform_goto_node_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("Unexpected exception while executing function 'goto_node'")); return SQ_ERROR; } - + } static SQInteger Platform_start_moving_wrapper(HSQUIRRELVM vm) @@ -1933,12 +1933,12 @@ static SQInteger Platform_start_moving_wrapper(HSQUIRRELVM vm) return SQ_ERROR; } Scripting::Platform* _this = reinterpret_cast (data); - + try { _this->start_moving(); - + return 0; - + } catch(std::exception& e) { sq_throwerror(vm, e.what()); return SQ_ERROR; @@ -1946,7 +1946,7 @@ static SQInteger Platform_start_moving_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("Unexpected exception while executing function 'start_moving'")); return SQ_ERROR; } - + } static SQInteger Platform_stop_moving_wrapper(HSQUIRRELVM vm) @@ -1957,12 +1957,12 @@ static SQInteger Platform_stop_moving_wrapper(HSQUIRRELVM vm) return SQ_ERROR; } Scripting::Platform* _this = reinterpret_cast (data); - + try { _this->stop_moving(); - + return 0; - + } catch(std::exception& e) { sq_throwerror(vm, e.what()); return SQ_ERROR; @@ -1970,7 +1970,7 @@ static SQInteger Platform_stop_moving_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("Unexpected exception while executing function 'stop_moving'")); return SQ_ERROR; } - + } static SQInteger Candle_release_hook(SQUserPointer ptr, SQInteger ) @@ -1988,13 +1988,13 @@ static SQInteger Candle_get_burning_wrapper(HSQUIRRELVM vm) return SQ_ERROR; } Scripting::Candle* _this = reinterpret_cast (data); - + try { bool return_value = _this->get_burning(); - + sq_pushbool(vm, return_value); return 1; - + } catch(std::exception& e) { sq_throwerror(vm, e.what()); return SQ_ERROR; @@ -2002,7 +2002,7 @@ static SQInteger Candle_get_burning_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_burning'")); return SQ_ERROR; } - + } static SQInteger Candle_set_burning_wrapper(HSQUIRRELVM vm) @@ -2018,12 +2018,12 @@ static SQInteger Candle_set_burning_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("Argument 1 not a bool")); return SQ_ERROR; } - + try { _this->set_burning(arg0 == SQTrue); - + return 0; - + } catch(std::exception& e) { sq_throwerror(vm, e.what()); return SQ_ERROR; @@ -2031,7 +2031,7 @@ static SQInteger Candle_set_burning_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_burning'")); return SQ_ERROR; } - + } static SQInteger Wind_release_hook(SQUserPointer ptr, SQInteger ) @@ -2049,12 +2049,12 @@ static SQInteger Wind_start_wrapper(HSQUIRRELVM vm) return SQ_ERROR; } Scripting::Wind* _this = reinterpret_cast (data); - + try { _this->start(); - + return 0; - + } catch(std::exception& e) { sq_throwerror(vm, e.what()); return SQ_ERROR; @@ -2062,7 +2062,7 @@ static SQInteger Wind_start_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("Unexpected exception while executing function 'start'")); return SQ_ERROR; } - + } static SQInteger Wind_stop_wrapper(HSQUIRRELVM vm) @@ -2073,12 +2073,12 @@ static SQInteger Wind_stop_wrapper(HSQUIRRELVM vm) return SQ_ERROR; } Scripting::Wind* _this = reinterpret_cast (data); - + try { _this->stop(); - + return 0; - + } catch(std::exception& e) { sq_throwerror(vm, e.what()); return SQ_ERROR; @@ -2086,7 +2086,7 @@ static SQInteger Wind_stop_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("Unexpected exception while executing function 'stop'")); return SQ_ERROR; } - + } static SQInteger AmbientSound_release_hook(SQUserPointer ptr, SQInteger ) @@ -2114,12 +2114,12 @@ static SQInteger AmbientSound_set_pos_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("Argument 2 not a float")); return SQ_ERROR; } - + try { _this->set_pos(static_cast (arg0), static_cast (arg1)); - + return 0; - + } catch(std::exception& e) { sq_throwerror(vm, e.what()); return SQ_ERROR; @@ -2127,7 +2127,7 @@ static SQInteger AmbientSound_set_pos_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_pos'")); return SQ_ERROR; } - + } static SQInteger AmbientSound_get_pos_x_wrapper(HSQUIRRELVM vm) @@ -2138,13 +2138,13 @@ static SQInteger AmbientSound_get_pos_x_wrapper(HSQUIRRELVM vm) return SQ_ERROR; } Scripting::AmbientSound* _this = reinterpret_cast (data); - + try { float return_value = _this->get_pos_x(); - + sq_pushfloat(vm, return_value); return 1; - + } catch(std::exception& e) { sq_throwerror(vm, e.what()); return SQ_ERROR; @@ -2152,7 +2152,7 @@ static SQInteger AmbientSound_get_pos_x_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_pos_x'")); return SQ_ERROR; } - + } static SQInteger AmbientSound_get_pos_y_wrapper(HSQUIRRELVM vm) @@ -2163,13 +2163,13 @@ static SQInteger AmbientSound_get_pos_y_wrapper(HSQUIRRELVM vm) return SQ_ERROR; } Scripting::AmbientSound* _this = reinterpret_cast (data); - + try { float return_value = _this->get_pos_y(); - + sq_pushfloat(vm, return_value); return 1; - + } catch(std::exception& e) { sq_throwerror(vm, e.what()); return SQ_ERROR; @@ -2177,7 +2177,7 @@ static SQInteger AmbientSound_get_pos_y_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_pos_y'")); return SQ_ERROR; } - + } static SQInteger Thunderstorm_release_hook(SQUserPointer ptr, SQInteger ) @@ -2195,12 +2195,12 @@ static SQInteger Thunderstorm_start_wrapper(HSQUIRRELVM vm) return SQ_ERROR; } Scripting::Thunderstorm* _this = reinterpret_cast (data); - + try { _this->start(); - + return 0; - + } catch(std::exception& e) { sq_throwerror(vm, e.what()); return SQ_ERROR; @@ -2208,7 +2208,7 @@ static SQInteger Thunderstorm_start_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("Unexpected exception while executing function 'start'")); return SQ_ERROR; } - + } static SQInteger Thunderstorm_stop_wrapper(HSQUIRRELVM vm) @@ -2219,12 +2219,12 @@ static SQInteger Thunderstorm_stop_wrapper(HSQUIRRELVM vm) return SQ_ERROR; } Scripting::Thunderstorm* _this = reinterpret_cast (data); - + try { _this->stop(); - + return 0; - + } catch(std::exception& e) { sq_throwerror(vm, e.what()); return SQ_ERROR; @@ -2232,7 +2232,7 @@ static SQInteger Thunderstorm_stop_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("Unexpected exception while executing function 'stop'")); return SQ_ERROR; } - + } static SQInteger Thunderstorm_thunder_wrapper(HSQUIRRELVM vm) @@ -2243,12 +2243,12 @@ static SQInteger Thunderstorm_thunder_wrapper(HSQUIRRELVM vm) return SQ_ERROR; } Scripting::Thunderstorm* _this = reinterpret_cast (data); - + try { _this->thunder(); - + return 0; - + } catch(std::exception& e) { sq_throwerror(vm, e.what()); return SQ_ERROR; @@ -2256,7 +2256,7 @@ static SQInteger Thunderstorm_thunder_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("Unexpected exception while executing function 'thunder'")); return SQ_ERROR; } - + } static SQInteger Thunderstorm_lightning_wrapper(HSQUIRRELVM vm) @@ -2267,12 +2267,12 @@ static SQInteger Thunderstorm_lightning_wrapper(HSQUIRRELVM vm) return SQ_ERROR; } Scripting::Thunderstorm* _this = reinterpret_cast (data); - + try { _this->lightning(); - + return 0; - + } catch(std::exception& e) { sq_throwerror(vm, e.what()); return SQ_ERROR; @@ -2280,7 +2280,7 @@ static SQInteger Thunderstorm_lightning_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("Unexpected exception while executing function 'lightning'")); return SQ_ERROR; } - + } static SQInteger Thunderstorm_flash_wrapper(HSQUIRRELVM vm) @@ -2291,12 +2291,12 @@ static SQInteger Thunderstorm_flash_wrapper(HSQUIRRELVM vm) return SQ_ERROR; } Scripting::Thunderstorm* _this = reinterpret_cast (data); - + try { _this->flash(); - + return 0; - + } catch(std::exception& e) { sq_throwerror(vm, e.what()); return SQ_ERROR; @@ -2304,7 +2304,7 @@ static SQInteger Thunderstorm_flash_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("Unexpected exception while executing function 'flash'")); return SQ_ERROR; } - + } static SQInteger Thunderstorm_electrify_wrapper(HSQUIRRELVM vm) @@ -2315,12 +2315,12 @@ static SQInteger Thunderstorm_electrify_wrapper(HSQUIRRELVM vm) return SQ_ERROR; } Scripting::Thunderstorm* _this = reinterpret_cast (data); - + try { _this->electrify(); - + return 0; - + } catch(std::exception& e) { sq_throwerror(vm, e.what()); return SQ_ERROR; @@ -2328,7 +2328,7 @@ static SQInteger Thunderstorm_electrify_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("Unexpected exception while executing function 'electrify'")); return SQ_ERROR; } - + } static SQInteger TileMap_release_hook(SQUserPointer ptr, SQInteger ) @@ -2351,12 +2351,12 @@ static SQInteger TileMap_goto_node_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("Argument 1 not an integer")); return SQ_ERROR; } - + try { _this->goto_node(static_cast (arg0)); - + return 0; - + } catch(std::exception& e) { sq_throwerror(vm, e.what()); return SQ_ERROR; @@ -2364,7 +2364,7 @@ static SQInteger TileMap_goto_node_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("Unexpected exception while executing function 'goto_node'")); return SQ_ERROR; } - + } static SQInteger TileMap_start_moving_wrapper(HSQUIRRELVM vm) @@ -2375,12 +2375,12 @@ static SQInteger TileMap_start_moving_wrapper(HSQUIRRELVM vm) return SQ_ERROR; } Scripting::TileMap* _this = reinterpret_cast (data); - + try { _this->start_moving(); - + return 0; - + } catch(std::exception& e) { sq_throwerror(vm, e.what()); return SQ_ERROR; @@ -2388,7 +2388,7 @@ static SQInteger TileMap_start_moving_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("Unexpected exception while executing function 'start_moving'")); return SQ_ERROR; } - + } static SQInteger TileMap_stop_moving_wrapper(HSQUIRRELVM vm) @@ -2399,12 +2399,12 @@ static SQInteger TileMap_stop_moving_wrapper(HSQUIRRELVM vm) return SQ_ERROR; } Scripting::TileMap* _this = reinterpret_cast (data); - + try { _this->stop_moving(); - + return 0; - + } catch(std::exception& e) { sq_throwerror(vm, e.what()); return SQ_ERROR; @@ -2412,7 +2412,7 @@ static SQInteger TileMap_stop_moving_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("Unexpected exception while executing function 'stop_moving'")); return SQ_ERROR; } - + } static SQInteger SSector_release_hook(SQUserPointer ptr, SQInteger ) @@ -2445,12 +2445,12 @@ static SQInteger SSector_set_ambient_light_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("Argument 3 not a float")); return SQ_ERROR; } - + try { _this->set_ambient_light(static_cast (arg0), static_cast (arg1), static_cast (arg2)); - + return 0; - + } catch(std::exception& e) { sq_throwerror(vm, e.what()); return SQ_ERROR; @@ -2458,7 +2458,7 @@ static SQInteger SSector_set_ambient_light_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_ambient_light'")); return SQ_ERROR; } - + } static SQInteger SSector_get_ambient_red_wrapper(HSQUIRRELVM vm) @@ -2469,13 +2469,13 @@ static SQInteger SSector_get_ambient_red_wrapper(HSQUIRRELVM vm) return SQ_ERROR; } Scripting::SSector* _this = reinterpret_cast (data); - + try { float return_value = _this->get_ambient_red(); - + sq_pushfloat(vm, return_value); return 1; - + } catch(std::exception& e) { sq_throwerror(vm, e.what()); return SQ_ERROR; @@ -2483,7 +2483,7 @@ static SQInteger SSector_get_ambient_red_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_ambient_red'")); return SQ_ERROR; } - + } static SQInteger SSector_get_ambient_green_wrapper(HSQUIRRELVM vm) @@ -2494,13 +2494,13 @@ static SQInteger SSector_get_ambient_green_wrapper(HSQUIRRELVM vm) return SQ_ERROR; } Scripting::SSector* _this = reinterpret_cast (data); - + try { float return_value = _this->get_ambient_green(); - + sq_pushfloat(vm, return_value); return 1; - + } catch(std::exception& e) { sq_throwerror(vm, e.what()); return SQ_ERROR; @@ -2508,7 +2508,7 @@ static SQInteger SSector_get_ambient_green_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_ambient_green'")); return SQ_ERROR; } - + } static SQInteger SSector_get_ambient_blue_wrapper(HSQUIRRELVM vm) @@ -2519,13 +2519,13 @@ static SQInteger SSector_get_ambient_blue_wrapper(HSQUIRRELVM vm) return SQ_ERROR; } Scripting::SSector* _this = reinterpret_cast (data); - + try { float return_value = _this->get_ambient_blue(); - + sq_pushfloat(vm, return_value); return 1; - + } catch(std::exception& e) { sq_throwerror(vm, e.what()); return SQ_ERROR; @@ -2533,7 +2533,7 @@ static SQInteger SSector_get_ambient_blue_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_ambient_blue'")); return SQ_ERROR; } - + } static SQInteger LevelTime_release_hook(SQUserPointer ptr, SQInteger ) @@ -2551,12 +2551,12 @@ static SQInteger LevelTime_start_wrapper(HSQUIRRELVM vm) return SQ_ERROR; } Scripting::LevelTime* _this = reinterpret_cast (data); - + try { _this->start(); - + return 0; - + } catch(std::exception& e) { sq_throwerror(vm, e.what()); return SQ_ERROR; @@ -2564,7 +2564,7 @@ static SQInteger LevelTime_start_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("Unexpected exception while executing function 'start'")); return SQ_ERROR; } - + } static SQInteger LevelTime_stop_wrapper(HSQUIRRELVM vm) @@ -2575,12 +2575,12 @@ static SQInteger LevelTime_stop_wrapper(HSQUIRRELVM vm) return SQ_ERROR; } Scripting::LevelTime* _this = reinterpret_cast (data); - + try { _this->stop(); - + return 0; - + } catch(std::exception& e) { sq_throwerror(vm, e.what()); return SQ_ERROR; @@ -2588,7 +2588,7 @@ static SQInteger LevelTime_stop_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("Unexpected exception while executing function 'stop'")); return SQ_ERROR; } - + } static SQInteger LevelTime_get_time_wrapper(HSQUIRRELVM vm) @@ -2599,13 +2599,13 @@ static SQInteger LevelTime_get_time_wrapper(HSQUIRRELVM vm) return SQ_ERROR; } Scripting::LevelTime* _this = reinterpret_cast (data); - + try { float return_value = _this->get_time(); - + sq_pushfloat(vm, return_value); return 1; - + } catch(std::exception& e) { sq_throwerror(vm, e.what()); return SQ_ERROR; @@ -2613,7 +2613,7 @@ static SQInteger LevelTime_get_time_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("Unexpected exception while executing function 'get_time'")); return SQ_ERROR; } - + } static SQInteger LevelTime_set_time_wrapper(HSQUIRRELVM vm) @@ -2629,12 +2629,12 @@ static SQInteger LevelTime_set_time_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("Argument 1 not a float")); return SQ_ERROR; } - + try { _this->set_time(static_cast (arg0)); - + return 0; - + } catch(std::exception& e) { sq_throwerror(vm, e.what()); return SQ_ERROR; @@ -2642,7 +2642,7 @@ static SQInteger LevelTime_set_time_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("Unexpected exception while executing function 'set_time'")); return SQ_ERROR; } - + } static SQInteger display_wrapper(HSQUIRRELVM vm) @@ -2653,12 +2653,12 @@ static SQInteger display_wrapper(HSQUIRRELVM vm) static SQInteger print_stacktrace_wrapper(HSQUIRRELVM vm) { HSQUIRRELVM arg0 = vm; - + try { Scripting::print_stacktrace(arg0); - + return 0; - + } catch(std::exception& e) { sq_throwerror(vm, e.what()); return SQ_ERROR; @@ -2666,7 +2666,7 @@ static SQInteger print_stacktrace_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("Unexpected exception while executing function 'print_stacktrace'")); return SQ_ERROR; } - + } static SQInteger get_current_thread_wrapper(HSQUIRRELVM vm) @@ -2681,12 +2681,12 @@ static SQInteger display_text_file_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("Argument 1 not a string")); return SQ_ERROR; } - + try { Scripting::display_text_file(arg0); - + return 0; - + } catch(std::exception& e) { sq_throwerror(vm, e.what()); return SQ_ERROR; @@ -2694,7 +2694,7 @@ static SQInteger display_text_file_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("Unexpected exception while executing function 'display_text_file'")); return SQ_ERROR; } - + } static SQInteger load_worldmap_wrapper(HSQUIRRELVM vm) @@ -2704,12 +2704,12 @@ static SQInteger load_worldmap_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("Argument 1 not a string")); return SQ_ERROR; } - + try { Scripting::load_worldmap(arg0); - + return 0; - + } catch(std::exception& e) { sq_throwerror(vm, e.what()); return SQ_ERROR; @@ -2717,7 +2717,7 @@ static SQInteger load_worldmap_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("Unexpected exception while executing function 'load_worldmap'")); return SQ_ERROR; } - + } static SQInteger load_level_wrapper(HSQUIRRELVM vm) @@ -2727,12 +2727,12 @@ static SQInteger load_level_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("Argument 1 not a string")); return SQ_ERROR; } - + try { Scripting::load_level(arg0); - + return 0; - + } catch(std::exception& e) { sq_throwerror(vm, e.what()); return SQ_ERROR; @@ -2740,7 +2740,7 @@ static SQInteger load_level_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("Unexpected exception while executing function 'load_level'")); return SQ_ERROR; } - + } static SQInteger wait_wrapper(HSQUIRRELVM vm) @@ -2751,12 +2751,12 @@ static SQInteger wait_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("Argument 1 not a float")); return SQ_ERROR; } - + try { Scripting::wait(arg0, static_cast (arg1)); - + return sq_suspendvm(vm); - + } catch(std::exception& e) { sq_throwerror(vm, e.what()); return SQ_ERROR; @@ -2764,18 +2764,18 @@ static SQInteger wait_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("Unexpected exception while executing function 'wait'")); return SQ_ERROR; } - + } static SQInteger wait_for_screenswitch_wrapper(HSQUIRRELVM vm) { HSQUIRRELVM arg0 = vm; - + try { Scripting::wait_for_screenswitch(arg0); - + return sq_suspendvm(vm); - + } catch(std::exception& e) { sq_throwerror(vm, e.what()); return SQ_ERROR; @@ -2783,18 +2783,18 @@ static SQInteger wait_for_screenswitch_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("Unexpected exception while executing function 'wait_for_screenswitch'")); return SQ_ERROR; } - + } static SQInteger exit_screen_wrapper(HSQUIRRELVM vm) { (void) vm; - + try { Scripting::exit_screen(); - + return 0; - + } catch(std::exception& e) { sq_throwerror(vm, e.what()); return SQ_ERROR; @@ -2802,7 +2802,7 @@ static SQInteger exit_screen_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("Unexpected exception while executing function 'exit_screen'")); return SQ_ERROR; } - + } static SQInteger fadeout_screen_wrapper(HSQUIRRELVM vm) @@ -2812,12 +2812,12 @@ static SQInteger fadeout_screen_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("Argument 1 not a float")); return SQ_ERROR; } - + try { Scripting::fadeout_screen(static_cast (arg0)); - + return 0; - + } catch(std::exception& e) { sq_throwerror(vm, e.what()); return SQ_ERROR; @@ -2825,7 +2825,7 @@ static SQInteger fadeout_screen_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("Unexpected exception while executing function 'fadeout_screen'")); return SQ_ERROR; } - + } static SQInteger shrink_screen_wrapper(HSQUIRRELVM vm) @@ -2845,12 +2845,12 @@ static SQInteger shrink_screen_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("Argument 3 not a float")); return SQ_ERROR; } - + try { Scripting::shrink_screen(static_cast (arg0), static_cast (arg1), static_cast (arg2)); - + return 0; - + } catch(std::exception& e) { sq_throwerror(vm, e.what()); return SQ_ERROR; @@ -2858,7 +2858,7 @@ static SQInteger shrink_screen_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("Unexpected exception while executing function 'shrink_screen'")); return SQ_ERROR; } - + } static SQInteger translate_wrapper(HSQUIRRELVM vm) @@ -2868,13 +2868,13 @@ static SQInteger translate_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("Argument 1 not a string")); return SQ_ERROR; } - + try { std::string return_value = Scripting::translate(arg0); - + sq_pushstring(vm, return_value.c_str(), return_value.size()); return 1; - + } catch(std::exception& e) { sq_throwerror(vm, e.what()); return SQ_ERROR; @@ -2882,7 +2882,7 @@ static SQInteger translate_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("Unexpected exception while executing function 'translate'")); return SQ_ERROR; } - + } static SQInteger import_wrapper(HSQUIRRELVM vm) @@ -2893,12 +2893,12 @@ static SQInteger import_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("Argument 1 not a string")); return SQ_ERROR; } - + try { Scripting::import(arg0, arg1); - + return 0; - + } catch(std::exception& e) { sq_throwerror(vm, e.what()); return SQ_ERROR; @@ -2906,18 +2906,18 @@ static SQInteger import_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("Unexpected exception while executing function 'import'")); return SQ_ERROR; } - + } static SQInteger save_state_wrapper(HSQUIRRELVM vm) { (void) vm; - + try { Scripting::save_state(); - + return 0; - + } catch(std::exception& e) { sq_throwerror(vm, e.what()); return SQ_ERROR; @@ -2925,18 +2925,18 @@ static SQInteger save_state_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("Unexpected exception while executing function 'save_state'")); return SQ_ERROR; } - + } static SQInteger update_worldmap_wrapper(HSQUIRRELVM vm) { (void) vm; - + try { Scripting::update_worldmap(); - + return 0; - + } catch(std::exception& e) { sq_throwerror(vm, e.what()); return SQ_ERROR; @@ -2944,7 +2944,7 @@ static SQInteger update_worldmap_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("Unexpected exception while executing function 'update_worldmap'")); return SQ_ERROR; } - + } static SQInteger debug_collrects_wrapper(HSQUIRRELVM vm) @@ -2954,12 +2954,12 @@ static SQInteger debug_collrects_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("Argument 1 not a bool")); return SQ_ERROR; } - + try { Scripting::debug_collrects(arg0 == SQTrue); - + return 0; - + } catch(std::exception& e) { sq_throwerror(vm, e.what()); return SQ_ERROR; @@ -2967,7 +2967,7 @@ static SQInteger debug_collrects_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("Unexpected exception while executing function 'debug_collrects'")); return SQ_ERROR; } - + } static SQInteger debug_show_fps_wrapper(HSQUIRRELVM vm) @@ -2977,12 +2977,12 @@ static SQInteger debug_show_fps_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("Argument 1 not a bool")); return SQ_ERROR; } - + try { Scripting::debug_show_fps(arg0 == SQTrue); - + return 0; - + } catch(std::exception& e) { sq_throwerror(vm, e.what()); return SQ_ERROR; @@ -2990,7 +2990,7 @@ static SQInteger debug_show_fps_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("Unexpected exception while executing function 'debug_show_fps'")); return SQ_ERROR; } - + } static SQInteger debug_draw_solids_only_wrapper(HSQUIRRELVM vm) @@ -3000,12 +3000,12 @@ static SQInteger debug_draw_solids_only_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("Argument 1 not a bool")); return SQ_ERROR; } - + try { Scripting::debug_draw_solids_only(arg0 == SQTrue); - + return 0; - + } catch(std::exception& e) { sq_throwerror(vm, e.what()); return SQ_ERROR; @@ -3013,7 +3013,7 @@ static SQInteger debug_draw_solids_only_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("Unexpected exception while executing function 'debug_draw_solids_only'")); return SQ_ERROR; } - + } static SQInteger play_music_wrapper(HSQUIRRELVM vm) @@ -3023,12 +3023,12 @@ static SQInteger play_music_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("Argument 1 not a string")); return SQ_ERROR; } - + try { Scripting::play_music(arg0); - + return 0; - + } catch(std::exception& e) { sq_throwerror(vm, e.what()); return SQ_ERROR; @@ -3036,7 +3036,7 @@ static SQInteger play_music_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("Unexpected exception while executing function 'play_music'")); return SQ_ERROR; } - + } static SQInteger play_sound_wrapper(HSQUIRRELVM vm) @@ -3046,12 +3046,12 @@ static SQInteger play_sound_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("Argument 1 not a string")); return SQ_ERROR; } - + try { Scripting::play_sound(arg0); - + return 0; - + } catch(std::exception& e) { sq_throwerror(vm, e.what()); return SQ_ERROR; @@ -3059,18 +3059,18 @@ static SQInteger play_sound_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("Unexpected exception while executing function 'play_sound'")); return SQ_ERROR; } - + } static SQInteger grease_wrapper(HSQUIRRELVM vm) { (void) vm; - + try { Scripting::grease(); - + return 0; - + } catch(std::exception& e) { sq_throwerror(vm, e.what()); return SQ_ERROR; @@ -3078,18 +3078,18 @@ static SQInteger grease_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("Unexpected exception while executing function 'grease'")); return SQ_ERROR; } - + } static SQInteger invincible_wrapper(HSQUIRRELVM vm) { (void) vm; - + try { Scripting::invincible(); - + return 0; - + } catch(std::exception& e) { sq_throwerror(vm, e.what()); return SQ_ERROR; @@ -3097,18 +3097,18 @@ static SQInteger invincible_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("Unexpected exception while executing function 'invincible'")); return SQ_ERROR; } - + } static SQInteger ghost_wrapper(HSQUIRRELVM vm) { (void) vm; - + try { Scripting::ghost(); - + return 0; - + } catch(std::exception& e) { sq_throwerror(vm, e.what()); return SQ_ERROR; @@ -3116,18 +3116,18 @@ static SQInteger ghost_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("Unexpected exception while executing function 'ghost'")); return SQ_ERROR; } - + } static SQInteger mortal_wrapper(HSQUIRRELVM vm) { (void) vm; - + try { Scripting::mortal(); - + return 0; - + } catch(std::exception& e) { sq_throwerror(vm, e.what()); return SQ_ERROR; @@ -3135,18 +3135,18 @@ static SQInteger mortal_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("Unexpected exception while executing function 'mortal'")); return SQ_ERROR; } - + } static SQInteger restart_wrapper(HSQUIRRELVM vm) { (void) vm; - + try { Scripting::restart(); - + return 0; - + } catch(std::exception& e) { sq_throwerror(vm, e.what()); return SQ_ERROR; @@ -3154,18 +3154,18 @@ static SQInteger restart_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("Unexpected exception while executing function 'restart'")); return SQ_ERROR; } - + } static SQInteger whereami_wrapper(HSQUIRRELVM vm) { (void) vm; - + try { Scripting::whereami(); - + return 0; - + } catch(std::exception& e) { sq_throwerror(vm, e.what()); return SQ_ERROR; @@ -3173,18 +3173,18 @@ static SQInteger whereami_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("Unexpected exception while executing function 'whereami'")); return SQ_ERROR; } - + } static SQInteger gotoend_wrapper(HSQUIRRELVM vm) { (void) vm; - + try { Scripting::gotoend(); - + return 0; - + } catch(std::exception& e) { sq_throwerror(vm, e.what()); return SQ_ERROR; @@ -3192,18 +3192,18 @@ static SQInteger gotoend_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("Unexpected exception while executing function 'gotoend'")); return SQ_ERROR; } - + } static SQInteger camera_wrapper(HSQUIRRELVM vm) { (void) vm; - + try { Scripting::camera(); - + return 0; - + } catch(std::exception& e) { sq_throwerror(vm, e.what()); return SQ_ERROR; @@ -3211,18 +3211,18 @@ static SQInteger camera_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("Unexpected exception while executing function 'camera'")); return SQ_ERROR; } - + } static SQInteger quit_wrapper(HSQUIRRELVM vm) { (void) vm; - + try { Scripting::quit(); - + return 0; - + } catch(std::exception& e) { sq_throwerror(vm, e.what()); return SQ_ERROR; @@ -3230,18 +3230,18 @@ static SQInteger quit_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("Unexpected exception while executing function 'quit'")); return SQ_ERROR; } - + } static SQInteger rand_wrapper(HSQUIRRELVM vm) { - + try { int return_value = Scripting::rand(); - + sq_pushinteger(vm, return_value); return 1; - + } catch(std::exception& e) { sq_throwerror(vm, e.what()); return SQ_ERROR; @@ -3249,7 +3249,7 @@ static SQInteger rand_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, _SC("Unexpected exception while executing function 'rand'")); return SQ_ERROR; } - + } } // end of namespace Wrapper @@ -4602,4 +4602,3 @@ void register_supertux_wrapper(HSQUIRRELVM v) } } // end of namespace Scripting - diff --git a/src/scripting/wrapper.hpp b/src/scripting/wrapper.hpp index 2143f4978..cc6e43e3a 100644 --- a/src/scripting/wrapper.hpp +++ b/src/scripting/wrapper.hpp @@ -33,4 +33,3 @@ void create_squirrel_instance(HSQUIRRELVM v, Scripting::LevelTime* object, bool } #endif - diff --git a/src/sector.cpp b/src/sector.cpp index 063a10a9c..3b3cbc8f5 100644 --- a/src/sector.cpp +++ b/src/sector.cpp @@ -76,7 +76,7 @@ bool Sector::draw_solids_only = false; Sector::Sector(Level* parent) : level(parent), currentmusic(LEVEL_MUSIC), - ambient_light( 1.0f, 1.0f, 1.0f, 1.0f ), gravity(10.0), player(0), camera(0) + ambient_light( 1.0f, 1.0f, 1.0f, 1.0f ), gravity(10.0), player(0), camera(0) { add_object(new Player(player_status, "Tux")); add_object(new DisplayEffect("Effect")); @@ -326,9 +326,9 @@ Sector::parse_old_format(const lisp::Lisp& reader) if(reader.get_vector("foreground-tm", tiles)) { TileMap* tilemap = new TileMap(); tilemap->set(width, height, tiles, LAYER_FOREGROUNDTILES, false); - + // fill additional space in foreground with tiles of ID 2035 (lightmap/black) - if (height < 19) tilemap->resize(width, 19, 2035); + if (height < 19) tilemap->resize(width, 19, 2035); add_object(tilemap); } @@ -428,8 +428,8 @@ Sector::fix_old_tiles() // lava or lavaflow if ((tile->getID() == 173) || (tile->getID() == 1700) || (tile->getID() == 1705) || (tile->getID() == 1706)) { // space lights a bit - if (((tm->get_tile(x-1, y)->getID() != tm->get_tile(x,y)->getID()) - && (tm->get_tile(x, y-1)->getID() != tm->get_tile(x,y)->getID())) + if (((tm->get_tile(x-1, y)->getID() != tm->get_tile(x,y)->getID()) + && (tm->get_tile(x, y-1)->getID() != tm->get_tile(x,y)->getID())) || ((x % 3 == 0) && (y % 3 == 0))) { float pseudo_rnd = (float)((int)pos.x % 10) / 10; add_object(new PulsingLight(center, 1.0f + pseudo_rnd, 0.8f, 1.0f, Color(1.0f, 0.3f, 0.0f, 1.0f))); @@ -590,7 +590,7 @@ Sector::activate(const Vector& player_pos) npos.y-=32; player->move(npos); } - + camera->reset(player->get_pos()); update_game_objects(); @@ -779,7 +779,7 @@ Sector::before_object_remove(GameObject* object) moving_objects.erase( std::find(moving_objects.begin(), moving_objects.end(), moving_object)); } - + if(_current == this) try_unexpose(object); } @@ -1353,7 +1353,7 @@ Sector::is_free_of_movingstatics(const Rect& rect, const MovingObject* ignore_ob const MovingObject* moving_object = *i; if (moving_object == ignore_object) continue; if (!moving_object->is_valid()) continue; - if ((moving_object->get_group() == COLGROUP_MOVING) + if ((moving_object->get_group() == COLGROUP_MOVING) || (moving_object->get_group() == COLGROUP_MOVING_STATIC) || (moving_object->get_group() == COLGROUP_STATIC)) { if(intersects(rect, moving_object->get_bbox())) return false; diff --git a/src/sector.hpp b/src/sector.hpp index cdc59b6f4..487f4a2bf 100644 --- a/src/sector.hpp +++ b/src/sector.hpp @@ -134,20 +134,20 @@ public: void collision_tilemap(collision::Constraints* constraints, const Vector& movement, const Rect& dest) const; - /** + /** * Checks if the specified rectangle is free of (solid) tiles. * Note that this does not include static objects, e.g. bonus blocks. */ bool is_free_of_tiles(const Rect& rect) const; - /** - * Checks if the specified rectangle is free of both + /** + * Checks if the specified rectangle is free of both * 1.) solid tiles and * 2.) MovingObjects in COLGROUP_STATIC. * Note that this does not include badguys or players. */ bool is_free_of_statics(const Rect& rect, const MovingObject* ignore_object = 0) const; - /** - * Checks if the specified rectangle is free of both + /** + * Checks if the specified rectangle is free of both * 1.) solid tiles and * 2.) MovingObjects in COLGROUP_STATIC, COLGROUP_MOVINGSTATIC or COLGROUP_MOVING. * This includes badguys and players. diff --git a/src/squirrel/CMakeLists.txt b/src/squirrel/CMakeLists.txt index baf0720c9..766685b49 100644 --- a/src/squirrel/CMakeLists.txt +++ b/src/squirrel/CMakeLists.txt @@ -6,12 +6,12 @@ # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. -# +# # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA @@ -32,4 +32,3 @@ ADD_DEFINITIONS(-include ${CMAKE_BINARY_DIR}/config.h) ## define a target for building the library ADD_LIBRARY(squirrel ${SQUIRREL_SOURCES}) - diff --git a/src/tinygettext/tinygettext.cpp b/src/tinygettext/tinygettext.cpp index bcab14d5c..17a029278 100644 --- a/src/tinygettext/tinygettext.cpp +++ b/src/tinygettext/tinygettext.cpp @@ -287,7 +287,7 @@ DictionaryManager::get_dictionary(const std::string& spec) } } } - + // if it matched, load dictionary if (load_from_file != "") { //log_debug << "Loading dictionary for language \"" << lang << "\" from \"" << filename << "\"" << std::endl; @@ -383,7 +383,7 @@ DictionaryManager::get_language_from_spec(const std::string& spec) s = lang.find("_"); if(s == std::string::npos) { std::string lang_big = lang; - std::transform (lang_big.begin(), lang_big.end(), lang_big.begin(), toupper); + std::transform (lang_big.begin(), lang_big.end(), lang_big.begin(), toupper); lang += "_" + lang_big; } diff --git a/src/title.cpp b/src/title.cpp index a2c576494..6abfa3c32 100644 --- a/src/title.cpp +++ b/src/title.cpp @@ -224,7 +224,7 @@ TitleScreen::generate_addons_menu() // sort addons std::sort(addons.begin(), addons.end(), generate_addons_menu_sorter); - + // hide installed addons from installation menu std::vector::iterator it2 = addons.begin(); while (it2 != addons.end()) { diff --git a/src/trigger/switch.cpp b/src/trigger/switch.cpp index 8b20a7349..23f5754f8 100644 --- a/src/trigger/switch.cpp +++ b/src/trigger/switch.cpp @@ -41,7 +41,7 @@ Switch::Switch(const lisp::Lisp& reader) bbox.set_size(sprite->get_current_hitbox_width(), sprite->get_current_hitbox_height()); if (!reader.get("script", script)) throw std::runtime_error("no script set"); - sound_manager->preload( SWITCH_SOUND ); + sound_manager->preload( SWITCH_SOUND ); } Switch::~Switch() diff --git a/src/video/drawing_context.cpp b/src/video/drawing_context.cpp index 20e8710b0..61e64328c 100644 --- a/src/video/drawing_context.cpp +++ b/src/video/drawing_context.cpp @@ -250,7 +250,7 @@ DrawingContext::get_light(const Vector& position, Color* color) request.type = GETLIGHT; request.pos = transform.apply(position); - //There is no light offscreen. + //There is no light offscreen. if(request.pos.x >= SCREEN_WIDTH || request.pos.y >= SCREEN_HEIGHT || request.pos.x < 0 || request.pos.y < 0){ *color = Color( 0, 0, 0); @@ -276,7 +276,7 @@ DrawingContext::get_light(DrawingRequest& request) float posX = request.pos.x * lightmap_width / SCREEN_WIDTH; float posY = screen->h - request.pos.y * lightmap_height / SCREEN_HEIGHT; glReadPixels((GLint) posX, (GLint) posY , 1, 1, GL_RGB, GL_FLOAT, pixels); - *(getlightrequest->color_ptr) = Color( pixels[0], pixels[1], pixels[2]); + *(getlightrequest->color_ptr) = Color( pixels[0], pixels[1], pixels[2]); //printf("get_light %f/%f =>%f/%f r%f g%f b%f\n", request.pos.x, request.pos.y, posX, posY, pixels[0], pixels[1], pixels[2]); delete getlightrequest; @@ -449,7 +449,7 @@ DrawingContext::handle_drawing_requests(DrawingRequests& requests) case SURFACE: { const Surface* surface = (const Surface*) i->request_data; - if (i->angle == 0.0f && + if (i->angle == 0.0f && i->color.red == 1.0f && i->color.green == 1.0f && i->color.blue == 1.0f && i->color.alpha == 1.0f ) surface->draw(i->pos.x, i->pos.y, i->alpha, i->drawing_effect); diff --git a/src/video/drawing_context.hpp b/src/video/drawing_context.hpp index ee5d6ddc8..4839239dc 100644 --- a/src/video/drawing_context.hpp +++ b/src/video/drawing_context.hpp @@ -134,7 +134,7 @@ public: void push_target(); void pop_target(); void set_target(Target target); - + void set_ambient_color( Color new_color ); private: @@ -222,7 +222,7 @@ private: { Color* color_ptr; }; - + typedef std::vector DrawingRequests; void handle_drawing_requests(DrawingRequests& requests); diff --git a/src/worldmap/spawn_point.cpp b/src/worldmap/spawn_point.cpp index 431ee4ce8..a74921d22 100644 --- a/src/worldmap/spawn_point.cpp +++ b/src/worldmap/spawn_point.cpp @@ -61,4 +61,3 @@ SpawnPoint::SpawnPoint(const lisp::Lisp* slisp) : auto_dir(D_NONE) } } - diff --git a/src/worldmap/worldmap.cpp b/src/worldmap/worldmap.cpp index 5b4595905..58fd9fc2f 100644 --- a/src/worldmap/worldmap.cpp +++ b/src/worldmap/worldmap.cpp @@ -532,7 +532,7 @@ WorldMap::update(float delta) camera_offset.x = (int)solids->get_width()*32 - SCREEN_WIDTH; if (camera_offset.y > (int)solids->get_height()*32 - SCREEN_HEIGHT) camera_offset.y = (int)solids->get_height()*32 - SCREEN_HEIGHT; - + if (int(solids->get_width()*32) < SCREEN_WIDTH) camera_offset.x = solids->get_width()*16.0 - SCREEN_WIDTH/2.0; if (int(solids->get_height()*32) < SCREEN_HEIGHT) @@ -970,7 +970,7 @@ WorldMap::save_state() } sq_settop(vm, oldtop); - + if(World::current() != NULL) World::current()->save_state(); } diff --git a/tools/levelconverter-0.0.6_0.0.7.py b/tools/levelconverter-0.0.6_0.0.7.py index dceb99bd4..c130298ec 100755 --- a/tools/levelconverter-0.0.6_0.0.7.py +++ b/tools/levelconverter-0.0.6_0.0.7.py @@ -23,17 +23,17 @@ translate_array \ ['d', "cloud-00.png", 90], ['e', "cloud-00.png", 91], ['f', "cloud-00.png", 92], - + ['G', "bkgd-00.png", 93], ['H', "bkgd-01.png", 94], ['I', "bkgd-02.png", 95], ['J', "bkgd-03.png", 96], - + ['g', "bkgd-10.png", 97], ['h', "bkgd-11.png", 98], ['i', "bkgd-12.png", 99], ['j', "bkgd-13.png", 100], - + ['#', "solid0.png", 11], ['[', "solid1.png", 13], ['=', "solid2.png", 14],