equal
deleted
inserted
replaced
1 /* $Id$ */ |
1 /* $Id$ */ |
2 |
2 |
3 #ifndef NEWGRF_SPRITEGROUP_H |
3 #ifndef NEWGRF_SPRITEGROUP_H |
4 #define NEWGRF_SPRITEGROUP_H |
4 #define NEWGRF_SPRITEGROUP_H |
5 |
5 |
|
6 #include "town.h" |
6 |
7 |
7 struct SpriteGroup; |
8 struct SpriteGroup; |
8 |
9 |
9 |
10 |
10 /* 'Real' sprite groups contain a list of other result or callback sprite |
11 /* 'Real' sprite groups contain a list of other result or callback sprite |
126 struct ResultSpriteGroup { |
127 struct ResultSpriteGroup { |
127 SpriteID sprite; |
128 SpriteID sprite; |
128 byte num_sprites; |
129 byte num_sprites; |
129 }; |
130 }; |
130 |
131 |
|
132 struct TileLayoutSpriteGroup { |
|
133 byte num_sprites; /* Number of sprites in the spriteset, used for loading stages */ |
|
134 struct DrawTileSprites *dts; |
|
135 }; |
|
136 |
131 /* List of different sprite group types */ |
137 /* List of different sprite group types */ |
132 enum SpriteGroupType { |
138 enum SpriteGroupType { |
133 SGT_INVALID, |
139 SGT_INVALID, |
134 SGT_REAL, |
140 SGT_REAL, |
135 SGT_DETERMINISTIC, |
141 SGT_DETERMINISTIC, |
136 SGT_RANDOMIZED, |
142 SGT_RANDOMIZED, |
137 SGT_CALLBACK, |
143 SGT_CALLBACK, |
138 SGT_RESULT, |
144 SGT_RESULT, |
|
145 SGT_TILELAYOUT, |
139 }; |
146 }; |
140 |
147 |
141 /* Common wrapper for all the different sprite group types */ |
148 /* Common wrapper for all the different sprite group types */ |
142 struct SpriteGroup { |
149 struct SpriteGroup { |
143 SpriteGroupType type; |
150 SpriteGroupType type; |
146 RealSpriteGroup real; |
153 RealSpriteGroup real; |
147 DeterministicSpriteGroup determ; |
154 DeterministicSpriteGroup determ; |
148 RandomizedSpriteGroup random; |
155 RandomizedSpriteGroup random; |
149 CallbackResultSpriteGroup callback; |
156 CallbackResultSpriteGroup callback; |
150 ResultSpriteGroup result; |
157 ResultSpriteGroup result; |
|
158 TileLayoutSpriteGroup layout; |
151 } g; |
159 } g; |
152 }; |
160 }; |
153 |
161 |
154 |
162 |
155 SpriteGroup *AllocateSpriteGroup(); |
163 SpriteGroup *AllocateSpriteGroup(); |
178 TileIndex tile; |
186 TileIndex tile; |
179 const struct Station *st; |
187 const struct Station *st; |
180 const struct StationSpec *statspec; |
188 const struct StationSpec *statspec; |
181 CargoID cargo_type; |
189 CargoID cargo_type; |
182 } station; |
190 } station; |
|
191 struct { |
|
192 TileIndex tile; |
|
193 Town *town; |
|
194 HouseID house_id; |
|
195 } house; |
183 } u; |
196 } u; |
184 |
197 |
185 uint32 (*GetRandomBits)(const struct ResolverObject*); |
198 uint32 (*GetRandomBits)(const struct ResolverObject*); |
186 uint32 (*GetTriggers)(const struct ResolverObject*); |
199 uint32 (*GetTriggers)(const struct ResolverObject*); |
187 void (*SetTriggers)(const struct ResolverObject*, int); |
200 void (*SetTriggers)(const struct ResolverObject*, int); |