// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
// 02111-1307, USA.
-
#include <config.h>
#include "platform.hpp"
+
+#include <iostream>
#include "video/drawing_context.hpp"
#include "resources.hpp"
#include "player.hpp"
reader.get("y", bbox.p1.y);
reader.get("type", type);
reader.get("use_path", use_path);
- sprite = sprite_manager->create("platform");
+ sprite = sprite_manager->create("images/objects/flying_platform/platform.sprite");
sprite->set_action(type);
bbox.set_size(sprite->get_width(), sprite->get_height());
std::cerr << "Warning: Path for moving platform not found! Make sure that the name is spelled correctly,\nand that the path is initialized before the platform in the level file!\n";
}
- path_offset = bbox.p1 - path->GetStart();
+ path_offset = bbox.p1;
}
Platform::~Platform()
}
void
-Platform::update(float elapsed_time)
+Platform::update(float )
{
set_pos(path->GetPosition() + path_offset);
}