projects
/
supertux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
36d34f3
)
Klaus Denker's patch to remove in-between tile lines, issue 0000020.
author
Tim Goya
<tuxdev103@gmail.com>
Tue, 30 Jan 2007 14:59:46 +0000
(14:59 +0000)
committer
Tim Goya
<tuxdev103@gmail.com>
Tue, 30 Jan 2007 14:59:46 +0000
(14:59 +0000)
SVN-Revision: 4741
src/video/surface.cpp
patch
|
blob
|
history
diff --git
a/src/video/surface.cpp
b/src/video/surface.cpp
index
23ff693
..
55e1783
100644
(file)
--- a/
src/video/surface.cpp
+++ b/
src/video/surface.cpp
@@
-57,10
+57,10
@@
Surface::Surface(const std::string& file, int x, int y, int w, int h)
float tex_w = static_cast<float> (texture->get_width());
float tex_h = static_cast<float> (texture->get_height());
float tex_w = static_cast<float> (texture->get_width());
float tex_h = static_cast<float> (texture->get_height());
- uv_left = static_cast<float>(x) / tex_w;
- uv_top = static_cast<float>(y) / tex_h;
- uv_right = static_cast<float>(x+w) / tex_w;
- uv_bottom = static_cast<float>(y+h) / tex_h;
+ uv_left = static_cast<float>(x
+0.5
) / tex_w;
+ uv_top = static_cast<float>(y
+0.5
) / tex_h;
+ uv_right = static_cast<float>(x+w
-0.5
) / tex_w;
+ uv_bottom = static_cast<float>(y+h
-0.5
) / tex_h;
width = w;
height = h;
width = w;
height = h;