Changeset - r1959:c5a6f024dd5d
[Not reviewed]
master
0 5 0
tron - 19 years ago 2005-06-20 20:09:46
tron@openttd.org
(svn r2465) Remove some unreachable code
5 files changed with 6 insertions and 13 deletions:
0 comments (0 inline, 0 general)
dedicated.c
Show inline comments
 
@@ -309,14 +309,12 @@ static int DedicatedVideoMainLoop(void)
 
			GameLoop();
 
			_screen.dst_ptr = _dedicated_video_mem;
 
			UpdateWindows();
 
		}
 
		CSleep(1);
 
	}
 

	
 
	return ML_QUIT;
 
}
 

	
 

	
 
const HalVideoDriver _dedicated_video_driver = {
 
	DedicatedVideoStart,
 
	DedicatedVideoStop,
depot.h
Show inline comments
 
@@ -70,19 +70,19 @@ static inline bool IsValidDepot(const De
 
static inline bool IsTileDepotType(TileIndex tile, TransportType type)
 
{
 
	switch(type)
 
	{
 
		case TRANSPORT_RAIL:
 
			return IsTileType(tile, MP_RAILWAY) && (_map5[tile] & 0xFC) == 0xC0;
 
			break;
 

	
 
		case TRANSPORT_ROAD:
 
			return IsTileType(tile, MP_STREET) && (_map5[tile] & 0xF0) == 0x20;
 
			break;
 

	
 
		case TRANSPORT_WATER:
 
			return IsTileType(tile, MP_WATER) && (_map5[tile] & ~3) == 0x80;
 
			break;
 

	
 
		default:
 
			assert(0);
 
			return false;
 
	}
 
}
 

	
news_gui.c
Show inline comments
 
@@ -191,13 +191,12 @@ static void NewsWindowProc(Window *w, Wi
 
		break;
 

	
 
	case WE_MESSAGE: /* The chatbar has notified us that is was either created or closed */
 
		switch (e->message.msg) {
 
			case WE_CREATE: w->message.msg = e->message.wparam; break;
 
			case WE_DESTROY: w->message.msg = 0; break;
 
			break;
 
		}
 
		break;
 

	
 
	case WE_TICK: { /* Scroll up newsmessages from the bottom in steps of 4 pixels */
 
		int diff;
 
		int y = max(w->top - 4, _screen.height - w->height - 12 - w->message.msg);
vehicle.c
Show inline comments
 
@@ -1747,29 +1747,29 @@ Trackdir GetVehicleTrackdir(const Vehicl
 
				return DiagdirToDiagTrackdir(GetDepotDirection(v->tile, TRANSPORT_RAIL)); /* Train in depot */
 

	
 
			if (v->u.rail.track == 0x40) /* train in tunnel, so just use his direction and assume a diagonal track */
 
				return DiagdirToDiagTrackdir((v->direction >> 1) & 3);
 

	
 
			return TrackDirectionToTrackdir(FIND_FIRST_BIT(v->u.rail.track),v->direction);
 
			break;
 

	
 
		case VEH_Ship:
 
			if (v->u.ship.state == 0x80)  /* Inside a depot? */
 
				/* We'll assume the ship is facing outwards */
 
				return DiagdirToDiagTrackdir(GetDepotDirection(v->tile, TRANSPORT_WATER)); /* Ship in depot */
 

	
 
			return TrackDirectionToTrackdir(FIND_FIRST_BIT(v->u.ship.state),v->direction);
 
			break;
 

	
 
		case VEH_Road:
 
			if (v->u.road.state == 254) /* We'll assume the road vehicle is facing outwards */
 
				return DiagdirToDiagTrackdir(GetDepotDirection(v->tile, TRANSPORT_ROAD)); /* Road vehicle in depot */
 

	
 
			if (IsRoadStationTile(v->tile)) /* We'll assume the road vehicle is facing outwards */
 
				return DiagdirToDiagTrackdir(GetRoadStationDir(v->tile)); /* Road vehicle in a station */
 

	
 
			return DiagdirToDiagTrackdir((v->direction >> 1) & 3);
 
			break;
 

	
 
		/* case VEH_Aircraft: case VEH_Special: case VEH_Disaster: */
 
		default: return 0xFF;
 
	}
 
}
 
/* Return value has bit 0x2 set, when the vehicle enters a station. Then,
 
 * result << 8 contains the id of the station entered. If the return value has
viewport.c
Show inline comments
 
@@ -1993,31 +1993,27 @@ static byte Check2x1AutoRail(int mode)
 

	
 
	switch(mode) {
 
	case 0: // end piece is lower right
 
		if (fxpy >= 20 && sxpy <= 12) { /*SwapSelection(); DoRailroadTrack(0); */return 3; }
 
		if (fxmy < -3 && sxmy > 3) {/* DoRailroadTrack(0); */return 5; }
 
		return 1;
 
		break;
 

	
 
	case 1:
 
		if (fxmy > 3 && sxmy < -3) { /*SwapSelection(); DoRailroadTrack(0); */return 4; }
 
		if (fxpy <= 12 && sxpy >= 20) { /*DoRailroadTrack(0); */return 2; }
 
		return 1;
 
		break;
 

	
 
	case 2:
 
		if (fxmy > 3 && sxmy < -3) { /*DoRailroadTrack(3);*/ return 4; }
 
		if (fxpy >= 20 && sxpy <= 12) { /*SwapSelection(); DoRailroadTrack(0); */return 3; }
 
		return 0;
 
		break;
 

	
 
	case 3:
 
		if (fxmy < -3 && sxmy > 3) { /*SwapSelection(); DoRailroadTrack(3);*/ return 5; }
 
		if (fxpy <= 12 && sxpy >= 20) { /*DoRailroadTrack(0); */return 2; }
 
		return 0;
 
		break;
 
	}
 

	
 
	return 0; // avoids compiler warnings
 
}
 

	
 

	
0 comments (0 inline, 0 general)