(svn r999) New icons for the network interface, newgrf gui and the tiny euro
authordominik
Thu, 09 Dec 2004 23:16:52 +0000
changeset 579 08ce4c50bd32
parent 578 86e352980acd
child 580 be080525ea08
(svn r999) New icons for the network interface, newgrf gui and the tiny euro
data/openttd.grf
network_gui.c
settings_gui.c
spritecache.c
table/sprites.h
town_gui.c
vehicle_gui.c
Binary file data/openttd.grf has changed
--- a/network_gui.c	Thu Dec 09 21:46:56 2004 +0000
+++ b/network_gui.c	Thu Dec 09 23:16:52 2004 +0000
@@ -122,14 +122,23 @@
 				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);
+				// only draw icons if the server is online
+				if(cur_item->online) {
 
-				cur_item = cur_item->next;
-				y += NET_PRC__SIZE_OF_ROW;
-				if (++n == w->vscroll.cap) { break;} // max number of games in the window
+					// 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
+				}
 			}
 		}
 
--- a/settings_gui.c	Thu Dec 09 21:46:56 2004 +0000
+++ b/settings_gui.c	Thu Dec 09 23:16:52 2004 +0000
@@ -1035,7 +1035,7 @@
 				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;
 			}
 
--- a/spritecache.c	Thu Dec 09 21:46:56 2004 +0000
+++ b/spritecache.c	Thu Dec 09 23:16:52 2004 +0000
@@ -748,12 +748,13 @@
 	"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: Ø
--- a/table/sprites.h	Thu Dec 09 21:46:56 2004 +0000
+++ b/table/sprites.h	Thu Dec 09 23:16:52 2004 +0000
@@ -46,7 +46,16 @@
 	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
--- a/town_gui.c	Thu Dec 09 21:46:56 2004 +0000
+++ b/town_gui.c	Thu Dec 09 23:16:52 2004 +0000
@@ -135,7 +135,7 @@
 						*/
 					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;
--- a/vehicle_gui.c	Thu Dec 09 21:46:56 2004 +0000
+++ b/vehicle_gui.c	Thu Dec 09 23:16:52 2004 +0000
@@ -52,7 +52,7 @@
 		ormod = 0x30a8000; // yellow
 	else
 		ormod = 0x30d8000; // green
-	DrawSprite((SPR_OPENTTD_BASE + 10) | ormod, x, y);
+	DrawSprite((SPR_BLOT) | ormod, x, y);
 }
 
 /************ Sorter functions *****************/