From b51f8f420a99f380d9389bdd7a020b9a33a72820 Mon Sep 17 00:00:00 2001 From: Matthias Braun Date: Sun, 28 May 2006 20:32:10 +0000 Subject: [PATCH] small fixes SVN-Revision: 3601 --- src/audio/sound_manager.cpp | 1 + src/badguy/flame.cpp | 2 +- src/scripting/functions.cpp | 2 +- src/scripting/functions.hpp | 2 +- src/sector.cpp | 25 ------------------------- 5 files changed, 4 insertions(+), 28 deletions(-) diff --git a/src/audio/sound_manager.cpp b/src/audio/sound_manager.cpp index 12e620098..cc10db7ce 100644 --- a/src/audio/sound_manager.cpp +++ b/src/audio/sound_manager.cpp @@ -24,6 +24,7 @@ #include #include #include +#include #include "sound_file.hpp" #include "sound_source.hpp" diff --git a/src/badguy/flame.cpp b/src/badguy/flame.cpp index 19211d2a8..390656f28 100644 --- a/src/badguy/flame.cpp +++ b/src/badguy/flame.cpp @@ -25,7 +25,7 @@ static const std::string SOUNDFILE = "sounds/flame.wav"; Flame::Flame(const lisp::Lisp& reader) - : BadGuy(reader, "images/creatures/flame/flame.sprite", LAYER_FLOATINGOBJECTS), angle(0), radius(100), speed(2), sound_source(0) + : BadGuy(reader, "images/creatures/flame/flame.sprite", LAYER_FLOATINGOBJECTS), angle(0), radius(100), speed(2) { reader.get("radius", radius); reader.get("speed", speed); diff --git a/src/scripting/functions.cpp b/src/scripting/functions.cpp index 44887e5ca..aa8ace74d 100644 --- a/src/scripting/functions.cpp +++ b/src/scripting/functions.cpp @@ -149,7 +149,7 @@ void debug_collrects(bool enable) Sector::show_collrects = enable; } -void debug_draw_fps(bool enable) +void debug_show_fps(bool enable) { config->show_fps = enable; } diff --git a/src/scripting/functions.hpp b/src/scripting/functions.hpp index b5fbec3c2..87066bfe2 100644 --- a/src/scripting/functions.hpp +++ b/src/scripting/functions.hpp @@ -112,7 +112,7 @@ void debug_collrects(bool enable); /** * enable/disable drawing of fps */ -void debug_draw_fps(bool enable); +void debug_show_fps(bool enable); /** * enable/disable drawing of non-solid layers diff --git a/src/sector.cpp b/src/sector.cpp index 1df58d4a1..c0c7b6313 100644 --- a/src/sector.cpp +++ b/src/sector.cpp @@ -818,31 +818,6 @@ Sector::collision_tilemap(const Rect& dest, const Vector& movement, uint32_t Sector::collision_tile_attributes(const Rect& dest) const { - /** XXX This function doesn't work correctly as it will check all tiles - * in the bounding box of the object movement, this might include tiles - * that have actually never been touched by the object - * (though this only occures for very fast objects...) - */ - -#if 0 - // calculate rectangle where the object will move - float x1, x2; - if(object->get_movement().x >= 0) { - x1 = object->get_bbox().p1.x; - x2 = object->get_bbox().p2.x + object->get_movement().x; - } else { - x1 = object->get_bbox().p1.x + object->get_movement().x; - x2 = object->get_bbox().p2.x; - } - float y1, y2; - if(object->get_movement().y >= 0) { - y1 = object->get_bbox().p1.y; - y2 = object->get_bbox().p2.y + object->get_movement().y; - } else { - y1 = object->get_bbox().p1.y + object->get_movement().y; - y2 = object->get_bbox().p2.y; - } -#endif float x1 = dest.p1.x; float y1 = dest.p1.y; float x2 = dest.p2.x; -- 2.11.0