branch | NewGRF_ports |
changeset 10184 | fcf5fb2548eb |
parent 6878 | 7d1ff2f621c7 |
child 10242 | 52b4a9006029 |
10179:eec5a7dcbf61 | 10184:fcf5fb2548eb |
---|---|
9 #include "command_func.h" |
9 #include "command_func.h" |
10 #include "viewport_func.h" |
10 #include "viewport_func.h" |
11 #include "player_func.h" |
11 #include "player_func.h" |
12 #include "player_base.h" |
12 #include "player_base.h" |
13 #include "gui.h" |
13 #include "gui.h" |
14 #include "station.h" |
|
15 #include "town.h" |
14 #include "town.h" |
16 #include "sprite.h" |
15 #include "sprite.h" |
17 #include "bridge_map.h" |
16 #include "bridge_map.h" |
18 #include "unmovable_map.h" |
17 #include "unmovable_map.h" |
19 #include "variables.h" |
18 #include "variables.h" |
170 const DrawTileSeqStruct* dtu = &_draw_tile_transmitterlighthouse_data[GetUnmovableType(ti->tile)]; |
169 const DrawTileSeqStruct* dtu = &_draw_tile_transmitterlighthouse_data[GetUnmovableType(ti->tile)]; |
171 |
170 |
172 if (ti->tileh != SLOPE_FLAT) DrawFoundation(ti, FOUNDATION_LEVELED); |
171 if (ti->tileh != SLOPE_FLAT) DrawFoundation(ti, FOUNDATION_LEVELED); |
173 DrawClearLandTile(ti, 2); |
172 DrawClearLandTile(ti, 2); |
174 |
173 |
174 if (IsInvisibilitySet(TO_STRUCTURES)) break; |
|
175 |
|
175 AddSortableSpriteToDraw( |
176 AddSortableSpriteToDraw( |
176 dtu->image.sprite, PAL_NONE, ti->x | dtu->delta_x, ti->y | dtu->delta_y, |
177 dtu->image.sprite, PAL_NONE, ti->x | dtu->delta_x, ti->y | dtu->delta_y, |
177 dtu->size_x, dtu->size_y, dtu->size_z, ti->z, |
178 dtu->size_x, dtu->size_y, dtu->size_z, ti->z, |
178 IsTransparencySet(TO_STRUCTURES) |
179 IsTransparencySet(TO_STRUCTURES) |
179 ); |
180 ); |
184 /* This should prevent statues from sinking into the ground when on a slope. */ |
185 /* This should prevent statues from sinking into the ground when on a slope. */ |
185 if (ti->tileh != SLOPE_FLAT) DrawFoundation(ti, GetFoundation_Unmovable(ti->tile, ti->tileh)); |
186 if (ti->tileh != SLOPE_FLAT) DrawFoundation(ti, GetFoundation_Unmovable(ti->tile, ti->tileh)); |
186 |
187 |
187 DrawGroundSprite(SPR_CONCRETE_GROUND, PAL_NONE); |
188 DrawGroundSprite(SPR_CONCRETE_GROUND, PAL_NONE); |
188 |
189 |
190 if (IsInvisibilitySet(TO_STRUCTURES)) break; |
|
191 |
|
189 AddSortableSpriteToDraw(SPR_STATUE_COMPANY, PLAYER_SPRITE_COLOR(GetTileOwner(ti->tile)), ti->x, ti->y, 16, 16, 25, ti->z, IsTransparencySet(TO_STRUCTURES)); |
192 AddSortableSpriteToDraw(SPR_STATUE_COMPANY, PLAYER_SPRITE_COLOR(GetTileOwner(ti->tile)), ti->x, ti->y, 16, 16, 25, ti->z, IsTransparencySet(TO_STRUCTURES)); |
190 break; |
193 break; |
191 |
194 |
192 case UNMOVABLE_OWNED_LAND: |
195 case UNMOVABLE_OWNED_LAND: |
193 DrawClearLandTile(ti, 0); |
196 DrawClearLandTile(ti, 0); |
209 |
212 |
210 palette = PLAYER_SPRITE_COLOR(GetTileOwner(ti->tile)); |
213 palette = PLAYER_SPRITE_COLOR(GetTileOwner(ti->tile)); |
211 |
214 |
212 t = &_unmovable_display_datas[GetCompanyHQSection(ti->tile)]; |
215 t = &_unmovable_display_datas[GetCompanyHQSection(ti->tile)]; |
213 DrawGroundSprite(t->ground.sprite, palette); |
216 DrawGroundSprite(t->ground.sprite, palette); |
217 |
|
218 if (IsInvisibilitySet(TO_STRUCTURES)) break; |
|
214 |
219 |
215 foreach_draw_tile_seq(dtss, t->seq) { |
220 foreach_draw_tile_seq(dtss, t->seq) { |
216 AddSortableSpriteToDraw( |
221 AddSortableSpriteToDraw( |
217 dtss->image.sprite, palette, |
222 dtss->image.sprite, palette, |
218 ti->x + dtss->delta_x, ti->y + dtss->delta_y, |
223 ti->x + dtss->delta_x, ti->y + dtss->delta_y, |