openttd updated to 1.5.0-beta2

--HG--
branch : openttd
This commit is contained in:
Pavel Stupnikov
2015-03-01 00:30:53 +03:00
parent 0abb47ce90
commit d201932121
682 changed files with 26103 additions and 16553 deletions

View File

@@ -1,4 +1,4 @@
/* $Id: sprite.cpp 24900 2013-01-08 22:46:42Z planetmaker $ */
/* $Id: sprite.cpp 27134 2015-02-01 20:54:24Z frosch $ */
/*
* This file is part of OpenTTD.
@@ -16,6 +16,8 @@
#include "spritecache.h"
#include "zoom_func.h"
#include "safeguards.h"
/**
* Draws a tile sprite sequence.
@@ -117,15 +119,15 @@ 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 + UnScaleByZoom(pt.x, ZOOM_LVL_GUI), y + UnScaleByZoom(pt.y, ZOOM_LVL_GUI));
DrawSprite(image, pal, x + UnScaleGUI(pt.x), y + UnScaleGUI(pt.y));
const Sprite *spr = GetSprite(image & SPRITE_MASK, ST_NORMAL);
child_offset.x = UnScaleByZoom(pt.x + spr->x_offs, ZOOM_LVL_GUI);
child_offset.y = UnScaleByZoom(pt.y + spr->y_offs, ZOOM_LVL_GUI);
child_offset.x = UnScaleGUI(pt.x + spr->x_offs);
child_offset.y = UnScaleGUI(pt.y + spr->y_offs);
} 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;
DrawSprite(image, pal, x + child_offset.x + offs_x, y + child_offset.y + offs_y);
DrawSprite(image, pal, x + child_offset.x + ScaleGUITrad(offs_x), y + child_offset.y + ScaleGUITrad(offs_y));
}
}
}