summaryrefslogtreecommitdiff
path: root/src/newgrf_object.cpp
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2011-05-14 17:33:26 +0000
committerfrosch <frosch@openttd.org>2011-05-14 17:33:26 +0000
commite55f849a29e45227fbe9611badbdf846bbd8d866 (patch)
treef9198d1166861918462580b815d154a49eff7621 /src/newgrf_object.cpp
parent7415b9cca278e86db5ba00b84aa535057279ef37 (diff)
downloadopenttd-e55f849a29e45227fbe9611badbdf846bbd8d866.tar.xz
(svn r22457) -Codechange: Make the NewGRFSpriteLayout a direct member of TileLayoutSpriteGroup instead of allocating it separately.
Diffstat (limited to 'src/newgrf_object.cpp')
-rw-r--r--src/newgrf_object.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/newgrf_object.cpp b/src/newgrf_object.cpp
index d33bc38aa..4c3b7c3e1 100644
--- a/src/newgrf_object.cpp
+++ b/src/newgrf_object.cpp
@@ -417,7 +417,7 @@ uint16 GetObjectCallback(CallbackID callback, uint32 param1, uint32 param2, cons
*/
static void DrawTileLayout(const TileInfo *ti, const TileLayoutSpriteGroup *group, const ObjectSpec *spec)
{
- const DrawTileSprites *dts = group->dts;
+ const DrawTileSprites *dts = &group->dts;
PaletteID palette = ((spec->flags & OBJECT_FLAG_2CC_COLOUR) ? SPR_2CCMAP_BASE : PALETTE_RECOLOUR_START) + Object::GetByTile(ti->tile)->colour;
SpriteID image = dts->ground.sprite;
@@ -468,7 +468,7 @@ void DrawNewObjectTileInGUI(int x, int y, const ObjectSpec *spec, uint8 view)
const SpriteGroup *group = SpriteGroup::Resolve(GetObjectSpriteGroup(spec, NULL), &object);
if (group == NULL || group->type != SGT_TILELAYOUT) return;
- const DrawTileSprites *dts = ((const TileLayoutSpriteGroup *)group)->dts;
+ const DrawTileSprites *dts = &((const TileLayoutSpriteGroup *)group)->dts;
PaletteID palette;
if (Company::IsValidID(_local_company)) {