diff options
author | rubidium <rubidium@openttd.org> | 2009-05-23 12:13:42 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2009-05-23 12:13:42 +0000 |
commit | f490394aa8d78f4118e73beccc724cbad3b44854 (patch) | |
tree | 066d0254c6624bdb2646e30d9b43076fc7de6726 /src/newgrf_canal.cpp | |
parent | b270ca84ba0002ae23aed3bb614e06b19c7197f5 (diff) | |
download | openttd-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.cpp | 10 |
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(); } |