1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-15 02:29:10 +00:00

Compare commits

...

22 Commits

Author SHA1 Message Date
Darkvater
4e11b36000 (svn r5862) - Prepare 0.4 branch for release. Update readme's, bugs, installers, changelog, etc. to 0.4.8 2006-08-12 12:35:23 +00:00
Darkvater
2452a20e07 (svn r5861) - Backport from trunk (r5839):
A ship in a depot must be stopped before allowed to be cloned (copied ship.h from trunk).
2006-08-12 12:22:38 +00:00
Darkvater
ffa39381d9 (svn r5858) - Backport from trunk (r5801):
The exception dialog showed the last modification-date of win32.c instead of the
  last compilation-date.
2006-08-12 12:13:08 +00:00
Darkvater
f2e4b69d5c (svn r5857) - Backport from trunk (r5800):
When directories were changed in 'Play Scenario', pressing 'New Game' showed
  scenarios from that directory, not the default one.
2006-08-12 12:11:54 +00:00
Darkvater
a597fd50e6 (svn r5856) - Backport from trunk (r3598):
Suppress invalid warning by assigning value to variable
2006-08-12 12:01:20 +00:00
Darkvater
6f920cee6c (svn r5678) - Prepare 0.4 branch for release. Update readme's, bugs, installers, changelog, etc. to 0.4.8-RC2 2006-07-31 15:49:12 +00:00
Darkvater
bd736e240a (svn r5674) - Backport from trunk (r5664):
Certain combinations of trains crash when moved around inside the depot.
2006-07-31 12:12:14 +00:00
Darkvater
6c3eedee86 (svn r5673) - Backport from trunk (r5655):
Reversed arrow-sign in the multiplayer list column headers on sort by name
2006-07-31 12:11:14 +00:00
Darkvater
9214c5e0a5 (svn r5672) - Backport from trunk (r5652):
Industry production change button doesn't work for oilrig passangers.
2006-07-31 12:10:20 +00:00
Darkvater
6af2e64186 (svn r5671) - Backport from trunk (r5504, r5512):
Added Italian town name generator. While not a fix, it is added along the same lines
  as the turkish town names. Official translation > official townnames (if existing).
2006-07-31 12:08:08 +00:00
Darkvater
58b4fd7683 (svn r5669) - Backport from trunk (r5464, r3641):
Codechange: verify the presence of music files in the gm folder. Slightly altered r5464
  to exclude the addition of music.c and left out the extra functionality. While in essence
  this is not a true fix, several people have reported a rising CPU usage because Dmusic
  kept indefinitely looping the file list. This should solve that.
2006-07-31 11:50:23 +00:00
Darkvater
f3cce610c8 (svn r5668) - Backport from trunk (r5454):
Helicopters stopping in depot after autorenew/autoreplace
2006-07-31 11:29:18 +00:00
Darkvater
5c30032fe5 (svn r5666) - Backport from trunk (Webtranslator2):
Language changes. Galician has 28 untranslated strings.
2006-07-30 23:43:47 +00:00
tron
6708e181eb (svn r5499) Fix a case of an uninitialised variable in r5368 which caused some graphical glitches at foundations (wrong foundation borders, flickering)
This problem only exists in the backport
2006-07-15 09:21:29 +00:00
truelight
d81a7bf904 (svn r5498) -Fix: in r4677, Darkvater ported patch r4508 from trunk wrongly into the 0.4 branch. Because of that stations no longer delivered goods to industries if they were more then 2 tiles away, instead of the allowed station_spread * 2. 2006-07-14 18:45:31 +00:00
truelight
9c95e99871 (svn r5492) -Backport (r5491) -Fix: [#9] MorphOS crashed when you go a level up on root level (tokai) 2006-07-13 18:20:51 +00:00
truelight
8ecd975951 (svn r5490) -Backport (r5489) -Fix: corrected tokai's name and morphos details (tokai) 2006-07-13 17:58:55 +00:00
truelight
955d4393e0 (svn r5488) -Backport (r5487) -Fix: [#8] UDP sockets were used even if network-availability was set to false (tokai) 2006-07-13 17:54:57 +00:00
bjarni
f0ba57ea82 (svn r5440) -Backport: rev 5428 -Fix: [vehicles] sovled crash when trying to build a vehicle type, that is set to max 0 (spotted by roboman) 2006-07-01 10:46:50 +00:00
bjarni
ebae6200c0 (svn r5439) -Backport [OSX] rev 5438 -Code cleanup [OSX] removed UNIVERSAL_BINARY as a phony target since the target is long gone. Also corrected BUILD_OSX_BUNDLE as phony target
also corrected two $(BUILD_OSX_BUNDLE) to BUILD_OSX_BUNDLE, so the bundle will always build
2006-07-01 10:44:32 +00:00
47fc5a070b (svn r5424) - Correct typo in the date of the man file 2006-06-29 05:54:16 +00:00
Darkvater
a22933719b (svn r5414) Also update the readme file to 0.4.8 2006-06-28 23:04:03 +00:00
51 changed files with 574 additions and 144 deletions

View File

@@ -386,8 +386,8 @@ int32 CmdStartStopAircraft(int x, int y, uint32 flags, uint32 p1, uint32 p2)
* @param p1 vehicle ID to send to the hangar
* @param p2 various bitmasked elements
* - p2 = 0 - aircraft goes to the depot and stays there (user command)
* - p2 non-zero - aircraft will try to goto a depot, but not stop there (eg forced servicing)
* - p2 (bit 17) - aircraft will try to goto a depot at the next airport
* - p2 (bit 16) - aircraft will try to goto a depot, but not stop there (eg autorenew or autoreplace)
* - p2 (bit 17) - aircraft will try to goto a depot at the airport specified by low word of p2 XXX - Not Used
*/
int32 CmdSendAircraftToHangar(int x, int y, uint32 flags, uint32 p1, uint32 p2)
{
@@ -408,11 +408,11 @@ int32 CmdSendAircraftToHangar(int x, int y, uint32 flags, uint32 p1, uint32 p2)
}
} else {
bool next_airport_has_hangar = true;
/* If bit 17 is set, next airport is specified by low word of p2, otherwise it's the target airport */
/* XXX - I don't think p2 is any valid station cause all calls use either 0, 1, or 1<<16!!!!!!!!! */
StationID next_airport_index = (HASBIT(p2, 17)) ? (StationID)p2 : v->u.air.targetairport;
const Station *st = GetStation(next_airport_index);
// If an airport doesn't have terminals (so no landing space for airports),
// it surely doesn't have any hangars
/* If the station is not a valid airport or if it has no hangars */
if (!IsValidStation(st) || st->airport_tile == 0 || GetAirport(st->airport_type)->nof_depots == 0) {
StationID station;
@@ -1440,12 +1440,14 @@ static void AircraftEventHandler_HeliTakeOff(Vehicle *v, const AirportFTAClass *
AircraftNextAirportPos_and_Order(v);
// check if the aircraft needs to be replaced or renewed and send it to a hangar if needed
// unless it is due for renewal but the engine is no longer available
if (v->owner == _local_player && (
EngineHasReplacementForPlayer(p, v->engine_type) ||
(p->engine_renew && v->age - v->max_age > p->engine_renew_months * 30)
((p->engine_renew && v->age - v->max_age > p->engine_renew_months * 30) &&
HASBIT(GetEngine(v->engine_type)->player_avail, _local_player))
)) {
_current_player = _local_player;
DoCommandP(v->tile, v->index, 1, NULL, CMD_SEND_AIRCRAFT_TO_HANGAR | CMD_SHOW_NO_ERROR);
DoCommandP(v->tile, v->index, 1 << 16, NULL, CMD_SEND_AIRCRAFT_TO_HANGAR | CMD_SHOW_NO_ERROR);
_current_player = OWNER_NONE;
}
}

View File

@@ -1,3 +1,19 @@
0.4.8 (2006-08-12)
------------------------------------------------------------------------
- Fix: A ship in a depot must be stopped before it can be cloned.
- Fix: After changing directory in 'Play Scenario', the default scenarios didn't show up in 'New Game'
0.4.8-RC2 (2006-07-31)
------------------------------------------------------------------------
- Feature: Add Italian town names as we have an official Italian translation
- Codechange: Verify the presence of music files in the gm/ folder. This should also solve some 100% CPU buildup for some users.
- Fix: Certain combinations of trains crash when moved around inside the depot.
- Fix: Reversed arrow-sign in the multiplayer list column headers on sort by name
- Fix: Industry production change button doesn't work for oilrig passangers.
- Fix: Helicopters stopping in depot after autorenew/autoreplace
- Fix: MorphOS crashes when you go a level up in the root level
- Fix: UDP sockets were used even if network-availability was set to false
- Fix: Crash when trying to build a vehicle type that is set to a max of zero
0.4.8-RC1 (2006-06-28)
------------------------------------------------------------------------
- Feature: Add Turkish town names as we have an official Turkish translation

View File

@@ -1,6 +1,6 @@
.\" Hey, EMACS: -*- nroff -*-
.\" Please adjust this date whenever revising the manpage.
.Dd March June 28, 2006
.Dd August 12, 2006
.Dt OPENTTD 6
.Sh NAME
.Nm openttd

View File

@@ -1148,7 +1148,7 @@ static void DeliverGoodsToIndustry(TileIndex xy, byte cargo_type, int num_pieces
== ind->accepts_cargo[1] || cargo_type == ind->accepts_cargo[2]) &&
ind->produced_cargo[0] != CT_INVALID &&
ind->produced_cargo[0] != cargo_type &&
(t = DistanceManhattan(ind->xy, xy)) < 2) {
(t = DistanceManhattan(ind->xy, xy)) < u) {
u = t;
best = ind;
}

View File

@@ -345,7 +345,7 @@ static void IndustryViewWndProc(Window *w, WindowEvent *e)
x = e->click.pt.x;
line = (e->click.pt.y - 127) / 10;
if (e->click.pt.y >= 127 && IS_INT_INSIDE(line, 0, 2) && i->produced_cargo[line]) {
if (e->click.pt.y >= 127 && IS_INT_INSIDE(line, 0, 2) && i->produced_cargo[line] != CT_INVALID) {
if (IS_INT_INSIDE(x, 5, 25) ) {
// clicked buttons
if (x < 15) {

View File

@@ -23,36 +23,30 @@ URL: http://bugs.openttd.org
-73 vehicle selection bug
-66 wagon re-fitting
-65 short wagons bug
-52 desync when server saves game (on slow hardware)
-51 Windows doesn't support CUSTOM_LANG_DIR
-50 Trains chosing an alternative path when encountering a 1-way presignal instead of waiting
-47 Low rating calculation and cargo loading priority
-20 Low Saving files when run from gdb 2005-12-06 Unconfirmed
- 9 Low [MorphOS] write to NULL when going to device root in filerequester 2005-11-28 Assigned Christian Rosentreter
------------------------------------------------------------------------
URL: http://sourceforge.net/tracker/?atid=636365&group_id=103924&func=browse
-1436419 Vehicles profits gone negitive.......bug
-1459262 Towns building too many roads way too long now
-1458995 Another bug with smooth_economy
-1436419 Vehicles profits gone negative.......bug
-1434000 Error in Transfer-Function
-1427531 Newspapers problem
-1417453 Makefile and Variables issue
-1397638 Economics bug?
-1395628 Trackpad panning/scrolling broken
-1394799 Dual headed engines disagreement
-1393415 NPF & one-way sigs
-1389999 Child windows not sticking
-1389986 Shares problem (nightly 3330)
-1362784 Incorrect vehicule profit calcul with inflation on
-1299162 Music volume too low
-1250094 Towns Shrink when center tile is built on
-1244842 Multiplayer interface bug (0.4.0.1)
-1212267 station visited twice when servicing
-1211764 AI companies behave weird on the stock market
-1208170 Duplicate station names can be created
-1197116 Some stations are cargo-less
-1188897 Station with cargo enroute_from INVALID_STATION
-1181888 Invaild Station Order => Crash
-1174829 Waypoint / Orders Bug
-1168820 Some mouse and keyboard events are lost
-1167810 Cargo payment after deleting stations (st->xy = 0)
@@ -64,32 +58,20 @@ Minor Bugs for 0.4.8
------------------------------------------------------------------------
URL: http://sourceforge.net/tracker/?atid=669662&group_id=103924&func=browse
-1424115 Reversed arrow sign in list view column headers
-1412031 fast forward scrolling is also fast forward :)
-1387424 overtake insolvent company is to cheap
-1382782 Loan interest calculated 'wrong'
-1372891 Performance loss with NTP & NPF
-1296259 Autosave override for multiplayer games
-1242753 Town population minus 10
-1236320 Bug in main menu allows moving screen
-1201284 permanent hilight in a depot
-1193870 keep the date counter running
-1185852 Scrollbars get arbitrarily small
-1184634 Replace vehicles window bug
-1183253 Incorrect Load vs Loading Sprites
-1183251 Hangar sprite does not update when refit.
-1160732 little bug with transparency
-1117731 Editor-StartingDate
-1114237 Wrong autoreplace hint
-1108046 game freezes
-1106889 Chat Interface enhancements
-1104358 train lost message - history
-1102174 Bug if 3 people buy 25% shares in one company
-1087407 wrong message in history
-1084620 Minor bug considering buses/trucks
-1034310 color mauve in diagrams
-1030661 It's possible to build a tunnel under oil wells
-1009171 Canals and locks at sea level cause flooding
-0993516 Canal + bouy -> wrong graphics.
-0987891 Large UFO destruction bug
-0987883 Aircraft landing/taking off

View File

@@ -193,6 +193,7 @@ static Slope GetFoundationSlope(TileIndex tile, uint* z)
FindLandscapeHeightByTile(&ti, tile);
tileh = ti.tileh;
*z = ti.z;
slope = _tile_type_procs[GetTileType(tile)]->get_slope_tileh_proc(&ti);
// Flatter slope -> higher base height

View File

@@ -839,6 +839,7 @@ STR_TOWNNAME_CZECH :Czech
STR_TOWNNAME_SWISS :Swiss
STR_TOWNNAME_DANISH :Danish
STR_TOWNNAME_TURKISH :Turkish
STR_TOWNNAME_ITALIAN :Italian
############ end of townname region
STR_CURR_GBP :Pounds (<28>)

View File

@@ -838,6 +838,7 @@ STR_TOWNNAME_ROMANIAN :Romeno
STR_TOWNNAME_CZECH :Checo
STR_TOWNNAME_SWISS :Sui<75>a
STR_TOWNNAME_DANISH :Dinamarqu<71>s
STR_TOWNNAME_TURKISH :Turco
############ end of townname region
STR_CURR_GBP :Libras (<28>)
@@ -1249,6 +1250,7 @@ STR_NETWORK_7_PLAYERS :7 jogadores
STR_NETWORK_8_PLAYERS :8 jogadores
STR_NETWORK_9_PLAYERS :9 jogadores
STR_NETWORK_10_PLAYERS :10 jogadores
STR_NETWORK_NUMBER_OF_COMPANIES :{BLACK}Limite de companhias:
STR_NETWORK_NUMBER_OF_COMPANIES_TIP :{BLACK}Limita o servidor para um certo valor de companhias
STR_NETWORK_COMBO3 :{BLACK}{SKIP}{SKIP}{SKIP}{SKIP}{SKIP}{SKIP}{SKIP}{SKIP}{SKIP}{SKIP}{SKIP}{STRING}
STR_NETWORK_NUMBER_OF_SPECTATORS :{BLACK}Max espectadores:
@@ -1449,6 +1451,7 @@ STR_RAILROAD_TRACK_WITH_COMBOSIGNALS :Ferrovia com si
##id 0x1800
STR_1800_LAND_SLOPED_IN_WRONG_DIRECTION :{WHITE}Terreno inclinado na dire<72><65>o incorreta para a estrada
STR_1801_MUST_REMOVE_ROAD_FIRST :{WHITE}Dever<65> remover a estrada primeiro
STR_ROAD_WORKS_IN_PROGRESS :{WHITE}Trabalhos em ruas em progresso
STR_1802_ROAD_CONSTRUCTION :{WHITE}Construir Estradas
STR_1803_SELECT_ROAD_BRIDGE :{WHITE}Selecionar Ponte de Estrada
STR_1804_CAN_T_BUILD_ROAD_HERE :{WHITE}N<>o <20> poss<73>vel construir estrada aqui...

View File

@@ -1451,6 +1451,7 @@ STR_RAILROAD_TRACK_WITH_COMBOSIGNALS :V
##id 0x1800
STR_1800_LAND_SLOPED_IN_WRONG_DIRECTION :{WHITE}Terreny inclinat en direcci<63> incorrecta per la carretera
STR_1801_MUST_REMOVE_ROAD_FIRST :{WHITE}S'ha de treure la carretera primer
STR_ROAD_WORKS_IN_PROGRESS :{WHITE}Obres en progr<67>s
STR_1802_ROAD_CONSTRUCTION :{WHITE}Construcci<63> de Carreteres
STR_1803_SELECT_ROAD_BRIDGE :{WHITE}Selecciona Pont per Carretera
STR_1804_CAN_T_BUILD_ROAD_HERE :{WHITE}No es pot construir carretera aqui...

View File

@@ -896,6 +896,7 @@ STR_TOWNNAME_CZECH :Ceska
STR_TOWNNAME_SWISS :<3A>v<EFBFBD>carsk<73>
STR_TOWNNAME_DANISH :D<>nsk<73>
STR_TOWNNAME_TURKISH :Tureck<63>
STR_TOWNNAME_ITALIAN :Italsk<73>
############ end of townname region
STR_CURR_GBP :Libry (<28>)

View File

@@ -1451,6 +1451,7 @@ STR_RAILROAD_TRACK_WITH_COMBOSIGNALS :Togskinner med
##id 0x1800
STR_1800_LAND_SLOPED_IN_WRONG_DIRECTION :{WHITE}Landet h<>lder i en forkert retning til byggning af vej
STR_1801_MUST_REMOVE_ROAD_FIRST :{WHITE}Det er n<>dvendigt at fjerne vejen f<>rst
STR_ROAD_WORKS_IN_PROGRESS :{WHITE}Vejarbejde er i gang
STR_1802_ROAD_CONSTRUCTION :{WHITE}Vej Konstruktion
STR_1803_SELECT_ROAD_BRIDGE :{WHITE}V<>lg vejbro
STR_1804_CAN_T_BUILD_ROAD_HERE :{WHITE}Kan ikke bygge vej her...

View File

@@ -839,6 +839,7 @@ STR_TOWNNAME_CZECH :Tsjechisch
STR_TOWNNAME_SWISS :Zwitsers
STR_TOWNNAME_DANISH :Deens
STR_TOWNNAME_TURKISH :Turks
STR_TOWNNAME_ITALIAN :Italiaans
############ end of townname region
STR_CURR_GBP :Pond (<28>)

View File

@@ -839,6 +839,7 @@ STR_TOWNNAME_CZECH :Czech
STR_TOWNNAME_SWISS :Swiss
STR_TOWNNAME_DANISH :Danish
STR_TOWNNAME_TURKISH :Turkish
STR_TOWNNAME_ITALIAN :Italian
############ end of townname region
STR_CURR_GBP :Pounds (<28>)

View File

@@ -839,6 +839,7 @@ STR_TOWNNAME_CZECH :T
STR_TOWNNAME_SWISS :<3A>veitsi
STR_TOWNNAME_DANISH :Taani
STR_TOWNNAME_TURKISH :T<>rgi
STR_TOWNNAME_ITALIAN :Itaalia
############ end of townname region
STR_CURR_GBP :Naelad (<28>)
@@ -1451,6 +1452,7 @@ STR_RAILROAD_TRACK_WITH_COMBOSIGNALS :Raudtee kombo-s
##id 0x1800
STR_1800_LAND_SLOPED_IN_WRONG_DIRECTION :{WHITE}Maapind on tee ehitamiseks sobimatu kaldega
STR_1801_MUST_REMOVE_ROAD_FIRST :{WHITE}Enne on vaja tee eemaldada
STR_ROAD_WORKS_IN_PROGRESS :{WHITE}Tee ehitus k<>ib
STR_1802_ROAD_CONSTRUCTION :{WHITE}Tee ehitamine
STR_1803_SELECT_ROAD_BRIDGE :{WHITE}Vali sillat<61><74>p
STR_1804_CAN_T_BUILD_ROAD_HERE :{WHITE}Siia ei saa teed ehitada...

View File

@@ -1451,6 +1451,7 @@ STR_RAILROAD_TRACK_WITH_COMBOSIGNALS :Rautatie yhdist
##id 0x1800
STR_1800_LAND_SLOPED_IN_WRONG_DIRECTION :{WHITE}Maa viett<74><74> v<><76>r<EFBFBD><72>n suuntaan.
STR_1801_MUST_REMOVE_ROAD_FIRST :{WHITE}Tie pit<69><74> siirt<72><74> ensin.
STR_ROAD_WORKS_IN_PROGRESS :{WHITE}Tiety<74>t ovat k<>ynniss<73>.
STR_1802_ROAD_CONSTRUCTION :{WHITE}Tien rakentaminen
STR_1803_SELECT_ROAD_BRIDGE :{WHITE}Valitse maantiesilta
STR_1804_CAN_T_BUILD_ROAD_HERE :{WHITE}Tiet<65> ei voi rakentaa...

View File

@@ -840,6 +840,7 @@ STR_TOWNNAME_CZECH :Tch
STR_TOWNNAME_SWISS :Suisse
STR_TOWNNAME_DANISH :Danois
STR_TOWNNAME_TURKISH :Turques
STR_TOWNNAME_ITALIAN :Italien
############ end of townname region
STR_CURR_GBP :Livre (<28>)

View File

@@ -1241,8 +1241,10 @@ STR_NETWORK_8_PLAYERS :8 xogadores
STR_NETWORK_9_PLAYERS :9 xogadores
STR_NETWORK_10_PLAYERS :10 xogadores
STR_NETWORK_NUMBER_OF_COMPANIES :{BLACK}N<> m<>x. de compa<70><61>as:
STR_NETWORK_NUMBER_OF_COMPANIES_TIP :{BLACK}Limita-lo servidor a unha certa cantidade de compa<70><61>as
STR_NETWORK_COMBO3 :{BLACK}{SKIP}{SKIP}{SKIP}{SKIP}{SKIP}{SKIP}{SKIP}{SKIP}{SKIP}{SKIP}{SKIP}{STRING}
STR_NETWORK_NUMBER_OF_SPECTATORS :{BLACK}N<> m<>x. de espectadores:
STR_NETWORK_NUMBER_OF_SPECTATORS_TIP :{BLACK}Limita-lo servidor a unha certa cantidade de espectadores
STR_NETWORK_COMBO4 :{BLACK}{SKIP}{SKIP}{SKIP}{SKIP}{SKIP}{SKIP}{SKIP}{SKIP}{SKIP}{SKIP}{SKIP}{SKIP}{SKIP}{STRING}
STR_NETWORK_LANGUAGE_SPOKEN :{BLACK}Idioma falado:
STR_NETWORK_LANGUAGE_TIP :{BLACK}Outros xogadores sabr<62>n cal <20> o idioma que se fala no servidor

View File

@@ -840,6 +840,7 @@ STR_TOWNNAME_CZECH :Tschechisch
STR_TOWNNAME_SWISS :Schweizerisch
STR_TOWNNAME_DANISH :D<>nisch
STR_TOWNNAME_TURKISH :T<>rkisch
STR_TOWNNAME_ITALIAN :Italienisch
############ end of townname region
STR_CURR_GBP :Pfund (<28>)

View File

@@ -904,6 +904,7 @@ STR_TOWNNAME_CZECH :Cseh
STR_TOWNNAME_SWISS :Sv<53>jci
STR_TOWNNAME_DANISH :D<>n
STR_TOWNNAME_TURKISH :T<>r<EFBFBD>k
STR_TOWNNAME_ITALIAN :Olasz
############ end of townname region
STR_CURR_GBP :Font (<28>)

View File

@@ -820,24 +820,26 @@ STR_0335_6 :{BLACK}6
STR_0336_7 :{BLACK}7
############ start of townname region
STR_TOWNNAME_ORIGINAL_ENGLISH :Ensk
STR_TOWNNAME_ORIGINAL_ENGLISH :Ensk (Upphafleg)
STR_TOWNNAME_FRENCH :Fr<46>nsk
STR_TOWNNAME_GERMAN :<3A><>sk
STR_TOWNNAME_ADDITIONAL_ENGLISH :Enska (Aukaleg)
STR_TOWNNAME_LATIN_AMERICAN :Latin-Amer<65>sk
STR_TOWNNAME_ADDITIONAL_ENGLISH :Ensk (Aukaleg)
STR_TOWNNAME_LATIN_AMERICAN :R<EFBFBD>m<EFBFBD>nsk-Amer<65>sk
STR_TOWNNAME_SILLY :F<>r<EFBFBD>nleg
STR_TOWNNAME_SWEDISH :S<>nsk
STR_TOWNNAME_DUTCH :Hollensk
STR_TOWNNAME_FINNISH :Finnsk
STR_TOWNNAME_POLISH :P<>lsk
STR_TOWNNAME_SLOVAKISH :Sl<53>vak<61>sk
STR_TOWNNAME_NORWEGIAN :Norska
STR_TOWNNAME_NORWEGIAN :Norsk
STR_TOWNNAME_HUNGARIAN :Ungversk
STR_TOWNNAME_AUSTRIAN :Austurr<72>sk
STR_TOWNNAME_ROMANIAN :R<>mensk
STR_TOWNNAME_CZECH :T<>kknesk
STR_TOWNNAME_SWISS :Svissnesk
STR_TOWNNAME_DANISH :D<>nsk
STR_TOWNNAME_TURKISH :Tyrknesk
STR_TOWNNAME_ITALIAN :<3A>t<EFBFBD>lsk
############ end of townname region
STR_CURR_GBP :Pund (<28>)
@@ -1237,7 +1239,22 @@ STR_NETWORK_INTERNET :Internet
STR_NETWORK_LAN_INTERNET :Sta<74>arnet / Internet
STR_NETWORK_INTERNET_ADVERTISE :Internet (augl<67>sa)
STR_NETWORK_COMBO2 :{BLACK}{SKIP}{SKIP}{SKIP}{SKIP}{SKIP}{SKIP}{SKIP}{SKIP}{SKIP}{STRING}
STR_NETWORK_0_PLAYERS :0 leikmenn
STR_NETWORK_1_PLAYERS :1 leikma<6D>ur
STR_NETWORK_2_PLAYERS :2 leikmenn
STR_NETWORK_3_PLAYERS :3 leikmenn
STR_NETWORK_4_PLAYERS :4 leikmenn
STR_NETWORK_5_PLAYERS :5 leikmenn
STR_NETWORK_6_PLAYERS :6 leikmenn
STR_NETWORK_7_PLAYERS :7 leikmenn
STR_NETWORK_8_PLAYERS :8 leikmenn
STR_NETWORK_9_PLAYERS :9 leikmenn
STR_NETWORK_10_PLAYERS :10 leikmenn
STR_NETWORK_NUMBER_OF_COMPANIES :{BLACK}H<>marksfj<66>ldi fyrirt<72>kja:
STR_NETWORK_NUMBER_OF_COMPANIES_TIP :{BLACK}Takmarka fj<66>lda fyrirt<72>kja <20> vef<65>j<EFBFBD>ni
STR_NETWORK_COMBO3 :{BLACK}{SKIP}{SKIP}{SKIP}{SKIP}{SKIP}{SKIP}{SKIP}{SKIP}{SKIP}{SKIP}{SKIP}{STRING}
STR_NETWORK_NUMBER_OF_SPECTATORS :{BLACK}H<>marksfj<66>ldi <20>horfanda:
STR_NETWORK_NUMBER_OF_SPECTATORS_TIP :{BLACK}Takmarka fj<66>lda <20>horfanda <20> vef<65>j<EFBFBD>ninum
STR_NETWORK_COMBO4 :{BLACK}{SKIP}{SKIP}{SKIP}{SKIP}{SKIP}{SKIP}{SKIP}{SKIP}{SKIP}{SKIP}{SKIP}{SKIP}{SKIP}{STRING}
STR_NETWORK_LANGUAGE_SPOKEN :{BLACK}Tungum<75>l:
STR_NETWORK_LANGUAGE_TIP :{BLACK}A<>rir notendur munu vita hva<76>a tungum<75>l er tala<6C> <20> <20>j<EFBFBD>ninum
@@ -1335,6 +1352,7 @@ STR_NETWORK_ERR_CLIENT_WRONG_PASSWORD :rangt leikjalyk
STR_NETWORK_ERR_CLIENT_PLAYER_MISMATCH :rangt notandan<61>mer <20> DoCommand
STR_NETWORK_ERR_CLIENT_KICKED :hent <20>t af <20>j<EFBFBD>n
STR_NETWORK_ERR_CLIENT_CHEATER :reyndi a<> svindla
STR_NETWORK_ERR_CLIENT_SERVER_FULL :vef<65>j<EFBFBD>nn fullur
############ End of leave-in-this-order
STR_NETWORK_CLIENT_JOINED :hefur b<>st vi<76> leikinn
STR_NETWORK_GIVE_MONEY :gaf fyrirt<72>kinu <20><>nu pening ({CURRENCY})
@@ -1433,6 +1451,7 @@ STR_RAILROAD_TRACK_WITH_COMBOSIGNALS :Lestarteinn me
##id 0x1800
STR_1800_LAND_SLOPED_IN_WRONG_DIRECTION :{WHITE}Land hallar <20> ranga <20>tt fyrir vegager<65>
STR_1801_MUST_REMOVE_ROAD_FIRST :{WHITE}Ver<65>ur a<> fjarl<72>gja veg fyrst
STR_ROAD_WORKS_IN_PROGRESS :{WHITE}Vegaframkv<6B>mdir standa yfir
STR_1802_ROAD_CONSTRUCTION :{WHITE}Vegager<65>
STR_1803_SELECT_ROAD_BRIDGE :{WHITE}Veldu vegabr<62>
STR_1804_CAN_T_BUILD_ROAD_HERE :{WHITE}Get ekki lagt veg h<>r...
@@ -2398,6 +2417,7 @@ STR_8833_CAN_T_INSERT_NEW_ORDER :{WHITE}Get ekki
STR_8834_CAN_T_DELETE_THIS_ORDER :{WHITE}Get ekki eytt <20>essari skipun...
STR_8835_CAN_T_MODIFY_THIS_ORDER :{WHITE}Get ekki breytt <20>essari skipun...
STR_8837_CAN_T_MOVE_VEHICLE :{WHITE}Get ekki f<>rt farart<72>ki...
STR_REAR_ENGINE_FOLLOW_FRONT_ERROR :{WHITE}Aftari dr<64>ttarvagn fylgir alltaf fremri hluta
STR_8838_N_A :N/A{SKIP}
STR_8839_CAN_T_SELL_RAILROAD_VEHICLE :{WHITE}Get ekki selt lest...
STR_883A_UNABLE_TO_FIND_ROUTE_TO :{WHITE}Get ekki fundi<64> leit til sta<74>bundins sk<73>lis
@@ -2748,6 +2768,8 @@ STR_REPLACE_HELP_RAILTYPE :{BLACK}Veldu hv
STR_REPLACE_HELP_REPLACE_INFO_TAB :{BLACK}S<>nir hva<76>a vagn kemur <20> sta<74> <20>ess sem valinn er vinstra megin
STR_REPLACE_HELP :{BLACK}<7D>etta gerir <20><>r kleift a<> skipta <20>t <20>llum v<>gum af einni tegund me<6D> annarri, <20>egar <20>eir fara <20> lestarsk<73>li
STR_REPLACE_REMOVE_WAGON :{BLACK}Selja lestarvagna: {ORANGE}{SKIP}{STRING}
STR_REPLACE_REMOVE_WAGON_HELP :{BLACK}Heldur lengd lestar me<6D> <20>v<EFBFBD> a<> fjarl<72>gja vagna (framan fr<66>) ef <20>tskipting dr<64>ttarvagna myndi lengja hana.
STR_ENGINE_NOT_BUILDABLE :{WHITE}Ekki h<>gt a<> sm<73><6D>a dr<64>ttarvagn
STR_SHORT_DATE :{WHITE}{DATE_TINY}
STR_SIGN_LIST_CAPTION :{WHITE}Merkjalisti - {COMMA} merki

View File

@@ -839,6 +839,7 @@ STR_TOWNNAME_CZECH :Cechi
STR_TOWNNAME_SWISS :Svizzero
STR_TOWNNAME_DANISH :Danese
STR_TOWNNAME_TURKISH :Turco
STR_TOWNNAME_ITALIAN :Italiano
############ end of townname region
STR_CURR_GBP :Sterlina (<28>)

View File

@@ -839,6 +839,7 @@ STR_TOWNNAME_CZECH :Tsjekkisk
STR_TOWNNAME_SWISS :Sveitsisk
STR_TOWNNAME_DANISH :Dansk
STR_TOWNNAME_TURKISH :Tyrkisk
STR_TOWNNAME_ITALIAN :Italiensk
############ end of townname region
STR_CURR_GBP :Pund (<28>)
@@ -1451,6 +1452,7 @@ STR_RAILROAD_TRACK_WITH_COMBOSIGNALS :Jernbanespor me
##id 0x1800
STR_1800_LAND_SLOPED_IN_WRONG_DIRECTION :{WHITE}Feltet heller feil vei for veibygging
STR_1801_MUST_REMOVE_ROAD_FIRST :{WHITE}M<> fjerne vei f<>rst
STR_ROAD_WORKS_IN_PROGRESS :{WHITE}Veiarbeid i gang
STR_1802_ROAD_CONSTRUCTION :{WHITE}Bygg vei
STR_1803_SELECT_ROAD_BRIDGE :{WHITE}Velg brotype
STR_1804_CAN_T_BUILD_ROAD_HERE :{WHITE}Kan ikke bygge vei her
@@ -2417,6 +2419,7 @@ STR_8833_CAN_T_INSERT_NEW_ORDER :{WHITE}Kan ikke
STR_8834_CAN_T_DELETE_THIS_ORDER :{WHITE}Kan ikke slette denne ordren...
STR_8835_CAN_T_MODIFY_THIS_ORDER :{WHITE}Kan ikke endre denne ordren...
STR_8837_CAN_T_MOVE_VEHICLE :{WHITE}Kan ikke flytte kj<6B>ret<65>y...
STR_REAR_ENGINE_FOLLOW_FRONT_ERROR :{WHITE}Bakmaskinen vil alltid f<>lge det fremste motstykket
STR_8838_N_A :N/A{SKIP}
STR_8839_CAN_T_SELL_RAILROAD_VEHICLE :{WHITE}Kan ikke selge jernbanekj<6B>ret<65>y...
STR_883A_UNABLE_TO_FIND_ROUTE_TO :{WHITE}Kan ikke finne en togstall i n<>rheten
@@ -2767,6 +2770,7 @@ STR_REPLACE_HELP_RAILTYPE :{BLACK}Velg jer
STR_REPLACE_HELP_REPLACE_INFO_TAB :{BLACK}Dette viser hvilket lokomotiv som overtar for det valgte lokomotivet p<> venstresiden
STR_REPLACE_HELP :{BLACK}Dette verkt<6B>yet lar deg bytte ut en type lokomotiv med en annen. Dette blir gjort neste gang lokomotivet er innom et depot.
STR_REPLACE_REMOVE_WAGON :{BLACK}Vognfjerning: {ORANGE}{SKIP}{STRING}
STR_REPLACE_REMOVE_WAGON_HELP :{BLACK}La den automatiske utskiftningen beholde lengen p<> toget ved <20> fjerne vogner (fra f<>rste vogn), hvis utskiftningen gj<67>r toget lenger.
STR_ENGINE_NOT_BUILDABLE :{WHITE}Motoren kan ikke bygges
STR_SHORT_DATE :{WHITE}{DATE_TINY}

View File

@@ -926,6 +926,7 @@ STR_TOWNNAME_CZECH :Czeskie
STR_TOWNNAME_SWISS :Szwajcarskie
STR_TOWNNAME_DANISH :Dunskie
STR_TOWNNAME_TURKISH :Tureckie
STR_TOWNNAME_ITALIAN :Wloskie
############ end of townname region
STR_CURR_GBP :Funty (<28>)

View File

@@ -839,6 +839,7 @@ STR_TOWNNAME_CZECH :Checo
STR_TOWNNAME_SWISS :Sui<75>a
STR_TOWNNAME_DANISH :Dinamarqu<71>s
STR_TOWNNAME_TURKISH :Turco
STR_TOWNNAME_ITALIAN :Italiano
############ end of townname region
STR_CURR_GBP :Libras (<28>)

View File

@@ -1451,6 +1451,7 @@ STR_RAILROAD_TRACK_WITH_COMBOSIGNALS :Cale ferat
##id 0x1800
STR_1800_LAND_SLOPED_IN_WRONG_DIRECTION :{WHITE}Terenul are o <20>nclinatie nepotrivit<69> pentru o sosea
STR_1801_MUST_REMOVE_ROAD_FIRST :{WHITE}Mai <20>nt<6E>i trebuie demolat<61> soseaua
STR_ROAD_WORKS_IN_PROGRESS :{WHITE}Lucrari la drum in curs de desfasurare
STR_1802_ROAD_CONSTRUCTION :{WHITE}Constructii rutiere
STR_1803_SELECT_ROAD_BRIDGE :{WHITE}Alege pod rutier
STR_1804_CAN_T_BUILD_ROAD_HERE :{WHITE}Nu pot construi sosea aici...

View File

@@ -839,6 +839,7 @@ STR_TOWNNAME_CZECH :Ceske
STR_TOWNNAME_SWISS :Svajciarske
STR_TOWNNAME_DANISH :Danske
STR_TOWNNAME_TURKISH :Tureck<63>
STR_TOWNNAME_ITALIAN :Talianske
############ end of townname region
STR_CURR_GBP :Libry (<28>)
@@ -1450,6 +1451,7 @@ STR_RAILROAD_TRACK_WITH_COMBOSIGNALS :Zeleznicne kola
##id 0x1800
STR_1800_LAND_SLOPED_IN_WRONG_DIRECTION :{WHITE}Teren ma nevhodny sklon pre stavbu cesty
STR_1801_MUST_REMOVE_ROAD_FIRST :{WHITE}Cesta musi byt najskor odstranena
STR_ROAD_WORKS_IN_PROGRESS :{WHITE}Prebiehaju cestne prace
STR_1802_ROAD_CONSTRUCTION :{WHITE}Vystavba cesty
STR_1803_SELECT_ROAD_BRIDGE :{WHITE}Vyber cestny most
STR_1804_CAN_T_BUILD_ROAD_HERE :{WHITE}Tu sa neda postavit cesta...
@@ -2767,6 +2769,7 @@ STR_REPLACE_HELP_REPLACE_INFO_TAB :{BLACK}Tu sa zo
STR_REPLACE_HELP :{BLACK}Umoznuje vybrat typ lokomotivy, ktory automaticky sa zameni za iny typ, ak vlaky s takouto lokomotivou sa zastavia v depe
STR_REPLACE_REMOVE_WAGON :{BLACK}Odstranenie vagonu: {ORANGE}{SKIP}{STRING}
STR_REPLACE_REMOVE_WAGON_HELP :{BLACK}Funkcia automatickeho vylepsovania vlakov moze udrzovat rovnaku dlzku vlakov odstranovanim vagonov (od zaciatku vlakov), pokial by zmena masiny vlak predlzila.
STR_ENGINE_NOT_BUILDABLE :{WHITE}Lokomotiva sa nevyraba
STR_SHORT_DATE :{WHITE}{DATE_TINY}
STR_SIGN_LIST_CAPTION :{WHITE}Zoznam popisov - {COMMA} popisov

View File

@@ -839,6 +839,7 @@ STR_TOWNNAME_CZECH :Checo
STR_TOWNNAME_SWISS :Suizo
STR_TOWNNAME_DANISH :Danes
STR_TOWNNAME_TURKISH :Turco
STR_TOWNNAME_ITALIAN :Italiano
############ end of townname region
STR_CURR_GBP :Libras (<28>)
@@ -1450,6 +1451,7 @@ STR_RAILROAD_TRACK_WITH_COMBOSIGNALS :V
##id 0x1800
STR_1800_LAND_SLOPED_IN_WRONG_DIRECTION :{WHITE}Tierra inclinada en direcci<63>n err<72>nea para carretera
STR_1801_MUST_REMOVE_ROAD_FIRST :{WHITE}Ha de retirar carretera primero
STR_ROAD_WORKS_IN_PROGRESS :{WHITE}Trabajos en la carretera en progreso
STR_1802_ROAD_CONSTRUCTION :{WHITE}Construcci<63>n de carretera
STR_1803_SELECT_ROAD_BRIDGE :{WHITE}Elige puente de carretera
STR_1804_CAN_T_BUILD_ROAD_HERE :{WHITE}No se puede construir carretera aqu<71>...

View File

@@ -839,6 +839,7 @@ STR_TOWNNAME_CZECH :Tjeckiska
STR_TOWNNAME_SWISS :Schweiziska
STR_TOWNNAME_DANISH :Danska
STR_TOWNNAME_TURKISH :Turkiska
STR_TOWNNAME_ITALIAN :Italienska
############ end of townname region
STR_CURR_GBP :Pund (<28>)
@@ -1451,6 +1452,7 @@ STR_RAILROAD_TRACK_WITH_COMBOSIGNALS :J
##id 0x1800
STR_1800_LAND_SLOPED_IN_WRONG_DIRECTION :{WHITE}Marken lutar <20>t fel h<>ll f<>r v<>g
STR_1801_MUST_REMOVE_ROAD_FIRST :{WHITE}M<>ste ta bort v<>g f<>rst
STR_ROAD_WORKS_IN_PROGRESS :{WHITE}V<>garbete p<>g<EFBFBD>r
STR_1802_ROAD_CONSTRUCTION :{WHITE}Bygg v<>g
STR_1803_SELECT_ROAD_BRIDGE :{WHITE}V<>lj v<>gbro
STR_1804_CAN_T_BUILD_ROAD_HERE :{WHITE}Kan inte bygga v<>g h<>r...

View File

@@ -839,6 +839,7 @@ STR_TOWNNAME_CZECH :
STR_TOWNNAME_SWISS :isvi<76>rece
STR_TOWNNAME_DANISH :Danimarkaca
STR_TOWNNAME_TURKISH :T<>rk<72>e
STR_TOWNNAME_ITALIAN :Italyanca
############ end of townname region
STR_CURR_GBP :Sterlin (<28>)

View File

@@ -212,7 +212,7 @@ static const char *credits[] = {
" Stefan Mei<65>ner (sign_de) - For his work on the console",
" Simon Sasburg (HackyKid) - Many bugfixes he has blessed us with (and PBS)",
" Cian Duffy (MYOB) - BeOS port / manual writing",
" Christian Rosentreter (tokaiz) - MorphOS / AmigaOS port",
" Christian Rosentreter (tokai) - MorphOS / AmigaOS port",
"",
" Michael Blunck - Pre-Signals and Semaphores <20> 2003",
" George - Canal/Lock graphics <20> 2003-2004",

16
music.h Normal file
View File

@@ -0,0 +1,16 @@
/* $Id */
#ifndef MUSIC_H
#define MUSIC_H
#define NUM_SONGS_PLAYLIST 33
#define NUM_SONGS_AVAILABLE 22
typedef struct SongSpecs {
char filename[256];
char song_name[64];
} SongSpecs;
extern const SongSpecs origin_songs_specs[NUM_SONGS_AVAILABLE];
#endif //MUSIC_H

View File

@@ -10,12 +10,12 @@
#include "hal.h"
#include "macros.h"
#include "variables.h"
#include "music.h"
static byte _music_wnd_cursong;
static bool _song_is_active;
static byte _cur_playlist[33];
static byte _cur_playlist[NUM_SONGS_PLAYLIST];
#define NUM_SONGS_AVAILABLE 22
static byte _playlist_all[] = {
@@ -43,33 +43,31 @@ static byte * const _playlists[] = {
msf.custom_2,
};
// Map the order of the song names to the numbers of the midi filenames
static const byte midi_idx[] = {
0, // Tycoon DELUXE Theme
2, // Easy Driver
3, // Little Red Diesel
17, // Cruise Control
7, // Don't Walk!
9, // Fell Apart On Me
4, // City Groove
19, // Funk Central
6, // Stoke It
12, // Road Hog
5, // Aliens Ate My Railway
1, // Snarl Up
18, // Stroll On
10, // Can't Get There From Here
8, // Sawyer's Tune
13, // Hold That Train!
21, // Movin' On
15, // Goss Groove
16, // Small Town
14, // Broomer's Oil Rag
20, // Jammit
11 // Hard Drivin'
const SongSpecs origin_songs_specs[NUM_SONGS_AVAILABLE] = {
{"gm_tt00.gm", "Tycoon DELUXE Theme"},
{"gm_tt02.gm", "Easy Driver"},
{"gm_tt03.gm", "Little Red Diesel"},
{"gm_tt17.gm", "Cruise Control"},
{"gm_tt07.gm", "Don't Walk!"},
{"gm_tt09.gm", "Fell Apart On Me"},
{"gm_tt04.gm", "City Groove"},
{"gm_tt19.gm", "Funk Central"},
{"gm_tt06.gm", "Stoke It"},
{"gm_tt12.gm", "Road Hog"},
{"gm_tt05.gm", "Aliens Ate My Railway"},
{"gm_tt01.gm", "Snarl Up"},
{"gm_tt18.gm", "Stroll On"},
{"gm_tt10.gm", "Can't Get There From Here"},
{"gm_tt08.gm", "Sawyer's Tune"},
{"gm_tt13.gm", "Hold That Train!"},
{"gm_tt21.gm", "Movin' On"},
{"gm_tt15.gm", "Goss Groove"},
{"gm_tt16.gm", "Small Town"},
{"gm_tt14.gm", "Broomer's Oil Rag"},
{"gm_tt20.gm", "Jammit"},
{"gm_tt11.gm", "Hard Drivin'"},
};
static void SkipToPrevSong(void)
{
byte *b = _cur_playlist;
@@ -118,8 +116,8 @@ static void MusicVolumeChanged(byte new_vol)
static void DoPlaySong(void)
{
char filename[256];
snprintf(filename, sizeof(filename), "%sgm_tt%.2d.gm",
_path.gm_dir, midi_idx[_music_wnd_cursong - 1]);
snprintf(filename, sizeof(filename), "%s%s",
_path.gm_dir, origin_songs_specs[_music_wnd_cursong - 1].filename);
_music_driver->play_song(filename);
}
@@ -131,10 +129,19 @@ static void DoStopMusic(void)
static void SelectSongToPlay(void)
{
uint i = 0;
uint j = 0;
char filename[256];
memset(_cur_playlist, 0, sizeof(_cur_playlist));
do {
_cur_playlist[i] = _playlists[msf.playlist][i];
snprintf(filename, sizeof(filename), "%s%s",
_path.gm_dir, origin_songs_specs[_playlists[msf.playlist][i]].filename);
//we are now checking for the existence of that file prior
//to add it to the list of available songs
if (FileExists(filename)) {
_cur_playlist[j] = _playlists[msf.playlist][i];
j++;
}
} while (_playlists[msf.playlist][i++] != 0 && i < lengthof(_cur_playlist) - 1);
if (msf.shuffle) {
@@ -165,7 +172,15 @@ static void PlayPlaylistSong(void)
{
if (_cur_playlist[0] == 0) {
SelectSongToPlay();
if (_cur_playlist[0] == 0) return;
//if there is not songs in the playlist, it may indicate
//no file on the gm folder, or even no gm folder.
//Stop the playback, then
if (_cur_playlist[0] == 0) {
_song_is_active = false;
_music_wnd_cursong = 0;
msf.playing = false;
return;
}
}
_music_wnd_cursong = _cur_playlist[0];
DoPlaySong();
@@ -182,13 +197,13 @@ void ResetMusic(void)
void MusicLoop(void)
{
if (!msf.btn_down && _song_is_active) {
if (!msf.playing && _song_is_active) {
StopMusic();
} else if (msf.btn_down && !_song_is_active) {
} else if (msf.playing && !_song_is_active) {
PlayPlaylistSong();
}
if (_song_is_active == false) return;
if (!_song_is_active) return;
if (!_music_driver->is_song_playing()) {
if (_game_mode != GM_MENU) {
@@ -257,7 +272,7 @@ static void MusicTrackSelectionWndProc(Window *w, WindowEvent *e)
if (!IS_INT_INSIDE(y, 0, NUM_SONGS_AVAILABLE)) return;
p = _playlists[msf.playlist];
for (i = 0; i != 32; i++) {
for (i = 0; i != NUM_SONGS_PLAYLIST - 1; i++) {
if (p[i] == 0) {
p[i] = y + 1;
p[i + 1] = 0;
@@ -339,7 +354,7 @@ static void MusicWindowWndProc(Window *w, WindowEvent *e)
color = 0xB8;
}
}
GfxFillRect(187, 33 - i * 2, 200, 33 - i * 2, color);
GfxFillRect(187, NUM_SONGS_PLAYLIST - i * 2, 200, NUM_SONGS_PLAYLIST - i * 2, color);
}
GfxFillRect(60, 46, 239, 52, 0);
@@ -405,10 +420,10 @@ static void MusicWindowWndProc(Window *w, WindowEvent *e)
SkipToNextSong();
break;
case 4: // stop playing
msf.btn_down = false;
msf.playing = false;
break;
case 5: // start playing
msf.btn_down = true;
msf.playing = true;
break;
case 6:{ // volume sliders
byte *vol,new_vol;

View File

@@ -621,6 +621,51 @@ static byte MakeTurkishTownName(char *buf, uint32 seed)
return 0;
}
static const char *mascul_femin_italian[] = {
"o",
"a",
};
static byte MakeItalianTownName(char *buf, uint32 seed) {
strcpy(buf, "");
if (SeedModChance(0, 6, seed) == 0) { // real city names
strcat(buf, name_italian_real[SeedModChance(4, lengthof(name_italian_real), seed)]);
} else {
uint i;
if (SeedModChance(0, 8, seed) == 0) { // prefix
strcat(buf, name_italian_pref[SeedModChance(11, lengthof(name_italian_pref), seed)]);
}
i = SeedChance(0, 2, seed);
if (i == 0) { // masculine form
strcat(buf, name_italian_1m[SeedModChance(4, lengthof(name_italian_1m), seed)]);
} else { // feminine form
strcat(buf, name_italian_1f[SeedModChance(4, lengthof(name_italian_1f), seed)]);
}
if (SeedModChance(3, 3, seed) == 0) {
strcat(buf, name_italian_2[SeedModChance(11, lengthof(name_italian_2), seed)]);
strcat(buf,mascul_femin_italian[i]);
} else {
strcat(buf, name_italian_2i[SeedModChance(16, lengthof(name_italian_2i), seed)]);
}
if (SeedModChance(15, 4, seed) == 0) {
if (SeedModChance(5, 2, seed) == 0) { // generic suffix
strcat(buf, name_italian_3[SeedModChance(4, lengthof(name_italian_3), seed)]);
} else { // river name suffix
strcat(buf, name_italian_river1[SeedModChance(4, lengthof(name_italian_river1), seed)]);
strcat(buf, name_italian_river2[SeedModChance(16, lengthof(name_italian_river2), seed)]);
}
}
}
return 0;
}
TownNameGenerator * const _town_name_generators[] =
{
MakeEnglishOriginalTownName,
@@ -642,6 +687,7 @@ TownNameGenerator * const _town_name_generators[] =
MakeSwissTownName,
MakeDanishTownName,
MakeTurkishTownName,
MakeItalianTownName,
};
// DO WE NEED THIS ANY MORE?

View File

@@ -129,7 +129,7 @@ static int CDECL NGameClientSorter(const void *a, const void *b)
const NetworkGameList *cmp1 = *(const NetworkGameList**)a;
const NetworkGameList *cmp2 = *(const NetworkGameList**)b;
/* Reverse as per default we are interested in most-clients first */
int r = cmp2->info.clients_on - cmp1->info.clients_on;
int r = cmp1->info.clients_on - cmp2->info.clients_on;
if (r == 0) r = cmp1->info.clients_max - cmp2->info.clients_max;
if (r == 0) r = strcasecmp(cmp1->info.server_name, cmp2->info.server_name);

View File

@@ -985,7 +985,8 @@ void GameLoop(void)
#ifdef ENABLE_NETWORK
// Check for UDP stuff
NetworkUDPGameLoop();
if (_network_available)
NetworkUDPGameLoop();
if (_networking) {
// Multiplayer

View File

@@ -493,7 +493,8 @@ enum SpecialStrings {
SPECSTR_TOWNNAME_SWISS,
SPECSTR_TOWNNAME_DANISH,
SPECSTR_TOWNNAME_TURKISH,
SPECSTR_TOWNNAME_LAST = SPECSTR_TOWNNAME_TURKISH,
SPECSTR_TOWNNAME_ITALIAN,
SPECSTR_TOWNNAME_LAST = SPECSTR_TOWNNAME_ITALIAN,
// special strings for player names on the form "TownName transport".
SPECSTR_PLAYERNAME_START = 0x70EA,

View File

@@ -84,7 +84,7 @@ endif
# build the bundle. OSX wants to keep apps in bundles, so we will give it one
# the good thing about bundles is that you can keep extra files in them, so we keep lng files and a data dir in it
$(BUILD_OSX_BUNDLE): $(TTD)
BUILD_OSX_BUNDLE: $(TTD)
@echo '===> Building application bundle'
$(Q)rm -fr "$(OSXAPP)"
$(Q)mkdir -p "$(OSXAPP)"/Contents/MacOS
@@ -118,6 +118,6 @@ release: all
$(Q)/usr/bin/hdiutil create -ov -format UDZO -srcfolder "OpenTTD $(REV)" openttd-"$(REV)"-osx"$(JAGUAR_POSTFIX)".dmg
$(Q)rm -fr "OpenTTD $(REV)"
$(OSX): $(TTD) $(BUILD_OSX_BUNDLE)
$(OSX): $(TTD) BUILD_OSX_BUNDLE
.PHONY: release $(BUILD_OSX_BUNDLE) $(UNIVERSAL_BINARY)
.PHONY: release BUILD_OSX_BUNDLE

View File

@@ -2,7 +2,7 @@
!define APPNAME "OpenTTD"
!define APPNAMEANDVERSION "OpenTTD 0.4.8.0"
!define APPVERSION "0.4.8.0"
!define INSTALLERVERSION 20 ;NEED TO UPDATE THIS FOR EVERY RELEASE!!!
!define INSTALLERVERSION 22 ;NEED TO UPDATE THIS FOR EVERY RELEASE!!!
!define MUI_ICON "..\..\..\openttd.ico"
!define MUI_UNICON "..\..\..\openttd.ico"
!define MUI_WELCOMEFINISHPAGE_BITMAP "welcome.bmp"

7
os2.c
View File

@@ -210,9 +210,10 @@ FiosItem *FiosGetScenarioList(int *num, int mode)
int sort_start;
char filename[MAX_PATH];
if (_fios_scn_path == NULL) {
_fios_scn_path = malloc(MAX_PATH);
strcpy(_fios_scn_path, _path.scenario_dir);
/* Copy the default path on first run or on 'New Game' */
if (mode == SLD_NEW_GAME || _fios_scn_path == NULL) {
if (_fios_scn_path == NULL) _fios_scn_path = malloc(MAX_PATH);
ttd_strlcpy(_fios_scn_path, _path.scenario_dir, MAX_PATH);
}
_fios_path = _fios_scn_path;

View File

@@ -1,6 +1,6 @@
OpenTTD README
Last updated: 2006-03-26
Release version: 0.4.7
Last updated: 2006-08-12
Release version: 0.4.8
------------------------------------------------------------------------
@@ -166,8 +166,9 @@ FreeBSD:
Use "gmake".
MorphOS:
Use "make". Note that you need the MorphOS SDK and the
powersdl.library SDK.
Use "make". Note that you need the MorphOS SDK, latest libnix updates (else
C++ parts of OpenTTD will not build) and the powersdl.library SDK. Optionally
libz and libpng developer files.
OS/2:
Open Watcom C/C++ 1.3 or later is required to build the OS/2 version. See the
@@ -280,7 +281,7 @@ Thanks to:
Stefan Mei<65>ner (sign_de) - For his work on the console
Mike Ragsdale - OpenTTD installer
Cian Duffy (MYOB) - BeOS port / manual writing
Christian Rosentreter (tokaiz) - MorphOS / AmigaOS port
Christian Rosentreter (tokai) - MorphOS / AmigaOS port
Michael Blunck - For revolutionizing TTD with awesome graphics
George - Canal graphics
All Translators - For their support to make OpenTTD a truly international game

View File

@@ -742,7 +742,7 @@ static const SettingDesc music_settings[] = {
{"effect_vol",SDT_UINT8, (void*)128, &msf.effect_vol, NULL},
{"custom_1", SDT_INTLIST | SDT_UINT8 | lengthof(msf.custom_1) << 16, NULL, &msf.custom_1, NULL},
{"custom_2", SDT_INTLIST | SDT_UINT8 | lengthof(msf.custom_2) << 16, NULL, &msf.custom_2, NULL},
{"playing", SDT_BOOL, (void*)true, &msf.btn_down, NULL},
{"playing", SDT_BOOL, (void*)true, &msf.playing, NULL},
{"shuffle", SDT_BOOL, (void*)false, &msf.shuffle, NULL},
{"extmidi", SDT_STRINGBUF | (lengthof(msf.extmidi)<<16), EXTERNAL_PLAYER, &msf.extmidi, NULL},
{NULL, 0, NULL, NULL, NULL}
@@ -811,7 +811,7 @@ static const SettingDesc gameopt_settings[] = {
{"diff_custom", SDT_INTLIST | SDT_UINT32 | (sizeof(GameDifficulty)/4) << 16, NULL, &_opt_newgame.diff, NULL},
{"currency", SDT_UINT8 | SDT_ONEOFMANY, (void*)0, &_opt_newgame.currency, "GBP|USD|EUR|YEN|ATS|BEF|CHF|CZK|DEM|DKK|ESP|FIM|FRF|GRD|HUF|ISK|ITL|NLG|NOK|PLN|ROL|RUR|SEK|custom" },
{"distances", SDT_UINT8 | SDT_ONEOFMANY, (void*)1, &_opt_newgame.kilometers, "imperial|metric" },
{"town_names", SDT_UINT8 | SDT_ONEOFMANY, (void*)0, &_opt_newgame.town_name, "english|french|german|american|latin|silly|swedish|dutch|finnish|polish|slovakish|norwegian|hungarian|austrian|romanian|czech|swiss|danish|turkish" },
{"town_names", SDT_UINT8 | SDT_ONEOFMANY, (void*)0, &_opt_newgame.town_name, "english|french|german|american|latin|silly|swedish|dutch|finnish|polish|slovakish|norwegian|hungarian|austrian|romanian|czech|swiss|danish|turkish|italian" },
{"landscape", SDT_UINT8 | SDT_ONEOFMANY, (void*)0, &_opt_newgame.landscape, "normal|hilly|desert|candy" },
{"autosave", SDT_UINT8 | SDT_ONEOFMANY, (void*)1, &_opt_newgame.autosave, "off|monthly|quarterly|half year|yearly" },
{"road_side", SDT_UINT8 | SDT_ONEOFMANY, (void*)1, &_opt_newgame.road_side, "left|right" },

15
ship.h Normal file
View File

@@ -0,0 +1,15 @@
/* $Id$ */
#include "vehicle.h"
static inline bool IsShipInDepot(const Vehicle* v)
{
assert(v->type == VEH_Ship);
return v->u.ship.state == 0x80;
}
static inline bool IsShipInDepotStopped(const Vehicle* v)
{
return IsShipInDepot(v) && v->vehstatus & VS_STOPPED;
}

View File

@@ -4,6 +4,7 @@
#include "openttd.h"
#include "debug.h"
#include "functions.h"
#include "ship.h"
#include "table/strings.h"
#include "table/sprites.h"
#include "map.h"
@@ -569,7 +570,7 @@ static void ShipViewWndProc(Window *w, WindowEvent *e) {
Vehicle *v;
uint32 h;
v = GetVehicle(w->window_number);
h = IsTileDepotType(v->tile, TRANSPORT_WATER) && v->vehstatus & VS_HIDDEN ? (1<< 7) : (1 << 11);
h = IsShipInDepotStopped(v) ? (1<< 7) : (1 << 11);
if (h != w->hidden_state) {
w->hidden_state = h;
SetWindowDirty(w);

View File

@@ -9,7 +9,7 @@ typedef struct MusicFileSettings {
byte effect_vol;
byte custom_1[33];
byte custom_2[33];
bool btn_down;
bool playing;
bool shuffle;
char extmidi[80];
} MusicFileSettings;

View File

@@ -16,6 +16,7 @@
#include "waypoint.h"
#include "industry.h"
#include "variables.h"
#include "music.h"
char _userstring[128];
@@ -899,31 +900,6 @@ static char *GenPresidentName(char *buff, uint32 x)
return buff;
}
static const char * const _song_names[] = {
"Tycoon DELUXE Theme",
"Easy Driver",
"Little Red Diesel",
"Cruise Control",
"Don't Walk!",
"Fell Apart On Me",
"City Groove",
"Funk Central",
"Stoke It",
"Road Hog",
"Aliens Ate My Railway",
"Snarl Up",
"Stroll On",
"Can't Get There From Here",
"Sawyer's Tune",
"Hold That Train!",
"Movin' On",
"Goss Groove",
"Small Town",
"Broomer's Oil Rag",
"Jammit",
"Hard Drivin'"
};
static char *GetSpecialPlayerNameString(char *buff, int ind, const int32 *argv)
{
switch (ind) {
@@ -937,7 +913,7 @@ static char *GetSpecialPlayerNameString(char *buff, int ind, const int32 *argv)
return GenPresidentName(buff, GetInt32(&argv));
case 4: // song names
return strecpy(buff, _song_names[GetInt32(&argv) - 1], NULL);
return strecpy(buff, origin_songs_specs[GetInt32(&argv) - 1].song_name, NULL);
}
// town name?

View File

@@ -2843,3 +2843,269 @@ static const char *name_turkish_real[] = {
"Osmaniye",
"D<EFBFBD>zce"
};
static const char *name_italian_real[] = {
"Roma",
"Milano",
"Napoli",
"Torino",
"Venezia",
"Firenze",
"Palermo",
"Genova",
"Parma",
"Bologna",
"Bari",
"Cagliari",
"Sassari",
"Pisa",
"Aosta",
"Brescia",
"Verona",
"Bolzano",
"Padova",
"Udine",
"Trieste",
"Livorno",
"Ancona",
"Perugia",
"Pescara",
"L'Aquila",
"Campobasso",
"Potenza",
"Cosenza",
"Reggio Calabria",
"Catania",
"Caltanisetta",
"Agrigento",
"La Spezia",
"Modena",
"Vicenza",
"Mantova",
"Cremona",
"Piacenza",
"Reggio Emilia",
"Foggia",
"Benevento",
"Salerno",
"Catanzaro",
"Lecce",
"Como",
"Lecco",
"Sondrio",
"Trento",
"Desenzano",
"Cuneo",
"Asti",
"Lodi",
"Novara",
"Biella",
"Vercelli",
"Rieti",
"Nuoro",
"Oristano",
"Matera",
"Taranto",
"Varese",
"Bergamo",
"Pavia",
"Caserta",
"Frosinone",
"Latina",
"Enna",
"Ragusa",
"Siracusa",
"Pordenone",
"Imperia",
"Verbania",
"Alessandria",
"Messina",
"Siena",
"Arezzo",
"Grosseto",
};
static const char *name_italian_pref[] = {
"Alpe ",
"Borgo ",
"Cascina ",
"Castel ",
"Fonte ",
"Forte ",
"Malga ",
"Pieve ",
"Poggio ",
"Rocca ",
"Villa ",
"Villar ",
};
static const char *name_italian_1m[] = {
"Bel",
"Borgo",
"Bosco",
"Campo",
"Capo",
"Casal",
"Castel",
"Colle",
"Fiume",
"Fonte",
"Lago",
"Mezzo",
"Monte",
"Mon",
"Orto",
"Passo",
"Prato",
"Poggio",
"Ponte",
"Pozzo",
"Sasso",
"Tra",
"Tre",
"Ver",
"Vico",
};
static const char *name_italian_1f[] = {
"Acqua",
"Bra",
"Cala",
"Casa",
"Chiesa",
"Citta",
"Civita",
"Corte",
"Costa",
"Croce",
"Fontana",
"Grotta",
"Guardia",
"Mezza",
"Palma",
"Pietra",
"Ripa",
"Rocca",
"Serra",
"Torre",
"Val",
"Valle",
"Villa",
};
static const char *name_italian_2[] = {
"bell",
"bianc",
"cald",
"chiar",
"cort",
"ferrat",
"fier",
"fredd",
"gioios",
"grec",
"guzz",
"lung",
"long",
"migli",
"negr",
"ner",
"nov",
"nuov",
"ross",
"rotond",
"scur",
"secc",
"sett",
"vecchi",
"ventos",
"vers",
"viv",
};
static const char *name_italian_2i[] = {
"",
"breve",
"brevi",
"chiari",
"ferro",
"fieschi",
"fiore",
"fonte",
"forte",
"gate",
"leone",
"maggiore",
"minore",
"mole",
"monte",
"poli",
"scuri",
"terra",
"te",
"torrione",
"vento",
"verde",
"versiere",
};
static const char *name_italian_3[] = {
" Marittimo",
" Marittima",
" del Capo",
" del Monte",
" di Sopra",
" di Sotto",
" sui Monti",
" dei Marmi",
" dei Sassi",
" delle Fonti",
" sui Prati",
" a Mare",
" Superiore",
" Inferiore",
" Terme",
" Alta",
" Bassa",
" Brianza",
" Vesuviano",
" Scrivia",
" Ticino",
};
static const char *name_italian_river1[] = {
" del",
" sul",
" al",
" nel",
};
static const char *name_italian_river2[] = {
"l'Adda",
"l'Adige",
"le Alpi",
"l'Arno",
" Bormida",
" Brenta",
"la Dora Baltea",
" Lambro",
" Mincio",
" Naviglio",
"l'Oglio",
"l'Olona",
"l'Ombrone",
" Panaro",
" Piave",
" Po",
" Reno",
" Scrivia",
" Secchia",
" Serio",
" Tagliamento",
" Tanaro",
" Taro",
" Ticino",
" Tevere",
};

View File

@@ -1130,6 +1130,8 @@ int32 CmdMoveRailVehicle(int x, int y, uint32 flags, uint32 p1, uint32 p2)
src_head = src_head->next;
}
AddWagonToConsist(src->u.rail.other_multiheaded_part, src);
// previous line set the front engine to the old front. We need to clear that
src->u.rail.other_multiheaded_part->first = NULL;
}
if (HASBIT(p2, 0) && src_head != NULL && src_head != src) {

60
unix.c
View File

@@ -79,6 +79,19 @@ int compare_FiosItems(const void *a, const void *b)
return r;
}
#if !defined(__MORPHOS__) && !defined(__AMIGAOS__)
#define ISROOT(__p) (__p[1] == '\0')
#define PATHTEMPLATE "%s/%s"
#else
/* on MorphOS or AmigaOS paths look like: "Volume:directory/subdirectory".
* This is some evil magic which tries to handle this transparently w/o
* disturbing code with too much #ifdefs. It's not possible to switch the
* volume, but at least it doesn't crash :) (tokai)
*/
static bool __isroot; /* not very thread save, but will do in this case */
#define ISROOT(__p) (__isroot = (__p[strlen(__p)-1] == ':'))
#define PATHTEMPLATE (__isroot ? "%s:%s" : "%s/%s")
#endif
// Get a list of savegames
FiosItem *FiosGetSavegameList(int *num, int mode)
@@ -98,7 +111,7 @@ FiosItem *FiosGetSavegameList(int *num, int mode)
_fios_path = _fios_save_path;
// Parent directory, only if not in root already.
if (_fios_path[1] != '\0') {
if (!ISROOT(_fios_path)) {
fios = FiosAlloc();
fios->type = FIOS_TYPE_PARENT;
fios->mtime = 0;
@@ -110,7 +123,7 @@ FiosItem *FiosGetSavegameList(int *num, int mode)
dir = opendir(_fios_path);
if (dir != NULL) {
while ((dirent = readdir(dir)) != NULL) {
snprintf(filename, lengthof(filename), "%s/%s",
snprintf(filename, lengthof(filename), PATHTEMPLATE,
_fios_path, dirent->d_name);
if (!stat(filename, &sb) && S_ISDIR(sb.st_mode) &&
dirent->d_name[0] != '.') {
@@ -148,7 +161,7 @@ FiosItem *FiosGetSavegameList(int *num, int mode)
while ((dirent = readdir(dir)) != NULL) {
char *t;
snprintf(filename, lengthof(filename), "%s/%s",
snprintf(filename, lengthof(filename), PATHTEMPLATE,
_fios_path, dirent->d_name);
if (stat(filename, &sb) || S_ISDIR(sb.st_mode)) continue;
@@ -195,15 +208,16 @@ FiosItem *FiosGetScenarioList(int *num, int mode)
int sort_start;
char filename[MAX_PATH];
if (_fios_scn_path == NULL) {
_fios_scn_path = malloc(MAX_PATH);
strcpy(_fios_scn_path, _path.scenario_dir);
/* Copy the default path on first run or on 'New Game' */
if (mode == SLD_NEW_GAME || _fios_scn_path == NULL) {
if (_fios_scn_path == NULL) _fios_scn_path = malloc(MAX_PATH);
ttd_strlcpy(_fios_scn_path, _path.scenario_dir, MAX_PATH);
}
_fios_path = _fios_scn_path;
// Parent directory, only if not of the type C:\.
if (_fios_path[1] != '\0' && mode != SLD_NEW_GAME) {
if ((!ISROOT(_fios_path)) && mode != SLD_NEW_GAME) {
fios = FiosAlloc();
fios->type = FIOS_TYPE_PARENT;
fios->mtime = 0;
@@ -214,7 +228,7 @@ FiosItem *FiosGetScenarioList(int *num, int mode)
dir = opendir(_fios_path);
if (dir != NULL) {
while ((dirent = readdir(dir)) != NULL) {
snprintf(filename, lengthof(filename), "%s/%s",
snprintf(filename, lengthof(filename), PATHTEMPLATE,
_fios_path, dirent->d_name);
if (!stat(filename, &sb) && S_ISDIR(sb.st_mode) &&
dirent->d_name[0] != '.') {
@@ -250,7 +264,7 @@ FiosItem *FiosGetScenarioList(int *num, int mode)
while ((dirent = readdir(dir)) != NULL) {
char *t;
snprintf(filename, lengthof(filename), "%s/%s", _fios_path, dirent->d_name);
snprintf(filename, lengthof(filename), PATHTEMPLATE, _fios_path, dirent->d_name);
if (stat(filename, &sb) || S_ISDIR(sb.st_mode)) continue;
t = strrchr(dirent->d_name, '.');
@@ -302,15 +316,25 @@ char *FiosBrowseTo(const FiosItem *item)
switch (item->type) {
case FIOS_TYPE_PARENT:
s = strrchr(path, '/');
if (s != path)
s[0] = '\0';
else
s[1] = '\0';
/* Check for possible NULL ptr (not required for UNIXes, but AmigaOS-alikes) */
if ((s = strrchr(path, '/'))) {
if (s != path) {
s[0] = '\0';
} else {
s[1] = '\0';
}
}
#if defined(__MORPHOS__) || defined(__AMIGAOS__)
else {
if ((s = strrchr(path, ':'))) {
s[1] = '\0';
}
}
#endif
break;
case FIOS_TYPE_DIR:
if (path[1] != '\0') strcat(path, "/");
if (!ISROOT(path)) strcat(path, "/");
strcat(path, item->name);
break;
@@ -326,7 +350,11 @@ char *FiosBrowseTo(const FiosItem *item)
case FIOS_TYPE_OLD_SCENARIO: {
static char str_buffr[512];
sprintf(str_buffr, "%s/%s", path, item->name);
#if defined(__MORPHOS__) || defined(__AMIGAOS__)
ISROOT(path); /* init __isroot for PATHTEMPLATE */
#endif
sprintf(str_buffr, PATHTEMPLATE, path, item->name);
return str_buffr;
}
}

View File

@@ -2012,7 +2012,7 @@ uint32 VehicleEnterTile(Vehicle *v, TileIndex tile, int x, int y)
UnitID GetFreeUnitNumber(byte type)
{
UnitID unit, max;
UnitID unit, max = 0;
const Vehicle *u;
static bool *cache = NULL;
static UnitID gmax = 0;
@@ -2025,6 +2025,14 @@ UnitID GetFreeUnitNumber(byte type)
default: assert(0);
}
if (max == 0) {
/* we can't build any of this kind of vehicle, so we just return 1 instead of looking for a free number
* a max of 0 will cause the following code to write to a NULL pointer
* We know that 1 is bigger than the max allowed vehicle number, so it's the same as returning something, that is too big
*/
return 1;
}
if (max > gmax) {
gmax = max;
free(cache);

15
win32.c
View File

@@ -22,10 +22,6 @@
static bool _has_console;
#if defined(__MINGW32__) || defined(__CYGWIN__)
#define __TIMESTAMP__ __DATE__ __TIME__
#endif
#if defined(__MINGW32__)
#include <stdint.h>
#endif
@@ -445,10 +441,10 @@ static LONG WINAPI ExceptionHandler(EXCEPTION_POINTERS *ep)
{
SYSTEMTIME time;
GetLocalTime(&time);
output += sprintf(output,
output += snprintf(output, 8192,
"*** OpenTTD Crash Report ***\r\n"
"Date: %d-%.2d-%.2d %.2d:%.2d:%.2d\r\n"
"Build: %s built on " __TIMESTAMP__ "\r\n",
"Build: %s built on " __DATE__ " " __TIME__ "\r\n",
time.wYear,
time.wMonth,
time.wDay,
@@ -779,9 +775,10 @@ FiosItem *FiosGetScenarioList(int *num, int mode)
HANDLE h;
int sort_start;
if (_fios_scn_path == NULL) {
_fios_scn_path = malloc(MAX_PATH);
strcpy(_fios_scn_path, _path.scenario_dir);
/* Copy the default path on first run or on 'New Game' */
if (mode == SLD_NEW_GAME || _fios_scn_path == NULL) {
if (_fios_scn_path == NULL) _fios_scn_path = malloc(MAX_PATH);
ttd_strlcpy(_fios_scn_path, _path.scenario_dir, MAX_PATH);
}
_fios_path = _fios_scn_path;