projects
/
supertux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7a87271
)
Fixed crash on level editor by making a pos test.
author
Ricardo Cruz
<rick2@aeiou.pt>
Sun, 19 Dec 2004 16:53:23 +0000
(16:53 +0000)
committer
Ricardo Cruz
<rick2@aeiou.pt>
Sun, 19 Dec 2004 16:53:23 +0000
(16:53 +0000)
SVN-Revision: 2257
src/object/tilemap.cpp
patch
|
blob
|
history
diff --git
a/src/object/tilemap.cpp
b/src/object/tilemap.cpp
index
fd6c74d
..
4046813
100644
(file)
--- a/
src/object/tilemap.cpp
+++ b/
src/object/tilemap.cpp
@@
-144,7
+144,9
@@
TileMap::draw(DrawingContext& context)
/** if we don't round here, we'll have a 1 pixel gap on screen sometimes.
* I have no idea why */
float start_x = roundf(context.get_translation().x);
+ if(start_x < 0) start_x = 0;
float start_y = roundf(context.get_translation().y);
+ if(start_y < 0) start_y = 0;
float end_x = std::min(start_x + screen->w, float(width * 32));
float end_y = std::min(start_y + screen->h, float(height * 32));
start_x -= int(start_x) % 32;