mirror of https://github.com/OpenTTD/OpenTTD.git
(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)
|
if (image&0x8000 && (image & 0xFFFF0000) == 0)
|
||||||
image |= ormod;
|
image |= ormod;
|
||||||
|
|
||||||
if (!(_display_opt & DO_TRANS_BUILDINGS))
|
if (_display_opt & DO_TRANS_BUILDINGS)
|
||||||
image = (image & 0x3FFF) | 0x3224000;
|
image = (image & 0x3FFF) | 0x3224000;
|
||||||
|
|
||||||
AddSortableSpriteToDraw(image,
|
AddSortableSpriteToDraw(image,
|
||||||
|
@ -318,7 +318,7 @@ static void DrawTile_Industry(TileInfo *ti)
|
||||||
dits->dz,
|
dits->dz,
|
||||||
z);
|
z);
|
||||||
|
|
||||||
if (!(_display_opt & DO_TRANS_BUILDINGS))
|
if (_display_opt & DO_TRANS_BUILDINGS)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -849,7 +849,7 @@ static void ToolbarOptionsClick(Window *w)
|
||||||
if (_display_opt & DO_WAYPOINTS) x &= ~(1<<8);
|
if (_display_opt & DO_WAYPOINTS) x &= ~(1<<8);
|
||||||
if (_display_opt & DO_FULL_ANIMATION) x &= ~(1<<9);
|
if (_display_opt & DO_FULL_ANIMATION) x &= ~(1<<9);
|
||||||
if (_display_opt & DO_FULL_DETAIL) x &= ~(1<<10);
|
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;
|
WP(w,menu_d).checked_items = x;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -117,7 +117,7 @@ static void NewsWindowProc(Window *w, WindowEvent *e)
|
||||||
ni->string_id, 426);
|
ni->string_id, 426);
|
||||||
} else {
|
} else {
|
||||||
byte bk = _display_opt;
|
byte bk = _display_opt;
|
||||||
_display_opt |= DO_TRANS_BUILDINGS;
|
_display_opt &= ~DO_TRANS_BUILDINGS;
|
||||||
DrawWindowViewport(w);
|
DrawWindowViewport(w);
|
||||||
_display_opt = bk;
|
_display_opt = bk;
|
||||||
|
|
||||||
|
|
|
@ -1425,7 +1425,7 @@ static void DrawSpecialBuilding(uint32 image, uint32 tracktype_offs,
|
||||||
if (image & 0x8000)
|
if (image & 0x8000)
|
||||||
image |= _drawtile_track_palette;
|
image |= _drawtile_track_palette;
|
||||||
image += tracktype_offs;
|
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;
|
image = (image & 0x3FFF) | 0x3224000;
|
||||||
AddSortableSpriteToDraw(image, ti->x + x, ti->y + y, xsize, ysize, zsize, ti->z + z);
|
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) {
|
while ((image=drss->image) != 0) {
|
||||||
if (image & 0x8000)
|
if (image & 0x8000)
|
||||||
image |= ormod;
|
image |= ormod;
|
||||||
if (!(_display_opt & DO_TRANS_BUILDINGS)) // show transparent depots
|
if (_display_opt & DO_TRANS_BUILDINGS) // show transparent depots
|
||||||
image = (image & 0x3FFF) | 0x3224000;
|
image = (image & 0x3FFF) | 0x3224000;
|
||||||
|
|
||||||
AddSortableSpriteToDraw(image, ti->x | drss->subcoord_x,
|
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.
|
// For custom sprites, there's no railtype-based pitching.
|
||||||
image += railtype * ((image & 0x3FFF) < _custom_sprites_base ? TRACKTYPE_SPRITE_PITCH : 0);
|
image += railtype * ((image & 0x3FFF) < _custom_sprites_base ? TRACKTYPE_SPRITE_PITCH : 0);
|
||||||
if (_display_opt & DO_TRANS_BUILDINGS) {
|
if (_display_opt & DO_TRANS_BUILDINGS) {
|
||||||
if (image&0x8000) image |= image_or_modificator;
|
|
||||||
} else {
|
|
||||||
image = (image & 0x3FFF) | 0x03224000;
|
image = (image & 0x3FFF) | 0x03224000;
|
||||||
|
} else {
|
||||||
|
if (image&0x8000) image |= image_or_modificator;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((byte)dtss->delta_z != 0x80) {
|
if ((byte)dtss->delta_z != 0x80) {
|
||||||
|
|
|
@ -85,7 +85,7 @@ static void DrawTile_Town(TileInfo *ti)
|
||||||
|
|
||||||
/* Add a house on top of the ground? */
|
/* Add a house on top of the ground? */
|
||||||
if ((image = dcts->sprite_2) != 0) {
|
if ((image = dcts->sprite_2) != 0) {
|
||||||
if (!(_display_opt & DO_TRANS_BUILDINGS))
|
if (_display_opt & DO_TRANS_BUILDINGS)
|
||||||
image = (image & 0x3FFF) | 0x3224000;
|
image = (image & 0x3FFF) | 0x3224000;
|
||||||
|
|
||||||
AddSortableSpriteToDraw(image,
|
AddSortableSpriteToDraw(image,
|
||||||
|
@ -96,7 +96,7 @@ static void DrawTile_Town(TileInfo *ti)
|
||||||
dcts->dz,
|
dcts->dz,
|
||||||
z);
|
z);
|
||||||
|
|
||||||
if (!(_display_opt & DO_TRANS_BUILDINGS))
|
if (_display_opt & DO_TRANS_BUILDINGS)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -288,7 +288,7 @@ static void DrawTile_Trees(TileInfo *ti)
|
||||||
|
|
||||||
StartSpriteCombine();
|
StartSpriteCombine();
|
||||||
|
|
||||||
if((_display_opt & DO_TRANS_BUILDINGS) || !_patches.invisible_trees)
|
if (!(_display_opt & DO_TRANS_BUILDINGS) || !_patches.invisible_trees)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
@ -296,7 +296,7 @@ static void DrawTile_Trees(TileInfo *ti)
|
||||||
i = (ti->map5 >> 6) + 1;
|
i = (ti->map5 >> 6) + 1;
|
||||||
do {
|
do {
|
||||||
uint32 image = s[0] + (--i==0 ? (ti->map5 & 7) : 3);
|
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;
|
image = (image & 0x3FFF) | 0x3224000;
|
||||||
te[i].image = image;
|
te[i].image = image;
|
||||||
te[i].x = d[0];
|
te[i].x = d[0];
|
||||||
|
|
2
ttd.c
2
ttd.c
|
@ -641,7 +641,7 @@ static void LoadIntroGame()
|
||||||
{
|
{
|
||||||
char filename[256];
|
char filename[256];
|
||||||
_game_mode = GM_MENU;
|
_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;
|
_opt_mod_ptr = &_new_opt;
|
||||||
GfxLoadSprites();
|
GfxLoadSprites();
|
||||||
|
|
|
@ -936,7 +936,7 @@ static void DrawBridgePillars(TileInfo *ti, int x, int y, int z)
|
||||||
image = b[12 + (ti->map5&0x01)];
|
image = b[12 + (ti->map5&0x01)];
|
||||||
piece = _map2[ti->tile]&0xF;
|
piece = _map2[ti->tile]&0xF;
|
||||||
if (image != 0 && piece != 0) {
|
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);
|
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},
|
{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)];
|
p = _tileh_bits[(image & 1) * 2 + (ti->map5&0x01)];
|
||||||
front_height = ti->z + ((ti->tileh & p[0])?8:0);
|
front_height = ti->z + ((ti->tileh & p[0])?8:0);
|
||||||
|
@ -1047,7 +1047,7 @@ static void DrawTile_TunnelBridge(TileInfo *ti)
|
||||||
}
|
}
|
||||||
|
|
||||||
// draw ramp
|
// 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);
|
AddSortableSpriteToDraw(image, ti->x, ti->y, 16, 16, 7, ti->z);
|
||||||
} else {
|
} else {
|
||||||
// bridge middle part.
|
// bridge middle part.
|
||||||
|
@ -1094,13 +1094,13 @@ static void DrawTile_TunnelBridge(TileInfo *ti)
|
||||||
|
|
||||||
// draw rail
|
// draw rail
|
||||||
image = b[0];
|
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);
|
AddSortableSpriteToDraw(image, ti->x, ti->y, (ti->map5&1)?11:16, (ti->map5&1)?16:11, 1, z);
|
||||||
|
|
||||||
x = ti->x;
|
x = ti->x;
|
||||||
y = ti->y;
|
y = ti->y;
|
||||||
image = b[1];
|
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
|
// draw roof
|
||||||
if (ti->map5&1) {
|
if (ti->map5&1) {
|
||||||
|
@ -1115,7 +1115,7 @@ static void DrawTile_TunnelBridge(TileInfo *ti)
|
||||||
// draw poles below for small bridges
|
// draw poles below for small bridges
|
||||||
image = b[2];
|
image = b[2];
|
||||||
if (image) {
|
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);
|
DrawGroundSpriteAt(image, x, y, z);
|
||||||
}
|
}
|
||||||
} else if (_patches.bridge_pillars) {
|
} else if (_patches.bridge_pillars) {
|
||||||
|
|
|
@ -33,7 +33,7 @@ static void DrawTile_Unmovable(TileInfo *ti)
|
||||||
|
|
||||||
image = PLAYER_SPRITE_COLOR(_map_owner[ti->tile]);
|
image = PLAYER_SPRITE_COLOR(_map_owner[ti->tile]);
|
||||||
image += 0x8A48;
|
image += 0x8A48;
|
||||||
if (!(_display_opt & DO_TRANS_BUILDINGS))
|
if (_display_opt & DO_TRANS_BUILDINGS)
|
||||||
image = (image & 0x3FFF) | 0x3224000;
|
image = (image & 0x3FFF) | 0x3224000;
|
||||||
AddSortableSpriteToDraw(image, ti->x, ti->y, 16, 16, 25, ti->z);
|
AddSortableSpriteToDraw(image, ti->x, ti->y, 16, 16, 25, ti->z);
|
||||||
} else if (ti->map5 == 3) {
|
} else if (ti->map5 == 3) {
|
||||||
|
@ -59,7 +59,7 @@ static void DrawTile_Unmovable(TileInfo *ti)
|
||||||
dtus = &_draw_tile_unmovable_data[ti->map5];
|
dtus = &_draw_tile_unmovable_data[ti->map5];
|
||||||
|
|
||||||
image = dtus->image;
|
image = dtus->image;
|
||||||
if (!(_display_opt & DO_TRANS_BUILDINGS))
|
if (_display_opt & DO_TRANS_BUILDINGS)
|
||||||
image = (image & 0x3FFF) | 0x3224000;
|
image = (image & 0x3FFF) | 0x3224000;
|
||||||
|
|
||||||
AddSortableSpriteToDraw(image,
|
AddSortableSpriteToDraw(image,
|
||||||
|
@ -82,9 +82,9 @@ static void DrawTile_Unmovable(TileInfo *ti)
|
||||||
foreach_draw_tile_seq(dtss, t->seq) {
|
foreach_draw_tile_seq(dtss, t->seq) {
|
||||||
image = dtss->image;
|
image = dtss->image;
|
||||||
if (_display_opt & DO_TRANS_BUILDINGS) {
|
if (_display_opt & DO_TRANS_BUILDINGS) {
|
||||||
image |= ormod;
|
|
||||||
} else {
|
|
||||||
image = (image & 0x3FFF) | 0x03224000;
|
image = (image & 0x3FFF) | 0x03224000;
|
||||||
|
} else {
|
||||||
|
image |= ormod;
|
||||||
}
|
}
|
||||||
AddSortableSpriteToDraw(image, ti->x + dtss->delta_x, ti->y + dtss->delta_y,
|
AddSortableSpriteToDraw(image, ti->x + dtss->delta_x, ti->y + dtss->delta_y,
|
||||||
dtss->width, dtss->height, dtss->unk, ti->z + dtss->delta_z);
|
dtss->width, dtss->height, dtss->unk, ti->z + dtss->delta_z);
|
||||||
|
|
|
@ -1104,12 +1104,12 @@ static void ViewportDrawStrings(DrawPixelInfo *dpi, StringSpriteToDraw *ss)
|
||||||
w -= 3;
|
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(0, ss->params[0]);
|
||||||
SET_DPARAM32(1, ss->params[1]);
|
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
|
/* This is such a frustrating mess - I need to convert
|
||||||
* from real color codes to string color codes and guess
|
* from real color codes to string color codes and guess
|
||||||
* what, they are completely different. --pasky */
|
* 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++) {
|
for(wdts = (const WaterDrawTileStruct *)t; (byte)wdts->delta_x != 0x80; wdts++) {
|
||||||
image = wdts->image + base;
|
image = wdts->image + base;
|
||||||
if (_display_opt & DO_TRANS_BUILDINGS) {
|
if (_display_opt & DO_TRANS_BUILDINGS) {
|
||||||
image |= palette;
|
|
||||||
} else {
|
|
||||||
image = (image & 0x3FFF) | 0x03224000;
|
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);
|
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