projects
/
supertux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
added some more non-45 degree triangle modes
[supertux.git]
/
src
/
worldmap.cpp
diff --git
a/src/worldmap.cpp
b/src/worldmap.cpp
index
0c4b900
..
4bbc4b2
100644
(file)
--- a/
src/worldmap.cpp
+++ b/
src/worldmap.cpp
@@
-179,8
+179,8
@@
TileManager::TileManager()
tile->images.push_back(image);
}
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 (id >= int(tiles.size()))
@@
-454,8
+454,7
@@
Tile::draw(DrawingContext& context, Vector pos)
if(images.size() > 1)
{
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);
}
context.draw_surface(images[frame], pos, LAYER_TILES);
}
@@
-488,9
+487,7
@@
WorldMap::WorldMap()
enter_level = false;
name = "<no title>";
enter_level = false;
name = "<no title>";
- music = "SALCON.MOD";
-
- global_frame_counter = 0;
+ music = "salcon.mod";
total_stats.reset();
}
total_stats.reset();
}
@@
-831,10
+828,6
@@
std::cerr << "one way only\n";
void
WorldMap::update(float delta)
{
void
WorldMap::update(float delta)
{
- if(!frame_timer.check()) {
- global_frame_counter++;
- }
-
if (enter_level && !tux->is_moving())
{
/* Check special tile action */
if (enter_level && !tux->is_moving())
{
/* Check special tile action */
@@
-1184,7
+1177,6
@@
WorldMap::display()
frame_rate.set_frame_limit(false);
frame_rate.start();
frame_rate.set_frame_limit(false);
frame_rate.start();
- frame_timer.start(.25, true);
DrawingContext context;
while(!quit)
DrawingContext context;
while(!quit)