mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-08-14 10:09:11 +00:00
Compare commits
1 Commits
1.1.2-RC2
...
1.1.0-beta
Author | SHA1 | Date | |
---|---|---|---|
|
41e8be2835 |
@@ -27,21 +27,9 @@ SRC_DIR = "$(ROOT_DIR)/src"
|
||||
BUNDLE_DIR = "$(ROOT_DIR)/bundle"
|
||||
BUNDLES_DIR = "$(ROOT_DIR)/bundles"
|
||||
TTD = openttd.exe
|
||||
PDB = openttd.pdb
|
||||
MODE = Release
|
||||
TARGET := $(shell echo $(PLATFORM) | sed "s@win64@x64@;s@win32@Win32@")
|
||||
|
||||
all:
|
||||
$(Q)cp objs/$(TARGET)/$(MODE)/$(TTD) $(BIN_DIR)/$(TTD)
|
||||
$(Q)cp objs/$(TARGET)/Release/$(TTD) $(BIN_DIR)/$(TTD)
|
||||
|
||||
include Makefile.bundle.in
|
||||
|
||||
bundle_pdb:
|
||||
@echo '[BUNDLE] Creating $(BUNDLE_NAME).pdb.xz'
|
||||
$(Q)mkdir -p "$(BUNDLES_DIR)"
|
||||
$(Q)cp objs/$(TARGET)/Release/$(PDB) $(BUNDLES_DIR)/$(BUNDLE_NAME).pdb
|
||||
$(Q)xz -9 $(BUNDLES_DIR)/$(BUNDLE_NAME).pdb
|
||||
|
||||
regression: all
|
||||
$(Q)cp bin/$(TTD) bin/openttd
|
||||
$(Q)cd bin && sh ai/regression/run.sh
|
||||
|
@@ -319,5 +319,3 @@ AIIndustry.IsCargoAccepted <- function(industry_id, cargo_id)
|
||||
AIAbstractList <- AIList;
|
||||
|
||||
AIList.ChangeItem <- AIList.SetValue;
|
||||
|
||||
AIRail.ERR_NONUNIFORM_STATIONS_DISABLED <- 0xFFFF;
|
||||
|
@@ -70,5 +70,3 @@ AIIndustry.IsCargoAccepted <- function(industry_id, cargo_id)
|
||||
AIAbstractList <- AIList;
|
||||
|
||||
AIList.ChangeItem <- AIList.SetValue;
|
||||
|
||||
AIRail.ERR_NONUNIFORM_STATIONS_DISABLED <- 0xFFFF;
|
||||
|
@@ -15,6 +15,3 @@ regression =
|
||||
[vehicle]
|
||||
road_side = right
|
||||
plane_speed = 2
|
||||
|
||||
[construction]
|
||||
max_bridge_length = 100
|
||||
|
@@ -7108,7 +7108,7 @@ ERROR: IsEnd() is invalid as Begin() is never called
|
||||
IsBuoyTile(): true
|
||||
IsLockTile(): true
|
||||
IsCanalTile(): true
|
||||
GetBankBalance(): 465257
|
||||
GetBankBalance(): 461507
|
||||
|
||||
--AIWaypointList(BUOY)--
|
||||
Count(): 1
|
||||
@@ -7127,7 +7127,7 @@ ERROR: IsEnd() is invalid as Begin() is never called
|
||||
IsBuoyTile(): false
|
||||
IsLockTile(): false
|
||||
IsCanalTile(): false
|
||||
GetBankBalance(): 459862
|
||||
GetBankBalance(): 456112
|
||||
BuildWaterDepot(): true
|
||||
BuildDock(): true
|
||||
|
||||
|
@@ -28,7 +28,6 @@ else
|
||||
./openttd -x -c ai/regression/regression.cfg $params -g ai/regression/regression.sav -d ai=2 2>&1 | awk '{ gsub("0x(\\(nil\\)|0+)(x0)?", "0x00000000", $0); gsub("^dbg: \\[ai\\]", "", $0); gsub("^ ", "ERROR: ", $0); gsub("ERROR: \\[1\\] ", "", $0); gsub("\\[P\\] ", "", $0); print $0; }' > tmp.regression
|
||||
fi
|
||||
|
||||
ret=0
|
||||
if [ -z "$gdb" ]; then
|
||||
res="`diff -ub ai/regression/regression.txt tmp.regression`"
|
||||
if [ -z "$res" ]; then
|
||||
@@ -36,7 +35,6 @@ if [ -z "$gdb" ]; then
|
||||
else
|
||||
echo "Regression test failed! Difference:"
|
||||
echo "$res"
|
||||
ret=1
|
||||
fi
|
||||
echo ""
|
||||
echo "Regression test done"
|
||||
@@ -51,5 +49,3 @@ fi
|
||||
if [ "$1" != "-k" ]; then
|
||||
rm -f tmp.regression
|
||||
fi
|
||||
|
||||
exit $ret
|
||||
|
Binary file not shown.
Binary file not shown.
@@ -55,7 +55,7 @@ TRGI.GRF = da6a6c9dcc451eec88d79211437b76a8
|
||||
TRGC.GRF = ed446637e034104c5559b32c18afe78d
|
||||
TRGH.GRF = ee6616fb0e6ef6b24892c58c93d86fc9
|
||||
TRGT.GRF = e30e8a398ae86c03dc534a8ac7dfb3b6
|
||||
OPENTTD.GRF = 768051d1eb451c682d6f4e936a89caa5
|
||||
OPENTTD.GRF = e67a3aaf13b81bab5d72d7440244e20c
|
||||
|
||||
[origin]
|
||||
default = You can find it on your Transport Tycoon Deluxe CD-ROM.
|
||||
|
@@ -55,7 +55,7 @@ TRGI.GRF = da6a6c9dcc451eec88d79211437b76a8
|
||||
TRGC.GRF = ed446637e034104c5559b32c18afe78d
|
||||
TRGH.GRF = ee6616fb0e6ef6b24892c58c93d86fc9
|
||||
TRGT.GRF = fcde1d7e8a74197d72a62695884b909e
|
||||
OPENTTD.GRF = 768051d1eb451c682d6f4e936a89caa5
|
||||
OPENTTD.GRF = e67a3aaf13b81bab5d72d7440244e20c
|
||||
|
||||
[origin]
|
||||
default = You can find it on your Transport Tycoon Deluxe CD-ROM.
|
||||
|
@@ -55,7 +55,7 @@ TRGIR.GRF = 0c2484ff6be49fc63a83be6ab5c38f32
|
||||
TRGCR.GRF = 3668f410c761a050b5e7095a2b14879b
|
||||
TRGHR.GRF = 06bf2b7a31766f048baac2ebe43457b1
|
||||
TRGTR.GRF = de53650517fe661ceaa3138c6edb0eb8
|
||||
OPENTTD.GRF = 768051d1eb451c682d6f4e936a89caa5
|
||||
OPENTTD.GRF = e67a3aaf13b81bab5d72d7440244e20c
|
||||
|
||||
[origin]
|
||||
default = You can find it on your Transport Tycoon Deluxe CD-ROM.
|
||||
|
248
changelog.txt
248
changelog.txt
@@ -1,237 +1,3 @@
|
||||
1.1.2-RC2 (2011-07-30)
|
||||
------------------------------------------------------------------------
|
||||
- Fix: Cost of adding an extra road type to a bridge or tunnel was undercalculated [FS#4680, FS#4681] (r22700, r22699)
|
||||
- Fix: Only insert cleared object tiles into _cleared_object_areas if clearing actually succeeds, else subsequential tests of the same tile will be skipped and considered successful [FS#4694] (r22698)
|
||||
- Fix: When building a house it could be built at the wrong place if multitile houses failed some tests (r22697)
|
||||
- Fix: [Network] Failed network address resolving could trigger temporary freezes [FS#4697] (r22696, r22695)
|
||||
- Fix: [NewGRF] The override managers were not reset in some cases like creating a new scenario [FS#4691] (r22693)
|
||||
- Fix: [NewGRF] Aircrafts defined with IDs above the default aircrafts always defaulted to passenger cargo (r22690)
|
||||
|
||||
|
||||
1.1.2-RC1 (2011-07-24)
|
||||
------------------------------------------------------------------------
|
||||
- Change: [NewGRF] Only allow access (via hotkey and menu) to the bounding box visualisation when NewGRF developer tools are enabled (r22675)
|
||||
- Fix: [NewGRF] Disallow accessing variable 1B in network games due to desync reasons (r22682)
|
||||
- Fix: Switching from a red to a white highlight (by switching to another tool) without switching the highlight mode (HT_RECT etc.) did not mark the selection dirty [FS#4670] (r22649)
|
||||
- Fix: [NewGRF] Parameters from NewGRFs were not properly parsed in all cases [FS#4599] (r22648, r22630, r22629, r22628, r22627)
|
||||
- Fix: GetSection() does not return a LockPart [FS#4678] (r22645)
|
||||
- Fix: [NewGRF] Disallow building NewObjects on water tiles owned by another company (r22643)
|
||||
- Fix: [NewGRF] Disable the 'set parameters' button in the NewGRF GUI, if the GRF specifies to have no parameters and one would not be able to set any parameters anyway (r22642)
|
||||
- Fix: Keep the previous owner of the upper and lower lock parts if they are built on existing water (r22638)
|
||||
- Fix: [NewGRF] Airports should not expose the tile specific random bits of the north tile. Only airport tiles should access those (r22636)
|
||||
- Fix: [NewGRF] Correctly reseed random bits of industries and industry tiles (r22635, r22634)
|
||||
- Fix: [NewGRF] Implement variables 25 and 7F for railtypes (r22633)
|
||||
- Fix: [NewGRF] Additional text in fund industry window is NewGRF supplied and thus should have a default colour (r22631)
|
||||
- Fix: Also initialise _old_vds with newgame settings; TTD savegames do not contain these settings [FS#4622] (r22626)
|
||||
- Fix: Do not zero the orders of disaster vehicles when converting savegames [FS#4642] (r22625)
|
||||
- Fix: When closing an AI company the local player cheated to, we need to cheat him to another company [FS#4654] (r22624, r22623)
|
||||
- Fix: When closing down companies their shares in other companies must be sold even if share trading is disabled at that point of time (r22622)
|
||||
- Fix: When asking the user to confirm an unsafe unpausing, there is no need to execute a command if 'no' is choosed. This also prevents crashing when clicking unpause while the confirm window is shown (r22621)
|
||||
- Fix: Enforce refit orders to be 'always go to depot' orders; service-only and stop-in-depot orders make no sense with refitting [FS#4651] (r22620)
|
||||
- Fix: Consider the size of the vehicle sprite for the lineheight in the company GUI. This also makes the widget containing the sprite not skip drawing it, if the bounds of the widget are outside of the drawing area though the sprite actually needs drawing [FS#4662] (r22619)
|
||||
- Fix: When changing difficulty settings over the network, do not just reopen the difficulty window if any game options window is opened; instead invalidate them properly [FS#4653] (r22618, r22617)
|
||||
- Fix: [NewGRF] If callback 33 returns a value out of range, no sound effect shall be played [FS#4656] (r22614)
|
||||
- Fix: Use rotated heightmap sizes for reporting scaling problems [FS#4663] (r22608)
|
||||
- Fix: Do not show cargo accepted/produced in the new station window when no tiles are selected (mouse hovering a window or toolbar) [FS#4647] (r22595, r22593)
|
||||
- Fix: Add active NewGRFs to the list of available ones when selecting the empty preset [FS#4644] (r22594)
|
||||
- Fix: Reading of heightmaps with uncommon BMP formats failed due to uninitialised variables [FS#4645] (r22592)
|
||||
- Fix: PBS order forecasting modified the current order index in case of a goto-nearest-depot order and no depot could be found [FS#4641] (r22589)
|
||||
- Fix: Remove BaseStorageArrays from _changed_storage_arrays on destruction (r22583, r22551)
|
||||
- Fix: Do not increment STL iterators after they have been invalidated (r22582)
|
||||
- Fix: Do not lower the arrow buttons in the NewGRF/AI parameter windows if they are clicked when disabled (r22553, r22499)
|
||||
- Fix: Clear airport persistent storage on construction/removal of airports (r22552)
|
||||
- Fix: Possible crash when opening the airport build window for the first time [FS#4619] (r22538)
|
||||
- Fix: Replace the half small airport structure on the intercontinental airport with some grass [FS#3494] (r22537)
|
||||
- Fix: Documentation omission regarding admin protocol [FS#4632] (r22536)
|
||||
- Fix: [NoAI] Doing rescan_ai in a game with running AIs caused a crash [FS#4631] (r22534)
|
||||
- Fix: Do not create an implicit order if the current order is the first order in the order list and we visit the station of the last entry of the order list (r22532)
|
||||
- Fix: MinGW 64 related compilation issues [FS#4623] (r22522, r22491, r22490, r22489)
|
||||
- Fix: The layout selectors of the airport build GUI did not latch properly (r22497, r22495)
|
||||
- Fix: Callback result for airport layout name was incorrectly used (r22496)
|
||||
- Fix: Airport preview sprite can depend on the layout, so update the cached SpriteID when the layout changes (r22494)
|
||||
- Fix: Engine IDs for coal and mail wagons were swapped in the TTO savegame conversion [FS#4622] (r22487)
|
||||
- Fix: The caption of centered windows could be moved out of the main window and thus become inaccessible when resizing the main window (r22485, r22484)
|
||||
- Fix: No client error packet was sent to the admin bots [FS#4585] (r22384)
|
||||
|
||||
|
||||
1.1.1 (2011-06-01)
|
||||
------------------------------------------------------------------------
|
||||
- Change: Automatic orders are better called implicit orders as no real order influencing path finding is added (r22474, r22473)
|
||||
- Fix: Only try to insert implicit orders for ground vehicles. Aircraft may reach unscheduled terminals when skipping orders [FS#4624] (r22492)
|
||||
|
||||
|
||||
1.1.1-RC1 (2011-05-15)
|
||||
------------------------------------------------------------------------
|
||||
- Feature: [NewGRF] Allow to filter by town of the current industry when using industry variable 0x68 [FS#4591] (r22434)
|
||||
- Change: Improve the speed of YAPF by tweaking hash tables size (r22351, r22350, r22348)
|
||||
- Change: Show one digit of the fractional train length in the depot (r22336, r22305, r22304, r22303)
|
||||
- Fix: When determining the executable path failed, the working directory was used instead, circumventing the not-home-directory check [FS#4613] (r22465)
|
||||
- Fix: [Windows] Prevent a crash when launching OpenTTD with -d from a MSYS console [FS#4587] (r22464)
|
||||
- Fix: Update the saveload window immediatelly after scanning a new directory, so queued events reach the window when already updated [FS#4615] (r22463)
|
||||
- Fix: [NewGRF] The c and p parts of station vars 40, 41 and 49 were incorrect for large stations (r22455, r22286)
|
||||
- Fix: [NewGRF] Zero register 0x100 as specified before resolving custom station foundations (r22452)
|
||||
- Fix: Do not 'log' the NewGRFs in the screenshot when in the menu [FS#4610] (r22450)
|
||||
- Fix: [NewGRF] When GRFs are disabled via Action E or due to GRM failure, also display an error in the GUI (r22444, r22443)
|
||||
- Fix: [NewGRF] Do not popup fatal NewGRF error messages in the intro screen. The GRFs are not going to be activated there anyway and the GRF settings GUI will not display the errors either (r22442)
|
||||
- Fix: Catenary was drawn incorrectly next to level crossings with foundations (r22437)
|
||||
- Fix: [NewGRF] Apply railtype property 12 (station graphics) also to station groundsprites from action 1 (r22436)
|
||||
- Fix: Git revision detection would return too much when tags are involved (r22435)
|
||||
- Fix: [NewGRF] When action14 specified different values for the palette, the values were OR-ed. Use the last set value instead (r22416)
|
||||
- Fix: [Network] Kicking yourself via remote console crashes the server [FS#4606] (r22414)
|
||||
- Fix: [NewGRF] Make sure the action2 ID of a generic feature callback is valid (r22409)
|
||||
- Fix: Check the availability year of all houses, not just the NewGRF houses, when making sure that at least one is available onwards from year 0 [FS#4581] (r22389, r22300, r22299)
|
||||
- Fix: When a game uses a lot of NewGRFs the buffer for storing that information in the PNG is too small (r22388)
|
||||
- Fix: Windows' recv seems to return 'graceful closed' before having passed the remaining buffer which causes OpenTTD to think all connections are 'incorrectly' terminated, i.e. without the 'I am leaving' packet from the client. So let the client wait a tiny bit after sending the 'I am leaving' packet and before gracefully closing the connection [FS#4601] (r22387)
|
||||
- Fix: When the last AI company gets removed, the 'dead' state was not reset in the AI debug window [FS#4602] (r22386)
|
||||
- Fix: Recolouring of silicon bridge was done incorrectly (r22380, r22379, r22378)
|
||||
- Fix: Crash when clicking a removed company in the vehicle list dropdowns [FS#4592] (r22373)
|
||||
- Fix: Keep better accounting of the order in which clients joined; client cannot be starved from joining and they get shown the amount of clients waiting in front of them (r22372, r22370, r22369, r22368, r22367, r22366, r22365, r22364, r22363, r22362, r22361)
|
||||
- Fix: Make sure saving has completely and utterly finished before starting a new one. Otherwise you could start a save, which would be marked as done by the previous save stopping and then yet another save could be started... and that could create a deadlock [FS#4596] (r22371)
|
||||
- Fix: Delete the client list popup when the client got removed (instead of previously selecting some other client) (r22360, r22359, r22358)
|
||||
- Fix: When inserting automatic orders, do not create consecutive duplicate orders (r22333, r22332, r22331, r22330, r22329, r22328, r22327)
|
||||
- Fix: Destinations of conditional orders were update incorrectly when deleting orders in front of the conditional orders, if the target order was the order just before of the conditional order (r22326)
|
||||
- Fix: Vehicles skipped orders when inserting automatic orders failed (r22324)
|
||||
- Fix: [NewGRF] When determining refittability use the cargo translation table of the GRF setting the refitmask instead of the GRF defining the action 3 (r22316)
|
||||
- Fix: Make road vehicles, ships and aircraft skip orders if they are leaving a depot and heading to the same one again; just like trains (r22309)
|
||||
- Fix: Waiting on a server could kick the client, or rather the client would kick itself due to an unexpected packet [FS#4574] (r22308)
|
||||
- Fix: When drawing the town authority window, check whether the availability of the actions changed, and force a complete redraw in that case (r22307)
|
||||
- Fix: The 'freeform edges' setting could be enabled when there were buoys on the northern border [FS#4580] (r22297)
|
||||
- Fix: Reset Window::scrolling_scrollbar when raising scrollbar buttons [FS#4571] (r22294)
|
||||
|
||||
|
||||
1.1.0 (2011-04-01)
|
||||
------------------------------------------------------------------------
|
||||
- Fix: In the scenario editor you could build a ship depot using the appropriate hotkey. Removing that depot causes an assertion to trigger [FS#4558] (r22266)
|
||||
|
||||
|
||||
1.1.0-RC3 (2011-03-18)
|
||||
------------------------------------------------------------------------
|
||||
- Fix: New game settings were applied too early when starting a game via a heightmap [FS#4557] (r22259)
|
||||
- Fix: Do not resort town, industry and signs list directly in OnInvalidateData(). There might be a scheduled rebuild which needs execution first. So, only set a trigger for resorting [FS#4546] (r22249, r22248, r22247, r22246, r22245, r22244, r22243, r22242, r22241, r22236, r22228, r22227, r22226)
|
||||
- Fix: [NewGRF] Object variable 0x48 was not available in callback 0x15C (r22231)
|
||||
- Fix: Compilation when compiling with --disable-ai (r22222)
|
||||
- Fix: When downloading a file via HTTP failed mid-way and OpenTTD fell back to the old system the partial downloaded amount would be counted twice [FS#4543] (r22208)
|
||||
- Fix: The 'center' (for movement) of vehicles is (currently still) always at 4/8th original vehicle length from the front, so trains should stop at the same location regardless of the length of the front engine [FS#4545] (r22206)
|
||||
- Fix: Make the base costs for building and demolishing NewObjects also local to the individual NewGRFs (r22204)
|
||||
- Fix: Removing a station order could stop when removing first automatic order (r22200)
|
||||
- Fix: Invalidate the object build window when using the date cheat (r22193)
|
||||
|
||||
|
||||
1.1.0-RC2 (2011-03-04)
|
||||
------------------------------------------------------------------------
|
||||
- Fix: Following a vehicle with a very high VehicleID was impossible (r22181)
|
||||
- Fix: [NewGRF] Memory leak if an industry NewGRF had more than one prop A or 15, or a station NewGRF had more than one prop 09 (r22175, r22165)
|
||||
- Fix: [NewGRF] Disable a station NewGRF when it contains an unterminated spritelayout in action0 prop 08 instead of crashing (r22164)
|
||||
- Fix: Building a station part adjacent to both an existing station and a rail waypoint failed [FS#4541] (r22163)
|
||||
- Fix: No update of NewGRF window when unknown GRF name becomes available [FS#4533] (r22162)
|
||||
- Fix: [NewGRF] Industry prop 0x11 is 4-bytes long, not 3 bytes (r22157)
|
||||
- Fix: Stations/infrastructure were not properly sold on some clients during bankruptcy [FS#4529] (r22154)
|
||||
- Fix: The Greek translation did not work as it breached the 200.000 bytes 'limit' for loading language files [FS#4536] (r22153)
|
||||
- Fix: Windows video driver crashed when it could not go to full screen at the resolution of the configuration file when starting OpenTTD [FS#4521] (r22149)
|
||||
- Fix: Do not run savegame conversion during SlNullPointers; the pointer might not be converted or be NULL at that point (r22146)
|
||||
- Fix: Some valid keycodes were ignored along with the invalid ones (r22142)
|
||||
- Fix: When commands need to invalidate windows, process these events asynchronously before the next redraw. Calling window code directly from command scope uses wrong _current_company and might issue nested DoCommands() which interfer with the running command [FS#4523] (r22141, r22140, r22135, r22134)
|
||||
- Fix: [NewGRF] Skipping only the invalid part of an action14 failed, the rest of the action was skipped instead (r22138)
|
||||
- Fix: Spectators had crashes when closing buoy windows (r22131)
|
||||
- Fix: Build-station-window showed wrong selection when reopening [FS#4530] (r22128)
|
||||
- Fix: Canals would get drawn as land in the smallmap when using the owner window (r22127)
|
||||
- Fix: The animation-ness of two goldmine tiles were swapped, causing the wheeltower to not work properly, and the bottom corner to show the wrong sprite [FS#4528] (r22125)
|
||||
- Fix: CommandQueue::Pop() did not update 'last'; popping the last item caused the queue to disconnect unless there was only one item [FS#4522] (r22123)
|
||||
- Fix: When a NOT_REACHED in saveload can be reached due to an invalid savegame, use SlErrorCorrupt instead. In other words, do not crash but show an error message (r22122)
|
||||
- Fix: In case of high frame_freq one could get commands executed after a new network game was started (r22121)
|
||||
- Fix: [NoAI] Prevent AIs from getting consistently over their allowed amount of operations by subtracting the amount they went over 'budget' from the budget for the next 'tick' (r22120)
|
||||
- Fix: The refit window was not correctly updated after selecting with Ctrl+Click [FS#4525] (r22118)
|
||||
- Fix: CanRemoveRoadWithStop() failed for _current_company = OWNER_TOWN, and for OWNER_NONE-owned road (r22117)
|
||||
|
||||
|
||||
1.1.0-RC1 (2011-02-18)
|
||||
------------------------------------------------------------------------
|
||||
- Feature: [NewGRF] Test all possible industry layouts during construction and prospecting [FS#4131] (r22012, r22010)
|
||||
- Feature: Wheel scrolling in the console (r21982)
|
||||
- Feature: Console command to reset the engine pool. It removes the traces of engines which are no longer associated to a NewGRF, and can be used to e.g. 'fix' scenarios which were screwed up by the author. You can only use it when there are no vehicles in the game though (r21975)
|
||||
- Feature: Add a setting to enable/disable funding local road reconstruction (r21974)
|
||||
- Feature: Introduce 'minimal' number of industries as a replacment for the old 'none' setting in the new game window (r21969)
|
||||
- Change: When loading old savegames with long trains set the maximum train length to the length of the longest train (r22061)
|
||||
- Change: Always report mammoth trains are disabled to NewGRFs, and allow the maximum train length to be modified in multiplayer as well [FS#4471] (r22004)
|
||||
- Fix: Remove invalid keycodes when reading hotkeys.cfg [FS#4510] (r22094)
|
||||
- Fix: The server list did not get sorted with one item in it, so the 'position in the list' variable was never updated causing problems when using the keyboard shortcuts for scrolling [FS#4514] (r22093)
|
||||
- Fix: When deleting towns, only relocate objects during DC_EXEC (r22087)
|
||||
- Fix: [Windows] If fullscreen fails with current resolution, use desktop resolution [FS#4489] (r22081)
|
||||
- Fix: The owner view of the smallmap was not updated after a company colour change (r22079)
|
||||
- Fix: Maximum train length interfered with wagon replacement when wagon removal was turned on [FS#4499] (r22078)
|
||||
- Fix: NewGRFs with invalid multi-tile houses could cause a valid 1x1 house following it to be seen as multi-tile, causing crashes [FS#4501] (r22075)
|
||||
- Fix: Immediately update the train weight when you change the multiplier for train cargo weight (r22073)
|
||||
- Fix: Some hotkey names in hotkey.cfg for the scenario editor toolbar were completely bogus (r22071)
|
||||
- Fix: Crashes when disconnecting after requesting the map [FS#4503] (r22070)
|
||||
- Fix: Delete all savegame packets, not just the first one (r22069)
|
||||
- Fix: Return 'connection lost' instead of 'okay' when SendPackets closed the connection, so we do not try to do anything else with the closed socket (r22068)
|
||||
- Fix: Do not hold a mutex when sending packets and thus possibly closing the connection as that wants to acquire the mutex again (r22067)
|
||||
- Fix: Verify we can allocate an Order, OrderList, CargoPacket, CargoPayment, and others before we actually try to do so (all corner cases) [FS#4468] (r22066, r22057, r22047, r22042, r22040, r22033, r22031, r22026, r22025, r22024, r22023, r22022)
|
||||
- Fix: Crash when disconnecting and reconnecting while the server is still saving the savegame [FS#4497] (r22064)
|
||||
- Fix: Memory leak when saving with LZMA or zlib fails mid-way (r22062)
|
||||
- Fix: Make the send chat message window follow the position of the status bar (r22059)
|
||||
- Fix: Metric and imperial HP are not the same. As imperial HP are used internally, set a conversion rate for metric HP [FS#4408] (r22056)
|
||||
- Fix: [Squirrel] Some invalid squirrel code caused the squirrel compiler to crash [FS#4490] (r22055)
|
||||
- Fix: The land area information window was not updated after a language change (r22053)
|
||||
- Fix: Roads under road stops would get a wrong owner after overbuilding (r22051)
|
||||
- Fix: In ancient savegames, e.g. TTO savegames, non primary vehicles (wagons and such) could have unitnumbers or even orders. However, these orders would not be updated when a station is removed. As such some savegames have wagons with current orders to invalid stations which triggers trouble in the load conversion. So, trash any orders/unitnumbers a non-primary vehicle has [FS#4496] (r22050)
|
||||
- Fix: [NewGRF] Company 0 does not always exist, so put temporary vehicles in a valid company (r22048)
|
||||
- Fix: Make sure order indices stay in range when copying, sharing, unsharing or deleting all orders [FS#4487] (r22046)
|
||||
- Fix: Update the consist cache when a part of a train is flipped in the depot [FS#4493] (r22044)
|
||||
- Fix: Invalidate the right windows when a part of a train is flipped in the depot (r22043)
|
||||
- Fix: Tab completion in chat did not cycle through all possible options (r22038)
|
||||
- Fix: Crash when watching the vehicle view of a vehicle that has multiple sequential nearest depot orders (or consists of a single nearest depot order) when there is no depot with index 0 [FS#4488] (r22034)
|
||||
- Fix: The server list got not resorted/redrawn after NewGRFs were downloaded [FS#4482] (r22029)
|
||||
- Fix: When paused and having the allowed actions while paused setting on 'no actions' cheating money would fail [FS#4479] (r22016)
|
||||
- Fix: Only show one AI per unique ID instead of all versions in the output of 'openttd -h' (r22007)
|
||||
- Fix: Smoke/sparks of trains would be shown under bridges, or rather through bridges [FS#4480] (r22006)
|
||||
- Fix: When the difference between force and resistance is smaller than the mass(*4) there would be no acceleration anymore, even when at higher (or lower) speed the force and resistance balance out better [FS#4473] (r21997)
|
||||
- Fix: [YAPF] Under some circumstances vehicles could be lost [FS#4472] (r21996)
|
||||
- Fix: [NewGRF] Make computations of closest-land/water-distances handle waterish tiles more correctly (r21994)
|
||||
- Fix: When building a lock on dry land costs for clearing water were deducted rather than for building canals (r21993)
|
||||
- Fix: AIs trying to change the AIOF_GOTO_NEAREST_DEPOT flag for existing orders triggered an assert. Explicitly forbid this as precondition for SetOrderFlags [FS#4467] (r21992)
|
||||
- Fix: The share/copy-orders-cursor was not updated to refer to the new vehicle when it got autoreplaced/-renewed [FS#4466] (r21991)
|
||||
- Fix: Vehicle status bar glitches on speed changes (r21989)
|
||||
- Fix: Scrolling of the console in pages used wrong line height and scrolled too much (r21979)
|
||||
- Fix: Redraw the town authority window after modifying town authority settings (r21973)
|
||||
- Fix: Crash when a multiplayer company goes bankrupt with 'you' in it [FS#4464] (r21970)
|
||||
|
||||
|
||||
1.1.0-beta5 (2011-02-04)
|
||||
------------------------------------------------------------------------
|
||||
- Feature: GUI setting to disable reversing at signals (r21962)
|
||||
- Feature: Not loading and not unloading is now possible (r21961)
|
||||
- Change: [NewGRF] Disable the flipping of train engines/wagons in the depot by default for NewGRFs [FS#4462] (r21966)
|
||||
- Change: Show the length of vehicles in tiles, instead of half tiles in the depot (r21960)
|
||||
- Change: Replace longbridges settings with custom maximum bridge and tunnel length setting (r21959)
|
||||
- Change: Randomize the vehicle a small UFO targets, do not use the one with lowest index (r21949)
|
||||
- Fix: Do not count the number of vehicles but the length of vehicles to (configurably) limit train length [FS#4461] (r21960)
|
||||
- Fix: [NewGRF] Reset the carry flag every 4 bytes in Action 6 when adding more than one variable (r21951)
|
||||
- Fix: Road vehicle was moved under the bridge when it was destroyed by an UFO while on a bridge (r21948)
|
||||
- Fix: Crash when converting a savegame with vehicles crashed in a tunnel entry, or with vehicles reversing there (r21947)
|
||||
- Fix: Funny behaviour when a road vehicle reverses while overtaking, so abort the overtake attempt when reversing the road vehicle [FS#4447] (r21946)
|
||||
- Fix: Not all vehicles should be tested to be inside a tunnel upon savegame load [FS#4460] (r21940)
|
||||
- Fix: Do not remove existing road/tram bits when overbuilding stops of the opposite road type [FS#4457] (r21936)
|
||||
- Fix: Allow to overbuild road stops which are built over trams (r21935)
|
||||
- Fix: Automatic orders behave now stable wrt. service orders and are not added or removed depending on the need of servicing [FS#4440] (r21933)
|
||||
- Fix: The town window would not be invalidated in the scenario editor if the ground changed and thus the required cargos for town growth [FS#4554] (r21929)
|
||||
- Fix: Converting an expensive rail type to a cheap one could give more money than removing and rebuilding cost (r21919)
|
||||
- Fix: Languages improperly sorted in the 'start server' window [FS#4443] (r21918)
|
||||
- Fix: The minimum speed needed for (realistic) acceleration to work properly can sometimes be more than the (temporary) maximum speed causing Clamp to 'fail'. Make sure that the minimum speed always overrules the maximum speed [FS#4442] (r21916)
|
||||
- Fix: Include the capacity of non-refittable vehicles in the refitted-capacity, if their cargo matches (r21904)
|
||||
- Fix: Do not count articulated parts when passing the number of vehicles to refit to the command. That may exceed 8 bits (r21902)
|
||||
- Fix: [NoAI] Hide automatic orders from AIs as they have no way of dealing with them (r21900)
|
||||
- Fix: Do not show a vehicle selection in the RefitWindow for refit orders. You cannot select anything anyway (r21899)
|
||||
- Fix: Using a pointer-iterator and adding things (thus reallocating) to the iterated array caused OpenTTD to crash on invalid pointers [FS#4438] (r21898)
|
||||
- Fix: Only some scenarios from the main scenario folder and no heightmaps could be started in the 'start server' window [FS#4421] (r21892)
|
||||
- Fix: Crash when scrolling outside of the main window (with some video backends) [FS#4434] (r21889)
|
||||
- Fix: [NewGRF] String codes 0x80 and 0x81 were broken since the typechecking of string parameters [FS#4422] (r21885)
|
||||
- Fix: When a train after reversing ended at the last bit of a bridge ramp and directed outside the bridge, it could still have track set to TRACK_BIT_WORMHOLE (r21880)
|
||||
- Fix: When a single-vehicle train was reversed while on a slope, its GOINGUP/DOWN were not swapped (r21874)
|
||||
- Remove: Settings for vehicle speed in the vehicle view, long date in status bar, drawing of bridge pillars, support for depot orders, time tabling and joining of stations upon building (r21958, r21957, r21956, r21955, r21954)
|
||||
- Remove: The non-uniform stations setting; it has been broken for over a year, and thus not used [FS#4456] (r21953)
|
||||
|
||||
|
||||
1.1.0-beta4 (2011-01-21)
|
||||
------------------------------------------------------------------------
|
||||
- Feature: [NewGRF] Rail type property to influence sorting of rail types in the drop down list [FS#4394] (r21866)
|
||||
@@ -425,7 +191,7 @@
|
||||
- Change: Limit the number of exceptions in the refittable cargo list to 7 (r21083)
|
||||
- Change: Reduce the chances to accidentally break savegames with NewGRFs by limiting loading of savegames that miss NewGRFs or change NewGRF settings in-game [FS#3012] (r21116)
|
||||
- Change: Tuned realistic acceleration to be a bit more realistic in order to make acceleration 'slower', which highlights the differences between vehicle types more (r21106)
|
||||
- Change: Do not make client reconnect waiting time depend on the company; in coop games that does not spread clients at all, and most companies have a low number causing it not to be spread out either. Use the ClientID instead (r21008)
|
||||
- Change: Do not make client reconnect waiting time depend on the company; in coop games that does not spread clients at all, and most companies have a low number causing it not to be spread out either. Use the ClientID instead. (r21008)
|
||||
- Change: Add installing options or rather options to not install certain documentation, in a similar way to GRFCodec/catcodec (r20999)
|
||||
- Change: Only display liveries in the livery window if they are used by some vehicle somewhen (r20849)
|
||||
- Change: [NoAI] Rename AIAbstractList to AIList (r20563)
|
||||
@@ -859,7 +625,7 @@
|
||||
- Fix: Report a more useful error when failing to build a bubble generator (r19137)
|
||||
- Fix: Resize station cargo widget when needed to display all accepted cargo types [FS#3617] (r19123)
|
||||
- Fix: [NewGRF] Industry property 0x17 was interpreted incorrectly and in some cases circumvented the density difficulty setting (r19120)
|
||||
- Fix: Removing towns (in the scenario editor) that had stations/depots refer to them or vehicles were on the town's road could cause a crash [FS#3616] (r19119)
|
||||
- Fix: removing towns (in the scenario editor) that had stations/depots refer to them or vehicles were on the town's road could cause a crash [FS#3616] (r19119)
|
||||
- Fix: In the order window the Non-stop dropdown was not enabled for depot and waypoint orders and some buttons were raised too soon [FS#3593] (r19118, r19117)
|
||||
- Fix: Do not crash on broken lng file and prevent it from happening again [FS#3611] (r19113, r19112)
|
||||
- Fix: Not all news data was properly freed when starting a new game [FS#3614] (r19105)
|
||||
@@ -3015,7 +2781,7 @@
|
||||
- Fix: Certain resolutions caused a crash when minimap was partly dragged outside the game window (r2424)
|
||||
- Fix: Deleting canals under bridges removed bridges first in certain configurations (r2436)
|
||||
- Fix: [NPF] Vehicles try to drive into a tunnel entrance from above (r2471)
|
||||
- Fix: [NewGRF] Some road vehicle action 0 properties were loaded as the wrong type (int8, int16, int32) causing undefined results, like cargo types being wrong (r2474)
|
||||
- Fix: [NewGRF] Some road vehicle action 0 properties were loaded as the wrong type (int8,int16,int32) causing undefined results. (like cargo types being wrong) (r2474)
|
||||
- Fix: The console variable autoclean_unprotected was linked to the variable _network_autoclean_protected (r2498)
|
||||
- Fix: Old bug in the PCX writer: The first pixel column contained garbage, the picture was shifted one to the right, and the last column was dropped (r2512)
|
||||
- Fix: Using the mouse wheel could lead to a crash if mouse was not over a widget (r2530)
|
||||
@@ -3081,9 +2847,9 @@
|
||||
- Fix: Disallow building an oil rig above sea level (r3416)
|
||||
- Fix: When removing a town-owned tunnel the player's rating was not reduced (r3418)
|
||||
- Fix: (Possible) game crash on removing track/road under bridge if a vehicle was on the track/road under the bridge and the track/road sloped (r3419)
|
||||
- Fix: [NewGRF] Only power should decide whether a rail vehicle is an engine or a wagon (r3424)
|
||||
- Fix: [NewGRF] Only power should decide whether a rail vehicle is an engine or a wagon. (fixes SHIKI 810 in jpsetw.grf) (r3424)
|
||||
- Fix: Incorrect validating of tree-planting command which can allow a buffer-overflow (r3446)
|
||||
- Fix: [NewGRF] When changing the sprite ID of a vehicle, if it is not FD (custom graphics), the value needs to changed from a 16bit array offset to an array index (r3449)
|
||||
- Fix: [NewGRF] When changing the sprite ID of a vehicle, if it is not FD (custom graphics), the value needs to changed from a 16bit array offset to an array index. (fixes tropicstw.grf) (r3449)
|
||||
- Fix: You could not remove an item from a list-type of config ingame from the configuration file (r3475)
|
||||
- Fix: [NewGRF] Always reinitialize the TTDPatch flags as patch settings may have changed (r3486)
|
||||
- Fix: Price for demolishing a bridge was dependent on orientation and map size (r3487)
|
||||
@@ -3267,7 +3033,7 @@
|
||||
- Fix: Destroyed train locks crossings [SF#1105112]
|
||||
- Fix: Upgrade rail fails when train under bridge [SF#1105281]
|
||||
- Fix: Trains do not think they're on a slope any more while they drive around in a tunnel [SF#1105959]
|
||||
- Fix: Buoys can now only be removed if no ship has it in their schedule. This makes buoys more useable in multiplayer games again, as buoys cannot be deleted by other players if they are used [SF#1105963]
|
||||
- Fix: Buoys can now only be removed if no ship has it in their schedule. (This makes buoys more useable in multiplayer games again, as buoys cannot be deleted by other players if they are used.) [SF#1105963]
|
||||
- Fix: Graph's keys get confused [SF#1106354]
|
||||
- Fix: Placing signals with 2x1 drags is treated as placing a single signal [SF#1106930]
|
||||
- Fix: Console ignoring return character occasionally [SF#1107350]
|
||||
@@ -3367,7 +3133,7 @@
|
||||
- Fix: Vehicles slow down under bridge if the track is on a foundation
|
||||
- Fix: You can no longer change name of waypoints whom are owned by somebody else
|
||||
- Fix: Shares are now also sold when a company goes bankrupt [SF#1090313]
|
||||
- Fix: It is no longer possible to crash trains of other companies by building a depot close to a station; trains do no longer enter tiles that do not belong to his owner [SF#1087701]
|
||||
- Fix: It is no longer possible to crash trains of other companies by building a depot close to a station. (even more: trains do no longer enter tiles that do not belong to his owner) [SF#1087701]
|
||||
- Fix: Crashed trains are not reported to have too few orders any more [SF#1087403]
|
||||
- Fix: Backup-order-list was not closed with an OT_NOTHING, [SF#1086375]
|
||||
- Fix: Docks now have a button to display the catchment area [SF#1085255]
|
||||
|
18
config.lib
18
config.lib
@@ -6,13 +6,8 @@
|
||||
# See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
log() {
|
||||
if [ $1 = "1" ]; then
|
||||
shift
|
||||
echo "$@"
|
||||
else
|
||||
shift
|
||||
fi
|
||||
echo "$@" >> $config_log
|
||||
if [ $1 = "1" ]; then echo "$2"; fi
|
||||
echo "$2" >> $config_log
|
||||
}
|
||||
|
||||
set_default() {
|
||||
@@ -460,7 +455,6 @@ detect_params() {
|
||||
|
||||
# Clean the logfile
|
||||
echo "" > $config_log
|
||||
log 2 "Invocation: $0 $*"
|
||||
}
|
||||
|
||||
save_params() {
|
||||
@@ -537,7 +531,7 @@ check_params() {
|
||||
check_build
|
||||
check_host
|
||||
|
||||
# Check for universal builds; they only make sense for OSX, so fail if enabled for another OS
|
||||
# Check for universal builds; they only make sense for OSX, so fail if enabled for another OS
|
||||
if [ "$enable_universal" = "0" ]; then
|
||||
log 1 "checking universal build... no"
|
||||
else
|
||||
@@ -2271,12 +2265,6 @@ detect_sdl() {
|
||||
return 0
|
||||
fi
|
||||
|
||||
if [ "$os" = "OSX" ]; then
|
||||
log 1 "WARNING: sdl is known to fail on some versions of Mac OS X"
|
||||
log 1 "WARNING: with some hardware configurations. Use at own risk!"
|
||||
sleep 5
|
||||
fi
|
||||
|
||||
if [ "$with_sdl" = "1" ] || [ "$with_sdl" = "" ] || [ "$with_sdl" = "2" ]; then
|
||||
sdl_config="sdl-config"
|
||||
else
|
||||
|
@@ -1,5 +1,5 @@
|
||||
Multiplayer manual for OpenTTD
|
||||
Last updated: 2011-02-16
|
||||
Last updated: 2011-01-20
|
||||
------------------------------------------------------------------------
|
||||
|
||||
|
||||
@@ -17,12 +17,6 @@ Table of contents
|
||||
|
||||
1.0) Starting a server
|
||||
---- -----------------
|
||||
- Make sure that you have your firewall of the computer as well as possible
|
||||
routers or modems of the server configured such that:
|
||||
* port 3979 is free for both UDP and TCP connections in- and outgoing
|
||||
* port 3978 is free outbound for UDP in order to advertise with the master
|
||||
server (if desired). Otherwise you'll have to tell players your IP.
|
||||
* port 3977 if use of the admin interface is desired (see admin_network.txt)
|
||||
- Click "multiplayer" on the startup screen
|
||||
- Click "start server"
|
||||
- Type in a game name
|
||||
@@ -212,8 +206,7 @@ Table of contents
|
||||
6.0) Troubleshooting
|
||||
---- ---------------
|
||||
- My advertising server does not show up in list at servers.openttd.org
|
||||
Run openttd with the '-d net=2' parameter. That will show which incoming
|
||||
communication is received, whether the replies from the master server or
|
||||
communication from an admin tool reach the programme. See section 1
|
||||
'Starting a server' further up for the ports and protocols used by OpenTTD.
|
||||
The ports can be configured in the config file.
|
||||
Run openttd with the '-d net=2' parameter, as this will show whether it
|
||||
receives replies from the master server. If it does not receive replies it
|
||||
is most likely that you need to configure your router to forward ports
|
||||
3979 (both TCP and UDP) to the computer that is hosting the game.
|
||||
|
@@ -99,7 +99,7 @@ elif [ -d "$ROOT_DIR/.git" ]; then
|
||||
# No rev? Maybe it is a custom git-svn clone
|
||||
REV_NR=`LC_ALL=C git log --pretty=format:%b --grep="git-svn-id:.*@[0-9]*" -1 | sed "s@.*\@\([0-9]*\).*@\1@"`
|
||||
fi
|
||||
TAG="`git name-rev --name-only --tags --no-undefined HEAD 2>/dev/null | sed 's@\^0$@@'`"
|
||||
TAG="`git name-rev --name-only --tags --no-undefined HEAD 2>/dev/null`"
|
||||
if [ -n "$TAG" ]; then
|
||||
BRANCH=""
|
||||
REV="$TAG"
|
||||
|
@@ -1,6 +1,6 @@
|
||||
OpenTTD's known bugs
|
||||
Last updated: 2011-07-30
|
||||
Release version: 1.1.2-RC2
|
||||
Last updated: 2011-01-21
|
||||
Release version: 1.1.0-beta4
|
||||
------------------------------------------------------------------------
|
||||
|
||||
|
||||
@@ -39,12 +39,8 @@ officially supporting Mac OS X again. For now it remains unsupported and
|
||||
we only apply bug fixes provided by the community but we are unable to fix
|
||||
these bugs ourselves.
|
||||
|
||||
- 4695 [OSX] Crash when switching to full screen with OS X Lion
|
||||
- 4689 [OSX] Crash when hiding window after coming from full screen
|
||||
- 4594 [Windows] Minimizing the windows when a modal error message is
|
||||
shown makes it difficult to exit the game
|
||||
- 4420 [OSX] OS' mouse pointer still shows
|
||||
- 2484 [OSX] Cannot enter CJK characters
|
||||
- 3447 [OSX] SDL port is unuseable
|
||||
- 2484 [OSX] Cannot enter CJK characters
|
||||
|
||||
2.1) Known bugs that will not be solved
|
||||
---- ----------------------------------
|
||||
@@ -216,15 +212,6 @@ OpenTTD not properly resizing with SDL on X [FS#3305]
|
||||
and GNOME's. With the XFCE's and LXDE's window managers the resize
|
||||
event is sent when the user releases the mouse.
|
||||
|
||||
Incorrect colours, crashes upon exit, debug warnings and smears upon
|
||||
window resizing with SDL on Mac OS X [FS#3447]
|
||||
Video handling with (lib)SDL under Mac OS X is known to fail on some
|
||||
versions of Mac OS X with some hardware configurations. Some of the
|
||||
problems happen only under some circumstances whereas others are
|
||||
always present.
|
||||
We suggest that the SDL video/sound backend is not used for OpenTTD
|
||||
in combinations with Mac OS X.
|
||||
|
||||
Train crashes entering same junction from block and path signals [FS#3928]
|
||||
When a train has reserved a path from a path signal to a two way
|
||||
block signal and the reservation passes a path signal through the
|
||||
@@ -297,31 +284,3 @@ Can't change volume inside OpenTTD [FS#4416]
|
||||
in OpenTTD. As a result you can't change the volume inside OpenTTD
|
||||
for backends such as SDL; just use the volume control provided by
|
||||
your operating system.
|
||||
|
||||
Can't run OpenTTD with the -d option from a MSYS console [FS#4587]
|
||||
The MSYS console does not allow OpenTTD to open an extra console for
|
||||
debugging output. Compiling OpenTTD with the --enable-console
|
||||
configure option prevents this issue and allows the -d option to use
|
||||
the MSYS console for its output.
|
||||
|
||||
Unreadable characters for non-latin locales [FS#4607]
|
||||
OpenTTD does not ship a non-latin font in its graphics files. As a
|
||||
result OpenTTD needs to acquire the font from somewhere else. What
|
||||
OpenTTD does is ask the operating system, or a system library, for
|
||||
the best font for a given language if the currently loaded font
|
||||
does not provide all characters of the chosen translation. This
|
||||
means that OpenTTD has no influence over the quality of the chosen
|
||||
font; it just does the best it can do.
|
||||
|
||||
If the text is unreadable there are several steps that you can take
|
||||
to improve this. The first step is finding a good font and configure
|
||||
this in the configuration file. See section 9.0 of readme.txt for
|
||||
more information. You can also increase the font size to make the
|
||||
characters bigger and possible better readable.
|
||||
|
||||
If the problem is with the clarity of the font you might want to
|
||||
enable anti-aliasing by setting the small_aa/medium_aa/large_aa
|
||||
settings to "true". However, anti-aliasing only works when a 32 bits
|
||||
blitter has been selected, e.g. blitter = "32bpp-anim", as with the
|
||||
8 bits blitter there are not enough colours to properly perform the
|
||||
anti-aliasing.
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 29 KiB After Width: | Height: | Size: 29 KiB |
@@ -8,13 +8,13 @@
|
||||
//
|
||||
-1 * 0 0C "Fixing (alignment) bugs in the orignal graphics. By Addi."
|
||||
-1 * 6 07 83 01 \7= 03 69
|
||||
// Different graphics for same wood truck
|
||||
// Different grahpics for same wood truck
|
||||
-1 * 14 0A 04 01 87 0C 01 89 0C 01 07 0E 01 09 0E
|
||||
-1 sprites/fix_graphics.png 82 8 09 16 22 -6 -7
|
||||
-1 sprites/fix_graphics.png 114 8 09 16 22 -14 -7
|
||||
-1 sprites/fix_graphics.png 146 8 09 16 22 -6 -7
|
||||
-1 sprites/fix_graphics.png 178 8 09 16 22 -14 -7
|
||||
// Different graphics for lots of trucks
|
||||
// Different grahpics for lots of trucks
|
||||
-1 * 5 0A 01 28 C4 0D
|
||||
-1 sprites/fix_graphics.png 226 8 01 18 8 -3 -10
|
||||
-1 sprites/fix_graphics.png 242 8 09 16 20 -14 -7
|
||||
@@ -56,19 +56,19 @@
|
||||
-1 sprites/fix_graphics.png 610 40 09 16 20 -14 -7
|
||||
-1 sprites/fix_graphics.png 642 40 01 12 28 -14 -6
|
||||
-1 sprites/fix_graphics.png 690 40 09 16 20 -6 -7
|
||||
// Different graphics for same truck
|
||||
// Different grahpics for same truck
|
||||
-1 * 14 0A 04 01 9D 0C 01 9F 0C 01 A1 0C 01 A3 0C
|
||||
-1 sprites/fix_graphics.png 738 40 09 16 22 -14 -7
|
||||
-1 sprites/fix_graphics.png 770 40 09 16 22 -6 -7
|
||||
-1 sprites/fix_graphics.png 2 72 09 16 22 -14 -7
|
||||
-1 sprites/fix_graphics.png 34 72 09 16 22 -6 -7
|
||||
// Different graphics for same paper truck
|
||||
// Different grahpics for same paper truck
|
||||
-1 * 14 0A 04 01 5D 0D 01 5F 0D 01 61 0D 01 63 0D
|
||||
-1 sprites/fix_graphics.png 82 72 09 16 22 -14 -7
|
||||
-1 sprites/fix_graphics.png 114 72 09 17 22 -5 -7
|
||||
-1 sprites/fix_graphics.png 146 72 09 17 22 -14 -8
|
||||
-1 sprites/fix_graphics.png 178 72 09 16 22 -6 -7
|
||||
// Different graphics for same paper truck (truck #2)
|
||||
// Different grahpics for same paper truck (truck #2)
|
||||
-1 * 14 0A 04 01 1D 0E 01 1F 0E 01 21 0E 01 23 0E
|
||||
-1 sprites/fix_graphics.png 226 72 09 16 22 -14 -7
|
||||
-1 sprites/fix_graphics.png 258 72 09 16 22 -6 -7
|
||||
@@ -135,13 +135,13 @@
|
||||
|
||||
// Non-toyland specific
|
||||
-1 * 6 07 83 01 \7= 03 0A
|
||||
// graphics for the tubular bridge pillars had incorrect offsets
|
||||
// Grahpics for the tubular bridge pillars had incorrect offsets
|
||||
-1 * 5 0A 01 04 05 0A
|
||||
-1 sprites/fix_graphics.png 98 296 09 9 4 2 -1
|
||||
-1 sprites/fix_graphics.png 114 296 09 9 4 2 -1
|
||||
-1 sprites/fix_graphics.png 130 296 09 9 4 -4 0
|
||||
-1 sprites/fix_graphics.png 146 296 09 9 4 -4 0
|
||||
// graphics for the cantilever bridge pillars had incorrect offsets
|
||||
// Grahpics for the cantilever bridge pillars had incorrect offsets
|
||||
-1 * 5 0A 01 04 DD 09
|
||||
-1 sprites/fix_graphics.png 178 296 09 11 10 2 -3
|
||||
-1 sprites/fix_graphics.png 194 296 09 12 10 2 -2
|
||||
@@ -150,51 +150,15 @@
|
||||
|
||||
// Toyland specific
|
||||
-1 * 6 07 83 01 \7! 03 0A
|
||||
// Graphics for the toyland tubular bridge pillars had incorrect offsets
|
||||
// Grahpics for the toyland tubular bridge pillars had incorrect offsets
|
||||
-1 * 5 0A 01 04 05 0A
|
||||
-1 sprites/fix_graphics.png 248 296 09 9 4 2 -1
|
||||
-1 sprites/fix_graphics.png 264 296 09 9 4 2 -1
|
||||
-1 sprites/fix_graphics.png 280 296 09 9 4 -4 0
|
||||
-1 sprites/fix_graphics.png 296 296 09 9 4 -4 0
|
||||
// Graphics for the toyland cantilever bridge pillars had incorrect offsets
|
||||
// Grahpics for the toyland cantilever bridge pillars had incorrect offsets
|
||||
-1 * 5 0A 01 04 DD 09
|
||||
-1 sprites/fix_graphics.png 328 296 09 11 10 2 -3
|
||||
-1 sprites/fix_graphics.png 344 296 09 12 10 2 -2
|
||||
-1 sprites/fix_graphics.png 360 296 09 11 10 -10 -1
|
||||
-1 sprites/fix_graphics.png 376 296 09 11 10 -10 -1
|
||||
|
||||
// Wrong, non-translated colours in tubular bridge in 'normal' climates
|
||||
// Toyland has separate sprites which are not colour translated, thus
|
||||
// this does not apply there;
|
||||
// Pillars are changed for all climates further up
|
||||
-1 * 6 07 83 01 \7= 03 \b22
|
||||
|
||||
// Main tubular bridge sprites
|
||||
-1 * 5 0A 01 \b6 \w2559
|
||||
-1 sprites/fix_graphics.png 2 330 09 40 32 -30 -26
|
||||
-1 sprites/fix_graphics.png 52 330 09 50 44 -42 -26
|
||||
-1 sprites/fix_graphics.png 116 330 09 45 46 -42 -21
|
||||
-1 sprites/fix_graphics.png 180 330 09 45 46 -2 -20
|
||||
-1 sprites/fix_graphics.png 244 330 09 50 44 0 -25
|
||||
-1 sprites/fix_graphics.png 308 330 09 41 32 0 -25
|
||||
// start rail bridge
|
||||
-1 * 5 0A 01 01 \w2569
|
||||
-1 sprites/fix_graphics.png 350 330 09 29 52 -25 -4
|
||||
// start rail + road bridge
|
||||
-1 * 5 0A 01 02 \w2574
|
||||
-1 sprites/fix_graphics.png 420 330 09 29 50 -25 -4
|
||||
-1 sprites/fix_graphics.png 489 330 09 29 52 -25 -4
|
||||
// start road + monorail bridge
|
||||
-1 * 5 0A 01 02 \w2580
|
||||
-1 sprites/fix_graphics.png 559 330 09 29 50 -25 -4
|
||||
-1 sprites/fix_graphics.png 629 330 09 29 52 -25 -4
|
||||
// start monrail + maglev bridge
|
||||
-1 * 5 0A 01 02 \w2586
|
||||
-1 sprites/fix_graphics.png 699 330 09 29 50 -25 -4
|
||||
-1 sprites/fix_graphics.png 489 283 09 29 52 -25 -4
|
||||
// start maglev bridge
|
||||
-1 * 5 0A 01 01 \w2592
|
||||
-1 sprites/fix_graphics.png 559 283 09 29 50 -25 -4
|
||||
// GUI sprite
|
||||
-1 * 5 0A 01 01 \w2600
|
||||
-1 sprites/fix_graphics.png 433 298 09 15 40 0 5
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 29 KiB After Width: | Height: | Size: 23 KiB |
@@ -1,57 +1,3 @@
|
||||
openttd (1.1.2~RC2) unstable; urgency=low
|
||||
|
||||
* New upstream release 1.1.2-RC2
|
||||
|
||||
-- Matthijs Kooijman <matthijs@stdin.nl> Sat, 30 Jul 2011 21:00:00 +0200
|
||||
|
||||
openttd (1.1.2~RC1) unstable; urgency=low
|
||||
|
||||
* New upstream release 1.1.2-RC1
|
||||
|
||||
-- Matthijs Kooijman <matthijs@stdin.nl> Sun, 24 Jul 2011 21:00:00 +0200
|
||||
|
||||
openttd (1.1.1) unstable; urgency=low
|
||||
|
||||
* New upstream release 1.1.1
|
||||
|
||||
-- Matthijs Kooijman <matthijs@stdin.nl> Wed, 01 Jun 2011 00:00:00 +0200
|
||||
|
||||
openttd (1.1.1~RC1) unstable; urgency=low
|
||||
|
||||
* New upstream release 1.1.1-RC1
|
||||
|
||||
-- Matthijs Kooijman <matthijs@stdin.nl> Sun, 15 May 2011 21:00:00 +0200
|
||||
|
||||
openttd (1.1.0) unstable; urgency=low
|
||||
|
||||
* New upstream release 1.1.0
|
||||
|
||||
-- Matthijs Kooijman <matthijs@stdin.nl> Fri, 01 Apr 2011 00:00:00 +0100
|
||||
|
||||
openttd (1.1.0~RC3) unstable; urgency=low
|
||||
|
||||
* New upstream release 1.1.0-RC3
|
||||
|
||||
-- Matthijs Kooijman <matthijs@stdin.nl> Fri, 18 Mar 2011 22:00:00 +0100
|
||||
|
||||
openttd (1.1.0~RC2) unstable; urgency=low
|
||||
|
||||
* New upstream release 1.1.0-RC2
|
||||
|
||||
-- Matthijs Kooijman <matthijs@stdin.nl> Fri, 04 Mar 2011 22:00:00 +0100
|
||||
|
||||
openttd (1.1.0~RC1) unstable; urgency=low
|
||||
|
||||
* New upstream release 1.1.0-RC1
|
||||
|
||||
-- Matthijs Kooijman <matthijs@stdin.nl> Fri, 18 Feb 2011 22:00:00 +0100
|
||||
|
||||
openttd (1.1.0~beta5) unstable; urgency=low
|
||||
|
||||
* New upstream release 1.1.0-beta5
|
||||
|
||||
-- Matthijs Kooijman <matthijs@stdin.nl> Fri, 04 Feb 2011 22:00:00 +0100
|
||||
|
||||
openttd (1.1.0~beta4) unstable; urgency=low
|
||||
|
||||
* New upstream release 1.1.0-beta4
|
||||
|
@@ -1,6 +1,6 @@
|
||||
@echo off
|
||||
|
||||
set OPENTTD_VERSION=1.1.2-RC2
|
||||
set OPENTTD_VERSION=1.1.0-beta4
|
||||
set OPENSFX_VERSION=0.8.0
|
||||
set NOSOUND_VERSION=0.8.0
|
||||
set OPENGFX_VERSION=0.7.0
|
||||
|
@@ -1,6 +0,0 @@
|
||||
# the man page is in the subpackage data
|
||||
addFilter("openttd.*: W: no-manual-page-for-binary openttd")
|
||||
# no other package depends on this package, so this should not matter
|
||||
addFilter("openttd.*: W: file-contains-date-and-time /usr/bin/openttd")
|
||||
addFilter("openttd.*: W: file-contains-current-date /usr/bin/openttd")
|
||||
|
@@ -1,100 +0,0 @@
|
||||
-------------------------------------------------------------------
|
||||
Sun Mar 6 09:36:55 UTC 2011 - ammler@openttdcoop.org
|
||||
|
||||
- upstream update 1.1.0-RC2
|
||||
* Feature: XZ/LZMA2 savegame support. New default reduces
|
||||
savegame size by 10 to 30% with slightly more CPU usage.
|
||||
(requires xz-devel)
|
||||
* Feature: Remote administration
|
||||
* Feature: a lot improvements with GUI
|
||||
* Feature: Customizable hotkeys
|
||||
* Sources for openttd.grf are pngs (requires grfcodec >= 5.1)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sun Nov 21 11:11:38 UTC 2010 - ammler@openttdcoop.org
|
||||
|
||||
- upstream update 1.0.5
|
||||
* Fix: Reading (very) recently freed memory [CVE-2010-4168]
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sun Oct 31 17:53:41 UTC 2010 - ammler@openttdcoop.org
|
||||
|
||||
- upstream update 1.0.4
|
||||
* build openttd.grf from source
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Aug 10 20:16:03 UTC 2010 - ammler@openttdcoop.org
|
||||
|
||||
- upstream update 1.0.3
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Jun 23 11:42:59 UTC 2010 - Marcel Gmür <ammler@openttdcoop.org>
|
||||
|
||||
- upstream update 1.0.2
|
||||
* Feature: Translated desktop shortcut comments (r19884)
|
||||
* many minor Bugfixes
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat May 1 15:59:32 UTC 2010 - Marcel Gmür <ammler@openttdcoop.org>
|
||||
|
||||
- upstream update 1.0.1
|
||||
* Fix: Leaking a file descriptor
|
||||
* Fix a lot small bugs, like minor desync issues on Mulitplayer
|
||||
- no strip on make
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Apr 1 08:53:54 UTC 2010 - Marcel Gmür <ammler@openttdcoop.org>
|
||||
|
||||
- upstream update 1.0.0 (finally!)
|
||||
* completely independend game but still working also
|
||||
with ttd original gaphics, sounds and music
|
||||
- Add: Recommends openmsx
|
||||
- requires lzo2
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Dec 18 2009 Marcel Gmür <ammler@openttdcoop.org> - 0.7.4
|
||||
|
||||
- support for differen branches
|
||||
- easy support for dedicated branch
|
||||
- let openttd build system make the dektop file
|
||||
- split the package to data and gui
|
||||
- disable requires
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Oct 01 2009 Marcel Gmür <ammler@openttdcoop.org> - 0.7.3
|
||||
|
||||
- disable libicu for RHEL4
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat Sep 26 2009 Marcel Gmür <ammler@openttdcoop.org> - 0.7.2
|
||||
|
||||
- no subfolder games for datadir
|
||||
- cleanup: no post and postun anymore
|
||||
- Recommends: opengfx (for suse and mandriva)
|
||||
- add SUSE support
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Oct 20 2008 Benedikt Brüggemeier <skidd13@openttd.org>
|
||||
|
||||
- Added libicu dependency
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Sep 23 2008 Benedikt Brüggemeier <skidd13@openttd.org>
|
||||
|
||||
- Merged both versions of the spec file
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Aug 29 2008 Jonathan Coome <maedhros@openttd.org>
|
||||
|
||||
- Rewrite spec file from scratch.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat Aug 02 2008 Benedikt Brüggemeier <skidd13@openttd.org>
|
||||
|
||||
- Updated spec file
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Mar 27 2008 Denis Burlaka <burlaka@yandex.ru>
|
||||
|
||||
- Universal spec file
|
||||
|
@@ -1,199 +1,202 @@
|
||||
%define dedicated 0
|
||||
# $Id$
|
||||
#-------------------------------------------------------------------------------
|
||||
# spec file for the openttd rpm package
|
||||
#
|
||||
# Copyright (c) 2007-2011 The OpenTTD developers
|
||||
#
|
||||
# This file and all modifications and additions to the pristine
|
||||
# package are under the same license as the package itself
|
||||
#
|
||||
# Note: for (at least) CentOS '#' comments end '\' continue command on new line.
|
||||
# So place all '#' commented parameters of e.g. configure to the end.
|
||||
#
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
%define binname openttd
|
||||
Name: openttd
|
||||
Version: 1.1.0
|
||||
Release: 1%{?dist}
|
||||
|
||||
%define srcver 1.1.2
|
||||
Group: Amusements/Games
|
||||
License: GPLv2
|
||||
URL: http://www.openttd.org
|
||||
Summary: OpenTTD is an Open Source clone of Chris Sawyer's Transport Tycoon Deluxe
|
||||
|
||||
%if %{dedicated}
|
||||
Name: %{binname}-dedicated
|
||||
%else
|
||||
Name: %{binname}
|
||||
%endif
|
||||
Version: %{srcver}
|
||||
Release: 1%{?dist}
|
||||
Group: Amusements/Games/Strategy/Other
|
||||
License: GPLv2
|
||||
URL: http://www.openttd.org
|
||||
Summary: An open source clone of Chris Sawyer's Transport Tycoon Deluxe
|
||||
|
||||
Source: openttd%{?branch:-%{branch}}-%{srcver}-source.tar.bz2
|
||||
|
||||
# the main package works with the exact same data package version only
|
||||
Requires: %{binname}-data = %{version}
|
||||
|
||||
BuildRequires: gcc-c++
|
||||
BuildRequires: libpng-devel
|
||||
BuildRequires: zlib-devel
|
||||
|
||||
%if 0%{?mdkversion}
|
||||
BuildRequires: liblzo-devel
|
||||
BuildRequires: liblzma-devel
|
||||
%else
|
||||
BuildRequires: lzo-devel
|
||||
BuildRequires: xz-devel
|
||||
%endif
|
||||
|
||||
#needed by libdrm
|
||||
%if 0%{?rhel_version} >= 600
|
||||
BuildRequires: kernel
|
||||
%endif
|
||||
|
||||
# for lzma detection
|
||||
%if 0%{?suse_version}
|
||||
BuildRequires: pkg-config
|
||||
%endif
|
||||
|
||||
# Desktop specific tags, not needed for dedicated
|
||||
%if !%{dedicated}
|
||||
BuildRequires: fontconfig-devel
|
||||
BuildRequires: SDL-devel
|
||||
|
||||
BuildRequires: grfcodec
|
||||
Source: %{name}-%{version}-source.tar.bz2
|
||||
|
||||
Requires: fontconfig
|
||||
Requires: SDL
|
||||
Requires: zlib
|
||||
Requires: xz-devel
|
||||
BuildRequires: gcc-c++
|
||||
BuildRequires: fontconfig-devel
|
||||
BuildRequires: libpng-devel
|
||||
BuildRequires: libicu-devel
|
||||
BuildRequires: SDL-devel
|
||||
BuildRequires: zlib-devel
|
||||
# vendor specific dependencies
|
||||
%if !0%{?rhel_version}
|
||||
BuildRequires: libicu-devel
|
||||
%endif
|
||||
%if 0%{?rhel_version} || 0%{?fedora}
|
||||
BuildRequires: freetype-devel
|
||||
%endif
|
||||
%if 0%{?suse_version} || 0%{?mdkversion}
|
||||
BuildRequires: freetype2-devel
|
||||
%endif
|
||||
%if 0%{?suse_version}
|
||||
BuildRequires: update-desktop-files
|
||||
%endif
|
||||
%if %{_vendor}=="alt"
|
||||
Requires: freetype
|
||||
BuildRequires: freetype-devel
|
||||
%endif
|
||||
%if %{_vendor}=="redhat" || %{_vendor}=="fedora"
|
||||
Requires: freetype
|
||||
BuildRequires: freetype-devel
|
||||
BuildRequires: desktop-file-utils
|
||||
%endif
|
||||
%if %{_vendor}=="suse" || %{_vendor}=="mandriva"
|
||||
Requires: freetype2
|
||||
BuildRequires: freetype2-devel
|
||||
%endif
|
||||
%if %{_vendor}=="suse"
|
||||
BuildRequires: update-desktop-files
|
||||
%endif
|
||||
|
||||
%if %{dedicated}
|
||||
Conflicts: %{binname} %{binname}-gui
|
||||
%else
|
||||
Provides: %{binname}-gui
|
||||
Conflicts: %{binname}-dedicated
|
||||
Requires: openttd-opensfx
|
||||
# recommends works for suse (not sles9) and mandriva, only
|
||||
%if 0%{?suse_version} || 0%{?mdkversion}
|
||||
# require timidity is part of openmsx
|
||||
Recommends: openttd-openmsx
|
||||
%endif
|
||||
%if 0%{?suse_version} > 910 || %{_vendor}=="mandriva"
|
||||
Recommends: opengfx
|
||||
# for 0.8.0
|
||||
#Recommends: opensfx
|
||||
%endif
|
||||
# Recommends would fit better but not well supported...
|
||||
Requires: openttd-opengfx >= 0.3.2
|
||||
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
|
||||
|
||||
%description
|
||||
OpenTTD is a reimplementation of the Microprose game "Transport Tycoon Deluxe"
|
||||
with lots of new features and enhancements. To play the game you need either
|
||||
the original data from the game or install the recommend subackages OpenGFX for
|
||||
free graphics, OpenSFX for free sounds and OpenMSX for free music.
|
||||
the original data from the game or install the recommend package OpenGFX.
|
||||
|
||||
OpenTTD is licensed under the GNU General Public License version 2.0. For more
|
||||
information, see the file 'COPYING' included with every release and source
|
||||
download of the game.
|
||||
|
||||
# the subpackage data needs only to build once, the dedicated version
|
||||
# can reuse the data package of the gui package
|
||||
%if !%{dedicated}
|
||||
%package data
|
||||
Summary: Data package for OpenTTD
|
||||
Group: Amusements/Games/Strategy/Other
|
||||
%if 0%{?suse_version} >= 1120 || 0%{?fedora} || 0%{?mdkversion}
|
||||
BuildArch: noarch
|
||||
%endif
|
||||
BuildRequires: grfcodec
|
||||
|
||||
%description data
|
||||
OpenTTD is a reimplementation of the Microprose game "Transport Tycoon Deluxe"
|
||||
with lots of new features and enhancements. To play the game you need either
|
||||
the original data from the game or the required package OpenGFX and OpenSFX.
|
||||
|
||||
This package is required by openttd gui and openttd dedicated package. This
|
||||
way it is possible to install a openttd version without SDL requirement.
|
||||
|
||||
%endif
|
||||
|
||||
%prep
|
||||
%setup -qn openttd%{?branch:-%{branch}}-%{srcver}
|
||||
|
||||
# we build the grfs from sources but validate the result with the existing data
|
||||
md5sum bin/data/* > validate.data
|
||||
%setup -q
|
||||
|
||||
%build
|
||||
# suse sle <10 has no support for makedepend
|
||||
%if 0%{?sles_version} == 9 || 0%{?sles_version} == 10
|
||||
%define do_makedepend 0
|
||||
%else
|
||||
%define do_makedepend 1
|
||||
%endif
|
||||
./configure \
|
||||
--prefix-dir="%{_prefix}" \
|
||||
--binary-name="%{binname}" \
|
||||
--binary-dir="bin" \
|
||||
--data-dir="share/%{binname}" \
|
||||
--doc-dir="share/doc/%{binname}" \
|
||||
--menu-name="OpenTTD%{?branch: %{branch}}" \
|
||||
--menu-group="Game;StrategyGame;" \
|
||||
--enable-dedicated="%{dedicated}" \
|
||||
--prefix-dir="%{_prefix}" \
|
||||
--binary-name="%{name}" \
|
||||
--enable-strip \
|
||||
--binary-dir="bin" \
|
||||
--data-dir="share/%{name}" \
|
||||
--with-makedepend="%{do_makedepend}" \
|
||||
# --revision="%{ver}%{?prever:-%{prever}}" \
|
||||
# --enable-debug=0 \
|
||||
# --with-sdl \
|
||||
# --with-zlib \
|
||||
# --with-png \
|
||||
# --with-freetype \
|
||||
# --with-fontconfig \
|
||||
# --with-icu \
|
||||
# --menu_group="Game;" \
|
||||
# --menu-name="OpenTTD" \
|
||||
# --doc-dir="share\doc\%{name}" \
|
||||
# --icon-dir="share/pixmaps" \
|
||||
# --icon-theme-dir="share/icons/hicolor" \
|
||||
# --man-dir="share/man/man6" \
|
||||
# --menu-dir="share/applications"
|
||||
|
||||
make %{?_smp_mflags}
|
||||
|
||||
%install
|
||||
%if %{dedicated}
|
||||
# dedicated package needs binary only
|
||||
install -D -m0755 bin/openttd %{buildroot}/%{_bindir}/%{binname}
|
||||
%else
|
||||
make install INSTALL_DIR="%{buildroot}"
|
||||
%if 0%{?suse_version}
|
||||
%suse_update_desktop_file -r %{binname} Game StrategyGame
|
||||
%endif
|
||||
|
||||
# Validate menu entrys (vendor specific)
|
||||
%if %{_vendor} == "redhat" || %{_vendor}=="fedora"
|
||||
desktop-file-install \
|
||||
--vendor="%{_vendor}" \
|
||||
--remove-key Version \
|
||||
--dir="%{buildroot}/%{_datadir}/applications/" \
|
||||
"%{buildroot}/%{_datadir}/applications/%{name}.desktop" \
|
||||
# --delete-original
|
||||
%endif
|
||||
%if %{_vendor}=="suse"
|
||||
%__cat > %{name}.desktop << EOF
|
||||
[Desktop Entry]
|
||||
Encoding=UTF-8
|
||||
Name=OpenTTD
|
||||
Comment=OpenTTD - A clone of the Microprose game 'Transport Tycoon Deluxe'
|
||||
GenericName=OpenTTD
|
||||
Type=Application
|
||||
Terminal=false
|
||||
Exec=%{name}
|
||||
Icon=%{name}
|
||||
Categories=Game;StrategyGame;
|
||||
EOF
|
||||
%suse_update_desktop_file -i %{name} Game StrategyGame
|
||||
%endif
|
||||
|
||||
%clean
|
||||
rm -rf "%{buildroot}"
|
||||
#rm -rf "%{buildroot}"
|
||||
|
||||
%check
|
||||
md5sum -c validate.data
|
||||
|
||||
%files
|
||||
%attr(755, root, root) %{_bindir}/%{binname}
|
||||
|
||||
# all other files are for the gui version only, also no
|
||||
# subpackage needed for the dedicated version
|
||||
%if !%{dedicated}
|
||||
%defattr(-, root, root)
|
||||
%dir %{_datadir}/icons/hicolor
|
||||
%dir %{_datadir}/icons/hicolor/16x16
|
||||
%dir %{_datadir}/icons/hicolor/16x16/apps
|
||||
%dir %{_datadir}/icons/hicolor/32x32
|
||||
%dir %{_datadir}/icons/hicolor/32x32/apps
|
||||
%dir %{_datadir}/icons/hicolor/48x48
|
||||
%dir %{_datadir}/icons/hicolor/48x48/apps
|
||||
%dir %{_datadir}/icons/hicolor/64x64
|
||||
%dir %{_datadir}/icons/hicolor/64x64/apps
|
||||
%dir %{_datadir}/icons/hicolor/128x128
|
||||
%dir %{_datadir}/icons/hicolor/128x128/apps
|
||||
%dir %{_datadir}/icons/hicolor/256x256
|
||||
%dir %{_datadir}/icons/hicolor/256x256/apps
|
||||
%{_datadir}/applications/%{binname}.desktop
|
||||
%{_datadir}/icons/hicolor/16x16/apps/%{binname}.png
|
||||
%{_datadir}/icons/hicolor/32x32/apps/%{binname}.png
|
||||
%{_datadir}/icons/hicolor/48x48/apps/%{binname}.png
|
||||
%{_datadir}/icons/hicolor/64x64/apps/%{binname}.png
|
||||
%{_datadir}/icons/hicolor/128x128/apps/%{binname}.png
|
||||
%{_datadir}/icons/hicolor/256x256/apps/%{binname}.png
|
||||
%{_datadir}/pixmaps/%{binname}.32.xpm
|
||||
|
||||
%files data
|
||||
%defattr(-, root, root)
|
||||
%dir %{_datadir}/doc/%{binname}
|
||||
%dir %{_datadir}/%{binname}
|
||||
%dir %{_datadir}/%{binname}/lang
|
||||
%dir %{_datadir}/%{binname}/data
|
||||
%dir %{_datadir}/%{binname}/gm
|
||||
%dir %{_datadir}/%{binname}/scripts
|
||||
%dir %{_datadir}/%{binname}/ai
|
||||
%{_datadir}/doc/%{binname}/*
|
||||
%{_datadir}/%{binname}/lang/*
|
||||
%{_datadir}/%{binname}/data/*
|
||||
%{_datadir}/%{binname}/scripts/*
|
||||
%{_datadir}/%{binname}/ai/*
|
||||
%{_datadir}/%{binname}/gm/*
|
||||
%doc %{_mandir}/man6/%{binname}.6.*
|
||||
%post
|
||||
# Update the icon cache (vendor specific)
|
||||
%if %{_vendor}=="mandriva"
|
||||
%update_icon_cache hicolor
|
||||
%endif
|
||||
|
||||
%if %{_vendor} == "redhat" || %{_vendor}=="fedora"
|
||||
touch --no-create %{_datadir}/icons/hicolor
|
||||
if [ -x %{_bindir}/gtk-update-icon-cache ]; then
|
||||
%{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
|
||||
fi
|
||||
%endif
|
||||
|
||||
%postun
|
||||
# Update the icon cache (vendor specific)
|
||||
%if %{_vendor}=="mandriva"
|
||||
%update_icon_cache hicolor
|
||||
%endif
|
||||
|
||||
%if %{_vendor} == "redhat" || %{_vendor}=="fedora"
|
||||
touch --no-create %{_datadir}/icons/hicolor
|
||||
if [ -x %{_bindir}/gtk-update-icon-cache ]; then
|
||||
%{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
|
||||
fi
|
||||
%endif
|
||||
|
||||
%files
|
||||
%defattr(-, root, games, -)
|
||||
%dir %{_datadir}/doc/%{name}
|
||||
%dir %{_datadir}/%{name}
|
||||
%dir %{_datadir}/%{name}/lang
|
||||
%dir %{_datadir}/%{name}/data
|
||||
%dir %{_datadir}/%{name}/gm
|
||||
%dir %{_datadir}/%{name}/scripts
|
||||
%attr(755, root, games) %{_bindir}/%{name}
|
||||
%{_datadir}/doc/%{name}/*
|
||||
%{_datadir}/%{name}/lang/*
|
||||
%{_datadir}/%{name}/data/*
|
||||
%{_datadir}/%{name}/scripts/*
|
||||
%{_datadir}/applications/*%{name}.desktop
|
||||
%{_datadir}/pixmaps/*
|
||||
%{_datadir}/icons/*
|
||||
%doc %{_mandir}/man6/%{name}.6.*
|
||||
|
||||
%changelog
|
||||
* Sat Sep 26 2009 Marcel Gmür <ammler@openttdcoop.org> - 0.7.2
|
||||
- no subfolder games for datadir
|
||||
- cleanup: no post and postun anymore
|
||||
- Recommends: opengfx (for suse and mandriva)
|
||||
- add SUSE support
|
||||
|
||||
* Mon Oct 20 2008 Benedikt Brüggemeier <skidd13@openttd.org>
|
||||
- Added libicu dependency
|
||||
|
||||
* Thu Sep 23 2008 Benedikt Brüggemeier <skidd13@openttd.org>
|
||||
- Merged both versions of the spec file
|
||||
|
||||
* Fri Aug 29 2008 Jonathan Coome <maedhros@openttd.org>
|
||||
- Rewrite spec file from scratch.
|
||||
|
||||
* Sat Aug 02 2008 Benedikt Brüggemeier <skidd13@openttd.org>
|
||||
- Updated spec file
|
||||
|
||||
* Thu Mar 27 2008 Denis Burlaka <burlaka@yandex.ru>
|
||||
- Universal spec file
|
||||
|
@@ -1,9 +1,9 @@
|
||||
# Version numbers to update
|
||||
!define APPV_MAJOR 1
|
||||
!define APPV_MINOR 1
|
||||
!define APPV_MAINT 2
|
||||
!define APPV_BUILD 1
|
||||
!define APPV_EXTRA "-RC2"
|
||||
!define APPV_MAINT 0
|
||||
!define APPV_BUILD 3
|
||||
!define APPV_EXTRA "-beta4"
|
||||
|
||||
!define APPNAME "OpenTTD" ; Define application name
|
||||
!define APPVERSION "${APPV_MAJOR}.${APPV_MINOR}.${APPV_MAINT}${APPV_EXTRA}" ; Define application version
|
||||
@@ -560,12 +560,12 @@ Function CheckWindowsVersion
|
||||
StrCmp $R0 "win9x" 0 WinNT
|
||||
ClearErrors
|
||||
StrCmp ${APPARCH} "win9x" Done 0
|
||||
MessageBox MB_OKCANCEL|MB_ICONSTOP "You are trying to install the Windows 2000, XP, Vista and 7 version on Windows 95, 98 or ME. This is will not work. Please download the correct version. Do you really want to continue?" IDOK Done IDCANCEL Abort
|
||||
MessageBox MB_OKCANCEL|MB_ICONSTOP "You are trying to install the Windows 2000, XP and Vista version on Windows 95, 98 or ME. This is will not work. Please download the correct version. Do you really want to continue?" IDOK Done IDCANCEL Abort
|
||||
GoTo Done
|
||||
WinNT:
|
||||
ClearErrors
|
||||
StrCmp ${APPARCH} "win9x" 0 Done
|
||||
MessageBox MB_OKCANCEL|MB_ICONEXCLAMATION "You are trying to install the Windows 95, 98 and ME version on Windows 2000, XP, Vista or 7. This is not advised, but will work with reduced capabilities. We suggest that you download the correct version. Do you really want to continue?" IDOK Done IDCANCEL Abort
|
||||
MessageBox MB_OKCANCEL|MB_ICONEXCLAMATION "You are trying to install the Windows 95, 98 and ME version on Windows 2000, XP or Vista. This is not advised, but will work with reduced capabilities. We suggest that you download the correct version. Do you really want to continue?" IDOK Done IDCANCEL Abort
|
||||
Abort:
|
||||
Quit
|
||||
Done:
|
||||
|
@@ -227,9 +227,6 @@ Function DetermineSVNVersion()
|
||||
Loop
|
||||
If oExec.ExitCode = 0 Then
|
||||
version = oExec.StdOut.ReadLine()
|
||||
If Right(version, 2) = "^0" Then
|
||||
version = Left(version, Len(version) - 2)
|
||||
End If
|
||||
branch = ""
|
||||
End If ' oExec.ExitCode = 0
|
||||
End If ' Err.Number = 0
|
||||
|
@@ -388,7 +388,6 @@
|
||||
<ClInclude Include="..\src\cargotype.h" />
|
||||
<ClInclude Include="..\src\cheat_func.h" />
|
||||
<ClInclude Include="..\src\cheat_type.h" />
|
||||
<ClInclude Include="..\src\clear_func.h" />
|
||||
<ClInclude Include="..\src\cmd_helper.h" />
|
||||
<ClInclude Include="..\src\command_func.h" />
|
||||
<ClInclude Include="..\src\command_type.h" />
|
||||
@@ -430,6 +429,7 @@
|
||||
<ClInclude Include="..\src\fileio_type.h" />
|
||||
<ClInclude Include="..\src\fios.h" />
|
||||
<ClInclude Include="..\src\fontcache.h" />
|
||||
<ClInclude Include="..\src\functions.h" />
|
||||
<ClInclude Include="..\src\gamelog.h" />
|
||||
<ClInclude Include="..\src\gamelog_internal.h" />
|
||||
<ClInclude Include="..\src\genworld.h" />
|
||||
@@ -1074,7 +1074,6 @@
|
||||
<ClInclude Include="..\src\pathfinder\yapf\yapf_node.hpp" />
|
||||
<ClInclude Include="..\src\pathfinder\yapf\yapf_node_rail.hpp" />
|
||||
<ClInclude Include="..\src\pathfinder\yapf\yapf_node_road.hpp" />
|
||||
<ClInclude Include="..\src\pathfinder\yapf\yapf_node_ship.hpp" />
|
||||
<ClCompile Include="..\src\pathfinder\yapf\yapf_rail.cpp" />
|
||||
<ClCompile Include="..\src\pathfinder\yapf\yapf_road.cpp" />
|
||||
<ClCompile Include="..\src\pathfinder\yapf\yapf_ship.cpp" />
|
||||
|
@@ -384,9 +384,6 @@
|
||||
<ClInclude Include="..\src\cheat_type.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\clear_func.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\cmd_helper.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
@@ -510,6 +507,9 @@
|
||||
<ClInclude Include="..\src\fontcache.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\functions.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\gamelog.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
@@ -2442,9 +2442,6 @@
|
||||
<ClInclude Include="..\src\pathfinder\yapf\yapf_node_road.hpp">
|
||||
<Filter>YAPF</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\pathfinder\yapf\yapf_node_ship.hpp">
|
||||
<Filter>YAPF</Filter>
|
||||
</ClInclude>
|
||||
<ClCompile Include="..\src\pathfinder\yapf\yapf_rail.cpp">
|
||||
<Filter>YAPF</Filter>
|
||||
</ClCompile>
|
||||
|
@@ -826,10 +826,6 @@
|
||||
RelativePath=".\..\src\cheat_type.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\..\src\clear_func.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\..\src\cmd_helper.h"
|
||||
>
|
||||
@@ -994,6 +990,10 @@
|
||||
RelativePath=".\..\src\fontcache.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\..\src\functions.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\..\src\gamelog.h"
|
||||
>
|
||||
@@ -3662,10 +3662,6 @@
|
||||
RelativePath=".\..\src\pathfinder\yapf\yapf_node_road.hpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\..\src\pathfinder\yapf\yapf_node_ship.hpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\..\src\pathfinder\yapf\yapf_rail.cpp"
|
||||
>
|
||||
|
@@ -823,10 +823,6 @@
|
||||
RelativePath=".\..\src\cheat_type.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\..\src\clear_func.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\..\src\cmd_helper.h"
|
||||
>
|
||||
@@ -991,6 +987,10 @@
|
||||
RelativePath=".\..\src\fontcache.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\..\src\functions.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\..\src\gamelog.h"
|
||||
>
|
||||
@@ -3659,10 +3659,6 @@
|
||||
RelativePath=".\..\src\pathfinder\yapf\yapf_node_road.hpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\..\src\pathfinder\yapf\yapf_node_ship.hpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\..\src\pathfinder\yapf\yapf_rail.cpp"
|
||||
>
|
||||
|
75
readme.txt
75
readme.txt
@@ -1,6 +1,6 @@
|
||||
OpenTTD readme
|
||||
Last updated: 2011-07-30
|
||||
Release version: 1.1.2-RC2
|
||||
Last updated: 2011-01-21
|
||||
Release version: 1.1.0-beta4
|
||||
------------------------------------------------------------------------
|
||||
|
||||
|
||||
@@ -249,12 +249,9 @@ wait for an error message to pop up. The error message will tell you
|
||||
|
||||
4.2) OpenTTD directories
|
||||
---- -------------------
|
||||
OpenTTD uses its own directory to store its required 3rd party base set files (see section
|
||||
4.1 "Required 3rd party files") and non-compulsory extension and configuration files. See
|
||||
below for their proper place within this OpenTTD main data directory.
|
||||
|
||||
The main OpenTTD directories can be found in various locations, depending on your operating
|
||||
system:
|
||||
The required 3rd party files listed in the section 4.1 "(Required) 3rd party files"
|
||||
as well as other non-compulsory extensions (NewGRFs, AI, heightmaps, scenarios) can be
|
||||
placed in a few different locations:
|
||||
1. The current working directory (from where you started OpenTTD)
|
||||
For non-Windows operating systems OpenTTD will not scan for files in this
|
||||
directory if it is your personal directory, i.e. "~/", or when it is the
|
||||
@@ -276,26 +273,7 @@ system:
|
||||
5. The installation directory (Linux only)
|
||||
Linux: /usr/share/games/openttd
|
||||
6. The application bundle (Mac OSX only)
|
||||
It includes the OpenTTD files (grf+lng) and it will work as long as they aren't
|
||||
touched
|
||||
|
||||
Different types of data or extensions go into different subdirectories of the chosen main
|
||||
OpenTTD directory:
|
||||
Config File: (no subdirectory)
|
||||
Screenshots: (no subdirectory)
|
||||
Base Graphics: data (or a subdirectory thereof)
|
||||
Sound Sets: data (or a subdirectory thereof)
|
||||
NewGRFs: data (or a subdirectory thereof)
|
||||
32bpp Sets: data (or a subdirectory thereof)
|
||||
Music Sets: gm (or a subdirectory thereof)
|
||||
AIs: ai (or a subdirectory thereof)
|
||||
AI Libraries: ai/libraries (or a subdirectory thereof)
|
||||
Savegames: save
|
||||
Automatic Savegames: save/autosave
|
||||
Scenarios: scenario
|
||||
|
||||
The (automatically created) directory content_download is for OpenTTD's internal use and
|
||||
no files should be added to it or its subdirectories manually.
|
||||
It includes the OpenTTD files (grf+lng) and it will work as long as they aren't touched
|
||||
|
||||
Notes:
|
||||
- Linux in the previous list means .deb, but most paths should be similar for others.
|
||||
@@ -379,7 +357,7 @@ OpenTTD in debug mode.
|
||||
The configuration file for OpenTTD (openttd.cfg) is in a simple Windows-like
|
||||
.INI format. It's mostly undocumented. Almost all settings can be changed
|
||||
ingame by using the 'Advanced Settings' window.
|
||||
When you cannot find openttd.cfg you should look in the directories as
|
||||
When you can not find openttd.cfg you should look in the directories as
|
||||
described in section 4.2. If you do not have an openttd.cfg OpenTTD will
|
||||
create one after closing.
|
||||
|
||||
@@ -441,8 +419,7 @@ DOS:
|
||||
---- ---------------------------
|
||||
The following libraries are used by OpenTTD for:
|
||||
- libSDL/liballegro: hardware access (video, sound, mouse)
|
||||
- zlib: (de)compressing of old (0.3.0-1.0.5) savegames, content downloads,
|
||||
heightmaps
|
||||
- zlib: (de)compressing of old (0.3.0-1.0.5) savegames, content downloads, heightmaps
|
||||
- liblzo2: (de)compressing of old (pre 0.3.0) savegames
|
||||
- liblzma: (de)compressing of savegames (1.1.0 and later)
|
||||
- libpng: making screenshots and loading heightmaps
|
||||
@@ -468,9 +445,9 @@ you remove the graphics file using "make maintainer-clean".
|
||||
The following compilers are known to compile OpenTTD:
|
||||
- Microsoft Visual C++ (MSVC) 2005, 2008 and 2010.
|
||||
Version 2005 gives bogus warnings about scoping issues.
|
||||
- GNU Compiler Collection (GCC) 3.3 - 4.7.
|
||||
- GNU Compiler Collection (GCC) 3.3 - 4.6.
|
||||
Versions 4.1 and earlier give bogus warnings about uninitialised variables.
|
||||
Versions 4.4 and later give bogus warnings about freeing non-heap objects.
|
||||
Versions 4.4 and later give bogus warnings about freeing heap objects.
|
||||
- Intel C++ Compiler (ICC) 12.0.
|
||||
|
||||
The following compilers are known not to compile OpenTTD:
|
||||
@@ -478,8 +455,7 @@ The following compilers are known not to compile OpenTTD:
|
||||
- GNU Compiler Collection (GCC) 3.2 and earlier.
|
||||
These old versions fail due to OpenTTD's template usage.
|
||||
- Intel C++ Compiler (ICC) 11.1 and earlier.
|
||||
Version 10.0 and earlier fail a configure check and fail with recent system
|
||||
headers.
|
||||
Version 10.0 and earlier fail a configure check and fail with recent system headers.
|
||||
Version 10.1 fails to compile station_gui.cpp.
|
||||
Version 11.1 fails with internal error when compiling network.cpp.
|
||||
- Clang/LLVM 2.8 and earlier.
|
||||
@@ -558,33 +534,24 @@ look at http://wiki.openttd.org/index.php/Command_line.
|
||||
The most frequent problem is missing data files. Please install OpenGFX and
|
||||
possibly OpenSFX and OpenMSX. See section 4.1.1 for more information.
|
||||
|
||||
Under certain circumstance, especially on Ubuntu OpenTTD can be extremely slow
|
||||
and/or freeze. See known-bugs.txt for more information and how to solve this
|
||||
problem on your computer.
|
||||
Under, especially, Ubuntu OpenTTD can be extremely slow and freeze/hand under
|
||||
certain circumstance. See known-bugs.txt for more information and how to
|
||||
solve this problem on your computer.
|
||||
|
||||
Under Windows 98 and lower it is impossible to use a dedicated server; it will
|
||||
fail to start. Perhaps this is for the better because those OSes are not known
|
||||
for their stability.
|
||||
|
||||
With the added support for font-based text selecting a non-latin language can
|
||||
result in lots of question marks ('?') being shown on screen. Please open your
|
||||
configuration file (openttd.cfg - see Section 4.2 for where to find it)
|
||||
and add a suitable font for the small, medium and / or large font, e.g.:
|
||||
small_font = "Tahoma"
|
||||
medium_font = "Tahoma"
|
||||
large_font = "Tahoma"
|
||||
You should use a font name like "Tahoma" or a path to the desired font.
|
||||
With the added support for font-based text selecting a non-latin language will
|
||||
result in garbage (lots of '?') shown on screen. Please open your configuration
|
||||
file and add a desired font for small/medium/-and large_font. This can be a font
|
||||
name like "Tahoma" or a path to a font.
|
||||
|
||||
Any NewGRF file used in a game is stored inside the savegame and will refuse
|
||||
to load if you don't have that NewGRF file available. A list of missing files
|
||||
can be viewed in the NewGRF window accessible from the file load dialogue window.
|
||||
|
||||
You can try to obtain the missing files from that NewGRF dialogue or - if they
|
||||
are not available online - you can search manually through our forum's graphics
|
||||
development section (http://www.tt-forums.net/viewforum.php?f=66) or GrfCrawler
|
||||
(http://grfcrawler.tt-forums.net/). Put the NewGRF files in OpenTTD's data folder
|
||||
(see section 4.2 "OpenTTD directories") and rescan the list of available NewGRFs.
|
||||
Once you have all missing files, you are set to go.
|
||||
will be output to the console at the moment, so use the '-d' flag (on windows)
|
||||
to see this list. You just have to find the files (http://grfcrawler.tt-forums.net/)
|
||||
put them in the data/ folder and you're set to go.
|
||||
|
||||
|
||||
X.X) Credits
|
||||
|
@@ -121,7 +121,6 @@ cargopacket.h
|
||||
cargotype.h
|
||||
cheat_func.h
|
||||
cheat_type.h
|
||||
clear_func.h
|
||||
cmd_helper.h
|
||||
command_func.h
|
||||
command_type.h
|
||||
@@ -163,6 +162,7 @@ fileio_func.h
|
||||
fileio_type.h
|
||||
fios.h
|
||||
fontcache.h
|
||||
functions.h
|
||||
gamelog.h
|
||||
gamelog_internal.h
|
||||
genworld.h
|
||||
@@ -875,7 +875,6 @@ pathfinder/yapf/yapf_destrail.hpp
|
||||
pathfinder/yapf/yapf_node.hpp
|
||||
pathfinder/yapf/yapf_node_rail.hpp
|
||||
pathfinder/yapf/yapf_node_road.hpp
|
||||
pathfinder/yapf/yapf_node_ship.hpp
|
||||
pathfinder/yapf/yapf_rail.cpp
|
||||
pathfinder/yapf/yapf_road.cpp
|
||||
pathfinder/yapf/yapf_ship.cpp
|
||||
|
6
src/3rdparty/squirrel/include/squirrel.h
vendored
6
src/3rdparty/squirrel/include/squirrel.h
vendored
@@ -54,10 +54,6 @@ extern "C" {
|
||||
typedef __int64 SQInteger;
|
||||
typedef unsigned __int64 SQUnsignedInteger;
|
||||
typedef unsigned __int64 SQHash; /*should be the same size of a pointer*/
|
||||
#elif defined(_WIN32)
|
||||
typedef long long SQInteger;
|
||||
typedef unsigned long long SQUnsignedInteger;
|
||||
typedef unsigned long long SQHash; /*should be the same size of a pointer*/
|
||||
#else
|
||||
typedef long SQInteger;
|
||||
typedef unsigned long SQUnsignedInteger;
|
||||
@@ -81,8 +77,6 @@ typedef float SQFloat;
|
||||
#if defined(SQUSEDOUBLE) && !defined(_SQ64)
|
||||
#ifdef _MSC_VER
|
||||
typedef __int64 SQRawObjectVal; //must be 64bits
|
||||
#elif defined(_WIN32)
|
||||
typedef long long SQRawObjectVal; //must be 64bits
|
||||
#else
|
||||
typedef long SQRawObjectVal; //must be 64bits
|
||||
#endif
|
||||
|
@@ -597,7 +597,6 @@ public:
|
||||
}
|
||||
SQInteger Factor()
|
||||
{
|
||||
_exst._deref = DEREF_NO_DEREF;
|
||||
switch(_token)
|
||||
{
|
||||
case TK_STRING_LITERAL: {
|
||||
|
@@ -125,7 +125,7 @@ public:
|
||||
static int GetStartNextTime();
|
||||
|
||||
/** Wrapper function for AIScanner::GetAIConsoleList */
|
||||
static char *GetConsoleList(char *p, const char *last, bool newest_only = false);
|
||||
static char *GetConsoleList(char *p, const char *last);
|
||||
/** Wrapper function for AIScanner::GetAIConsoleLibraryList */
|
||||
static char *GetConsoleLibraryList(char *p, const char *last);
|
||||
/** Wrapper function for AIScanner::GetAIInfoList */
|
||||
@@ -168,7 +168,7 @@ public:
|
||||
static void GameLoop() {}
|
||||
static bool HasAI(const struct ContentInfo *ci, bool md5sum) { return false; }
|
||||
static void Rescan() {}
|
||||
static char *GetConsoleList(char *p, const char *last, bool newest_only = false) { return p; }
|
||||
static char *GetConsoleList(char *p, const char *last) { return p; }
|
||||
static void nop() { }
|
||||
};
|
||||
|
||||
|
@@ -10,6 +10,7 @@
|
||||
/** @file ai_config.cpp Implementation of AIConfig. */
|
||||
|
||||
#include "../stdafx.h"
|
||||
#include "../openttd.h"
|
||||
#include "../settings_type.h"
|
||||
#include "../core/random_func.hpp"
|
||||
#include "ai.hpp"
|
||||
@@ -75,9 +76,9 @@ AIInfo *AIConfig::GetInfo() const
|
||||
return this->info;
|
||||
}
|
||||
|
||||
bool AIConfig::ResetInfo(bool force_exact_match)
|
||||
bool AIConfig::ResetInfo()
|
||||
{
|
||||
this->info = AI::FindInfo(this->name, force_exact_match ? this->version : -1, force_exact_match);
|
||||
this->info = AI::FindInfo(this->name, -1, false);
|
||||
return this->info != NULL;
|
||||
}
|
||||
|
||||
|
@@ -57,12 +57,10 @@ public:
|
||||
/**
|
||||
* When ever the AI Scanner is reloaded, all infos become invalid. This
|
||||
* function tells AIConfig about this.
|
||||
* @param force_exact_match If true try to find the exact same version
|
||||
* as specified. If false any version is ok.
|
||||
* @return \c true if the reset was successful, \c false if the AI was no longer
|
||||
* found.
|
||||
*/
|
||||
bool ResetInfo(bool force_exact_match);
|
||||
bool ResetInfo();
|
||||
|
||||
/**
|
||||
* Get the AIInfo linked to this AIConfig.
|
||||
|
@@ -170,24 +170,13 @@
|
||||
* a random new AI on reload). */
|
||||
for (CompanyID c = COMPANY_FIRST; c < MAX_COMPANIES; c++) {
|
||||
if (_settings_game.ai_config[c] != NULL && _settings_game.ai_config[c]->HasAI()) {
|
||||
if (!_settings_game.ai_config[c]->ResetInfo(true)) {
|
||||
if (!_settings_game.ai_config[c]->ResetInfo()) {
|
||||
DEBUG(ai, 0, "After a reload, the AI by the name '%s' was no longer found, and removed from the list.", _settings_game.ai_config[c]->GetName());
|
||||
_settings_game.ai_config[c]->ChangeAI(NULL);
|
||||
if (Company::IsValidAiID(c)) {
|
||||
/* The code belonging to an already running AI was deleted. We can only do
|
||||
* one thing here to keep everything sane and that is kill the AI. After
|
||||
* killing the offending AI we start a random other one in it's place, just
|
||||
* like what would happen if the AI was missing during loading. */
|
||||
AI::Stop(c);
|
||||
AI::StartNew(c, false);
|
||||
}
|
||||
} else if (Company::IsValidAiID(c)) {
|
||||
/* Update the reference in the Company struct. */
|
||||
Company::Get(c)->ai_info = _settings_game.ai_config[c]->GetInfo();
|
||||
}
|
||||
}
|
||||
if (_settings_newgame.ai_config[c] != NULL && _settings_newgame.ai_config[c]->HasAI()) {
|
||||
if (!_settings_newgame.ai_config[c]->ResetInfo(false)) {
|
||||
if (!_settings_newgame.ai_config[c]->ResetInfo()) {
|
||||
DEBUG(ai, 0, "After a reload, the AI by the name '%s' was no longer found, and removed from the list.", _settings_newgame.ai_config[c]->GetName());
|
||||
_settings_newgame.ai_config[c]->ChangeAI(NULL);
|
||||
}
|
||||
@@ -300,9 +289,9 @@ void CcAI(const CommandCost &result, TileIndex tile, uint32 p1, uint32 p2)
|
||||
return DAYS_IN_YEAR;
|
||||
}
|
||||
|
||||
/* static */ char *AI::GetConsoleList(char *p, const char *last, bool newest_only)
|
||||
/* static */ char *AI::GetConsoleList(char *p, const char *last)
|
||||
{
|
||||
return AI::ai_scanner->GetAIConsoleList(p, last, newest_only);
|
||||
return AI::ai_scanner->GetAIConsoleList(p, last);
|
||||
}
|
||||
|
||||
/* static */ char *AI::GetConsoleLibraryList(char *p, const char *last)
|
||||
|
@@ -10,6 +10,7 @@
|
||||
/** @file ai_gui.cpp Window for configuring the AIs */
|
||||
|
||||
#include "../stdafx.h"
|
||||
#include "../openttd.h"
|
||||
#include "../table/sprites.h"
|
||||
#include "../gui.h"
|
||||
#include "../querystring_gui.h"
|
||||
@@ -182,20 +183,13 @@ struct AIListWindow : public Window {
|
||||
nwi->widget_data = (this->vscroll->GetCapacity() << MAT_ROW_START) + (1 << MAT_COL_START);
|
||||
}
|
||||
|
||||
/**
|
||||
* Some data on this window has become invalid.
|
||||
* @param data Information about the changed data.
|
||||
* @param gui_scope Whether the call is done from GUI scope. You may not do everything when not in GUI scope. See #InvalidateWindowData() for details.
|
||||
*/
|
||||
virtual void OnInvalidateData(int data = 0, bool gui_scope = true)
|
||||
virtual void OnInvalidateData(int data)
|
||||
{
|
||||
if (_game_mode == GM_NORMAL && Company::IsValidID(this->slot)) {
|
||||
delete this;
|
||||
return;
|
||||
}
|
||||
|
||||
if (!gui_scope) return;
|
||||
|
||||
this->vscroll->SetCount((int)this->ai_info_list->size() + 1);
|
||||
|
||||
/* selected goes from -1 .. length of ai list - 1. */
|
||||
@@ -374,7 +368,6 @@ struct AISettingsWindow : public Window {
|
||||
/* One of the arrows is clicked (or green/red rect in case of bool value) */
|
||||
if (IsInsideMM(x, 0, 21)) {
|
||||
int new_val = this->ai_config->GetSetting(config_item.name);
|
||||
int old_val = new_val;
|
||||
if (bool_item) {
|
||||
new_val = !new_val;
|
||||
} else if (x >= 10) {
|
||||
@@ -389,19 +382,18 @@ struct AISettingsWindow : public Window {
|
||||
this->clicked_increase = false;
|
||||
}
|
||||
|
||||
if (new_val != old_val) {
|
||||
this->ai_config->SetSetting(config_item.name, new_val);
|
||||
this->clicked_button = num;
|
||||
this->timeout = 5;
|
||||
this->ai_config->SetSetting(config_item.name, new_val);
|
||||
this->clicked_button = num;
|
||||
this->timeout = 5;
|
||||
|
||||
this->CheckDifficultyLevel();
|
||||
}
|
||||
this->CheckDifficultyLevel();
|
||||
} else if (!bool_item) {
|
||||
/* Display a query box so users can enter a custom value. */
|
||||
this->clicked_row = num;
|
||||
SetDParam(0, this->ai_config->GetSetting(config_item.name));
|
||||
ShowQueryString(STR_JUST_INT, STR_CONFIG_SETTING_QUERY_CAPTION, 10, 100, this, CS_NUMERAL, QSF_NONE);
|
||||
}
|
||||
|
||||
this->SetDirty();
|
||||
break;
|
||||
}
|
||||
@@ -446,12 +438,7 @@ struct AISettingsWindow : public Window {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Some data on this window has become invalid.
|
||||
* @param data Information about the changed data.
|
||||
* @param gui_scope Whether the call is done from GUI scope. You may not do everything when not in GUI scope. See #InvalidateWindowData() for details.
|
||||
*/
|
||||
virtual void OnInvalidateData(int data = 0, bool gui_scope = true)
|
||||
virtual void OnInvalidateData(int data)
|
||||
{
|
||||
if (_game_mode == GM_NORMAL && Company::IsValidID(this->slot)) delete this;
|
||||
}
|
||||
@@ -706,19 +693,12 @@ struct AIConfigWindow : public Window {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Some data on this window has become invalid.
|
||||
* @param data Information about the changed data.
|
||||
* @param gui_scope Whether the call is done from GUI scope. You may not do everything when not in GUI scope. See #InvalidateWindowData() for details.
|
||||
*/
|
||||
virtual void OnInvalidateData(int data = 0, bool gui_scope = true)
|
||||
virtual void OnInvalidateData(int data)
|
||||
{
|
||||
if (!IsEditable(this->selected_slot)) {
|
||||
this->selected_slot = INVALID_COMPANY;
|
||||
}
|
||||
|
||||
if (!gui_scope) return;
|
||||
|
||||
this->SetWidgetDisabledState(AIC_WIDGET_DECREASE, GetGameSettings().difficulty.max_no_competitors == 0);
|
||||
this->SetWidgetDisabledState(AIC_WIDGET_INCREASE, GetGameSettings().difficulty.max_no_competitors == MAX_COMPANIES - 1);
|
||||
this->SetWidgetDisabledState(AIC_WIDGET_CHANGE, this->selected_slot == INVALID_COMPANY);
|
||||
@@ -818,8 +798,9 @@ struct AIDebugWindow : public QueryStringBaseWindow {
|
||||
/* Check if the currently selected company is still active. */
|
||||
if (ai_debug_company == INVALID_COMPANY || !Company::IsValidAiID(ai_debug_company)) {
|
||||
if (ai_debug_company != INVALID_COMPANY) {
|
||||
/* Raise the widget for the previous selection. */
|
||||
/* Raise and disable the widget for the previous selection. */
|
||||
this->RaiseWidget(ai_debug_company + AID_WIDGET_COMPANY_BUTTON_START);
|
||||
this->DisableWidget(ai_debug_company + AID_WIDGET_COMPANY_BUTTON_START);
|
||||
|
||||
ai_debug_company = INVALID_COMPANY;
|
||||
}
|
||||
@@ -849,6 +830,9 @@ struct AIDebugWindow : public QueryStringBaseWindow {
|
||||
|
||||
if (this->show_break_box) this->DrawEditBox(AID_WIDGET_BREAK_STR_EDIT_BOX);
|
||||
|
||||
/* If there are no active companies, don't display anything else. */
|
||||
if (ai_debug_company == INVALID_COMPANY) return;
|
||||
|
||||
/* Paint the company icons */
|
||||
for (CompanyID i = COMPANY_FIRST; i < MAX_COMPANIES; i++) {
|
||||
NWidgetCore *button = this->GetWidget<NWidgetCore>(i + AID_WIDGET_COMPANY_BUTTON_START);
|
||||
@@ -879,9 +863,6 @@ struct AIDebugWindow : public QueryStringBaseWindow {
|
||||
DrawCompanyIcon(i, button->pos_x + button->current_x / 2 - 7 + offset, this->GetWidget<NWidgetBase>(AID_WIDGET_COMPANY_BUTTON_START + i)->pos_y + 2 + offset);
|
||||
}
|
||||
|
||||
/* If there are no active companies, don't display anything else. */
|
||||
if (ai_debug_company == INVALID_COMPANY) return;
|
||||
|
||||
Backup<CompanyByte> cur_company(_current_company, ai_debug_company, FILE_LINE);
|
||||
AILog::LogData *log = (AILog::LogData *)AIObject::GetLogPointer();
|
||||
cur_company.Restore();
|
||||
@@ -1052,16 +1033,11 @@ struct AIDebugWindow : public QueryStringBaseWindow {
|
||||
return state;
|
||||
}
|
||||
|
||||
/**
|
||||
* Some data on this window has become invalid.
|
||||
* @param data Information about the changed data.
|
||||
* @param gui_scope Whether the call is done from GUI scope. You may not do everything when not in GUI scope. See #InvalidateWindowData() for details.
|
||||
*/
|
||||
virtual void OnInvalidateData(int data = 0, bool gui_scope = true)
|
||||
virtual void OnInvalidateData(int data = 0)
|
||||
{
|
||||
if (data == -1 || ai_debug_company == data) this->SetDirty();
|
||||
|
||||
if (gui_scope && data == -2) {
|
||||
if (data == -2) {
|
||||
/* The continue button should be disabled when the game is unpaused and
|
||||
* it was previously paused by the break string ( = a line in the log
|
||||
* was highlighted )*/
|
||||
@@ -1073,9 +1049,8 @@ struct AIDebugWindow : public QueryStringBaseWindow {
|
||||
}
|
||||
}
|
||||
|
||||
/* If the log message is related to the active company tab, check the break string.
|
||||
* This needs to be done in gameloop-scope, so the AI is suspended immediately. */
|
||||
if (!gui_scope && data == ai_debug_company && this->break_check_enabled && !StrEmpty(this->edit_str_buf)) {
|
||||
/* If the log message is related to the active company tab, check the break string */
|
||||
if (data == ai_debug_company && this->break_check_enabled && !StrEmpty(this->edit_str_buf)) {
|
||||
/* Get the log instance of the active company */
|
||||
Backup<CompanyByte> cur_company(_current_company, ai_debug_company, FILE_LINE);
|
||||
AILog::LogData *log = (AILog::LogData *)AIObject::GetLogPointer();
|
||||
|
@@ -15,6 +15,7 @@
|
||||
#include "ai_info.hpp"
|
||||
#include "ai_scanner.hpp"
|
||||
#include "../settings_type.h"
|
||||
#include "../openttd.h"
|
||||
#include "../debug.h"
|
||||
#include "../rev.h"
|
||||
|
||||
|
@@ -74,7 +74,6 @@
|
||||
#include "api/ai_waypointlist.hpp.sq"
|
||||
|
||||
#include "../company_base.h"
|
||||
#include "../company_func.h"
|
||||
#include "../fileio_func.h"
|
||||
|
||||
/** The maximum number of operations for saving or loading the data of an AI. */
|
||||
|
@@ -330,12 +330,11 @@ AIInfo *AIScanner::FindInfo(const char *nameParam, int versionParam, bool force_
|
||||
return info;
|
||||
}
|
||||
|
||||
char *AIScanner::GetAIConsoleList(char *p, const char *last, bool newest_only) const
|
||||
char *AIScanner::GetAIConsoleList(char *p, const char *last) const
|
||||
{
|
||||
p += seprintf(p, last, "List of AIs:\n");
|
||||
const AIInfoList &list = newest_only ? this->info_single_list : this->info_list;
|
||||
AIInfoList::const_iterator it = list.begin();
|
||||
for (; it != list.end(); it++) {
|
||||
AIInfoList::const_iterator it = this->info_list.begin();
|
||||
for (; it != this->info_list.end(); it++) {
|
||||
AIInfo *i = (*it).second;
|
||||
p += seprintf(p, last, "%10s (v%d): %s\n", i->GetName(), i->GetVersion(), i->GetDescription());
|
||||
}
|
||||
|
@@ -12,8 +12,11 @@
|
||||
#ifndef AI_SCANNER_HPP
|
||||
#define AI_SCANNER_HPP
|
||||
|
||||
#include <squirrel.h>
|
||||
#include "../script/script_scanner.hpp"
|
||||
#include "../core/string_compare_type.hpp"
|
||||
#include "ai.hpp"
|
||||
#include <map>
|
||||
|
||||
/**
|
||||
* Class that scans for available AIs.
|
||||
@@ -53,7 +56,7 @@ public:
|
||||
/**
|
||||
* Get the list of available AIs for the console.
|
||||
*/
|
||||
char *GetAIConsoleList(char *p, const char *last, bool newest_only) const;
|
||||
char *GetAIConsoleList(char *p, const char *last) const;
|
||||
|
||||
/**
|
||||
* Get the list of available AI Libraries for the console.
|
||||
|
@@ -12,7 +12,12 @@
|
||||
#ifndef AI_STORAGE_HPP
|
||||
#define AI_STORAGE_HPP
|
||||
|
||||
#include "../command_func.h"
|
||||
#include "../map_func.h"
|
||||
#include "../network/network.h"
|
||||
#include "../company_func.h"
|
||||
#include "../signs_func.h"
|
||||
#include "../tunnelbridge.h"
|
||||
#include "../vehicle_func.h"
|
||||
#include "../road_type.h"
|
||||
#include "../group.h"
|
||||
|
@@ -9,7 +9,6 @@
|
||||
|
||||
/** @file ai_accounting.cpp Implementation of AIAccounting. */
|
||||
|
||||
#include "../../stdafx.h"
|
||||
#include "ai_accounting.hpp"
|
||||
|
||||
Money AIAccounting::GetCosts()
|
||||
|
@@ -9,7 +9,6 @@
|
||||
|
||||
/** @file ai_airport.cpp Implementation of AIAirport. */
|
||||
|
||||
#include "../../stdafx.h"
|
||||
#include "ai_airport.hpp"
|
||||
#include "ai_station.hpp"
|
||||
#include "../../station_base.h"
|
||||
|
@@ -9,7 +9,6 @@
|
||||
|
||||
/** @file ai_base.cpp Implementation of AIBase. */
|
||||
|
||||
#include "../../stdafx.h"
|
||||
#include "ai_base.hpp"
|
||||
#include "../../network/network.h"
|
||||
#include "../../core/random_func.hpp"
|
||||
|
@@ -9,7 +9,6 @@
|
||||
|
||||
/** @file ai_basestation.cpp Implementation of AIBaseStation. */
|
||||
|
||||
#include "../../stdafx.h"
|
||||
#include "ai_basestation.hpp"
|
||||
#include "../../station_base.h"
|
||||
#include "../../string_func.h"
|
||||
|
@@ -12,6 +12,7 @@
|
||||
#ifndef AI_BASESTATION_HPP
|
||||
#define AI_BASESTATION_HPP
|
||||
|
||||
#include "ai_object.hpp"
|
||||
#include "ai_error.hpp"
|
||||
|
||||
/**
|
||||
|
@@ -9,7 +9,6 @@
|
||||
|
||||
/** @file ai_bridge.cpp Implementation of AIBridge. */
|
||||
|
||||
#include "../../stdafx.h"
|
||||
#include "ai_bridge.hpp"
|
||||
#include "ai_rail.hpp"
|
||||
#include "../ai_instance.hpp"
|
||||
@@ -152,7 +151,9 @@ static void _DoCommandReturnBuildBridge1(class AIInstance *instance)
|
||||
{
|
||||
if (!IsValidBridge(bridge_id)) return -1;
|
||||
|
||||
return min(::GetBridgeSpec(bridge_id)->max_length, _settings_game.construction.max_bridge_length) + 2;
|
||||
uint max = ::GetBridgeSpec(bridge_id)->max_length;
|
||||
if (max >= MAX_BRIDGE_LENGTH && _settings_game.construction.longbridges) max = MAX_BRIDGE_LENGTH_LONGBRIDGES;
|
||||
return max + 2;
|
||||
}
|
||||
|
||||
/* static */ int32 AIBridge::GetMinLength(BridgeID bridge_id)
|
||||
|
@@ -12,7 +12,9 @@
|
||||
#ifndef AI_BRIDGE_HPP
|
||||
#define AI_BRIDGE_HPP
|
||||
|
||||
#include "ai_object.hpp"
|
||||
#include "ai_vehicle.hpp"
|
||||
#include "ai_error.hpp"
|
||||
|
||||
/**
|
||||
* Class that handles all bridge related functions.
|
||||
|
@@ -9,7 +9,6 @@
|
||||
|
||||
/** @file ai_bridgelist.cpp Implementation of AIBridgeList and friends. */
|
||||
|
||||
#include "../../stdafx.h"
|
||||
#include "ai_bridgelist.hpp"
|
||||
#include "ai_bridge.hpp"
|
||||
#include "../../bridge.h"
|
||||
|
@@ -9,7 +9,6 @@
|
||||
|
||||
/** @file ai_cargo.cpp Implementation of AICargo. */
|
||||
|
||||
#include "../../stdafx.h"
|
||||
#include "ai_cargo.hpp"
|
||||
#include "../../cargotype.h"
|
||||
#include "../../economy_func.h"
|
||||
|
@@ -9,7 +9,6 @@
|
||||
|
||||
/** @file ai_cargolist.cpp Implementation of AICargoList and friends. */
|
||||
|
||||
#include "../../stdafx.h"
|
||||
#include "ai_cargolist.hpp"
|
||||
#include "ai_industry.hpp"
|
||||
#include "../../cargotype.h"
|
||||
|
@@ -15,16 +15,10 @@
|
||||
* functions may still be available if you return an older API version
|
||||
* in GetAPIVersion() in info.nut.
|
||||
*
|
||||
* \b 1.1.2
|
||||
*
|
||||
* No changes
|
||||
*
|
||||
* \b 1.1.1
|
||||
*
|
||||
* No changes
|
||||
*
|
||||
* \b 1.1.0
|
||||
*
|
||||
* 1.1.0 is not yet released. The following changes are not set in stone yet.
|
||||
*
|
||||
* API additions:
|
||||
* \li IsEnd for all lists.
|
||||
* \li AIEventTownFounded
|
||||
@@ -39,7 +33,6 @@
|
||||
* \li HasNext for all lists.
|
||||
* \li AIAbstractList, use AIList instead.
|
||||
* \li AIList::ChangeItem, use AIList::SetValue instead.
|
||||
* \li AIRail::ERR_NONUNIFORM_STATIONS_DISABLED, that error is never returned anymore.
|
||||
*
|
||||
* Other changes:
|
||||
* \li AIEngine::GetMaxTractiveEffort can be used for road vehicles.
|
||||
|
@@ -9,7 +9,6 @@
|
||||
|
||||
/** @file ai_company.cpp Implementation of AICompany. */
|
||||
|
||||
#include "../../stdafx.h"
|
||||
#include "ai_company.hpp"
|
||||
#include "ai_error.hpp"
|
||||
#include "../../command_func.h"
|
||||
|
@@ -12,10 +12,10 @@
|
||||
#include "../../stdafx.h"
|
||||
#include "../../string_func.h"
|
||||
#include "../../company_base.h"
|
||||
#include "../../company_func.h"
|
||||
#include "../../rev.h"
|
||||
|
||||
#include "ai_controller.hpp"
|
||||
#include "../ai_storage.hpp"
|
||||
#include "../ai_instance.hpp"
|
||||
#include "../ai_config.hpp"
|
||||
#include "ai_log.hpp"
|
||||
|
@@ -9,7 +9,6 @@
|
||||
|
||||
/** @file ai_date.cpp Implementation of AIDate. */
|
||||
|
||||
#include "../../stdafx.h"
|
||||
#include "ai_date.hpp"
|
||||
#include "../../date_func.h"
|
||||
|
||||
|
@@ -9,7 +9,6 @@
|
||||
|
||||
/** @file ai_depotlist.cpp Implementation of AIDepotList and friends. */
|
||||
|
||||
#include "../../stdafx.h"
|
||||
#include "ai_depotlist.hpp"
|
||||
#include "../../company_func.h"
|
||||
#include "../../depot_base.h"
|
||||
|
@@ -9,7 +9,6 @@
|
||||
|
||||
/** @file ai_engine.cpp Implementation of AIEngine. */
|
||||
|
||||
#include "../../stdafx.h"
|
||||
#include "ai_engine.hpp"
|
||||
#include "ai_cargo.hpp"
|
||||
#include "../../company_func.h"
|
||||
|
@@ -12,7 +12,9 @@
|
||||
#ifndef AI_ENGINE_HPP
|
||||
#define AI_ENGINE_HPP
|
||||
|
||||
#include "ai_object.hpp"
|
||||
#include "ai_vehicle.hpp"
|
||||
#include "ai_road.hpp"
|
||||
#include "ai_rail.hpp"
|
||||
#include "ai_airport.hpp"
|
||||
|
||||
|
@@ -9,7 +9,6 @@
|
||||
|
||||
/** @file ai_enginelist.cpp Implementation of AIEngineList and friends. */
|
||||
|
||||
#include "../../stdafx.h"
|
||||
#include "ai_enginelist.hpp"
|
||||
#include "../../company_func.h"
|
||||
#include "../../engine_base.h"
|
||||
|
@@ -9,7 +9,6 @@
|
||||
|
||||
/** @file ai_error.cpp Implementation of AIError. */
|
||||
|
||||
#include "../../stdafx.h"
|
||||
#include "ai_error.hpp"
|
||||
#include "../../core/bitmath_func.hpp"
|
||||
|
||||
|
@@ -9,7 +9,6 @@
|
||||
|
||||
/** @file ai_event.cpp Implementation of AIEvent. */
|
||||
|
||||
#include "../../stdafx.h"
|
||||
#include "ai_event_types.hpp"
|
||||
|
||||
#include <queue>
|
||||
|
@@ -9,7 +9,6 @@
|
||||
|
||||
/** @file ai_event_types.cpp Implementation of all EventTypes. */
|
||||
|
||||
#include "../../stdafx.h"
|
||||
#include "ai_event_types.hpp"
|
||||
#include "ai_vehicle.hpp"
|
||||
#include "../../command_type.h"
|
||||
@@ -19,15 +18,8 @@
|
||||
#include "../../articulated_vehicles.h"
|
||||
#include "table/strings.h"
|
||||
|
||||
bool AIEventEnginePreview::IsEngineValid() const
|
||||
{
|
||||
const Engine *e = ::Engine::GetIfValid(this->engine);
|
||||
return e != NULL && e->IsEnabled();
|
||||
}
|
||||
|
||||
char *AIEventEnginePreview::GetName()
|
||||
{
|
||||
if (!this->IsEngineValid()) return NULL;
|
||||
static const int len = 64;
|
||||
char *engine_name = MallocT<char>(len);
|
||||
|
||||
@@ -38,7 +30,6 @@ char *AIEventEnginePreview::GetName()
|
||||
|
||||
CargoID AIEventEnginePreview::GetCargoType()
|
||||
{
|
||||
if (!this->IsEngineValid()) return CT_INVALID;
|
||||
CargoArray cap = ::GetCapacityOfArticulatedParts(this->engine);
|
||||
|
||||
CargoID most_cargo = CT_INVALID;
|
||||
@@ -55,7 +46,6 @@ CargoID AIEventEnginePreview::GetCargoType()
|
||||
|
||||
int32 AIEventEnginePreview::GetCapacity()
|
||||
{
|
||||
if (!this->IsEngineValid()) return -1;
|
||||
const Engine *e = ::Engine::Get(this->engine);
|
||||
switch (e->type) {
|
||||
case VEH_ROAD:
|
||||
@@ -78,7 +68,6 @@ int32 AIEventEnginePreview::GetCapacity()
|
||||
|
||||
int32 AIEventEnginePreview::GetMaxSpeed()
|
||||
{
|
||||
if (!this->IsEngineValid()) return -1;
|
||||
const Engine *e = ::Engine::Get(this->engine);
|
||||
int32 max_speed = e->GetDisplayMaxSpeed(); // km-ish/h
|
||||
if (e->type == VEH_AIRCRAFT) max_speed /= _settings_game.vehicle.plane_speed;
|
||||
@@ -87,19 +76,16 @@ int32 AIEventEnginePreview::GetMaxSpeed()
|
||||
|
||||
Money AIEventEnginePreview::GetPrice()
|
||||
{
|
||||
if (!this->IsEngineValid()) return -1;
|
||||
return ::Engine::Get(this->engine)->GetCost();
|
||||
}
|
||||
|
||||
Money AIEventEnginePreview::GetRunningCost()
|
||||
{
|
||||
if (!this->IsEngineValid()) return -1;
|
||||
return ::Engine::Get(this->engine)->GetRunningCost();
|
||||
}
|
||||
|
||||
int32 AIEventEnginePreview::GetVehicleType()
|
||||
{
|
||||
if (!this->IsEngineValid()) return AIVehicle::VT_INVALID;
|
||||
switch (::Engine::Get(this->engine)->type) {
|
||||
case VEH_ROAD: return AIVehicle::VT_ROAD;
|
||||
case VEH_TRAIN: return AIVehicle::VT_RAIL;
|
||||
@@ -111,7 +97,6 @@ int32 AIEventEnginePreview::GetVehicleType()
|
||||
|
||||
bool AIEventEnginePreview::AcceptPreview()
|
||||
{
|
||||
if (!this->IsEngineValid()) return false;
|
||||
return AIObject::DoCommand(0, this->engine, 0, CMD_WANT_ENGINE_PREVIEW);
|
||||
}
|
||||
|
||||
|
@@ -12,6 +12,7 @@
|
||||
#ifndef AI_EVENT_TYPES_HPP
|
||||
#define AI_EVENT_TYPES_HPP
|
||||
|
||||
#include "ai_object.hpp"
|
||||
#include "ai_event.hpp"
|
||||
#include "ai_company.hpp"
|
||||
|
||||
@@ -296,7 +297,6 @@ public:
|
||||
|
||||
private:
|
||||
EngineID engine;
|
||||
bool IsEngineValid() const;
|
||||
};
|
||||
|
||||
/**
|
||||
|
@@ -9,7 +9,6 @@
|
||||
|
||||
/** @file ai_execmode.cpp Implementation of AIExecMode. */
|
||||
|
||||
#include "../../stdafx.h"
|
||||
#include "ai_execmode.hpp"
|
||||
#include "../../company_base.h"
|
||||
#include "../../company_func.h"
|
||||
|
@@ -9,7 +9,6 @@
|
||||
|
||||
/** @file ai_gamesettings.cpp Implementation of AIGameSettings. */
|
||||
|
||||
#include "../../stdafx.h"
|
||||
#include "ai_gamesettings.hpp"
|
||||
#include "../../settings_internal.h"
|
||||
|
||||
|
@@ -12,6 +12,7 @@
|
||||
#ifndef AI_GAMESETTINGS_HPP
|
||||
#define AI_GAMESETTINGS_HPP
|
||||
|
||||
#include "ai_object.hpp"
|
||||
#include "ai_vehicle.hpp"
|
||||
|
||||
/**
|
||||
|
@@ -9,7 +9,6 @@
|
||||
|
||||
/** @file ai_group.cpp Implementation of AIGroup. */
|
||||
|
||||
#include "../../stdafx.h"
|
||||
#include "ai_group.hpp"
|
||||
#include "ai_engine.hpp"
|
||||
#include "../ai_instance.hpp"
|
||||
|
@@ -12,6 +12,7 @@
|
||||
#ifndef AI_GROUP_HPP
|
||||
#define AI_GROUP_HPP
|
||||
|
||||
#include "ai_object.hpp"
|
||||
#include "ai_vehicle.hpp"
|
||||
|
||||
/**
|
||||
|
@@ -9,7 +9,6 @@
|
||||
|
||||
/** @file ai_grouplist.cpp Implementation of AIGroupList and friends. */
|
||||
|
||||
#include "../../stdafx.h"
|
||||
#include "ai_grouplist.hpp"
|
||||
#include "../../company_func.h"
|
||||
#include "../../group.h"
|
||||
|
@@ -9,7 +9,6 @@
|
||||
|
||||
/** @file ai_industry.cpp Implementation of AIIndustry. */
|
||||
|
||||
#include "../../stdafx.h"
|
||||
#include "ai_industry.hpp"
|
||||
#include "ai_cargo.hpp"
|
||||
#include "ai_map.hpp"
|
||||
|
@@ -9,7 +9,6 @@
|
||||
|
||||
/** @file ai_industrylist.cpp Implementation of AIIndustryList and friends. */
|
||||
|
||||
#include "../../stdafx.h"
|
||||
#include "ai_industrylist.hpp"
|
||||
#include "../../industry.h"
|
||||
|
||||
|
@@ -9,10 +9,8 @@
|
||||
|
||||
/** @file ai_industrytype.cpp Implementation of AIIndustryType. */
|
||||
|
||||
#include "../../stdafx.h"
|
||||
#include "ai_industrytype.hpp"
|
||||
#include "ai_map.hpp"
|
||||
#include "ai_error.hpp"
|
||||
#include "../../strings_func.h"
|
||||
#include "../../industry.h"
|
||||
#include "../../newgrf_industries.h"
|
||||
|
@@ -12,6 +12,8 @@
|
||||
#ifndef AI_INDUSTRYTYPE_HPP
|
||||
#define AI_INDUSTRYTYPE_HPP
|
||||
|
||||
#include "ai_object.hpp"
|
||||
#include "ai_error.hpp"
|
||||
#include "ai_list.hpp"
|
||||
|
||||
/**
|
||||
|
@@ -9,7 +9,6 @@
|
||||
|
||||
/** @file ai_industrytypelist.cpp Implementation of AIIndustryTypeList. */
|
||||
|
||||
#include "../../stdafx.h"
|
||||
#include "ai_industrytypelist.hpp"
|
||||
#include "../../industry.h"
|
||||
|
||||
|
@@ -12,6 +12,7 @@
|
||||
#ifndef AI_INDUSTRYTYPELIST_HPP
|
||||
#define AI_INDUSTRYTYPELIST_HPP
|
||||
|
||||
#include "ai_list.hpp"
|
||||
#include "ai_industrytype.hpp"
|
||||
|
||||
/**
|
||||
|
@@ -9,7 +9,6 @@
|
||||
|
||||
/** @file ai_list.cpp Implementation of AIList. */
|
||||
|
||||
#include "../../stdafx.h"
|
||||
#include "ai_list.hpp"
|
||||
#include "../../debug.h"
|
||||
#include "../../script/squirrel.hpp"
|
||||
|
@@ -9,7 +9,6 @@
|
||||
|
||||
/** @file ai_log.cpp Implementation of AILog. */
|
||||
|
||||
#include "../../stdafx.h"
|
||||
#include "ai_log.hpp"
|
||||
#include "../../core/alloc_func.hpp"
|
||||
#include "../../company_func.h"
|
||||
|
@@ -9,7 +9,6 @@
|
||||
|
||||
/** @file ai_map.cpp Implementation of AIMap. */
|
||||
|
||||
#include "../../stdafx.h"
|
||||
#include "ai_map.hpp"
|
||||
#include "../../tile_map.h"
|
||||
|
||||
|
@@ -9,7 +9,6 @@
|
||||
|
||||
/** @file ai_marine.cpp Implementation of AIMarine. */
|
||||
|
||||
#include "../../stdafx.h"
|
||||
#include "ai_marine.hpp"
|
||||
#include "ai_station.hpp"
|
||||
#include "../../station_base.h"
|
||||
|
@@ -12,6 +12,7 @@
|
||||
#ifndef AI_MARINE_HPP
|
||||
#define AI_MARINE_HPP
|
||||
|
||||
#include "ai_object.hpp"
|
||||
#include "ai_error.hpp"
|
||||
|
||||
/**
|
||||
|
@@ -11,11 +11,7 @@
|
||||
|
||||
#include "../../stdafx.h"
|
||||
#include "../../script/squirrel.hpp"
|
||||
#include "../../command_func.h"
|
||||
#include "../../company_base.h"
|
||||
#include "../../company_func.h"
|
||||
#include "../../network/network.h"
|
||||
#include "../../tunnelbridge.h"
|
||||
|
||||
#include "../ai_storage.hpp"
|
||||
#include "../ai_instance.hpp"
|
||||
|
@@ -12,6 +12,7 @@
|
||||
#ifndef AI_OBJECT_HPP
|
||||
#define AI_OBJECT_HPP
|
||||
|
||||
#include "../../stdafx.h"
|
||||
#include "../../misc/countedptr.hpp"
|
||||
#include "../../road_type.h"
|
||||
#include "../../rail_type.h"
|
||||
|
@@ -9,8 +9,6 @@
|
||||
|
||||
/** @file ai_order.cpp Implementation of AIOrder. */
|
||||
|
||||
#include "../../stdafx.h"
|
||||
#include "ai_order.hpp"
|
||||
#include "ai_vehicle.hpp"
|
||||
#include "../ai_instance.hpp"
|
||||
#include "../../debug.h"
|
||||
@@ -48,7 +46,7 @@ static OrderType GetOrderTypeByTile(TileIndex t)
|
||||
|
||||
/* static */ bool AIOrder::IsValidVehicleOrder(VehicleID vehicle_id, OrderPosition order_position)
|
||||
{
|
||||
return AIVehicle::IsValidVehicle(vehicle_id) && order_position >= 0 && (order_position < ::Vehicle::Get(vehicle_id)->GetNumManualOrders() || order_position == ORDER_CURRENT);
|
||||
return AIVehicle::IsValidVehicle(vehicle_id) && order_position >= 0 && (order_position < ::Vehicle::Get(vehicle_id)->GetNumOrders() || order_position == ORDER_CURRENT);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -65,14 +63,7 @@ static const Order *ResolveOrder(VehicleID vehicle_id, AIOrder::OrderPosition or
|
||||
order_position = AIOrder::ResolveOrderPosition(vehicle_id, order_position);
|
||||
if (order_position == AIOrder::ORDER_INVALID) return NULL;
|
||||
}
|
||||
const Order *order = v->orders.list->GetFirstOrder();
|
||||
while (order->GetType() == OT_IMPLICIT) order = order->next;
|
||||
while (order_position > 0) {
|
||||
order_position = (AIOrder::OrderPosition)(order_position - 1);
|
||||
order = order->next;
|
||||
while (order->GetType() == OT_IMPLICIT) order = order->next;
|
||||
}
|
||||
return order;
|
||||
return v->GetOrder(order_position);
|
||||
}
|
||||
|
||||
/* static */ bool AIOrder::IsGotoStationOrder(VehicleID vehicle_id, OrderPosition order_position)
|
||||
@@ -131,18 +122,8 @@ static const Order *ResolveOrder(VehicleID vehicle_id, AIOrder::OrderPosition or
|
||||
{
|
||||
if (!AIVehicle::IsValidVehicle(vehicle_id)) return ORDER_INVALID;
|
||||
|
||||
if (order_position == ORDER_CURRENT) {
|
||||
int cur_order_pos = ::Vehicle::Get(vehicle_id)->cur_real_order_index;
|
||||
const Order *order = ::Vehicle::Get(vehicle_id)->GetOrder(0);
|
||||
if (order == NULL) return ORDER_INVALID;
|
||||
int num_implicit_orders = 0;
|
||||
for (int i = 0; i < cur_order_pos; i++) {
|
||||
if (order->GetType() == OT_IMPLICIT) num_implicit_orders++;
|
||||
order = order->next;
|
||||
}
|
||||
return (AIOrder::OrderPosition)(cur_order_pos - num_implicit_orders);
|
||||
}
|
||||
return (order_position >= 0 && order_position < ::Vehicle::Get(vehicle_id)->GetNumManualOrders()) ? order_position : ORDER_INVALID;
|
||||
if (order_position == ORDER_CURRENT) return (AIOrder::OrderPosition)::Vehicle::Get(vehicle_id)->cur_order_index;
|
||||
return (order_position >= 0 && order_position < ::Vehicle::Get(vehicle_id)->GetNumOrders()) ? order_position : ORDER_INVALID;
|
||||
}
|
||||
|
||||
|
||||
@@ -279,7 +260,7 @@ static const Order *ResolveOrder(VehicleID vehicle_id, AIOrder::OrderPosition or
|
||||
if (!IsValidVehicleOrder(vehicle_id, order_position)) return ORDER_INVALID;
|
||||
if (order_position == ORDER_CURRENT || !IsConditionalOrder(vehicle_id, order_position)) return ORDER_INVALID;
|
||||
|
||||
const Order *order = ::ResolveOrder(vehicle_id, order_position);
|
||||
const Order *order = Vehicle::Get(vehicle_id)->GetOrder(order_position);
|
||||
return (OrderPosition)order->GetConditionSkipToOrder();
|
||||
}
|
||||
|
||||
@@ -288,7 +269,7 @@ static const Order *ResolveOrder(VehicleID vehicle_id, AIOrder::OrderPosition or
|
||||
if (!IsValidVehicleOrder(vehicle_id, order_position)) return OC_INVALID;
|
||||
if (order_position == ORDER_CURRENT || !IsConditionalOrder(vehicle_id, order_position)) return OC_INVALID;
|
||||
|
||||
const Order *order = ::ResolveOrder(vehicle_id, order_position);
|
||||
const Order *order = Vehicle::Get(vehicle_id)->GetOrder(order_position);
|
||||
return (OrderCondition)order->GetConditionVariable();
|
||||
}
|
||||
|
||||
@@ -297,7 +278,7 @@ static const Order *ResolveOrder(VehicleID vehicle_id, AIOrder::OrderPosition or
|
||||
if (!IsValidVehicleOrder(vehicle_id, order_position)) return CF_INVALID;
|
||||
if (order_position == ORDER_CURRENT || !IsConditionalOrder(vehicle_id, order_position)) return CF_INVALID;
|
||||
|
||||
const Order *order = ::ResolveOrder(vehicle_id, order_position);
|
||||
const Order *order = Vehicle::Get(vehicle_id)->GetOrder(order_position);
|
||||
return (CompareFunction)order->GetConditionComparator();
|
||||
}
|
||||
|
||||
@@ -306,7 +287,7 @@ static const Order *ResolveOrder(VehicleID vehicle_id, AIOrder::OrderPosition or
|
||||
if (!IsValidVehicleOrder(vehicle_id, order_position)) return -1;
|
||||
if (order_position == ORDER_CURRENT || !IsConditionalOrder(vehicle_id, order_position)) return -1;
|
||||
|
||||
const Order *order = ::ResolveOrder(vehicle_id, order_position);
|
||||
const Order *order = Vehicle::Get(vehicle_id)->GetOrder(order_position);
|
||||
int32 value = order->GetConditionValue();
|
||||
if (order->GetConditionVariable() == OCV_MAX_SPEED) value = value * 16 / 10;
|
||||
return value;
|
||||
@@ -318,7 +299,7 @@ static const Order *ResolveOrder(VehicleID vehicle_id, AIOrder::OrderPosition or
|
||||
if (AIVehicle::GetVehicleType(vehicle_id) != AIVehicle::VT_RAIL) return STOPLOCATION_INVALID;
|
||||
if (!IsGotoStationOrder(vehicle_id, order_position)) return STOPLOCATION_INVALID;
|
||||
|
||||
const Order *order = ::ResolveOrder(vehicle_id, order_position);
|
||||
const Order *order = Vehicle::Get(vehicle_id)->GetOrder(order_position);
|
||||
return (AIOrder::StopLocation)order->GetStopLocation();
|
||||
}
|
||||
|
||||
@@ -505,12 +486,10 @@ static void _DoCommandReturnSetOrderFlags(class AIInstance *instance)
|
||||
EnforcePrecondition(false, IsValidVehicleOrder(vehicle_id, order_position));
|
||||
EnforcePrecondition(false, AreOrderFlagsValid(GetOrderDestination(vehicle_id, order_position), order_flags));
|
||||
|
||||
const Order *order = ::ResolveOrder(vehicle_id, order_position);
|
||||
const Order *order = Vehicle::Get(vehicle_id)->GetOrder(order_position);
|
||||
|
||||
AIOrderFlags current = GetOrderFlags(vehicle_id, order_position);
|
||||
|
||||
EnforcePrecondition(false, (order_flags & AIOF_GOTO_NEAREST_DEPOT) == (current & AIOF_GOTO_NEAREST_DEPOT));
|
||||
|
||||
if ((current & AIOF_NON_STOP_FLAGS) != (order_flags & AIOF_NON_STOP_FLAGS)) {
|
||||
return AIObject::DoCommand(0, vehicle_id | (order_position << 20), (order_flags & AIOF_NON_STOP_FLAGS) << 4 | MOF_NON_STOP, CMD_MODIFY_ORDER, NULL, &_DoCommandReturnSetOrderFlags);
|
||||
}
|
||||
|
@@ -12,6 +12,7 @@
|
||||
#ifndef AI_ORDER_HPP
|
||||
#define AI_ORDER_HPP
|
||||
|
||||
#include "ai_object.hpp"
|
||||
#include "ai_error.hpp"
|
||||
|
||||
/**
|
||||
@@ -112,13 +113,7 @@ public:
|
||||
CF_INVALID = -1, ///< Invalid compare function, do not use.
|
||||
};
|
||||
|
||||
/**
|
||||
* Index in the list of orders for a vehicle. The first order has index 0, the second
|
||||
* order index 1, etc. The current order can be queried by using ORDER_CURRENT. Do not
|
||||
* use ORDER_INVALID yourself, it's used as return value by for example ResolveOrderPosition.
|
||||
* @note Automatic orders are hidden from AIs, so OrderPosition 0 will always be the first
|
||||
* manual order.
|
||||
*/
|
||||
/** Different constants related to the OrderPosition */
|
||||
enum OrderPosition {
|
||||
ORDER_CURRENT = 0xFF, ///< Constant that gets resolved to the current order.
|
||||
ORDER_INVALID = -1, ///< An invalid order.
|
||||
@@ -457,7 +452,6 @@ public:
|
||||
* @param order_flags The new flags given to the order.
|
||||
* @pre IsValidVehicleOrder(vehicle_id, order_position).
|
||||
* @pre AreOrderFlagsValid(GetOrderDestination(vehicle_id, order_position), order_flags).
|
||||
* @pre (order_flags & AIOF_GOTO_NEAREST_DEPOT) == (GetOrderFlags(vehicle_id, order_position) & AIOF_GOTO_NEAREST_DEPOT).
|
||||
* @exception AIError::ERR_OWNED_BY_ANOTHER_COMPANY
|
||||
* @return True if and only if the order was changed.
|
||||
*/
|
||||
|
@@ -9,7 +9,6 @@
|
||||
|
||||
/** @file ai_rail.cpp Implementation of AIRail. */
|
||||
|
||||
#include "../../stdafx.h"
|
||||
#include "ai_rail.hpp"
|
||||
#include "ai_map.hpp"
|
||||
#include "ai_station.hpp"
|
||||
|
@@ -12,6 +12,8 @@
|
||||
#ifndef AI_RAIL_HPP
|
||||
#define AI_RAIL_HPP
|
||||
|
||||
#include "ai_object.hpp"
|
||||
#include "ai_error.hpp"
|
||||
#include "ai_tile.hpp"
|
||||
|
||||
/**
|
||||
@@ -35,6 +37,9 @@ public:
|
||||
/** Track not suitable for signals */
|
||||
ERR_UNSUITABLE_TRACK, // [STR_ERROR_NO_SUITABLE_RAILROAD_TRACK]
|
||||
|
||||
/** Non-uniform stations is diabled */
|
||||
ERR_NONUNIFORM_STATIONS_DISABLED, // [STR_ERROR_NONUNIFORM_STATIONS_DISALLOWED]
|
||||
|
||||
/** This railtype cannot have crossings */
|
||||
ERR_RAILTYPE_DISALLOWS_CROSSING, // [STR_ERROR_CROSSING_DISALLOWED]
|
||||
};
|
||||
|
@@ -38,43 +38,46 @@ void SQAIRail_Register(Squirrel *engine)
|
||||
SQAIRail.PreRegister(engine);
|
||||
SQAIRail.AddConstructor<void (AIRail::*)(), 1>(engine, "x");
|
||||
|
||||
SQAIRail.DefSQConst(engine, AIRail::ERR_RAIL_BASE, "ERR_RAIL_BASE");
|
||||
SQAIRail.DefSQConst(engine, AIRail::ERR_CROSSING_ON_ONEWAY_ROAD, "ERR_CROSSING_ON_ONEWAY_ROAD");
|
||||
SQAIRail.DefSQConst(engine, AIRail::ERR_UNSUITABLE_TRACK, "ERR_UNSUITABLE_TRACK");
|
||||
SQAIRail.DefSQConst(engine, AIRail::ERR_RAILTYPE_DISALLOWS_CROSSING, "ERR_RAILTYPE_DISALLOWS_CROSSING");
|
||||
SQAIRail.DefSQConst(engine, AIRail::RAILTYPE_INVALID, "RAILTYPE_INVALID");
|
||||
SQAIRail.DefSQConst(engine, AIRail::RAILTRACK_NE_SW, "RAILTRACK_NE_SW");
|
||||
SQAIRail.DefSQConst(engine, AIRail::RAILTRACK_NW_SE, "RAILTRACK_NW_SE");
|
||||
SQAIRail.DefSQConst(engine, AIRail::RAILTRACK_NW_NE, "RAILTRACK_NW_NE");
|
||||
SQAIRail.DefSQConst(engine, AIRail::RAILTRACK_SW_SE, "RAILTRACK_SW_SE");
|
||||
SQAIRail.DefSQConst(engine, AIRail::RAILTRACK_NW_SW, "RAILTRACK_NW_SW");
|
||||
SQAIRail.DefSQConst(engine, AIRail::RAILTRACK_NE_SE, "RAILTRACK_NE_SE");
|
||||
SQAIRail.DefSQConst(engine, AIRail::RAILTRACK_INVALID, "RAILTRACK_INVALID");
|
||||
SQAIRail.DefSQConst(engine, AIRail::SIGNALTYPE_NORMAL, "SIGNALTYPE_NORMAL");
|
||||
SQAIRail.DefSQConst(engine, AIRail::SIGNALTYPE_ENTRY, "SIGNALTYPE_ENTRY");
|
||||
SQAIRail.DefSQConst(engine, AIRail::SIGNALTYPE_EXIT, "SIGNALTYPE_EXIT");
|
||||
SQAIRail.DefSQConst(engine, AIRail::SIGNALTYPE_COMBO, "SIGNALTYPE_COMBO");
|
||||
SQAIRail.DefSQConst(engine, AIRail::SIGNALTYPE_PBS, "SIGNALTYPE_PBS");
|
||||
SQAIRail.DefSQConst(engine, AIRail::SIGNALTYPE_PBS_ONEWAY, "SIGNALTYPE_PBS_ONEWAY");
|
||||
SQAIRail.DefSQConst(engine, AIRail::SIGNALTYPE_TWOWAY, "SIGNALTYPE_TWOWAY");
|
||||
SQAIRail.DefSQConst(engine, AIRail::SIGNALTYPE_NORMAL_TWOWAY, "SIGNALTYPE_NORMAL_TWOWAY");
|
||||
SQAIRail.DefSQConst(engine, AIRail::SIGNALTYPE_ENTRY_TWOWAY, "SIGNALTYPE_ENTRY_TWOWAY");
|
||||
SQAIRail.DefSQConst(engine, AIRail::SIGNALTYPE_EXIT_TWOWAY, "SIGNALTYPE_EXIT_TWOWAY");
|
||||
SQAIRail.DefSQConst(engine, AIRail::SIGNALTYPE_COMBO_TWOWAY, "SIGNALTYPE_COMBO_TWOWAY");
|
||||
SQAIRail.DefSQConst(engine, AIRail::SIGNALTYPE_NONE, "SIGNALTYPE_NONE");
|
||||
SQAIRail.DefSQConst(engine, AIRail::BT_TRACK, "BT_TRACK");
|
||||
SQAIRail.DefSQConst(engine, AIRail::BT_SIGNAL, "BT_SIGNAL");
|
||||
SQAIRail.DefSQConst(engine, AIRail::BT_DEPOT, "BT_DEPOT");
|
||||
SQAIRail.DefSQConst(engine, AIRail::BT_STATION, "BT_STATION");
|
||||
SQAIRail.DefSQConst(engine, AIRail::BT_WAYPOINT, "BT_WAYPOINT");
|
||||
SQAIRail.DefSQConst(engine, AIRail::ERR_RAIL_BASE, "ERR_RAIL_BASE");
|
||||
SQAIRail.DefSQConst(engine, AIRail::ERR_CROSSING_ON_ONEWAY_ROAD, "ERR_CROSSING_ON_ONEWAY_ROAD");
|
||||
SQAIRail.DefSQConst(engine, AIRail::ERR_UNSUITABLE_TRACK, "ERR_UNSUITABLE_TRACK");
|
||||
SQAIRail.DefSQConst(engine, AIRail::ERR_NONUNIFORM_STATIONS_DISABLED, "ERR_NONUNIFORM_STATIONS_DISABLED");
|
||||
SQAIRail.DefSQConst(engine, AIRail::ERR_RAILTYPE_DISALLOWS_CROSSING, "ERR_RAILTYPE_DISALLOWS_CROSSING");
|
||||
SQAIRail.DefSQConst(engine, AIRail::RAILTYPE_INVALID, "RAILTYPE_INVALID");
|
||||
SQAIRail.DefSQConst(engine, AIRail::RAILTRACK_NE_SW, "RAILTRACK_NE_SW");
|
||||
SQAIRail.DefSQConst(engine, AIRail::RAILTRACK_NW_SE, "RAILTRACK_NW_SE");
|
||||
SQAIRail.DefSQConst(engine, AIRail::RAILTRACK_NW_NE, "RAILTRACK_NW_NE");
|
||||
SQAIRail.DefSQConst(engine, AIRail::RAILTRACK_SW_SE, "RAILTRACK_SW_SE");
|
||||
SQAIRail.DefSQConst(engine, AIRail::RAILTRACK_NW_SW, "RAILTRACK_NW_SW");
|
||||
SQAIRail.DefSQConst(engine, AIRail::RAILTRACK_NE_SE, "RAILTRACK_NE_SE");
|
||||
SQAIRail.DefSQConst(engine, AIRail::RAILTRACK_INVALID, "RAILTRACK_INVALID");
|
||||
SQAIRail.DefSQConst(engine, AIRail::SIGNALTYPE_NORMAL, "SIGNALTYPE_NORMAL");
|
||||
SQAIRail.DefSQConst(engine, AIRail::SIGNALTYPE_ENTRY, "SIGNALTYPE_ENTRY");
|
||||
SQAIRail.DefSQConst(engine, AIRail::SIGNALTYPE_EXIT, "SIGNALTYPE_EXIT");
|
||||
SQAIRail.DefSQConst(engine, AIRail::SIGNALTYPE_COMBO, "SIGNALTYPE_COMBO");
|
||||
SQAIRail.DefSQConst(engine, AIRail::SIGNALTYPE_PBS, "SIGNALTYPE_PBS");
|
||||
SQAIRail.DefSQConst(engine, AIRail::SIGNALTYPE_PBS_ONEWAY, "SIGNALTYPE_PBS_ONEWAY");
|
||||
SQAIRail.DefSQConst(engine, AIRail::SIGNALTYPE_TWOWAY, "SIGNALTYPE_TWOWAY");
|
||||
SQAIRail.DefSQConst(engine, AIRail::SIGNALTYPE_NORMAL_TWOWAY, "SIGNALTYPE_NORMAL_TWOWAY");
|
||||
SQAIRail.DefSQConst(engine, AIRail::SIGNALTYPE_ENTRY_TWOWAY, "SIGNALTYPE_ENTRY_TWOWAY");
|
||||
SQAIRail.DefSQConst(engine, AIRail::SIGNALTYPE_EXIT_TWOWAY, "SIGNALTYPE_EXIT_TWOWAY");
|
||||
SQAIRail.DefSQConst(engine, AIRail::SIGNALTYPE_COMBO_TWOWAY, "SIGNALTYPE_COMBO_TWOWAY");
|
||||
SQAIRail.DefSQConst(engine, AIRail::SIGNALTYPE_NONE, "SIGNALTYPE_NONE");
|
||||
SQAIRail.DefSQConst(engine, AIRail::BT_TRACK, "BT_TRACK");
|
||||
SQAIRail.DefSQConst(engine, AIRail::BT_SIGNAL, "BT_SIGNAL");
|
||||
SQAIRail.DefSQConst(engine, AIRail::BT_DEPOT, "BT_DEPOT");
|
||||
SQAIRail.DefSQConst(engine, AIRail::BT_STATION, "BT_STATION");
|
||||
SQAIRail.DefSQConst(engine, AIRail::BT_WAYPOINT, "BT_WAYPOINT");
|
||||
|
||||
AIError::RegisterErrorMap(STR_ERROR_CROSSING_ON_ONEWAY_ROAD, AIRail::ERR_CROSSING_ON_ONEWAY_ROAD);
|
||||
AIError::RegisterErrorMap(STR_ERROR_NO_SUITABLE_RAILROAD_TRACK, AIRail::ERR_UNSUITABLE_TRACK);
|
||||
AIError::RegisterErrorMap(STR_ERROR_CROSSING_DISALLOWED, AIRail::ERR_RAILTYPE_DISALLOWS_CROSSING);
|
||||
AIError::RegisterErrorMap(STR_ERROR_CROSSING_ON_ONEWAY_ROAD, AIRail::ERR_CROSSING_ON_ONEWAY_ROAD);
|
||||
AIError::RegisterErrorMap(STR_ERROR_NO_SUITABLE_RAILROAD_TRACK, AIRail::ERR_UNSUITABLE_TRACK);
|
||||
AIError::RegisterErrorMap(STR_ERROR_NONUNIFORM_STATIONS_DISALLOWED, AIRail::ERR_NONUNIFORM_STATIONS_DISABLED);
|
||||
AIError::RegisterErrorMap(STR_ERROR_CROSSING_DISALLOWED, AIRail::ERR_RAILTYPE_DISALLOWS_CROSSING);
|
||||
|
||||
AIError::RegisterErrorMapString(AIRail::ERR_CROSSING_ON_ONEWAY_ROAD, "ERR_CROSSING_ON_ONEWAY_ROAD");
|
||||
AIError::RegisterErrorMapString(AIRail::ERR_UNSUITABLE_TRACK, "ERR_UNSUITABLE_TRACK");
|
||||
AIError::RegisterErrorMapString(AIRail::ERR_RAILTYPE_DISALLOWS_CROSSING, "ERR_RAILTYPE_DISALLOWS_CROSSING");
|
||||
AIError::RegisterErrorMapString(AIRail::ERR_CROSSING_ON_ONEWAY_ROAD, "ERR_CROSSING_ON_ONEWAY_ROAD");
|
||||
AIError::RegisterErrorMapString(AIRail::ERR_UNSUITABLE_TRACK, "ERR_UNSUITABLE_TRACK");
|
||||
AIError::RegisterErrorMapString(AIRail::ERR_NONUNIFORM_STATIONS_DISABLED, "ERR_NONUNIFORM_STATIONS_DISABLED");
|
||||
AIError::RegisterErrorMapString(AIRail::ERR_RAILTYPE_DISALLOWS_CROSSING, "ERR_RAILTYPE_DISALLOWS_CROSSING");
|
||||
|
||||
SQAIRail.DefSQStaticMethod(engine, &AIRail::GetName, "GetName", 2, ".i");
|
||||
SQAIRail.DefSQStaticMethod(engine, &AIRail::IsRailTile, "IsRailTile", 2, ".i");
|
||||
|
@@ -9,7 +9,6 @@
|
||||
|
||||
/** @file ai_railtypelist.cpp Implementation of AIRailTypeList and friends. */
|
||||
|
||||
#include "../../stdafx.h"
|
||||
#include "ai_railtypelist.hpp"
|
||||
#include "../../rail.h"
|
||||
#include "../../company_func.h"
|
||||
|
@@ -9,7 +9,6 @@
|
||||
|
||||
/** @file ai_road.cpp Implementation of AIRoad. */
|
||||
|
||||
#include "../../stdafx.h"
|
||||
#include "ai_map.hpp"
|
||||
#include "ai_station.hpp"
|
||||
#include "ai_cargo.hpp"
|
||||
|
@@ -12,6 +12,8 @@
|
||||
#ifndef AI_ROAD_HPP
|
||||
#define AI_ROAD_HPP
|
||||
|
||||
#include "ai_object.hpp"
|
||||
#include "ai_error.hpp"
|
||||
#include "ai_tile.hpp"
|
||||
|
||||
/**
|
||||
|
@@ -9,7 +9,6 @@
|
||||
|
||||
/** @file ai_sign.cpp Implementation of AISign. */
|
||||
|
||||
#include "../../stdafx.h"
|
||||
#include "ai_sign.hpp"
|
||||
#include "table/strings.h"
|
||||
#include "../ai_instance.hpp"
|
||||
|
@@ -12,7 +12,9 @@
|
||||
#ifndef AI_SIGN_HPP
|
||||
#define AI_SIGN_HPP
|
||||
|
||||
#include "ai_object.hpp"
|
||||
#include "ai_error.hpp"
|
||||
#include "ai_company.hpp"
|
||||
|
||||
/**
|
||||
* Class that handles all sign related functions.
|
||||
|
@@ -9,7 +9,6 @@
|
||||
|
||||
/** @file ai_signlist.cpp Implementation of AISignList and friends. */
|
||||
|
||||
#include "../../stdafx.h"
|
||||
#include "ai_signlist.hpp"
|
||||
#include "ai_sign.hpp"
|
||||
#include "../../signs_base.h"
|
||||
|
@@ -9,7 +9,6 @@
|
||||
|
||||
/** @file ai_station.cpp Implementation of AIStation. */
|
||||
|
||||
#include "../../stdafx.h"
|
||||
#include "ai_station.hpp"
|
||||
#include "ai_cargo.hpp"
|
||||
#include "ai_map.hpp"
|
||||
|
@@ -12,6 +12,8 @@
|
||||
#ifndef AI_STATION_HPP
|
||||
#define AI_STATION_HPP
|
||||
|
||||
#include "ai_object.hpp"
|
||||
#include "ai_error.hpp"
|
||||
#include "ai_road.hpp"
|
||||
#include "ai_basestation.hpp"
|
||||
|
||||
|
@@ -9,7 +9,6 @@
|
||||
|
||||
/** @file ai_stationlist.cpp Implementation of AIStationList and friends. */
|
||||
|
||||
#include "../../stdafx.h"
|
||||
#include "ai_stationlist.hpp"
|
||||
#include "ai_vehicle.hpp"
|
||||
#include "../../company_func.h"
|
||||
|
@@ -9,7 +9,6 @@
|
||||
|
||||
/** @file ai_subsidy.cpp Implementation of AISubsidy. */
|
||||
|
||||
#include "../../stdafx.h"
|
||||
#include "ai_subsidy.hpp"
|
||||
#include "ai_date.hpp"
|
||||
#include "../../subsidy_base.h"
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user