tile->images.push_back(image);
}
- tile->anim_speed = 25;
- reader.read_int("anim-speed", tile->anim_speed);
+ tile->anim_fps = 1;
+ reader.read_float("anim-fps", tile->anim_fps);
if (id >= int(tiles.size()))
if(images.size() > 1)
{
- size_t frame
- = ((global_frame_counter*25) / anim_speed) % images.size();
+ size_t frame = size_t(global_time * anim_fps) % images.size();
context.draw_surface(images[frame], pos, LAYER_TILES);
}
name = "<no title>";
music = "salcon.mod";
- global_frame_counter = 0;
-
total_stats.reset();
}
void
WorldMap::update(float delta)
{
- if(!frame_timer.check()) {
- global_frame_counter++;
- }
-
if (enter_level && !tux->is_moving())
{
/* Check special tile action */
frame_rate.set_frame_limit(false);
frame_rate.start();
- frame_timer.start(.25, true);
DrawingContext context;
while(!quit)