(svn r8128) -Codechange: Split sprite and palette remap into separate 32 bit values.

This lets us increase the sprite width from 14 to up to 29 bits, 
effectively nulling the old sprite limit. Table changes in next commit.
This commit is contained in:
2007-01-14 19:57:49 +00:00
parent 19d31c7417
commit 92d418b031
60 changed files with 672 additions and 511 deletions

View File

@@ -71,8 +71,8 @@ void DrawRoadVehPurchaseInfo(int x, int y, uint w, EngineID engine_number)
void DrawRoadVehImage(const Vehicle *v, int x, int y, VehicleID selection)
{
PalSpriteID pal = (v->vehstatus & VS_CRASHED) ? PALETTE_CRASH : GetVehiclePalette(v);
DrawSprite(GetRoadVehImage(v, DIR_W) | pal, x + 14, y + 6);
SpriteID pal = (v->vehstatus & VS_CRASHED) ? PALETTE_CRASH : GetVehiclePalette(v);
DrawSprite(GetRoadVehImage(v, DIR_W), pal, x + 14, y + 6);
if (v->index == selection) {
DrawFrameRect(x - 1, y - 1, x + 28, y + 12, 15, FR_BORDERONLY);
@@ -291,7 +291,7 @@ static void RoadVehViewWndProc(Window *w, WindowEvent *e)
}
/* draw the flag plus orders */
DrawSprite(v->vehstatus & VS_STOPPED ? SPR_FLAG_VEH_STOPPED : SPR_FLAG_VEH_RUNNING, 2, w->widget[5].top + 1);
DrawSprite(v->vehstatus & VS_STOPPED ? SPR_FLAG_VEH_STOPPED : SPR_FLAG_VEH_RUNNING, PAL_NONE, 2, w->widget[5].top + 1);
DrawStringCenteredTruncated(w->widget[5].left + 8, w->widget[5].right, w->widget[5].top + 1, str, 0);
DrawWindowViewport(w);
} break;
@@ -544,3 +544,4 @@ void ShowBuildRoadVehWindow(TileIndex tile)
}