summaryrefslogtreecommitdiff
path: root/src/sprite.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/sprite.cpp')
-rw-r--r--src/sprite.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/sprite.cpp b/src/sprite.cpp
index a991d315f..69a8ed92e 100644
--- a/src/sprite.cpp
+++ b/src/sprite.cpp
@@ -16,6 +16,7 @@
#include "spritecache.h"
#include "core/alloc_func.hpp"
#include "core/mem_func.hpp"
+#include "zoom_func.h"
/**
@@ -118,11 +119,11 @@ void DrawCommonTileSeqInGUI(int x, int y, const DrawTileSprites *dts, int32 orig
if (dtss->IsParentSprite()) {
Point pt = RemapCoords(dtss->delta_x, dtss->delta_y, dtss->delta_z);
- DrawSprite(image, pal, x + pt.x, y + pt.y);
+ DrawSprite(image, pal, x + UnScaleByZoom(pt.x, ZOOM_LVL_GUI), y + UnScaleByZoom(pt.y, ZOOM_LVL_GUI));
const Sprite *spr = GetSprite(image & SPRITE_MASK, ST_NORMAL);
- child_offset.x = pt.x + spr->x_offs;
- child_offset.y = pt.y + spr->y_offs;
+ child_offset.x = UnScaleByZoom(pt.x + spr->x_offs, ZOOM_LVL_GUI);
+ child_offset.y = UnScaleByZoom(pt.y + spr->y_offs, ZOOM_LVL_GUI);
} else {
int offs_x = child_offset_is_unsigned ? (uint8)dtss->delta_x : dtss->delta_x;
int offs_y = child_offset_is_unsigned ? (uint8)dtss->delta_y : dtss->delta_y;