Surface* surface;
std::string file = tilesetpath + spec.file;
if(spec.rect.get_width() <= 0) {
- surface = new Surface(file, true);
+ surface = new Surface(file);
} else {
surface = new Surface(file,
(int) spec.rect.p1.x,
(int) spec.rect.p1.y,
(int) spec.rect.get_width(),
- (int) spec.rect.get_height(), true);
+ (int) spec.rect.get_height());
}
images.push_back(surface);
}
if(editor_imagefile != "") {
- editor_image = new Surface(tilesetpath + editor_imagefile, true);
+ editor_image = new Surface(tilesetpath + editor_imagefile);
}
}
Tile::draw(DrawingContext& context, const Vector& pos, int layer) const
{
if(images.size() > 1) {
- size_t frame = size_t(global_time * anim_fps) % images.size();
+ size_t frame = size_t(game_time * anim_fps) % images.size();
context.draw_surface(images[frame], pos, layer);
} else if (images.size() == 1) {
context.draw_surface(images[0], pos, layer);