mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-08-31 18:39:10 +00:00
Compare commits
13 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
9df8a3bd4c | ||
|
4f757bb914 | ||
|
aafb49b3c4 | ||
|
4bbc264c72 | ||
|
f042798507 | ||
|
909edb84af | ||
|
906a606418 | ||
|
2c6a0e46a9 | ||
|
236237740a | ||
|
3a195edcad | ||
|
c50cf74889 | ||
|
4b6d1f9027 | ||
|
c9c087e858 |
2
Makefile
2
Makefile
@@ -268,7 +268,7 @@ ENDIAN_CHECK=endian_check$(EXE)
|
||||
STRGEN=strgen/strgen$(EXE)
|
||||
OSXAPP="OpenTTD.app"
|
||||
|
||||
REV := 0.5.1
|
||||
REV := 0.5.2
|
||||
|
||||
# define flag to use for -lrt (some OSes overwrites this later for compatibility)
|
||||
ifndef LRT
|
||||
|
@@ -261,7 +261,7 @@ static const AirportMovingData _airport_moving_data_intercontinental[77] = {
|
||||
{ 136, 96, AMED_HELI_LOWER, 0 }, // 56 Land in front of hangar2
|
||||
{ 126, 104, 0, 3 }, // 57 Outway 2
|
||||
{ 136, 136, 0, 1 }, // 58 Airport OUTWAY 2
|
||||
{ 136, 152, AMED_EXACTPOS, 5 }, // 59 Accelerate to end of runway2
|
||||
{ 136, 152, AMED_EXACTPOS, 1 }, // 59 Accelerate to end of runway2
|
||||
{ 16, 152, AMED_NOSPDCLAMP, 0 }, // 60 Release control of runway2, for smoother movement
|
||||
{ 20, 152, AMED_NOSPDCLAMP, 0 }, // 61 End of runway2
|
||||
{ -56, 152, AMED_NOSPDCLAMP | AMED_TAKEOFF, 0 }, // 62 Take off2
|
||||
|
@@ -1,7 +1,38 @@
|
||||
0.5.2 (2007-05-29)
|
||||
------------------------------------------------------------------------
|
||||
- Feature: Add threading support for MorphOS (r9759)
|
||||
- Fix: Bridges and tunnels were not always removed on bankruptcy, thus leaving tunnels/bridges with an invalid owner that would crash the game when clicking with the query tool on them (r9966)
|
||||
- Fix: Null pointer dereference under MorphOS and AmigaOS (r9861)
|
||||
|
||||
|
||||
0.5.2-RC1 (2007-05-16)
|
||||
------------------------------------------------------------------------
|
||||
- Feature: Windows 95/98/ME check in Windows 2000/XP/2003/Vista builds (r9834)
|
||||
- Feature: Add password protected status to 'players' (network server) console command (r9771)
|
||||
- Feature: Add server_lang in [network] section of openttd.cfg (r9716)
|
||||
- Fix: Loading some TTDP savegames caused an instant assertion on loading (r9857)
|
||||
- Fix: [NewGRF] Catch occurance of division-by-zero in varaction handling (r9837)
|
||||
- Fix: Only non dedicated servers cannot have 0 players [FS#765] (r9785)
|
||||
- Fix: Remove arbitrary limit on length of NewGRF strings (r9775)
|
||||
- Fix: [NewGRF] Ignore axis-bit of station tile layouts [FS#756] (r9758)
|
||||
- Fix: [win32] Dead key and open/close console. (r9728)
|
||||
- Fix: When you have closed the "Load game"/"New game" windows which you started from the "start server" menu, you shouldn't start a server when starting a new game [SF#1244842] (r9757)
|
||||
- Fix: Trains were lost after autorenewal/autoreplace [FS#732] (r9753)
|
||||
- Fix: Stop flooded towns from building roads on water [FS#598] (r9743)
|
||||
- Fix: Station signs were not resized when the language changed [FS#672] (r9741)
|
||||
- Fix: In news history, newlines were not replaced with spaces [FS#677] (r9731)
|
||||
- Fix: Crash when destroying bridge with train partially on it [FS#738] (r9726)
|
||||
- Fix: Planes made a 270 degree turn instead of a 90 degree turn on the southern runway of the intercontinental airport [FS#743] (r9725)
|
||||
- Fix: In-game private messages did not work for clients with high ClientIDs (r9719)
|
||||
- Fix: Do not allow building of rail vehicles whose railtype is not available (r9718)
|
||||
- Fix: [YAPF] The guessed path was ignored for ships [FS#736] (r9694)
|
||||
|
||||
|
||||
0.5.1 (2007-04-20)
|
||||
------------------------------------------------------------------------
|
||||
(None)
|
||||
|
||||
|
||||
0.5.1-RC3 (2007-04-17)
|
||||
------------------------------------------------------------------------
|
||||
- Feature: Add list_patches to console commands; shows all patches and values (r9565)
|
||||
|
@@ -335,7 +335,7 @@ int32 DoCommand(TileIndex tile, uint32 p1, uint32 p2, uint32 flags, uint procc)
|
||||
CommandProc *proc;
|
||||
|
||||
/* Do not even think about executing out-of-bounds tile-commands */
|
||||
if (tile >= MapSize()) {
|
||||
if (tile >= MapSize() || IsTileType(tile, MP_VOID)) {
|
||||
_cmd_text = NULL;
|
||||
return CMD_ERROR;
|
||||
}
|
||||
@@ -413,7 +413,7 @@ bool DoCommandP(TileIndex tile, uint32 p1, uint32 p2, CommandCallback *callback,
|
||||
int y = TileY(tile) * TILE_SIZE;
|
||||
|
||||
/* Do not even think about executing out-of-bounds tile-commands */
|
||||
if (tile >= MapSize()) {
|
||||
if (tile >= MapSize() || IsTileType(tile, MP_VOID)) {
|
||||
_cmd_text = NULL;
|
||||
return false;
|
||||
}
|
||||
|
@@ -1216,16 +1216,20 @@ DEF_CONSOLE_CMD(ConPlayers)
|
||||
|
||||
FOR_ALL_PLAYERS(p) {
|
||||
char buffer[512];
|
||||
const NetworkPlayerInfo *npi;
|
||||
|
||||
if (!p->is_active) continue;
|
||||
|
||||
npi = &_network_player_info[p->index];
|
||||
|
||||
GetString(buffer, STR_00D1_DARK_BLUE + _player_colors[p->index], lastof(buffer));
|
||||
IConsolePrintF(8, "#:%d(%s) Company Name: '%s' Year Founded: %d Money: %d Loan: %d Value: %" OTTD_PRINTF64 "d (T:%d, R:%d, P:%d, S:%d)",
|
||||
p->index + 1, buffer, _network_player_info[p->index].company_name, p->inaugurated_year, p->player_money, p->current_loan, CalculateCompanyValue(p),
|
||||
/* trains */ _network_player_info[p->index].num_vehicle[0],
|
||||
/* lorry + bus */ _network_player_info[p->index].num_vehicle[1] + _network_player_info[p->index].num_vehicle[2],
|
||||
/* planes */ _network_player_info[p->index].num_vehicle[3],
|
||||
/* ships */ _network_player_info[p->index].num_vehicle[4]);
|
||||
IConsolePrintF(8, "#:%d(%s) Company Name: '%s' Year Founded: %d Money: %d Loan: %d Value: %" OTTD_PRINTF64 "d (T:%d, R:%d, P:%d, S:%d) %sprotected",
|
||||
p->index + 1, buffer, npi->company_name, p->inaugurated_year, p->player_money, p->current_loan, CalculateCompanyValue(p),
|
||||
/* trains */ npi->num_vehicle[0],
|
||||
/* lorry + bus */ npi->num_vehicle[1] + npi->num_vehicle[2],
|
||||
/* planes */ npi->num_vehicle[3],
|
||||
/* ships */ npi->num_vehicle[4],
|
||||
/* protected */ npi->password[0] == '\0' ? "un" : "");
|
||||
}
|
||||
|
||||
return true;
|
||||
|
@@ -1,6 +1,6 @@
|
||||
.\" Hey, EMACS: -*- nroff -*-
|
||||
.\" Please adjust this date whenever revising the manpage.
|
||||
.Dd April 20, 2007
|
||||
.Dd May 29, 2007
|
||||
.Dt OPENTTD 6
|
||||
.Sh NAME
|
||||
.Nm openttd
|
||||
|
6
engine.c
6
engine.c
@@ -414,6 +414,12 @@ bool IsEngineBuildable(EngineID engine, byte type, PlayerID player)
|
||||
// check if it's available
|
||||
if (!HASBIT(e->player_avail, player)) return false;
|
||||
|
||||
if (type == VEH_Train) {
|
||||
/* Check if the rail type is available to this player */
|
||||
const Player *p = GetPlayer(player);
|
||||
if (!HASBIT(p->avail_railtypes, EngInfo(engine)->railtype)) return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@@ -64,6 +64,10 @@ static void SelectGameWndProc(Window *w, WindowEvent *e)
|
||||
break;
|
||||
|
||||
case WE_CLICK:
|
||||
/* Do not create a network server when you (just) have closed one of the game
|
||||
* creation/load windows for the network server. */
|
||||
if (2 <= e->we.click.widget && e->we.click.widget <= 6) _is_network_server = false;
|
||||
|
||||
switch (e->we.click.widget) {
|
||||
case 2: ShowGenerateLandscape(); break;
|
||||
case 3: ShowSaveLoadDialog(SLD_LOAD_GAME); break;
|
||||
|
@@ -15,16 +15,13 @@ or http://bugs.openttd.org.
|
||||
If the bug report is closed, it has been fixed, which then can be verified
|
||||
in the latest SVN version.
|
||||
|
||||
Bugs for 0.5.1
|
||||
Bugs for 0.5.2
|
||||
------------------------------------------------------------------------
|
||||
URL: http://bugs.openttd.org
|
||||
|
||||
-735 Plural rule not expanded correctly when non-numeric placeholder uses
|
||||
-732 Trains are lost after autorenewal/autoreplace
|
||||
-716 Train Crash in Depot
|
||||
-677 Badspacing in news summaries
|
||||
-674 Map signs allow less nonenglish characters than english ones
|
||||
-672 Non-transparent station names' backgrounds do not resize properly upon language change
|
||||
-669 Docks/Airports/RV Stations can be built without available vehicles
|
||||
-646 AI builds useless stations
|
||||
-601 Airports can't get flooded when they have planes in them
|
||||
@@ -37,7 +34,7 @@ URL: http://bugs.openttd.org
|
||||
-540 Planes vanished when offered exclusive
|
||||
-539 Trains can cash the same cargo multiple times
|
||||
-524 OSX sometimes (not always) fails to find free disk space
|
||||
-522 overflow on vehicle costs
|
||||
-522 Overflow on vehicle costs
|
||||
-508 Destroying trees and replanting => raised rating
|
||||
-502 OSX can incorrectly print "dbg: [sl] Cannot open savegame 'data/opntitle.dat' for saving/loading."
|
||||
-501 Mouse pointer gets hidden, when draging out of window and back again. Only affects Wacom etc.
|
||||
@@ -53,7 +50,7 @@ URL: http://bugs.openttd.org
|
||||
-355 graphics bugs with trains - water, tunnels
|
||||
-354 Maglev Trains faster than All Planes
|
||||
-339 Crash in Quicktime when exiting game
|
||||
-299 disable 90 deg turns patch - AI builds 90 deg turns
|
||||
-299 Disable 90 deg turns patch - AI builds 90 deg turns
|
||||
-290 NPF - no path to depot from tunnel
|
||||
-282 AI Players do not clear loans as soon as they could
|
||||
-274 Autoclean ignores any share holdings
|
||||
@@ -62,11 +59,11 @@ URL: http://bugs.openttd.org
|
||||
-216 AI build train vans one van less
|
||||
-202 2 Locomotives in 1 Train - Selling one results in Age of the other one Being 0
|
||||
-193 Inconsistent directory usage on Mac OS X
|
||||
-165 vehicle length not taken into account
|
||||
-165 Vehicle length not taken into account
|
||||
-153 Language crash with app renaming OSX
|
||||
-119 Clipping problems with vehicles on slopes
|
||||
- 89 Able to build railways/stations before engines become available
|
||||
- 65 short wagons bug
|
||||
- 65 Short wagons bug
|
||||
- 51 Windows doesn't support CUSTOM_LANG_DIR
|
||||
- 47 Low rating calculation and cargo loading priority
|
||||
|
||||
@@ -78,30 +75,25 @@ URL: http://sourceforge.net/tracker/?atid=636365&group_id=103924&func=browse
|
||||
-1459262 Towns building too many roads way too long now
|
||||
-1458995 Another bug with smooth_economy
|
||||
-1393415 NPF & one-way sigs
|
||||
-1244842 Multiplayer interface bug (0.4.0.1)
|
||||
-1212267 station visited twice when servicing
|
||||
-1212267 Station visited twice when servicing
|
||||
-1208170 Duplicate station names can be created
|
||||
-1116638 "More, but smaller changes" deficiency
|
||||
-1106356 re-offered prototypes
|
||||
-1106356 Re-offered prototypes
|
||||
|
||||
Minor Bugs for 0.5.1
|
||||
------------------------------------------------------------------------
|
||||
URL: http://sourceforge.net/tracker/?atid=669662&group_id=103924&func=browse
|
||||
|
||||
-1461629 [r4180]Subsidy calculated wrong
|
||||
-1412031 fast forward scrolling is also fast forward :)
|
||||
-1387424 overtake insolvent company is to cheap
|
||||
-1412031 Fast forward scrolling is also fast forward :)
|
||||
-1382782 Loan interest calculated 'wrong'
|
||||
-1201284 permanent hilight in a depot
|
||||
-1201284 Permanent hilight in a depot
|
||||
-1185852 Scrollbars get arbitrarily small
|
||||
-1160732 little bug with transparency
|
||||
-1117731 Editor-StartingDate
|
||||
-1108046 game freezes
|
||||
-1160732 Little bug with transparency
|
||||
-1108046 Game freezes
|
||||
-1102174 Bug if 3 people buy 25% shares in one company
|
||||
-1084620 Minor bug considering buses/trucks
|
||||
-1034310 color mauve in diagrams
|
||||
-1034310 Color mauve in diagrams
|
||||
-1030661 It's possible to build a tunnel under oil wells
|
||||
- 987891 Large UFO destruction bug
|
||||
- 987883 Aircraft landing/taking off
|
||||
- 987880 company league table updating
|
||||
- 985924 aircraft taxi speed
|
||||
- 987880 Company league table updating
|
||||
- 985924 Aircraft taxi speed
|
||||
|
@@ -3058,7 +3058,7 @@ STR_PURCHASE_INFO_ALL_BUT :Alles behalve {
|
||||
|
||||
########### String for New Landscape Generator
|
||||
|
||||
STR_GENERATE :{WHITE}Creeër
|
||||
STR_GENERATE :{WHITE}Maak aan
|
||||
STR_RANDOM :{BLACK}Willekeurig maken
|
||||
STR_RANDOM_HELP :{BLACK}Wijzig het willekeurige getal voor terrein creatie
|
||||
STR_WORLD_GENERATION_CAPTION :{WHITE}Wereld maken
|
||||
@@ -3101,7 +3101,7 @@ STR_DIFFICULTY_TO_CUSTOM :{WHITE}Deze akt
|
||||
STR_SE_FLAT_WORLD :{WHITE}Vlak land
|
||||
STR_SE_FLAT_WORLD_TIP :{BLACK}Genereer een platte kaart
|
||||
STR_SE_RANDOM_LAND :{WHITE}Willekeurig land
|
||||
STR_SE_NEW_WORLD :{BLACK}Creeër nieuw scenario
|
||||
STR_SE_NEW_WORLD :{BLACK}Maak nieuw scenario aan
|
||||
STR_SE_CAPTION :{WHITE}Scenario type
|
||||
STR_FLAT_WORLD_HEIGHT_DOWN :{BLACK}Maak de hoogte van plat land een lager
|
||||
STR_FLAT_WORLD_HEIGHT_UP :{BLACK}Maak de hoogte van plat land een hoger
|
||||
|
@@ -2490,7 +2490,7 @@ STR_80A4_GOSS_COPPER_ORE_TRUCK :Goss vasemaagiv
|
||||
STR_80A5_UHL_WATER_TANKER :Uhl veeveok
|
||||
STR_80A6_BALOGH_WATER_TANKER :Balogh veeveok
|
||||
STR_80A7_MPS_WATER_TANKER :MPS veeveok
|
||||
STR_80A8_BALOGH_FRUIT_TRUCK :Balogh veeveok
|
||||
STR_80A8_BALOGH_FRUIT_TRUCK :Balogh puuviljaveok
|
||||
STR_80A9_UHL_FRUIT_TRUCK :Uhl puuviljaveok
|
||||
STR_80AA_KELLING_FRUIT_TRUCK :Kelling puuviljaveok
|
||||
STR_80AB_BALOGH_RUBBER_TRUCK :Balogh kummiveok
|
||||
|
@@ -1370,7 +1370,7 @@ STR_NETWORK_LANG_GERMAN :Tedesco
|
||||
STR_NETWORK_LANG_FRENCH :Francese
|
||||
############ End of leave-in-this-order
|
||||
|
||||
STR_NETWORK_GAME_LOBBY :{WHITE}Stanza principale partite multigiocatore
|
||||
STR_NETWORK_GAME_LOBBY :{WHITE}Stanza principale partita multigiocatore
|
||||
|
||||
STR_NETWORK_PREPARE_TO_JOIN :{BLACK}Preparazione all'ingresso in: {ORANGE}{STRING}
|
||||
STR_NETWORK_COMPANY_LIST_TIP :{BLACK}Elenco di tutte le compagnie attualmente nella partita. È possibile unirsi ad una di esse o fondarne una nuova se è disponibile un posto
|
||||
@@ -2032,25 +2032,9 @@ STR_681D_MEDIUM :Media
|
||||
STR_681E_FAST :Veloce
|
||||
STR_681F_VERY_FAST :Molto veloce
|
||||
STR_VERY_LOW :Molto basso
|
||||
STR_VERY_LOW.ms :Molto basso
|
||||
STR_VERY_LOW.mp :Molto bassi
|
||||
STR_VERY_LOW.fp :Molto basse
|
||||
STR_VERY_LOW.fs :Molto bassa
|
||||
STR_6820_LOW :Basso
|
||||
STR_6820_LOW.ms :Basso
|
||||
STR_6820_LOW.mp :Bassi
|
||||
STR_6820_LOW.fs :Bassa
|
||||
STR_6820_LOW.fp :Basse
|
||||
STR_6821_MEDIUM :Medio
|
||||
STR_6821_MEDIUM.ms :Medio
|
||||
STR_6821_MEDIUM.mp :Medi
|
||||
STR_6821_MEDIUM.fs :Media
|
||||
STR_6821_MEDIUM.fp :Medie
|
||||
STR_6822_HIGH :Alto
|
||||
STR_6822_HIGH.ms :Alto
|
||||
STR_6822_HIGH.mp :Alti
|
||||
STR_6822_HIGH.fs :Alta
|
||||
STR_6822_HIGH.fp :Alte
|
||||
STR_6823_NONE :Nessuno
|
||||
STR_6824_REDUCED :Ridotti
|
||||
STR_6825_NORMAL :Normali
|
||||
@@ -2162,7 +2146,7 @@ STR_7053_COMPANY_LEAGUE_TABLE :{WHITE}Classifi
|
||||
STR_7054 :{WHITE}{STRING}{SETX 45}{ORANGE}{COMPANY} {BLACK}{PLAYERNAME} '{STRING}'
|
||||
STR_7055 :{YELLOW}{STRING}{SETX 45}{ORANGE}{COMPANY} {BLACK}{PLAYERNAME} '{STRING}'
|
||||
STR_7056_TRANSPORT_COMPANY_IN_TROUBLE :{BLACK}{BIGFONT}Compagnia di trasporti in difficolta!
|
||||
STR_7057_WILL_BE_SOLD_OFF_OR_DECLARED :{BLACK}{BIGFONT}La {COMPANY} verrà venduta o dichiarerà bancarotta a meno che le prestazioni non miglioreranno presto!
|
||||
STR_7057_WILL_BE_SOLD_OFF_OR_DECLARED :{BLACK}{BIGFONT}La {COMPANY} verrà venduta o dichiarerà bancarotta a meno che le prestazioni non migliorino presto!
|
||||
STR_7058_PRESIDENT :{BLACK}{PLAYERNAME}{}(Presidente)
|
||||
STR_7059_TRANSPORT_COMPANY_MERGER :{BLACK}{BIGFONT}Fusione tra compagnie di trasporti!
|
||||
STR_705A_HAS_BEEN_SOLD_TO_FOR :{BLACK}{BIGFONT}La {COMPANY} è stata venduta alla {COMPANY} per {CURRENCY}!
|
||||
|
@@ -1448,7 +1448,7 @@ STR_NETWORK_ERR_CLIENT_NOT_AUTHORIZED :ikkje autoriser
|
||||
STR_NETWORK_ERR_CLIENT_NOT_EXPECTED :mottok merkeleg pakke
|
||||
STR_NETWORK_ERR_CLIENT_WRONG_REVISION :feil versjon
|
||||
STR_NETWORK_ERR_CLIENT_NAME_IN_USE :namnet er brukt av nokon andre
|
||||
STR_NETWORK_ERR_CLIENT_WRONG_PASSWORD :feil passord til spelet
|
||||
STR_NETWORK_ERR_CLIENT_WRONG_PASSWORD :feil passord for til spelet
|
||||
STR_NETWORK_ERR_CLIENT_PLAYER_MISMATCH :feil spelar-id i DoCommand
|
||||
STR_NETWORK_ERR_CLIENT_KICKED :sparka ut av tenaren
|
||||
STR_NETWORK_ERR_CLIENT_CHEATER :freista å jukse
|
||||
@@ -2770,7 +2770,7 @@ STR_9840_NEW_CAPACITY_COST_OF_REFIT :{BLACK}Ny kapas
|
||||
STR_9841_CAN_T_REFIT_SHIP :{WHITE}Kan ikkje bygge om skip...
|
||||
STR_9842_REFITTABLE :(ombyggbart)
|
||||
STR_GO_TO_SHIP_DEPOT :Seil til {TOWN} skipsdepot
|
||||
SERVICE_AT_SHIP_DEPOT :Vedlikehald ved {TOWN} skipsdepot
|
||||
SERVICE_AT_SHIP_DEPOT :Vedlikehald ved {TOWN} Skipsdepot
|
||||
|
||||
##id 0xA000
|
||||
STR_A000_AIRPORTS :{WHITE}Flyplassar
|
||||
|
@@ -385,7 +385,7 @@ STR_SORT_BY_VALUE :Valor
|
||||
STR_SORT_BY_FACILITY :Tipo de Estação
|
||||
STR_SORT_BY_WAITING :Valor da carga em espera
|
||||
STR_SORT_BY_RATING_MAX :Avaliação de carga
|
||||
STR_ENGINE_SORT_ENGINE_ID :Ordenação clássica
|
||||
STR_ENGINE_SORT_ENGINE_ID :EngineID (ordernação clássica)
|
||||
STR_ENGINE_SORT_COST :Custo
|
||||
STR_ENGINE_SORT_POWER :Potência
|
||||
STR_ENGINE_SORT_INTRO_DATE :Data de Introdução
|
||||
@@ -1048,7 +1048,7 @@ STR_CONFIG_PATCHES_FREIGHT_TRAINS :{LTBLUE}Multipl
|
||||
|
||||
STR_CONFIG_PATCHES_SMALL_AIRPORTS :{LTBLUE}Permitir sempre aeroportos pequenos: {ORANGE}{STRING}
|
||||
|
||||
STR_CONFIG_PATCHES_WARN_LOST_TRAIN :{LTBLUE}Avisar quando comboios andam perdidos: {ORANGE}{STRING}
|
||||
STR_CONFIG_PATCHES_WARN_LOST_TRAIN :{LTBLUE}Alertar em caso de perda do combóio: {ORANGE}{STRING}
|
||||
STR_CONFIG_PATCHES_ORDER_REVIEW :{LTBLUE}Analisar ordens dos veículos: {ORANGE}{STRING}
|
||||
STR_CONFIG_PATCHES_ORDER_REVIEW_OFF :Não
|
||||
STR_CONFIG_PATCHES_ORDER_REVIEW_EXDEPOT :Sim, mas excluir veículos parados
|
||||
@@ -1085,7 +1085,7 @@ STR_CONFIG_PATCHES_STATION_SPREAD :{LTBLUE}Tamanho
|
||||
STR_CONFIG_PATCHES_SERVICEATHELIPAD :{LTBLUE}Manutenção automática de helicópteros em heliportos: {ORANGE}{STRING}
|
||||
STR_CONFIG_PATCHES_LINK_TERRAFORM_TOOLBAR :{LTBLUE}Ligar ferramentas de paisagem com as de construção: {ORANGE}{STRING}
|
||||
STR_CONFIG_PATCHES_REVERSE_SCROLLING :{LTBLUE}Ao deslizar com o rato, mover a vista na direcção oposta: {ORANGE}{STRING}
|
||||
STR_CONFIG_PATCHES_MEASURE_TOOLTIP :{LTBLUE}Mostrar medidas ao usar ferramentas de construção: {ORANGE}{STRING}
|
||||
STR_CONFIG_PATCHES_MEASURE_TOOLTIP :{LTBLUE}Mostrar uma dica de medição ao utilizar várias ferramentas de construção: {ORANGE}{STRING}
|
||||
STR_CONFIG_PATCHES_LIVERIES :{LTBLUE}Mostrar estampagens da companhia: {ORANGE}{STRING}
|
||||
STR_CONFIG_PATCHES_LIVERIES_NONE :Nenhum
|
||||
STR_CONFIG_PATCHES_LIVERIES_OWN :Própria companhia
|
||||
@@ -2549,9 +2549,9 @@ STR_8825_NON_STOP :{BLACK}Sem para
|
||||
STR_8826_GO_TO :{BLACK}Ir Para
|
||||
STR_8827_FULL_LOAD :{BLACK}Carga
|
||||
STR_8828_UNLOAD :{BLACK}Descarga
|
||||
STR_REFIT :{BLACK}Reconverter
|
||||
STR_REFIT_TIP :{BLACK}Escolha o tipo de carga para reconverter nesta ordem. Control click para remover a instrução de reconversão
|
||||
STR_REFIT_ORDER :(Reconverter para {STRING})
|
||||
STR_REFIT :{BLACK}Converter
|
||||
STR_REFIT_TIP :{BLACK}Seleccionar o tipo de carga a converter nesta ordem. Pressionar Ctrl e botão-esquerdo do rato para remover instrução de conversão
|
||||
STR_REFIT_ORDER :(Converter para {STRING})
|
||||
STR_8829_ORDERS :{WHITE}{VEHICLE} (Ordens)
|
||||
STR_882A_END_OF_ORDERS :{SETX 10}- - Fim de Ordens - -
|
||||
STR_FULLLOAD_OR_SERVICE :{SKIP}{SKIP}{STRING}
|
||||
|
730
lang/russian.txt
730
lang/russian.txt
File diff suppressed because it is too large
Load Diff
@@ -601,36 +601,36 @@ STR_01D2_JAZZ_JUKEBOX :{WHITE}Jukebox
|
||||
STR_01D3_SOUND_MUSIC :Zvuk/Hudba
|
||||
STR_01D4_SHOW_SOUND_MUSIC_WINDOW :{BLACK}Zobraz okno zvuku a hudby
|
||||
STR_01D5_ALL :{TINYFONT}Všetko
|
||||
STR_01D6_OLD_STYLE :{TINYFONT}Stary styl
|
||||
STR_01D7_NEW_STYLE :{TINYFONT}Novy styl
|
||||
STR_01D6_OLD_STYLE :{TINYFONT}Starý štýl
|
||||
STR_01D7_NEW_STYLE :{TINYFONT}Nový štýl
|
||||
STR_01D8_EZY_STREET :{TINYFONT}Ezy Street
|
||||
STR_01D9_CUSTOM_1 :{TINYFONT}Vlastne 1
|
||||
STR_01DA_CUSTOM_2 :{TINYFONT}Vlastne 2
|
||||
STR_01D9_CUSTOM_1 :{TINYFONT}Vlastné 1
|
||||
STR_01DA_CUSTOM_2 :{TINYFONT}Vlastné 2
|
||||
STR_01DB_MUSIC_VOLUME :{BLACK}{TINYFONT}Hlasitost hudby
|
||||
STR_01DC_EFFECTS_VOLUME :{BLACK}{TINYFONT}Hlasitost zvuk. efektov
|
||||
STR_01DD_MIN_MAX :{BLACK}{TINYFONT}MIN ' ' ' ' ' ' MAX
|
||||
STR_01DE_SKIP_TO_PREVIOUS_TRACK :{BLACK}Predchadzajuca stopa
|
||||
STR_01DF_SKIP_TO_NEXT_TRACK_IN_SELECTION :{BLACK}Nasledujuca stopa
|
||||
STR_01E0_STOP_PLAYING_MUSIC :{BLACK}Zastavit prehravanie hudby
|
||||
STR_01E1_START_PLAYING_MUSIC :{BLACK}Spustit prehravanie hudby
|
||||
STR_01E2_DRAG_SLIDERS_TO_SET_MUSIC :{BLACK}Tahat posuvace pre zmenu hlasitosti
|
||||
STR_01DE_SKIP_TO_PREVIOUS_TRACK :{BLACK}Predchádzajúca stopa
|
||||
STR_01DF_SKIP_TO_NEXT_TRACK_IN_SELECTION :{BLACK}Nasledujúca stopa
|
||||
STR_01E0_STOP_PLAYING_MUSIC :{BLACK}Zastavit prehrávanie hudby
|
||||
STR_01E1_START_PLAYING_MUSIC :{BLACK}Spustit prehrávanie hudby
|
||||
STR_01E2_DRAG_SLIDERS_TO_SET_MUSIC :{BLACK}Tahat posúvace pre zmenu hlasitosti
|
||||
STR_01E3 :{DKGREEN}{TINYFONT}--
|
||||
STR_01E4_0 :{DKGREEN}{TINYFONT}0{COMMA}
|
||||
STR_01E5 :{DKGREEN}{TINYFONT}{COMMA}
|
||||
STR_01E6 :{DKGREEN}{TINYFONT}------
|
||||
STR_01E7 :{DKGREEN}{TINYFONT}"{STRING}"
|
||||
STR_01E8_TRACK_XTITLE :{BLACK}{TINYFONT}Stopa{SETX 88}Title
|
||||
STR_01E9_SHUFFLE :{TINYFONT}Nahodne
|
||||
STR_01E9_SHUFFLE :{TINYFONT}Náhodne
|
||||
STR_01EA_PROGRAM :{TINYFONT}{BLACK}Program
|
||||
STR_01EB_MUSIC_PROGRAM_SELECTION :{WHITE}Vyber hudobneho programu
|
||||
STR_01EB_MUSIC_PROGRAM_SELECTION :{WHITE}Výber hudobného programu
|
||||
STR_01EC_0 :{TINYFONT}{LTBLUE}0{COMMA} "{STRING}"
|
||||
STR_01ED :{TINYFONT}{LTBLUE}{COMMA} "{STRING}"
|
||||
STR_01EE_TRACK_INDEX :{TINYFONT}{BLACK}Cislo stopy
|
||||
STR_01EE_TRACK_INDEX :{TINYFONT}{BLACK}Císlo stopy
|
||||
STR_01EF_PROGRAM :{TINYFONT}{BLACK}Program - '{STRING}'
|
||||
STR_01F0_CLEAR :{TINYFONT}{BLACK}Zmazat
|
||||
STR_01F1_SAVE :{TINYFONT}{BLACK}Ulozit
|
||||
STR_01F2_CURRENT_PROGRAM_OF_MUSIC :{BLACK}Aktualny program
|
||||
STR_01F3_SELECT_ALL_TRACKS_PROGRAM :{BLACK}Vybrat 'Vsetko'
|
||||
STR_01F1_SAVE :{TINYFONT}{BLACK}Uložit
|
||||
STR_01F2_CURRENT_PROGRAM_OF_MUSIC :{BLACK}Aktuálny program
|
||||
STR_01F3_SELECT_ALL_TRACKS_PROGRAM :{BLACK}Vybrat 'Všetko'
|
||||
STR_01F4_SELECT_OLD_STYLE_MUSIC :{BLACK}Vybrat 'Stary styl'
|
||||
STR_01F5_SELECT_NEW_STYLE_MUSIC :{BLACK}Vybrat 'Novy styl'
|
||||
STR_01F6_SELECT_CUSTOM_1_USER_DEFINED :{BLACK}Vybrat 'Vlastny 1' (uzivatelom definovany) program
|
||||
|
@@ -25,7 +25,7 @@ STR_0011_MAIL :郵件
|
||||
STR_0012_OIL :石油
|
||||
STR_0013_LIVESTOCK :牲畜
|
||||
STR_0014_GOODS :商品
|
||||
STR_0015_GRAIN :穀粒
|
||||
STR_0015_GRAIN :穀物
|
||||
STR_0016_WOOD :木材
|
||||
STR_0017_IRON_ORE :鐵礦石
|
||||
STR_0018_STEEL :鋼鐵
|
||||
@@ -57,7 +57,7 @@ STR_0031_MAIL :郵件
|
||||
STR_0032_OIL :石油
|
||||
STR_0033_LIVESTOCK :牲畜
|
||||
STR_0034_GOODS :商品
|
||||
STR_0035_GRAIN :穀粒
|
||||
STR_0035_GRAIN :穀物
|
||||
STR_0036_WOOD :木材
|
||||
STR_0037_IRON_ORE :鐵礦石
|
||||
STR_0038_STEEL :鋼鐵
|
||||
@@ -89,7 +89,7 @@ STR_QUANTITY_MAIL :{COMMA}包郵
|
||||
STR_QUANTITY_OIL :{VOLUME}石油
|
||||
STR_QUANTITY_LIVESTOCK :{COMMA}頭牲畜
|
||||
STR_QUANTITY_GOODS :{COMMA}箱商品
|
||||
STR_QUANTITY_GRAIN :{WEIGHT}小麥
|
||||
STR_QUANTITY_GRAIN :{WEIGHT}穀物
|
||||
STR_QUANTITY_WOOD :{WEIGHT}木材
|
||||
STR_QUANTITY_IRON_ORE :{WEIGHT}鐵礦
|
||||
STR_QUANTITY_STEEL :{WEIGHT}鋼鐵
|
||||
@@ -101,7 +101,7 @@ STR_QUANTITY_DIAMONDS :{COMMA}包鑽
|
||||
STR_QUANTITY_FOOD :{WEIGHT}食物
|
||||
STR_QUANTITY_PAPER :{WEIGHT}紙張
|
||||
STR_QUANTITY_GOLD :{COMMA}包黃金
|
||||
STR_QUANTITY_WATER :{VOLUME}食水
|
||||
STR_QUANTITY_WATER :{VOLUME}淡水
|
||||
STR_QUANTITY_WHEAT :{WEIGHT}小麥
|
||||
STR_QUANTITY_RUBBER :{VOLUME}橡膠
|
||||
STR_QUANTITY_SUGAR :{WEIGHT}砂糖
|
||||
@@ -420,8 +420,8 @@ STR_0168_JUL :7
|
||||
STR_0169_AUG :8
|
||||
STR_016A_SEP :9
|
||||
STR_016B_OCT :10
|
||||
STR_016C_NOV :十一月
|
||||
STR_016D_DEC :十二月
|
||||
STR_016C_NOV :11
|
||||
STR_016D_DEC :12
|
||||
############ range for months ends
|
||||
|
||||
STR_016E :{TINYFONT}{STRING}{} {STRING}
|
||||
@@ -1711,7 +1711,7 @@ STR_2810_CACTUS_PLANTS :仙人掌
|
||||
|
||||
##id 0x3000
|
||||
STR_3000_RAIL_STATION_SELECTION :{WHITE}選擇鐵道車站
|
||||
STR_3001_AIRPORT_SELECTION :{WHITE}選擇飛機場
|
||||
STR_3001_AIRPORT_SELECTION :{WHITE}選擇機場
|
||||
STR_3002_ORIENTATION :{BLACK}方向
|
||||
STR_3003_NUMBER_OF_TRACKS :{BLACK}軌數
|
||||
STR_3004_PLATFORM_LENGTH :{BLACK}月台長度
|
||||
@@ -1725,7 +1725,7 @@ STR_3009_TOO_CLOSE_TO_ANOTHER_STATION :{WHITE}太靠
|
||||
STR_300A_0 :{WHITE}{STATION} {STATIONFEATURES}
|
||||
STR_300B_MUST_DEMOLISH_RAILROAD :{WHITE}必須先摧毀鐵道車站
|
||||
STR_300D_TOO_CLOSE_TO_ANOTHER_AIRPORT :{WHITE}太靠近另一個飛機場
|
||||
STR_300E_MUST_DEMOLISH_AIRPORT_FIRST :{WHITE}必須先摧毀飛機場
|
||||
STR_300E_MUST_DEMOLISH_AIRPORT_FIRST :{WHITE}必須先剷除機場
|
||||
|
||||
STR_3030_RENAME_STATION_LOADING :修改車站/載貨區名稱
|
||||
STR_3031_CAN_T_RENAME_STATION :{WHITE}不能修改車站名稱...
|
||||
@@ -1774,7 +1774,7 @@ STR_305C_0 :{STATION} {STAT
|
||||
STR_STATION_SIGN_TINY :{TINYFONT}{STATION}
|
||||
STR_305E_RAILROAD_STATION :鐵道車站
|
||||
STR_305F_AIRCRAFT_HANGAR :飛機棚
|
||||
STR_3060_AIRPORT :飛機場
|
||||
STR_3060_AIRPORT :機場
|
||||
STR_3061_TRUCK_LOADING_AREA :貨運場
|
||||
STR_3062_BUS_STATION :公車站
|
||||
STR_3063_SHIP_DOCK :船塢
|
||||
@@ -2523,7 +2523,7 @@ STR_8812_EMPTY :{LTBLUE}空
|
||||
STR_8813_FROM :{LTBLUE}{CARGO} 來自 {STATION}
|
||||
STR_FROM_MULT :{LTBLUE}{CARGO} 來自 {STATION} (x{NUM})
|
||||
STR_8814_TRAIN_IS_WAITING_IN_DEPOT :{WHITE}列車 {COMMA} 已在機廠待命
|
||||
STR_8815_NEW_VEHICLES :{BLACK}新造車輛
|
||||
STR_8815_NEW_VEHICLES :{BLACK}購買新車輛
|
||||
STR_8816 :{BLACK}-
|
||||
STR_8819_TRAIN_TOO_LONG :{WHITE}列車太長
|
||||
STR_881A_TRAINS_CAN_ONLY_BE_ALTERED :{WHITE}列車只有在停放於機廠內的時候才能變動
|
||||
@@ -2773,7 +2773,7 @@ SERVICE_AT_SHIP_DEPOT :在{TOWN}船塢
|
||||
|
||||
##id 0xA000
|
||||
STR_A000_AIRPORTS :{WHITE}機場
|
||||
STR_A001_CAN_T_BUILD_AIRPORT_HERE :{WHITE}無法在此建造機場...
|
||||
STR_A001_CAN_T_BUILD_AIRPORT_HERE :{WHITE}無法在此興建機場...
|
||||
STR_A002_AIRCRAFT_HANGAR :{WHITE}{STATION} 停機棚
|
||||
STR_A003_NEW_AIRCRAFT :{BLACK}購買飛機
|
||||
STR_CLONE_AIRCRAFT :{BLACK}複製飛機
|
||||
@@ -2804,12 +2804,12 @@ STR_A019_CAPACITY :{BLACK}容量
|
||||
STR_A01A_CAPACITY :{BLACK}容量:{LTBLUE}{CARGO}
|
||||
STR_A01B_AIRCRAFT_MUST_BE_STOPPED :{WHITE}飛機必須停在機棚内
|
||||
STR_A01C_CAN_T_SELL_AIRCRAFT :{WHITE}無法出售飛機...
|
||||
STR_A01D_AIRPORT_CONSTRUCTION :建造機場
|
||||
STR_A01E_BUILD_AIRPORT :{BLACK}建造機場
|
||||
STR_A01D_AIRPORT_CONSTRUCTION :興建機場
|
||||
STR_A01E_BUILD_AIRPORT :{BLACK}興建機場
|
||||
STR_A01F_AIRCRAFT_CLICK_ON_AIRCRAFT :{BLACK}飛機 - 點選飛機顯示詳細資料
|
||||
STR_A020_BUILD_NEW_AIRCRAFT_REQUIRES :{BLACK}購買新飛機 (需要有機棚的機場)
|
||||
STR_A021_AIRCRAFT_CLICK_ON_AIRCRAFT :{BLACK}飛機 - 點選飛機顯示詳細資料
|
||||
STR_A022_BUILD_NEW_AIRCRAFT :{BLACK}建造新機場
|
||||
STR_A022_BUILD_NEW_AIRCRAFT :{BLACK}購買新飛機
|
||||
STR_A023_DRAG_AIRCRAFT_TO_HERE_TO :{BLACK}將飛機拉至此即可出售
|
||||
STR_A024_CENTER_MAIN_VIEW_ON_HANGAR :{BLACK}將主視野帶到機棚位置
|
||||
STR_A025_AIRCRAFT_SELECTION_LIST :{BLACK}飛機清單 - 點選飛機檢視詳細資料
|
||||
@@ -2825,7 +2825,7 @@ STR_A030_NAME_AIRCRAFT :{WHITE}命名
|
||||
STR_A031_CAN_T_NAME_AIRCRAFT :{WHITE}無法命名飛機
|
||||
STR_A032_NAME_AIRCRAFT :{BLACK}命名飛機
|
||||
STR_A033_CITIZENS_CELEBRATE_FIRST :{BLACK}{BIGFONT}市民慶賀 . . .{}首架飛機抵達 {STATION}!
|
||||
STR_A034_PLANE_CRASH_DIE_IN_FIREBALL :{BLACK}{BIGFONT}飛機墜毀!{}{COMMA} 名死於 {STATION} 機場的火球下
|
||||
STR_A034_PLANE_CRASH_DIE_IN_FIREBALL :{BLACK}{BIGFONT}墜機!{}{COMMA} 名乘客與機組員死於 {STATION} 的火球下
|
||||
STR_PLANE_CRASH_OUT_OF_FUEL :{BLACK}{BIGFONT}飛機墜毀!{}飛機用光燃油, {COMMA} 死在火球裡!
|
||||
STR_A036 :{TINYFONT}{BLACK}{STATION}
|
||||
STR_A037_RENAME :{BLACK}更名
|
||||
@@ -3054,7 +3054,7 @@ STR_PURCHASE_INFO_AIRCRAFT_CAPACITY :{BLACK}容量
|
||||
STR_PURCHASE_INFO_PWAGPOWER_PWAGWEIGHT :{BLACK}動力車廂:{GOLD}+{POWER}{BLACK} 重量:{GOLD}+{WEIGHT_S}
|
||||
STR_PURCHASE_INFO_REFITTABLE_TO :{BLACK}可改裝成:{GOLD}
|
||||
STR_PURCHASE_INFO_ALL_TYPES :所有酬載類型
|
||||
STR_PURCHASE_INFO_ALL_BUT :{GOLD} 以外皆可
|
||||
STR_PURCHASE_INFO_ALL_BUT :{GOLD}除了
|
||||
|
||||
########### String for New Landscape Generator
|
||||
|
||||
@@ -3122,8 +3122,8 @@ STR_HELIPORT :{BLACK}直升
|
||||
STR_HELIDEPOT :{BLACK}直升機棚
|
||||
STR_HELISTATION :{BLACK}直升機站
|
||||
|
||||
STR_SMALL_AIRPORTS :{BLACK}小機場
|
||||
STR_LARGE_AIRPORTS :{BLACK}大機場
|
||||
STR_SMALL_AIRPORTS :{BLACK}小型機場
|
||||
STR_LARGE_AIRPORTS :{BLACK}大型機場
|
||||
STR_HUB_AIRPORTS :{BLACK}轉運機場
|
||||
STR_HELIPORTS :{BLACK}直升機場
|
||||
|
||||
|
@@ -7,7 +7,7 @@
|
||||
extern const char _openttd_revision[];
|
||||
#elif defined(WITH_REV_HACK)
|
||||
#define WITH_REV
|
||||
const char _openttd_revision[] = "0.5.1";
|
||||
const char _openttd_revision[] = "0.5.2";
|
||||
#else
|
||||
const char _openttd_revision[] = NOREV_STRING;
|
||||
#endif
|
||||
@@ -1397,11 +1397,13 @@ void NetworkStartUp(void)
|
||||
byte cl_max = _network_game_info.clients_max;
|
||||
byte cp_max = _network_game_info.companies_max;
|
||||
byte sp_max = _network_game_info.spectators_max;
|
||||
byte s_lang = _network_game_info.server_lang;
|
||||
|
||||
memset(&_network_game_info, 0, sizeof(_network_game_info));
|
||||
_network_game_info.clients_max = cl_max;
|
||||
_network_game_info.companies_max = cp_max;
|
||||
_network_game_info.spectators_max = sp_max;
|
||||
_network_game_info.server_lang = s_lang;
|
||||
}
|
||||
|
||||
// Let's load the network in windows
|
||||
|
@@ -183,7 +183,7 @@ DEF_CLIENT_SEND_COMMAND_PARAM(PACKET_CLIENT_CHAT)(NetworkAction action, DestType
|
||||
// Data:
|
||||
// uint8: ActionID (see network_data.h, NetworkAction)
|
||||
// uint8: Destination Type (see network_data.h, DestType);
|
||||
// uint8: Destination Player (1..MAX_PLAYERS)
|
||||
// uint16: Destination Player
|
||||
// String: Message (max MAX_TEXT_MSG_LEN)
|
||||
//
|
||||
|
||||
@@ -191,7 +191,7 @@ DEF_CLIENT_SEND_COMMAND_PARAM(PACKET_CLIENT_CHAT)(NetworkAction action, DestType
|
||||
|
||||
NetworkSend_uint8(p, action);
|
||||
NetworkSend_uint8(p, type);
|
||||
NetworkSend_uint8(p, dest);
|
||||
NetworkSend_uint16(p, dest);
|
||||
NetworkSend_string(p, msg);
|
||||
NetworkSend_Packet(p, MY_CLIENT);
|
||||
}
|
||||
|
@@ -1479,7 +1479,7 @@ void ShowJoinStatusWindowAfterJoin(void)
|
||||
AllocateWindowDesc(&_network_join_status_window_desc);
|
||||
}
|
||||
|
||||
static void SendChat(const char *buf, DestType type, byte dest)
|
||||
static void SendChat(const char *buf, DestType type, int dest)
|
||||
{
|
||||
if (buf[0] == '\0') return;
|
||||
if (!_network_server) {
|
||||
@@ -1543,7 +1543,7 @@ static char *ChatTabCompletionFindText(char *buf)
|
||||
static void ChatTabCompletion(Window *w)
|
||||
{
|
||||
static char _chat_tab_completion_buf[lengthof(_edit_str_buf)];
|
||||
Textbuf *tb = &WP(w, querystr_d).text;
|
||||
Textbuf *tb = &WP(w, chatquerystr_d).text;
|
||||
uint len, tb_len;
|
||||
uint item;
|
||||
char *tb_buf, *pre_buf;
|
||||
@@ -1601,7 +1601,7 @@ static void ChatTabCompletion(Window *w)
|
||||
}
|
||||
|
||||
/* Update the textbuffer */
|
||||
UpdateTextBufferSize(&WP(w, querystr_d).text);
|
||||
UpdateTextBufferSize(&WP(w, chatquerystr_d).text);
|
||||
|
||||
SetWindowDirty(w);
|
||||
free(pre_buf);
|
||||
@@ -1615,17 +1615,17 @@ static void ChatTabCompletion(Window *w)
|
||||
_chat_tab_completion_active = false;
|
||||
|
||||
/* Update the textbuffer */
|
||||
UpdateTextBufferSize(&WP(w, querystr_d).text);
|
||||
UpdateTextBufferSize(&WP(w, chatquerystr_d).text);
|
||||
|
||||
SetWindowDirty(w);
|
||||
}
|
||||
free(pre_buf);
|
||||
}
|
||||
|
||||
/* uses querystr_d WP macro
|
||||
* uses querystr_d->caption to store
|
||||
* - type of chat message (Private/Team/All) in bytes 0-7
|
||||
* - destination of chat message in the case of Team/Private in bytes 8-15 */
|
||||
/*
|
||||
* uses chatquerystr_d WP macro
|
||||
* uses chatquerystr_d->caption to store type of chat message (Private/Team/All)
|
||||
*/
|
||||
static void ChatWindowWndProc(Window *w, WindowEvent *e)
|
||||
{
|
||||
switch (e->event) {
|
||||
@@ -1644,8 +1644,8 @@ static void ChatWindowWndProc(Window *w, WindowEvent *e)
|
||||
|
||||
DrawWindowWidgets(w);
|
||||
|
||||
assert(GB(WP(w, querystr_d).caption, 0, 8) < lengthof(chat_captions));
|
||||
msg = chat_captions[GB(WP(w, querystr_d).caption, 0, 8)];
|
||||
assert(WP(w, chatquerystr_d).caption < lengthof(chat_captions));
|
||||
msg = chat_captions[WP(w, chatquerystr_d).caption];
|
||||
DrawStringRightAligned(w->widget[2].left - 2, w->widget[2].top + 1, msg, 16);
|
||||
DrawEditBox(w, &WP(w, querystr_d), 2);
|
||||
} break;
|
||||
@@ -1653,9 +1653,9 @@ static void ChatWindowWndProc(Window *w, WindowEvent *e)
|
||||
case WE_CLICK:
|
||||
switch (e->we.click.widget) {
|
||||
case 3: { /* Send */
|
||||
DestType type = GB(WP(w, querystr_d).caption, 0, 8);
|
||||
byte dest = GB(WP(w, querystr_d).caption, 8, 8);
|
||||
SendChat(WP(w, querystr_d).text.buf, type, dest);
|
||||
DestType type = (DestType)WP(w, chatquerystr_d).caption;
|
||||
int dest = WP(w, chatquerystr_d).dest;
|
||||
SendChat(WP(w, chatquerystr_d).text.buf, type, dest);
|
||||
} /* FALLTHROUGH */
|
||||
case 0: /* Cancel */ DeleteWindow(w); break;
|
||||
}
|
||||
@@ -1672,9 +1672,9 @@ static void ChatWindowWndProc(Window *w, WindowEvent *e)
|
||||
_chat_tab_completion_active = false;
|
||||
switch (HandleEditBoxKey(w, &WP(w, querystr_d), 2, e)) {
|
||||
case 1: { /* Return */
|
||||
DestType type = GB(WP(w, querystr_d).caption, 0, 8);
|
||||
byte dest = GB(WP(w, querystr_d).caption, 8, 8);
|
||||
SendChat(WP(w, querystr_d).text.buf, type, dest);
|
||||
DestType type = (DestType)WP(w, chatquerystr_d).caption;
|
||||
int dest = WP(w, chatquerystr_d).dest;
|
||||
SendChat(WP(w, chatquerystr_d).text.buf, type, dest);
|
||||
} /* FALLTHROUGH */
|
||||
case 2: /* Escape */ DeleteWindow(w); break;
|
||||
}
|
||||
@@ -1704,7 +1704,7 @@ static const WindowDesc _chat_window_desc = {
|
||||
ChatWindowWndProc
|
||||
};
|
||||
|
||||
void ShowNetworkChatQueryWindow(DestType type, byte dest)
|
||||
void ShowNetworkChatQueryWindow(DestType type, int dest)
|
||||
{
|
||||
Window *w;
|
||||
|
||||
@@ -1716,11 +1716,12 @@ void ShowNetworkChatQueryWindow(DestType type, byte dest)
|
||||
w = AllocateWindowDesc(&_chat_window_desc);
|
||||
|
||||
LowerWindowWidget(w, 2);
|
||||
WP(w,querystr_d).caption = GB(type, 0, 8) | (dest << 8); // Misuse of caption
|
||||
WP(w,querystr_d).wnd_class = WC_MAIN_TOOLBAR;
|
||||
WP(w,querystr_d).wnd_num = 0;
|
||||
WP(w,querystr_d).afilter = CS_ALPHANUMERAL;
|
||||
InitializeTextBuffer(&WP(w, querystr_d).text, _edit_str_buf, lengthof(_edit_str_buf), 0);
|
||||
WP(w, chatquerystr_d).caption = type; // Misuse of caption
|
||||
WP(w, chatquerystr_d).dest = dest;
|
||||
WP(w, chatquerystr_d).afilter = CS_ALPHANUMERAL;
|
||||
WP(w, chatquerystr_d).wnd_class = WC_MAIN_TOOLBAR;
|
||||
WP(w, chatquerystr_d).wnd_num = 0;
|
||||
InitializeTextBuffer(&WP(w, chatquerystr_d).text, _edit_str_buf, lengthof(_edit_str_buf), 0);
|
||||
}
|
||||
|
||||
#endif /* ENABLE_NETWORK */
|
||||
|
@@ -9,7 +9,7 @@
|
||||
|
||||
void ShowNetworkNeedPassword(NetworkPasswordType npt);
|
||||
void ShowNetworkGiveMoneyWindow(byte player); // PlayerID
|
||||
void ShowNetworkChatQueryWindow(DestType type, byte dest);
|
||||
void ShowNetworkChatQueryWindow(DestType type, int dest);
|
||||
void ShowJoinStatusWindowAfterJoin(void);
|
||||
void ShowNetworkGameWindow(void);
|
||||
void ShowClientList(void);
|
||||
@@ -17,7 +17,7 @@ void ShowClientList(void);
|
||||
#else /* ENABLE_NETWORK */
|
||||
/* Network function stubs when networking is disabled */
|
||||
|
||||
static inline void ShowNetworkChatQueryWindow(byte desttype, byte dest) {}
|
||||
static inline void ShowNetworkChatQueryWindow(byte desttype, int dest) {}
|
||||
static inline void ShowClientList(void) {}
|
||||
static inline void ShowJoinStatusWindowAfterJoin(void) {}
|
||||
static inline void ShowNetworkGameWindow(void) {}
|
||||
|
@@ -1119,7 +1119,7 @@ DEF_SERVER_RECEIVE_COMMAND(PACKET_CLIENT_CHAT)
|
||||
{
|
||||
NetworkAction action = NetworkRecv_uint8(cs, p);
|
||||
DestType desttype = NetworkRecv_uint8(cs, p);
|
||||
int dest = NetworkRecv_uint8(cs, p);
|
||||
int dest = NetworkRecv_uint16(cs, p);
|
||||
char msg[MAX_TEXT_MSG_LEN];
|
||||
|
||||
NetworkRecv_string(cs, p, msg, MAX_TEXT_MSG_LEN);
|
||||
|
120
newgrf.c
120
newgrf.c
@@ -2096,79 +2096,73 @@ static void FeatureNewName(byte *buf, int len)
|
||||
|
||||
len -= (int)name_length;
|
||||
|
||||
if (name_length == 1) {
|
||||
DEBUG(grf, 7) ("FeatureNewName: Can't add empty name");
|
||||
} else if (name_length > 127) {
|
||||
DEBUG(grf, 7) ("FeatureNewName: Too long a name (%d)", name_length);
|
||||
} else {
|
||||
DEBUG(grf, 8) ("FeatureNewName: %d <- %s", id, name);
|
||||
DEBUG(grf, 8) ("FeatureNewName: %d <- %s", id, name);
|
||||
|
||||
switch (feature) {
|
||||
case GSF_TRAIN:
|
||||
case GSF_ROAD:
|
||||
case GSF_SHIP:
|
||||
case GSF_AIRCRAFT: {
|
||||
if (id < TOTAL_NUM_ENGINES) {
|
||||
StringID string = AddGRFString(_cur_grffile->grfid, id, lang, new_scheme, name, STR_8000_KIRBY_PAUL_TANK_STEAM + id);
|
||||
SetCustomEngineName(id, string);
|
||||
} else {
|
||||
AddGRFString(_cur_grffile->grfid, id, lang, new_scheme, name, id);
|
||||
}
|
||||
break;
|
||||
switch (feature) {
|
||||
case GSF_TRAIN:
|
||||
case GSF_ROAD:
|
||||
case GSF_SHIP:
|
||||
case GSF_AIRCRAFT: {
|
||||
if (id < TOTAL_NUM_ENGINES) {
|
||||
StringID string = AddGRFString(_cur_grffile->grfid, id, lang, new_scheme, name, STR_8000_KIRBY_PAUL_TANK_STEAM + id);
|
||||
SetCustomEngineName(id, string);
|
||||
} else {
|
||||
AddGRFString(_cur_grffile->grfid, id, lang, new_scheme, name, id);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
default:
|
||||
switch (GB(id, 8, 8)) {
|
||||
case 0xC4: /* Station class name */
|
||||
if (_cur_grffile->stations == NULL || _cur_grffile->stations[GB(id, 0, 8)] == NULL) {
|
||||
grfmsg(GMS_WARN, "FeatureNewName: Attempt to name undefined station 0x%X, ignoring.", GB(id, 0, 8));
|
||||
} else {
|
||||
StationClassID sclass = _cur_grffile->stations[GB(id, 0, 8)]->sclass;
|
||||
SetStationClassName(sclass, AddGRFString(_cur_grffile->grfid, id, lang, new_scheme, name, STR_UNDEFINED));
|
||||
}
|
||||
break;
|
||||
default:
|
||||
switch (GB(id, 8, 8)) {
|
||||
case 0xC4: /* Station class name */
|
||||
if (_cur_grffile->stations == NULL || _cur_grffile->stations[GB(id, 0, 8)] == NULL) {
|
||||
grfmsg(GMS_WARN, "FeatureNewName: Attempt to name undefined station 0x%X, ignoring.", GB(id, 0, 8));
|
||||
} else {
|
||||
StationClassID sclass = _cur_grffile->stations[GB(id, 0, 8)]->sclass;
|
||||
SetStationClassName(sclass, AddGRFString(_cur_grffile->grfid, id, lang, new_scheme, name, STR_UNDEFINED));
|
||||
}
|
||||
break;
|
||||
|
||||
case 0xC5: /* Station name */
|
||||
if (_cur_grffile->stations == NULL || _cur_grffile->stations[GB(id, 0, 8)] == NULL) {
|
||||
grfmsg(GMS_WARN, "FeatureNewName: Attempt to name undefined station 0x%X, ignoring.", GB(id, 0, 8));
|
||||
} else {
|
||||
_cur_grffile->stations[GB(id, 0, 8)]->name = AddGRFString(_cur_grffile->grfid, id, lang, new_scheme, name, STR_UNDEFINED);
|
||||
}
|
||||
break;
|
||||
case 0xC5: /* Station name */
|
||||
if (_cur_grffile->stations == NULL || _cur_grffile->stations[GB(id, 0, 8)] == NULL) {
|
||||
grfmsg(GMS_WARN, "FeatureNewName: Attempt to name undefined station 0x%X, ignoring.", GB(id, 0, 8));
|
||||
} else {
|
||||
_cur_grffile->stations[GB(id, 0, 8)]->name = AddGRFString(_cur_grffile->grfid, id, lang, new_scheme, name, STR_UNDEFINED);
|
||||
}
|
||||
break;
|
||||
|
||||
case 0xC9:
|
||||
case 0xD0:
|
||||
case 0xDC:
|
||||
AddGRFString(_cur_grffile->grfid, id, lang, new_scheme, name, STR_UNDEFINED);
|
||||
break;
|
||||
case 0xC9:
|
||||
case 0xD0:
|
||||
case 0xDC:
|
||||
AddGRFString(_cur_grffile->grfid, id, lang, new_scheme, name, STR_UNDEFINED);
|
||||
break;
|
||||
|
||||
default:
|
||||
DEBUG(grf, 7) ("FeatureNewName: Unsupported ID (0x%04X)", id);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
DEBUG(grf, 7) ("FeatureNewName: Unsupported ID (0x%04X)", id);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
#if 0
|
||||
case GSF_CANAL :
|
||||
case GSF_BRIDGE :
|
||||
case GSF_TOWNHOUSE :
|
||||
AddGRFString(_cur_spriteid, id, lang, name);
|
||||
switch (GB(id, 8,8)) {
|
||||
case 0xC9: /* House name */
|
||||
default:
|
||||
DEBUG(grf, 7) ("FeatureNewName: Unsupported ID (0x%04X)", id);
|
||||
}
|
||||
break;
|
||||
case GSF_CANAL :
|
||||
case GSF_BRIDGE :
|
||||
case GSF_TOWNHOUSE :
|
||||
AddGRFString(_cur_spriteid, id, lang, name);
|
||||
switch (GB(id, 8,8)) {
|
||||
case 0xC9: /* House name */
|
||||
default:
|
||||
DEBUG(grf, 7) ("FeatureNewName: Unsupported ID (0x%04X)", id);
|
||||
}
|
||||
break;
|
||||
|
||||
case GSF_INDUSTRIES :
|
||||
case 0x48 : /* for generic strings */
|
||||
AddGRFString(_cur_spriteid, id, lang, name);
|
||||
break;
|
||||
default :
|
||||
DEBUG(grf,7) ("FeatureNewName: Unsupported feature (0x%02X)", feature);
|
||||
break;
|
||||
case GSF_INDUSTRIES :
|
||||
case 0x48 : /* for generic strings */
|
||||
AddGRFString(_cur_spriteid, id, lang, name);
|
||||
break;
|
||||
default :
|
||||
DEBUG(grf,7) ("FeatureNewName: Unsupported feature (0x%02X)", feature);
|
||||
break;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -118,10 +118,10 @@ static inline usize EvalAdjust_ ## size(const DeterministicSpriteGroupAdjust *ad
|
||||
case DSGA_OP_SMAX: return max(last_value, value); \
|
||||
case DSGA_OP_UMIN: return min((usize)last_value, (usize)value); \
|
||||
case DSGA_OP_UMAX: return max((usize)last_value, (usize)value); \
|
||||
case DSGA_OP_SDIV: return last_value / value; \
|
||||
case DSGA_OP_SMOD: return last_value % value; \
|
||||
case DSGA_OP_UDIV: return (usize)last_value / (usize)value; \
|
||||
case DSGA_OP_UMOD: return (usize)last_value % (usize)value; \
|
||||
case DSGA_OP_SDIV: return value == 0 ? last_value : last_value / value; \
|
||||
case DSGA_OP_SMOD: return value == 0 ? last_value : last_value % value; \
|
||||
case DSGA_OP_UDIV: return value == 0 ? (usize)last_value : (usize)last_value / (usize)value; \
|
||||
case DSGA_OP_UMOD: return value == 0 ? (usize)last_value : (usize)last_value % (usize)value; \
|
||||
case DSGA_OP_MUL: return last_value * value; \
|
||||
case DSGA_OP_AND: return last_value & value; \
|
||||
case DSGA_OP_OR: return last_value | value; \
|
||||
|
@@ -602,6 +602,7 @@ static void DrawNewsString(int x, int y, uint16 color, const NewsItem *ni, uint
|
||||
const char *ptr;
|
||||
char *dest;
|
||||
StringID str;
|
||||
WChar c_last;
|
||||
|
||||
if (ni->display_mode == 3) {
|
||||
str = _get_news_string_callback[ni->callback](ni);
|
||||
@@ -615,15 +616,21 @@ static void DrawNewsString(int x, int y, uint16 color, const NewsItem *ni, uint
|
||||
* from it such as big fonts, etc. */
|
||||
ptr = buffer;
|
||||
dest = buffer2;
|
||||
c_last = '\0';
|
||||
for (;;) {
|
||||
WChar c = Utf8Consume(&ptr);
|
||||
if (c == 0) break;
|
||||
if (c == '\r') {
|
||||
/* Make a space from a newline, but ignore multiple newlines */
|
||||
if (c == '\n' && c_last != '\n') {
|
||||
dest[0] = ' ';
|
||||
dest++;
|
||||
} else if (c == '\r') {
|
||||
dest[0] = dest[1] = dest[2] = dest[3] = ' ';
|
||||
dest += 4;
|
||||
} else if (IsPrintable(c)) {
|
||||
dest += Utf8Encode(dest, c);
|
||||
}
|
||||
c_last = c;
|
||||
}
|
||||
|
||||
*dest = '\0';
|
||||
|
@@ -344,6 +344,9 @@ static void FixOldVehicles(void)
|
||||
FOR_ALL_VEHICLES(v) {
|
||||
Vehicle *u;
|
||||
|
||||
/* We haven't used this bit for stations for ages */
|
||||
if (v->type == VEH_Road) CLRBIT(v->u.road.state, 2);
|
||||
|
||||
FOR_ALL_VEHICLES_FROM(u, v->index + 1) {
|
||||
/* If a vehicle has the same orders, add the link to eachother
|
||||
* in both vehicles */
|
||||
@@ -1511,6 +1514,7 @@ static bool LoadOldMain(LoadgameState *ls)
|
||||
|
||||
for (i = 0; i < OLD_MAP_SIZE; i ++) {
|
||||
switch (GetTileType(i)) {
|
||||
case MP_STATION: _m[i].m4 = 0; break; // We don't understand this grf mapping (yet)
|
||||
case MP_RAILWAY:
|
||||
/* We save presignals different from TTDPatch, convert them */
|
||||
if (GetRailTileType(i) == RAIL_TILE_SIGNALS) {
|
||||
|
@@ -1242,8 +1242,8 @@ bool AfterLoadGame(void)
|
||||
// If Load Scenario / New (Scenario) Game is used,
|
||||
// a player does not exist yet. So create one here.
|
||||
// 1 exeption: network-games. Those can have 0 players
|
||||
// But this exeption is not true for network_servers!
|
||||
if (!_players[0].is_active && (!_networking || (_networking && _network_server)))
|
||||
// But this exeption is not true for non dedicated network_servers! */
|
||||
if (!_players[0].is_active && (!_networking || (_networking && _network_server && !_network_dedicated)))
|
||||
DoStartupNewPlayer(false);
|
||||
|
||||
DoZoomInOutWindow(ZOOM_NONE, w); // update button status
|
||||
|
@@ -1,14 +1,26 @@
|
||||
openttd (0.5.2-1) unstable; urgency=low
|
||||
|
||||
* New upstream release.
|
||||
|
||||
-- Matthijs Kooijman <m.kooijman@student.utwente.nl> Tue, 29 May 2007 20:00:00 +0100
|
||||
|
||||
openttd (0.5.2~rc1-1) unstable; urgency=low
|
||||
|
||||
* New upstream release.
|
||||
|
||||
-- Matthijs Kooijman <m.kooijman@student.utwente.nl> Wed, 16 May 2007 23:35:39 +0100
|
||||
|
||||
openttd (0.5.1-1) unstable; urgency=low
|
||||
|
||||
* New upstream release.
|
||||
|
||||
-- Matthijs Kooijman <m.kooijman@student.utwente.nl> Fri, 20 Aprr 2007 21:45:32 +0100
|
||||
-- Matthijs Kooijman <m.kooijman@student.utwente.nl> Fri, 20 Apr 2007 21:45:32 +0100
|
||||
|
||||
openttd (0.5.1~rc3-1) unstable; urgency=low
|
||||
|
||||
* New upstream release.
|
||||
|
||||
-- Matthijs Kooijman <m.kooijman@student.utwente.nl> Tue, 17 Aprr 2007 22:00:46 +0100
|
||||
-- Matthijs Kooijman <m.kooijman@student.utwente.nl> Tue, 17 Apr 2007 22:00:46 +0100
|
||||
|
||||
openttd (0.5.1~rc2-1) unstable; urgency=low
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
!define APPNAME "OpenTTD" ; Define application name
|
||||
!define APPVERSION "0.5.1" ; Define application version
|
||||
!define INSTALLERVERSION 32 ; NEED TO UPDATE THIS FOR EVERY RELEASE!!!
|
||||
!define APPVERSION "0.5.2" ; Define application version
|
||||
!define INSTALLERVERSION 34 ; NEED TO UPDATE THIS FOR EVERY RELEASE!!!
|
||||
|
||||
!define APPURLLINK "http://www.openttd.org"
|
||||
!define APPNAMEANDVERSION "${APPNAME} ${APPVERSION}"
|
||||
@@ -81,6 +81,7 @@ Page custom ShowWarningsPage
|
||||
!define MUI_FINISHPAGE_NOREBOOTSUPPORT
|
||||
!define MUI_FINISHPAGE_SHOWREADME "$INSTDIR\readme.txt"
|
||||
!define MUI_FINISHPAGE_SHOWREADME_NOTCHECKED
|
||||
!define MUI_WELCOMEFINISHPAGE_CUSTOMFUNCTION_INIT DisableBack
|
||||
|
||||
!insertmacro MUI_PAGE_FINISH
|
||||
!insertmacro MUI_UNPAGE_CONFIRM
|
||||
@@ -354,26 +355,30 @@ NoCD:
|
||||
hasCD:
|
||||
FunctionEnd
|
||||
|
||||
;---------------------------------------------------------------------
|
||||
; Custom page function to show notices for running OpenTTD
|
||||
;----------------------------------------------------------------------------------
|
||||
; Disable the "Back" button on finish page if the installer is run on Win9x systems
|
||||
Function DisableBack
|
||||
Call GetWindowsVersion
|
||||
Pop $R0
|
||||
StrCmp $R0 "win9x" 0 WinNT
|
||||
!insertmacro MUI_INSTALLOPTIONS_WRITE "ioSpecial.ini" "Settings" "BackEnabled" "0"
|
||||
WinNT:
|
||||
ClearErrors
|
||||
FunctionEnd
|
||||
|
||||
;----------------------------------------------------------------------------------
|
||||
; Custom page function to show notices for running OpenTTD (only for win32 systems)
|
||||
; We have extracted this custom page as Notice in the .onInit function
|
||||
Function ShowWarningsPage
|
||||
Call GetWindowsVersion
|
||||
Pop $R0
|
||||
; Don't show the UNICODE notice if the installer is run on Win9x systems
|
||||
StrCmp $R0 "win9x" 0 WinNT
|
||||
Abort
|
||||
WinNT:
|
||||
!insertmacro MUI_HEADER_TEXT "Installation Complete" "Important notices for OpenTTD usage."
|
||||
!insertmacro MUI_INSTALLOPTIONS_EXTRACT_AS "notice.ini" "Notice"
|
||||
!insertmacro MUI_INSTALLOPTIONS_INITDIALOG "Notice"
|
||||
|
||||
Call GetWindowsVersion
|
||||
Pop $R0
|
||||
|
||||
; Hide the MSLU text if the installer is not run on Win9x systems
|
||||
StrCmp $R0 "winnt" 0 Win9x
|
||||
!insertmacro MUI_INSTALLOPTIONS_READ $R1 "Notice" "Field 1" "HWND" ; MSLU groupbox
|
||||
ShowWindow $R1 0
|
||||
!insertmacro MUI_INSTALLOPTIONS_READ $R1 "Notice" "Field 2" "HWND" ; MSLU text
|
||||
ShowWindow $R1 0
|
||||
!insertmacro MUI_INSTALLOPTIONS_READ $R1 "Notice" "Field 3" "HWND" ; MSLU link
|
||||
ShowWindow $R1 0
|
||||
Win9x:
|
||||
ClearErrors
|
||||
!insertmacro MUI_INSTALLOPTIONS_SHOW
|
||||
FunctionEnd
|
||||
|
@@ -1,41 +1,17 @@
|
||||
; Ini file generated by the HM NIS Edit IO designer.
|
||||
[Settings]
|
||||
NumFields=6
|
||||
NumFields=3
|
||||
CancelEnabled=0
|
||||
|
||||
[Field 1]
|
||||
Type=Groupbox
|
||||
Text=Notice for Windows 9x/ME users!
|
||||
Left=8
|
||||
Right=292
|
||||
Top=80
|
||||
Bottom=138
|
||||
|
||||
[Field 2]
|
||||
Type=Label
|
||||
Text=OpenTTD will not work without the Microsoft Layer for Unicode installed.\r\nDue to licensing issues we cannot bundle this file with the installer. Please download MSLU from the Microsoft website and extract UnicoWS.dll to the same directory as the openttd executabe.
|
||||
Left=13
|
||||
Right=284
|
||||
Top=91
|
||||
Bottom=127
|
||||
|
||||
[Field 3]
|
||||
Type=Link
|
||||
Text=Microsoft Layer for Unicode
|
||||
State=http://www.microsoft.com/downloads/details.aspx?FamilyId=73BA7BD7-ED06-4F0D-80A4-2A7EEAEE17E2&displaylang=en
|
||||
Left=197
|
||||
Right=284
|
||||
Top=127
|
||||
Bottom=135
|
||||
|
||||
[Field 4]
|
||||
Type=Groupbox
|
||||
Text=UNICODE support
|
||||
Left=8
|
||||
Right=292
|
||||
Top=0
|
||||
Bottom=75
|
||||
|
||||
[Field 5]
|
||||
[Field 2]
|
||||
Type=Label
|
||||
Text=This version of OpenTTD has support for UNICODE, allowing users to use non-ASCII character sets such as Russian or Japanese.\r\nSelecting such a language will result in an unusable and garbled interface. You will need to specify a font that has support for these characters in openttd.cfg, or alternatively use an appropiate grf file.\r\n\r\nFor more information please refer to the readme or the wiki.
|
||||
Left=13
|
||||
@@ -43,7 +19,7 @@ Right=284
|
||||
Top=9
|
||||
Bottom=65
|
||||
|
||||
[Field 6]
|
||||
[Field 3]
|
||||
Type=Link
|
||||
Text=OpenTTD wiki
|
||||
Left=238
|
||||
|
@@ -65,8 +65,8 @@ END
|
||||
//
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION 0,5,0,0
|
||||
PRODUCTVERSION 0,5,0,0
|
||||
FILEVERSION 0,5,2,0
|
||||
PRODUCTVERSION 0,5,2,0
|
||||
FILEFLAGSMASK 0x3fL
|
||||
#ifdef _DEBUG
|
||||
FILEFLAGS 0x1L
|
||||
@@ -84,14 +84,14 @@ BEGIN
|
||||
VALUE "Comments", "This program is licensed under the GNU General Public License.\0"
|
||||
VALUE "CompanyName", "OpenTTD Development Team\0"
|
||||
VALUE "FileDescription", "OpenTTD\0"
|
||||
VALUE "FileVersion", "0.5.1\0"
|
||||
VALUE "FileVersion", "0.5.2\0"
|
||||
VALUE "InternalName", "openttd\0"
|
||||
VALUE "LegalCopyright", "Copyright <20> OpenTTD Developers 2002-2007. All Rights Reserved.\0"
|
||||
VALUE "LegalTrademarks", "\0"
|
||||
VALUE "OriginalFilename", "openttd.exe\0"
|
||||
VALUE "PrivateBuild", "\0"
|
||||
VALUE "ProductName", "OpenTTD\0"
|
||||
VALUE "ProductVersion", "0.0.0.0\0"
|
||||
VALUE "ProductVersion", "0.5.2.0\0"
|
||||
VALUE "SpecialBuild", "-\0"
|
||||
END
|
||||
END
|
||||
|
@@ -1,6 +1,6 @@
|
||||
OpenTTD README
|
||||
Last updated: 2007-04-20
|
||||
Release version: 0.5.1
|
||||
Last updated: 2007-05-29
|
||||
Release version: 0.5.2
|
||||
------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
49
settings.c
49
settings.c
@@ -989,7 +989,7 @@ static void ini_save_setting_list(IniFile *ini, const char *grpname, char **list
|
||||
#define SDTG_CONDOMANY(name, type, flags, guiflags, var, def, max, full, str, proc, from, to)\
|
||||
SDTG_GENERAL(name, SDT_ONEOFMANY, SL_VAR, type, flags, guiflags, var, 0, def, 0, max, 0, full, str, proc, from, to)
|
||||
#define SDTG_OMANY(name, type, flags, guiflags, var, def, max, full, str, proc)\
|
||||
SDTG_CONDOMANY(name, type, flags, guiflags, var, def, max full, str, proc, 0, SL_MAX_VERSION)
|
||||
SDTG_CONDOMANY(name, type, flags, guiflags, var, def, max, full, str, proc, 0, SL_MAX_VERSION)
|
||||
|
||||
#define SDTG_CONDMMANY(name, type, flags, guiflags, var, def, full, str, proc, from, to)\
|
||||
SDTG_GENERAL(name, SDT_MANYOFMANY, SL_VAR, type, flags, guiflags, var, 0, def, 0, 0, 0, full, str, proc, from, to)
|
||||
@@ -1218,29 +1218,30 @@ static const SettingDescGlobVarList _misc_settings[] = {
|
||||
|
||||
#ifdef ENABLE_NETWORK
|
||||
static const SettingDescGlobVarList _network_settings[] = {
|
||||
SDTG_VAR("sync_freq", SLE_UINT16,C|S,0, _network_sync_freq, 100, 0, 100, 0, STR_NULL, NULL),
|
||||
SDTG_VAR("frame_freq", SLE_UINT8,C|S,0, _network_frame_freq, 0, 0, 100, 0, STR_NULL, NULL),
|
||||
SDTG_VAR("max_join_time", SLE_UINT16, S, 0, _network_max_join_time, 500, 0, 32000, 0, STR_NULL, NULL),
|
||||
SDTG_BOOL("pause_on_join", S, 0, _network_pause_on_join, true, STR_NULL, NULL),
|
||||
SDTG_STR("server_bind_ip", SLE_STRB, S, 0, _network_server_bind_ip_host, "0.0.0.0", STR_NULL, NULL),
|
||||
SDTG_VAR("server_port", SLE_UINT16, S, 0, _network_server_port, NETWORK_DEFAULT_PORT, 0, 65535, 0, STR_NULL, NULL),
|
||||
SDTG_BOOL("server_advertise", S, 0, _network_advertise, false, STR_NULL, NULL),
|
||||
SDTG_VAR("lan_internet", SLE_UINT8, S, 0, _network_lan_internet, 0, 0, 1, 0, STR_NULL, NULL),
|
||||
SDTG_STR("player_name", SLE_STRB, S, 0, _network_player_name, NULL, STR_NULL, NULL),
|
||||
SDTG_STR("server_password", SLE_STRB, S, 0, _network_server_password, NULL, STR_NULL, NULL),
|
||||
SDTG_STR("rcon_password", SLE_STRB, S, 0, _network_rcon_password, NULL, STR_NULL, NULL),
|
||||
SDTG_STR("server_name", SLE_STRB, S, 0, _network_server_name, NULL, STR_NULL, NULL),
|
||||
SDTG_STR("connect_to_ip", SLE_STRB, S, 0, _network_default_ip, NULL, STR_NULL, NULL),
|
||||
SDTG_STR("network_id", SLE_STRB, S, 0, _network_unique_id, NULL, STR_NULL, NULL),
|
||||
SDTG_BOOL("autoclean_companies", S, 0, _network_autoclean_companies, false, STR_NULL, NULL),
|
||||
SDTG_VAR("autoclean_unprotected",SLE_UINT8, S, 0, _network_autoclean_unprotected,12, 0, 60, 0, STR_NULL, NULL),
|
||||
SDTG_VAR("autoclean_protected", SLE_UINT8, S, 0, _network_autoclean_protected, 36, 0, 180, 0, STR_NULL, NULL),
|
||||
SDTG_VAR("max_companies", SLE_UINT8, S, 0, _network_game_info.companies_max, 8, 0, 8, 0, STR_NULL, NULL),
|
||||
SDTG_VAR("max_clients", SLE_UINT8, S, 0, _network_game_info.clients_max, 10, 0, 10, 0, STR_NULL, NULL),
|
||||
SDTG_VAR("max_spectators", SLE_UINT8, S, 0, _network_game_info.spectators_max, 10, 0, 10, 0, STR_NULL, NULL),
|
||||
SDTG_VAR("restart_game_year", SLE_INT32, S,D0, _network_restart_game_year, 0, MIN_YEAR, MAX_YEAR, 1, STR_NULL, NULL),
|
||||
SDTG_VAR("min_players", SLE_UINT8, S, 0, _network_min_players, 0, 0, 10, 0, STR_NULL, NULL),
|
||||
SDTG_END()
|
||||
SDTG_VAR("sync_freq", SLE_UINT16,C|S,0, _network_sync_freq, 100, 0, 100, 0, STR_NULL, NULL),
|
||||
SDTG_VAR("frame_freq", SLE_UINT8,C|S,0, _network_frame_freq, 0, 0, 100, 0, STR_NULL, NULL),
|
||||
SDTG_VAR("max_join_time", SLE_UINT16, S, 0, _network_max_join_time, 500, 0, 32000, 0, STR_NULL, NULL),
|
||||
SDTG_BOOL("pause_on_join", S, 0, _network_pause_on_join, true, STR_NULL, NULL),
|
||||
SDTG_STR("server_bind_ip", SLE_STRB, S, 0, _network_server_bind_ip_host, "0.0.0.0", STR_NULL, NULL),
|
||||
SDTG_VAR("server_port", SLE_UINT16, S, 0, _network_server_port, NETWORK_DEFAULT_PORT, 0, 65535, 0, STR_NULL, NULL),
|
||||
SDTG_BOOL("server_advertise", S, 0, _network_advertise, false, STR_NULL, NULL),
|
||||
SDTG_VAR("lan_internet", SLE_UINT8, S, 0, _network_lan_internet, 0, 0, 1, 0, STR_NULL, NULL),
|
||||
SDTG_STR("player_name", SLE_STRB, S, 0, _network_player_name, NULL, STR_NULL, NULL),
|
||||
SDTG_STR("server_password", SLE_STRB, S, 0, _network_server_password, NULL, STR_NULL, NULL),
|
||||
SDTG_STR("rcon_password", SLE_STRB, S, 0, _network_rcon_password, NULL, STR_NULL, NULL),
|
||||
SDTG_STR("server_name", SLE_STRB, S, 0, _network_server_name, NULL, STR_NULL, NULL),
|
||||
SDTG_STR("connect_to_ip", SLE_STRB, S, 0, _network_default_ip, NULL, STR_NULL, NULL),
|
||||
SDTG_STR("network_id", SLE_STRB, S, 0, _network_unique_id, NULL, STR_NULL, NULL),
|
||||
SDTG_BOOL("autoclean_companies", S, 0, _network_autoclean_companies, false, STR_NULL, NULL),
|
||||
SDTG_VAR("autoclean_unprotected",SLE_UINT8, S, 0, _network_autoclean_unprotected,12, 0, 60, 0, STR_NULL, NULL),
|
||||
SDTG_VAR("autoclean_protected", SLE_UINT8, S, 0, _network_autoclean_protected, 36, 0, 180, 0, STR_NULL, NULL),
|
||||
SDTG_VAR("max_companies", SLE_UINT8, S, 0, _network_game_info.companies_max, 8, 0, 8, 0, STR_NULL, NULL),
|
||||
SDTG_VAR("max_clients", SLE_UINT8, S, 0, _network_game_info.clients_max, 10, 0, 10, 0, STR_NULL, NULL),
|
||||
SDTG_VAR("max_spectators", SLE_UINT8, S, 0, _network_game_info.spectators_max, 10, 0, 10, 0, STR_NULL, NULL),
|
||||
SDTG_VAR("restart_game_year", SLE_INT32, S,D0, _network_restart_game_year, 0, MIN_YEAR, MAX_YEAR, 1, STR_NULL, NULL),
|
||||
SDTG_VAR("min_players", SLE_UINT8, S, 0, _network_min_players, 0, 0, 10, 0, STR_NULL, NULL),
|
||||
SDTG_OMANY("server_lang", SLE_UINT8, S, 0, _network_game_info.server_lang, 0, 3, "ANY|ENGLISH|GERMAN|FRENCH", STR_NULL, NULL),
|
||||
SDTG_END()
|
||||
};
|
||||
#endif /* ENABLE_NETWORK */
|
||||
|
||||
|
@@ -200,6 +200,7 @@ static void GameOptionsWndProc(Window *w, WindowEvent *e)
|
||||
break;
|
||||
case 24: /* Change interface language */
|
||||
ReadLanguagePack(e->we.dropdown.index);
|
||||
UpdateAllStationVirtCoord();
|
||||
MarkWholeScreenDirty();
|
||||
break;
|
||||
case 27: /* Change resolution */
|
||||
|
@@ -1096,7 +1096,7 @@ int32 CmdBuildRailroadStation(TileIndex tile_org, uint32 flags, uint32 p1, uint3
|
||||
int w = plat_len;
|
||||
do {
|
||||
byte layout = *layout_ptr++;
|
||||
MakeRailStation(tile, st->owner, st->index, axis, layout, GB(p2, 0, 4));
|
||||
MakeRailStation(tile, st->owner, st->index, axis, layout & ~1, GB(p2, 0, 4));
|
||||
SetCustomStationSpecIndex(tile, specindex);
|
||||
SetStationTileRandomBits(tile, GB(Random(), 0, 4));
|
||||
|
||||
@@ -1104,7 +1104,7 @@ int32 CmdBuildRailroadStation(TileIndex tile_org, uint32 flags, uint32 p1, uint3
|
||||
/* Use a fixed axis for GetPlatformInfo as our platforms / numtracks are always the right way around */
|
||||
uint32 platinfo = GetPlatformInfo(AXIS_X, 0, plat_len, numtracks_orig, plat_len - w, numtracks_orig - numtracks, false);
|
||||
uint16 callback = GetStationCallback(CBID_STATION_TILE_LAYOUT, platinfo, 0, statspec, st, tile);
|
||||
if (callback != CALLBACK_FAILED && callback < 8) SetStationGfx(tile, callback + axis);
|
||||
if (callback != CALLBACK_FAILED && callback < 8) SetStationGfx(tile, (callback & ~1) + axis);
|
||||
}
|
||||
|
||||
tile += tile_delta;
|
||||
|
156
thread.c
156
thread.c
@@ -4,7 +4,7 @@
|
||||
#include "thread.h"
|
||||
#include <stdlib.h>
|
||||
|
||||
#if defined(__AMIGA__) || defined(__MORPHOS__) || defined(NO_THREADS)
|
||||
#if defined(__AMIGA__) || defined(NO_THREADS)
|
||||
OTTDThread *OTTDCreateThread(OTTDThreadFunc function, void *arg) { return NULL; }
|
||||
void *OTTDJoinThread(OTTDThread *t) { return NULL; }
|
||||
void OTTDExitThread(void) { NOT_REACHED(); };
|
||||
@@ -62,7 +62,7 @@ void OTTDExitThread(void)
|
||||
_endthread();
|
||||
}
|
||||
|
||||
#elif defined(UNIX)
|
||||
#elif defined(UNIX) && !defined(__MORPHOS__)
|
||||
|
||||
#include <pthread.h>
|
||||
|
||||
@@ -154,4 +154,156 @@ void OTTDExitThread(void)
|
||||
{
|
||||
ExitThread(0);
|
||||
}
|
||||
|
||||
#elif defined(MORPHOS)
|
||||
|
||||
#include <exec/types.h>
|
||||
#include <exec/rawfmt.h>
|
||||
#include <dos/dostags.h>
|
||||
|
||||
#include <proto/dos.h>
|
||||
#include <proto/exec.h>
|
||||
|
||||
#include <setjmp.h>
|
||||
|
||||
/* NOTE: this code heavily depends on latest libnix updates. So make
|
||||
* sure you link with new stuff which supports semaphore locking of
|
||||
* the IO resources, else it will just go foobar. */
|
||||
|
||||
struct OTTDThreadStartupMessage {
|
||||
struct Message msg; ///< standard exec.library message (MUST be the first thing in the message struct!)
|
||||
OTTDThreadFunc func; ///< function the thread will execute
|
||||
void *arg; ///< functions arguments for the thread function
|
||||
void *ret; ///< return value of the thread function
|
||||
jmp_buf jumpstore; ///< storage for the setjump state
|
||||
};
|
||||
|
||||
struct OTTDThread {
|
||||
struct MsgPort *replyport;
|
||||
struct OTTDThreadStartupMessage msg;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Default OpenTTD STDIO/ERR debug output is not very useful for this, so we
|
||||
* utilize serial/ramdebug instead.
|
||||
*/
|
||||
#ifndef NO_DEBUG_MESSAGES
|
||||
void KPutStr(CONST_STRPTR format)
|
||||
{
|
||||
RawDoFmt(format, NULL, (void (*)())RAWFMTFUNC_SERIAL, NULL);
|
||||
}
|
||||
#else
|
||||
#define KPutStr(x)
|
||||
#endif
|
||||
|
||||
static void Proxy(void)
|
||||
{
|
||||
struct Task *child = FindTask(NULL);
|
||||
struct OTTDThreadStartupMessage *msg;
|
||||
|
||||
/* Make sure, we don't block the parent. */
|
||||
SetTaskPri(child, -5);
|
||||
|
||||
KPutStr("[Child] Progressing...\n");
|
||||
|
||||
if (NewGetTaskAttrs(NULL, &msg, sizeof(struct OTTDThreadStartupMessage *), TASKINFOTYPE_STARTUPMSG, TAG_DONE) && msg != NULL) {
|
||||
/* Make use of setjmp() here, so this point can be reached again from inside
|
||||
* OTTDExitThread() which can be called from anythere inside msg->func.
|
||||
* It's a bit ugly and in worst case it leaks some memory. */
|
||||
if (setjmp(msg->jumpstore) == 0) {
|
||||
msg->ret = msg->func(msg->arg);
|
||||
} else {
|
||||
KPutStr("[Child] Returned to main()\n");
|
||||
}
|
||||
}
|
||||
|
||||
/* Quit the child, exec.library will reply the startup msg internally. */
|
||||
KPutStr("[Child] Done.\n");
|
||||
}
|
||||
|
||||
OTTDThread* OTTDCreateThread(OTTDThreadFunc function, void *arg)
|
||||
{
|
||||
OTTDThread *t;
|
||||
struct Task *parent;
|
||||
|
||||
KPutStr("[OpenTTD] Create thread...\n");
|
||||
|
||||
t = (struct OTTDThread *)AllocVecTaskPooled(sizeof(struct OTTDThread));
|
||||
if (t == NULL) return NULL;
|
||||
|
||||
parent = FindTask(NULL);
|
||||
|
||||
/* Make sure main thread runs with sane priority */
|
||||
SetTaskPri(parent, 0);
|
||||
|
||||
/* Things we'll pass down to the child by utilizing NP_StartupMsg */
|
||||
t->msg.func = function;
|
||||
t->msg.arg = arg;
|
||||
t->msg.ret = NULL;
|
||||
|
||||
t->replyport = CreateMsgPort();
|
||||
|
||||
if (t->replyport != NULL) {
|
||||
struct Process *child;
|
||||
|
||||
t->msg.msg.mn_Node.ln_Type = NT_MESSAGE;
|
||||
t->msg.msg.mn_ReplyPort = t->replyport;
|
||||
t->msg.msg.mn_Length = sizeof(struct OTTDThreadStartupMessage);
|
||||
|
||||
child = CreateNewProcTags(
|
||||
NP_CodeType, CODETYPE_PPC,
|
||||
NP_Entry, Proxy,
|
||||
NP_StartupMsg, (ULONG)&t->msg,
|
||||
NP_Priority, 5UL,
|
||||
NP_Name, (ULONG)"OpenTTD Thread",
|
||||
NP_PPCStackSize, 131072UL,
|
||||
TAG_DONE);
|
||||
|
||||
if (child != NULL) {
|
||||
KPutStr("[OpenTTD] Child process launched.\n");
|
||||
return t;
|
||||
}
|
||||
DeleteMsgPort(t->replyport);
|
||||
}
|
||||
FreeVecTaskPooled(t);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void* OTTDJoinThread(OTTDThread *t)
|
||||
{
|
||||
struct OTTDThreadStartupMessage *reply;
|
||||
void *ret;
|
||||
|
||||
KPutStr("[OpenTTD] Join threads...\n");
|
||||
|
||||
if (t == NULL) return NULL;
|
||||
|
||||
KPutStr("[OpenTTD] Wait for child to quit...\n");
|
||||
WaitPort(t->replyport);
|
||||
|
||||
reply = (struct OTTDThreadStartupMessage *)GetMsg(t->replyport);
|
||||
ret = reply->ret;
|
||||
|
||||
DeleteMsgPort(t->replyport);
|
||||
FreeVecTaskPooled(t);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
void OTTDExitThread()
|
||||
{
|
||||
struct OTTDThreadStartupMessage *msg;
|
||||
|
||||
KPutStr("[Child] Aborting...\n");
|
||||
|
||||
if (NewGetTaskAttrs(NULL, &msg, sizeof(struct OTTDThreadStartupMessage *), TASKINFOTYPE_STARTUPMSG, TAG_DONE) && msg != NULL) {
|
||||
KPutStr("[Child] Jumping back...\n");
|
||||
longjmp(msg->jumpstore, 0xBEAFCAFE);
|
||||
}
|
||||
|
||||
NOT_REACHED();
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@@ -803,7 +803,7 @@ static bool GrowTown(Town *t)
|
||||
for (ptr = _town_coord_mod; ptr != endof(_town_coord_mod); ++ptr) {
|
||||
/* Only work with plain land that not already has a house */
|
||||
if (!IsTileType(tile, MP_HOUSE) && GetTileSlope(tile, NULL) == SLOPE_FLAT) {
|
||||
if (!CmdFailed(DoCommand(tile, 0, 0, DC_AUTO, CMD_LANDSCAPE_CLEAR))) {
|
||||
if (!CmdFailed(DoCommand(tile, 0, 0, DC_AUTO | DC_NO_WATER, CMD_LANDSCAPE_CLEAR))) {
|
||||
DoCommand(tile, GenRandomRoadBits(), t->index, DC_EXEC | DC_AUTO, CMD_BUILD_ROAD);
|
||||
_current_player = old_player;
|
||||
return true;
|
||||
|
@@ -675,7 +675,7 @@ static int32 DoClearBridge(TileIndex tile, uint32 flags)
|
||||
|
||||
endtile = GetOtherBridgeEnd(tile);
|
||||
|
||||
if (!EnsureNoVehicleOnGround(tile) || !EnsureNoVehicleOnGround(endtile)) return CMD_ERROR;
|
||||
if (!EnsureNoVehicle(tile) || !EnsureNoVehicle(endtile)) return CMD_ERROR;
|
||||
|
||||
direction = GetBridgeRampDirection(tile);
|
||||
delta = TileOffsByDiagDir(direction);
|
||||
@@ -828,8 +828,8 @@ int32 DoConvertTunnelBridgeRail(TileIndex tile, RailType totype, bool exec)
|
||||
|
||||
endtile = GetOtherBridgeEnd(tile);
|
||||
|
||||
if (!EnsureNoVehicleOnGround(tile) ||
|
||||
!EnsureNoVehicleOnGround(endtile) ||
|
||||
if (!EnsureNoVehicle(tile) ||
|
||||
!EnsureNoVehicle(endtile) ||
|
||||
FindVehicleBetween(tile, endtile, GetBridgeHeightRamp(tile), false) != NULL) {
|
||||
return_cmd_error(STR_8803_TRAIN_IN_THE_WAY);
|
||||
}
|
||||
@@ -1349,7 +1349,13 @@ static void ChangeTileOwner_TunnelBridge(TileIndex tile, PlayerID old_player, Pl
|
||||
SetTileOwner(tile, OWNER_NONE);
|
||||
}
|
||||
} else {
|
||||
DoCommand(tile, 0, 0, DC_EXEC, CMD_LANDSCAPE_CLEAR);
|
||||
if (CmdFailed(DoCommand(tile, 0, 0, DC_EXEC, CMD_LANDSCAPE_CLEAR))) {
|
||||
/* When clearing the bridge/tunnel failed there are still vehicles on/in
|
||||
* the bridge/tunnel. As all *our* vehicles are already removed, they
|
||||
* must be of another owner. Therefor this must be a road bridge/tunnel.
|
||||
* In that case we can safely reassign the ownership to OWNER_NONE. */
|
||||
SetTileOwner(tile, OWNER_NONE);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
2
unix.c
2
unix.c
@@ -55,7 +55,7 @@ bool FiosIsRoot(const char *path)
|
||||
#else
|
||||
/* On MorphOS or AmigaOS paths look like: "Volume:directory/subdirectory" */
|
||||
const char *s = strchr(path, ':');
|
||||
return s[1] == '\0';
|
||||
return s != NULL && s[1] == '\0';
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@@ -2088,6 +2088,7 @@ static int32 ReplaceVehicle(Vehicle **w, byte flags, int32 total_cost)
|
||||
new_v->service_interval = old_v->service_interval;
|
||||
new_front = true;
|
||||
new_v->unitnumber = old_v->unitnumber; // use the same unit number
|
||||
new_v->dest_tile = old_v->dest_tile;
|
||||
|
||||
new_v->current_order = old_v->current_order;
|
||||
if (old_v->type == VEH_Train && GetNextVehicle(old_v) != NULL){
|
||||
|
@@ -212,6 +212,7 @@ static void CALLBACK TrackMouseTimerProc(HWND hwnd, UINT msg, UINT event, DWORD
|
||||
static LRESULT CALLBACK WndProcGdi(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
static uint32 keycode = 0;
|
||||
static bool console = false;
|
||||
|
||||
switch (msg) {
|
||||
case WM_CREATE:
|
||||
@@ -363,6 +364,10 @@ static LRESULT CALLBACK WndProcGdi(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lP
|
||||
}
|
||||
#endif /* UNICODE */
|
||||
|
||||
case WM_DEADCHAR:
|
||||
console = GB(lParam, 16, 8) == 41;
|
||||
return 0;
|
||||
|
||||
case WM_CHAR: {
|
||||
uint scancode = GB(lParam, 16, 8);
|
||||
uint charcode = wParam;
|
||||
@@ -370,6 +375,13 @@ static LRESULT CALLBACK WndProcGdi(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lP
|
||||
/* Silently drop all non-text messages as those were handled by WM_KEYDOWN */
|
||||
if (wParam < VK_SPACE) return 0;
|
||||
|
||||
/* If the console key is a dead-key, we need to press it twice to get a WM_CHAR message.
|
||||
* But we then get two WM_CHAR messages, so ignore the first one */
|
||||
if (console && scancode == 41) {
|
||||
console = false;
|
||||
return 0;
|
||||
}
|
||||
|
||||
#if !defined(UNICODE)
|
||||
{
|
||||
wchar_t w;
|
||||
|
3
win32.c
3
win32.c
@@ -887,6 +887,9 @@ int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLi
|
||||
* save it because argv[] points into this buffer and thus needs to
|
||||
* be available between subsequent calls to FS2OTTD() */
|
||||
char cmdlinebuf[MAX_PATH];
|
||||
|
||||
/* Check if a win9x user started the win32 version */
|
||||
if (HASBIT(GetVersion(), 31)) error("This version of OpenTTD doesn't run on windows 95/98/ME.\nPlease download the win9x binary and try again.");
|
||||
#endif /* UNICODE */
|
||||
|
||||
cmdline = WIDE_TO_MB_BUFFER(GetCommandLine(), cmdlinebuf, lengthof(cmdlinebuf));
|
||||
|
11
window.h
11
window.h
@@ -348,6 +348,17 @@ typedef struct querystr_d {
|
||||
} querystr_d;
|
||||
assert_compile(WINDOW_CUSTOM_SIZE >= sizeof(querystr_d));
|
||||
|
||||
typedef struct chatquerystr_d {
|
||||
StringID caption;
|
||||
WindowClass wnd_class;
|
||||
WindowNumber wnd_num;
|
||||
Textbuf text;
|
||||
const char *orig;
|
||||
CharSetFilter afilter;
|
||||
int dest;
|
||||
} chatquerystr_d;
|
||||
assert_compile(WINDOW_CUSTOM_SIZE >= sizeof(chatquerystr_d));
|
||||
|
||||
typedef struct query_d {
|
||||
StringID caption;
|
||||
StringID message;
|
||||
|
@@ -117,7 +117,8 @@ public:
|
||||
while (true) {
|
||||
m_num_steps++;
|
||||
Node *n = m_nodes.GetBestOpenNode();
|
||||
if (n == NULL) break;
|
||||
if (n == NULL)
|
||||
break;
|
||||
|
||||
// if the best open node was worse than the best path found, we can finish
|
||||
if (m_pBestDestNode != NULL && m_pBestDestNode->GetCost() < n->GetCostEstimate())
|
||||
@@ -159,9 +160,9 @@ public:
|
||||
/** If path was found return the best node that has reached the destination. Otherwise
|
||||
* return the best visited node (which was nearest to the destination).
|
||||
*/
|
||||
FORCEINLINE Node& GetBestNode()
|
||||
FORCEINLINE Node* GetBestNode()
|
||||
{
|
||||
return (m_pBestDestNode != NULL) ? *m_pBestDestNode : *m_pBestIntermediateNode;
|
||||
return (m_pBestDestNode != NULL) ? m_pBestDestNode : m_pBestIntermediateNode;
|
||||
}
|
||||
|
||||
/** Calls NodeList::CreateNewNode() - allocates new node that can be filled and used
|
||||
|
@@ -59,11 +59,11 @@ public:
|
||||
|
||||
// some path found
|
||||
// get found depot tile
|
||||
Node& n = Yapf().GetBestNode();
|
||||
*depot_tile = n.GetLastTile();
|
||||
Node *n = Yapf().GetBestNode();
|
||||
*depot_tile = n->GetLastTile();
|
||||
|
||||
// walk through the path back to the origin
|
||||
Node* pNode = &n;
|
||||
Node *pNode = n;
|
||||
while (pNode->m_parent != NULL) {
|
||||
pNode = pNode->m_parent;
|
||||
}
|
||||
@@ -126,7 +126,7 @@ public:
|
||||
|
||||
// if path not found - return INVALID_TRACKDIR
|
||||
Trackdir next_trackdir = INVALID_TRACKDIR;
|
||||
Node* pNode = &Yapf().GetBestNode();
|
||||
Node *pNode = Yapf().GetBestNode();
|
||||
if (pNode != NULL) {
|
||||
// path was found or at least suggested
|
||||
// walk through the path back to the origin
|
||||
@@ -163,7 +163,7 @@ public:
|
||||
|
||||
// path was found
|
||||
// walk through the path back to the origin
|
||||
Node* pNode = &Yapf().GetBestNode();
|
||||
Node *pNode = Yapf().GetBestNode();
|
||||
while (pNode->m_parent != NULL) {
|
||||
pNode = pNode->m_parent;
|
||||
}
|
||||
|
@@ -278,7 +278,7 @@ public:
|
||||
|
||||
// if path not found - return INVALID_TRACKDIR
|
||||
Trackdir next_trackdir = INVALID_TRACKDIR;
|
||||
Node* pNode = &Yapf().GetBestNode();
|
||||
Node *pNode = Yapf().GetBestNode();
|
||||
if (pNode != NULL) {
|
||||
// path was found or at least suggested
|
||||
// walk through the path back to its origin
|
||||
@@ -320,7 +320,7 @@ public:
|
||||
|
||||
// if path not found - return distance = UINT_MAX
|
||||
uint dist = UINT_MAX;
|
||||
Node* pNode = &Yapf().GetBestNode();
|
||||
Node *pNode = Yapf().GetBestNode();
|
||||
if (pNode != NULL) {
|
||||
// path was found or at least suggested
|
||||
// get the path cost estimate
|
||||
@@ -362,8 +362,8 @@ public:
|
||||
|
||||
// some path found
|
||||
// get found depot tile
|
||||
Node& n = Yapf().GetBestNode();
|
||||
TileIndex depot_tile = n.m_segment_last_tile;
|
||||
Node *n = Yapf().GetBestNode();
|
||||
TileIndex depot_tile = n->m_segment_last_tile;
|
||||
assert(IsTileDepotType(depot_tile, TRANSPORT_ROAD));
|
||||
Depot* ret = GetDepotByTile(depot_tile);
|
||||
return ret;
|
||||
|
@@ -59,13 +59,13 @@ public:
|
||||
pf.SetOrigin(src_tile, trackdirs);
|
||||
pf.SetDestination(v->dest_tile, dest_trackdirs);
|
||||
// find best path
|
||||
bool bFound = pf.FindPath(v);
|
||||
pf.FindPath(v);
|
||||
|
||||
Trackdir next_trackdir = INVALID_TRACKDIR; // this would mean "path not found"
|
||||
if (bFound) {
|
||||
// path was found
|
||||
|
||||
Node* pNode = pf.GetBestNode();
|
||||
if (pNode != NULL) {
|
||||
// walk through the path back to the origin
|
||||
Node* pNode = &pf.GetBestNode();
|
||||
Node* pPrevNode = NULL;
|
||||
while (pNode->m_parent != NULL) {
|
||||
pPrevNode = pNode;
|
||||
|
Reference in New Issue
Block a user