summaryrefslogtreecommitdiff
path: root/src/spriteloader
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2014-10-12 20:43:25 +0000
committerpeter1138 <peter1138@openttd.org>2014-10-12 20:43:25 +0000
commit1088ad48fceb19408f41f4f3caf0f9e525d977d9 (patch)
tree8cfd5f56b89acc4ab3a5c9be761b1015f121d79d /src/spriteloader
parent771dcf3b7b15f58e1d6fb2795e7df3c00ebf2809 (diff)
downloadopenttd-1088ad48fceb19408f41f4f3caf0f9e525d977d9.tar.xz
(svn r27004) -Codechange: Make GUI size apply to (sprite-font) text as well.
Diffstat (limited to 'src/spriteloader')
-rw-r--r--src/spriteloader/grf.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/spriteloader/grf.cpp b/src/spriteloader/grf.cpp
index a45bd0fa8..b21e70b1d 100644
--- a/src/spriteloader/grf.cpp
+++ b/src/spriteloader/grf.cpp
@@ -230,7 +230,7 @@ uint8 LoadSpriteV1(SpriteLoader::Sprite *sprite, uint8 file_slot, size_t file_po
/* Type 0xFF indicates either a colourmap or some other non-sprite info; we do not handle them here */
if (type == 0xFF) return 0;
- ZoomLevel zoom_lvl = (sprite_type == ST_NORMAL) ? ZOOM_LVL_OUT_4X : ZOOM_LVL_NORMAL;
+ ZoomLevel zoom_lvl = (sprite_type != ST_MAPGEN) ? ZOOM_LVL_OUT_4X : ZOOM_LVL_NORMAL;
sprite[zoom_lvl].height = FioReadByte();
sprite[zoom_lvl].width = FioReadWord();
@@ -275,8 +275,8 @@ uint8 LoadSpriteV2(SpriteLoader::Sprite *sprite, uint8 file_slot, size_t file_po
byte colour = type & SCC_MASK;
byte zoom = FioReadByte();
- if (colour != 0 && (load_32bpp ? colour != SCC_PAL : colour == SCC_PAL) && (sprite_type == ST_NORMAL ? zoom < lengthof(zoom_lvl_map) : zoom == 0)) {
- ZoomLevel zoom_lvl = (sprite_type == ST_NORMAL) ? zoom_lvl_map[zoom] : ZOOM_LVL_NORMAL;
+ if (colour != 0 && (load_32bpp ? colour != SCC_PAL : colour == SCC_PAL) && (sprite_type != ST_MAPGEN ? zoom < lengthof(zoom_lvl_map) : zoom == 0)) {
+ ZoomLevel zoom_lvl = (sprite_type != ST_MAPGEN) ? zoom_lvl_map[zoom] : ZOOM_LVL_NORMAL;
if (HasBit(loaded_sprites, zoom_lvl)) {
/* We already have this zoom level, skip sprite. */