summaryrefslogtreecommitdiff
path: root/src/newgrf_canal.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2009-05-23 12:13:42 +0000
committerrubidium <rubidium@openttd.org>2009-05-23 12:13:42 +0000
commitf490394aa8d78f4118e73beccc724cbad3b44854 (patch)
tree066d0254c6624bdb2646e30d9b43076fc7de6726 /src/newgrf_canal.cpp
parentb270ca84ba0002ae23aed3bb614e06b19c7197f5 (diff)
downloadopenttd-f490394aa8d78f4118e73beccc724cbad3b44854.tar.xz
(svn r16396) -Codechange: split NewGRF spritegroup into multiple subclasses instead of using a big union
Diffstat (limited to 'src/newgrf_canal.cpp')
-rw-r--r--src/newgrf_canal.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/newgrf_canal.cpp b/src/newgrf_canal.cpp
index eab55e7f9..20355c899 100644
--- a/src/newgrf_canal.cpp
+++ b/src/newgrf_canal.cpp
@@ -60,11 +60,11 @@ static uint32 CanalGetVariable(const ResolverObject *object, byte variable, byte
}
-static const SpriteGroup *CanalResolveReal(const ResolverObject *object, const SpriteGroup *group)
+static const SpriteGroup *CanalResolveReal(const ResolverObject *object, const RealSpriteGroup *group)
{
- if (group->g.real.num_loaded == 0) return NULL;
+ if (group->num_loaded == 0) return NULL;
- return group->g.real.loaded[0];
+ return group->loaded[0];
}
@@ -97,7 +97,7 @@ SpriteID GetCanalSprite(CanalFeature feature, TileIndex tile)
NewCanalResolver(&object, tile, _water_feature[feature].grffile);
group = Resolve(_water_feature[feature].group, &object);
- if (group == NULL || group->type != SGT_RESULT) return 0;
+ if (group == NULL) return 0;
- return group->g.result.sprite;
+ return group->GetResult();
}