summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--functions.h1
-rw-r--r--lang/american.txt6
-rw-r--r--lang/brazilian_portuguese.txt6
-rw-r--r--lang/catalan.txt6
-rw-r--r--lang/czech.txt6
-rw-r--r--lang/danish.txt6
-rw-r--r--lang/dutch.txt6
-rw-r--r--lang/english.txt9
-rw-r--r--lang/finnish.txt6
-rw-r--r--lang/french.txt6
-rw-r--r--lang/galician.txt6
-rw-r--r--lang/german.txt6
-rw-r--r--lang/hungarian.txt6
-rw-r--r--lang/icelandic.txt6
-rw-r--r--lang/italian.txt6
-rw-r--r--lang/latvian.txt6
-rw-r--r--lang/lithuanian.txt6
-rw-r--r--lang/norwegian.txt6
-rw-r--r--lang/polish.txt6
-rw-r--r--lang/portuguese.txt6
-rw-r--r--lang/romanian.txt6
-rw-r--r--lang/slovak.txt6
-rw-r--r--lang/spanish.txt6
-rw-r--r--lang/swedish.txt6
-rw-r--r--lang/unfinished/estonian.txt6
-rw-r--r--main_gui.c21
-rw-r--r--news_gui.c259
-rw-r--r--settings.c24
-rw-r--r--ttd.c1
-rw-r--r--variables.h3
-rw-r--r--vehicle_gui.c10
31 files changed, 309 insertions, 157 deletions
diff --git a/functions.h b/functions.h
index 74a9c44d1..68d6da547 100644
--- a/functions.h
+++ b/functions.h
@@ -258,6 +258,7 @@ void CheckSwitchToEuro(void);
void LoadFromConfig(void);
void SaveToConfig(void);
+void CheckConfig(void);
int ttd_main(int argc, char* argv[]);
byte GetOSVersion(void);
diff --git a/lang/american.txt b/lang/american.txt
index 3c4a34530..bdd603048 100644
--- a/lang/american.txt
+++ b/lang/american.txt
@@ -719,8 +719,8 @@ STR_02A5_TOWN_SIZE :{YELLOW}Town si
STR_02B6 :{STRING} - {STRING}
STR_02B7_SHOW_LAST_MESSAGE_OR_NEWS :{BLACK}Show last message or news report
-STR_02B8_SUMMARY :{BLACK}Summary
-STR_02B9_FULL :{BLACK}Full
+STR_SUMMARY :Summary
+STR_FULL :Full
STR_02BA :{SILVER}- - {STRING} - -
STR_02BB_TOWN_DIRECTORY :Town directory
STR_02BC_VEHICLE_DESIGN_NAMES :{BLACK}Vehicle design names
@@ -766,8 +766,8 @@ STR_02D8_GIANT_SCREENSHOT_CTRL_G :Giant Screensho
STR_02D9_ABOUT_OPENTTD :About 'OpenTTD'
############ range ends here
-STR_02DA_ON :{BLACK}On
STR_02DB_OFF :{BLACK}Off
+STR_02DA_ON :{BLACK}On
STR_02DC_DISPLAY_SUBSIDIES :{BLACK}Display subsidies
STR_02DD_SUBSIDIES :Subsidies
STR_02DE_MAP_OF_WORLD :Map of world
diff --git a/lang/brazilian_portuguese.txt b/lang/brazilian_portuguese.txt
index 0b06705d4..947a708b0 100644
--- a/lang/brazilian_portuguese.txt
+++ b/lang/brazilian_portuguese.txt
@@ -723,8 +723,8 @@ STR_02A5_TOWN_SIZE :{YELLOW}Tamanho
STR_02B6 :{STRING} - {STRING}
STR_02B7_SHOW_LAST_MESSAGE_OR_NEWS :{BLACK}Mostrar a última mensagem ou notícia
-STR_02B8_SUMMARY :{BLACK}Resumo
-STR_02B9_FULL :{BLACK}Completo
+STR_SUMMARY :Resumo
+STR_FULL :Completo
STR_02BA :{SILVER}- - {STRING} - -
STR_02BB_TOWN_DIRECTORY :Lista de cidades
STR_02BC_VEHICLE_DESIGN_NAMES :{BLACK}Nomes dos veículos
@@ -770,8 +770,8 @@ STR_02D8_GIANT_SCREENSHOT_CTRL_G :Captura gigante
STR_02D9_ABOUT_OPENTTD :Sobre o OpenTTD...
############ range ends here
-STR_02DA_ON :{BLACK}On
STR_02DB_OFF :{BLACK}Off
+STR_02DA_ON :{BLACK}On
STR_02DC_DISPLAY_SUBSIDIES :{BLACK}Mostrar subsídios
STR_02DD_SUBSIDIES :Subsídios
STR_02DE_MAP_OF_WORLD :Mapa do mundo
diff --git a/lang/catalan.txt b/lang/catalan.txt
index 9d30ded31..efeff7e55 100644
--- a/lang/catalan.txt
+++ b/lang/catalan.txt
@@ -723,8 +723,8 @@ STR_02A5_TOWN_SIZE :{YELLOW}Mida de
STR_02B6 :{STRING} - {STRING}
STR_02B7_SHOW_LAST_MESSAGE_OR_NEWS :{BLACK}Mostra el darrer missatge o notícia
-STR_02B8_SUMMARY :{BLACK}Resum
-STR_02B9_FULL :{BLACK}Complet
+STR_SUMMARY :Resum
+STR_FULL :Complet
STR_02BA :{SILVER}- - {STRING} - -
STR_02BB_TOWN_DIRECTORY :Directori de Poblacions
STR_02BC_VEHICLE_DESIGN_NAMES :{BLACK}Noms de dissenys de vehicles
@@ -770,8 +770,8 @@ STR_02D8_GIANT_SCREENSHOT_CTRL_G :Còpia de Pantal
STR_02D9_ABOUT_OPENTTD :Quant a 'OpenTTD'
############ range ends here
-STR_02DA_ON :{BLACK}Actiu
STR_02DB_OFF :{BLACK}Inactiu
+STR_02DA_ON :{BLACK}Actiu
STR_02DC_DISPLAY_SUBSIDIES :{BLACK}Mostrar subvencions
STR_02DD_SUBSIDIES :Subvencions
STR_02DE_MAP_OF_WORLD :Mapa del món
diff --git a/lang/czech.txt b/lang/czech.txt
index 14de55edf..f46734e64 100644
--- a/lang/czech.txt
+++ b/lang/czech.txt
@@ -723,8 +723,8 @@ STR_02A5_TOWN_SIZE :{YELLOW}Velikos
STR_02B6 :{STRING} - {STRING}
STR_02B7_SHOW_LAST_MESSAGE_OR_NEWS :{BLACK}Ukázat poslední zprávu nebo clanek
-STR_02B8_SUMMARY :{BLACK}Shrnutí
-STR_02B9_FULL :{BLACK}Plná
+STR_SUMMARY :Shrnutí
+STR_FULL :Plná
STR_02BA :{SILVER}- - {STRING} - -
STR_02BB_TOWN_DIRECTORY :Seznam mest
STR_02BC_VEHICLE_DESIGN_NAMES :{BLACK}Názvy dopravních prostredku
@@ -770,8 +770,8 @@ STR_02D8_GIANT_SCREENSHOT_CTRL_G :Obrovský screen
STR_02D9_ABOUT_OPENTTD :O 'OpenTTD'
############ range ends here
-STR_02DA_ON :{BLACK}Zapnuto
STR_02DB_OFF :{BLACK}Vypnuto
+STR_02DA_ON :{BLACK}Zapnuto
STR_02DC_DISPLAY_SUBSIDIES :{BLACK}Zobrazit nabidky dotaci
STR_02DD_SUBSIDIES :Dotace
STR_02DE_MAP_OF_WORLD :Mapa sveta
diff --git a/lang/danish.txt b/lang/danish.txt
index c48cbd0dc..cd1146903 100644
--- a/lang/danish.txt
+++ b/lang/danish.txt
@@ -723,8 +723,8 @@ STR_02A5_TOWN_SIZE :{YELLOW}Bystørr
STR_02B6 :{STRING} - {STRING}
STR_02B7_SHOW_LAST_MESSAGE_OR_NEWS :{BLACK}Vis sidste besked eller nyheds rapport
-STR_02B8_SUMMARY :{BLACK}Resume
-STR_02B9_FULL :{BLACK}Fuldt
+STR_SUMMARY :Resume
+STR_FULL :Fuldt
STR_02BA :{SILVER}- - {STRING} - -
STR_02BB_TOWN_DIRECTORY :Byoversigt
STR_02BC_VEHICLE_DESIGN_NAMES :{BLACK}Køretøjsdesignnavne
@@ -770,8 +770,8 @@ STR_02D8_GIANT_SCREENSHOT_CTRL_G :Kæmpe Screensho
STR_02D9_ABOUT_OPENTTD :Om 'OpenTTD'
############ range ends here
-STR_02DA_ON :{BLACK}Til
STR_02DB_OFF :{BLACK}Fra
+STR_02DA_ON :{BLACK}Til
STR_02DC_DISPLAY_SUBSIDIES :{BLACK}Vis specialaftaler
STR_02DD_SUBSIDIES :Specialaftaler
STR_02DE_MAP_OF_WORLD :Kort over verden
diff --git a/lang/dutch.txt b/lang/dutch.txt
index 3d2823e5e..fc03274e4 100644
--- a/lang/dutch.txt
+++ b/lang/dutch.txt
@@ -723,8 +723,8 @@ STR_02A5_TOWN_SIZE :{YELLOW}Stadsgr
STR_02B6 :{STRING} - {STRING}
STR_02B7_SHOW_LAST_MESSAGE_OR_NEWS :{BLACK}Laat laatste (nieuws)bericht zien
-STR_02B8_SUMMARY :{BLACK}Kort
-STR_02B9_FULL :{BLACK}Volledig
+STR_SUMMARY :Kort
+STR_FULL :Volledig
STR_02BA :{SILVER}- - {STRING} - -
STR_02BB_TOWN_DIRECTORY :Stedenlijst
STR_02BC_VEHICLE_DESIGN_NAMES :{BLACK}Voertuignamen
@@ -770,8 +770,8 @@ STR_02D8_GIANT_SCREENSHOT_CTRL_G :Grote Schermpri
STR_02D9_ABOUT_OPENTTD :Over OpenTTD
############ range ends here
-STR_02DA_ON :{BLACK}Aan
STR_02DB_OFF :{BLACK}Uit
+STR_02DA_ON :{BLACK}Aan
STR_02DC_DISPLAY_SUBSIDIES :{BLACK}Toon subsidies
STR_02DD_SUBSIDIES :Subsidies
STR_02DE_MAP_OF_WORLD :Kaart
diff --git a/lang/english.txt b/lang/english.txt
index 280b26dba..32ee022ba 100644
--- a/lang/english.txt
+++ b/lang/english.txt
@@ -565,7 +565,7 @@ STR_020C_NEW_VEHICLES :{YELLOW}New veh
STR_020D_CHANGES_OF_CARGO_ACCEPTANCE :{YELLOW}Changes to cargo acceptance
STR_020E_SUBSIDIES :{YELLOW}Subsidies
STR_020F_GENERAL_INFORMATION :{YELLOW}General information
-STR_MESSAGES_ALL :{YELLOW}Setting for all messagetypes (on/off/summary)
+STR_MESSAGES_ALL :{YELLOW}Setting for all messagetypes (off/summary/full)
STR_MESSAGE_SOUND :{YELLOW}Play sound for summarized newsmessages
STR_0210_TOO_FAR_FROM_PREVIOUS_DESTINATIO :{WHITE}...too far from previous destination
STR_0211_TOP_COMPANIES_WHO_REACHED :{BIGFONT}{BLACK}Top companies who reached {NUMU16}{}({STRING} Level)
@@ -723,8 +723,9 @@ STR_02A5_TOWN_SIZE :{YELLOW}Town si
STR_02B6 :{STRING} - {STRING}
STR_02B7_SHOW_LAST_MESSAGE_OR_NEWS :{BLACK}Show last message or news report
-STR_02B8_SUMMARY :{BLACK}Summary
-STR_02B9_FULL :{BLACK}Full
+STR_OFF :Off
+STR_SUMMARY :Summary
+STR_FULL :Full
STR_02BA :{SILVER}- - {STRING} - -
STR_02BB_TOWN_DIRECTORY :Town directory
STR_02BC_VEHICLE_DESIGN_NAMES :{BLACK}Vehicle design names
@@ -770,8 +771,8 @@ STR_02D8_GIANT_SCREENSHOT_CTRL_G :Giant Screensho
STR_02D9_ABOUT_OPENTTD :About 'OpenTTD'
############ range ends here
-STR_02DA_ON :{BLACK}On
STR_02DB_OFF :{BLACK}Off
+STR_02DA_ON :{BLACK}On
STR_02DC_DISPLAY_SUBSIDIES :{BLACK}Display subsidies
STR_02DD_SUBSIDIES :Subsidies
STR_02DE_MAP_OF_WORLD :Map of world
diff --git a/lang/finnish.txt b/lang/finnish.txt
index dd3650ede..7f7a9fc23 100644
--- a/lang/finnish.txt
+++ b/lang/finnish.txt
@@ -723,8 +723,8 @@ STR_02A5_TOWN_SIZE :{YELLOW}Kaupung
STR_02B6 :{STRING} - {STRING}
STR_02B7_SHOW_LAST_MESSAGE_OR_NEWS :{BLACK}Näytä viimeisin viesti tai uutisraportti
-STR_02B8_SUMMARY :{BLACK}Tiivistetty
-STR_02B9_FULL :{BLACK}Täysi
+STR_SUMMARY :Tiivistetty
+STR_FULL :Täysi
STR_02BA :{SILVER}- - {STRING} - -
STR_02BB_TOWN_DIRECTORY :Kaupunkihakemisto
STR_02BC_VEHICLE_DESIGN_NAMES :{BLACK}Ajoneuvojen mallinimet
@@ -770,8 +770,8 @@ STR_02D8_GIANT_SCREENSHOT_CTRL_G :Valtava kuvanka
STR_02D9_ABOUT_OPENTTD :Tietoja 'OpenTTD:stä'
############ range ends here
-STR_02DA_ON :{BLACK}Päällä
STR_02DB_OFF :{BLACK}Pois
+STR_02DA_ON :{BLACK}Päällä
STR_02DC_DISPLAY_SUBSIDIES :{BLACK}Näytä alennukset
STR_02DD_SUBSIDIES :Alennukset
STR_02DE_MAP_OF_WORLD :Maailmankartta
diff --git a/lang/french.txt b/lang/french.txt
index 6b33c1429..9ad3e283e 100644
--- a/lang/french.txt
+++ b/lang/french.txt
@@ -723,8 +723,8 @@ STR_02A5_TOWN_SIZE :{YELLOW}Taille:
STR_02B6 :{STRING} - {STRING}
STR_02B7_SHOW_LAST_MESSAGE_OR_NEWS :{BLACK}Afficher le dernier message ou bulletin de nouvelles
-STR_02B8_SUMMARY :{BLACK}Sommaire
-STR_02B9_FULL :{BLACK}Complet
+STR_SUMMARY :Sommaire
+STR_FULL :Complet
STR_02BA :{SILVER}- - {STRING} - -
STR_02BB_TOWN_DIRECTORY :Annuaire des villes
STR_02BC_VEHICLE_DESIGN_NAMES :{BLACK}Noms de conception des Véhicules
@@ -770,8 +770,8 @@ STR_02D8_GIANT_SCREENSHOT_CTRL_G :Copie géante d'
STR_02D9_ABOUT_OPENTTD :À Propos de 'OpenTTD'
############ range ends here
-STR_02DA_ON :{BLACK}Activé
STR_02DB_OFF :{BLACK}Désactivé
+STR_02DA_ON :{BLACK}Activé
STR_02DC_DISPLAY_SUBSIDIES :{BLACK}Afficher les subventions
STR_02DD_SUBSIDIES :Subventions
STR_02DE_MAP_OF_WORLD :Carte du monde
diff --git a/lang/galician.txt b/lang/galician.txt
index cb9596ef7..c52dad353 100644
--- a/lang/galician.txt
+++ b/lang/galician.txt
@@ -719,8 +719,8 @@ STR_02A5_TOWN_SIZE :{YELLOW}Tamaño
STR_02B6 :{STRING} - {STRING}
STR_02B7_SHOW_LAST_MESSAGE_OR_NEWS :{BLACK}Amosa-la última mesaxe ou noticia
-STR_02B8_SUMMARY :{BLACK}Sumario
-STR_02B9_FULL :{BLACK}Completo
+STR_SUMMARY :Sumario
+STR_FULL :Completo
STR_02BA :{SILVER}- - {STRING} - -
STR_02BB_TOWN_DIRECTORY :Directorio de cidades
STR_02BC_VEHICLE_DESIGN_NAMES :{BLACK}Nomes dos deseños dos vehículos
@@ -766,8 +766,8 @@ STR_02D8_GIANT_SCREENSHOT_CTRL_G :Capt.Pant. Xiga
STR_02D9_ABOUT_OPENTTD :Acerca de 'OpenTTD'
############ range ends here
-STR_02DA_ON :{BLACK}On
STR_02DB_OFF :{BLACK}Off
+STR_02DA_ON :{BLACK}On
STR_02DC_DISPLAY_SUBSIDIES :{BLACK}Amosa-los subsidios
STR_02DD_SUBSIDIES :Subsidios
STR_02DE_MAP_OF_WORLD :Mapa do Mundo
diff --git a/lang/german.txt b/lang/german.txt
index fca8bb4b1..4e84e976c 100644
--- a/lang/german.txt
+++ b/lang/german.txt
@@ -723,8 +723,8 @@ STR_02A5_TOWN_SIZE :{YELLOW}Stadtgr
STR_02B6 :{STRING} - {STRING}
STR_02B7_SHOW_LAST_MESSAGE_OR_NEWS :{BLACK}Letzte Nachricht oder letzten Bericht anzeigen
-STR_02B8_SUMMARY :{BLACK}Ticker
-STR_02B9_FULL :{BLACK}Zeitung
+STR_SUMMARY :Ticker
+STR_FULL :Zeitung
STR_02BA :{SILVER}- - {STRING} - -
STR_02BB_TOWN_DIRECTORY :Städteverzeichnis
STR_02BC_VEHICLE_DESIGN_NAMES :{BLACK}Fahrzeugnamen
@@ -770,8 +770,8 @@ STR_02D8_GIANT_SCREENSHOT_CTRL_G :Riesiger Screen
STR_02D9_ABOUT_OPENTTD :Über 'OpenTTD'
############ range ends here
-STR_02DA_ON :{BLACK}an
STR_02DB_OFF :{BLACK}aus
+STR_02DA_ON :{BLACK}an
STR_02DC_DISPLAY_SUBSIDIES :{BLACK}Subventionen anzeigen
STR_02DD_SUBSIDIES :Subventionen
STR_02DE_MAP_OF_WORLD :Weltkarte
diff --git a/lang/hungarian.txt b/lang/hungarian.txt
index 4eb48b9dc..6170aecbb 100644
--- a/lang/hungarian.txt
+++ b/lang/hungarian.txt
@@ -723,8 +723,8 @@ STR_02A5_TOWN_SIZE :{YELLOW}A város
STR_02B6 :{STRING} - {STRING}
STR_02B7_SHOW_LAST_MESSAGE_OR_NEWS :{BLACK}Utolsó üzenet vagy újsághír megmutatása
-STR_02B8_SUMMARY :{BLACK}Kivonat
-STR_02B9_FULL :{BLACK}Teljes
+STR_SUMMARY :Kivonat
+STR_FULL :Teljes
STR_02BA :{SILVER}- - {STRING} - -
STR_02BB_TOWN_DIRECTORY :Városlista
STR_02BC_VEHICLE_DESIGN_NAMES :{BLACK}Jármûvek márkanevei
@@ -770,8 +770,8 @@ STR_02D8_GIANT_SCREENSHOT_CTRL_G :Óriás képmentés
STR_02D9_ABOUT_OPENTTD :Az 'OpenTTD'-ról
############ range ends here
-STR_02DA_ON :{BLACK}Be
STR_02DB_OFF :{BLACK}Ki
+STR_02DA_ON :{BLACK}Be
STR_02DC_DISPLAY_SUBSIDIES :{BLACK}Állami támogatások
STR_02DD_SUBSIDIES :Támogatások
STR_02DE_MAP_OF_WORLD :Világtérkép
diff --git a/lang/icelandic.txt b/lang/icelandic.txt
index 62604bf50..79a0a407c 100644
--- a/lang/icelandic.txt
+++ b/lang/icelandic.txt
@@ -723,8 +723,8 @@ STR_02A5_TOWN_SIZE :{YELLOW}Stærð b
STR_02B6 :{STRING} - {STRING}
STR_02B7_SHOW_LAST_MESSAGE_OR_NEWS :{BLACK}Sýna seinustu skilaboð eða fréttatilkynningu
-STR_02B8_SUMMARY :{BLACK}Úrtak
-STR_02B9_FULL :{BLACK}Allt
+STR_SUMMARY :Úrtak
+STR_FULL :Allt
STR_02BA :{SILVER}- - {STRING} - -
STR_02BB_TOWN_DIRECTORY :Bæjarmappa
STR_02BC_VEHICLE_DESIGN_NAMES :{BLACK}Hönnunarnöfn farartækja
@@ -770,8 +770,8 @@ STR_02D8_GIANT_SCREENSHOT_CTRL_G :Risa skjámynd (
STR_02D9_ABOUT_OPENTTD :Um 'OpenTTD'
############ range ends here
-STR_02DA_ON :{BLACK}Á
STR_02DB_OFF :{BLACK}Af
+STR_02DA_ON :{BLACK}Á
STR_02DC_DISPLAY_SUBSIDIES :{BLACK}Sýna samstarfssamninga
STR_02DD_SUBSIDIES :Samstarfssamningar
STR_02DE_MAP_OF_WORLD :Heimskort
diff --git a/lang/italian.txt b/lang/italian.txt
index 7fa0961ba..a53a9749e 100644
--- a/lang/italian.txt
+++ b/lang/italian.txt
@@ -720,8 +720,8 @@ STR_02A5_TOWN_SIZE :{YELLOW}Dimensi
STR_02B6 :{STRING} - {STRING}
STR_02B7_SHOW_LAST_MESSAGE_OR_NEWS :{BLACK}Mostra ultimo messaggio o un report
-STR_02B8_SUMMARY :{BLACK}Sommario
-STR_02B9_FULL :{BLACK}Completo
+STR_SUMMARY :Sommario
+STR_FULL :Completo
STR_02BA :{SILVER}- - {STRING} - -
STR_02BB_TOWN_DIRECTORY :Elenco Città
STR_02BC_VEHICLE_DESIGN_NAMES :{BLACK}Nomi veicoli
@@ -767,8 +767,8 @@ STR_02D8_GIANT_SCREENSHOT_CTRL_G :ScreenShot Giga
STR_02D9_ABOUT_OPENTTD :Info su 'OpenTTD'
############ range ends here
-STR_02DA_ON :{BLACK}On
STR_02DB_OFF :{BLACK}Off
+STR_02DA_ON :{BLACK}On
STR_02DC_DISPLAY_SUBSIDIES :{BLACK}Mostra sussidi
STR_02DD_SUBSIDIES :Sussidi
STR_02DE_MAP_OF_WORLD :Mappa del mondo
diff --git a/lang/latvian.txt b/lang/latvian.txt
index 056196fcc..74e1c6c46 100644
--- a/lang/latvian.txt
+++ b/lang/latvian.txt
@@ -720,8 +720,8 @@ STR_02A5_TOWN_SIZE :{YELLOW}Town si
STR_02B6 :{STRING} - {STRING}
STR_02B7_SHOW_LAST_MESSAGE_OR_NEWS :{BLACK}Show last message or news report
-STR_02B8_SUMMARY :{BLACK}Summary
-STR_02B9_FULL :{BLACK}Full
+STR_SUMMARY :Summary
+STR_FULL :Full
STR_02BA :{SILVER}- - {STRING} - -
STR_02BB_TOWN_DIRECTORY :Town directory
STR_02BC_VEHICLE_DESIGN_NAMES :{BLACK}Vehicle design names
@@ -767,8 +767,8 @@ STR_02D8_GIANT_SCREENSHOT_CTRL_G :Giant Screensho
STR_02D9_ABOUT_OPENTTD :Par 'OpenTTD'
############ range ends here
-STR_02DA_ON :{BLACK}On
STR_02DB_OFF :{BLACK}Off
+STR_02DA_ON :{BLACK}On
STR_02DC_DISPLAY_SUBSIDIES :{BLACK}Display subsidies
STR_02DD_SUBSIDIES :Subsidies
STR_02DE_MAP_OF_WORLD :Pasaules Karte
diff --git a/lang/lithuanian.txt b/lang/lithuanian.txt
index c27c24129..d5a630f43 100644
--- a/lang/lithuanian.txt
+++ b/lang/lithuanian.txt
@@ -722,8 +722,8 @@ STR_02A5_TOWN_SIZE :{YELLOW}Miesto
STR_02B6 :{STRING} - {STRING}
STR_02B7_SHOW_LAST_MESSAGE_OR_NEWS :{BLACK}Parodyti paskutine zinute ar spaudos pranesima
-STR_02B8_SUMMARY :{BLACK}Santrauka
-STR_02B9_FULL :{BLACK}Pilnas
+STR_SUMMARY :Santrauka
+STR_FULL :Pilnas
STR_02BA :{SILVER}- - {STRING} - -
STR_02BB_TOWN_DIRECTORY :Miestu katalogas
STR_02BC_VEHICLE_DESIGN_NAMES :{BLACK}Tr. priemoniu pavadinimai
@@ -769,8 +769,8 @@ STR_02D8_GIANT_SCREENSHOT_CTRL_G :Fotografuoti vi
STR_02D9_ABOUT_OPENTTD :Apie 'OpenTTD'
############ range ends here
-STR_02DA_ON :{BLACK}Ijungta
STR_02DB_OFF :{BLACK}Isjungta
+STR_02DA_ON :{BLACK}Ijungta
STR_02DC_DISPLAY_SUBSIDIES :{BLACK}Rodyti subsidijas
STR_02DD_SUBSIDIES :Subsidijos
STR_02DE_MAP_OF_WORLD :Zemelapis
diff --git a/lang/norwegian.txt b/lang/norwegian.txt
index ba7cf046d..547fb7761 100644
--- a/lang/norwegian.txt
+++ b/lang/norwegian.txt
@@ -723,8 +723,8 @@ STR_02A5_TOWN_SIZE :{YELLOW}Bystørr
STR_02B6 :{STRING} - {STRING}
STR_02B7_SHOW_LAST_MESSAGE_OR_NEWS :{BLACK}Vis siste melding eller nyhetsrapport
-STR_02B8_SUMMARY :{BLACK}Sammendrag
-STR_02B9_FULL :{BLACK}Fullt
+STR_SUMMARY :Sammendrag
+STR_FULL :Fullt
STR_02BA :{SILVER}- - {STRING} - -
STR_02BB_TOWN_DIRECTORY :Byoversikt
STR_02BC_VEHICLE_DESIGN_NAMES :{BLACK}Navn på kjøretøy
@@ -770,8 +770,8 @@ STR_02D8_GIANT_SCREENSHOT_CTRL_G :Stor skjermdump
STR_02D9_ABOUT_OPENTTD :Om 'OpenTTD'
############ range ends here
-STR_02DA_ON :{BLACK}På
STR_02DB_OFF :{BLACK}Av
+STR_02DA_ON :{BLACK}På
STR_02DC_DISPLAY_SUBSIDIES :{BLACK}Vis subsidier
STR_02DD_SUBSIDIES :Subsidier
STR_02DE_MAP_OF_WORLD :Verdenskart
diff --git a/lang/polish.txt b/lang/polish.txt
index c054df9e8..42a9bcb95 100644
--- a/lang/polish.txt
+++ b/lang/polish.txt
@@ -723,8 +723,8 @@ STR_02A5_TOWN_SIZE :{YELLOW}Wielkos
STR_02B6 :{STRING} - {STRING}
STR_02B7_SHOW_LAST_MESSAGE_OR_NEWS :{BLACK}Pokaz ostatnia wiadomosc lub ogloszenie
-STR_02B8_SUMMARY :{BLACK}Sumarycznie
-STR_02B9_FULL :{BLACK}Pelne
+STR_SUMMARY :Sumarycznie
+STR_FULL :Pelne
STR_02BA :{SILVER}- - {STRING} - -
STR_02BB_TOWN_DIRECTORY :Lista miast
STR_02BC_VEHICLE_DESIGN_NAMES :{BLACK}Nazwy pojazdow
@@ -770,8 +770,8 @@ STR_02D8_GIANT_SCREENSHOT_CTRL_G :Gigantyczny zrz
STR_02D9_ABOUT_OPENTTD :Info o 'OpenTTD'
############ range ends here
-STR_02DA_ON :{BLACK}Wla.
STR_02DB_OFF :{BLACK}Wyl.
+STR_02DA_ON :{BLACK}Wla.
STR_02DC_DISPLAY_SUBSIDIES :{BLACK}Wyswietl subsydia
STR_02DD_SUBSIDIES :Subsydia
STR_02DE_MAP_OF_WORLD :Mapa swiata
diff --git a/lang/portuguese.txt b/lang/portuguese.txt
index bd67a4199..81aab92ea 100644
--- a/lang/portuguese.txt
+++ b/lang/portuguese.txt
@@ -720,8 +720,8 @@ STR_02A5_TOWN_SIZE :{YELLOW}Tamanho
STR_02B6 :{STRING} - {STRING}
STR_02B7_SHOW_LAST_MESSAGE_OR_NEWS :{BLACK}Mostrar a última mensagem ou notícia
-STR_02B8_SUMMARY :{BLACK}Resumo
-STR_02B9_FULL :{BLACK}Completo
+STR_SUMMARY :Resumo
+STR_FULL :Completo
STR_02BA :{SILVER}- - {STRING} - -
STR_02BB_TOWN_DIRECTORY :Lista de cidades
STR_02BC_VEHICLE_DESIGN_NAMES :{BLACK}Nomes dos veículos
@@ -767,8 +767,8 @@ STR_02D8_GIANT_SCREENSHOT_CTRL_G :Captura gigante
STR_02D9_ABOUT_OPENTTD :Sobre o OpenTTD...
############ range ends here
-STR_02DA_ON :{BLACK}On
STR_02DB_OFF :{BLACK}Off
+STR_02DA_ON :{BLACK}On
STR_02DC_DISPLAY_SUBSIDIES :{BLACK}Mostrar subsídios
STR_02DD_SUBSIDIES :Subsídios
STR_02DE_MAP_OF_WORLD :Mapa do mundo
diff --git a/lang/romanian.txt b/lang/romanian.txt
index 2aa1d9759..7e6e54504 100644
--- a/lang/romanian.txt
+++ b/lang/romanian.txt
@@ -723,8 +723,8 @@ STR_02A5_TOWN_SIZE :{YELLOW}Mãrime
STR_02B6 :{STRING} - {STRING}
STR_02B7_SHOW_LAST_MESSAGE_OR_NEWS :{BLACK}Re-afiseazã ultimul mesaj
-STR_02B8_SUMMARY :{BLACK}Pe scurt
-STR_02B9_FULL :{BLACK}Pe larg
+STR_SUMMARY :Pe scurt
+STR_FULL :Pe larg
STR_02BA :{SILVER}- - {STRING} - -
STR_02BB_TOWN_DIRECTORY :Lista oraselor (F5)
STR_02BC_VEHICLE_DESIGN_NAMES :{BLACK}Numele vehiculelor si modelelor
@@ -770,8 +770,8 @@ STR_02D8_GIANT_SCREENSHOT_CTRL_G :Screenshot giga
STR_02D9_ABOUT_OPENTTD :Despre 'OpenTTD'
############ range ends here
-STR_02DA_ON :{BLACK}activ
STR_02DB_OFF :{BLACK}inactiv
+STR_02DA_ON :{BLACK}activ
STR_02DC_DISPLAY_SUBSIDIES :{BLACK}Afiseazã subventiile (F6)
STR_02DD_SUBSIDIES :Subventii (F6)
STR_02DE_MAP_OF_WORLD :Harta lumii (F4)
diff --git a/lang/slovak.txt b/lang/slovak.txt
index e82cad96c..bde9a0801 100644
--- a/lang/slovak.txt
+++ b/lang/slovak.txt
@@ -720,8 +720,8 @@ STR_02A5_TOWN_SIZE :{YELLOW}Velkost
STR_02B6 :{STRING} - {STRING}
STR_02B7_SHOW_LAST_MESSAGE_OR_NEWS :{BLACK}Zobraz poslednu spravu alebo novinku
-STR_02B8_SUMMARY :{BLACK}Obsah
-STR_02B9_FULL :{BLACK}Plne
+STR_SUMMARY :Obsah
+STR_FULL :Plne
STR_02BA :{SILVER}- - {STRING} - -
STR_02BB_TOWN_DIRECTORY :Zoznam miest
STR_02BC_VEHICLE_DESIGN_NAMES :{BLACK}Nazvy vozidiel
@@ -767,8 +767,8 @@ STR_02D8_GIANT_SCREENSHOT_CTRL_G :Velky ScreenSho
STR_02D9_ABOUT_OPENTTD :O hre 'OpenTTD'
############ range ends here
-STR_02DA_ON :{BLACK}Zap.
STR_02DB_OFF :{BLACK}Vyp.
+STR_02DA_ON :{BLACK}Zap.
STR_02DC_DISPLAY_SUBSIDIES :{BLACK}Zobrazit Dotacie
STR_02DD_SUBSIDIES :Dotacie
STR_02DE_MAP_OF_WORLD :Mapa sveta
diff --git a/lang/spanish.txt b/lang/spanish.txt
index f17b78243..ff5b18f48 100644
--- a/lang/spanish.txt
+++ b/lang/spanish.txt
@@ -723,8 +723,8 @@ STR_02A5_TOWN_SIZE :{YELLOW}Tamaño
STR_02B6 :{STRING} - {STRING}
STR_02B7_SHOW_LAST_MESSAGE_OR_NEWS :{BLACK}Mostrar último mensaje/noticia
-STR_02B8_SUMMARY :{BLACK}Resumen
-STR_02B9_FULL :{BLACK}Completo
+STR_SUMMARY :Resumen
+STR_FULL :Completo
STR_02BA :{SILVER}- - {STRING} - -
STR_02BB_TOWN_DIRECTORY :Directorio de poblaciones
STR_02BC_VEHICLE_DESIGN_NAMES :{BLACK}Nombres de diseño de vehículos
@@ -770,8 +770,8 @@ STR_02D8_GIANT_SCREENSHOT_CTRL_G :Captura Gigante
STR_02D9_ABOUT_OPENTTD :Acerca de 'OpenTTD'
############ range ends here
-STR_02DA_ON :{BLACK}Encendido
STR_02DB_OFF :{BLACK}Apagado
+STR_02DA_ON :{BLACK}Encendido
STR_02DC_DISPLAY_SUBSIDIES :{BLACK}Mostras subvenciones
STR_02DD_SUBSIDIES :Subvenciones
STR_02DE_MAP_OF_WORLD :Mapa del mundo
diff --git a/lang/swedish.txt b/lang/swedish.txt
index 604147cf8..1ad4720d9 100644
--- a/lang/swedish.txt
+++ b/lang/swedish.txt
@@ -723,8 +723,8 @@ STR_02A5_TOWN_SIZE :{YELLOW}Stadsst
STR_02B6 :{STRING} - {STRING}
STR_02B7_SHOW_LAST_MESSAGE_OR_NEWS :{BLACK}Visa senaste meddelande eller nyhet
-STR_02B8_SUMMARY :{BLACK}Summering
-STR_02B9_FULL :{BLACK}Full
+STR_SUMMARY :Summering
+STR_FULL :Full
STR_02BA :{SILVER}- - {STRING} - -
STR_02BB_TOWN_DIRECTORY :Lista av städer
STR_02BC_VEHICLE_DESIGN_NAMES :{BLACK}Fordonens modellnamn
@@ -770,8 +770,8 @@ STR_02D8_GIANT_SCREENSHOT_CTRL_G :Gigantisk skärm
STR_02D9_ABOUT_OPENTTD :Om 'OpenTTD'
############ range ends here
-STR_02DA_ON :{BLACK}På
STR_02DB_OFF :{BLACK}Av
+STR_02DA_ON :{BLACK}På
STR_02DC_DISPLAY_SUBSIDIES :{BLACK}Visa subventioner
STR_02DD_SUBSIDIES :Subventioner
STR_02DE_MAP_OF_WORLD :Världskarta
diff --git a/lang/unfinished/estonian.txt b/lang/unfinished/estonian.txt
index 659d98428..01f22e6f3 100644
--- a/lang/unfinished/estonian.txt
+++ b/lang/unfinished/estonian.txt
@@ -719,8 +719,8 @@ STR_02A5_TOWN_SIZE :{YELLOW}Linna s
STR_02B6 :{STRING} - {STRING}
STR_02B7_SHOW_LAST_MESSAGE_OR_NEWS :{BLACK}Näitab viimast teadet
-STR_02B8_SUMMARY :{BLACK}Lühike
-STR_02B9_FULL :{BLACK}Täielik
+STR_SUMMARY :Lühike
+STR_FULL :Täielik
STR_02BA :{SILVER}- - {STRING} - -
STR_02BB_TOWN_DIRECTORY :Linnade nimistu
STR_02BC_VEHICLE_DESIGN_NAMES :{BLACK}Sõidukite disaini nimed
@@ -766,8 +766,8 @@ STR_02D8_GIANT_SCREENSHOT_CTRL_G :Suur ekraanitõm
STR_02D9_ABOUT_OPENTTD :'OpenTTD' kohta
############ range ends here
-STR_02DA_ON :{BLACK}Sees
STR_02DB_OFF :{BLACK}Väljas
+STR_02DA_ON :{BLACK}Sees
STR_02DC_DISPLAY_SUBSIDIES :{BLACK}Kuvab subsiidiumite akna
STR_02DD_SUBSIDIES :Subsiidiumid
STR_02DE_MAP_OF_WORLD :Maailmakaart
diff --git a/main_gui.c b/main_gui.c
index 2808a6312..818631556 100644
--- a/main_gui.c
+++ b/main_gui.c
@@ -2238,6 +2238,9 @@ static void StatusBarWndProc(Window *w, WindowEvent *e)
DrawStringCentered(320, 1, STR_02BA, 0);
}
}
+
+ if (WP(w, def_d).data_2 > 0)
+ DrawSprite(SPR_BLOT | PALETTE_TO_RED, 489, 2);
break;
case WE_CLICK:
@@ -2251,10 +2254,20 @@ static void StatusBarWndProc(Window *w, WindowEvent *e)
break;
case WE_TICK: {
- if (_pause || WP(w,def_d).data_1 <= -1280)
- return;
- WP(w,def_d).data_1 -= 2;
- InvalidateWidget(w, 1);
+ if (_pause) return;
+
+ if (WP(w, def_d).data_1 > -1280) { /* Scrolling text */
+ WP(w, def_d).data_1 -= 2;
+ InvalidateWidget(w, 1);
+ }
+
+ if (WP(w, def_d).data_2 > 0) { /* Red blot to show there are new unread newsmessages */
+ WP(w, def_d).data_2 -= 2;
+ } else if (WP(w, def_d).data_2 < 0) {
+ WP(w, def_d).data_2 = 0;
+ InvalidateWidget(w, 1);
+ }
+
break;
}
}
diff --git a/news_gui.c b/news_gui.c
index 889cf15b9..30e383135 100644
--- a/news_gui.c
+++ b/news_gui.c
@@ -1,6 +1,7 @@
#include "stdafx.h"
#include "ttd.h"
#include "strings.h"
+#include "table/sprites.h"
#include "table/strings.h"
#include "window.h"
#include "gui.h"
@@ -340,6 +341,31 @@ static const SoundFx _news_sounds[] = {
0
};
+/** Get the value of an item of the news-display settings. This is
+ * a little tricky since on/off/summary must use 2 bits to store the value
+ * @param item the item whose value is requested
+ * @return return the found value which is between 0-2
+ */
+static inline byte GetNewsDisplayValue(byte item)
+{
+ assert(item < 10 && ((_news_display_opt >> (item * 2)) & 0x3) <= 2);
+ return (_news_display_opt >> (item * 2)) & 0x3;
+}
+
+/** Set the value of an item in the news-display settings. This is
+ * a little tricky since on/off/summary must use 2 bits to store the value
+ * @param item the item whose value is being set
+ * @param val new value
+ */
+static inline void SetNewsDisplayValue(byte item, byte val)
+{
+ assert(item < 10 && val <= 2);
+ item *= 2;
+ CLRBIT(_news_display_opt, item);
+ CLRBIT(_news_display_opt, item + 1);
+ _news_display_opt |= val << item;
+}
+
// open up an own newspaper window for the news item
static void ShowNewspaper(NewsItem *ni)
{
@@ -392,7 +418,8 @@ static void ShowTicker(const NewsItem *ni)
{
Window *w;
- SndPlayFx(SND_16_MORSE);
+ if (_news_ticker_sound) SndPlayFx(SND_16_MORSE);
+
_statusbar_news_item = *ni;
w = FindWindowById(WC_STATUS_BAR, 0);
if (w != NULL)
@@ -448,11 +475,24 @@ static void MoveToNexItem(void)
if ( ni->isValid != NULL && !ni->isValid(ni->data_a, ni->data_b) )
return;
- // show newspaper or send to ticker?
- if (!HASBIT(_news_display_opt, ni->type) && !(ni->flags & NF_FORCE_BIG))
- ShowTicker(ni);
- else
- ShowNewspaper(ni);
+ switch (GetNewsDisplayValue(ni->type)) {
+ case 0: { /* Off - show nothing only a small reminder in the status bar */
+ Window *w = FindWindowById(WC_STATUS_BAR, 0);
+ if (w != NULL) {
+ WP(w, def_d).data_2 = 91;
+ SetWindowDirty(w);
+ }
+ } break;
+ case 1: /* Summary - show ticker, but if forced big, cascade to full */
+ if (!(ni->flags & NF_FORCE_BIG)) {
+ ShowTicker(ni);
+ break;
+ }
+ /* Fallthrough */
+ case 2: /* Full - show newspaper*/
+ ShowNewspaper(ni);
+ break;
+ }
}
}
@@ -664,92 +704,173 @@ void ShowMessageHistory(void)
}
}
+/** Setup the disabled/enabled buttons in the message window
+ * If the value is 'off' disable the [<] widget, and enable the [>] one
+ * Same-wise for all the others. Starting value of 3 is the first widget
+ * group. These are grouped as [<][>] .. [<][>], etc.
+ */
+static void SetMessageButtonStates(Window *w, byte value, int element)
+{
+ element *= 2;
+ switch (value) {
+ case 0: /* Off */
+ SETBIT(w->disabled_state, element + 3);
+ CLRBIT(w->disabled_state, element + 3 + 1);
+ break;
+ case 1: /* Summary */
+ CLRBIT(w->disabled_state, element + 3);
+ CLRBIT(w->disabled_state, element + 3 + 1);
+ break;
+ case 2: /* Full */
+ SETBIT(w->disabled_state, element + 3 + 1);
+ CLRBIT(w->disabled_state, element + 3);
+ break;
+ default: NOT_REACHED();
+ }
+}
static void MessageOptionsWndProc(Window *w, WindowEvent *e)
{
+ static const StringID message_opt[] = {STR_OFF, STR_SUMMARY, STR_FULL, INVALID_STRING_ID};
+ static const uint32 message_val[] = {0x0, 0x55555555, 0xAAAAAAAA}; // 0x555.. = 01010101010101010101 (all summary), 286.. 1010... (full)
+ static const uint32 message_dis[] = {
+ (1 << 3) | (1 << 5) | (1 << 7) | (1 << 9) | (1 << 11) | (1 << 13) | (1 << 15) | (1 << 17) | (1 << 19) | (1 << 21),
+ 0,
+ (1 << 4) | (1 << 6) | (1 << 8) | (1 << 10) | (1 << 12) | (1 << 14) | (1 << 16) | (1 << 18) | (1 << 20) | (1 << 22),
+ };
+
+ /* WP(w, def_d).data_1 are stores the clicked state of the fake widgets
+ * WP(w, def_d).data_2 stores state of the ALL on/off/summary button */
switch (e->event) {
+ case WE_CREATE: {
+ uint32 val = _news_display_opt;
+ int i;
+ WP(w, def_d).data_1 = WP(w, def_d).data_2 = 0;
+
+ // Set up the initial disabled buttons in the case of 'off' or 'full'
+ for (i = 0; i != 10; i++, val >>= 2) SetMessageButtonStates(w, val & 0x3, i);
+ } break;
+
case WE_PAINT: {
- uint16 x = _news_display_opt;
- uint32 cs = 0;
+ uint32 val = _news_display_opt;
+ int click_state = WP(w, def_d).data_1;
int i, y;
- for (i = 3; i != 23; i += 2) {
- cs |= 1 << (i + (x & 1));
- x >>= 1;
- }
- cs |= (w->click_state >> 23) << 23;
-
- w->click_state = cs;
+ if (_news_ticker_sound) SETBIT(w->click_state, 25);
DrawWindowWidgets(w);
-
DrawStringCentered(185, 15, STR_0205_MESSAGE_TYPES, 0);
- y = 27;
- for (i = STR_0206_ARRIVAL_OF_FIRST_VEHICLE; i <= STR_020F_GENERAL_INFORMATION; i++) {
- DrawString(124, y, i, 0);
- y += 12;
+ /* XXX - Draw the fake widgets-buttons. Can't add these to the widget-desc since
+ * openttd currently can only handle 32 widgets. So hack it *g* */
+ for (i = 0, y = 26; i != 10; i++, y += 12, click_state >>= 1, val >>= 2) {
+ bool clicked = !!(click_state & 1);
+
+ DrawFrameRect(13, y, 89, 11 + y, 3, (clicked) ? 0x20 : 0);
+ DrawStringCentered(((13 + 89 + 1) >> 1) + clicked, ((y + 11 + y + 1) >> 1) - 5 + clicked, message_opt[val & 0x3], 0x10);
+ DrawString(103, y + 1, i + STR_0206_ARRIVAL_OF_FIRST_VEHICLE, 0);
}
- break;
- }
+ DrawString( 8, y + 9, message_opt[WP(w, def_d).data_2], 0x10);
+ DrawString(103, y + 9, STR_MESSAGES_ALL, 0);
+ DrawString(103, y + 9 + 12, STR_MESSAGE_SOUND, 0);
- case WE_CLICK: {
- int wid;
- if ((uint)(wid = e->click.widget - 3) < 20) {
- if (!(wid & 1))
- _news_display_opt &= ~(1 << (wid / 2));
- else
- _news_display_opt |= (1 << (wid / 2));
- SetWindowDirty(w);
- // XXX: write settings
- }
- if (e->click.widget == 23) {
- _news_display_opt = 0;
- HandleButtonClick(w, 23);
- SetWindowDirty(w);
- }
- if (e->click.widget == 24) {
- _news_display_opt = ~0;
- HandleButtonClick(w, 24);
- SetWindowDirty(w);
- }
} break;
+
+ case WE_CLICK:
+ switch (e->click.widget) {
+ case 2: /* Clicked on any of the fake widgets */
+ if (e->click.pt.x > 13 && e->click.pt.x < 89 && e->click.pt.y > 26 && e->click.pt.y < 146) {
+ int element = (e->click.pt.y - 26) / 12;
+ byte val = (GetNewsDisplayValue(element) + 1) % 3;
+
+ SetMessageButtonStates(w, val, element);
+ SetNewsDisplayValue(element, val);
+
+ WP(w, def_d).data_1 |= (1 << element);
+ w->flags4 |= 5 << WF_TIMEOUT_SHL; // XXX - setup unclick (fake widget)
+ SetWindowDirty(w);
+ }
+ break;
+ case 23: case 24: /* Dropdown menu for all settings */
+ ShowDropDownMenu(w, message_opt, WP(w, def_d).data_2, 24, 0, 0);
+ break;
+ case 25: /* Change ticker sound on/off */
+ _news_ticker_sound ^= 1;
+ TOGGLEBIT(w->click_state, e->click.widget);
+ InvalidateWidget(w, e->click.widget);
+ break;
+ default: { /* Clicked on the [<] .. [>] widgets */
+ int wid = e->click.widget;
+ if (wid > 2 && wid < 23) {
+ int element = (wid - 3) / 2;
+ byte val = (GetNewsDisplayValue(element) + ((wid & 1) ? -1 : 1)) % 3;
+
+ SetMessageButtonStates(w, val, element);
+ SetNewsDisplayValue(element, val);
+ SetWindowDirty(w);
+ }
+ } break;
+ } break;
+
+ case WE_DROPDOWN_SELECT: /* Select all settings for newsmessages */
+ WP(w, def_d).data_2 = e->dropdown.index;
+ _news_display_opt = message_val[WP(w, def_d).data_2];
+ w->disabled_state = message_dis[WP(w, def_d).data_2];
+ SetWindowDirty(w);
+ break;
+
+ case WE_TIMEOUT: /* XXX - Hack to animate 'fake' buttons */
+ WP(w, def_d).data_1 = 0;
+ SetWindowDirty(w);
+ break;
+
}
}
static const Widget _message_options_widgets[] = {
-{ WWT_CLOSEBOX, RESIZE_NONE, 13, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW},
-{ WWT_CAPTION, RESIZE_NONE, 13, 11, 369, 0, 13, STR_0204_MESSAGE_OPTIONS,STR_018C_WINDOW_TITLE_DRAG_THIS},
-{ WWT_PANEL, RESIZE_NONE, 13, 0, 369, 14, 172, 0x0, STR_NULL},
-{ WWT_CLOSEBOX, RESIZE_NONE, 3, 2, 61, 26, 37, STR_02B8_SUMMARY, STR_NULL},
-{ WWT_CLOSEBOX, RESIZE_NONE, 3, 62, 121, 26, 37, STR_02B9_FULL, STR_NULL},
-{ WWT_CLOSEBOX, RESIZE_NONE, 3, 2, 61, 38, 49, STR_02B8_SUMMARY, STR_NULL},
-{ WWT_CLOSEBOX, RESIZE_NONE, 3, 62, 121, 38, 49, STR_02B9_FULL, STR_NULL},
-{ WWT_CLOSEBOX, RESIZE_NONE, 3, 2, 61, 50, 61, STR_02B8_SUMMARY, STR_NULL},
-{ WWT_CLOSEBOX, RESIZE_NONE, 3, 62, 121, 50, 61, STR_02B9_FULL, STR_NULL},
-{ WWT_CLOSEBOX, RESIZE_NONE, 3, 2, 61, 62, 73, STR_02B8_SUMMARY, STR_NULL},
-{ WWT_CLOSEBOX, RESIZE_NONE, 3, 62, 121, 62, 73, STR_02B9_FULL, STR_NULL},
-{ WWT_CLOSEBOX, RESIZE_NONE, 3, 2, 61, 74, 85, STR_02B8_SUMMARY, STR_NULL},
-{ WWT_CLOSEBOX, RESIZE_NONE, 3, 62, 121, 74, 85, STR_02B9_FULL, STR_NULL},
-{ WWT_CLOSEBOX, RESIZE_NONE, 3, 2, 61, 86, 97, STR_02B8_SUMMARY, STR_NULL},
-{ WWT_CLOSEBOX, RESIZE_NONE, 3, 62, 121, 86, 97, STR_02B9_FULL, STR_NULL},
-{ WWT_CLOSEBOX, RESIZE_NONE, 3, 2, 61, 98, 109, STR_02B8_SUMMARY, STR_NULL},
-{ WWT_CLOSEBOX, RESIZE_NONE, 3, 62, 121, 98, 109, STR_02B9_FULL, STR_NULL},
-{ WWT_CLOSEBOX, RESIZE_NONE, 3, 2, 61, 110, 121, STR_02B8_SUMMARY, STR_NULL},
-{ WWT_CLOSEBOX, RESIZE_NONE, 3, 62, 121, 110, 121, STR_02B9_FULL, STR_NULL},
-{ WWT_CLOSEBOX, RESIZE_NONE, 3, 2, 61, 122, 133, STR_02B8_SUMMARY, STR_NULL},
-{ WWT_CLOSEBOX, RESIZE_NONE, 3, 62, 121, 122, 133, STR_02B9_FULL, STR_NULL},
-{ WWT_CLOSEBOX, RESIZE_NONE, 3, 2, 61, 134, 145, STR_02B8_SUMMARY, STR_NULL},
-{ WWT_CLOSEBOX, RESIZE_NONE, 3, 62, 121, 134, 145, STR_02B9_FULL, STR_NULL},
-
-{ WWT_PUSHTXTBTN, RESIZE_NONE, 3, 15, 170, 154, 165, STR_MESSAGES_DISABLE_ALL,STR_NULL },
-{ WWT_PUSHTXTBTN, RESIZE_NONE, 3, 200, 355, 154, 165, STR_MESSAGES_ENABLE_ALL, STR_NULL },
+{ WWT_CLOSEBOX, RESIZE_NONE, 13, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW},
+{ WWT_CAPTION, RESIZE_NONE, 13, 11, 409, 0, 13, STR_0204_MESSAGE_OPTIONS, STR_018C_WINDOW_TITLE_DRAG_THIS},
+{ WWT_PANEL, RESIZE_NONE, 13, 0, 409, 14, 184, STR_NULL, STR_NULL},
+
+{ WWT_PUSHIMGBTN, RESIZE_NONE, 3, 4, 12, 26, 37, SPR_ARROW_LEFT, STR_HSCROLL_BAR_SCROLLS_LIST},
+{ WWT_PUSHIMGBTN, RESIZE_NONE, 3, 90, 98, 26, 37, SPR_ARROW_RIGHT, STR_HSCROLL_BAR_SCROLLS_LIST},
+
+{ WWT_PUSHIMGBTN, RESIZE_NONE, 3, 4, 12, 38, 49, SPR_ARROW_LEFT, STR_HSCROLL_BAR_SCROLLS_LIST},
+{ WWT_PUSHIMGBTN, RESIZE_NONE, 3, 90, 98, 38, 49, SPR_ARROW_RIGHT, STR_HSCROLL_BAR_SCROLLS_LIST},
+
+{ WWT_PUSHIMGBTN, RESIZE_NONE, 3, 4, 12, 50, 61, SPR_ARROW_LEFT, STR_HSCROLL_BAR_SCROLLS_LIST},
+{ WWT_PUSHIMGBTN, RESIZE_NONE, 3, 90, 98, 50, 61, SPR_ARROW_RIGHT, STR_HSCROLL_BAR_SCROLLS_LIST},
+
+{ WWT_PUSHIMGBTN, RESIZE_NONE, 3, 4, 12, 62, 73, SPR_ARROW_LEFT, STR_HSCROLL_BAR_SCROLLS_LIST},
+{ WWT_PUSHIMGBTN, RESIZE_NONE, 3, 90, 98, 62, 73, SPR_ARROW_RIGHT, STR_HSCROLL_BAR_SCROLLS_LIST},
+
+{ WWT_PUSHIMGBTN, RESIZE_NONE, 3, 4, 12, 74, 85, SPR_ARROW_LEFT, STR_HSCROLL_BAR_SCROLLS_LIST},
+{ WWT_PUSHIMGBTN, RESIZE_NONE, 3, 90, 98, 74, 85, SPR_ARROW_RIGHT, STR_HSCROLL_BAR_SCROLLS_LIST},
+
+{ WWT_PUSHIMGBTN, RESIZE_NONE, 3, 4, 12, 86, 97, SPR_ARROW_LEFT, STR_HSCROLL_BAR_SCROLLS_LIST},
+{ WWT_PUSHIMGBTN, RESIZE_NONE, 3, 90, 98, 86, 97, SPR_ARROW_RIGHT, STR_HSCROLL_BAR_SCROLLS_LIST},
+
+{ WWT_PUSHIMGBTN, RESIZE_NONE, 3, 4, 12, 98, 109, SPR_ARROW_LEFT, STR_HSCROLL_BAR_SCROLLS_LIST},
+{ WWT_PUSHIMGBTN, RESIZE_NONE, 3, 90, 98, 98, 109, SPR_ARROW_RIGHT, STR_HSCROLL_BAR_SCROLLS_LIST},
+
+{ WWT_PUSHIMGBTN, RESIZE_NONE, 3, 4, 12, 110, 121, SPR_ARROW_LEFT, STR_HSCROLL_BAR_SCROLLS_LIST},
+{ WWT_PUSHIMGBTN, RESIZE_NONE, 3, 90, 98, 110, 121, SPR_ARROW_RIGHT, STR_HSCROLL_BAR_SCROLLS_LIST},
+
+{ WWT_PUSHIMGBTN, RESIZE_NONE, 3, 4, 12, 122, 133, SPR_ARROW_LEFT, STR_HSCROLL_BAR_SCROLLS_LIST},
+{ WWT_PUSHIMGBTN, RESIZE_NONE, 3, 90, 98, 122, 133, SPR_ARROW_RIGHT, STR_HSCROLL_BAR_SCROLLS_LIST},
+
+{ WWT_PUSHIMGBTN, RESIZE_NONE, 3, 4, 12, 134, 145, SPR_ARROW_LEFT, STR_HSCROLL_BAR_SCROLLS_LIST},
+{ WWT_PUSHIMGBTN, RESIZE_NONE, 3, 90, 98, 134, 145, SPR_ARROW_RIGHT, STR_HSCROLL_BAR_SCROLLS_LIST},
+
+{ WWT_PANEL, RESIZE_NONE, 3, 4, 86, 154, 165, STR_NULL, STR_NULL},
+{ WWT_CLOSEBOX, RESIZE_NONE, 3, 87, 98, 154, 165, STR_0225, STR_NULL},
+{ WWT_4, RESIZE_NONE, 3, 4, 98, 166, 177, STR_02DB_OFF, STR_NULL},
{ WIDGETS_END},
};
static const WindowDesc _message_options_desc = {
- 270, 22, 370, 173,
+ 270, 22, 410, 185,
WC_GAME_OPTIONS, 0,
WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_UNCLICK_BUTTONS,
_message_options_widgets,
diff --git a/settings.c b/settings.c
index a29efea56..02085cb96 100644
--- a/settings.c
+++ b/settings.c
@@ -485,12 +485,12 @@ static void make_manyofmany(char *buf, const char *many, uint32 x)
static const void *string_to_val(const SettingDesc *desc, const char *str)
{
- unsigned long val;
+ uint32 val;
char *end;
switch(desc->flags & 0xF) {
case SDT_INTX:
- val = strtol(str, &end, 0);
+ val = strtoul(str, &end, 0);
if (*end != 0) ShowInfoF("ini: trailing characters at end of setting '%s'", desc->name);
return (void*)val;
case SDT_ONEOFMANY: {
@@ -599,7 +599,7 @@ static void save_setting_desc(IniFile *ini, const SettingDesc *desc, const void
IniItem *item;
const void *p;
void *ptr;
- int i = 0;
+ uint32 i = 0;
char buf[512]; // setting buffer
const char *s;
@@ -679,7 +679,7 @@ static void save_setting_desc(IniFile *ini, const SettingDesc *desc, const void
}
switch(desc->flags & 0xF) {
case SDT_INTX:
- sprintf(buf, "%d", i);
+ sprintf(buf, "%u", i);
break;
case SDT_ONEOFMANY:
make_oneofmany(buf, (const char*)desc->b, i);
@@ -742,7 +742,8 @@ static const SettingDesc win32_settings[] = {
static const SettingDesc misc_settings[] = {
{"display_opt", SDT_MANYOFMANY | SDT_UINT8, (void*)(DO_SHOW_TOWN_NAMES|DO_SHOW_STATION_NAMES|DO_SHOW_SIGNS|DO_FULL_ANIMATION|DO_FULL_DETAIL|DO_TRANS_BUILDINGS|DO_WAYPOINTS), &_display_opt, "SHOW_TOWN_NAMES|SHOW_STATION_NAMES|SHOW_SIGNS|FULL_ANIMATION|TRANS_BUILDINGS|FULL_DETAIL|WAYPOINTS"},
- {"news_display_opt", SDT_UINT16, (void*)-1, &_news_display_opt, NULL},
+ {"news_display_opt", SDT_UINT32, "0xAAAAAAAA", &_news_display_opt, NULL}, // default to all full messages: 10101010101010101010 = 0xAAAAAAAA
+ {"news_ticker_sound", SDT_BOOL, (void*)true, &_news_ticker_sound, NULL},
{"fullscreen", SDT_BOOL, (void*)false, &_fullscreen, NULL},
{"videodriver", SDT_STRINGBUF | (lengthof(_ini_videodriver)<<16) | SDT_NOSAVE,NULL, _ini_videodriver, NULL},
{"musicdriver", SDT_STRINGBUF | (lengthof(_ini_musicdriver)<<16) | SDT_NOSAVE,NULL, _ini_musicdriver, NULL},
@@ -1051,3 +1052,16 @@ void SaveToConfig(void)
ini_save(_config_file, ini);
ini_free(ini);
}
+
+void CheckConfig(void)
+{
+ // fix up news_display_opt from old to new
+ int i;
+ uint32 tmp;
+ for (i = 0, tmp = _news_display_opt; i != 10; i++, tmp >>= 1) {
+ if ((tmp & 0x3) == 0x3) { // old settings
+ _news_display_opt = 0xAAAAAAAA; // set all news-messages to full 1010101010...
+ break;
+ }
+ }
+}
diff --git a/ttd.c b/ttd.c
index 430b20e6f..825f52ea6 100644
--- a/ttd.c
+++ b/ttd.c
@@ -601,6 +601,7 @@ int ttd_main(int argc, char* argv[])
#endif
LoadFromConfig();
+ CheckConfig();
LoadFromHighScore();
// override config?
diff --git a/variables.h b/variables.h
index c1f977ec1..32432f28d 100644
--- a/variables.h
+++ b/variables.h
@@ -269,7 +269,8 @@ VARDEF byte _local_player;
VARDEF byte _display_opt;
VARDEF byte _pause;
VARDEF int _caret_timer;
-VARDEF uint16 _news_display_opt;
+VARDEF uint32 _news_display_opt;
+VARDEF bool _news_ticker_sound;
VARDEF byte _game_mode;
VARDEF StringID _error_message;
diff --git a/vehicle_gui.c b/vehicle_gui.c
index 1163dca90..5832498e8 100644
--- a/vehicle_gui.c
+++ b/vehicle_gui.c
@@ -155,14 +155,14 @@ void DrawVehicleProfitButton(Vehicle *v, int x, int y)
// draw profit-based colored icons
if(v->age <= 365 * 2)
- ormod = 0x3158000; // grey
+ ormod = PALETTE_TO_GREY;
else if(v->profit_last_year < 0)
- ormod = 0x30b8000; //red
+ ormod = PALETTE_TO_RED;
else if(v->profit_last_year < 10000)
- ormod = 0x30a8000; // yellow
+ ormod = PALETTE_TO_YELLOW;
else
- ormod = 0x30d8000; // green
- DrawSprite((SPR_BLOT) | ormod, x, y);
+ ormod = PALETTE_TO_GREEN;
+ DrawSprite(SPR_BLOT | ormod, x, y);
}
/************ Sorter functions *****************/