mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-03-06 14:27:16 +00:00
(svn r787) Invert the sense of the DO_TRANS_BUILDINGS flag to be consistent with its own name and all other DO_* flags.
Now it is active-true.
This commit is contained in:
parent
06158be674
commit
e8537f5512
@ -307,7 +307,7 @@ static void DrawTile_Industry(TileInfo *ti)
|
||||
if (image&0x8000 && (image & 0xFFFF0000) == 0)
|
||||
image |= ormod;
|
||||
|
||||
if (!(_display_opt & DO_TRANS_BUILDINGS))
|
||||
if (_display_opt & DO_TRANS_BUILDINGS)
|
||||
image = (image & 0x3FFF) | 0x3224000;
|
||||
|
||||
AddSortableSpriteToDraw(image,
|
||||
@ -318,7 +318,7 @@ static void DrawTile_Industry(TileInfo *ti)
|
||||
dits->dz,
|
||||
z);
|
||||
|
||||
if (!(_display_opt & DO_TRANS_BUILDINGS))
|
||||
if (_display_opt & DO_TRANS_BUILDINGS)
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -849,7 +849,7 @@ static void ToolbarOptionsClick(Window *w)
|
||||
if (_display_opt & DO_WAYPOINTS) x &= ~(1<<8);
|
||||
if (_display_opt & DO_FULL_ANIMATION) x &= ~(1<<9);
|
||||
if (_display_opt & DO_FULL_DETAIL) x &= ~(1<<10);
|
||||
if (!(_display_opt & DO_TRANS_BUILDINGS)) x &= ~(1<<11);
|
||||
if (_display_opt & DO_TRANS_BUILDINGS) x &= ~(1<<11);
|
||||
WP(w,menu_d).checked_items = x;
|
||||
}
|
||||
|
||||
|
@ -117,7 +117,7 @@ static void NewsWindowProc(Window *w, WindowEvent *e)
|
||||
ni->string_id, 426);
|
||||
} else {
|
||||
byte bk = _display_opt;
|
||||
_display_opt |= DO_TRANS_BUILDINGS;
|
||||
_display_opt &= ~DO_TRANS_BUILDINGS;
|
||||
DrawWindowViewport(w);
|
||||
_display_opt = bk;
|
||||
|
||||
|
@ -1425,7 +1425,7 @@ static void DrawSpecialBuilding(uint32 image, uint32 tracktype_offs,
|
||||
if (image & 0x8000)
|
||||
image |= _drawtile_track_palette;
|
||||
image += tracktype_offs;
|
||||
if (!(_display_opt & DO_TRANS_BUILDINGS)) // show transparent depots
|
||||
if (_display_opt & DO_TRANS_BUILDINGS) // show transparent depots
|
||||
image = (image & 0x3FFF) | 0x3224000;
|
||||
AddSortableSpriteToDraw(image, ti->x + x, ti->y + y, xsize, ysize, zsize, ti->z + z);
|
||||
}
|
||||
|
@ -818,7 +818,7 @@ static void DrawTile_Road(TileInfo *ti)
|
||||
while ((image=drss->image) != 0) {
|
||||
if (image & 0x8000)
|
||||
image |= ormod;
|
||||
if (!(_display_opt & DO_TRANS_BUILDINGS)) // show transparent depots
|
||||
if (_display_opt & DO_TRANS_BUILDINGS) // show transparent depots
|
||||
image = (image & 0x3FFF) | 0x3224000;
|
||||
|
||||
AddSortableSpriteToDraw(image, ti->x | drss->subcoord_x,
|
||||
|
@ -1950,9 +1950,9 @@ static void DrawTile_Station(TileInfo *ti)
|
||||
// For custom sprites, there's no railtype-based pitching.
|
||||
image += railtype * ((image & 0x3FFF) < _custom_sprites_base ? TRACKTYPE_SPRITE_PITCH : 0);
|
||||
if (_display_opt & DO_TRANS_BUILDINGS) {
|
||||
if (image&0x8000) image |= image_or_modificator;
|
||||
} else {
|
||||
image = (image & 0x3FFF) | 0x03224000;
|
||||
} else {
|
||||
if (image&0x8000) image |= image_or_modificator;
|
||||
}
|
||||
|
||||
if ((byte)dtss->delta_z != 0x80) {
|
||||
|
@ -85,7 +85,7 @@ static void DrawTile_Town(TileInfo *ti)
|
||||
|
||||
/* Add a house on top of the ground? */
|
||||
if ((image = dcts->sprite_2) != 0) {
|
||||
if (!(_display_opt & DO_TRANS_BUILDINGS))
|
||||
if (_display_opt & DO_TRANS_BUILDINGS)
|
||||
image = (image & 0x3FFF) | 0x3224000;
|
||||
|
||||
AddSortableSpriteToDraw(image,
|
||||
@ -96,7 +96,7 @@ static void DrawTile_Town(TileInfo *ti)
|
||||
dcts->dz,
|
||||
z);
|
||||
|
||||
if (!(_display_opt & DO_TRANS_BUILDINGS))
|
||||
if (_display_opt & DO_TRANS_BUILDINGS)
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -288,7 +288,7 @@ static void DrawTile_Trees(TileInfo *ti)
|
||||
|
||||
StartSpriteCombine();
|
||||
|
||||
if((_display_opt & DO_TRANS_BUILDINGS) || !_patches.invisible_trees)
|
||||
if (!(_display_opt & DO_TRANS_BUILDINGS) || !_patches.invisible_trees)
|
||||
{
|
||||
int i;
|
||||
|
||||
@ -296,7 +296,7 @@ static void DrawTile_Trees(TileInfo *ti)
|
||||
i = (ti->map5 >> 6) + 1;
|
||||
do {
|
||||
uint32 image = s[0] + (--i==0 ? (ti->map5 & 7) : 3);
|
||||
if (!(_display_opt & DO_TRANS_BUILDINGS))
|
||||
if (_display_opt & DO_TRANS_BUILDINGS)
|
||||
image = (image & 0x3FFF) | 0x3224000;
|
||||
te[i].image = image;
|
||||
te[i].x = d[0];
|
||||
|
2
ttd.c
2
ttd.c
@ -641,7 +641,7 @@ static void LoadIntroGame()
|
||||
{
|
||||
char filename[256];
|
||||
_game_mode = GM_MENU;
|
||||
_display_opt |= DO_TRANS_BUILDINGS; // don't make buildings transparent in intro
|
||||
_display_opt &= ~DO_TRANS_BUILDINGS; // don't make buildings transparent in intro
|
||||
|
||||
_opt_mod_ptr = &_new_opt;
|
||||
GfxLoadSprites();
|
||||
|
@ -936,7 +936,7 @@ static void DrawBridgePillars(TileInfo *ti, int x, int y, int z)
|
||||
image = b[12 + (ti->map5&0x01)];
|
||||
piece = _map2[ti->tile]&0xF;
|
||||
if (image != 0 && piece != 0) {
|
||||
if (!(_display_opt & DO_TRANS_BUILDINGS)) image = (image & 0x3FFF) | 0x03224000;
|
||||
if (_display_opt & DO_TRANS_BUILDINGS) image = (image & 0x3FFF) | 0x03224000;
|
||||
DrawGroundSpriteAt(image, x, y, z);
|
||||
}
|
||||
|
||||
@ -953,7 +953,7 @@ static void DrawBridgePillars(TileInfo *ti, int x, int y, int z)
|
||||
{2,4,8,1, 11,16,9,0},
|
||||
};
|
||||
|
||||
if (!(_display_opt & DO_TRANS_BUILDINGS)) image = (image & 0x3FFF) | 0x03224000;
|
||||
if (_display_opt & DO_TRANS_BUILDINGS) image = (image & 0x3FFF) | 0x03224000;
|
||||
|
||||
p = _tileh_bits[(image & 1) * 2 + (ti->map5&0x01)];
|
||||
front_height = ti->z + ((ti->tileh & p[0])?8:0);
|
||||
@ -1047,7 +1047,7 @@ static void DrawTile_TunnelBridge(TileInfo *ti)
|
||||
}
|
||||
|
||||
// draw ramp
|
||||
if (!(_display_opt & DO_TRANS_BUILDINGS)) image = (image & 0x3FFF) | 0x03224000;
|
||||
if (_display_opt & DO_TRANS_BUILDINGS) image = (image & 0x3FFF) | 0x03224000;
|
||||
AddSortableSpriteToDraw(image, ti->x, ti->y, 16, 16, 7, ti->z);
|
||||
} else {
|
||||
// bridge middle part.
|
||||
@ -1094,13 +1094,13 @@ static void DrawTile_TunnelBridge(TileInfo *ti)
|
||||
|
||||
// draw rail
|
||||
image = b[0];
|
||||
if (!(_display_opt & DO_TRANS_BUILDINGS)) image = (image & 0x3FFF) | 0x03224000;
|
||||
if (_display_opt & DO_TRANS_BUILDINGS) image = (image & 0x3FFF) | 0x03224000;
|
||||
AddSortableSpriteToDraw(image, ti->x, ti->y, (ti->map5&1)?11:16, (ti->map5&1)?16:11, 1, z);
|
||||
|
||||
x = ti->x;
|
||||
y = ti->y;
|
||||
image = b[1];
|
||||
if (!(_display_opt & DO_TRANS_BUILDINGS)) image = (image & 0x3FFF) | 0x03224000;
|
||||
if (_display_opt & DO_TRANS_BUILDINGS) image = (image & 0x3FFF) | 0x03224000;
|
||||
|
||||
// draw roof
|
||||
if (ti->map5&1) {
|
||||
@ -1115,7 +1115,7 @@ static void DrawTile_TunnelBridge(TileInfo *ti)
|
||||
// draw poles below for small bridges
|
||||
image = b[2];
|
||||
if (image) {
|
||||
if (!(_display_opt & DO_TRANS_BUILDINGS)) image = (image & 0x3FFF) | 0x03224000;
|
||||
if (_display_opt & DO_TRANS_BUILDINGS) image = (image & 0x3FFF) | 0x03224000;
|
||||
DrawGroundSpriteAt(image, x, y, z);
|
||||
}
|
||||
} else if (_patches.bridge_pillars) {
|
||||
|
@ -33,7 +33,7 @@ static void DrawTile_Unmovable(TileInfo *ti)
|
||||
|
||||
image = PLAYER_SPRITE_COLOR(_map_owner[ti->tile]);
|
||||
image += 0x8A48;
|
||||
if (!(_display_opt & DO_TRANS_BUILDINGS))
|
||||
if (_display_opt & DO_TRANS_BUILDINGS)
|
||||
image = (image & 0x3FFF) | 0x3224000;
|
||||
AddSortableSpriteToDraw(image, ti->x, ti->y, 16, 16, 25, ti->z);
|
||||
} else if (ti->map5 == 3) {
|
||||
@ -59,7 +59,7 @@ static void DrawTile_Unmovable(TileInfo *ti)
|
||||
dtus = &_draw_tile_unmovable_data[ti->map5];
|
||||
|
||||
image = dtus->image;
|
||||
if (!(_display_opt & DO_TRANS_BUILDINGS))
|
||||
if (_display_opt & DO_TRANS_BUILDINGS)
|
||||
image = (image & 0x3FFF) | 0x3224000;
|
||||
|
||||
AddSortableSpriteToDraw(image,
|
||||
@ -82,9 +82,9 @@ static void DrawTile_Unmovable(TileInfo *ti)
|
||||
foreach_draw_tile_seq(dtss, t->seq) {
|
||||
image = dtss->image;
|
||||
if (_display_opt & DO_TRANS_BUILDINGS) {
|
||||
image |= ormod;
|
||||
} else {
|
||||
image = (image & 0x3FFF) | 0x03224000;
|
||||
} else {
|
||||
image |= ormod;
|
||||
}
|
||||
AddSortableSpriteToDraw(image, ti->x + dtss->delta_x, ti->y + dtss->delta_y,
|
||||
dtss->width, dtss->height, dtss->unk, ti->z + dtss->delta_z);
|
||||
|
@ -1104,12 +1104,12 @@ static void ViewportDrawStrings(DrawPixelInfo *dpi, StringSpriteToDraw *ss)
|
||||
w -= 3;
|
||||
}
|
||||
|
||||
DrawFrameRect(x,y, x+w, bottom, ss->color, (_display_opt & DO_TRANS_BUILDINGS) ? 0 : 0x9);
|
||||
DrawFrameRect(x,y, x+w, bottom, ss->color, (_display_opt & DO_TRANS_BUILDINGS) ? 0x9 : 0);
|
||||
}
|
||||
|
||||
SET_DPARAM32(0, ss->params[0]);
|
||||
SET_DPARAM32(1, ss->params[1]);
|
||||
if (!(_display_opt & DO_TRANS_BUILDINGS) && ss->width != 0) {
|
||||
if (_display_opt & DO_TRANS_BUILDINGS && ss->width != 0) {
|
||||
/* This is such a frustrating mess - I need to convert
|
||||
* from real color codes to string color codes and guess
|
||||
* what, they are completely different. --pasky */
|
||||
|
@ -390,9 +390,9 @@ static void DrawWaterStuff(TileInfo *ti, const byte *t, uint32 palette, uint bas
|
||||
for(wdts = (const WaterDrawTileStruct *)t; (byte)wdts->delta_x != 0x80; wdts++) {
|
||||
image = wdts->image + base;
|
||||
if (_display_opt & DO_TRANS_BUILDINGS) {
|
||||
image |= palette;
|
||||
} else {
|
||||
image = (image & 0x3FFF) | 0x03224000;
|
||||
} else {
|
||||
image |= palette;
|
||||
}
|
||||
AddSortableSpriteToDraw(image, ti->x + wdts->delta_x, ti->y + wdts->delta_y, wdts->width, wdts->height, wdts->unk, ti->z + wdts->delta_z);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user