Mercurial > hg > openttd
changeset 15110:83eac319765b draft
(svn r19736) -Fix [FS#3802]: Spritepicker still failed for 32bpp-anim blitter.
author | frosch <frosch@openttd.org> |
---|---|
date | Wed, 28 Apr 2010 19:19:20 +0000 |
parents | 82b14c722616 |
children | 857419aa684c |
files | src/gfx.cpp |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/gfx.cpp +++ b/src/gfx.cpp @@ -1132,7 +1132,7 @@ void *clicked = _newgrf_debug_sprite_picker.clicked_pixel; if (topleft <= clicked && clicked <= bottomright) { - uint offset = (((size_t)clicked - (size_t)topleft) / blitter->GetBytesPerPixel()) % bp.pitch; + uint offset = (((size_t)clicked - (size_t)topleft) / (blitter->GetScreenDepth() / 8)) % bp.pitch; if (offset < (uint)bp.width) { _newgrf_debug_sprite_picker.sprites.Include(sprite_id); }