diff options
author | Raphael Langella <raphael.langella@gmail.com> | 2010-12-10 13:12:50 +0100 |
---|---|---|
committer | Raphael Langella <raphael.langella@gmail.com> | 2010-12-10 13:12:50 +0100 |
commit | e99ebefd96acb3f4afe8342a500fb0631d825d9a (patch) | |
tree | 24f6f91c2f67a20f49fd438135a8cb029296e969 /crawl-ref/source/tilereg.cc | |
parent | 904c6acb4b52b760a6d33f92b7f0c5545412acfc (diff) | |
download | crawl-ref-e99ebefd96acb3f4afe8342a500fb0631d825d9a.tar.gz crawl-ref-e99ebefd96acb3f4afe8342a500fb0631d825d9a.zip |
Add a no_scaling boolean to set_transform
This fix the tiles offset bug with the new skill menu. I don't really
understand why scaling breaks the display while translating is still
needed. So, this is more a workaround, than a proper fix. But it works.
Diffstat (limited to 'crawl-ref/source/tilereg.cc')
-rw-r--r-- | crawl-ref/source/tilereg.cc | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/crawl-ref/source/tilereg.cc b/crawl-ref/source/tilereg.cc index c6fbcc4a91..a983f041de 100644 --- a/crawl-ref/source/tilereg.cc +++ b/crawl-ref/source/tilereg.cc @@ -132,10 +132,15 @@ bool Region::mouse_pos(int mouse_x, int mouse_y, int &cx, int &cy) return valid; } -void Region::set_transform() +void Region::set_transform(bool no_scaling) { GLW_3VF trans(sx + ox, sy + oy, 0); - GLW_3VF scale(dx, dy, 1); + GLW_3VF scale; + + if (no_scaling) + scale = GLW_3VF(1, 1, 1); + else + scale = GLW_3VF(dx, dy, 1); glmanager->set_transform(trans, scale); } |