23 #include "variables.h" |
23 #include "variables.h" |
24 #include "table/unmovable_land.h" |
24 #include "table/unmovable_land.h" |
25 #include "genworld.h" |
25 #include "genworld.h" |
26 #include "bridge.h" |
26 #include "bridge.h" |
27 #include "autoslope.h" |
27 #include "autoslope.h" |
|
28 #include "transparency.h" |
28 |
29 |
29 /** Destroy a HQ. |
30 /** Destroy a HQ. |
30 * During normal gameplay you can only implicitely destroy a HQ when you are |
31 * During normal gameplay you can only implicitely destroy a HQ when you are |
31 * rebuilding it. Otherwise, only water can destroy it. |
32 * rebuilding it. Otherwise, only water can destroy it. |
32 * @param pid Player requesting the destruction of his HQ |
33 * @param pid Player requesting the destruction of his HQ |
127 dtus = &_draw_tile_unmovable_data[GetUnmovableType(ti->tile)]; |
128 dtus = &_draw_tile_unmovable_data[GetUnmovableType(ti->tile)]; |
128 |
129 |
129 AddSortableSpriteToDraw( |
130 AddSortableSpriteToDraw( |
130 dtus->image, PAL_NONE, ti->x | dtus->subcoord_x, ti->y | dtus->subcoord_y, |
131 dtus->image, PAL_NONE, ti->x | dtus->subcoord_x, ti->y | dtus->subcoord_y, |
131 dtus->width, dtus->height, dtus->z_size, ti->z, |
132 dtus->width, dtus->height, dtus->z_size, ti->z, |
132 HASBIT(_transparent_opt, TO_STRUCTURES) |
133 IsTransparencySet(TO_STRUCTURES) |
133 ); |
134 ); |
134 break; |
135 break; |
135 } |
136 } |
136 |
137 |
137 case UNMOVABLE_STATUE: |
138 case UNMOVABLE_STATUE: |
138 /* This should prevent statues from sinking into the ground when on a slope. */ |
139 /* This should prevent statues from sinking into the ground when on a slope. */ |
139 if (ti->tileh != SLOPE_FLAT) DrawFoundation(ti, GetFoundation_Unmovable(ti->tile, ti->tileh)); |
140 if (ti->tileh != SLOPE_FLAT) DrawFoundation(ti, GetFoundation_Unmovable(ti->tile, ti->tileh)); |
140 |
141 |
141 DrawGroundSprite(SPR_CONCRETE_GROUND, PAL_NONE); |
142 DrawGroundSprite(SPR_CONCRETE_GROUND, PAL_NONE); |
142 |
143 |
143 AddSortableSpriteToDraw(SPR_STATUE_COMPANY, PLAYER_SPRITE_COLOR(GetTileOwner(ti->tile)), ti->x, ti->y, 16, 16, 25, ti->z, HASBIT(_transparent_opt, TO_STRUCTURES)); |
144 AddSortableSpriteToDraw(SPR_STATUE_COMPANY, PLAYER_SPRITE_COLOR(GetTileOwner(ti->tile)), ti->x, ti->y, 16, 16, 25, ti->z, IsTransparencySet(TO_STRUCTURES)); |
144 break; |
145 break; |
145 |
146 |
146 case UNMOVABLE_OWNED_LAND: |
147 case UNMOVABLE_OWNED_LAND: |
147 DrawClearLandTile(ti, 0); |
148 DrawClearLandTile(ti, 0); |
148 |
149 |
170 AddSortableSpriteToDraw( |
171 AddSortableSpriteToDraw( |
171 dtss->image, palette, |
172 dtss->image, palette, |
172 ti->x + dtss->delta_x, ti->y + dtss->delta_y, |
173 ti->x + dtss->delta_x, ti->y + dtss->delta_y, |
173 dtss->size_x, dtss->size_y, |
174 dtss->size_x, dtss->size_y, |
174 dtss->size_z, ti->z + dtss->delta_z, |
175 dtss->size_z, ti->z + dtss->delta_z, |
175 HASBIT(_transparent_opt, TO_STRUCTURES) |
176 IsTransparencySet(TO_STRUCTURES) |
176 ); |
177 ); |
177 } |
178 } |
178 break; |
179 break; |
179 } |
180 } |
180 } |
181 } |