(svn r787) Invert the sense of the DO_TRANS_BUILDINGS flag to be consistent with its own name and all other DO_* flags.
authortron
Tue, 23 Nov 2004 22:36:11 +0000
changeset 497 4d1c889526ee
parent 496 221efd270762
child 498 1657e9f34c53
(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.
industry_cmd.c
main_gui.c
news_gui.c
rail_cmd.c
road_cmd.c
station_cmd.c
town_cmd.c
tree_cmd.c
ttd.c
tunnelbridge_cmd.c
unmovable_cmd.c
viewport.c
water_cmd.c
--- a/industry_cmd.c	Tue Nov 23 20:54:51 2004 +0000
+++ b/industry_cmd.c	Tue Nov 23 22:36:11 2004 +0000
@@ -307,7 +307,7 @@
 		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 @@
 			dits->dz,
 			z);
 
-		if (!(_display_opt & DO_TRANS_BUILDINGS))
+		if (_display_opt & DO_TRANS_BUILDINGS)
 			return;
 	}
 
--- a/main_gui.c	Tue Nov 23 20:54:51 2004 +0000
+++ b/main_gui.c	Tue Nov 23 22:36:11 2004 +0000
@@ -849,7 +849,7 @@
 	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;
 }
 
--- a/news_gui.c	Tue Nov 23 20:54:51 2004 +0000
+++ b/news_gui.c	Tue Nov 23 22:36:11 2004 +0000
@@ -117,7 +117,7 @@
 						ni->string_id, 426);
 				} else {
 					byte bk = _display_opt;
-					_display_opt |= DO_TRANS_BUILDINGS;
+					_display_opt &= ~DO_TRANS_BUILDINGS;
 					DrawWindowViewport(w);
 					_display_opt = bk;
 
--- a/rail_cmd.c	Tue Nov 23 20:54:51 2004 +0000
+++ b/rail_cmd.c	Tue Nov 23 22:36:11 2004 +0000
@@ -1425,7 +1425,7 @@
 	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);
 }
--- a/road_cmd.c	Tue Nov 23 20:54:51 2004 +0000
+++ b/road_cmd.c	Tue Nov 23 22:36:11 2004 +0000
@@ -818,7 +818,7 @@
 		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,
--- a/station_cmd.c	Tue Nov 23 20:54:51 2004 +0000
+++ b/station_cmd.c	Tue Nov 23 22:36:11 2004 +0000
@@ -1950,9 +1950,9 @@
 		// 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) {
+			image = (image & 0x3FFF) | 0x03224000;
+		} else {
 			if (image&0x8000) image |= image_or_modificator;	
-		} else {
-			image = (image & 0x3FFF) | 0x03224000;
 		}
 
 		if ((byte)dtss->delta_z != 0x80) {
--- a/town_cmd.c	Tue Nov 23 20:54:51 2004 +0000
+++ b/town_cmd.c	Tue Nov 23 22:36:11 2004 +0000
@@ -85,7 +85,7 @@
 
 	/* 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 @@
 			dcts->dz,
 			z);
 
-		if (!(_display_opt & DO_TRANS_BUILDINGS))
+		if (_display_opt & DO_TRANS_BUILDINGS)
 			return;
 	}
 
--- a/tree_cmd.c	Tue Nov 23 20:54:51 2004 +0000
+++ b/tree_cmd.c	Tue Nov 23 22:36:11 2004 +0000
@@ -288,7 +288,7 @@
 
 	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 @@
 		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];
--- a/ttd.c	Tue Nov 23 20:54:51 2004 +0000
+++ b/ttd.c	Tue Nov 23 22:36:11 2004 +0000
@@ -641,7 +641,7 @@
 {
 	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();
--- a/tunnelbridge_cmd.c	Tue Nov 23 20:54:51 2004 +0000
+++ b/tunnelbridge_cmd.c	Tue Nov 23 22:36:11 2004 +0000
@@ -936,7 +936,7 @@
 	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 @@
 			{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 @@
 			}
 
 			// 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 @@
 
 			// 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 @@
 				// 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) {
--- a/unmovable_cmd.c	Tue Nov 23 20:54:51 2004 +0000
+++ b/unmovable_cmd.c	Tue Nov 23 22:36:11 2004 +0000
@@ -33,7 +33,7 @@
 
 			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 @@
 			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 @@
 		foreach_draw_tile_seq(dtss, t->seq) {
 			image =	dtss->image;
 			if (_display_opt & DO_TRANS_BUILDINGS) {
+				image = (image & 0x3FFF) | 0x03224000;
+			} else {
 				image |= ormod;
-			} else {
-				image = (image & 0x3FFF) | 0x03224000;
 			}
 			AddSortableSpriteToDraw(image, ti->x + dtss->delta_x, ti->y + dtss->delta_y,
 				dtss->width, dtss->height, dtss->unk, ti->z + dtss->delta_z);
--- a/viewport.c	Tue Nov 23 20:54:51 2004 +0000
+++ b/viewport.c	Tue Nov 23 22:36:11 2004 +0000
@@ -1104,12 +1104,12 @@
 				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 */
--- a/water_cmd.c	Tue Nov 23 20:54:51 2004 +0000
+++ b/water_cmd.c	Tue Nov 23 22:36:11 2004 +0000
@@ -390,9 +390,9 @@
 	for(wdts = (const WaterDrawTileStruct *)t; (byte)wdts->delta_x != 0x80; wdts++) {
 		image =	wdts->image + base;
 		if (_display_opt & DO_TRANS_BUILDINGS) {
+			image = (image & 0x3FFF) | 0x03224000;
+		} else {
 			image |= palette;
-		} else {
-			image = (image & 0x3FFF) | 0x03224000;
 		}
 		AddSortableSpriteToDraw(image, ti->x + wdts->delta_x, ti->y + wdts->delta_y, wdts->width, wdts->height, wdts->unk, ti->z + wdts->delta_z);
 	}