|
@@ -622,13 +622,13 @@ void OffsetGroundSprite(int x, int y)
|
|
|
* @param z position z of the sprite.
|
|
|
* @param sub Only draw a part of the sprite.
|
|
|
*/
|
|
|
static void AddCombinedSprite(SpriteID image, PaletteID pal, int x, int y, int z, const SubSprite *sub)
|
|
|
{
|
|
|
Point pt = RemapCoords(x, y, z);
|
|
|
const Sprite *spr = GetSprite(image & SPRITE_MASK, ST_NORMAL);
|
|
|
const Sprite *spr = GetSprite(image & SPRITE_MASK, SpriteType::Normal);
|
|
|
|
|
|
if (pt.x + spr->x_offs >= _vd.dpi.left + _vd.dpi.width ||
|
|
|
pt.x + spr->x_offs + spr->width <= _vd.dpi.left ||
|
|
|
pt.y + spr->y_offs >= _vd.dpi.top + _vd.dpi.height ||
|
|
|
pt.y + spr->y_offs + spr->height <= _vd.dpi.top)
|
|
|
return;
|
|
@@ -688,13 +688,13 @@ void AddSortableSpriteToDraw(SpriteID im
|
|
|
if (image == SPR_EMPTY_BOUNDING_BOX) {
|
|
|
left = tmp_left = RemapCoords(x + w , y + bb_offset_y, z + bb_offset_z).x;
|
|
|
right = RemapCoords(x + bb_offset_x, y + h , z + bb_offset_z).x + 1;
|
|
|
top = tmp_top = RemapCoords(x + bb_offset_x, y + bb_offset_y, z + dz ).y;
|
|
|
bottom = RemapCoords(x + w , y + h , z + bb_offset_z).y + 1;
|
|
|
} else {
|
|
|
const Sprite *spr = GetSprite(image & SPRITE_MASK, ST_NORMAL);
|
|
|
const Sprite *spr = GetSprite(image & SPRITE_MASK, SpriteType::Normal);
|
|
|
left = tmp_left = (pt.x += spr->x_offs);
|
|
|
right = (pt.x + spr->width );
|
|
|
top = tmp_top = (pt.y += spr->y_offs);
|
|
|
bottom = (pt.y + spr->height);
|
|
|
}
|
|
|
|