(svn r1338) -Fix: fix signed/unsigned warnings introduced when ditching the macros for map querying.
This commit is contained in:
		@@ -1212,8 +1212,8 @@ static CheckNewIndustryProc * const _check_new_industry_procs[] = {
 | 
			
		||||
 | 
			
		||||
static bool CheckSuitableIndustryPos(uint tile)
 | 
			
		||||
{
 | 
			
		||||
	int x = GET_TILE_X(tile);
 | 
			
		||||
	int y = GET_TILE_Y(tile);
 | 
			
		||||
	uint x = GET_TILE_X(tile);
 | 
			
		||||
	uint y = GET_TILE_Y(tile);
 | 
			
		||||
 | 
			
		||||
	if ( x < 2 || y < 2 || x > MapMaxX() - 3 || y > MapMaxY() - 3) {
 | 
			
		||||
		_error_message = STR_0239_SITE_UNSUITABLE;
 | 
			
		||||
 
 | 
			
		||||
@@ -512,7 +512,7 @@ void ConvertGroundTilesIntoWaterTiles()
 | 
			
		||||
		}
 | 
			
		||||
		tile++;
 | 
			
		||||
		if (GET_TILE_X(tile) == MapMaxX()) {
 | 
			
		||||
			tile += TILE_XY(-MapMaxX(), 1);
 | 
			
		||||
			tile += TILE_XY(-(int)MapMaxX(), 1);
 | 
			
		||||
			if (GET_TILE_Y(tile) == MapMaxY())
 | 
			
		||||
				break;
 | 
			
		||||
		}
 | 
			
		||||
@@ -525,7 +525,7 @@ static const byte _genterrain_tbl_2[5] = { 0, 0, 0, 0, 33 };
 | 
			
		||||
static void GenerateTerrain(int type, int flag)
 | 
			
		||||
{
 | 
			
		||||
	uint32 r;
 | 
			
		||||
	int x,y;
 | 
			
		||||
	uint x,y;
 | 
			
		||||
	int w,h;
 | 
			
		||||
	byte *p,*tile;
 | 
			
		||||
	byte direction;
 | 
			
		||||
@@ -747,12 +747,12 @@ TileIndex AdjustTileCoordRandomly(TileIndex a, byte rng)
 | 
			
		||||
//  the result will be tile + TILE_XY(addx, addy)
 | 
			
		||||
uint TileAddWrap(TileIndex tile, int addx, int addy)
 | 
			
		||||
{
 | 
			
		||||
	int x, y;
 | 
			
		||||
	uint x, y;
 | 
			
		||||
	x = GET_TILE_X(tile) + addx;
 | 
			
		||||
	y = GET_TILE_Y(tile) + addy;
 | 
			
		||||
 | 
			
		||||
	// Are we about to wrap?
 | 
			
		||||
	if (x > 0 && x < MapMaxX() && y > 0 && y < MapMaxY())
 | 
			
		||||
	if (x < MapMaxX() && y < MapMaxY())
 | 
			
		||||
		return tile + TILE_XY(addx, addy);
 | 
			
		||||
 | 
			
		||||
	return TILE_WRAPPED;
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										2
									
								
								ttd.c
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								ttd.c
									
									
									
									
									
								
							@@ -1082,7 +1082,7 @@ void GameLoop()
 | 
			
		||||
			ShowScreenshotResult(MakeScreenshot());
 | 
			
		||||
			break;
 | 
			
		||||
		case 2: // make large screenshot
 | 
			
		||||
			ShowScreenshotResult(MakeWorldScreenshot(-MapMaxX() * 32, 0, MapMaxX() * 64, TILES_Y * 32, 0));
 | 
			
		||||
			ShowScreenshotResult(MakeWorldScreenshot(-(int)MapMaxX() * 32, 0, MapMaxX() * 64, TILES_Y * 32, 0));
 | 
			
		||||
			break;
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										4
									
								
								window.c
									
									
									
									
									
								
							
							
						
						
									
										4
									
								
								window.c
									
									
									
									
									
								
							@@ -1042,9 +1042,9 @@ stop_capt:;
 | 
			
		||||
		hvx = hx * -4 + hy * 8;
 | 
			
		||||
		hvy = hx *  4 + hy * 8;
 | 
			
		||||
		if (x < -hvx) { x = -hvx; sub = 0; }
 | 
			
		||||
		if (x > MapMaxX() * 16 - hvx) { x = MapMaxX() * 16 - hvx; sub = 0; }
 | 
			
		||||
		if (x > (int)MapMaxX() * 16 - hvx) { x = MapMaxX() * 16 - hvx; sub = 0; }
 | 
			
		||||
		if (y < -hvy) { y = -hvy; sub = 0; }
 | 
			
		||||
		if (y > MapMaxY() * 16 - hvy) { y = MapMaxY() * 16 - hvy; sub = 0; }
 | 
			
		||||
		if (y > (int)MapMaxY() * 16 - hvy) { y = MapMaxY() * 16 - hvy; sub = 0; }
 | 
			
		||||
 | 
			
		||||
		WP(w,smallmap_d).scroll_x = x;
 | 
			
		||||
		WP(w,smallmap_d).scroll_y = y;
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user