summaryrefslogtreecommitdiff
path: root/src/player_gui.cpp
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2007-01-14 19:57:49 +0000
committerpeter1138 <peter1138@openttd.org>2007-01-14 19:57:49 +0000
commitca9843424be6008d9b8019423f2ead65fdb75fe2 (patch)
treec62990da208a45b3bd1c7379a1835190458d5a49 /src/player_gui.cpp
parentc04c2b28245770aa7729b818fb876cd23c880620 (diff)
downloadopenttd-ca9843424be6008d9b8019423f2ead65fdb75fe2.tar.xz
(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.
Diffstat (limited to 'src/player_gui.cpp')
-rw-r--r--src/player_gui.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/player_gui.cpp b/src/player_gui.cpp
index 1a2563d3b..e51a6d4f9 100644
--- a/src/player_gui.cpp
+++ b/src/player_gui.cpp
@@ -353,16 +353,16 @@ static void SelectPlayerLiveryWndProc(Window *w, WindowEvent *e)
bool sel = HASBIT(WP(w, livery_d).sel, scheme) != 0;
if (scheme != LS_DEFAULT) {
- DrawSprite(p->livery[scheme].in_use ? SPR_BOX_CHECKED : SPR_BOX_EMPTY, 2, y);
+ DrawSprite(p->livery[scheme].in_use ? SPR_BOX_CHECKED : SPR_BOX_EMPTY, PAL_NONE, 2, y);
}
DrawString(15, y, STR_LIVERY_DEFAULT + scheme, sel ? 0xC : 0x10);
- DrawSprite(SPR_SQUARE | GENERAL_SPRITE_COLOR(p->livery[scheme].colour1) | PALETTE_MODIFIER_COLOR, 152, y);
+ DrawSprite(SPR_SQUARE, GENERAL_SPRITE_COLOR(p->livery[scheme].colour1), 152, y);
DrawString(165, y, STR_00D1_DARK_BLUE + p->livery[scheme].colour1, sel ? 0xC : 2);
if (_have_2cc) {
- DrawSprite(SPR_SQUARE | GENERAL_SPRITE_COLOR(p->livery[scheme].colour2) | PALETTE_MODIFIER_COLOR, 277, y);
+ DrawSprite(SPR_SQUARE, GENERAL_SPRITE_COLOR(p->livery[scheme].colour2), 277, y);
DrawString(290, y, STR_00D1_DARK_BLUE + p->livery[scheme].colour2, sel ? 0xC : 2);
}
@@ -722,7 +722,7 @@ static void PlayerCompanyWndProc(Window *w, WindowEvent *e)
DrawString(110,48, STR_7006_COLOR_SCHEME, 0);
// Draw company-colour bus
- DrawSprite(PLAYER_SPRITE_COLOR(p->index) + SPRITE_PALETTE(SPR_VEH_BUS_SW_VIEW), 215, 49);
+ DrawSprite(SPR_VEH_BUS_SW_VIEW, PLAYER_SPRITE_COLOR(p->index), 215, 49);
DrawPlayerFace(p->face, p->player_color, 2, 16);
@@ -782,7 +782,7 @@ static void PlayerCompanyWndProc(Window *w, WindowEvent *e)
if (tile == 0) {
if ((byte)w->window_number != _local_player)
return;
- SetObjectToPlaceWnd(SPR_CURSOR_HQ, 1, w);
+ SetObjectToPlaceWnd(SPR_CURSOR_HQ, PAL_NONE, 1, w);
SetTileSelectSize(2, 2);
LowerWindowWidget(w, PCW_WIDGET_BUILD_VIEW_HQ);
InvalidateWidget(w, PCW_WIDGET_BUILD_VIEW_HQ);
@@ -793,7 +793,7 @@ static void PlayerCompanyWndProc(Window *w, WindowEvent *e)
}
case PCW_WIDGET_RELOCATE_HQ:
- SetObjectToPlaceWnd(SPR_CURSOR_HQ, 1, w);
+ SetObjectToPlaceWnd(SPR_CURSOR_HQ, PAL_NONE, 1, w);
SetTileSelectSize(2, 2);
LowerWindowWidget(w, PCW_WIDGET_RELOCATE_HQ);
InvalidateWidget(w, PCW_WIDGET_RELOCATE_HQ);
@@ -959,7 +959,7 @@ static void SetupHighScoreEndWindow(Window *w, uint *x, uint *y)
*x = max(0, (_screen.width / 2) - (640 / 2));
*y = max(0, (_screen.height / 2) - (480 / 2));
for (i = 0; i < 10; i++) // the image is split into 10 50px high parts
- DrawSprite(WP(w, highscore_d).background_img + i, *x, *y + (i * 50));
+ DrawSprite(WP(w, highscore_d).background_img + i, PAL_NONE, *x, *y + (i * 50));
}
extern StringID EndGameGetPerformanceTitleFromValue(uint value);