Codechange: Use ZOOM_LVL_MIN to refer to first zoom level.
Many uses of ZOOM_LVL_NORMAL actually just want the first zoom level slot, so use ZOOM_LVL_MIN to make this clearer.
This commit is contained in:
committed by
Peter Nelson
parent
7c322ebcf1
commit
3c94e81665
@@ -128,9 +128,9 @@ Sprite *Blitter_8bppOptimized::Encode(const SpriteLoader::SpriteCollection &spri
|
||||
ZoomLevel zoom_min;
|
||||
ZoomLevel zoom_max;
|
||||
|
||||
if (sprite[ZOOM_LVL_NORMAL].type == SpriteType::Font) {
|
||||
zoom_min = ZOOM_LVL_NORMAL;
|
||||
zoom_max = ZOOM_LVL_NORMAL;
|
||||
if (sprite[ZOOM_LVL_MIN].type == SpriteType::Font) {
|
||||
zoom_min = ZOOM_LVL_MIN;
|
||||
zoom_max = ZOOM_LVL_MIN;
|
||||
} else {
|
||||
zoom_min = _settings_client.gui.zoom_min;
|
||||
zoom_max = _settings_client.gui.zoom_max;
|
||||
@@ -221,10 +221,10 @@ Sprite *Blitter_8bppOptimized::Encode(const SpriteLoader::SpriteCollection &spri
|
||||
/* Allocate the exact amount of memory we need */
|
||||
Sprite *dest_sprite = (Sprite *)allocator(sizeof(*dest_sprite) + size);
|
||||
|
||||
dest_sprite->height = sprite[ZOOM_LVL_NORMAL].height;
|
||||
dest_sprite->width = sprite[ZOOM_LVL_NORMAL].width;
|
||||
dest_sprite->x_offs = sprite[ZOOM_LVL_NORMAL].x_offs;
|
||||
dest_sprite->y_offs = sprite[ZOOM_LVL_NORMAL].y_offs;
|
||||
dest_sprite->height = sprite[ZOOM_LVL_MIN].height;
|
||||
dest_sprite->width = sprite[ZOOM_LVL_MIN].width;
|
||||
dest_sprite->x_offs = sprite[ZOOM_LVL_MIN].x_offs;
|
||||
dest_sprite->y_offs = sprite[ZOOM_LVL_MIN].y_offs;
|
||||
memcpy(dest_sprite->data, temp_dst, size);
|
||||
|
||||
return dest_sprite;
|
||||
|
||||
Reference in New Issue
Block a user