1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-09-03 03:49:12 +00:00

Compare commits

..

1 Commits

Author SHA1 Message Date
rubidium
52abb70c44 (svn r9661) -Release 0.5.1-RC3. 2007-04-17 20:19:44 +00:00
47 changed files with 606 additions and 685 deletions

View File

@@ -268,7 +268,7 @@ ENDIAN_CHECK=endian_check$(EXE)
STRGEN=strgen/strgen$(EXE)
OSXAPP="OpenTTD.app"
REV := 0.5.2-RC1
REV := 0.5.1-RC3
# define flag to use for -lrt (some OSes overwrites this later for compatibility)
ifndef LRT

View File

@@ -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, 1 }, // 59 Accelerate to end of runway2
{ 136, 152, AMED_EXACTPOS, 5 }, // 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

View File

@@ -1,30 +1,3 @@
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)
@@ -1379,6 +1352,7 @@
0.2.1 (2004-04-04)
------------------------------------------------------------------------
- Fix: copy orders crashed if you clicked on a wagon
- Feature: 'A' hotkey now always opens autorail
- Change: Moved autorail button
@@ -1391,6 +1365,7 @@
0.2 (2004-04-03)
------------------------------------------------------------------------
- Feature: autoscroll (only works to left/right)
- Feature: train checkpoints, instead of ttdpatch's nonstop handling
- Feature: ttdpatch compatible nonstop handling
@@ -1451,6 +1426,7 @@
0.1.4 (2004-03-25)
------------------------------------------------------------------------
- Feature: crash submit system on win32
- Fix: train smoke clouds
- Fix: train engine sounds
@@ -1491,6 +1467,7 @@
0.1.3 (2004-03-18)
------------------------------------------------------------------------
- Fixed message options window
- Fixed company takeover/purchase
- Feature: Improved mouse scroll zooming
@@ -1514,6 +1491,7 @@
0.1.2 (2004-03-15)
------------------------------------------------------------------------
- Mouse wheel can be used to zoom in out on win32 (ludde)
- Implemented some support for resizing the window dynamically in win32 (ludde)
- Fixed tunnel mouse icon for maglev and monorail
@@ -1521,6 +1499,7 @@
0.1.1 (2004-03-14)
------------------------------------------------------------------------
- Preliminary presignal support
- Added external MIDI driver for unix version (by robertnorris)
- Added DirectMusic driver for Win32 version

View File

@@ -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() || IsTileType(tile, MP_VOID)) {
if (tile >= MapSize()) {
_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() || IsTileType(tile, MP_VOID)) {
if (tile >= MapSize()) {
_cmd_text = NULL;
return false;
}

View File

@@ -1216,20 +1216,16 @@ 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) %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" : "");
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]);
}
return true;

View File

@@ -1,6 +1,6 @@
.\" Hey, EMACS: -*- nroff -*-
.\" Please adjust this date whenever revising the manpage.
.Dd May 16, 2007
.Dd April 17, 2007
.Dt OPENTTD 6
.Sh NAME
.Nm openttd

View File

@@ -414,12 +414,6 @@ 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;
}

View File

@@ -64,10 +64,6 @@ 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;

View File

@@ -15,13 +15,16 @@ 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.2
Bugs for 0.5.1
------------------------------------------------------------------------
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
@@ -34,7 +37,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.
@@ -50,7 +53,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
@@ -59,11 +62,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
@@ -75,25 +78,30 @@ 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
-1212267 Station visited twice when servicing
-1244842 Multiplayer interface bug (0.4.0.1)
-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 :)
-1412031 fast forward scrolling is also fast forward :)
-1387424 overtake insolvent company is to cheap
-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
-1108046 Game freezes
-1160732 little bug with transparency
-1117731 Editor-StartingDate
-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

View File

@@ -3058,7 +3058,7 @@ STR_PURCHASE_INFO_ALL_BUT :Alles behalve {
########### String for New Landscape Generator
STR_GENERATE :{WHITE}Maak aan
STR_GENERATE :{WHITE}Creeër
STR_RANDOM :{BLACK}Willekeurig maken
STR_RANDOM_HELP :{BLACK}Wijzig het willekeurige getal voor terrein creatie
STR_WORLD_GENERATION_CAPTION :{WHITE}Wereld maken
@@ -3094,14 +3094,14 @@ STR_WORLD_GENERATION :{BLACK}Wereld m
STR_TREE_GENERATION :{BLACK}Bos plaatsing
STR_UNMOVABLE_GENERATION :{BLACK}Onverplaatsbare generatie
STR_CLEARING_TILES :{BLACK}Ruig en
STR_SETTINGUP_GAME :{BLACK}Spel aan het configureren
STR_SETTINGUP_GAME :{BLACK}Spel aan het instellen
STR_PREPARING_TILELOOP :{BLACK}Bezig met vlakken
STR_PREPARING_GAME :{BLACK}Voorbereiden spel
STR_DIFFICULTY_TO_CUSTOM :{WHITE}Deze aktie past de moeilijkheidsgraag aan naam custom
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}Maak nieuw scenario aan
STR_SE_NEW_WORLD :{BLACK}Creeër nieuw scenario
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

View File

@@ -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 puuviljaveok
STR_80A8_BALOGH_FRUIT_TRUCK :Balogh veeveok
STR_80A9_UHL_FRUIT_TRUCK :Uhl puuviljaveok
STR_80AA_KELLING_FRUIT_TRUCK :Kelling puuviljaveok
STR_80AB_BALOGH_RUBBER_TRUCK :Balogh kummiveok

View File

@@ -1887,8 +1887,8 @@ STR_4838_IMPROVED_FARMING_METHODS :{BLACK}{BIGFONT
STR_4839_PRODUCTION_DOWN_BY_50 :{BLACK}{BIGFONT}{INDUSTRY}: tuotanto vähenee 50{NBSP}%:lla.
STR_483A_INSECT_INFESTATION_CAUSES :{BLACK}{BIGFONT}{INDUSTRY}: hyönteisparvet aiheuttavat tuhoa!{}Tuotanto vähenee 50{NBSP}%:lla.
STR_483B_CAN_ONLY_BE_POSITIONED :{WHITE}...voidaan asettaa vain kartan reunoille.
STR_INDUSTRY_PROD_GOUP :{BLACK}{BIGFONT}{1:INDUSTRY} tuottaa {0:STRING} {2:COMMA}{NBSP}% entistä enemmän!
STR_INDUSTRY_PROD_GODOWN :{BLACK}{BIGFONT}{1:INDUSTRY} tuottaa {0:STRING} {2:COMMA}{NBSP}% entistä vähemmän!
STR_INDUSTRY_PROD_GOUP ::{BLACK}{BIGFONT}{1:INDUSTRY} tuottaa {0:STRING} {2:COMMA}{NBSP}% entistä enemmän!
STR_INDUSTRY_PROD_GODOWN ::{BLACK}{BIGFONT}{1:INDUSTRY} tuottaa {0:STRING} {2:COMMA}{NBSP}% entistä vähemmän!
##id 0x5000
STR_5000_TRAIN_IN_TUNNEL :{WHITE}Juna on tunnelissa.

View File

@@ -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 partita multigiocatore
STR_NETWORK_GAME_LOBBY :{WHITE}Stanza principale partite 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
@@ -2146,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 migliorino presto!
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_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}!

View File

@@ -730,7 +730,6 @@ STR_028C_PLACE_ROCKY_AREAS_ON_LANDSCAPE :{BLACK}Plasser
STR_028D_PLACE_LIGHTHOUSE :{BLACK}Plasser fyrtårn
STR_028E_PLACE_TRANSMITTER :{BLACK}Plasser radiosender
STR_028F_DEFINE_DESERT_AREA :{BLACK}Definer ørkenområde.{}Trykk og hold inne CTRL for å fjerne den
STR_CREATE_LAKE :{BLACK}Definer vannområde.{}Lag en kanal, untatt hvis CTRL holdes nede på havnivå, hvor områdene vil fylles istedenfor
STR_0290_DELETE :{BLACK}Slett
STR_0291_DELETE_THIS_TOWN_COMPLETELY :{BLACK}Slett denne byen fullstendig
STR_0292_SAVE_SCENARIO :Lagre scenario
@@ -1208,7 +1207,6 @@ STR_TREES_RANDOM_TYPE :{BLACK}Trær av
STR_TREES_RANDOM_TYPE_TIP :{BLACK}Plasser trær av tilfeldig type
STR_CANT_BUILD_CANALS :{WHITE}Kan ikke bygge kanaler her...
STR_BUILD_CANALS_TIP :{BLACK}Bygg kanaler.
STR_LANDINFO_CANAL :Kanal
STR_CANT_BUILD_LOCKS :{WHITE}Kan ikke bygge sluser her...

View File

@@ -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 for til spelet
STR_NETWORK_ERR_CLIENT_WRONG_PASSWORD :feil passord 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

View File

@@ -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 :EngineID (ordernação clássica)
STR_ENGINE_SORT_ENGINE_ID :Ordenaçã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}Alertar em caso de perda do combóio: {ORANGE}{STRING}
STR_CONFIG_PATCHES_WARN_LOST_TRAIN :{LTBLUE}Avisar quando comboios andam perdidos: {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 uma dica de medição ao utilizar várias ferramentas de construção: {ORANGE}{STRING}
STR_CONFIG_PATCHES_MEASURE_TOOLTIP :{LTBLUE}Mostrar medidas ao usar 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}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_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_8829_ORDERS :{WHITE}{VEHICLE} (Ordens)
STR_882A_END_OF_ORDERS :{SETX 10}- - Fim de Ordens - -
STR_FULLLOAD_OR_SERVICE :{SKIP}{SKIP}{STRING}

File diff suppressed because it is too large Load Diff

View File

@@ -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}Starý štýl
STR_01D7_NEW_STYLE :{TINYFONT}Nový štýl
STR_01D6_OLD_STYLE :{TINYFONT}Stary styl
STR_01D7_NEW_STYLE :{TINYFONT}Novy styl
STR_01D8_EZY_STREET :{TINYFONT}Ezy Street
STR_01D9_CUSTOM_1 :{TINYFONT}Vlastné 1
STR_01DA_CUSTOM_2 :{TINYFONT}Vlastné 2
STR_01D9_CUSTOM_1 :{TINYFONT}Vlastne 1
STR_01DA_CUSTOM_2 :{TINYFONT}Vlastne 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}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_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_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}Náhodne
STR_01E9_SHUFFLE :{TINYFONT}Nahodne
STR_01EA_PROGRAM :{TINYFONT}{BLACK}Program
STR_01EB_MUSIC_PROGRAM_SELECTION :{WHITE}Výber hudobného programu
STR_01EB_MUSIC_PROGRAM_SELECTION :{WHITE}Vyber hudobneho programu
STR_01EC_0 :{TINYFONT}{LTBLUE}0{COMMA} "{STRING}"
STR_01ED :{TINYFONT}{LTBLUE}{COMMA} "{STRING}"
STR_01EE_TRACK_INDEX :{TINYFONT}{BLACK}Císlo stopy
STR_01EE_TRACK_INDEX :{TINYFONT}{BLACK}Cislo stopy
STR_01EF_PROGRAM :{TINYFONT}{BLACK}Program - '{STRING}'
STR_01F0_CLEAR :{TINYFONT}{BLACK}Zmazat
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_01F1_SAVE :{TINYFONT}{BLACK}Ulozit
STR_01F2_CURRENT_PROGRAM_OF_MUSIC :{BLACK}Aktualny program
STR_01F3_SELECT_ALL_TRACKS_PROGRAM :{BLACK}Vybrat 'Vsetko'
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

View File

@@ -1671,7 +1671,7 @@ STR_TOWN_BRIBE_THE_LOCAL_AUTHORITY :Muta de lokala
STR_204D_INITIATE_A_SMALL_LOCAL :{WHITE}{STRING}{}{YELLOW} Starta en liten lokal reklamkampanj, för att attrahera fler passagerare och gods till dina tranporttjänster.{} Kostnad: {CURRENCY}
STR_204E_INITIATE_A_MEDIUM_LOCAL :{WHITE}{STRING}{}{YELLOW} Starta en mellanstor lokal reklamkampanj, för att attrahera fler passagerare och gods till dina tranporttjänster.{} Kostnad: {CURRENCY}
STR_204F_INITIATE_A_LARGE_LOCAL :{WHITE}{STRING}{}{YELLOW} Starta en stor lokal reklamkampanj, för att attrahera fler passagerare och gods till dina tranporttjänster.{} Kostnad: {CURRENCY}
STR_2050_FUND_THE_RECONSTRUCTION :{WHITE}{STRING}{}{YELLOW} Bekosta ombyggnad av stadens vägnätverk. Orsakar ansenliga störningar för vägtrafik i upp till 6 månader.{} Kostnad: {CURRENCY}
STR_2050_FUND_THE_RECONSTRUCTION :{WHITE}{STRING}{}{YELLOW} Bekosta ombyggnad av stadens vägnätverk. Orsakar ansenlig splittring för vägtrafik upp till 6 månader.{} Kostnad: {CURRENCY}
STR_2051_BUILD_A_STATUE_IN_HONOR :{WHITE}{STRING}{}{YELLOW} Bygg en staty i ditt företags ära.{} Kostnad: {CURRENCY}
STR_2052_FUND_THE_CONSTRUCTION_OF :{WHITE}{STRING}{}{YELLOW} Bekosta uppbyggnad av nya kommersiella byggnader i staden.{} Kostnad: {CURRENCY}
STR_2053_BUY_1_YEAR_S_EXCLUSIVE :{WHITE}{STRING}{}{YELLOW} Köp 1 års exklusiv transporträttighet i staden. Stadens myndigheter kommer bara tillåta passagerare och gods till användning för ditt företags stationer.{} Kostnad: {CURRENCY}

View File

@@ -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 :鋼鐵
@@ -37,7 +37,7 @@ STR_001D_DIAMONDS :鑽石
STR_001E_FOOD :食物
STR_001F_PAPER :紙
STR_0020_GOLD :金塊
STR_0021_WATER :
STR_0021_WATER :飲用
STR_0022_WHEAT :小麥
STR_0023_RUBBER :橡膠
STR_0024_SUGAR :砂糖
@@ -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 :鋼鐵
@@ -69,7 +69,7 @@ STR_003D_DIAMOND :鑽石
STR_003E_FOOD :食品
STR_003F_PAPER :紙張
STR_0040_GOLD :金塊
STR_0041_WATER :
STR_0041_WATER :飲用
STR_0042_WHEAT :小麥
STR_0043_RUBBER :橡膠
STR_0044_SUGAR :砂糖
@@ -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 :11
STR_016D_DEC :12
STR_016C_NOV :十一月
STR_016D_DEC :十二月
############ 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}直升機場

View File

@@ -7,7 +7,7 @@
extern const char _openttd_revision[];
#elif defined(WITH_REV_HACK)
#define WITH_REV
const char _openttd_revision[] = "0.5.2-RC1";
const char _openttd_revision[] = "0.5.1-RC3";
#else
const char _openttd_revision[] = NOREV_STRING;
#endif
@@ -1397,13 +1397,11 @@ 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

View File

@@ -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);
// uint16: Destination Player
// uint8: Destination Player (1..MAX_PLAYERS)
// 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_uint16(p, dest);
NetworkSend_uint8(p, dest);
NetworkSend_string(p, msg);
NetworkSend_Packet(p, MY_CLIENT);
}

View File

@@ -1479,7 +1479,7 @@ void ShowJoinStatusWindowAfterJoin(void)
AllocateWindowDesc(&_network_join_status_window_desc);
}
static void SendChat(const char *buf, DestType type, int dest)
static void SendChat(const char *buf, DestType type, byte 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, chatquerystr_d).text;
Textbuf *tb = &WP(w, querystr_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, chatquerystr_d).text);
UpdateTextBufferSize(&WP(w, querystr_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, chatquerystr_d).text);
UpdateTextBufferSize(&WP(w, querystr_d).text);
SetWindowDirty(w);
}
free(pre_buf);
}
/*
* uses chatquerystr_d WP macro
* uses chatquerystr_d->caption to store type of chat message (Private/Team/All)
*/
/* 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 */
static void ChatWindowWndProc(Window *w, WindowEvent *e)
{
switch (e->event) {
@@ -1644,8 +1644,8 @@ static void ChatWindowWndProc(Window *w, WindowEvent *e)
DrawWindowWidgets(w);
assert(WP(w, chatquerystr_d).caption < lengthof(chat_captions));
msg = chat_captions[WP(w, chatquerystr_d).caption];
assert(GB(WP(w, querystr_d).caption, 0, 8) < lengthof(chat_captions));
msg = chat_captions[GB(WP(w, querystr_d).caption, 0, 8)];
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 = (DestType)WP(w, chatquerystr_d).caption;
int dest = WP(w, chatquerystr_d).dest;
SendChat(WP(w, chatquerystr_d).text.buf, type, dest);
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);
} /* 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 = (DestType)WP(w, chatquerystr_d).caption;
int dest = WP(w, chatquerystr_d).dest;
SendChat(WP(w, chatquerystr_d).text.buf, type, dest);
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);
} /* FALLTHROUGH */
case 2: /* Escape */ DeleteWindow(w); break;
}
@@ -1704,7 +1704,7 @@ static const WindowDesc _chat_window_desc = {
ChatWindowWndProc
};
void ShowNetworkChatQueryWindow(DestType type, int dest)
void ShowNetworkChatQueryWindow(DestType type, byte dest)
{
Window *w;
@@ -1716,12 +1716,11 @@ void ShowNetworkChatQueryWindow(DestType type, int dest)
w = AllocateWindowDesc(&_chat_window_desc);
LowerWindowWidget(w, 2);
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);
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);
}
#endif /* ENABLE_NETWORK */

View File

@@ -9,7 +9,7 @@
void ShowNetworkNeedPassword(NetworkPasswordType npt);
void ShowNetworkGiveMoneyWindow(byte player); // PlayerID
void ShowNetworkChatQueryWindow(DestType type, int dest);
void ShowNetworkChatQueryWindow(DestType type, byte 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, int dest) {}
static inline void ShowNetworkChatQueryWindow(byte desttype, byte dest) {}
static inline void ShowClientList(void) {}
static inline void ShowJoinStatusWindowAfterJoin(void) {}
static inline void ShowNetworkGameWindow(void) {}

View File

@@ -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_uint16(cs, p);
int dest = NetworkRecv_uint8(cs, p);
char msg[MAX_TEXT_MSG_LEN];
NetworkRecv_string(cs, p, msg, MAX_TEXT_MSG_LEN);

120
newgrf.c
View File

@@ -2096,73 +2096,79 @@ static void FeatureNewName(byte *buf, int len)
len -= (int)name_length;
DEBUG(grf, 8) ("FeatureNewName: %d <- %s", id, name);
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);
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);
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;
}
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
}
}
}
}

View File

@@ -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 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_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_MUL: return last_value * value; \
case DSGA_OP_AND: return last_value & value; \
case DSGA_OP_OR: return last_value | value; \

View File

@@ -602,7 +602,6 @@ 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);
@@ -616,21 +615,15 @@ 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;
/* Make a space from a newline, but ignore multiple newlines */
if (c == '\n' && c_last != '\n') {
dest[0] = ' ';
dest++;
} else if (c == '\r') {
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';

View File

@@ -344,9 +344,6 @@ 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 */
@@ -1514,7 +1511,6 @@ 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) {

View File

@@ -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 non dedicated network_servers! */
if (!_players[0].is_active && (!_networking || (_networking && _network_server && !_network_dedicated)))
// But this exeption is not true for network_servers!
if (!_players[0].is_active && (!_networking || (_networking && _network_server)))
DoStartupNewPlayer(false);
DoZoomInOutWindow(ZOOM_NONE, w); // update button status

View File

@@ -1,20 +1,8 @@
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 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 Apr 2007 22:00:46 +0100
-- Matthijs Kooijman <m.kooijman@student.utwente.nl> Tue, 17 Aprr 2007 22:00:46 +0100
openttd (0.5.1~rc2-1) unstable; urgency=low

View File

@@ -1,6 +1,6 @@
!define APPNAME "OpenTTD" ; Define application name
!define APPVERSION "0.5.2" ; Define application version
!define INSTALLERVERSION 33 ; NEED TO UPDATE THIS FOR EVERY RELEASE!!!
!define APPVERSION "0.5.1" ; Define application version
!define INSTALLERVERSION 31 ; NEED TO UPDATE THIS FOR EVERY RELEASE!!!
!define APPURLLINK "http://www.openttd.org"
!define APPNAMEANDVERSION "${APPNAME} ${APPVERSION}"

View File

@@ -84,7 +84,7 @@ 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.2-RC1\0"
VALUE "FileVersion", "0.5.1-RC3\0"
VALUE "InternalName", "openttd\0"
VALUE "LegalCopyright", "Copyright <20> OpenTTD Developers 2002-2007. All Rights Reserved.\0"
VALUE "LegalTrademarks", "\0"

View File

@@ -1,6 +1,6 @@
OpenTTD README
Last updated: 2007-05-16
Release version: 0.5.2-RC1
Last updated: 2007-04-17
Release version: 0.5.1-RC3
------------------------------------------------------------------------

View File

@@ -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,30 +1218,29 @@ 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_OMANY("server_lang", SLE_UINT8, S, 0, _network_game_info.server_lang, 0, 3, "ANY|ENGLISH|GERMAN|FRENCH", 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_END()
};
#endif /* ENABLE_NETWORK */

View File

@@ -200,7 +200,6 @@ 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 */

View File

@@ -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 & ~1, GB(p2, 0, 4));
MakeRailStation(tile, st->owner, st->index, axis, layout, 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 & ~1) + axis);
if (callback != CALLBACK_FAILED && callback < 8) SetStationGfx(tile, callback + axis);
}
tile += tile_delta;

View File

@@ -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 | DC_NO_WATER, CMD_LANDSCAPE_CLEAR))) {
if (!CmdFailed(DoCommand(tile, 0, 0, DC_AUTO, CMD_LANDSCAPE_CLEAR))) {
DoCommand(tile, GenRandomRoadBits(), t->index, DC_EXEC | DC_AUTO, CMD_BUILD_ROAD);
_current_player = old_player;
return true;

View File

@@ -675,7 +675,7 @@ static int32 DoClearBridge(TileIndex tile, uint32 flags)
endtile = GetOtherBridgeEnd(tile);
if (!EnsureNoVehicle(tile) || !EnsureNoVehicle(endtile)) return CMD_ERROR;
if (!EnsureNoVehicleOnGround(tile) || !EnsureNoVehicleOnGround(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 (!EnsureNoVehicle(tile) ||
!EnsureNoVehicle(endtile) ||
if (!EnsureNoVehicleOnGround(tile) ||
!EnsureNoVehicleOnGround(endtile) ||
FindVehicleBetween(tile, endtile, GetBridgeHeightRamp(tile), false) != NULL) {
return_cmd_error(STR_8803_TRAIN_IN_THE_WAY);
}

View File

@@ -2088,7 +2088,6 @@ 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){

View File

@@ -212,7 +212,6 @@ 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:
@@ -364,10 +363,6 @@ 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;
@@ -375,13 +370,6 @@ 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;

View File

@@ -887,9 +887,6 @@ 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));

View File

@@ -348,17 +348,6 @@ 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;

View File

@@ -117,8 +117,7 @@ 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())
@@ -160,9 +159,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

View File

@@ -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;
}

View File

@@ -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;

View File

@@ -59,13 +59,13 @@ public:
pf.SetOrigin(src_tile, trackdirs);
pf.SetDestination(v->dest_tile, dest_trackdirs);
// find best path
pf.FindPath(v);
bool bFound = pf.FindPath(v);
Trackdir next_trackdir = INVALID_TRACKDIR; // this would mean "path not found"
Node* pNode = pf.GetBestNode();
if (pNode != NULL) {
if (bFound) {
// path was found
// walk through the path back to the origin
Node* pNode = &pf.GetBestNode();
Node* pPrevNode = NULL;
while (pNode->m_parent != NULL) {
pPrevNode = pNode;