(svn r14223) -Codechange: make GetSprite aware of the 4 different types of sprites: fonts, recolour, mapgen and normal sprites.
This commit is contained in:
@@ -567,7 +567,7 @@ void OffsetGroundSprite(int x, int y)
|
||||
static void AddCombinedSprite(SpriteID image, SpriteID pal, int x, int y, byte z, const SubSprite *sub)
|
||||
{
|
||||
Point pt = RemapCoords(x, y, z);
|
||||
const Sprite* spr = GetSprite(image & SPRITE_MASK);
|
||||
const Sprite* spr = GetSprite(image & SPRITE_MASK, ST_NORMAL);
|
||||
|
||||
if (pt.x + spr->x_offs >= _vd.dpi.left + _vd.dpi.width ||
|
||||
pt.x + spr->x_offs + spr->width <= _vd.dpi.left ||
|
||||
@@ -632,7 +632,7 @@ void AddSortableSpriteToDraw(SpriteID image, SpriteID pal, int x, int y, int w,
|
||||
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);
|
||||
const Sprite *spr = GetSprite(image & SPRITE_MASK, ST_NORMAL);
|
||||
left = tmp_left = (pt.x += spr->x_offs);
|
||||
right = (pt.x + spr->width );
|
||||
top = tmp_top = (pt.y += spr->y_offs);
|
||||
|
Reference in New Issue
Block a user