File diff r221:56c7ed3a0581 → r222:4409829eb08f
road_cmd.c
Show inline comments
 
@@ -801,27 +801,27 @@ static void DrawTile_Road(TileInfo *ti)
 
		int player;
 
		const DrawRoadSeqStruct *drss;
 

	
 
		if (ti->tileh != 0) { DrawFoundation(ti, ti->tileh); }
 

	
 
		ormod = 0x315;
 
		player = _map_owner[ti->tile];
 
		if (player < MAX_PLAYERS)
 
			ormod = PLAYER_SPRITE_COLOR(player);
 

	
 
		s = _road_display_datas[ti->map5 & 0xF];
 

	
 
		DrawGroundSprite(*(uint32*)s);
 
		DrawGroundSprite(*(const uint32*)s);
 
		s += sizeof(uint32);
 
		drss = (DrawRoadSeqStruct*)s;
 
		drss = (const DrawRoadSeqStruct*)s;
 

	
 
		while ((image=drss->image) != 0) {
 
			if (image & 0x8000)
 
				image |= ormod;
 
			if (!(_display_opt & DO_TRANS_BUILDINGS)) // show transparent depots
 
				image = (image & 0x3FFF) | 0x3224000;
 

	
 
			AddSortableSpriteToDraw(image, ti->x | drss->subcoord_x,
 
				ti->y | drss->subcoord_y, drss->width, drss->height, 0x14, ti->z);
 
			drss++;
 
		}
 
	}
 
@@ -831,28 +831,28 @@ void DrawRoadDepotSprite(int x, int y, i
 
{
 
	uint32 ormod;
 
	const DrawRoadSeqStruct *dtss;
 
	const byte *t;
 

	
 
	ormod = PLAYER_SPRITE_COLOR(_local_player);
 

	
 
	t = _road_display_datas[image];
 

	
 
	x+=33;
 
	y+=17;
 

	
 
	DrawSprite(*(uint32*)t, x, y);
 
	DrawSprite(*(const uint32*)t, x, y);
 
	t += sizeof(uint32);
 

	
 
	for(dtss = (DrawRoadSeqStruct *)t; dtss->image != 0; dtss++) {
 
	for(dtss = (const DrawRoadSeqStruct *)t; dtss->image != 0; dtss++) {
 
		Point pt = RemapCoords(dtss->subcoord_x, dtss->subcoord_y, 0);
 

	
 
		image = dtss->image;
 
		if (image & 0x8000)
 
			image |= ormod;
 

	
 
		DrawSprite(image, x + pt.x, y + pt.y);
 
	}
 
}
 

	
 
uint GetSlopeZ_Road(TileInfo *ti)
 
{