equal
deleted
inserted
replaced
13 #include "tile_map.h" |
13 #include "tile_map.h" |
14 #include "water_map.h" |
14 #include "water_map.h" |
15 |
15 |
16 |
16 |
17 /** Table of canal 'feature' sprite groups */ |
17 /** Table of canal 'feature' sprite groups */ |
18 const SpriteGroup *_canal_sg[CF_END]; |
18 WaterFeature _water_feature[CF_END]; |
19 |
19 |
20 |
20 |
21 /* Random bits and triggers are not supported for canals, so the following |
21 /* Random bits and triggers are not supported for canals, so the following |
22 * three functions are stubs. */ |
22 * three functions are stubs. */ |
23 static uint32 CanalGetRandomBits(const ResolverObject *object) |
23 static uint32 CanalGetRandomBits(const ResolverObject *object) |
92 ResolverObject object; |
92 ResolverObject object; |
93 const SpriteGroup *group; |
93 const SpriteGroup *group; |
94 |
94 |
95 NewCanalResolver(&object, tile); |
95 NewCanalResolver(&object, tile); |
96 |
96 |
97 group = Resolve(_canal_sg[feature], &object); |
97 group = Resolve(_water_feature[feature].group, &object); |
98 if (group == NULL || group->type != SGT_RESULT) return 0; |
98 if (group == NULL || group->type != SGT_RESULT) return 0; |
99 |
99 |
100 return group->g.result.sprite; |
100 return group->g.result.sprite; |
101 } |
101 } |