summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordominik <dominik@openttd.org>2004-12-09 23:16:52 +0000
committerdominik <dominik@openttd.org>2004-12-09 23:16:52 +0000
commitb747cd2fcdf0aa2b4f80ce4529da0cb76db76e2b (patch)
tree45bad2b52e086cfe08d4fac3c784cf65f5c1e9b7
parentc6cd07e2e38f49af948f50398ee25b4ea4cef322 (diff)
downloadopenttd-b747cd2fcdf0aa2b4f80ce4529da0cb76db76e2b.tar.xz
(svn r999) New icons for the network interface, newgrf gui and the tiny euro
-rw-r--r--data/openttd.grfbin16591 -> 23016 bytes
-rw-r--r--network_gui.c25
-rw-r--r--settings_gui.c2
-rw-r--r--spritecache.c9
-rw-r--r--table/sprites.h11
-rw-r--r--town_gui.c2
-rw-r--r--vehicle_gui.c2
7 files changed, 35 insertions, 16 deletions
diff --git a/data/openttd.grf b/data/openttd.grf
index afce8d51e..e8c15983c 100644
--- a/data/openttd.grf
+++ b/data/openttd.grf
Binary files differ
diff --git a/network_gui.c b/network_gui.c
index 5395378c7..537611c09 100644
--- a/network_gui.c
+++ b/network_gui.c
@@ -122,14 +122,23 @@ static void NetworkGameWindowWndProc(Window *w, WindowEvent *e)
SetDParam(1, cur_item->info.clients_max);
DrawString(135, y, STR_NETWORK_CLIENTS_ONLINE, 2);
- // draw red or green icon, depending on compatibility with server. TODO: needs new icons
- DrawSprite((SPR_OPENTTD_BASE + 10) | (compatible?0x30d8000:0x30b8000), 185, y);
- // draw red or green flag, to show if the server is password protected. TODO: needs new icons
- DrawSprite((cur_item->info.use_password)? 0xC12 : 0xC13, 195, y);
-
- cur_item = cur_item->next;
- y += NET_PRC__SIZE_OF_ROW;
- if (++n == w->vscroll.cap) { break;} // max number of games in the window
+ // only draw icons if the server is online
+ if(cur_item->online) {
+
+ // draw a lock if the server is password protected.
+ if(cur_item->info.use_password)
+ DrawSprite(SPR_LOCK, 186, y-1);
+
+ // draw red or green icon, depending on compatibility with server.
+ DrawSprite(SPR_BLOT | (compatible?0x30d8000:0x30b8000), 195, y);
+
+ // draw flag according to server language
+ DrawSprite(SPR_FLAGS_BASE + cur_item->info.server_lang, 206, y);
+
+ cur_item = cur_item->next;
+ y += NET_PRC__SIZE_OF_ROW;
+ if (++n == w->vscroll.cap) { break;} // max number of games in the window
+ }
}
}
diff --git a/settings_gui.c b/settings_gui.c
index 117f1eba8..63990ed2c 100644
--- a/settings_gui.c
+++ b/settings_gui.c
@@ -1035,7 +1035,7 @@ static void NewgrfWndProc(Window *w, WindowEvent *e)
if(h) GfxFillRect(1, y + 1, 267, y + 12, 156);
// XXX - will be grf name later
DoDrawString(c->filename, 25, y + 2, h ? 0xC : 0x10);
- DrawSprite(SPRITE_PALETTE(0x2EB | 0x30b8000), 5, y + 3);
+ DrawSprite(SPRITE_PALETTE(SPR_SQUARE | 0x30b8000), 5, y + 2);
y += NEWGRF_WND_PROC_ROWSIZE;
}
diff --git a/spritecache.c b/spritecache.c
index bcf96b5ce..a325f0c9b 100644
--- a/spritecache.c
+++ b/spritecache.c
@@ -748,12 +748,13 @@ static const char * const _cached_filenames[4] = {
"cached_sprites.xx3",
};
-#define OPENTTD_SPRITES_COUNT 70
+#define OPENTTD_SPRITES_COUNT 93
static const uint16 _openttd_grf_indexes[] = {
SPR_OPENTTD_BASE+0, SPR_OPENTTD_BASE+7, // icons etc
- 134, 134, // euro symbol medium size
- 582, 582, // euro symbol large size
- SPR_OPENTTD_BASE+10, SPR_OPENTTD_BASE+57, // more icons
+ 134, 134, // euro symbol medium size
+ 582, 582, // euro symbol large size
+ 358, 358, // euro symbol tiny
+ SPR_OPENTTD_BASE+11, SPR_OPENTTD_BASE+57, // more icons
648, 648, // nordic char: æ
616, 616, // nordic char: Æ
666, 666, // nordic char: Ø
diff --git a/table/sprites.h b/table/sprites.h
index 183859fab..755b09a02 100644
--- a/table/sprites.h
+++ b/table/sprites.h
@@ -46,7 +46,16 @@ enum Sprites {
SPR_SLOPES_BASE = SPR_CANALS_BASE + 70,
SPR_OPENTTD_BASE = SPR_SLOPES_BASE + 74, //5270
- SPR_BLOT = SPR_OPENTTD_BASE + 10, // used as vehicle profit marker
+ SPR_BLOT = SPR_OPENTTD_BASE + 32, // colored circle (mainly used as vehicle profit marker and for sever compatibility)
+
+ SPR_PIN_UP = SPR_OPENTTD_BASE + 62, // pin icon
+ SPR_PIN_DOWN = SPR_OPENTTD_BASE + 63,
+
+
+ /* Network GUI sprites */
+ SPR_SQUARE = SPR_OPENTTD_BASE + 23, // colored square (used for newgrf compatibility)
+ SPR_LOCK = SPR_OPENTTD_BASE + 22, // lock icon (for password protected servers)
+ SPR_FLAGS_BASE = SPR_OPENTTD_BASE + 90, // start of the flags block (in same order as enum NetworkLanguage)
/* Manager face sprites */
SPR_GRADIENT = 874, // background gradient behind manager face
diff --git a/town_gui.c b/town_gui.c
index c50ba13a8..a5d1c3a8d 100644
--- a/town_gui.c
+++ b/town_gui.c
@@ -135,7 +135,7 @@ static void TownAuthorityWndProc(Window *w, WindowEvent *e)
*/
SetDParam((IS_HUMAN_PLAYER(p->index) ? 4 : 3), str);
if (t->exclusivity == p->index) // red icon for player with exclusive rights
- DrawSprite((SPR_OPENTTD_BASE + 10) | 0x30b8000, 18, y);
+ DrawSprite((SPR_BLOT) | 0x30b8000, 18, y);
DrawString(28, y, STR_2024, 0);
y+=10;
diff --git a/vehicle_gui.c b/vehicle_gui.c
index 048999dd8..9e2edc6cb 100644
--- a/vehicle_gui.c
+++ b/vehicle_gui.c
@@ -52,7 +52,7 @@ void DrawVehicleProfitButton(Vehicle *v, int x, int y)
ormod = 0x30a8000; // yellow
else
ormod = 0x30d8000; // green
- DrawSprite((SPR_OPENTTD_BASE + 10) | ormod, x, y);
+ DrawSprite((SPR_BLOT) | ormod, x, y);
}
/************ Sorter functions *****************/