From 416e2b67b13cd2238599e766ce4e6b65b6121ac8 Mon Sep 17 00:00:00 2001 From: dominik Date: Thu, 9 Dec 2004 23:16:52 +0000 Subject: [PATCH] (svn r999) New icons for the network interface, newgrf gui and the tiny euro --- data/openttd.grf | Bin 16591 -> 23016 bytes network_gui.c | 23 ++++++++++++++++------- settings_gui.c | 2 +- spritecache.c | 9 +++++---- table/sprites.h | 11 ++++++++++- town_gui.c | 2 +- vehicle_gui.c | 2 +- 7 files changed, 34 insertions(+), 15 deletions(-) diff --git a/data/openttd.grf b/data/openttd.grf index afce8d51ee45c750be792d4fc9f921788d76082c..e8c15983cddc3b21f4a76f77dec83fbb08edc3e9 100644 GIT binary patch delta 6587 zcmc(k33yahmdEe8?^UHLsjOrt1X?jHM$mw4(iwFCHZ!&-kC8Nm%vWPmJ&L!aN9^Tza!5O|#4R!|LdjORWC>-rL?APCApGq#sEkW65OlEP076Ae{Ur9go!1l+<)i z(vKWDeE86zL#e_O;PO`vvUHEl5zt_B1-POi)e!&(8fm&509UhA=f)9vT6y3Fnvye!_8=;-F?TOfkRR_^InQl*?!ZYgnUKXr_nre>&f)y46+Fei(1 zo8A6YkFE1}N7LNs)j{r_v@nu|xdu{uIO|?LoUROGDfaPnbqJfvUeHvhb6pTy$nqT3 zbiIwOXYZ9a(oO#C6V{x2g_c`5;lVuq?4xw6nJ4j~eB6O~v|8me_&lDqVJ)tRm+%T+ z$3LQVguD4=eoF+hOmVLmBpzWm#B*YktN7yB)J+mDT9ziW7fmMQFyY_Yw7mJ?RODp;N846Ojx$j-2rC}w_3Q1f61>O45QnuB1m)+iPilfKnxcX#kB1y zVyqBi*(ckm_HLjk7rVuW=Q1EzG>a?CZ^L?VQ^u8?gHSm@jyyDtuIV73mb1@HlnZ69 z;#?6SOV(D<;wZU$UlT2imaeA1LEhTGHJWL5$CW@u+}2L8wDEr2*v0WJ1E(w2C|`c{ z>qYvKWHN@NkvSxXY$6|GAhmcH0}Eg)T!KV8n{K41s72|i3{xg5zbv7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(r%3;vhB{3j%6!cl>Er+7|`#W8JCt)9vYxcOPs4 z{|&#N{|mdsf5$WU7%uoSZs+guMt*e9HGT`6dn2=2hj-q(XgC>9rlGGFlNxfG1jAsM z0dK%w96D(o=_opfu0bf?q}_1pl&QR7!+Z>VfjSv>* zxR0)|u^y`j&^3N+1bf0WkCrNICYxVZK+6crW2&}#wx#g+zpFv0Y z)nN<7=@#k~jrW~Q(r|opa$q~NyhGq|D7aU!fZR@+Nf0~)&p{#Vfr}7JN79$+YI=lz zOB0j{Sk7-!jw^s;h@on#nr;k%4P-e*Cu0bVgwBog1*@YkSTVj}MSFuamzGAcnVK(J z5v|b*_eG0t?7+^moAxXSZ4Fn5FI*7J|G+bs*&whrUbg=pFR+TcMN-~wu(U?Z&lfS| z6jti_!;wu(U3 z?N8m=@)WNQJ!X5LJ64&7xAiFAlfKHXUAv6W?x9L;ZLRmySl=q|V37p{1;N3=csF|> QPMf;1zU%P`y`dt12g!OmO#lD@ delta 113 zcmaE{neluhJu0R&i>7#bMRxSJJJ*KqQ1GB5(w eK;ULJeGX0uhzLj*BLgyfbG$_uCmTqdfdK&8We;lr diff --git a/network_gui.c b/network_gui.c index 5395378c7e..537611c09a 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); + // 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 + } } } diff --git a/settings_gui.c b/settings_gui.c index 117f1eba88..63990ed2c9 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 bcf96b5ce2..a325f0c9b0 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 183859fab8..755b09a029 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 c50ba13a8c..a5d1c3a8d6 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 048999dd82..9e2edc6cbd 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 *****************/