#include <iostream>
#include <sstream>
#include <memory>
+#include <assert.h>
#include "sound_file.hpp"
#include "sound_source.hpp"
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);
Sector::show_collrects = enable;
}
-void debug_draw_fps(bool enable)
+void debug_show_fps(bool enable)
{
config->show_fps = 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
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;