(svn r22106) -Codechange: Add DrawTileSeqStruct::MakeTerminator(), DrawTileSeqStruct::IsTerminator(), DrawTileSeqStruct::IsParentSprite() to simplify stuff.

This commit is contained in:
frosch
2011-02-19 13:16:34 +00:00
parent 72e027e4d6
commit 57dc3ed716
3 changed files with 25 additions and 7 deletions

View File

@@ -43,7 +43,7 @@ void DrawCommonTileSeq(const TileInfo *ti, const DrawTileSprites *dts, Transpare
PaletteID pal = SpriteLayoutPaletteTransform(image, dtss->image.pal, default_palette);
if ((byte)dtss->delta_z != 0x80) {
if (dtss->IsParentSprite()) {
parent_sprite_encountered = true;
AddSortableSpriteToDraw(
image, pal,
@@ -94,7 +94,7 @@ void DrawCommonTileSeqInGUI(int x, int y, const DrawTileSprites *dts, int32 orig
PaletteID pal = SpriteLayoutPaletteTransform(image, dtss->image.pal, default_palette);
if ((byte)dtss->delta_z != 0x80) {
if (dtss->IsParentSprite()) {
Point pt = RemapCoords(dtss->delta_x, dtss->delta_y, dtss->delta_z);
DrawSprite(image, pal, x + pt.x, y + pt.y);