1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-13 17:49:10 +00:00

Compare commits

..

510 Commits

Author SHA1 Message Date
rubidium
99381bcb51 (svn r22686) -Release 1.1.2-RC1 2011-07-24 14:48:39 +00:00
rubidium
4b800313f4 (svn r22685) [1.1] -Prepare: 1.1.2-RC1 2011-07-24 14:43:42 +00:00
rubidium
e1841b5d68 (svn r22684) [1.1] -Backport from trunk:
- 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)
- Update: languages
2011-07-24 14:34:38 +00:00
rubidium
4f8053e559 (svn r22654) [1.1] -Backport from trunk:
- 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)
2011-07-10 20:35:31 +00:00
rubidium
3a39cea23b (svn r22653) [1.1] -Backport from trunk:
- 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)
2011-07-10 20:29:19 +00:00
rubidium
a873aa3337 (svn r22652) [1.1] -Backport from trunk:
- 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)
2011-07-10 20:25:59 +00:00
rubidium
a1826a043e (svn r22651) [1.1] -Backport from trunk:
- 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)
2011-07-10 20:23:04 +00:00
rubidium
a6750a145e (svn r22650) [1.1] -Backport from trunk:
- 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: No client error packet was sent to the admin bots [FS#4585] (r22384)
2011-07-10 20:17:56 +00:00
rubidium
b5bad6aa19 (svn r22602) [1.1] -Fix: MSVC compile warning 2011-06-19 12:12:10 +00:00
rubidium
725d00630f (svn r22601) [1.1] -Backport from trunk:
- Add: Makefile support for bundling pdb and running regressions with the MSVC makefile (r22581, r22580, r22576)
- 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)
2011-06-18 19:43:51 +00:00
rubidium
0b02b285a8 (svn r22600) [1.1] -Backport from trunk:
- 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've been invalidated (r22582)
- Fix: Do not lower the arrow buttons in the NewGRF/AI parameter windows if they are clicked when disabled (r22553, r22499)
2011-06-18 19:40:56 +00:00
rubidium
5cb560d4bd (svn r22599) [1.1] -Backport from trunk:
- 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)
2011-06-18 19:20:01 +00:00
rubidium
4ba397c285 (svn r22598) [1.1] -Backport from trunk:
- 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)
2011-06-18 18:37:10 +00:00
rubidium
863d0e08e3 (svn r22597) [1.1] -Backport from trunk:
- 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)
2011-06-18 18:33:20 +00:00
frosch
041714e538 (svn r22527) [1.1] -Prepare for 1.1.1 2011-05-31 19:25:02 +00:00
rubidium
7bbfbcddb7 (svn r22524) [1.1] -Backport from trunk:
- Language updates
- Documentation updates
2011-05-29 20:08:21 +00:00
rubidium
c224791f7f (svn r22520) [1.1] -Backport from trunk:
- Fix: Only try to insert implicit orders for ground vehicles. Aircraft may reach unscheduled terminals when skipping orders etc [FS#4624] (r22492)
- Change: Automatic orders are better called implicit orders as no real order influencing path finding is added (r22474, r22473)
2011-05-29 17:55:15 +00:00
rubidium
7fcdcbc8dd (svn r22468) [1.1] -Prepare for 1.1.1-RC1 2011-05-15 18:33:51 +00:00
rubidium
a7487b5ede (svn r22467) [1.1] -Backport from trunk:
- 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)
2011-05-15 18:06:13 +00:00
rubidium
2b709f2d38 (svn r22462) [1.1] -Backport language changes from trunk 2011-05-15 09:44:40 +00:00
rubidium
59a11e6626 (svn r22461) [1.1] -Backport from trunk:
- 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: Keep better accounting of the order in which clients joined; client can't 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: Delete the client list popup when the client got removed (instead of previously selecting some other client) (r22360, r22359, r22358)
2011-05-15 09:38:54 +00:00
rubidium
829a2c201d (svn r22449) [1.1] -Backport from trunk:
- 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)
2011-05-13 18:04:10 +00:00
rubidium
704a361ada (svn r22448) [1.1] -Backport from trunk:
- 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)
2011-05-13 17:57:07 +00:00
rubidium
bde2fec339 (svn r22447) [1.1] -Backport from trunk:
- 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)
2011-05-13 17:52:35 +00:00
rubidium
eb4c66a4fb (svn r22395) [1.1] -Backport: loads of string changes 2011-04-30 21:03:14 +00:00
rubidium
2b2cabfce1 (svn r22394) [1.1] -Backport from trunk:
- Change: Show one digit of the fractional train length in the depot (r22336, r22305, r22304, r22303)
- 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)
2011-04-30 20:58:04 +00:00
rubidium
e43d961737 (svn r22393) [1.1] -Backport from trunk:
- 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'm leaving" packet from the client. So let the client wait a tiny bit after sending the "I'm 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: No client error packet was sent to the admin bots [FS#4585] (r22384)
- Fix: Recolouring of silicon bridge was done incorrectly (r22380, r22379, r22378)
2011-04-30 20:50:41 +00:00
rubidium
30df6de7bd (svn r22392) [1.1] -Backport from trunk:
- Fix: Crash when clicking a removed company in the vehicle list dropdowns [FS#4592] (r22373)
- 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: 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)
2011-04-30 20:46:58 +00:00
rubidium
3330813d95 (svn r22391) [1.1] -Backport from trunk:
- 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)
2011-04-30 20:42:50 +00:00
rubidium
41fe2dea36 (svn r22390) [1.1] -Backport from trunk:
- 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)
- Fix: [NewGRF] the c and p parts of station vars 40, 41 and 49 were incorrect for large stations (r22286)
2011-04-30 20:41:17 +00:00
rubidium
ad37641fee (svn r22281) [1.1] -Backport from trunk:
- 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] -Prepare: 1.1.0
2011-03-31 21:16:12 +00:00
frosch
c1c35b5ac5 (svn r22261) [1.1] -Prepare: for 1.1.0-RC3 2011-03-18 20:56:54 +00:00
frosch
71d169ffd3 (svn r22260) [1.1] -Backport from trunk:
- Fix: New game settings were applied to early when starting a game via a heightmap. [FS#4557] (r22259)
2011-03-18 20:54:07 +00:00
rubidium
564a50628c (svn r22257) [1.1] -Backport from trunk: language updates 2011-03-17 21:15:27 +00:00
rubidium
633454f0dd (svn r22252) [1.1] -Backport from trunk:
- 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)
2011-03-14 19:03:17 +00:00
rubidium
fbea0fc6b1 (svn r22251) [1.1] -Backport from trunk:
- Fix: [NewGRF] Object variable 0x48 was not available in callback 0x15C (r22231)
[1.1] -Update: the intro game (romazoon)
2011-03-14 18:10:24 +00:00
rubidium
30cf8d1971 (svn r22224) [1.1] -Backport from trunk:
- 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)
2011-03-07 19:18:38 +00:00
rubidium
01bc61309f (svn r22184) [1.1] -Prepare: for 1.1.0-RC2 2011-03-04 20:50:07 +00:00
rubidium
308b0d354c (svn r22183) [1.1] -Backport from trunk:
- Fix: Following a vehicle with a very high VehicleID was impossible (r22181)
[1.1] -Backport language changes from trunk
2011-03-04 19:04:42 +00:00
rubidium
1d2baecb5e (svn r22178) [1.1] -Backport from trunk:
- 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)
2011-03-03 21:47:13 +00:00
rubidium
40f3583c54 (svn r22166) [1.1] -Backport from trunk:
- 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)
2011-03-03 20:48:24 +00:00
rubidium
5552c0a7e9 (svn r22152) [1.1] -Backport from trunk:
- 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)
2011-02-26 20:13:14 +00:00
rubidium
f2d2713f05 (svn r22151) [1.1] -Backport from trunk:
- 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)
2011-02-26 20:06:18 +00:00
rubidium
cad2aa6b14 (svn r22150) [1.1] -Backport from trunk:
- 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)
2011-02-26 20:03:44 +00:00
rubidium
96ab68d6bc (svn r22103) [1.1] -Prepare: for 1.1.0-RC1 2011-02-18 21:05:28 +00:00
rubidium
35fb1fe0e1 (svn r22100) [1.1] -Backport from trunk: language updates 2011-02-18 20:38:05 +00:00
rubidium
fab07a9265 (svn r22099) [1.1] -Backport from trunk:
- 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)
2011-02-18 20:35:40 +00:00
rubidium
177135320d (svn r22088) [1.1] -Revert (r22041): assertions to check whether Pools are actually checked before allocation still triggered in some corner cases, so leave it in trunk but remove it from the 1.1 branch 2011-02-15 22:04:57 +00:00
rubidium
5be6a1c7e6 (svn r22082) [1.1] -Branch: for the 1.1 series 2011-02-14 20:19:53 +00:00
glx
1b2ef66416 (svn r22081) -Fix [FS#4489]: if fullscreen fails with current resolution, use desktop resolution 2011-02-14 20:16:36 +00:00
planetmaker
914f8e9f1d (svn r22080) -Doc: Add doxygen comments to a few functions and improve a few existing comments 2011-02-14 19:52:26 +00:00
terkhen
8e4b2c951d (svn r22079) -Fix: The owner view of the smallmap was not updated after a company colour change. 2011-02-14 19:39:01 +00:00
rubidium
95b6aeaabd (svn r22078) -Fix [FS#4499]: maximum train length interfered with wagon replacement when wagon removal was turned on 2011-02-14 19:18:12 +00:00
translators
95ec99132e (svn r22077) -Update from WebTranslator v3.0:
latvian - 2 changes by skazhy
2011-02-14 18:45:08 +00:00
smatz
e8002f5b92 (svn r22076) -Fix (r22075): build failed with GCC 2011-02-14 12:39:45 +00:00
yexo
66543bde1d (svn r22075) -Fix [FS#4501]: newgrfs with invalid multi-tile houses could cause a valid 1x1 house following it to be seen as multi-tile, causing crashes 2011-02-13 21:44:00 +00:00
yexo
b51c62f5af (svn r22074) -Cleanup (r22073): there was already a setting-callback that did what is needed 2011-02-13 20:52:33 +00:00
yexo
f1377a228f (svn r22073) -Fix: immediately update the train weight when you change the multiplier for train cargo weight 2011-02-13 20:45:17 +00:00
rubidium
6a58f34878 (svn r22072) -Fix (r21966): flipping wasn't (correctly) disabled in some cases 2011-02-13 19:49:53 +00:00
yexo
c7038d8b4d (svn r22071) -Fix (r20075): some hotkey names in hotkey.cfg for the scenario editor toolbar were completely bogus 2011-02-13 19:31:04 +00:00
rubidium
befa79ba4a (svn r22070) -Fix [FS#4503] (r21399): crashes when disconnecting after requesting the map 2011-02-12 21:30:57 +00:00
rubidium
a19bc28aba (svn r22069) -Fix: delete all savegame packets, not just the first one 2011-02-12 21:29:35 +00:00
rubidium
adfd648031 (svn r22068) -Codechange/Fix: return "connection lost" instead of "okay" when SendPackets closed the connection 2011-02-12 21:09:34 +00:00
rubidium
92d0d6d10b (svn r22067) -Fix: don't hold a mutex when sending packets and thus possibly closing the connection as that wants to acquire the mutex again 2011-02-12 21:07:30 +00:00
rubidium
ece59dc0d1 (svn r22066) -Fix [FS#4502]: building a statue did not check whether the object pool is full 2011-02-12 18:45:05 +00:00
rubidium
2d4d43d00c (svn r22065) -Fix [FS#4500]: pool allocation checks triggered when towns could not be built 2011-02-12 18:41:24 +00:00
rubidium
d8cada7563 (svn r22064) -Fix [FS#4497] (r21399): crash when disconnecting and reconnecting while the server is still saving the savegame 2011-02-11 23:20:35 +00:00
rubidium
1dc5ba2210 (svn r22063) -Change: make the "has network" check also check whether the client is actually fully connected 2011-02-11 22:10:10 +00:00
rubidium
7de823b1bd (svn r22062) -Fix: memory leak when saving fails mid-way 2011-02-11 21:30:26 +00:00
yexo
296af35741 (svn r22061) -Change: when loading old savegames with long trains set the maximum train length to the length of the longest train 2011-02-11 20:54:49 +00:00
translators
37483180e8 (svn r22060) -Update from WebTranslator v3.0:
arabic_egypt - 46 changes by Company_director
hungarian - 20 changes by IPG
spanish - 1 changes by Terkhen
2011-02-11 18:45:13 +00:00
terkhen
8196b03074 (svn r22059) -Fix (r21179): Make the send chat message window follow the position of the status bar. 2011-02-11 18:24:12 +00:00
rubidium
b187352663 (svn r22058) -Fix (r22050): removing broken orders happened before the "front engine" conversion was done for road vehicles, so road vehicles didn't have orders anymore 2011-02-11 13:38:34 +00:00
rubidium
13fd2cd335 (svn r22057) -Fix: waypoint conversion could (previously) silently overfill the pool and crash 2011-02-11 09:33:38 +00:00
rubidium
246f6fe478 (svn r22056) -Fix [FS#4408]: metric and imperial HP are not the same. As imperial HP are used internally, set a conversion rate for metric HP
-Change: make the imperial HP to kW conversions a bit more precise
2011-02-11 08:17:12 +00:00
yexo
5f18d6d828 (svn r22055) -Fix [FS#4490]: [Squirrel] some invalid squirrel code caused the squirrel compiler to crash 2011-02-11 06:18:39 +00:00
rubidium
66a8c324db (svn r22054) -Codechange: support for rounding the converted units to their closest integral value instead of flooring 2011-02-10 20:54:46 +00:00
terkhen
24983ec629 (svn r22053) -Fix: The land area information window was not updated after a language change. 2011-02-10 20:49:36 +00:00
translators
a1b79246e8 (svn r22052) -Update from WebTranslator v3.0:
catalan - 11 changes by arnau
2011-02-10 18:45:06 +00:00
terkhen
57a969017b (svn r22051) -Fix (r21935): Roads under road stops would get a wrong owner after overbuilding. 2011-02-10 18:32:08 +00:00
rubidium
50996e799b (svn r22050) -Fix-ish [FS#4496]: 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. 2011-02-10 18:28:25 +00:00
terkhen
096c2857ee (svn r22049) -Codechange: Add assert condition to GetRoadOwner. 2011-02-10 18:27:50 +00:00
glx
16dd93d3fb (svn r22048) -Fix (r4495): company 0 does not always exist, so put temporary vehicles in a valid company 2011-02-10 15:58:22 +00:00
yexo
421ba1c342 (svn r22047) -Fix: selling a vehicle triggered the assert added in r22041 2011-02-10 13:17:24 +00:00
frosch
b7713a7e85 (svn r22046) -Fix [FS#4487]: Make sure order indices stay in range when copying, sharing, unsharing or deleting all orders. 2011-02-09 21:40:32 +00:00
frosch
3a787f5a0b (svn r22045) -Codechange: Move cancelling the current loading order on deleting the current order to a separate function. 2011-02-09 21:39:22 +00:00
rubidium
dda7b60a57 (svn r22044) -Fix [FS#4493]: update the consist cache when a part of a train is flipped in the depot 2011-02-09 20:45:40 +00:00
rubidium
15514a3011 (svn r22043) -Fix: invalidate the right windows when a part of a train is flipped in the depot 2011-02-09 20:45:07 +00:00
smatz
69789f3008 (svn r22042) -Fix: when loading a TTO/TTD savegame, verify we can allocate a CargoPacket before actually trying to do so 2011-02-09 18:56:40 +00:00
smatz
fbfb0ffbf2 (svn r22041) -Codechange: add a check that we called PoolItem::CanAllocateItem() before actually allocating it 2011-02-09 18:55:51 +00:00
rubidium
67cbee4f64 (svn r22040) -Codechange: handle case where too many Engines would be loaded, and ensure we don't overfill the SpriteGroup pool 2011-02-09 18:46:55 +00:00
translators
f50f57b4d8 (svn r22039) -Update from WebTranslator v3.0:
dutch - 3 changes by habell
korean - 3 changes by junho2813
brazilian_portuguese - 99 changes by Luis_Mizuchiro
serbian - 1 changes by etran
2011-02-09 18:45:16 +00:00
terkhen
0828653cf9 (svn r22038) -Fix (r21406): Tab completion in chat did not cycle through all possible options. 2011-02-09 15:57:03 +00:00
rubidium
e76465bab9 (svn r22037) -Codechange: remove some unneeded (hidden) casting 2011-02-09 13:21:50 +00:00
rubidium
f4f5de5be1 (svn r22036) -Codechange: rename units to match coding style, and give conversion variables a more descriptive name 2011-02-09 13:05:04 +00:00
rubidium
fbb5f87801 (svn r22035) -Codechange: refactor (display) unit conversion to happen at a single place 2011-02-09 12:59:39 +00:00
rubidium
7c254110c0 (svn r22034) -Fix [FS#4488]: 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 2011-02-08 22:36:16 +00:00
smatz
5ccf5cc551 (svn r22033) -Fix: don't crash when there are too many objects generated already when placing transmitters 2011-02-08 21:49:39 +00:00
rubidium
05a846a574 (svn r22032) -Codechange: add some asserts to verify we don't allocate too many NetworkClientSockets/Infos 2011-02-08 21:47:10 +00:00
rubidium
537bd8a429 (svn r22031) -Fix: bad servers could crash a client 2011-02-08 21:45:38 +00:00
rubidium
5f7439a00f (svn r22030) -Cleanup: dead code in NetworkGameWindow::OnInvalidateData (adf88) 2011-02-08 20:52:38 +00:00
rubidium
e1eeca6440 (svn r22029) -Fix [FS#4482]: the server list got not resorted/redrawn after NewGRFs were downloaded 2011-02-08 20:51:30 +00:00
rubidium
5286de116b (svn r22028) -Cleanup: remove traces of a debugging "feature" that got disabled a long time ago 2011-02-08 20:47:48 +00:00
translators
0c873d2bc6 (svn r22027) -Update from WebTranslator v3.0:
traditional_chinese - 38 changes by josesun
luxembourgish - 12 changes by Phreeze
2011-02-08 18:45:09 +00:00
smatz
9cd5243d04 (svn r22026) -Fix: don't crash when we generate too many objects while generating map 2011-02-08 18:39:29 +00:00
smatz
887a7724dc (svn r22025) -Fix: verify there is enough space in the pool when creating new pool items while loading old savegames 2011-02-08 18:34:13 +00:00
smatz
364ef8e6e6 (svn r22024) -Fix [FS#4468]: verify we can allocate an OrderList before we actually try to do so (Rubidium) 2011-02-08 18:29:30 +00:00
smatz
b4273bcd35 (svn r22023) -Fix: verify we can allocate a CargoPacket and CargoPayment before we actually try to do so
-Codechange: increase the limit of number of CargoPayments to match the limit of Vehicles (Rubidium)
2011-02-08 18:27:21 +00:00
smatz
7af2470a78 (svn r22022) -Fix [FS#4468]: verify we can allocate an order before we actually try to do so 2011-02-08 18:21:55 +00:00
rubidium
1d0d7635e0 (svn r22021) -Fix (r22019): ofcourse make doesn't notice files are gone, so it doesn't recompile everything that needs to be recompiled... 2011-02-07 22:49:38 +00:00
rubidium
a06b34bd4f (svn r22020) -Fix: load of failures of WT3 to properly validate some strings... 2011-02-07 22:40:01 +00:00
rubidium
0395aab420 (svn r22019) -Codechange: s/functions.h/clear_func.h/ 2011-02-07 22:38:02 +00:00
rubidium
bc3ce1e53b (svn r22018) -Cleanup: remove some (now) unneeded includes of functions.h 2011-02-07 22:37:22 +00:00
rubidium
faf5d899f7 (svn r22017) -Codechange: move MarkTileDirtyByTile to viewport_func.h 2011-02-07 22:29:47 +00:00
rubidium
68ace1b79b (svn r22016) -Fix [FS#4479]: when paused and having the allowed actions while paused setting on "no actions" cheating money would fail 2011-02-07 22:23:37 +00:00
rubidium
3745ff7338 (svn r22015) -Codechange: move yet another pair of methods from functions.h 2011-02-07 22:22:20 +00:00
rubidium
ec9e0690eb (svn r22014) -Codechange: move some more functions out of functions.h 2011-02-07 22:15:46 +00:00
rubidium
750d369a2a (svn r22013) -Codechange: move some functions out of functions.h 2011-02-07 22:08:11 +00:00
planetmaker
68d03b66e3 (svn r22012) -Add: [NewGRF] Test all industry layouts also when prospecting 2011-02-07 20:47:58 +00:00
planetmaker
44495f8dba (svn r22011) -Codechange: Rename a few variables and enhance code clearity 2011-02-07 20:47:06 +00:00
planetmaker
64280e63fb (svn r22010) -Feature-ette [FS#4131]: [NewGRF] Test all possible industry layouts during construction and add another pony to andy's stables 2011-02-07 20:45:31 +00:00
translators
28a72bbf47 (svn r22009) -Update from WebTranslator v3.0:
belarusian - 2 changes by KorneySan
croatian - 11 changes by VoyagerOne
estonian - 3 changes by notAbot
romanian - 10 changes by kkmic
russian - 5 changes by KorneySan, Lone_Wolf, perk11
spanish - 3 changes by Terkhen
swedish - 9 changes by Ledel
2011-02-07 18:45:26 +00:00
rubidium
264ed733e8 (svn r22008) -Add [FS#4470]: log the command that invocated configure in config.log 2011-02-07 09:55:09 +00:00
rubidium
79fd8a362b (svn r22007) -Change: only show one AI per unique ID instead of all versions in the output of "openttd -h" 2011-02-07 09:51:16 +00:00
rubidium
64cba95fbe (svn r22006) -Fix [FS#4480]: smoke/sparks of trains would be shown under bridges, or rather through bridges 2011-02-07 09:50:20 +00:00
planetmaker
4828ed94ba (svn r22005) -Fix (r21993): Update regression tests as well 2011-02-06 23:25:11 +00:00
rubidium
cebe8ab630 (svn r22004) -Change [FS#4471]: always report mammoth trains are disabled to NewGRFs, and allow the maximum train length to be modified in multiplayer as well 2011-02-06 21:31:33 +00:00
rubidium
4af28a3867 (svn r22003) -Document [FS#3447]: that SDL for Mac OS X might very well be unusable 2011-02-06 21:14:57 +00:00
translators
7ffef9c1e6 (svn r22002) -Update from WebTranslator v3.0:
belarusian - 4 changes by KorneySan, Wowanxm
finnish - 38 changes by jpx_
italian - 3 changes by lorenzodv
japanese - 42 changes by kokubunzi
polish - 7 changes by Simek
portuguese - 122 changes by jomasaco
russian - 4 changes by Lone_Wolf
serbian - 4 changes by etran
slovenian - 10 changes by ntadej
2011-02-06 18:45:32 +00:00
alberth
4364cec392 (svn r22001) -Codechange: Rename difficulty.number_industries to difficulty.industry_density. 2011-02-06 18:26:50 +00:00
alberth
d84502c432 (svn r22000) -Codechange: Introduce an enum for the industry density setting. 2011-02-06 18:11:39 +00:00
alberth
a5921c0514 (svn r21999) -Fix [FS#4474] (r21969): Use 'very low' industry density for generating industries in the SE. 2011-02-06 17:21:49 +00:00
alberth
870d2eafbf (svn r21998) -Fix (r21969): Number of industries difficulty setting should not affect the SE. 2011-02-06 17:19:56 +00:00
rubidium
fd86b0608d (svn r21997) -Fix [FS#4473]: 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 2011-02-06 16:45:27 +00:00
rubidium
fd94ed3009 (svn r21996) -Fix [FS#4472]: [YAPF] Under some circumstances vehicles could be lost 2011-02-06 15:01:52 +00:00
frosch
8b2f2c09e5 (svn r21995) -Cleanup (r21994): Remove obsolete comment. 2011-02-06 14:33:04 +00:00
frosch
a8859bbff9 (svn r21994) -Fix: Make computations of closest-land/water-distances handle waterish tiles more correctly. 2011-02-06 13:57:17 +00:00
planetmaker
afad7920ef (svn r21993) -Fix (r19720): When building a lock on dry land costs for clearing water were deducted rather than for building canals 2011-02-06 12:16:06 +00:00
yexo
6f730b1124 (svn r21992) -Fix [FS#4467]: AIs trying to change the AIOF_GOTO_NEAREST_DEPOT flag for existing orders triggered an assert. Explicitly forbid this as precondition for SetOrderFlags 2011-02-06 12:15:17 +00:00
frosch
3bb7f7ebe4 (svn r21991) -Fix [FS#4466]: The share/copy-orders-cursor was not updated to refer to the new vehicle when it got autoreplaced/-renewed. 2011-02-05 23:10:31 +00:00
frosch
2fbecaf4bf (svn r21990) -Cleanup (r14085): Remove unneeded test. 2011-02-05 23:02:52 +00:00
frosch
9aa185572b (svn r21989) -Fix (r21954): Vehicle status bar glitches on speed changes. 2011-02-05 21:13:54 +00:00
frosch
d82475cf88 (svn r21988) -Change: Disable smooth scrolling for GHK_CENTER_ZOOM when zooming is also involved. 2011-02-05 21:07:25 +00:00
frosch
ef3ec0f8c8 (svn r21987) -Fix: Make news items, engine previews and AI preview events deal with no longer existing Engine items after resetting the pool. 2011-02-05 20:41:13 +00:00
frosch
faa2a26ae1 (svn r21986) -Codechange: Add helper function to test whether an engine is still associated to a GRF. 2011-02-05 20:37:00 +00:00
frosch
2679051c68 (svn r21985) -Codechange: Use VehicleOrderID where appropiate. 2011-02-05 20:26:55 +00:00
planetmaker
e145d632cd (svn r21984) -Fix: Compilation without AI was broken 2011-02-05 19:36:02 +00:00
translators
b0e4ff1dff (svn r21983) -Update from WebTranslator v3.0:
belarusian - 6 changes by Wowanxm
czech - 4 changes by CrazyBenny
english_US - 3 changes by Rubidium
estonian - 7 changes by notAbot
finnish - 5 changes by jpx_
french - 5 changes by glx
german - 9 changes by planetmaker
italian - 10 changes by lorenzodv, planetmaker
japanese - 11 changes by kokubunzi
polish - 21 changes by Simek
russian - 1 changes by Lone_Wolf
serbian - 9 changes by etran
spanish - 5 changes by Terkhen
ukrainian - 9 changes by Fixer
2011-02-05 18:45:47 +00:00
frosch
e9e6444138 (svn r21982) -Add: Wheel scrolling to console. 2011-02-05 17:54:36 +00:00
frosch
82f260e15f (svn r21981) -Codechange: Deduplicate the code and unify the bounds of console scrolling. 2011-02-05 17:53:29 +00:00
frosch
582d30c979 (svn r21980) -Codechange: Draw one line more at the top of the console, i.e. clip the top-most line if there is not enough room instead of not drawing it at all. 2011-02-05 17:44:44 +00:00
frosch
c000f6b939 (svn r21979) -Fix: Scrolling of the console in pages used wrong line height and scrolled too much. 2011-02-05 17:41:05 +00:00
frosch
e06c412a05 (svn r21978) -Codechange/Fix: Remove usage of Window::top and left from IConsoleWindow::OnPaint(). Drawing is done relative to the window position. But as the position is (0,0) anyway, it was not noticeable. 2011-02-05 17:34:13 +00:00
frosch
9e1695aa1e (svn r21977) -Codechange: Always cal Window::OnMouseWheel(), independent of viewport scroll/zoom settings. 2011-02-05 16:36:37 +00:00
alberth
b992a93996 (svn r21976) -Doc: Document several crash handling functions. 2011-02-05 16:20:55 +00:00
frosch
915e339d0f (svn r21975) -Add: 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. 2011-02-05 16:07:23 +00:00
terkhen
a4b08dddd1 (svn r21974) -Feature: Add a setting to enable/disable funding local road reconstruction. 2011-02-05 13:46:09 +00:00
terkhen
91dcc9e016 (svn r21973) -Fix: Redraw the town authority window after modifying town authority settings. 2011-02-05 13:42:57 +00:00
alberth
7935eab3dc (svn r21972) -Fix: Replace 'None' industries in the generation window with more descriptive label. 2011-02-05 11:42:27 +00:00
alberth
7da952115b (svn r21971) -Fix (r21969): Subversion auto-increments revision on commit. 2011-02-05 10:38:40 +00:00
rubidium
50d646ca7b (svn r21970) -Fix [FS#4464]: Crash when a multiplayer company goes bankrupt with 'you' in it 2011-02-05 10:38:31 +00:00
alberth
bdf5a1c2f7 (svn r21969) -Feature: Introduce 'minimal' number of industries as a replacment for the old 'none' setting in the newgame window. 2011-02-05 10:28:31 +00:00
rubidium
974c0f5166 (svn r21967) -Prepare: for 1.1.0-beta5 2011-02-04 20:07:32 +00:00
rubidium
00a766ed27 (svn r21966) -Change [FS#4462]: [NewGRF] Disable the flipping of train engines/wagons in the depot by default for NewGRFs 2011-02-04 19:20:47 +00:00
translators
1cd4b3bb86 (svn r21965) -Update from WebTranslator v3.0:
czech - 6 changes by SmatZ
dutch - 15 changes by Yexo
english_US - 10 changes by Rubidium
finnish - 9 changes by jpx_
french - 9 changes by glx
russian - 6 changes by Lone_Wolf
spanish - 6 changes by Terkhen
2011-02-04 18:47:33 +00:00
rubidium
09601fe35d (svn r21964) -Fix (r21959): regression failed 2011-02-04 18:41:42 +00:00
rubidium
bbd308adef (svn r21963) -Fix: saying something twice in an error message is not needed 2011-02-04 18:32:56 +00:00
rubidium
0fe0225751 (svn r21962) -Feature-ish: GUI setting to disable reversing at signals 2011-02-04 16:40:38 +00:00
rubidium
773c6765e6 (svn r21961) -Remove: limitation that not loading and not unloading is mutual exclusive 2011-02-04 16:07:42 +00:00
rubidium
c85d350310 (svn r21960) -Change: show the length of vehicles in tiles, instead of half tiles in the depot
-Fix [FS#4461]: don't count the number of vehicles but the length of vehicles to (configurably) limit train length
2011-02-04 15:40:35 +00:00
rubidium
46b3d114a8 (svn r21959) -Change: replace longbridges with custom maximum bridge and tunnel length setting 2011-02-04 15:37:23 +00:00
rubidium
4355231f67 (svn r21958) -Cleanup: join_stations setting; can done by distant join and could be subverted by distant join 2011-02-04 15:29:50 +00:00
rubidium
4c5ca17486 (svn r21957) -Cleanup: gotodepot and timetabling settings are more or less useless; just don't use depot orders or timetabling if you don't want to use it 2011-02-04 15:13:20 +00:00
rubidium
71f4067d19 (svn r21956) -Cleanup: always draw the bridge pillars 2011-02-04 14:38:33 +00:00
rubidium
313c1bc171 (svn r21955) -Cleanup: always show the long date in the status bar 2011-02-04 14:38:15 +00:00
rubidium
2ad1279725 (svn r21954) -Cleanup: remove setting to not show the vehicle speed in the vehicle view 2011-02-04 14:37:24 +00:00
smatz
3057a26fd5 (svn r21953) -Remove [FS#4456]: the non-uniform stations setting. Support for uniform stations has been broken for over a year 2011-02-04 14:11:14 +00:00
rubidium
732a0d069a (svn r21952) -Codechange: unify the company clearing code for bankruptcy with the command to remove companies 2011-02-04 10:31:40 +00:00
yexo
c70ee16ecf (svn r21951) -Fix: [NewGRF] reset the carry flag every 4 bytes in action6 when adding more than one variable 2011-02-04 08:29:14 +00:00
translators
053420399a (svn r21950) -Update from WebTranslator v3.0:
catalan - 1 changes by arnau
2011-02-03 18:45:07 +00:00
smatz
f3e550e9bd (svn r21949) -Change: randomize the vehicle a small UFO targets, do not use the one with lowest index 2011-02-02 23:06:38 +00:00
smatz
a4bf3be864 (svn r21948) -Fix: road vehicle was moved under the bridge when it was destroyed by an UFO while on a bridge 2011-02-02 22:40:04 +00:00
smatz
3bfad0243b (svn r21947) -Fix (r21195): crash when converting a savegame with vehicles crashed in a tunnel entry, or with vehicles reversing there 2011-02-02 22:20:48 +00:00
rubidium
547421496e (svn r21946) -Fix [FS#4447]: assertion/funny behaviour when a road vehicle reverses while overtaking, so abort the overtake attempt when reversing the road vehicle 2011-02-02 22:13:13 +00:00
rubidium
bbe94dc497 (svn r21945) -Codechange: simplify setting the overtaking counter and remove the magic from its numbers 2011-02-02 22:06:14 +00:00
smatz
a42c0ea88b (svn r21944) -Codechange: give name to one magic constant 2011-02-02 22:01:01 +00:00
rubidium
8118f74575 (svn r21943) -Codechange: document and unmagicify some bits of road vehicle overtaking 2011-02-02 21:56:56 +00:00
smatz
54161949d1 (svn r21942) -Codechange: no need to convert GOINGUP/GOINGDOWN flags if they are cleared afterwards during savegame conversion 2011-02-02 19:22:35 +00:00
translators
e846701b3c (svn r21941) -Update from WebTranslator v3.0:
maltese - 22 changes by peter88823
2011-02-02 18:45:05 +00:00
planetmaker
0364726bbb (svn r21940) -Fix [FS#4460]: Not all vehicles should be tested to be inside a tunnel upon savegame load (SmatZ) 2011-02-02 16:46:42 +00:00
smatz
b15719bbd2 (svn r21939) -Fix (r16357): the check for valid depot wasn't strict enough 2011-02-02 14:50:57 +00:00
alberth
0ebc548a89 (svn r21938) -Codechange: AfterLoadGame() is no longer friend of Vehicle. 2011-02-01 21:18:27 +00:00
translators
1a971fb6d6 (svn r21937) -Update from WebTranslator v3.0:
turkish - 32 changes by leventpasha
2011-02-01 18:45:06 +00:00
terkhen
9765a297e7 (svn r21936) -Fix [FS#4457](r19231): Do not remove existing road/tram bits when overbuilding stops of the opposite road type.
-Change: Build only the required road/tram bits when building stops with drag and drop.
2011-02-01 10:48:10 +00:00
terkhen
2e1eafbdc3 (svn r21935) -Fix (r19231): Allow to overbuild road stops which are built over trams. 2011-02-01 10:43:25 +00:00
frosch
49ea0e9092 (svn r21934) -Fix (r21933): The original plan was to run the regression before committing. 2011-01-31 20:56:02 +00:00
frosch
a97d52a29a (svn r21933) -Codechange: Split cur_order_index into cur_auto_order_index and cur_real_order_index to keep track of the current real order in an unambiguous way.
-Fix [FS#4440]: Automatic orders behave now stable wrt. service orders and are not added or removed depending on the need of servicing.
-Fix: Various other issues with automatic orders, e.g. vehicles getting stuck with "no orders" when there are automatic orders at the end of the order list.
2011-01-31 20:44:15 +00:00
rubidium
67a5cd0b18 (svn r21932) -Document: some tidbits related to vehicles 2011-01-31 20:27:33 +00:00
translators
8f67baae2e (svn r21931) -Update from WebTranslator v3.0:
vietnamese - 81 changes by myquartz
2011-01-31 18:45:07 +00:00
alberth
da0b09557c (svn r21930) -Codechange: Remove unused vehicle GetTypeString() functions. 2011-01-30 21:32:21 +00:00
planetmaker
df8c4bdbfa (svn r21929) -Fix [FS#4554]: The town window would not be invalidated in the scenario editor if the ground changed and thus the required cargos for town growth 2011-01-30 19:14:48 +00:00
translators
3d34b9e4a2 (svn r21928) -Update from WebTranslator v3.0:
portuguese - 5 changes by JayCity
2011-01-30 18:45:06 +00:00
alberth
1e65afc62a (svn r21927) -Change: Comment-style fixes. 2011-01-30 12:58:54 +00:00
frosch
f48838ef3f (svn r21926) -Fix [FS#4450](r21924): v != w. 2011-01-29 23:42:40 +00:00
alberth
eea2f90da7 (svn r21925) -Doc: Doxygen additions and markup corrections to vehicle-related functions. 2011-01-29 21:37:11 +00:00
terkhen
734994c9ba (svn r21924) -Codechange: Unify some parts of the articulated vehicle code.
-Cleanup: Avoid conversions to Train and RoadVehicle that are no longer required.
2011-01-29 17:30:25 +00:00
terkhen
50b0e10026 (svn r21923) -Codechange: Unify articulated vehicle iteration functions. 2011-01-29 17:27:32 +00:00
terkhen
9626e0bf2b (svn r21922) -Codechange: Unify articulated vehicle checking functions. 2011-01-29 17:26:23 +00:00
terkhen
23ffef05ce (svn r21921) -Codechange: Move GroundVehicleSubtypeFlags as they will be needed by some Vehicle functions. 2011-01-29 17:21:39 +00:00
translators
3cd1f15523 (svn r21920) -Update from WebTranslator v3.0:
basque - 25 changes by Thadah
greek - 6 changes by fumantsu
spanish - 1 changes by Terkhen
2011-01-27 18:45:10 +00:00
planetmaker
5e82fee690 (svn r21919) -Fix: Converting an expensive rail type to a cheap one could give more money than removing and rebuilding cost 2011-01-27 00:38:12 +00:00
rubidium
62e5afcdf8 (svn r21918) -Fix [FS#4443]: Languages improperly sorted in the "start server" window (adf88) 2011-01-26 22:42:50 +00:00
translators
a7634b399d (svn r21917) -Update from WebTranslator v3.0:
basque - 28 changes by Thadah
indonesian - 15 changes by adjayanto
japanese - 11 changes by kokubunzi
luxembourgish - 250 changes by Phreeze
brazilian_portuguese - 130 changes by Luis_Mizuchiro
2011-01-26 18:45:17 +00:00
rubidium
ab4c419fcf (svn r21916) -Fix [FS#4442]: 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 2011-01-26 17:37:12 +00:00
rubidium
430fda01dc (svn r21915) -Codechange: rename RoadVehicleAccelerate to RoadVehicle::UpdateSpeed (to match the naming used by Trains), and make use of the algorithm implemented in GroundVehicle 2011-01-26 17:35:03 +00:00
rubidium
b4a175ba41 (svn r21914) -Codechange: move the algorithmic part of Train::UpdateSpeed to a function in GroundVehicle 2011-01-26 17:34:07 +00:00
rubidium
982de9cf86 (svn r21913) -Codechange: move bridge speed limiting for road vehicles to the same (logically speaking) place as for trains 2011-01-26 17:33:14 +00:00
rubidium
4fff63d790 (svn r21912) -Codechange: let road vehicles use gcache.last_speed/SetLastSpeed as well 2011-01-26 17:31:44 +00:00
rubidium
b11f1bd4ed (svn r21911) -Codechange: move tcache.last_speed to gcache.last_speed and make SetLastSpeed a function of GroundVehicle 2011-01-26 17:31:07 +00:00
rubidium
12b64a12b0 (svn r21910) -Codechange: rename some autoreplace internal functions so they don't collide with globabl functions 2011-01-26 17:30:17 +00:00
rubidium
8017c2a3d7 (svn r21909) -Fix: some missing spaces 2011-01-26 08:14:36 +00:00
translators
2bec6123f7 (svn r21908) -Update from WebTranslator v3.0:
german - 2 changes by dihedral
brazilian_portuguese - 36 changes by Luis_Mizuchiro
ukrainian - 3 changes by Fixer
2011-01-25 18:45:13 +00:00
translators
83ad2c4dfa (svn r21906) -Update from WebTranslator v3.0:
polish - 2 changes by Simek
spanish - 1 changes by Terkhen
turkish - 4 changes by niw3
ukrainian - 2 changes by Fixer
2011-01-24 18:45:17 +00:00
translators
4c37e0ec2c (svn r21905) -Update from WebTranslator v3.0:
japanese - 6 changes by kokubunzi
polish - 13 changes by Simek
slovenian - 2 changes by ntadej
spanish - 4 changes by Terkhen
ukrainian - 2 changes by Fixer
2011-01-23 18:45:20 +00:00
frosch
072f6d67ef (svn r21904) -Fix: Include the capacity of non-refittable vehicles in the refitted-capacity, if their cargo matches. 2011-01-23 18:31:04 +00:00
smatz
25a22ec255 (svn r21903) -Codechange: warn only once for a train that has invalid length, not for each its wagon with invalid length 2011-01-23 17:50:24 +00:00
frosch
9a1c0f139a (svn r21902) -Fix: Do not count articulated parts when passing the number of vehicles to refit to the command. That may exceed 8 bits. 2011-01-23 14:58:54 +00:00
frosch
3f103c35a6 (svn r21901) -Codechange: Save some bits in p2 of CmdRefitVehicle. 2011-01-23 13:25:26 +00:00
yexo
967bb84af3 (svn r21900) -Fix: [NoAI] hide automatic orders from AIs as they have no way of dealing with them 2011-01-23 13:08:50 +00:00
frosch
890a18c738 (svn r21899) -Fix: Do not show a vehicle selection in the RefitWindow for refit orders. You cannot select anything anyway. 2011-01-23 13:00:50 +00:00
rubidium
81ef0dbcfc (svn r21898) -Fix [FS#4438]: using a pointer-iterator and adding things (thus reallocating) to the iterated array caused OpenTTD to crash on invalid pointers 2011-01-23 11:20:55 +00:00
rubidium
0de8332366 (svn r21897) -Fix (21707): Kenobi visited IsValidConsoleColour shortly 2011-01-23 00:11:15 +00:00
rubidium
1339d75f75 (svn r21896) -Cleanup: remove the unused StartScenario 2011-01-22 23:13:39 +00:00
rubidium
d74fc0bee3 (svn r21895) -Cleanup: get rid of the unused SLD_NEW_GAME 2011-01-22 23:08:32 +00:00
rubidium
7eadf07e44 (svn r21894) -Cleanup: get rid of the unused SM_START_SCENARIO 2011-01-22 23:08:18 +00:00
rubidium
0537672324 (svn r21893) -Update (r21892): remove the strings from the other language files as well 2011-01-22 23:07:51 +00:00
rubidium
cc8da3e5ab (svn r21892) -Fix [FS#4421]: only some scenarios from the main scenario folder and no heightmaps could be started in the "start server" window 2011-01-22 23:07:23 +00:00
translators
03fb95f92f (svn r21891) -Update from WebTranslator v3.0:
danish - 1 changes by nurriz
japanese - 12 changes by kokubunzi
slovenian - 1 changes by ntadej
turkish - 107 changes by niw3
ukrainian - 60 changes by Fixer
2011-01-22 18:45:21 +00:00
rubidium
7eba2bf4d3 (svn r21890) -Cleanup: remove some unneeded includes 2011-01-22 14:52:20 +00:00
rubidium
849772f0fd (svn r21889) -Fix [FS#4434]: crash when scrolling outside of the main window (with some video backends) 2011-01-22 14:51:36 +00:00
rubidium
9e8db65223 (svn r21888) -Codechange: remove some unneeded (for the AI header) headers from some AI headers, reducing the include tree 2011-01-22 10:33:16 +00:00
rubidium
6ff844e7c4 (svn r21887) -Fix-ish: some headers weren't including the headers they depend on 2011-01-22 10:10:03 +00:00
rubidium
eb299736c1 (svn r21886) -Codechange: move documentation towards the code to make it more likely to be updated [n]. 2011-01-22 09:53:15 +00:00
yexo
0cdb1c78cd (svn r21885) -Fix [FS#4422]: NewGRF string codes 0x80 and 0x81 were broken since the typechecking of string parameters 2011-01-21 23:10:02 +00:00
translators
c9bd9b0c23 (svn r21884) -Update from WebTranslator v3.0:
bulgarian - 19 changes by yxomo
greek - 15 changes by Gonik, fumantsu
japanese - 201 changes by kokubunzi, nex259
ukrainian - 100 changes by Fixer
2011-01-21 18:45:18 +00:00
smatz
8b9f0d5ade (svn r21883) -Codechange: make UpdateZPosition() faster by not calling GetSlopeZ() when not needed 2011-01-21 17:35:17 +00:00
smatz
e860075a16 (svn r21882) -Codechange: make use of the fact that vehicle's Z position can change only if it has GVF_GOINGUP_BIT or GVF_GOINGDOWN_BIT set 2011-01-21 16:51:56 +00:00
smatz
2a2363e819 (svn r21881) -Codechange: ensure that vehicle's GOINGUP/DOWN bits are set correctly and that it has correct z_pos when converting from older savegames 2011-01-21 16:48:41 +00:00
smatz
a6fcd78538 (svn r21880) -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 2011-01-21 16:35:12 +00:00
smatz
e308c348f0 (svn r21879) -Codechange: reset vehicle's GOINGUP/DOWN bits when it crashes 2011-01-21 16:20:55 +00:00
smatz
46dfdfd72b (svn r21878) -Codechange: move parts of UpdateInclination() to separate functions 2011-01-21 16:13:54 +00:00
smatz
4432f7799d (svn r21877) -Codechange: move definition of HALF_TILE_SIZE to tile_type.h 2011-01-21 15:48:52 +00:00
smatz
6dc24cf643 (svn r21876) -Codechange: typedef SpecializedVehicleBase and GroundVehicleBase to reduce typing 2011-01-21 14:43:38 +00:00
smatz
656caf16db (svn r21875) -Codechange: indentation of some comments was wrong 2011-01-21 01:38:30 +00:00
smatz
1ac51128f5 (svn r21874) -Fix: when a single-vehicle train was reversed while on a slope, its GOINGUP/DOWN weren't swapped 2011-01-21 00:11:13 +00:00
rubidium
698d840581 (svn r21872) -Doc: update some more documentation 2011-01-20 22:09:31 +00:00
rubidium
060b2b736b (svn r21871) -Doc: terraforming/clearing limits (dihedral) 2011-01-20 22:03:27 +00:00
frosch
2d6ebd3bf4 (svn r21870) -Doc: Mention 'joan' in the admin network documentation. 2011-01-20 21:28:38 +00:00
translators
fa64ae9b3a (svn r21869) -Update from WebTranslator v3.0:
japanese - 131 changes by kokubunzi
slovenian - 4 changes by ntadej
2011-01-20 18:45:10 +00:00
rubidium
289206b033 (svn r21868) -Fix (r21866 and some more): the changes to the main toolbar rail types dropdown should happen for the autoreplace dropdown as well 2011-01-20 12:40:40 +00:00
rubidium
4682434bc9 (svn r21867) -Codechange: move creating the rail type dropdown to a more general location 2011-01-20 12:40:04 +00:00
rubidium
2f6c840ebf (svn r21866) -Feature [FS#4394]: [NewGRF] Rail type property to influence sorting of rail types in the drop down list 2011-01-20 12:22:38 +00:00
rubidium
6a2ae92811 (svn r21865) -Fix (r21862): don't perform savegame conversion when reinitialising some vehicle structures due to NewGRF changes 2011-01-20 09:35:16 +00:00
rubidium
89a135293a (svn r21864) -Fix [FS#4430]: distant-join station would build at the wrong location when having persistent building turned on and selecting a "second" location for the station tile 2011-01-19 23:59:29 +00:00
rubidium
6435a89c28 (svn r21863) -Fix (r21849): load the amount that should be loaded instead of the amount that should not be loaded 2011-01-19 20:40:27 +00:00
terkhen
d426906a01 (svn r21862) -Codechange: Unify subtype handling between road vehicles and trains. 2011-01-19 20:04:09 +00:00
translators
be44f1306f (svn r21861) -Update from WebTranslator v3.0:
japanese - 92 changes by kokubunzi
spanish - 52 changes by Terkhen
ukrainian - 2 changes by Fixer
2011-01-19 18:45:12 +00:00
terkhen
b5468e7a80 (svn r21860) -Codechange: Rename road vehicle subtype functions to match the train names. 2011-01-19 18:44:13 +00:00
terkhen
613743538d (svn r21859) -Codechange: Move train subtype flags to GroundVehicle. 2011-01-19 18:42:54 +00:00
terkhen
cfbbcf1597 (svn r21858) -Codechange: Give more similar names to ArticulatedPart functions. 2011-01-19 18:41:53 +00:00
michi_cc
10a7678beb (svn r21857) -Add: Revision detection for hgsubversion repositories. 2011-01-19 17:10:57 +00:00
michi_cc
22922414eb (svn r21856) -Fix (r21840): Don't fail tag detection on hg repositories that use mercurial queues. Add some safety against tags and branches with spaces as well. 2011-01-19 17:10:52 +00:00
rubidium
3f9fa65a42 (svn r21855) -Feature [FS#4368]: [Network] Console command to change the password of other companies for servers (dihedral) 2011-01-19 16:52:57 +00:00
rubidium
795a528328 (svn r21854) -Codechange: refactor the password setting methods to make it possible to change the password of other companies (on the server) 2011-01-19 16:47:40 +00:00
rubidium
e54a1f6721 (svn r21853) -Codechange: HashCurrentCompanyPassword is only used by servers, so move it to network_server.* (dihedral) 2011-01-19 16:37:06 +00:00
rubidium
e95718bf43 (svn r21852) -Codechange: generalise GenerateCompanyPasswordHash (dihedral) 2011-01-19 16:35:11 +00:00
rubidium
c9609bbbc2 (svn r21851) -Codechange: rename NetworkClientSetPassword to NetworkClientSetCompanyPassword (dihedral) 2011-01-19 16:32:23 +00:00
rubidium
a82118f360 (svn r21850) -Codechange: move password hashing to a more general location (dihedral) 2011-01-19 16:30:09 +00:00
rubidium
2707186f6a (svn r21849) -Codechange: move merging/splitting of cargopackets into a helper function (fonsinchen) 2011-01-19 16:25:00 +00:00
rubidium
07e14525b8 (svn r21848) -Codechange: unification of comment style for cargopacket.* 2011-01-19 16:20:26 +00:00
rubidium
922d60f516 (svn r21847) -Fix [FS#4423]: slowing down of trains was done by reducing the speed by 10%, but also when you're just 1% too fast, so limit the slowdown till the new maximum speed 2011-01-19 08:24:38 +00:00
rubidium
9ca4b629cd (svn r21846) -Codechange: move documentation towards the code to make it more likely to be updated [o-s]. 2011-01-18 23:09:43 +00:00
rubidium
7efd7e19ed (svn r21845) -Codechange: move documentation towards the code to make it more likely to be updates [d-m]. 2011-01-18 22:31:06 +00:00
rubidium
6c9078fd30 (svn r21844) -Codechange: move documentation towards the code to make it more likely to be updates [a-c]. 2011-01-18 22:17:15 +00:00
rubidium
d89095b3ec (svn r21843) -Codechange: move documentation towards the code to make it more likely to be updates [t-z]. 2011-01-18 21:58:22 +00:00
rubidium
b8c9988d9f (svn r21842) -Feature [FS#4393]: [NewGRF] Introduction dates/required types for rail types; e.g. introduce a particular rail type in 1960 (or when a vehicle using it is introduced), but also allow limiting its introduction to only happen when the required railtypes are available 2011-01-18 21:30:59 +00:00
rubidium
6371b75bcc (svn r21841) -Feature: [NewGRF] Allow to define other railtypes that should be introduced if a particular rail type is introduced, e.g. to make sure slow rail is introduced when fast rail gets introduced 2011-01-18 21:28:07 +00:00
michi_cc
5f28591610 (svn r21840) -Change: Support tags created by hgsubversion for the revision detection. 2011-01-18 21:27:35 +00:00
michi_cc
73da045f50 (svn r21839) -Change: Support tags created by git-svn for the revision detection. 2011-01-18 21:27:30 +00:00
rubidium
561449992a (svn r21838) -Change: allow LMB scrolling with the mouse outside of the extra viewport instead of canceling scrolling when going slightly over the edge 2011-01-18 21:09:13 +00:00
rubidium
22d17aa745 (svn r21837) -Fix [FS#4419]: LMB dragging would switch over to other viewports instead of staying locked to the viewport you started on 2011-01-18 21:08:19 +00:00
smatz
c0b051eb33 (svn r21836) -Fix: when a train was reversed while inside a tunnel/bridge, it wouldn't have (re)set the GOINGUP/DOWN bits after leaving the tunnel/bridge 2011-01-18 20:40:36 +00:00
smatz
772de6b52d (svn r21835) -Codechange: use UpdateStatusAfterSwap() instead of copying the same code three times 2011-01-18 20:06:56 +00:00
translators
488b525161 (svn r21834) -Update from WebTranslator v3.0:
hungarian - 4 changes by IPG
japanese - 151 changes by kokubunzi
serbian - 1 changes by etran
spanish - 1 changes by Terkhen
ukrainian - 4 changes by Fixer
2011-01-18 18:45:18 +00:00
rubidium
6a17bf91e3 (svn r21833) -Fix [FS#4427]: desync debug savegames might not be actually saved in case threading is enabled, which is enabled by default 2011-01-18 18:14:14 +00:00
rubidium
3f900d3580 (svn r21832) -Feature: limit vehicle lateness to the length of a full timetable cycle, e.g. when a cycle takes 50 days and the vehicle is 65 days later reduce the lateness to 15 days 2011-01-18 14:27:43 +00:00
rubidium
39d7f3b2bd (svn r21831) -Fix [FS#4414]: service orders for trains/aircraft would (sometimes) not get a time when autofilling 2011-01-18 14:25:45 +00:00
terkhen
ff6aeb8791 (svn r21830) -Fix: Deunionize a union which was not initialized correctly. 2011-01-17 19:40:06 +00:00
translators
39c5cfc5d1 (svn r21829) -Update from WebTranslator v3.0:
belarusian - 4 changes by KorneySan
croatian - 2 changes by VoyagerOne
czech - 1 changes by CrazyBenny
dutch - 4 changes by habell
english_US - 1 changes by Rubidium
estonian - 3 changes by notAbot
finnish - 1 changes by jpx_
french - 2 changes by glx
italian - 1 changes by lorenzodv
polish - 1 changes by amateja
romanian - 24 changes by kkmic
russian - 4 changes by KorneySan, Lone_Wolf
spanish - 2 changes by Terkhen
swedish - 3 changes by Ledel, urdh
ukrainian - 34 changes by Fixer
2011-01-17 18:45:51 +00:00
rubidium
2f4a77f47e (svn r21828) -Document [FS#4415]: that the station build date is the date of the last construction action 2011-01-17 16:42:49 +00:00
rubidium
b3fdf69ab5 (svn r21827) -Cleanup: remove string removed in r21826 from other languages too 2011-01-16 21:11:31 +00:00
rubidium
62128e8263 (svn r21826) -Fix [FS#4007]: the expectations from the "always build infrastructure" setting name/description didn't match the behaviour 2011-01-16 21:10:41 +00:00
translators
805afdb002 (svn r21825) -Update from WebTranslator v3.0:
catalan - 4 changes by arnau
czech - 2 changes by SmatZ
english_US - 1 changes by Rubidium
estonian - 1 changes by notAbot
finnish - 1 changes by jpx_
italian - 1 changes by lorenzodv
polish - 3 changes by nouwak
serbian - 1 changes by etran
spanish - 163 changes by Terkhen
swedish - 1 changes by Ledel
ukrainian - 1 changes by Fixer
2011-01-16 18:45:37 +00:00
smatz
92b90d877e (svn r21824) -Codechange: don't call GetSlopeZ() when the ground vehicle is on a flat tile 2011-01-16 18:18:45 +00:00
smatz
82346d4608 (svn r21823) -Documentation: update the style used in several documentation files 2011-01-16 13:36:47 +00:00
alberth
32cd182ecc (svn r21822) -Codechange: Merge event handling code. 2011-01-16 11:40:36 +00:00
alberth
4a203e8a49 (svn r21821) -Codechange: Clean up the jump conditions. 2011-01-16 11:39:57 +00:00
alberth
1e7c3fd2ff (svn r21820) -Codechange: Concatenate both functions. 2011-01-16 11:39:09 +00:00
alberth
a2297dc594 (svn r21819) -Codechange: Swap order of HandleMouseDrag() and HandleDragDrop(), and split the w vardecl in the former. 2011-01-16 11:37:54 +00:00
terkhen
b8559492b5 (svn r21818) -Change: Rename the genders of the spanish translation. 2011-01-16 11:00:42 +00:00
rubidium
7ab524b048 (svn r21817) -Change: only show rail/road types that will eventually be available in-game. For example don't show trams when there is no tram NewGRF loaded 2011-01-16 10:25:47 +00:00
planetmaker
9b4beb0a5c (svn r21816) -Fix [FS#4378] (r14012): Allow dragging of combo signals (again) 2011-01-15 22:50:49 +00:00
rubidium
7645c5ac43 (svn r21815) -Fix [FS#3908]: [YAPF] Apply a pathfinder penalty for back of one-way path signals so those aren't preferred over other possibilities 2011-01-15 22:40:54 +00:00
frosch
6e4dd56158 (svn r21814) -Fix/Add: Check GRF version from action 8, and disallow usage of GRFs with versions above 7. 2011-01-15 21:13:47 +00:00
terkhen
4d8a93c870 (svn r21813) -Fix [FS#4411](r21720): Prevent crash when displaying the owner view. 2011-01-15 20:23:15 +00:00
alberth
a1df4bea68 (svn r21812) -Fix (r21754): Don't try to scroll the matrix widget to position -1. 2011-01-15 19:54:53 +00:00
rubidium
89f245ab2f (svn r21811) -Fix: guess what... 2011-01-15 18:46:42 +00:00
translators
1d3ce9ef1b (svn r21810) -Update from WebTranslator v3.0:
croatian - 2 changes by VoyagerOne
estonian - 2 changes by notAbot
italian - 2 changes by lorenzodv
serbian - 4 changes by etran
spanish - 3 changes by Terkhen
2011-01-15 18:45:19 +00:00
rubidium
bd9f07e5a0 (svn r21809) -Fix [FS#4404]: remove unreached automatic orders as well when reaching an ordered waypoint or depot (fonsinchen) 2011-01-15 18:19:04 +00:00
rubidium
4784c3ac3c (svn r21808) -Fix: don't create automatic orders when there are no manual orders (fonsinchen) 2011-01-15 18:16:46 +00:00
rubidium
bc9afec3b0 (svn r21807) -Codechange: split automatic order removal into a separate function (fonsinchen) 2011-01-15 18:14:29 +00:00
terkhen
53c9846f14 (svn r21806) -Codechange: Correct additional appearances of the same typo. 2011-01-15 16:27:04 +00:00
terkhen
93b26e8e3d (svn r21805) -Codechange: Correct a typo. 2011-01-15 15:58:03 +00:00
smatz
0ab078158e (svn r21804) -Remove [FS#4409]: the 'stopall' console command, as its functionality was broken. Group start/stop commands can be used instead 2011-01-15 15:51:16 +00:00
terkhen
679cd3c21b (svn r21803) -Cleanup: Remove unnecessary semicolons. 2011-01-15 15:36:58 +00:00
smatz
2709454040 (svn r21802) -Cleanup (r2600): remove unused _vehicle_id_ctr_day 2011-01-15 14:20:34 +00:00
alberth
7be31ee03e (svn r21801) -Fix (r21772): Attach scrollbar to select matrix in object gui. 2011-01-15 14:17:53 +00:00
rubidium
0c497dd113 (svn r21800) -Fix [FS#3569]: under certain circumstances one could crash a competitor's train; take the lazy non-future proof version of the fix from the 1.0 branch as fixing the real bug is significantly more complex and might even break some backwards compatability if not done perfectly 2011-01-15 09:53:21 +00:00
smatz
1b3e2309df (svn r21799) -Fix: further variables need to be reset when we loaded a TTDPatch savegame in the past 2011-01-15 00:10:16 +00:00
smatz
804542b3f3 (svn r21798) -Fix: loading a TTO savegame failed after loading a TTDP savegame with vehicle multiplier bigger than 1 2011-01-14 22:23:09 +00:00
rubidium
6b86ee9888 (svn r21797) -Fix/Change: unify the size (in characters) of the string inputs with eachother and TTD to prevent crashes/asserts with e.g. signs that are too long 2011-01-14 22:08:40 +00:00
rubidium
080a941eda (svn r21796) -Fix [FS#4398]: drive through road stop state wasn't properly converted from TTDPatch savegames 2011-01-14 21:54:37 +00:00
rubidium
85255ea001 (svn r21795) -Fix (r21790): when converting TTDPatch train waypoints, convert the data on the map as well 2011-01-14 20:52:22 +00:00
smatz
75351f4043 (svn r21794) -Fix (r21790): convert train orders too (Rubidium) 2011-01-14 19:51:50 +00:00
smatz
110e25e859 (svn r21793) -Fix (r20446): broken usage of GetTileOwner() caused wrong conversion of old savegames 2011-01-14 18:58:03 +00:00
translators
26eb9eb7e2 (svn r21792) -Update from WebTranslator v3.0:
belarusian - 1 changes by KorneySan
croatian - 1 changes by VoyagerOne
czech - 8 changes by CrazyBenny, marek995
dutch - 1 changes by habell
english_US - 3 changes by Rubidium
estonian - 1 changes by notAbot
finnish - 3 changes by jpx_
french - 3 changes by glx
german - 5 changes by planetmaker
hungarian - 1 changes by IPG
italian - 1 changes by lorenzodv
latvian - 1 changes by frosch
polish - 1 changes by wojteks86
russian - 1 changes by KorneySan
spanish - 4 changes by Terkhen
swedish - 1 changes by spacejens
turkish - 9 changes by niw3
ukrainian - 1 changes by Fixer
vietnamese - 1 changes by nglekhoi
2011-01-14 18:46:03 +00:00
rubidium
c6b46725db (svn r21791) -Fix [FS#4407]: off-by-one-ish for the terraforming limit 2011-01-14 18:45:14 +00:00
smatz
c58a910c8e (svn r21790) -Fix [FS#4398]: TTDPatch savegames can have train waypoints encoded as buoys 2011-01-14 16:49:29 +00:00
frosch
fad00367ae (svn r21789) -Fix [FS#4405]: When the font misses the fallback character '?', use the sprite font's '?' instead. 2011-01-14 16:39:41 +00:00
frosch
93ae848b0a (svn r21788) -Codechange: Enable GetRawSprite() to also load sprites not using the spritecache but a custom allocator function. 2011-01-14 16:36:34 +00:00
frosch
6cb017456a (svn r21787) -Codechange: Pass the allocator function to use to ReadSprite(). 2011-01-14 16:28:23 +00:00
smatz
c53c869556 (svn r21786) -Fix [FS#4398]: don't trust rail station width and height data stored by TTDPatch, it is invalid for stations wider or higher than 7 2011-01-14 16:20:25 +00:00
frosch
d811238dd0 (svn r21785) -Codechange: Make ReadSprite() not operate on the sprite chache directly. 2011-01-14 16:16:33 +00:00
smatz
ff469ab352 (svn r21784) -Fix (r16909): crash when converting savegame with custom waypoint name 2011-01-14 16:15:05 +00:00
frosch
ee67d10c80 (svn r21783) -Cleanup (r14997): Remove redundant assignment. 2011-01-14 16:09:51 +00:00
frosch
3d1008318b (svn r21782) -Codechange: Move declaration of AllocatorProc from Blitter:: to spritecache.h 2011-01-14 15:34:33 +00:00
planetmaker
09d7f172a6 (svn r21781) -Change: Make the description of the setting on how to obtain the tooltip a bit clearer 2011-01-14 14:54:29 +00:00
terkhen
28676531b0 (svn r21780) -Change: Keep aqueducts and road/tram tunnels and bridges after removing a company. 2011-01-14 13:19:23 +00:00
terkhen
1b237216a8 (svn r21779) -Cleanup(r21778): Remove unneeded space at the start of a line. 2011-01-14 12:46:05 +00:00
terkhen
eb2b510e01 (svn r21778) -Add: After building a road or tram tunnel, connect it to any existing road or tram. 2011-01-14 12:01:07 +00:00
terkhen
87dade4698 (svn r21777) -Add: After building a road or tram bridge, connect it to any existing road or tram. 2011-01-14 12:00:07 +00:00
terkhen
998246430a (svn r21776) -Codechange: Give a more appropriate name to the road connection function.
-Document: Add doxygen comments to the function.
2011-01-14 11:55:40 +00:00
alberth
e8e535f58c (svn r21775) -Add: Allow vertical resizing of the newobject gui. 2011-01-13 22:02:13 +00:00
alberth
ab91d8eb4f (svn r21774) -Change: Update the other languages too. 2011-01-13 22:01:42 +00:00
alberth
313654f18d (svn r21773) -Change: Remove the dropdown, and make BOW_OBJECT_LIST a list of newobject classes. 2011-01-13 21:59:39 +00:00
alberth
b1546da65e (svn r21772) -Feature: Add a clickable display of the available objects in the newobject gui. 2011-01-13 21:55:41 +00:00
translators
00f9a36645 (svn r21771) -Update from WebTranslator v3.0:
czech - 3 changes by CrazyBenny
marathi - 28 changes by jcravi
2011-01-13 18:45:10 +00:00
translators
0e802c462d (svn r21770) -Update from WebTranslator v3.0:
latvian - 135 changes by dzhins
portuguese - 4 changes by JayCity
serbian - 1 changes by etran
2011-01-12 18:45:13 +00:00
translators
49e191cc8e (svn r21769) -Update from WebTranslator v3.0:
latvian - 21 changes by dzhins
serbian - 8 changes by etran
swedish - 2 changes by Ledel
2011-01-11 18:45:13 +00:00
frosch
12b4fa7dba (svn r21768) -Fix [FS#4396]: Diagonal tile iterator needed a special case for A * 0 selections. 2011-01-11 16:45:45 +00:00
rubidium
7e6ccf3a0a (svn r21767) -Fix [FS#4397]: don't limit tile clearing during bankruptcy 2011-01-10 21:58:05 +00:00
translators
60874f88d0 (svn r21766) -Update from WebTranslator v3.0:
belarusian - 6 changes by KorneySan, Wowanxm
catalan - 1 changes by arnau
croatian - 1 changes by VoyagerOne
dutch - 1 changes by habell
estonian - 1 changes by notAbot
finnish - 1 changes by jpx_
french - 1 changes by glx
italian - 1 changes by lorenzodv
norwegian_bokmal - 6 changes by leaderroy
polish - 2 changes by amateja
russian - 1 changes by KorneySan
slovenian - 9 changes by ntadej
spanish - 1 changes by Terkhen
swedish - 3 changes by Ledel
ukrainian - 1 changes by Fixer
2011-01-10 18:45:51 +00:00
rubidium
4eb4aad54f (svn r21765) -Fix [FS#4369]: PBS reservation was not shown on road crossings with NewGRF railtypes (andythenorth) 2011-01-09 20:54:56 +00:00
frosch
57c6133c3b (svn r21764) -Change: Make the scrollbar associated to a NWidgetMatrix scroll in steps of the matrix when using the wheel or the scrollbar-buttons. 2011-01-09 20:40:35 +00:00
frosch
da09ebc59a (svn r21763) -Codechange: Pass the distance to Scrollbar::UpdatePosition() in units of small or big steps. 2011-01-09 20:39:06 +00:00
translators
beb7f63746 (svn r21762) -Update from WebTranslator v3.0:
english_US - 1 changes by Rubidium
hungarian - 1 changes by IPG
korean - 1 changes by junho2813
norwegian_bokmal - 21 changes by leaderroy
swedish - 1 changes by Ledel
2011-01-09 18:45:20 +00:00
frosch
91e95dfd53 (svn r21761) -Add: Wheel-scrolling in the new build station GUI. 2011-01-09 18:43:47 +00:00
alberth
352fd000ea (svn r21760) -Fix (r20452): Restore wheeling of vertical scrollbars. 2011-01-09 15:36:02 +00:00
alberth
f5364269b5 (svn r21759) -Codechange: Increase the initial horizontal size of the stationpicker slightly. 2011-01-09 15:34:58 +00:00
alberth
9d8496e65e (svn r21758) -Add: Allow vertical resizing of the stationpicker window. 2011-01-09 15:34:00 +00:00
alberth
3281b91c48 (svn r21757) -Codechange: Use a list instead of a dropdown for selecting the station classes. 2011-01-09 15:33:00 +00:00
alberth
0a16e4ee91 (svn r21756) -Add: Display name of the selected station type in the station picker window. 2011-01-09 15:31:14 +00:00
alberth
dbef775e76 (svn r21755) -Feature: Display newgrf station sprites during station picking. 2011-01-09 15:27:48 +00:00
alberth
d8567d2699 (svn r21754) -Codechange: Scroll the matrix widget to make a clicked entry fully visible. 2011-01-09 15:25:33 +00:00
alberth
ec54970058 (svn r21753) -Codechange: Use a widget for the coverage text, and re-init instead of resize to adapt for height changes. 2011-01-09 15:24:36 +00:00
alberth
bd72b9d2a4 (svn r21752) -Doc: document the stationpicker widgets and variables. 2011-01-09 15:22:39 +00:00
alberth
9845f10668 (svn r21751) -Fix: Re-initialize the stationpicker data when newgrf classes have disappeared. 2011-01-09 15:21:55 +00:00
rubidium
e898a6a9f6 (svn r21749) -Prepare: for 1.1.0-beta3 2011-01-09 15:14:22 +00:00
translators
63319e4658 (svn r21748) -Update from WebTranslator v3.0:
czech - 1 changes by SmatZ
norwegian_bokmal - 20 changes by leaderroy
2011-01-09 15:08:53 +00:00
rubidium
ade2f29f5d (svn r21747) -Fix [FS#4395]: the diagonal iterator would iterate twice over some tiles (fonsinchen) 2011-01-09 14:55:22 +00:00
frosch
35be634974 (svn r21746) -Fix: [NewGRF] Canal variable 83 accessed water random bits also for non-water tiles (e.g. watery industries or objects). 2011-01-09 13:53:57 +00:00
frosch
8ffc288901 (svn r21745) -Fix: [NewGRF] Canal variable 80 shall return consistent heights within a lock. 2011-01-09 13:53:05 +00:00
frosch
716f4e924e (svn r21744) -Fix: Allow Ctrl+Clicking automatic orders for scrolling to their destination. 2011-01-09 13:11:50 +00:00
rubidium
c8a4d122c5 (svn r21743) -Fix [FS#4386]: coast tiles weren't drawn under bridges 2011-01-09 12:17:52 +00:00
translators
2da2b57631 (svn r21742) -Update from WebTranslator v3.0:
german - 2 changes by planetmaker
swedish - 3 changes by Ledel
2011-01-08 18:45:10 +00:00
planetmaker
51b97aa3c1 (svn r21741) -Fix (r21668): Some white space slipped past the commit hook 2011-01-08 16:10:07 +00:00
translators
f420b5a66a (svn r21740) -Update from WebTranslator v3.0:
belarusian - 57 changes by Wowanxm
catalan - 9 changes by arnau
croatian - 1 changes by VoyagerOne
german - 8 changes by kaefer1993
swedish - 6 changes by spacejens
ukrainian - 11 changes by Fixer
vietnamese - 3 changes by nglekhoi
2011-01-07 18:45:24 +00:00
rubidium
e2ef4aff46 (svn r21739) -Fix [FS#4388] (r19657): make clearing refit orders work again 2011-01-07 12:45:12 +00:00
frosch
be106c77a9 (svn r21738) -Fix (r21642)[FS#4384]: Start loading when cur_order_index points to the destination station, i.e. after deleting not-reached automatic orders. 2011-01-06 22:27:56 +00:00
frosch
29a0dd65a9 (svn r21737) -Fix (r1)[FS#4384-ish]: A loading order was also marked as 'not part of orders' when the order before the current order was deleted. 2011-01-06 22:24:02 +00:00
translators
4863d934af (svn r21736) -Update from WebTranslator v3.0:
hungarian - 2 changes by IPG
polish - 2 changes by silver_777
russian - 9 changes by Lone_Wolf
swedish - 1 changes by Ledel
2011-01-06 18:45:17 +00:00
translators
c597237032 (svn r21735) -Update from WebTranslator v3.0:
croatian - 7 changes by VoyagerOne
dutch - 7 changes by Hyronymus, habell
english_US - 7 changes by Rubidium
estonian - 42 changes by notAbot
finnish - 7 changes by jpx_
french - 7 changes by glx
german - 1 changes by planetmaker
hungarian - 8 changes by IPG
irish - 4 changes by tem
italian - 8 changes by lorenzodv
korean - 1 changes by junho2813
polish - 7 changes by amateja
spanish - 81 changes by Terkhen
2011-01-05 18:45:43 +00:00
smatz
ce9a7acc8f (svn r21734) -Change: use 'landscaping' instead of 'terraforming' in the English lang file (peter1138) 2011-01-05 12:39:50 +00:00
terkhen
03088dadda (svn r21733) -Codechange: Clarify the update owner legend code.
-Fix: Prevent crashes caused by deleted companies.
2011-01-05 11:04:29 +00:00
rubidium
68412eebec (svn r21732) -Fix (r21728): show the "proper" error that the landscaping limit is reached instead of "already flat" 2011-01-05 08:33:21 +00:00
rubidium
4cc2d71d6d (svn r21731) -Fix (r21728): don't forget to update the saveload version, or to check for MSVC warnings 2011-01-05 07:57:10 +00:00
terkhen
b890bcb840 (svn r21730) -Fix (r21718): The smallmap owner legend would not be properly initialized in games without companies. 2011-01-04 22:59:42 +00:00
terkhen
0b27228d9a (svn r21729) -Fix (r21718, r21720): In some cases clicking on a industry/company legend entry would not work. 2011-01-04 22:56:56 +00:00
rubidium
eab47d2227 (svn r21728) -Fix/Feature [FS#4331]: (configurably) limit amount of tiles that can be cleared/terraformed by a company 2011-01-04 22:50:09 +00:00
rubidium
7dafd04f4b (svn r21727) -Fix [FS#4377]: admin bots weren't always notified of password changes (dihedral) 2011-01-04 22:28:02 +00:00
terkhen
ace917f872 (svn r21726) -Add: Allow to toggle height visualization in the owner view of the smallmap. 2011-01-04 21:03:57 +00:00
terkhen
995e80ba57 (svn r21725) -Cleanup: Remove unused owner code. 2011-01-04 21:03:01 +00:00
terkhen
aac2289bf8 (svn r21724) -Change: Do not reset the "Show height" state after closing the smallmap window. 2011-01-04 21:02:10 +00:00
terkhen
38ed740e80 (svn r21723) -Add: Enable/Disable all buttons to the owner view of the smallmap. 2011-01-04 21:01:29 +00:00
terkhen
bf45eacd97 (svn r21722) -Update: String names on other translations. 2011-01-04 21:00:45 +00:00
terkhen
7e6e7a6737 (svn r21721) -Codechange: Rename the smallmap button panel and its strings. 2011-01-04 20:59:41 +00:00
terkhen
b621e4545c (svn r21720) -Feature: Allow to toggle visualization of company property in the owner view of the smallmap. 2011-01-04 20:58:42 +00:00
terkhen
4f1e96acf1 (svn r21719) -Doc: Correct a doxygen comment. 2011-01-04 20:58:07 +00:00
terkhen
2103f7e91a (svn r21718) -Feature: Show a list of companies in the owner legend. 2011-01-04 20:57:11 +00:00
terkhen
e4b8a4e3bf (svn r21717) -Codechange: Unify smallmap functions for getting the legend height. 2011-01-04 20:56:00 +00:00
terkhen
ebb360f48c (svn r21716) -Add: Tooltip for the industry legend at the smallmap. 2011-01-04 20:54:36 +00:00
terkhen
5268d03abd (svn r21715) -Fix: Use the correct land colour in the owner legend. 2011-01-04 20:53:57 +00:00
rubidium
73d26d3831 (svn r21714) -Codechange: unduplicate a bit of code path 2011-01-04 20:33:22 +00:00
translators
017a7f902b (svn r21713) -Update from WebTranslator v3.0:
estonian - 7 changes by notAbot
marathi - 2 changes by jaguarnac
romanian - 4 changes by kkmic
swedish - 1 changes by spacejens
2011-01-04 18:45:13 +00:00
michi_cc
868d035b45 (svn r21712) -Change: Tune 'realistic' acceleration even more to make more trains reach their top speed. 2011-01-04 18:12:28 +00:00
frosch
6a38f88bd1 (svn r21711) -Change: Display the minimal height of the tile in the LandInfo window instead of the height of the northern corner. So it is more useful for NewGRF and AI developers, and maybe more transparent for players. 2011-01-04 13:58:14 +00:00
1b61d234a1 (svn r21710) -Fix (r8128): Update oldloader for change in vehicle cur_image size. 2011-01-04 12:22:27 +00:00
3408814169 (svn r21709) -Fix (r8128): Vehicle sprite was cached into a 16 bit variable, causing incorrect sprites to be displayed. 2011-01-04 12:04:09 +00:00
frosch
d9305ef99d (svn r21708) -Add: [NewGRF] Report TTDPatch flag 4A (newobjects) as set. 2011-01-04 11:06:39 +00:00
rubidium
80591d73c1 (svn r21707) -Fix [FS#4371]: bit too strict assertion on validness of console colours 2011-01-03 20:54:20 +00:00
rubidium
b68d37f2aa (svn r21706) -Fix-ish [FS#4370]: the old ship pathfinder is too stupid to provide "lost" notices; it would even get lost while following it's own path 2011-01-03 20:25:11 +00:00
translators
7daf2a4ec0 (svn r21705) -Update from WebTranslator v3.0:
catalan - 5 changes by arnau
croatian - 2 changes by VoyagerOne
dutch - 2 changes by Yexo
german - 1 changes by planetmaker
korean - 1 changes by junho2813
polish - 2 changes by amateja
russian - 1 changes by Lone_Wolf
serbian - 1 changes by etran
spanish - 3 changes by Terkhen
swedish - 1 changes by Ledel
2011-01-03 18:45:34 +00:00
smatz
810873ff33 (svn r21704) -Fix [FS#4374]: no need to perform any more checks after the connection is closed (Rubidium) 2011-01-03 18:36:51 +00:00
yexo
8e3e93b96f (svn r21703) -Feature [FS#4372]: list_ai_libs console command to get a list of recognized AI libraries (dihedral) 2011-01-03 14:52:30 +00:00
rubidium
37b9c31118 (svn r21702) -Fix: make sure the colour argument of echoc is properly validated to be a text colour 2011-01-03 12:04:53 +00:00
rubidium
b25cf57542 (svn r21701) -Codechange: ConsoleColour = TextColour, so make it that way and remove some unneeded casts 2011-01-03 12:01:41 +00:00
rubidium
1c2d56d314 (svn r21700) -Codechange: GetDrawStringCompanyColour returns a TextColour 2011-01-03 11:55:08 +00:00
translators
6b5992788c (svn r21699) -Update from WebTranslator v3.0:
english_US - 2 changes by Rubidium
finnish - 1 changes by jpx_
french - 1 changes by glx
indonesian - 62 changes by fanioz
italian - 1 changes by lorenzodv
norwegian_nynorsk - 3 changes by 2rB
turkish - 2 changes by niw3
2011-01-02 18:45:24 +00:00
rubidium
ad15cd37a6 (svn r21698) -Fix: incorrectly named global variable 2011-01-02 18:12:39 +00:00
yexo
4ec6c19d44 (svn r21697) -Codechange: use GetGameSettings() in a few more places to enhance readability 2011-01-02 12:52:37 +00:00
yexo
b22945350f (svn r21696) -Feature [FS#4362]: allow changing the AI configuration in the scenario editor / in game 2011-01-02 12:41:24 +00:00
yexo
3ca65ab7b3 (svn r21695) -Codechange: add helper function to get the currently applicable GameSettings object 2011-01-02 00:34:21 +00:00
yexo
a25d6c64dd (svn r21694) -Fix: changing AI settings ingame was impossible when the difficulty level was other than custom 2011-01-01 23:26:26 +00:00
smatz
c6a90361fc (svn r21693) -Codechange: no need to cast char[] to const uint8* 2011-01-01 21:41:01 +00:00
smatz
8b6a8a8935 (svn r21692) -Cleanup: remove unused extern declaration of HashCurrentCompanyPassword(), make it static 2011-01-01 21:39:52 +00:00
smatz
13456934b1 (svn r21691) -Codechange: make sure GenerateCompanyPasswordHash() behaves deterministically when/if the value of NETWORK_SERVER_ID_LENGTH is changed 2011-01-01 21:38:13 +00:00
yexo
7814e6e792 (svn r21690) -Fix: the top of a tall building standing on a hill at the top of the map could be cut off in a giant screenshot 2011-01-01 21:15:50 +00:00
translators
2d17f09902 (svn r21689) -Update from WebTranslator v3.0:
traditional_chinese - 73 changes by josesun
italian - 1 changes by lorenzodv
serbian - 1 changes by etran
2011-01-01 18:45:13 +00:00
smatz
cae28bf8eb (svn r21688) -Codechange: verify the colour code passed to IConsolePrint()/IConsolePrintF() is valid 2011-01-01 17:06:59 +00:00
smatz
666fbb28c2 (svn r21687) -Fix: verify the colour code we received from the server is valid 2011-01-01 17:02:29 +00:00
smatz
62bc55cf7b (svn r21686) -Cleanup: remove unused constants and comment used ones 2011-01-01 16:35:32 +00:00
rubidium
36f55a8823 (svn r21685) -Codechange: prevent bug tracker entries like FS#2487 and FS#1613 for this year 2011-01-01 08:31:23 +00:00
planetmaker
9ddcbaf9b7 (svn r21684) -Fix [FS#4360] (r21573): Silence some compile warnings 2011-01-01 08:23:46 +00:00
translators
675f1376e0 (svn r21683) -Update from WebTranslator v3.0:
hungarian - 1 changes by IPG
russian - 3 changes by Lone_Wolf
2010-12-31 18:45:11 +00:00
rubidium
f1a4bad7f7 (svn r21682) -Fix: Debian changelog was incorrect, so .deb compilation failed 2010-12-31 18:14:05 +00:00
glx
aa7a587ca3 (svn r21680) -Fix (r21656): of course MSVC complains 2010-12-31 16:13:34 +00:00
rubidium
64c7cc51b5 (svn r21679) -Fix (r21642): reading a just freed variable 2010-12-31 15:53:46 +00:00
yexo
582472d626 (svn r21678) -Update: use 'Ctrl+klik' instead of 'Ctrl+Klik' in the Dutch translation 2010-12-31 14:16:25 +00:00
rubidium
41015b877d (svn r21677) -Fix: WT3 not validating some strings... 2010-12-31 14:12:35 +00:00
planetmaker
fe6080650c (svn r21676) -Prepare 1.1.0-beta2 2010-12-31 14:08:21 +00:00
translators
b46aee796b (svn r21675) -Update from WebTranslator v3.0:
czech - 3 changes by SmatZ
dutch - 12 changes by Yexo
english_US - 1 changes by Rubidium
estonian - 138 changes by notAbot
finnish - 5 changes by jpx_
french - 1 changes by glx
german - 3 changes by planetmaker
polish - 135 changes by amateja
spanish - 1 changes by Terkhen
vietnamese - 3 changes by sephiroth2m
2010-12-31 14:05:25 +00:00
rubidium
1d47e0a4d2 (svn r21674) -Fix: for Mac OS X %p seems to add "x0", so filter that out for the regression test comparison 2010-12-31 12:13:16 +00:00
smatz
4a0ce4bb14 (svn r21673) -Change [FS#4358]: do not show price to build a bridge in the scenario editor, it is free there 2010-12-31 10:15:35 +00:00
rubidium
e166a0eaed (svn r21672) -Fix: mention AIEventTownFounded in the AI changelog as well 2010-12-31 09:43:42 +00:00
rubidium
65e04c8a38 (svn r21671) -Change: some changelog consistency fixes 2010-12-31 09:25:52 +00:00
rubidium
6cf67eff15 (svn r21670) -Fix (prospective): EEK->EUR@2011 2010-12-31 09:09:40 +00:00
translators
4f4f9a1e4e (svn r21669) -Update from WebTranslator v3.0:
simplified_chinese - 6 changes by ww9980
greek - 10 changes by fumantsu
2010-12-30 18:47:31 +00:00
rubidium
6546561360 (svn r21668) -Feature: command logging using the admin interface (dihedral) 2010-12-30 18:14:37 +00:00
alberth
661e13a86a (svn r21667) -Codechange: Introduce _thd.Reset(). 2010-12-30 15:32:31 +00:00
alberth
cedb07bba3 (svn r21666) -Codechange: Use GetCallbackWnd at more places. 2010-12-30 13:18:04 +00:00
alberth
22a13850cb (svn r21665) -Codechange: Make GetCallbackWnd a method of _thd. 2010-12-30 13:16:31 +00:00
yexo
703ff560c1 (svn r21664) -Add: [NoAI] AIEventTownFounded 2010-12-29 23:44:39 +00:00
yexo
5b25e620dd (svn r21663) -Add: [NoAI]: AIRail::GetName() to get the name of a railtype 2010-12-29 23:20:12 +00:00
smatz
c986325763 (svn r21662) -Codechange: use -flto=jobserver for GCC 4.6, it makes linking with LTO use number of processes passed to make -j 2010-12-29 20:46:35 +00:00
smatz
14d8ef9add (svn r21661) -Codechange: use -fwhole-program when linking in LTO mode so compiler can do more optimisations 2010-12-29 20:20:41 +00:00
rubidium
83d7634122 (svn r21660) -Fix [FS#4354]: autofill timetable had side effects in test mode, possibly causing desyncs in MP 2010-12-29 20:20:38 +00:00
translators
affd8b9d7b (svn r21659) -Update from WebTranslator v3.0:
hungarian - 6 changes by IPG
indonesian - 9 changes by fanioz
italian - 3 changes by lorenzodv
malay - 24 changes by rionix88
norwegian_bokmal - 5 changes by Utvik
romanian - 130 changes by tonny
2010-12-29 18:45:21 +00:00
rubidium
cea92937eb (svn r21658) -Fix [FS#4351]: cargo payment window wasn't properly invalidated when payment changed 2010-12-29 18:20:19 +00:00
smatz
e7971c2971 (svn r21657) -Cleanup (r17107): remove superfluous semicolon 2010-12-29 13:47:53 +00:00
planetmaker
6331923653 (svn r21656) -Fix [FS#4345] (r3722, r15301): Use a bool instead of uint8 to store a bool and use the dedicated accessor function when reading boolean settings (glx, rubidium) 2010-12-29 13:32:35 +00:00
yexo
bfc386fe10 (svn r21655) -Add: mention AITown::IsCity in the NoAI changelog 2010-12-29 12:41:01 +00:00
yexo
399a9641fe (svn r21654) -Add: [NoAI] AITown::IsCity() so AIs can find out which towns grow faster than others (Lord Aro) 2010-12-29 12:19:33 +00:00
translators
0d613156e7 (svn r21653) -Update from WebTranslator v3.0:
catalan - 2 changes by arnau
english_US - 6 changes by Rubidium
esperanto - 13 changes by Christopher
estonian - 35 changes by notAbot
french - 8 changes by glx
japanese - 63 changes by dchou
serbian - 76 changes by etran
spanish - 6 changes by Terkhen
swedish - 48 changes by Zuu
turkish - 11 changes by niw3
2010-12-28 18:45:33 +00:00
smatz
aa4f269f3e (svn r21652) -Cleanup: one semicolon is enough 2010-12-28 14:22:51 +00:00
rubidium
ade19e5242 (svn r21651) -Fix [FS#4338] (r21229): infinite loop in the road pathfinder due to bouncing around in an "one way" trap; two one ways pointing towards eachother making it impossible to leave 2010-12-27 22:32:47 +00:00
rubidium
639e22b83b (svn r21650) -Fix [FS#4339]: make "centre [main] view" consistent, and make "[main|global] view" consistent 2010-12-27 21:10:52 +00:00
translators
f3292c304a (svn r21649) -Update from WebTranslator v3.0:
belarusian - 2 changes by KorneySan
dutch - 34 changes by Hirundo, Hyronymus
esperanto - 2 changes by Christopher
malay - 12 changes by rionix88
marathi - 100 changes by jaguarnac
russian - 2 changes by KorneySan
serbian - 2 changes by etran
2010-12-27 18:45:24 +00:00
rubidium
b98c758e0b (svn r21648) -Codechange: unduplicate a bit of code 2010-12-27 18:21:19 +00:00
rubidium
744616bb36 (svn r21647) -Fix: failure of WT3 to properly validate some string... 2010-12-26 19:26:48 +00:00
translators
9858065ff9 (svn r21646) -Update from WebTranslator v3.0:
croatian - 2 changes by VoyagerOne
english_US - 2 changes by Rubidium
finnish - 2 changes by jpx_
greek - 91 changes by fumantsu
hungarian - 2 changes by IPG
italian - 3 changes by lorenzodv
brazilian_portuguese - 58 changes by Ic3cold
slovenian - 2 changes by ntadej
spanish - 2 changes by Terkhen
swedish - 18 changes by Ledel
2010-12-26 18:45:33 +00:00
alberth
8282b66b70 (svn r21645) -Doc: Document SmallPair and SmallMap template parameters. 2010-12-26 17:47:00 +00:00
rubidium
28f16a732f (svn r21644) -Change: keep showing "No orders" when the order list is filled with only automatic orders 2010-12-26 13:25:34 +00:00
rubidium
b06b05c360 (svn r21643) -Fix (r21642): crash when a train with no orders (or actually no order list) stops at a station 2010-12-26 12:55:12 +00:00
rubidium
64f04c3a74 (svn r21642) -Feature: concept of automatic station orders; add stub orders for intermediate stations and remove them when not visiting them anymore. This allows you to see what trains visit a station without actually having to order a vehicle to stop at all stations. Based on patch by fonsinchen 2010-12-26 09:03:19 +00:00
rubidium
8a278f7711 (svn r21641) -Fix (r21639): ofcourse MSVC wants to have something to warn about 2010-12-26 06:52:38 +00:00
rubidium
9b2a54bfbf (svn r21640) -Change/Feature-ish: allow disabling the shading when drawing text 2010-12-25 20:02:04 +00:00
rubidium
1d21903eb4 (svn r21639) -Codechange: simplify setting the colour remap 2010-12-25 19:59:56 +00:00
alberth
d2564a3e56 (svn r21638) -Codechange (r1): Simplify testing that outersize.x is bigger than 0. 2010-12-25 19:58:50 +00:00
rubidium
2c41b8ee97 (svn r21637) -Codechange: make it more clear that IS_PALETTE_COLOUR belongs to TextColour 2010-12-25 19:47:15 +00:00
translators
13c5cd820b (svn r21636) -Update from WebTranslator v3.0:
esperanto - 10 changes by Christopher
polish - 6 changes by wojteks86
slovenian - 1 changes by ntadej
turkish - 3 changes by niw3
2010-12-25 18:45:16 +00:00
rubidium
091cc85a18 (svn r21635) -Change: simplify/reduce release preparations/changes 2010-12-25 15:41:12 +00:00
rubidium
2c4c6b4fe1 (svn r21634) -Codechange: apparantly the "broken" iconv interface is the new official interface, so update the variable/definition naming slightly as it's not broken just different from the earlier iconv interface 2010-12-25 12:49:36 +00:00
smatz
d8b823142e (svn r21633) -Fix (r21616): newly created skip-to order was created at wrong place 2010-12-25 12:48:23 +00:00
smatz
b5268dccbd (svn r21632) -Codechange: call ResetObjectToPlace() even when current place_mode is HT_NONE 2010-12-25 12:47:05 +00:00
rubidium
b323000253 (svn r21631) -Fix [FS#4325]: ships with the old pathfinder would easily show up as lost, even when it would eventually find a path. Now also the distance from the "end" of the pathfinding run to the destination is compared to the current distance to the destination; if the distance to the destination at the end of the pathfinder run is less than the current distance from the destination the ship won't be marked as lost. This means that the ships with the old pathfinder will less likely get marked as lost, but due to the design of the old ship pathfinder there "lostness" is merely a best guess. When you still get a lost message 2010-12-25 12:20:18 +00:00
rubidium
7cce507443 (svn r21630) -Fix (r20308, r21615): version detection of subversion branches and tags got broken 2010-12-25 08:22:55 +00:00
translators
2ebd4c62bc (svn r21629) -Update from WebTranslator v3.0:
belarusian - 71 changes by KorneySan
czech - 56 changes by SmatZ
danish - 9 changes by Gummipalle
dutch - 61 changes by Hirundo
esperanto - 36 changes by Christopher
marathi - 188 changes by jaguarnac
portuguese - 15 changes by SupSuper
russian - 3 changes by KorneySan
ukrainian - 1 changes by Fixer
2010-12-24 18:45:31 +00:00
alberth
96906c1a45 (svn r21628) -Codechange: Remove local variables that just point to global _thd. 2010-12-24 17:51:46 +00:00
alberth
852e647bcc (svn r21627) -Codechange: Remove _place_proc global variable. 2010-12-24 15:08:19 +00:00
alberth
9a5cce382f (svn r21626) -Codechange: Remove more small static functions. 2010-12-24 15:06:58 +00:00
alberth
62f2771edd (svn r21625) -Codechange: Record last started highlight action, and use it in the callback methods. 2010-12-24 15:06:18 +00:00
alberth
d28d469b7a (svn r21624) -Codechange: Remove many small static functions. 2010-12-24 15:04:33 +00:00
alberth
d9405a0bcc (svn r21623) -Codechange: Remove _terraform_button_proc and _editor_terraform_button_proc arrays. 2010-12-24 15:03:19 +00:00
alberth
479d117c68 (svn r21622) -Doc: Clarify the documentation of highlighting constants somewhat. 2010-12-24 14:56:21 +00:00
alberth
9cdd8c6d48 (svn r21621) -Codechange: Only consider tile highlighting mode bits in tile selection functions. 2010-12-24 14:55:31 +00:00
alberth
e930b9985d (svn r21620) -Codechange: Don't consider direction bits when checking for an active highlight mode. 2010-12-24 14:52:42 +00:00
alberth
cdae336feb (svn r21619) -Fix [FS#4327]: Don't copy direction bits when restarting a rail selection. 2010-12-24 14:48:38 +00:00
alberth
c5ce84267a (svn r21618) -Fix: Use correct 3 bit mask for directions. 2010-12-24 14:38:00 +00:00
smatz
fffb8f89a4 (svn r21617) -Doc: refer to table/autorail.h, not autorail.h 2010-12-24 13:14:11 +00:00
smatz
889c8d3022 (svn r21616) -Change: do not highlight tile when selecting a vehicle to clone or an order to skip to 2010-12-24 13:13:28 +00:00
545 changed files with 17386 additions and 12136 deletions

View File

@@ -27,9 +27,21 @@ 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)/Release/$(TTD) $(BIN_DIR)/$(TTD)
$(Q)cp objs/$(TARGET)/$(MODE)/$(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

View File

@@ -256,9 +256,9 @@ ifeq ($(OS), PSP)
# Because of a bug in the PSP GCC tools, linking via CXX results
# in total chaos and more problems then you can handle. So we need
# CC to link OpenTTD for PSP
$(Q)$(CC_HOST) $(LDFLAGS) $(OBJS) $(LIBS) -o $@
$(Q)+$(CC_HOST) $(LDFLAGS) $(OBJS) $(LIBS) -o $@
else
$(Q)$(CXX_HOST) $(LDFLAGS) $(OBJS) $(LIBS) -o $@
$(Q)+$(CXX_HOST) $(LDFLAGS) $(OBJS) $(LIBS) -o $@
endif
ifdef STRIP
$(Q)$(STRIP) $@

View File

@@ -319,3 +319,5 @@ AIIndustry.IsCargoAccepted <- function(industry_id, cargo_id)
AIAbstractList <- AIList;
AIList.ChangeItem <- AIList.SetValue;
AIRail.ERR_NONUNIFORM_STATIONS_DISABLED <- 0xFFFF;

View File

@@ -70,3 +70,5 @@ AIIndustry.IsCargoAccepted <- function(industry_id, cargo_id)
AIAbstractList <- AIList;
AIList.ChangeItem <- AIList.SetValue;
AIRail.ERR_NONUNIFORM_STATIONS_DISABLED <- 0xFFFF;

View File

@@ -15,3 +15,6 @@ regression =
[vehicle]
road_side = right
plane_speed = 2
[construction]
max_bridge_length = 100

View File

@@ -1028,6 +1028,7 @@ function Regression::RailTypeList()
print(" ListDump:");
for (local i = list.Begin(); !list.IsEnd(); i = list.Next()) {
print(" RailType: " + i);
print(" GetName(): " + AIRail.GetName(i));
print(" IsRailTypeAvailable(): " + AIRail.IsRailTypeAvailable(i));
print(" GetMaxSpeed(): " + AIRail.GetMaxSpeed(i));
}
@@ -1477,6 +1478,7 @@ function Regression::Town()
print(" GetLocation(): " + AITown.GetLocation(i));
print(" GetHouseCount(): " + AITown.GetHouseCount(i));
print(" GetRating(): " + AITown.GetRating(i, AICompany.COMPANY_SELF));
print(" IsCity(): " + AITown.IsCity(i));
}
print(" Valid Towns: " + j);
print(" GetTownCount(): " + AITown.GetTownCount());

View File

@@ -7108,7 +7108,7 @@ ERROR: IsEnd() is invalid as Begin() is never called
IsBuoyTile(): true
IsLockTile(): true
IsCanalTile(): true
GetBankBalance(): 461507
GetBankBalance(): 465257
--AIWaypointList(BUOY)--
Count(): 1
@@ -7127,7 +7127,7 @@ ERROR: IsEnd() is invalid as Begin() is never called
IsBuoyTile(): false
IsLockTile(): false
IsCanalTile(): false
GetBankBalance(): 456112
GetBankBalance(): 459862
BuildWaterDepot(): true
BuildDock(): true
@@ -7209,6 +7209,7 @@ ERROR: IsEnd() is invalid as Begin() is never called
Count(): 1
ListDump:
RailType: 0
GetName(): Railway construction
IsRailTypeAvailable(): true
GetMaxSpeed(): 0
@@ -7980,6 +7981,7 @@ ERROR: IsEnd() is invalid as Begin() is never called
GetLocation(): 15508
GetHouseCount(): 30
GetRating(): 0
IsCity(): true
Town 1
IsValidTown(): true
GetName(): Trenningville
@@ -7987,6 +7989,7 @@ ERROR: IsEnd() is invalid as Begin() is never called
GetLocation(): 46751
GetHouseCount(): 17
GetRating(): 0
IsCity(): false
Town 2
IsValidTown(): true
GetName(): Tonston
@@ -7994,6 +7997,7 @@ ERROR: IsEnd() is invalid as Begin() is never called
GetLocation(): 28365
GetHouseCount(): 19
GetRating(): 0
IsCity(): false
Town 3
IsValidTown(): true
GetName(): Tunford
@@ -8001,6 +8005,7 @@ ERROR: IsEnd() is invalid as Begin() is never called
GetLocation(): 41895
GetHouseCount(): 11
GetRating(): 0
IsCity(): false
Town 4
IsValidTown(): true
GetName(): Wruntown
@@ -8008,6 +8013,7 @@ ERROR: IsEnd() is invalid as Begin() is never called
GetLocation(): 41450
GetHouseCount(): 18
GetRating(): 0
IsCity(): true
Town 5
IsValidTown(): true
GetName(): Fratston
@@ -8015,6 +8021,7 @@ ERROR: IsEnd() is invalid as Begin() is never called
GetLocation(): 55007
GetHouseCount(): 11
GetRating(): 0
IsCity(): false
Town 6
IsValidTown(): true
GetName(): Muningville
@@ -8022,6 +8029,7 @@ ERROR: IsEnd() is invalid as Begin() is never called
GetLocation(): 38200
GetHouseCount(): 28
GetRating(): 0
IsCity(): false
Town 7
IsValidTown(): true
GetName(): Hutford
@@ -8029,6 +8037,7 @@ ERROR: IsEnd() is invalid as Begin() is never called
GetLocation(): 59234
GetHouseCount(): 33
GetRating(): 0
IsCity(): false
Town 8
IsValidTown(): true
GetName(): Satown
@@ -8036,6 +8045,7 @@ ERROR: IsEnd() is invalid as Begin() is never called
GetLocation(): 51267
GetHouseCount(): 20
GetRating(): 0
IsCity(): true
Town 9
IsValidTown(): true
GetName(): Frindinghattan
@@ -8043,6 +8053,7 @@ ERROR: IsEnd() is invalid as Begin() is never called
GetLocation(): 5825
GetHouseCount(): 18
GetRating(): 0
IsCity(): false
Town 10
IsValidTown(): true
GetName(): Nuntburg
@@ -8050,6 +8061,7 @@ ERROR: IsEnd() is invalid as Begin() is never called
GetLocation(): 6446
GetHouseCount(): 26
GetRating(): 6
IsCity(): false
Town 11
IsValidTown(): true
GetName(): Fort Frindston
@@ -8057,6 +8069,7 @@ ERROR: IsEnd() is invalid as Begin() is never called
GetLocation(): 14935
GetHouseCount(): 13
GetRating(): 0
IsCity(): false
Town 12
IsValidTown(): true
GetName(): Gintborough
@@ -8064,6 +8077,7 @@ ERROR: IsEnd() is invalid as Begin() is never called
GetLocation(): 32740
GetHouseCount(): 28
GetRating(): 0
IsCity(): true
Town 13
IsValidTown(): true
GetName(): Great Hinninghall
@@ -8071,6 +8085,7 @@ ERROR: IsEnd() is invalid as Begin() is never called
GetLocation(): 9595
GetHouseCount(): 14
GetRating(): 0
IsCity(): false
Town 14
IsValidTown(): true
GetName(): Prundinghall
@@ -8078,6 +8093,7 @@ ERROR: IsEnd() is invalid as Begin() is never called
GetLocation(): 51298
GetHouseCount(): 18
GetRating(): 0
IsCity(): false
Town 15
IsValidTown(): true
GetName(): Beningville
@@ -8085,6 +8101,7 @@ ERROR: IsEnd() is invalid as Begin() is never called
GetLocation(): 42338
GetHouseCount(): 33
GetRating(): 6
IsCity(): false
Town 16
IsValidTown(): true
GetName(): Kennville
@@ -8092,6 +8109,7 @@ ERROR: IsEnd() is invalid as Begin() is never called
GetLocation(): 17345
GetHouseCount(): 33
GetRating(): 0
IsCity(): true
Town 17
IsValidTown(): true
GetName(): Quarfingfield
@@ -8099,6 +8117,7 @@ ERROR: IsEnd() is invalid as Begin() is never called
GetLocation(): 24252
GetHouseCount(): 13
GetRating(): 0
IsCity(): false
Town 18
IsValidTown(): true
GetName(): Nefingbridge
@@ -8106,6 +8125,7 @@ ERROR: IsEnd() is invalid as Begin() is never called
GetLocation(): 10574
GetHouseCount(): 13
GetRating(): 0
IsCity(): false
Town 19
IsValidTown(): true
GetName(): Mendston
@@ -8113,6 +8133,7 @@ ERROR: IsEnd() is invalid as Begin() is never called
GetLocation(): 6511
GetHouseCount(): 14
GetRating(): 0
IsCity(): false
Town 20
IsValidTown(): true
GetName(): Chenfingbourne
@@ -8120,6 +8141,7 @@ ERROR: IsEnd() is invalid as Begin() is never called
GetLocation(): 22585
GetHouseCount(): 15
GetRating(): 6
IsCity(): true
Town 21
IsValidTown(): true
GetName(): Franinghead
@@ -8127,6 +8149,7 @@ ERROR: IsEnd() is invalid as Begin() is never called
GetLocation(): 9634
GetHouseCount(): 27
GetRating(): 0
IsCity(): false
Town 22
IsValidTown(): true
GetName(): Natborough
@@ -8134,6 +8157,7 @@ ERROR: IsEnd() is invalid as Begin() is never called
GetLocation(): 51891
GetHouseCount(): 12
GetRating(): 0
IsCity(): false
Town 23
IsValidTown(): true
GetName(): Larborough
@@ -8141,6 +8165,7 @@ ERROR: IsEnd() is invalid as Begin() is never called
GetLocation(): 59622
GetHouseCount(): 27
GetRating(): 0
IsCity(): false
Town 24
IsValidTown(): true
GetName(): Little Frutford
@@ -8148,6 +8173,7 @@ ERROR: IsEnd() is invalid as Begin() is never called
GetLocation(): 19596
GetHouseCount(): 34
GetRating(): 4
IsCity(): true
Town 25
IsValidTown(): true
GetName(): Grinnway
@@ -8155,6 +8181,7 @@ ERROR: IsEnd() is invalid as Begin() is never called
GetLocation(): 16433
GetHouseCount(): 15
GetRating(): 0
IsCity(): false
Town 26
IsValidTown(): true
GetName(): Beburg
@@ -8162,6 +8189,7 @@ ERROR: IsEnd() is invalid as Begin() is never called
GetLocation(): 39505
GetHouseCount(): 18
GetRating(): 0
IsCity(): false
Town 27
IsValidTown(): true
GetName(): Fudhattan
@@ -8169,6 +8197,7 @@ ERROR: IsEnd() is invalid as Begin() is never called
GetLocation(): 45525
GetHouseCount(): 19
GetRating(): 0
IsCity(): false
Valid Towns: 28
GetTownCount(): 28

View File

@@ -25,9 +25,10 @@ fi
if [ -n "$gdb" ]; then
$gdb ./openttd -x -c ai/regression/regression.cfg $params -g ai/regression/regression.sav
else
./openttd -x -c ai/regression/regression.cfg $params -g ai/regression/regression.sav -d ai=2 2>&1 | awk '{ gsub("0x(\\(nil\\)|0+)", "0x00000000", $0); gsub("^dbg: \\[ai\\]", "", $0); gsub("^ ", "ERROR: ", $0); gsub("ERROR: \\[1\\] ", "", $0); gsub("\\[P\\] ", "", $0); print $0; }' > tmp.regression
./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
@@ -35,6 +36,7 @@ if [ -z "$gdb" ]; then
else
echo "Regression test failed! Difference:"
echo "$res"
ret=1
fi
echo ""
echo "Regression test done"
@@ -49,3 +51,5 @@ fi
if [ "$1" != "-k" ]; then
rm -f tmp.regression
fi
exit $ret

Binary file not shown.

Binary file not shown.

View File

@@ -55,7 +55,7 @@ TRGI.GRF = da6a6c9dcc451eec88d79211437b76a8
TRGC.GRF = ed446637e034104c5559b32c18afe78d
TRGH.GRF = ee6616fb0e6ef6b24892c58c93d86fc9
TRGT.GRF = e30e8a398ae86c03dc534a8ac7dfb3b6
OPENTTD.GRF = e67a3aaf13b81bab5d72d7440244e20c
OPENTTD.GRF = 768051d1eb451c682d6f4e936a89caa5
[origin]
default = You can find it on your Transport Tycoon Deluxe CD-ROM.

View File

@@ -55,7 +55,7 @@ TRGI.GRF = da6a6c9dcc451eec88d79211437b76a8
TRGC.GRF = ed446637e034104c5559b32c18afe78d
TRGH.GRF = ee6616fb0e6ef6b24892c58c93d86fc9
TRGT.GRF = fcde1d7e8a74197d72a62695884b909e
OPENTTD.GRF = e67a3aaf13b81bab5d72d7440244e20c
OPENTTD.GRF = 768051d1eb451c682d6f4e936a89caa5
[origin]
default = You can find it on your Transport Tycoon Deluxe CD-ROM.

View File

@@ -55,7 +55,7 @@ TRGIR.GRF = 0c2484ff6be49fc63a83be6ab5c38f32
TRGCR.GRF = 3668f410c761a050b5e7095a2b14879b
TRGHR.GRF = 06bf2b7a31766f048baac2ebe43457b1
TRGTR.GRF = de53650517fe661ceaa3138c6edb0eb8
OPENTTD.GRF = e67a3aaf13b81bab5d72d7440244e20c
OPENTTD.GRF = 768051d1eb451c682d6f4e936a89caa5
[origin]
default = You can find it on your Transport Tycoon Deluxe CD-ROM.

View File

@@ -1,3 +1,313 @@
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)
- Feature: [Network] Console command to change the password of other companies for servers [FS#4368] (r21855)
- Feature: [NewGRF] Introduction dates/required types for rail types; e.g. introduce a particular rail type in 1960 (or when a vehicle using it is introduced), but also allow limiting its introduction to only happen when the required railtypes are available [FS#4393] (r21842)
- Feature: Limit vehicle lateness to the length of a full timetable cycle, e.g. when a cycle takes 50 days and the vehicle is 65 days later reduce the lateness to 15 days (r21832)
- Feature: After building a road or tram bridge/tunnel, connect it to any existing road or tram (r21778, r21777)
- Feature: Display NewGRF object sprites during object picking (r21772)
- Feature: Display NewGRF station sprites during station picking (r21755)
- Change: Allow LMB scrolling with the mouse outside of the extra viewport instead of canceling scrolling when going slightly over the edge (r21838)
- Change: Only show rail/road types that will eventually be available in-game. For example do not show trams when there is no tram NewGRF loaded (r21817)
- Change: Keep aqueducts and road/tram tunnels and bridges after removing a company (r21780)
- Fix: Distant-join station would build at the wrong location when having persistent building turned on and selecting a 'second' location for the station tile [FS#4430] (r21864)
- Fix: Slowing down of trains was done by reducing the speed by 10%, but also when you are just 1% too fast, so limit the slowdown till the new maximum speed [FS#4423] (r21847)
- Fix: Left-mouse-button dragging would switch over to other viewports instead of staying locked to the viewport you started on [FS#4419] (r21837)
- Fix: When a train was reversed while inside a tunnel/bridge, it would not have (re)set the GOINGUP/DOWN bits after leaving the tunnel/bridge (r21836)
- Fix: Desync debug savegames might not be actually saved in case threading is enabled, which is enabled by default [FS#4427] (r21833)
- Fix: Service orders for trains/aircraft would (sometimes) not get a time when autofilling [FS#4414] (r21831)
- Fix: Crash with the small map window on big endian platforms [FS#4417] (r21830)
- Fix: The expectations from the 'always build infrastructure' setting name/description did not match the behaviour [FS#4007] (r21826)
- Fix: Allow dragging of combo signals (again) [FS#4378] (r21816)
- Fix: [YAPF] Apply a pathfinder penalty for back of one-way path signals so those arenot preferred over other possibilities [FS#3908] (r21815)
- Fix: Check GRF version from action 8, and disallow usage of GRFs with versions above 7 (r21814)
- Fix: Crash when displaying the owner view [FS#4411] (r21813)
- Fix: Do not create automatic orders when there are no manual orders, and remove unreached automatic orders when reaching an ordered waypoint or depot [FS#4404] (r21809, r21808)
- Fix: Loading a TTO savegame failed after loading a TTDP savegame (r21799, r21798)
- Fix: The size (in characters) of the string inputs was too small for loading some TTD savegames (r21797)
- Fix: Drive through road stop state was not properly converted from TTDPatch savegames [FS#4398] (r21796)
- Fix: Broken usage of GetTileOwner() caused wrong conversion of old savegames (r21793)
- Fix: Terraforming limit was off-by-one when terraforming a single tile height [FS#4407] (r21791)
- Fix: TTDPatch savegames can have train waypoints encoded as buoys [FS#4398] (r21790)
- Fix: When the font misses the fallback character '?', use the sprite font's '?' instead [FS#4405] (r21789)
- Fix: Crash due to invalid rail station width and height data stored in TTDPatch savegames [FS#4398] (r21786)
- Fix: Crash when converting savegame with custom waypoint name (r21784)
- Fix: Diagonal tile iterator failed for A * 0 selections [FS#4396] (r21768)
- Fix: Do not limit tile clearing during bankruptcy [FS#4397] (r21767)
- Fix: PBS reservation was not shown on road crossings with NewGRF railtypes [FS#4369] (r21765)
- Remove: The 'stopall' console command, as its functionality was broken. Group start/stop commands can be used instead [FS#4409] (r21804)
1.1.0-beta3 (2011-01-09)
------------------------------------------------------------------------
- Feature: Configurable limit amount of tiles that can be cleared/terraformed by a company [FS#4331] (r21728)
- Feature: Show a list of companies in the owner legend and allow them to be toggled for visibility (r21720, r21718)
- Feature: Console command 'list_ai_libs' to get a list of recognized AI libraries [FS#4372] (r21703)
- Feature: Allow changing the AI configuration in the scenario editor / in game [FS#4362] (r21696)
- Change: Tune 'realistic' acceleration even more to make more trains reach their top speed, and make it behave more like TTDPatch (r21712)
- Change: Display the minimum height of the tile in the LandInfo window instead of the height of the northern corner. So it is more useful for NewGRF and AI developers, and maybe more transparent for players (r21711)
- Fix: The diagonal iterator would iterate twice over some tiles [FS#4395] (r21747)
- Fix: [NewGRF] Canal variable 83 accessed water random bits also for non-water tiles (e.g. watery industries or objects) (r21746)
- Fix: [NewGRF] Canal variable 80 shall return consistent heights within a lock (r21745)
- Fix: Allow Ctrl+Clicking automatic orders for scrolling to their destination (r21744)
- Fix: Coast tiles were not drawn under bridges [FS#4386] (r21743)
- Fix: Make clearing refit orders work again [FS#4388] (r21739)
- Fix: Start loading when cur_order_index points to the destination station, i.e. after deleting not-reached automatic orders [FS#4384] (r21738)
- Fix: A loading order was also marked as 'not part of orders' when the order before the current order was deleted (r21737)
- Fix: Admin bots were not always notified of password changes [FS#4377] (r21727)
- Fix: Vehicle sprite was cached into a 16 bit variable, causing incorrect sprites to be displayed (r21709)
- Fix: [NewGRF] Report TTDPatch flag 4A (newobjects) as set (r21708)
- Fix: The old ship pathfinder is too stupid to provide 'lost' notices; it would even get lost while following its own path [FS#4370] (r21706)
- Fix: Do not perform any more checks after the connection is closed [FS#4374] (r21704)
- Fix: Changing AI settings ingame was impossible when the difficulty level was other than custom (r21694)
- Fix: Due to an error in the Debian changelog building of Debian/Ubuntu packages failed (r21682)
1.1.0-beta2 (2010-12-31)
------------------------------------------------------------------------
- Feature: Command logging using the admin interface (r21668)
- Feature: Concept of automatic station orders; add stub orders for intermediate stations and remove them when not visiting them anymore. This allows you to see what trains visit a station without actually having to order a vehicle to stop at all stations (r21642)
- Add: [NoAI] AIEventTownFounded (r21664)
- Add: [NoAI] AIRail::GetName() to get the name of a railtype (r21663)
- Add: [NoAI] AITown::IsCity() so AIs can find out which towns grow faster than others (r21654)
- Change: Do not show price to build a bridge in the scenario editor as they are free to build there [FS#4358] (r21673)
- Change: Do not highlight tile when selecting a vehicle to clone or an order to skip to (r21616)
- Fix: Estonia introduced the Euro in 2011 (r21670)
- Fix: Autofill timetable had side effects in test mode, possibly causing desyncs in MP [FS#4354] (r21660)
- Fix: Cargo payment graph was not properly invalidated when payment rate changed [FS#4351] (r21658)
- Fix: Use a bool instead of uint8 to store a bool and use the dedicated accessor function when reading boolean settings [FS#4345] (r21656)
- Fix: Infinite loop in the road pathfinder due to bouncing around in an 'one way' trap; two one ways pointing towards eachother making it impossible to leave [FS#4338] (r21651)
- Fix: Make '[centre|main] view' consistent, and make '[main|global] view' consistent [FS#4339] (r21650)
- Fix: Newly created skip-to order was created at wrong place (r21633)
- Fix: Ships with the old pathfinder would easily show up as lost, even when it would eventually find a path. Now also the distance from the 'end' of the pathfinding run to the destination is compared to the current distance to the destination; if the distance to the destination at the end of the pathfinder run is less than the current distance from the destination the ship will not be marked as lost. This means that the ships with the old pathfinder will less likely get marked as lost, but due to the design of the old ship pathfinder there 'lostness' is merely a best guess. When you still get a lost message you need to build buoys to guide the ship pathfinder [FS#4325] (r21631)
- Fix: Version detection of subversion branches and tags got broken (r21630)
- Fix: Crash under certain circumstances when using autorail [FS#4327] (r21619)
1.1.0-beta1 (2010-12-24)
------------------------------------------------------------------------
- Feature: [NewGRF] Variable 7B for accessing 60+x variables while taking the parameter from the accumulator (r21604)
@@ -105,7 +415,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)
@@ -286,7 +596,7 @@
- Fix: Road vehicles could be dead locked with one way roads. This allows one wayness to be removed if there are vehicles on a tile; it does not allow you to add one wayness to roads that have vehicles on them as it makes turning vehicles jump [FS#3961] (r20230)
- Fix: 'Service at nearest depot' behaved the same as 'Go to nearest depot' [FS#3986] (r20229)
- Fix: Depot did not become unsnowy, when snowline rises [FS#3976] (r20224)
- Fix: Strip non-printable characters before showing it in an edit box, so when renaming a vehicle type you won't get the 'SETX stuff' that some NewGRFs use [FS#3974] (r20220)
- Fix: Strip non-printable characters before showing it in an edit box, so when renaming a vehicle type you will not get the 'SETX stuff' that some NewGRFs use [FS#3974] (r20220)
- Fix: NewGRFs that defined a vehicle without either loaded or loading groups could crash OpenTTD [FS#3964] (r20199)
- Fix: [NewGRF] GetNearbyTileInformation can be used to get the terrain type of a MP_VOID tile [FS#3963] (r20197)
- Fix: [NewGRF] Vehicle var FE bit 6 did return incorrect values for new railtypes (r20175)
@@ -295,7 +605,7 @@
1.0.3 (2010-08-01)
------------------------------------------------------------------------
- Fix: Make it possible to properly assess the length of the rail toolbar caption, don't require '{WHITE}' control codes (r20242)
- Fix: Make it possible to properly assess the length of the rail toolbar caption, do not require '{WHITE}' control codes (r20242)
- Fix: Check for disallowed level crossings also when converting rail (r20237)
- Fix: Haiku uses a 'special' location for headers (r20219)
- Fix: Desync due to (temporary) wrong railtype; when loading a savegame the railtype of some (high ID) trains could be wrong [FS#3945] (r20137)
@@ -539,7 +849,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)
@@ -778,7 +1088,7 @@
- Fix: Do not try to overtake a vehicle in a road station as overtaking in a station is not allowed [FS#3390] (r18561)
- Fix: Make aircraft behave the same on autoreplace/autorenew as other vehicle types (r18553)
- Fix: First do the time-since-last-service check and only then determine whether autoreplace needs to take place. This way they will not keep autoreplacing continuously on failure, but only after some timeout. Also check some minimal requirements (engine availability, refittability) and a heuristic for the needed money when sending vehicles for autoreplace [FS#1762] (r18551, r18549)
- Fix: Do not account for path reservation costs when entering a signal block via a 'block' signal. This way you won't get double penalties, both red signals and reservation costs, for the block signalled tracks [FS#2722] (r18535)
- Fix: Do not account for path reservation costs when entering a signal block via a 'block' signal. This way you will not get double penalties, both red signals and reservation costs, for the block signalled tracks [FS#2722] (r18535)
- Fix: [NewGRF] An industry NewGRF that defined a too small size for action0 prop 0A could cause a crash (r18527)
- Fix: Allegro does not like to work with extmidi, so warn the user about that [FS#3272] (r18520)
- Fix: When you pass a signal at danger, in a PBS controlled area, do not try to do the 'safe' thing and stop, but continue going; the user wanted the train to pass the signal at danger so (s)he has to suffer the consequences. Ofcourse one can always stop the train manually [FS#2891] (r18515)
@@ -791,7 +1101,7 @@
- Fix: Unselect an AI in the AI Settings window when it falls out of the range of active AIs [FS#3357] (r18436)
- Fix: Road vehicles would not pick an empty drive through stop. Now they will *if* the penalty for driving around is less than the occupancy penalty [FS#1944] (r18404)
- Fix: Long (articulated) road vehicles could block loading of others when the following road vehicle already got 'permission' to go to the next bay even when it could not reach it [FS#1495] (r18404)
- Fix: The tree 'which one to draw' hash wasn't anywhere near random and thus showed a very visible repeated pattern when only one tree type was used [FS#3343] (r18398)
- Fix: The tree 'which one to draw' hash was not anywhere near random and thus showed a very visible repeated pattern when only one tree type was used [FS#3343] (r18398)
- Fix: [NoAI] Make AIIndustryType::GetConstructionCost() return -1, if the industry is neither buildable nor prospectable (r18276)
- Fix: Use free type ascender/descender metrics to position font offset correctly (r18096)
- Fix: Make the 'pause' chat message when actually executing the pause command. This to prevent showing paused and especially unpaused to be shown when the state does not change. Output now mentions whether pause changes keep the game paused and what reasons for pausing there 'currently' are (r18052)
@@ -2300,7 +2610,7 @@
- Fix: Several desync fixes (incorrect roadstop update of old games, autoreplace bugs) [FS#551] (r8137, r8147, r8157)
- Fix: Some disaster-events fixed: combat chopper shoots from right position, submarine once again moves around (r8140, r8158)
- Fix: 'out of sprite memory' warning messages due to incorrect assumption of requested memory for sprites (r8133)
- Fix: Bouys are now built and numbered 1..9 not 9..1 [FS#538] (r8123)
- Fix: Buoys are now built and numbered 1..9 not 9..1 [FS#538] (r8123)
- Fix: Clicking for more news properly cycles through the news history backwards, and does not show the first item doubly if it's already open (r8049)
- Fix: Crash when removing a town in the scenario editor while the query window is open for one of the town's tiles (r8030)
- Fix: Overflow of system-ticks was not handled properly, resulting in a possibly unresponsive server/client (r8028)
@@ -2695,7 +3005,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)
@@ -2761,9 +3071,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. (fixes SHIKI 810 in jpsetw.grf) (r3424)
- Fix: [NewGRF] Only power should decide whether a rail vehicle is an engine or a wagon (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. (fixes tropicstw.grf) (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 (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)
@@ -2947,7 +3257,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]
@@ -3047,7 +3357,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. (even more: 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; 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]

View File

@@ -6,8 +6,13 @@
# 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 echo "$2"; fi
echo "$2" >> $config_log
if [ $1 = "1" ]; then
shift
echo "$@"
else
shift
fi
echo "$@" >> $config_log
}
set_default() {
@@ -455,6 +460,7 @@ detect_params() {
# Clean the logfile
echo "" > $config_log
log 2 "Invocation: $0 $*"
}
save_params() {
@@ -531,7 +537,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
@@ -1295,7 +1301,12 @@ make_compiler_cflags() {
has_lto=`$1 -dumpspecs | grep '\%{flto'`
if [ -n "$has_lto" ]; then
# Use LTO only if we see LTO exists and is requested
flags="$flags -flto"
if [ $cc_version -lt 46 ]; then
flags="$flags -flto"
else
flags="$flags -flto=jobserver"
fi
ldflags="$ldflags -fwhole-program"
features="$features lto"
fi
fi
@@ -1658,8 +1669,8 @@ make_cflags_and_ldflags() {
fi
fi
if [ "$have_broken_iconv" != "no" ]; then
CFLAGS="$CFLAGS -DHAVE_BROKEN_ICONV"
if [ "$have_non_const_iconv" != "no" ]; then
CFLAGS="$CFLAGS -DHAVE_NON_CONST_ICONV"
fi
fi
@@ -2260,6 +2271,12 @@ 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
@@ -2916,9 +2933,9 @@ detect_iconv() {
log 1 "checking iconv... found"
# Check if we need to work around buggy iconv implementation where inbuf
# is wrongly typed as non-const. Correct implementation is at
# http://www.opengroup.org/onlinepubs/007908799/xsh/iconv.html
# There are different implementations of iconv. The older ones,
# e.g. SUSv2, pass a const pointer, whereas the newer ones, e.g.
# IEEE 1003.1 (2004), pass a non-const pointer.
cat > tmp.iconv.cpp << EOF
#include "src/stdafx.h"
@@ -2938,8 +2955,8 @@ EOF
ret=$?
log 2 "executing $execute"
log 2 " exit code $ret"
if [ "$ret" = "0" ]; then have_broken_iconv="no"; else have_broken_iconv="yes"; fi
log 1 "checking if iconv has non-const inbuf... $have_broken_iconv"
if [ "$ret" = "0" ]; then have_non_const_iconv="no"; else have_non_const_iconv="yes"; fi
log 1 "checking if iconv has non-const inbuf... $have_non_const_iconv"
cat > tmp.iconv.cpp << EOF
#include "src/stdafx.h"
@@ -3249,13 +3266,13 @@ generate_src_osx() {
# We don't want to duplicate the x86_64 stuff for each target, so do it once here
if [ "$type" = "ppc64" ] || [ "$type" = "x86_64" ]; then
# 64 bits is always 10.5 or higher. Furthermore it has a broken ICONV
# 64 bits is always 10.5 or higher. Furthermore it has a non const ICONV
# and they also removed support for QuickTime/QuickDraw
if [ -n "$osx_sdk_path" ]; then
CFLAGS="-isysroot $osx_sdk_path $CFLAGS_orig"
LDFLAGS="-Wl,-syslibroot,$osx_sdk_path $LDFLAGS_orig"
fi
CFLAGS="$CFLAGS -D_SQ64 -DHAVE_BROKEN_ICONV -DNO_QUICKTIME -UENABLE_COCOA_QUICKDRAW"
CFLAGS="$CFLAGS -D_SQ64 -DHAVE_NON_CONST_ICONV -DNO_QUICKTIME -UENABLE_COCOA_QUICKDRAW"
LIBS="`echo $LIBS | sed 's/-framework QuickTime//'`"
fi

View File

@@ -1,15 +1,24 @@
32bpp and OpenTTD
=================
Last updated: 2007-06-13
------------------------------------------------------------------------
Table of contents
-----------------
1.0) About
2.0) The format
1.0) About
---- -----
OpenTTD has 32bpp support. This means: OpenTTD still is 8bpp, but it has the
posibility to override the graphics with 32bpp. This means that it isn't a
replacement of grf or newgrf, but simply an addition. If you want to use 32bpp
graphics of a newgrf, you do need the newgrf itself too (with 8bpp graphics).
The Format
----------
2.0) The format
---- ----------
32bpp images are stored in PNG. They should go in:
data/sprites/<grfname>/<SpriteID>.png
@@ -33,4 +42,3 @@ to add this information. Sadly enough most graphical editors trashes those
chunks upon save, so you have to readd it every time you save your image.
Your images should be the same as the grf, in size.

View File

@@ -1,5 +1,17 @@
STRGEN USAGE
------------
OpenTTD and strgen
Last updated: 2009-06-30
------------------------------------------------------------------------
Table of contents
-----------------
1.0) strgen usage
* 1.1) Examples
* 1.2) strgen command switches
1.0) strgen usage
---- ------------
This guide is only interesting for people who want to alter something
themselves without access to translator.openttd.org. Please note that
your compiled language file will only be compatible with the OpenTTD version
@@ -14,8 +26,8 @@ strgen takes as argument a txt file and translates it to a lng file, allowing
it to be used inside OpenTTD. strgen needs the master language file
english.txt to work. Below are some examples of strgen usage.
EXAMPLES
--------
1.1) Examples
---- --------
Example 1:
if you are in the root of your working copy (svn code), you should type
strgen/strgen -s lang lang/english.txt
@@ -35,8 +47,8 @@ resulting language file to go to /tmp. Use
You can interchange english.txt to whichever language you want to generate a
.lng file for.
STRGEN COMMAND SWITCHES
-----------------------
1.2) strgen command switches
---- -----------------------
-v | --version
strgen will tell what svn revision it was last modified

View File

@@ -1,19 +1,23 @@
Admin Network
Preface
1. Joining the network
2. Asking for updates
3. Polling manually
4. Sending rcon commands
5. Sending chat
6. Receiving chat
7. Disconnecting
8. Certain packet information
OpenTTD's admin network
Last updated: 2011-01-20
------------------------------------------------------------------------
Preface
----------
Table of contents
-----------------
1.0) Preface
2.0) Joining the network
3.0) Asking for updates
* 3.1) Polling manually
4.0) Sending rcon commands
5.0) Sending chat
* 5.1) Receiving chat
6.0) Disconnecting
7.0) Certain packet information
1.0) Preface
---- -------
The admin network provides a dedicated network protocol designed for other
applications to communicate with OpenTTD. Connected applications can execute
console commands remotely (rcon commands) with no further authentication.
@@ -33,12 +37,14 @@ Admin Network
removed from packets in later versions, except the possibility that complete
packets are dropped in favour of a new packet.
This though will be reflected in the protocol version as announced in the
ADMIN_PACKET_SERVER_PROTOCOL in section 1.
ADMIN_PACKET_SERVER_PROTOCOL in section 2.0).
A reference implementation in Java for a client connecting to the admin interface
can be found at: http://dev.openttdcoop.org/projects/joan
1. Joining the network
----------------------
2.0) Joining the network
---- -------------------
Create a TCP connection to the server on port 3977. The application is
expected to authenticate within 10 seconds.
@@ -68,9 +74,8 @@ Admin Network
However, ADMIN_PACKET_SERVER_WELCOME only after a ADMIN_PACKET_SERVER_NEWGAME
2. Asking for updates
---------------------
3.0) Asking for updates
---- ------------------
Asking for updates is done with ADMIN_PACKET_ADMIN_UPDATE_FREQUENCY.
With this packet you define which update you wish to receive at which
frequency.
@@ -113,15 +118,18 @@ Admin Network
- ADMIN_PACKET_SERVER_CONSOLE
3. Polling manually
-------------------
ADMIN_UPDATE_CMD_LOGGING results in the server sending:
- ADMIN_PACKET_SERVER_CMD_LOGGING
3.1) Polling manually
---- ----------------
Certain AdminUpdateTypes can also be polled:
- ADMIN_UPDATE_DATE
- ADMIN_UPDATE_CLIENT_INFO
- ADMIN_UPDATE_COMPANY_INFO
- ADMIN_UPDATE_COMPANY_ECONOMY
- ADMIN_UPDATE_COMPANY_STATS
- ADMIN_UPDATE_CMD_NAMES
ADMIN_UPDATE_CLIENT_INFO and ADMIN_UPDATE_COMPANY_INFO accept an additional
parameter. This parameter is used to specify a certain client or company.
@@ -134,9 +142,8 @@ Admin Network
Additional debug information can be found with a debug level of net=3.
4. Sending rcon commands
------------------------
4.0) Sending rcon commands
---- ---------------------
Rcon runs separate from the ADMIN_UPDATE_CONSOLE AdminUpdateType. Requesting
the execution of a remote console command is done with the packet
ADMIN_PACKET_ADMIN_RCON.
@@ -154,9 +161,8 @@ Admin Network
was not sent from the admin network.
5. Sending Chat
---------------
5.0) Sending chat
---- ------------
Sending a ADMIN_PACKET_ADMIN_CHAT results in chat originating from the server.
Currently four types of chat are supported:
@@ -169,10 +175,8 @@ Admin Network
using the respective DestType and ID.
This is a message prefixed with the 3 stars, e.g. *** foo has joined the game
6. Receiving chat
-----------------
5.1) Receiving chat
---- -------------
Register ADMIN_UPDATE_CHAT at ADMIN_FREQUENCY_AUTOMATIC to receive chat.
The application will be able to receive all chat the server can see.
@@ -180,16 +184,14 @@ Admin Network
private chat for to the server is distributed into the admin network.
7. Disconnecting
----------------
6.0) Disconnecting
---- -------------
It is a kind thing to say good bye before leaving. Do this by sending the
ADMIN_PACKET_ADMIN_QUIT packet.
8. Certain packet information
-----------------------------
7.0) Certain packet information
---- --------------------------
All ADMIN_PACKET_SERVER_* packets have an enum value greater 100.
ADMIN_PACKET_SERVER_WELCOME
@@ -202,4 +204,8 @@ Admin Network
a CLIENT_JOIN / COMPANY_NEW packet without having received the INFO packet
it may be a good idea to POLL for the specific ID.
ADMIN_PACKET_SERVER_CMD_NAMES and ADMIN_PACKET_SERVER_CMD_LOGGING
Data provided with these packets is not stable and will not be
treated as such. Do not rely on IDs or names to be constant
across different versions / revisions of OpenTTD.
Data provided in this packet is for logging purposes only.

View File

@@ -1,9 +1,28 @@
Multiplayer Manual for OpenTTD
==============================
Multiplayer manual for OpenTTD
Last updated: 2011-02-16
------------------------------------------------------------------------
1. Starting a Server
---------------------
Table of contents
-----------------
1.0) Starting a server
2.0) Connecting to a server
* 2.1) Connecting to a server over the console
3.0) Playing internet games
4.0) Tips for servers
* 4.1) Imposing landscaping limits
5.0) Some useful things
6.0) Troubleshooting
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
@@ -14,9 +33,8 @@ Multiplayer Manual for OpenTTD
- Start playing
2. Connecting to a Server
--------------------------
2.0) Connecting to a server
---- ----------------------
- Click "multiplayer" on the startup screen
- If you want to connect to any network game in your LAN click on 'LAN', then
@@ -43,17 +61,14 @@ Multiplayer Manual for OpenTTD
- Happy playing
3. Connecting to a Server over the Console
-------------------------------------------
2.1) Connecting to a server over the console
---- ---------------------------------------
- Open the console and type in the following command:
connect <ip/host>:<port>#<company-no>
4. Playing Internet-Games
--------------------------
3.0) Playing internet games
---- ----------------------
- Servers with a red dot behind it have a different version then you have. You
will not be able to join those servers.
@@ -83,9 +98,8 @@ Multiplayer Manual for OpenTTD
NB: changing frame_freq has more effect on the bandwidth then sync_freq.
5. Tips for servers
--------------------
4.0) Tips for servers
---- ----------------
- You can launch a dedicated server by adding -D as parameter.
- In UNIX like systems, you can fork your dedicated server by adding -f as
parameter.
@@ -141,10 +155,49 @@ Multiplayer Manual for OpenTTD
maximum memory usage for packets is:
#max_clients * #max_clients * bytes_per_frame * 10 KiB.
4.1) Imposing landscaping limits
---- ---------------------------
- You can impose limits on companies by the following 4 settings:
- terraform_per_64k_frames
- terraform_frame_burst
- clear_per_64k_frames
- clear_frame_burst
6. Some useful things
----------------------
- Explaining 'per_64K_frames' and 'burst'
- 'burst' defines 3 things, the maximum limit, the limit of a single action,
and the initial value for the limit assigned to a new company.
This setting is fairly simple and requires no math.
A value of 1 means a single tile can be affected by a single action.
This results in having to click 400 times when wanting to cover an area
of 20 x 20 tiles.
The default value 4096 covers an area of 64 x 64 tiles.
- 'per_64k_frames' defines the number of tiles added to each companies limit
per frame (however not past the possible maximum value,the 'burst').
64k rather resembles the exact number of 65536 frames. So setting this
variable to 65536 means: 65536 / 65536 = 1 tile per frame.
As a day consists of 74 frames, a company's limit is increased by 74
tiles during the course of a single day (2.22 seconds).
To achieve a 1 tile per day increase the following calculation is needed:
1 / 74 (frames per day) * 65536 (per_64k_frames) = 885.62...
after rounding: a value of 886 means adding a bit over 1 tile per day.
There is still enough space to scale this value downwards:
decreasing this value to 127 results in a bit over 1 tile added to the
allowance per week (7 days).
To create a setup in which a company gets an initial allowance only,
set the value to 0 - no increase of the allowance per frame.
- Even though construction actions include a clear tile action, they are not
affected by the above settings.
5.0) Some useful things
---- ------------------
- You can protect your company so nobody else can join uninvited. To do this,
set a password in your Company Screen
@@ -156,11 +209,11 @@ Multiplayer Manual for OpenTTD
- Servers can now kick players, so don't make them use it!
7. Troubleshooting
------------------
6.0) Troubleshooting
---- ---------------
- My advertising server does not show up in list at servers.openttd.org
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.
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.

View File

@@ -1,6 +1,6 @@
.\" Hey, EMACS: -*- nroff -*-
.\" Please adjust this date whenever revising the manpage.
.Dd Apr 01, 2010
.Dd Dec 31, 2010
.Dt OPENTTD 6
.Sh NAME
.Nm openttd

View File

@@ -93,12 +93,17 @@ elif [ -d "$ROOT_DIR/.git" ]; then
fi
HASH=`LC_ALL=C git rev-parse --verify HEAD 2>/dev/null`
REV="g`echo $HASH | cut -c1-8`"
BRANCH=`git symbolic-ref -q HEAD 2>/dev/null | sed 's@.*/@@;s@^master$@@'`
BRANCH="`git symbolic-ref -q HEAD 2>/dev/null | sed 's@.*/@@;s@^master$@@'`"
REV_NR=`LC_ALL=C git log --pretty=format:%s --grep="^(svn r[0-9]*)" -1 | sed "s@.*(svn r\([0-9]*\)).*@\1@"`
if [ -z "$REV_NR" ]; 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$@@'`"
if [ -n "$TAG" ]; then
BRANCH=""
REV="$TAG"
fi
elif [ -d "$ROOT_DIR/.hg" ]; then
# We are a hg checkout
if [ -n "`hg status | grep -v '^?'`" ]; then
@@ -106,8 +111,17 @@ elif [ -d "$ROOT_DIR/.hg" ]; then
fi
HASH=`LC_ALL=C hg id -i | cut -c1-12`
REV="h`echo $HASH | cut -c1-8`"
BRANCH=`hg branch | sed 's@^default$@@'`
REV_NR=`LC_ALL=C hg log -f -k "(svn r" -l 1 --template "{desc}\n" | head -n 1 | sed "s@.*(svn r\([0-9]*\)).*@\1@"`
BRANCH="`hg branch | sed 's@^default$@@'`"
TAG="`hg id -t | grep -v 'tip$'`"
if [ -n "$TAG" ]; then
BRANCH=""
REV="$TAG"
fi
REV_NR=`LC_ALL=C hg log -f -k "(svn r" -l 1 --template "{desc|firstline}\n" | grep "^(svn r[0-9]*)" | sed "s@.*(svn r\([0-9]*\)).*@\1@"`
if [ -z "$REV_NR" ]; then
# No rev? Maybe it is a custom hgsubversion clone
REV_NR=`LC_ALL=C hg parent --template="{svnrev}"`
fi
elif [ -f "$ROOT_DIR/.ottdrev" ]; then
# We are an exported source bundle
cat $ROOT_DIR/.ottdrev

View File

@@ -1,18 +1,18 @@
OpenTTD's known bugs
Last updated: 2010-12-24
Release version: 1.1.0-beta1
Last updated: 2011-07-24
Release version: 1.1.2-RC1
------------------------------------------------------------------------
Table of Contents:
------------------
1) About
2) Known bugs in the this stable release
3) Known bugs that will not be solved
Table of contents
-----------------
1.0) About
2.0) Known bugs in this release
* 2.1) Known bugs that will not be solved
1) About:
-- ------
1.0) About
---- -----
All bugs listed below are marked as known. Please do not submit any bugs
that are the same as these. If you do, do not act surprised, because
we WILL flame you!!
@@ -22,12 +22,12 @@ specifics, we welcome you to report them. React to the given bug indicated
by the number below on http://bugs.openttd.org.
2) Known bugs in this stable release:
-- ----------------------------------
The following bugs are known to exist in this stable release and
we intend to fix them. Some bugs are known but are not fixable or
fixing them would cause further problems. Those bugs can be found
in the "Known bugs that will not be solved" section.
2.0) Known bugs in this release
---- --------------------------
The following bugs are known to exist in this release and we intend to
fix them. Some bugs are known but are not fixable or fixing them would
cause further problems. Those bugs can be found in the "Known bugs that
will not be solved" section.
The bugs in this section all refer to a ticket in our bug tracking system
that you can find at: http://bugs.openttd.org
@@ -39,13 +39,16 @@ 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.
- 3569 Location of wagons can be outside of the wagon
- 3447 [OSX] SDL port is unuseable
- 2484 [OSX] Cannot enter CJK characters
- 4695 [OSX] Crash when switching to full screen with OS X Lion
- 4694 HQ (partly) destroyed when funding town
- 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
3) Known bugs that will not be solved:
-- -----------------------------------
2.1) Known bugs that will not be solved
---- ----------------------------------
This section lists all known bugs that we do not intend to fix and the
reasons why we think that fixing them is infeasible. We might make some
minor improvements that reduce the scope of these bugs, but we will not
@@ -214,6 +217,15 @@ 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
@@ -259,3 +271,58 @@ OpenTTD hangs when started on 32 bits Windows [FS#4083]
The reason we do not use the "win32" music driver as default are
described in the "Long delay between switching music/song" section
of this document.
Pre- and exit signals are not dragged [FS#4378]
Unlike all other signal types, the entry- and exit signals are not
dragged but instead normal signals are placed on subsequent track
sections. This is done on purpose as this is the usually more con-
venient solution. There are little to no occasions where more than
one entry or exit signal in a row are useful. This is different
for all other signal types where several in a row can serve one
purpose or another.
Station build date is incorrect [FS#4415]
The tile query tool will show the date of the last (re)construction
at the station and not the date of the first construction. This is
due to compatability reasons with NewGRFs and the fact that it is
wrong to say that the station is built in a particular year when it
was completely destroyed/rebuilt later on.
The tile query tool can be fixed by changing the "Build date" text
to "Date at which the last (re)construction took place" but this is
deemed too specific and long for that window.
Can't change volume inside OpenTTD [FS#4416]
Some backends do not provide a means to change the volume of sound
effects or music. The mixing of music and sound is left to external
libraries/the operating system we can't handle the volume control
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

View File

@@ -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 grahpics for same wood truck
// Different graphics 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 grahpics for lots of trucks
// Different graphics 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 grahpics for same truck
// Different graphics 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 grahpics for same paper truck
// Different graphics 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 grahpics for same paper truck (truck #2)
// Different graphics 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
// Grahpics for the tubular bridge pillars had incorrect offsets
// graphics 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
// Grahpics for the cantilever bridge pillars had incorrect offsets
// graphics 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,15 +150,51 @@
// Toyland specific
-1 * 6 07 83 01 \7! 03 0A
// Grahpics for the toyland tubular bridge pillars had incorrect offsets
// Graphics 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
// Grahpics for the toyland cantilever bridge pillars had incorrect offsets
// Graphics 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: 23 KiB

After

Width:  |  Height:  |  Size: 29 KiB

View File

@@ -1,11 +1,70 @@
openttd (1.1~svn-0) UNRELEASED; urgency=low
openttd (1.1.2~RC1) unstable; urgency=low
* Unreleased SVN version. Versioned to allow normal upgrades to released
versions.
* New upstream release 1.1.2-RC1
-- Matthijs Kooijman <matthijs@stdin.nl> Fri, 24 Dec 2010 00:00:00 +0000
-- Matthijs Kooijman <matthijs@stdin.nl> Sun, 24 Jul 2011 21:00:00 +0200
openttd (1.1.0~beta1); urgency=low
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
-- Matthijs Kooijman <matthijs@stdin.nl> Fri, 21 Jan 2011 00:00:00 +0100
openttd (1.1.0~beta3) unstable; urgency=low
* New upstream release 1.1.0-beta3
-- Matthijs Kooijman <matthijs@stdin.nl> Sun, 09 Jan 2011 18:00:00 +0100
openttd (1.1.0~beta2) unstable; urgency=low
* New upstream release 1.1.0-beta2
-- Matthijs Kooijman <matthijs@stdin.nl> Fri, 31 Dec 2010 18:00:00 +0100
openttd (1.1.0~beta1) unstable; urgency=low
* New upstream release 1.1.0-beta1

View File

@@ -1,6 +1,6 @@
@echo off
set OPENTTD_VERSION=1.1.0-beta1
set OPENTTD_VERSION=1.1.2-RC1
set OPENSFX_VERSION=0.8.0
set NOSOUND_VERSION=0.8.0
set OPENGFX_VERSION=0.7.0

6
os/rpm/openttd-rpmlintrc Normal file
View File

@@ -0,0 +1,6 @@
# 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")

100
os/rpm/openttd.changes Normal file
View File

@@ -0,0 +1,100 @@
-------------------------------------------------------------------
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

View File

@@ -1,201 +1,199 @@
# $Id$
#-------------------------------------------------------------------------------
# spec file for the openttd rpm package
#
# Copyright (c) 2007-2010 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 dedicated 0
Name: openttd
Version: 1.1.0
Release: 1%{?dist}
%define binname openttd
Group: Amusements/Games
License: GPLv2
URL: http://www.openttd.org
Summary: OpenTTD is an Open Source clone of Chris Sawyer's Transport Tycoon Deluxe
%define srcver 1.1.2
Source: %{name}-%{version}-source.tar.bz2
%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
Requires: fontconfig
Requires: SDL
Requires: zlib
BuildRequires: gcc-c++
BuildRequires: fontconfig-devel
BuildRequires: libpng-devel
BuildRequires: libicu-devel
BuildRequires: SDL-devel
BuildRequires: zlib-devel
# vendor specific dependencies
%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
%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
%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} > 910 || %{_vendor}=="mandriva"
Recommends: opengfx
# for 0.8.0
#Recommends: opensfx
%if 0%{?suse_version} || 0%{?mdkversion}
# require timidity is part of openmsx
Recommends: openttd-openmsx
%endif
%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 package OpenGFX.
the original data from the game or install the recommend subackages OpenGFX for
free graphics, OpenSFX for free sounds and OpenMSX for free music.
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 -q
%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
%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="%{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"
--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}" \
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}"
# 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
%if 0%{?suse_version}
%suse_update_desktop_file -r %{binname} Game StrategyGame
%endif
%endif
%clean
#rm -rf "%{buildroot}"
rm -rf "%{buildroot}"
%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
%check
md5sum -c validate.data
%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.*
%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.*
%endif
%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

View File

@@ -1,9 +1,9 @@
# Version numbers to update
!define APPV_MAJOR 1
!define APPV_MINOR 1
!define APPV_MAINT 0
!define APPV_MAINT 2
!define APPV_BUILD 0
!define APPV_EXTRA "-beta1"
!define APPV_EXTRA "-RC1"
!define APPNAME "OpenTTD" ; Define application name
!define APPVERSION "${APPV_MAJOR}.${APPV_MINOR}.${APPV_MAINT}${APPV_EXTRA}" ; Define application version

View File

@@ -157,8 +157,10 @@ Function DetermineSVNVersion()
If version <> "norev000" Then
If InStr(url, "branches") Then
url = Mid(url, InStr(url, "branches/") + 9)
branch = Mid(url, 1, InStr(2, url, "/") - 1)
branch = Mid(url, InStr(url, "branches/") + 9)
End If
If InStr(url, "tags") Then
version = Mid(url, InStr(url, "tags/") + 5)
End If
Else ' version <> "norev000"
' svn detection failed, reset error and try git
@@ -199,7 +201,7 @@ Function DetermineSVNVersion()
End If ' line <> "master"
End If ' Err.Number = 0
Set oExec = WshShell.Exec("git log --pretty=format:%s --grep=" & Chr(34) & "^(svn r[0-9]*)" & Chr(34) & " -1 ../")
Set oExec = WshShell.Exec("git log --pretty=format:%s --grep=" & Chr(34) & "^(svn r[0-9]*)" & Chr(34) & " -1")
if Err.Number = 0 Then
revision = Mid(oExec.StdOut.ReadLine(), 7)
revision = Mid(revision, 1, InStr(revision, ")") - 1)
@@ -208,13 +210,29 @@ Function DetermineSVNVersion()
' No revision? Maybe it is a custom git-svn clone
' Reset error number as WshShell.Exec will not do that on success
Err.Clear
Set oExec = WshShell.Exec("git log --pretty=format:%b --grep=" & Chr(34) & "git-svn-id:.*@[0-9]*" & Chr(34) & " -1 ../")
Set oExec = WshShell.Exec("git log --pretty=format:%b --grep=" & Chr(34) & "git-svn-id:.*@[0-9]*" & Chr(34) & " -1")
If Err.Number = 0 Then
revision = oExec.StdOut.ReadLine()
revision = Mid(revision, InStr(revision, "@") + 1)
revision = Mid(revision, 1, InStr(revision, " ") - 1)
End If ' Err.Number = 0
End If ' revision = ""
' Check if a tag is currently checked out
Err.Clear
Set oExec = WshShell.Exec("git name-rev --name-only --tags --no-undefined HEAD")
If Err.Number = 0 Then
' Wait till the application is finished ...
Do While oExec.Status = 0
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
End If ' Err.Number = 0
End If ' oExec.ExitCode = 0
End If ' Err.Number = 0
@@ -222,7 +240,7 @@ Function DetermineSVNVersion()
If version = "norev000" Then
' git detection failed, reset error and try mercurial (hg)
Err.Clear
Set oExec = WshShell.Exec("hg parents")
Set oExec = WshShell.Exec("hg id -i")
If Err.Number = 0 Then
' Wait till the application is finished ...
Do While oExec.Status = 0
@@ -230,8 +248,21 @@ Function DetermineSVNVersion()
If oExec.ExitCode = 0 Then
line = OExec.StdOut.ReadLine()
hash = Mid(line, InStrRev(line, ":") + 1)
hash = Left(line, 12)
version = "h" & Mid(hash, 1, 8)
' Check if a tag is currently checked out
Err.Clear
Set oExec = WshShell.Exec("hg id -t")
If Err.Number = 0 Then
line = oExec.StdOut.ReadLine()
If Len(line) > 0 And Right(line, 3) <> "tip" Then
version = line
branch = ""
End If ' Len(line) > 0 And Right(line, 3) <> "tip"
End If ' Err.Number = 0
Err.Clear
Set oExec = WshShell.Exec("hg status ../")
If Err.Number = 0 Then
Do
@@ -250,11 +281,23 @@ Function DetermineSVNVersion()
End If ' line <> "default"
End If ' Err.Number = 0
Set oExec = WshShell.Exec("hg log -f -k " & Chr(34) & "(svn r" & Chr(34) & " -l 1 --template " & Chr(34) & "{desc}\n" & Chr(34) & " --cwd ../")
Set oExec = WshShell.Exec("hg log -f -k " & Chr(34) & "(svn r" & Chr(34) & " -l 1 --template " & Chr(34) & "{desc|firstline}\n" & Chr(34) & " --cwd ../")
If Err.Number = 0 Then
revision = Mid(OExec.StdOut.ReadLine(), 7)
revision = Mid(revision, 1, InStr(revision, ")") - 1)
line = oExec.StdOut.ReadLine()
If Left(line, 6) = "(svn r" Then
revision = Mid(line, 7)
revision = Mid(revision, 1, InStr(revision, ")") - 1)
End If 'Left(line, 6) = "(svn r"
End If ' Err.Number = 0
If revision = "" Then
' No rev? Maybe it is a custom hgsubversion clone
Err.Clear
Set oExec = WshShell.Exec("hg parent --template=" & Chr(34) & "{svnrev}" & Chr(34))
If Err.Number = 0 Then
revision = oExec.StdOut.ReadLine()
End If ' Err.Number = 0
End If ' revision = ""
End If ' Err.Number = 0
End If ' oExec.ExitCode = 0
End If ' Err.Number = 0

View File

@@ -388,6 +388,7 @@
<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" />
@@ -429,7 +430,6 @@
<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,6 +1074,7 @@
<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" />

View File

@@ -384,6 +384,9 @@
<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>
@@ -507,9 +510,6 @@
<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,6 +2442,9 @@
<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>

View File

@@ -826,6 +826,10 @@
RelativePath=".\..\src\cheat_type.h"
>
</File>
<File
RelativePath=".\..\src\clear_func.h"
>
</File>
<File
RelativePath=".\..\src\cmd_helper.h"
>
@@ -990,10 +994,6 @@
RelativePath=".\..\src\fontcache.h"
>
</File>
<File
RelativePath=".\..\src\functions.h"
>
</File>
<File
RelativePath=".\..\src\gamelog.h"
>
@@ -3662,6 +3662,10 @@
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"
>

View File

@@ -823,6 +823,10 @@
RelativePath=".\..\src\cheat_type.h"
>
</File>
<File
RelativePath=".\..\src\clear_func.h"
>
</File>
<File
RelativePath=".\..\src\cmd_helper.h"
>
@@ -987,10 +991,6 @@
RelativePath=".\..\src\fontcache.h"
>
</File>
<File
RelativePath=".\..\src\functions.h"
>
</File>
<File
RelativePath=".\..\src\gamelog.h"
>
@@ -3659,6 +3659,10 @@
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"
>

View File

@@ -1,34 +1,35 @@
OpenTTD README
Last updated: 2010-12-24
Release version: 1.1.0-beta1
OpenTTD readme
Last updated: 2011-07-24
Release version: 1.1.2-RC1
------------------------------------------------------------------------
Table of Contents:
------------------
Table of contents
-----------------
1.0) About
2.0) Contacting
* 2.1 Reporting Bugs
* 2.2 Reporting Desyncs
3.0) Supported Platforms
* 2.1) Reporting bugs
* 2.2) Reporting desyncs
3.0) Supported platforms
4.0) Installing and running OpenTTD
* 4.1 (Required) 3rd party files
* 4.2 OpenTTD directories
* 4.3 Portable Installations (External Media)
* 4.1) (Required) 3rd party files
* 4.2) OpenTTD directories
* 4.3) Portable installations (portable media)
5.0) OpenTTD features
6.0) Configuration File
* 5.1) Logging of potentially dangerous actions
6.0) Configuration file
7.0) Compiling
* 7.1) Required/optional libraries
* 7.2) Supported compilers
8.0) Translating
* 8.1 Translation
* 8.2 Previewing
* 8.1) Translation
* 8.2) Previewing
9.0) Troubleshooting
X.X) Credits
1.0) About:
---- ------
1.0) About
---- -----
OpenTTD is a transport simulation game based upon the popular game Transport
Tycoon Deluxe, written by Chris Sawyer. It attempts to mimic the original
game as closely as possible while extending it with new features.
@@ -36,7 +37,8 @@ game as closely as possible while extending it with new features.
OpenTTD is licensed under the GNU General Public License version 2.0. For
more information, see the file 'COPYING'.
2.0) Contacting:
2.0) Contacting
---- ----------
The easiest way to contact the OpenTTD team is by submitting bug reports or
posting comments in our forums. You can also chat with us on IRC (#openttd
@@ -47,9 +49,8 @@ The OpenTTD homepage is http://www.openttd.org/.
You can also find the OpenTTD forums at
http://forum.openttd.org/
2.1) Reporting Bugs:
---- ---------------
2.1) Reporting bugs
---- --------------
First of all, check whether the bug is not already known. Do this by looking
through the file called 'known-bugs.txt' which is distributed with OpenTTD
like this readme.
@@ -87,8 +88,8 @@ following information in your bug report:
* Attach crash.dmp, crash.log and crash.sav. These files are usually created
next to your openttd.cfg. The crash handler will tell you the location.
2.2) Reporting Desyncs:
---- ------------------
2.2) Reporting desyncs
---- -----------------
As desyncs are hard to make reproducible OpenTTD has the ability to log all
actions done by clients so we can replay the whole game in an effort to make
desyncs better reproducible. You need to turn this ability on. When turned
@@ -140,8 +141,9 @@ Do NOT remove the dmp_cmds savegames of a desync you have reported until the
desync has been fixed; if you, by accident, send us the wrong savegames we
will not be able to reproduce the desync and thus will be unable to fix it.
3.0) Supported Platforms:
---- --------------------
3.0) Supported platforms
---- -------------------
OpenTTD has been ported to several platforms and operating systems. It shouldn't
be very difficult to port it to a new platform. The currently working platforms
are:
@@ -157,9 +159,8 @@ are:
Windows - Win32 GDI (faster) or SDL or Allegro
4.0) Installing and running OpenTTD:
---- -------------------------------
4.0) Installing and running OpenTTD
---- ------------------------------
Installing OpenTTD is fairly straightforward. Either you have downloaded an
archive which you have to extract to a directory where you want OpenTTD to
be installed, or you have downloaded an installer, which will automatically
@@ -186,9 +187,8 @@ automatically selected (and downloaded) if you get the AIs via the "Check
Online Content". If you do not have an AI but have configured OpenTTD to start
an AI a message will be shown that the 'dummy' AI has been started.
4.1) (Required) 3rd party files:
---- ---------------------------
4.1) (Required) 3rd party files
---- --------------------------
Before you run OpenTTD, you need to put the game's data files into a data/
directory which can be located in various places addressed in the following
section.
@@ -248,11 +248,13 @@ wait for an error message to pop up. The error message will tell you
"couldn't find library 'lib-name'". Download that library and try again.
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 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:
The main OpenTTD directories can be found in various locations, depending on your operating
system:
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
@@ -274,7 +276,26 @@ placed in a few different locations:
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
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.
Notes:
- Linux in the previous list means .deb, but most paths should be similar for others.
@@ -289,10 +310,8 @@ Place 3rd party files in shared directory (or in personal directory if you don't
have write access on shared directory) and have your openttd.cfg config file in
personal directory (where the game will then also place savegames and screenshots).
4.3) Portable Installations (External Media):
---- ----------------------------------------
4.3) Portable installations (portable media)
---- ---------------------------------------
You can install OpenTTD on external media so you can take it with you, i.e.
using a USB key, or a USB HDD, etc.
Create a directory where you shall store the game in (i.e. OpenTTD/).
@@ -305,9 +324,8 @@ As always - additional grf files are stored in the data/ dir (for details,
again, see section 4.1).
5.0) OpenTTD features:
---- -----------------
5.0) OpenTTD features
---- ----------------
OpenTTD has a lot of features going beyond the original Transport Tycoon Deluxe
emulation. Unfortunately, there is currently no comprehensive list of features,
but there is a basic features list on the web, and some optional features can be
@@ -326,10 +344,8 @@ Several important non-standard controls:
* Hovering over a GUI element shows tooltips. This can be changed to right click
via the advanced settings.
5.1) Logging of potentially dangerous actions:
5.1) Logging of potentially dangerous actions
---- ----------------------------------------
OpenTTD is a complex program, and together with NewGRF, it may show a buggy
behaviour. But not only bugs in code can cause problems. There are several
ways to affect game state possibly resulting in program crash or multiplayer
@@ -358,18 +374,18 @@ You can show the game log by typing 'gamelog' in the console or by running
OpenTTD in debug mode.
6.0) Configuration File:
---- -------------------
6.0) Configuration file
---- ------------------
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 can not find openttd.cfg you should look in the directories as
When you cannot 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.
7.0) Compiling:
---- ----------
7.0) Compiling
---- ---------
Windows:
You need Microsoft Visual Studio .NET. Open the project file
and it should build automatically. In case you want to build with SDL support
@@ -421,11 +437,12 @@ DOS:
will be generated that does not need cwsdpmi.exe by adding the cswdstub.exe
to the created OpenTTD binary.
7.1) Required/optional libraries:
---- -------------------
7.1) Required/optional libraries
---- ---------------------------
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
@@ -446,14 +463,14 @@ GRFCodec can be found at: http://www.openttd.org/download-grfcodec
The compilation of these extra graphics does generally not happen, unless
you remove the graphics file using "make maintainer-clean".
7.2) Supported compilers:
7.2) Supported compilers
---- -------------------
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.6.
- GNU Compiler Collection (GCC) 3.3 - 4.7.
Versions 4.1 and earlier give bogus warnings about uninitialised variables.
Versions 4.4 and later give bogus warnings about freeing heap objects.
Versions 4.4 and later give bogus warnings about freeing non-heap objects.
- Intel C++ Compiler (ICC) 12.0.
The following compilers are known not to compile OpenTTD:
@@ -461,7 +478,8 @@ 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.
@@ -470,8 +488,9 @@ The following compilers are known not to compile OpenTTD:
If any of these compilers can compile OpenTTD again, please let us know.
Patches to support more compilers are welcome.
8.0) Translating:
---- -------------------
8.0) Translating
---- -----------
See http://www.openttd.org/development for up-to-date information.
The use of the online Translator service, located at
@@ -485,8 +504,8 @@ Please contact the translations manager (http://www.openttd.org/contact)
before beginning the translation process! This avoids double work, as
someone else may have already started translating to the same language.
8.1) Translation:
---- -------------------
8.1) Translation
---- -----------
So, now that you've notified the development team about your intention to
translate (You did, right? Of course you did.) you can pick up english.txt
(found in the SVN repository under /src/lang) and translate.
@@ -503,8 +522,8 @@ Note: Do not alter the following parts of the file:
* Lines beginning with ## (such as ##id), other than the first two lines of
the file
8.2) Previewing:
---- -------------------
8.2) Previewing
---- ----------
In order to view the translation in the game, you need to compile your language
file with the strgen utility. You can download the precompiled strgen from:
http://www.openttd.org/download-strgen
@@ -523,9 +542,9 @@ should also be.
That's all! You should now be able to select the language in the game options.
9.0) Troubleshooting
---- ---------------
To see all startup options available to you, start OpenTTD with the
"./openttd -h" option. This might help you tweak some of the settings.
@@ -539,27 +558,37 @@ 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, 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 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 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 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.
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.
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
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.
can be viewed in the NewGRF window accessible from the file load dialogue window.
X.X) Credits:
---- --------
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.
X.X) Credits
---- -------
The OpenTTD team (in alphabetical order):
Albert Hofkamp (Alberth) - GUI expert
Jean-François Claeys (Belugas) - GUI, newindustries and more

View File

@@ -121,6 +121,7 @@ cargopacket.h
cargotype.h
cheat_func.h
cheat_type.h
clear_func.h
cmd_helper.h
command_func.h
command_type.h
@@ -162,7 +163,6 @@ fileio_func.h
fileio_type.h
fios.h
fontcache.h
functions.h
gamelog.h
gamelog_internal.h
genworld.h
@@ -875,6 +875,7 @@ 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

View File

@@ -54,6 +54,10 @@ 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;
@@ -77,6 +81,8 @@ 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

View File

@@ -597,6 +597,7 @@ public:
}
SQInteger Factor()
{
_exst._deref = DEREF_NO_DEREF;
switch(_token)
{
case TK_STRING_LITERAL: {

View File

@@ -125,7 +125,9 @@ public:
static int GetStartNextTime();
/** Wrapper function for AIScanner::GetAIConsoleList */
static char *GetConsoleList(char *p, const char *last);
static char *GetConsoleList(char *p, const char *last, bool newest_only = false);
/** Wrapper function for AIScanner::GetAIConsoleLibraryList */
static char *GetConsoleLibraryList(char *p, const char *last);
/** Wrapper function for AIScanner::GetAIInfoList */
static const AIInfoList *GetInfoList();
/** Wrapper function for AIScanner::GetUniqueAIInfoList */
@@ -166,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) { return p; }
static char *GetConsoleList(char *p, const char *last, bool newest_only = false) { return p; }
static void nop() { }
};

View File

@@ -10,7 +10,6 @@
/** @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"
@@ -76,9 +75,9 @@ AIInfo *AIConfig::GetInfo() const
return this->info;
}
bool AIConfig::ResetInfo()
bool AIConfig::ResetInfo(bool force_exact_match)
{
this->info = AI::FindInfo(this->name, -1, false);
this->info = AI::FindInfo(this->name, force_exact_match ? this->version : -1, force_exact_match);
return this->info != NULL;
}
@@ -108,10 +107,10 @@ int AIConfig::GetSetting(const char *name) const
{
SettingValueList::const_iterator it = this->settings.find(name);
/* Return the default value if the setting is not set, or if we are in a not-custom difficult level */
if (it == this->settings.end() || ((_game_mode == GM_MENU) ? _settings_newgame.difficulty.diff_level : _settings_game.difficulty.diff_level) != 3) {
if (it == this->settings.end() || GetGameSettings().difficulty.diff_level != 3) {
if (this->info == NULL) {
assert(strcmp("start_date", name) == 0);
switch ((_game_mode == GM_MENU) ? _settings_newgame.difficulty.diff_level : _settings_game.difficulty.diff_level) {
switch (GetGameSettings().difficulty.diff_level) {
case 0: return AI::START_NEXT_EASY;
case 1: return AI::START_NEXT_MEDIUM;
case 2: return AI::START_NEXT_HARD;

View File

@@ -57,10 +57,12 @@ 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 ResetInfo(bool force_exact_match);
/**
* Get the AIInfo linked to this AIConfig.

View File

@@ -170,13 +170,24 @@
* 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()) {
if (!_settings_game.ai_config[c]->ResetInfo(true)) {
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()) {
if (!_settings_newgame.ai_config[c]->ResetInfo(false)) {
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);
}
@@ -289,9 +300,14 @@ void CcAI(const CommandCost &result, TileIndex tile, uint32 p1, uint32 p2)
return DAYS_IN_YEAR;
}
/* static */ char *AI::GetConsoleList(char *p, const char *last)
/* static */ char *AI::GetConsoleList(char *p, const char *last, bool newest_only)
{
return AI::ai_scanner->GetAIConsoleList(p, last);
return AI::ai_scanner->GetAIConsoleList(p, last, newest_only);
}
/* static */ char *AI::GetConsoleLibraryList(char *p, const char *last)
{
return AI::ai_scanner->GetAIConsoleLibraryList(p, last);
}
/* static */ const AIInfoList *AI::GetInfoList()

View File

@@ -10,7 +10,6 @@
/** @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"
@@ -183,8 +182,20 @@ struct AIListWindow : public Window {
nwi->widget_data = (this->vscroll->GetCapacity() << MAT_ROW_START) + (1 << MAT_COL_START);
}
virtual void OnInvalidateData(int data)
/**
* 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)
{
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. */
@@ -263,7 +274,7 @@ struct AISettingsWindow : public Window {
this->vscroll = this->GetScrollbar(AIS_WIDGET_SCROLLBAR);
this->FinishInitNested(desc, slot); // Initializes 'this->line_height' as side effect.
this->SetWidgetDisabledState(AIS_WIDGET_RESET, _game_mode != GM_MENU);
this->SetWidgetDisabledState(AIS_WIDGET_RESET, _game_mode != GM_MENU && Company::IsValidID(this->slot));
this->vscroll->SetCount((int)this->ai_config->GetConfigList()->size());
}
@@ -297,7 +308,7 @@ struct AISettingsWindow : public Window {
int y = r.top;
for (; this->vscroll->IsVisible(i) && it != config->GetConfigList()->end(); i++, it++) {
int current_value = config->GetSetting((*it).name);
bool editable = (_game_mode == GM_MENU) || ((it->flags & AICONFIG_INGAME) != 0);
bool editable = _game_mode == GM_MENU || !Company::IsValidID(this->slot) || (it->flags & AICONFIG_INGAME) != 0;
StringID str;
TextColour colour;
@@ -353,7 +364,7 @@ struct AISettingsWindow : public Window {
AIConfigItemList::const_iterator it = this->ai_config->GetConfigList()->begin();
for (int i = 0; i < num; i++) it++;
AIConfigItem config_item = *it;
if (_game_mode != GM_MENU && (config_item.flags & AICONFIG_INGAME) == 0) return;
if (_game_mode == GM_NORMAL && Company::IsValidID(this->slot) && (config_item.flags & AICONFIG_INGAME) == 0) return;
bool bool_item = (config_item.flags & AICONFIG_BOOLEAN) != 0;
@@ -363,6 +374,7 @@ 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) {
@@ -377,18 +389,19 @@ struct AISettingsWindow : public Window {
this->clicked_increase = false;
}
this->ai_config->SetSetting(config_item.name, new_val);
this->clicked_button = num;
this->timeout = 5;
if (new_val != old_val) {
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;
}
@@ -398,8 +411,10 @@ struct AISettingsWindow : public Window {
break;
case AIS_WIDGET_RESET:
this->ai_config->ResetSettings();
this->SetDirty();
if (_game_mode == GM_MENU || !Company::IsValidID(this->slot)) {
this->ai_config->ResetSettings();
this->SetDirty();
}
break;
}
}
@@ -409,6 +424,7 @@ struct AISettingsWindow : public Window {
if (StrEmpty(str)) return;
AIConfigItemList::const_iterator it = this->ai_config->GetConfigList()->begin();
for (int i = 0; i < this->clicked_row; i++) it++;
if (_game_mode == GM_NORMAL && Company::IsValidID(this->slot) && (it->flags & AICONFIG_INGAME) == 0) return;
int32 value = atoi(str);
this->ai_config->SetSetting((*it).name, value);
this->CheckDifficultyLevel();
@@ -429,6 +445,16 @@ struct AISettingsWindow : public Window {
this->SetDirty();
}
}
/**
* 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)
{
if (_game_mode == GM_NORMAL && Company::IsValidID(this->slot)) delete this;
}
};
/** Widgets for the AI settings window. */
@@ -556,7 +582,7 @@ struct AIConfigWindow : public Window {
{
switch (widget) {
case AIC_WIDGET_NUMBER:
SetDParam(0, _settings_newgame.difficulty.max_no_competitors);
SetDParam(0, GetGameSettings().difficulty.max_no_competitors);
break;
}
}
@@ -571,6 +597,25 @@ struct AIConfigWindow : public Window {
}
}
/**
* Can the AI config in the given company slot be edited?
* @param slot The slot to query.
* @return True if and only if the given AI Config slot can e edited.
*/
static bool IsEditable(CompanyID slot)
{
if (_game_mode != GM_NORMAL) {
return slot > 0 && slot <= GetGameSettings().difficulty.max_no_competitors;
}
if (Company::IsValidID(slot) || slot < 0) return false;
int max_slot = GetGameSettings().difficulty.max_no_competitors;
for (CompanyID cid = COMPANY_FIRST; cid < (CompanyID)max_slot && cid < MAX_COMPANIES; cid++) {
if (Company::IsValidHumanID(cid)) max_slot++;
}
return slot < max_slot;
}
virtual void DrawWidget(const Rect &r, int widget) const
{
switch (widget) {
@@ -579,16 +624,16 @@ struct AIConfigWindow : public Window {
for (int i = this->vscroll->GetPosition(); this->vscroll->IsVisible(i) && i < MAX_COMPANIES; i++) {
StringID text;
if (AIConfig::GetConfig((CompanyID)i)->GetInfo() != NULL) {
if ((_game_mode != GM_NORMAL && i == 0) || (_game_mode == GM_NORMAL && Company::IsValidHumanID(i))) {
text = STR_AI_CONFIG_HUMAN_PLAYER;
} else if (AIConfig::GetConfig((CompanyID)i)->GetInfo() != NULL) {
SetDParamStr(0, AIConfig::GetConfig((CompanyID)i)->GetInfo()->GetName());
text = STR_JUST_RAW_STRING;
} else if (i == 0) {
text = STR_AI_CONFIG_HUMAN_PLAYER;
} else {
text = STR_AI_CONFIG_RANDOM_AI;
}
DrawString(r.left + 10, r.right - 10, y + WD_MATRIX_TOP, text,
(this->selected_slot == i) ? TC_WHITE : ((i > _settings_newgame.difficulty.max_no_competitors || i == 0) ? TC_SILVER : TC_ORANGE));
(this->selected_slot == i) ? TC_WHITE : (IsEditable((CompanyID)i) ? TC_ORANGE : TC_SILVER));
y += this->line_height;
}
break;
@@ -603,9 +648,9 @@ struct AIConfigWindow : public Window {
case AIC_WIDGET_INCREASE: {
int new_value;
if (widget == AIC_WIDGET_DECREASE) {
new_value = max(0, _settings_newgame.difficulty.max_no_competitors - 1);
new_value = max(0, GetGameSettings().difficulty.max_no_competitors - 1);
} else {
new_value = min(MAX_COMPANIES - 1, _settings_newgame.difficulty.max_no_competitors + 1);
new_value = min(MAX_COMPANIES - 1, GetGameSettings().difficulty.max_no_competitors + 1);
}
IConsoleSetSetting("difficulty.max_no_competitors", new_value);
this->InvalidateData();
@@ -620,8 +665,8 @@ struct AIConfigWindow : public Window {
}
case AIC_WIDGET_MOVE_UP:
if (this->selected_slot > 1) {
Swap(_settings_newgame.ai_config[this->selected_slot], _settings_newgame.ai_config[this->selected_slot - 1]);
if (IsEditable(this->selected_slot) && IsEditable((CompanyID)(this->selected_slot - 1))) {
Swap(GetGameSettings().ai_config[this->selected_slot], GetGameSettings().ai_config[this->selected_slot - 1]);
this->selected_slot--;
this->vscroll->ScrollTowards(this->selected_slot);
this->InvalidateData();
@@ -629,8 +674,8 @@ struct AIConfigWindow : public Window {
break;
case AIC_WIDGET_MOVE_DOWN:
if (this->selected_slot < _settings_newgame.difficulty.max_no_competitors) {
Swap(_settings_newgame.ai_config[this->selected_slot], _settings_newgame.ai_config[this->selected_slot + 1]);
if (IsEditable(this->selected_slot) && IsEditable((CompanyID)(this->selected_slot + 1))) {
Swap(GetGameSettings().ai_config[this->selected_slot], GetGameSettings().ai_config[this->selected_slot + 1]);
this->selected_slot++;
this->vscroll->ScrollTowards(this->selected_slot);
this->InvalidateData();
@@ -661,18 +706,25 @@ struct AIConfigWindow : public Window {
}
}
virtual void OnInvalidateData(int data)
/**
* 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)
{
if (this->selected_slot == 0 || this->selected_slot > _settings_newgame.difficulty.max_no_competitors) {
if (!IsEditable(this->selected_slot)) {
this->selected_slot = INVALID_COMPANY;
}
this->SetWidgetDisabledState(AIC_WIDGET_DECREASE, _settings_newgame.difficulty.max_no_competitors == 0);
this->SetWidgetDisabledState(AIC_WIDGET_INCREASE, _settings_newgame.difficulty.max_no_competitors == MAX_COMPANIES - 1);
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);
this->SetWidgetDisabledState(AIC_WIDGET_CONFIGURE, this->selected_slot == INVALID_COMPANY);
this->SetWidgetDisabledState(AIC_WIDGET_MOVE_UP, this->selected_slot == INVALID_COMPANY || this->selected_slot == 1);
this->SetWidgetDisabledState(AIC_WIDGET_MOVE_DOWN, this->selected_slot == INVALID_COMPANY || this->selected_slot == _settings_newgame.difficulty.max_no_competitors);
this->SetWidgetDisabledState(AIC_WIDGET_MOVE_UP, this->selected_slot == INVALID_COMPANY || !IsEditable((CompanyID)(this->selected_slot - 1)));
this->SetWidgetDisabledState(AIC_WIDGET_MOVE_DOWN, this->selected_slot == INVALID_COMPANY || !IsEditable((CompanyID)(this->selected_slot + 1)));
}
};
@@ -766,9 +818,8 @@ 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 and disable the widget for the previous selection. */
/* Raise 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;
}
@@ -798,9 +849,6 @@ 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);
@@ -831,6 +879,9 @@ 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();
@@ -1001,11 +1052,16 @@ struct AIDebugWindow : public QueryStringBaseWindow {
return state;
}
virtual void OnInvalidateData(int data = 0)
/**
* 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)
{
if (data == -1 || ai_debug_company == data) this->SetDirty();
if (data == -2) {
if (gui_scope && 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 )*/
@@ -1017,8 +1073,9 @@ struct AIDebugWindow : public QueryStringBaseWindow {
}
}
/* 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)) {
/* 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)) {
/* 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();

View File

@@ -15,7 +15,6 @@
#include "ai_info.hpp"
#include "ai_scanner.hpp"
#include "../settings_type.h"
#include "../openttd.h"
#include "../debug.h"
#include "../rev.h"
@@ -338,7 +337,7 @@ int AIInfo::GetSettingDefaultValue(const char *name) const
for (AIConfigItemList::const_iterator it = this->config_list.begin(); it != this->config_list.end(); it++) {
if (strcmp((*it).name, name) != 0) continue;
/* The default value depends on the difficulty level */
switch ((_game_mode == GM_MENU) ? _settings_newgame.difficulty.diff_level : _settings_game.difficulty.diff_level) {
switch (GetGameSettings().difficulty.diff_level) {
case 0: return (*it).easy_value;
case 1: return (*it).medium_value;
case 2: return (*it).hard_value;

View File

@@ -74,6 +74,7 @@
#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. */
@@ -209,6 +210,7 @@ void AIInstance::RegisterAPI()
SQAIEventSubsidyExpired_Register(this->engine);
SQAIEventSubsidyOffer_Register(this->engine);
SQAIEventSubsidyOfferExpired_Register(this->engine);
SQAIEventTownFounded_Register(this->engine);
SQAIEventVehicleCrashed_Register(this->engine);
SQAIEventVehicleLost_Register(this->engine);
SQAIEventVehicleUnprofitable_Register(this->engine);

View File

@@ -330,11 +330,12 @@ AIInfo *AIScanner::FindInfo(const char *nameParam, int versionParam, bool force_
return info;
}
char *AIScanner::GetAIConsoleList(char *p, const char *last) const
char *AIScanner::GetAIConsoleList(char *p, const char *last, bool newest_only) const
{
p += seprintf(p, last, "List of AIs:\n");
AIInfoList::const_iterator it = this->info_list.begin();
for (; it != this->info_list.end(); it++) {
const AIInfoList &list = newest_only ? this->info_single_list : this->info_list;
AIInfoList::const_iterator it = list.begin();
for (; it != list.end(); it++) {
AIInfo *i = (*it).second;
p += seprintf(p, last, "%10s (v%d): %s\n", i->GetName(), i->GetVersion(), i->GetDescription());
}
@@ -343,6 +344,19 @@ char *AIScanner::GetAIConsoleList(char *p, const char *last) const
return p;
}
char *AIScanner::GetAIConsoleLibraryList(char *p, const char *last) const
{
p += seprintf(p, last, "List of AI Libraries:\n");
AILibraryList::const_iterator it = this->library_list.begin();
for (; it != this->library_list.end(); it++) {
AILibrary *i = (*it).second;
p += seprintf(p, last, "%10s (v%d): %s\n", i->GetName(), i->GetVersion(), i->GetDescription());
}
p += seprintf(p, last, "\n");
return p;
}
#if defined(ENABLE_NETWORK)
#include "../network/network_content.h"
#include "../3rdparty/md5/md5.h"

View File

@@ -12,11 +12,8 @@
#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.
@@ -56,7 +53,12 @@ public:
/**
* Get the list of available AIs for the console.
*/
char *GetAIConsoleList(char *p, const char *last) const;
char *GetAIConsoleList(char *p, const char *last, bool newest_only) const;
/**
* Get the list of available AI Libraries for the console.
*/
char *GetAIConsoleLibraryList(char *p, const char *last) const;
/**
* Get the list of all registered AIs.

View File

@@ -12,12 +12,7 @@
#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"

View File

@@ -9,6 +9,7 @@
/** @file ai_accounting.cpp Implementation of AIAccounting. */
#include "../../stdafx.h"
#include "ai_accounting.hpp"
Money AIAccounting::GetCosts()

View File

@@ -9,6 +9,7 @@
/** @file ai_airport.cpp Implementation of AIAirport. */
#include "../../stdafx.h"
#include "ai_airport.hpp"
#include "ai_station.hpp"
#include "../../station_base.h"

View File

@@ -9,6 +9,7 @@
/** @file ai_base.cpp Implementation of AIBase. */
#include "../../stdafx.h"
#include "ai_base.hpp"
#include "../../network/network.h"
#include "../../core/random_func.hpp"

View File

@@ -9,6 +9,7 @@
/** @file ai_basestation.cpp Implementation of AIBaseStation. */
#include "../../stdafx.h"
#include "ai_basestation.hpp"
#include "../../station_base.h"
#include "../../string_func.h"

View File

@@ -12,7 +12,6 @@
#ifndef AI_BASESTATION_HPP
#define AI_BASESTATION_HPP
#include "ai_object.hpp"
#include "ai_error.hpp"
/**

View File

@@ -9,6 +9,7 @@
/** @file ai_bridge.cpp Implementation of AIBridge. */
#include "../../stdafx.h"
#include "ai_bridge.hpp"
#include "ai_rail.hpp"
#include "../ai_instance.hpp"
@@ -151,9 +152,7 @@ static void _DoCommandReturnBuildBridge1(class AIInstance *instance)
{
if (!IsValidBridge(bridge_id)) return -1;
uint max = ::GetBridgeSpec(bridge_id)->max_length;
if (max >= MAX_BRIDGE_LENGTH && _settings_game.construction.longbridges) max = MAX_BRIDGE_LENGTH_LONGBRIDGES;
return max + 2;
return min(::GetBridgeSpec(bridge_id)->max_length, _settings_game.construction.max_bridge_length) + 2;
}
/* static */ int32 AIBridge::GetMinLength(BridgeID bridge_id)

View File

@@ -12,9 +12,7 @@
#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.

View File

@@ -9,6 +9,7 @@
/** @file ai_bridgelist.cpp Implementation of AIBridgeList and friends. */
#include "../../stdafx.h"
#include "ai_bridgelist.hpp"
#include "ai_bridge.hpp"
#include "../../bridge.h"

View File

@@ -9,6 +9,7 @@
/** @file ai_cargo.cpp Implementation of AICargo. */
#include "../../stdafx.h"
#include "ai_cargo.hpp"
#include "../../cargotype.h"
#include "../../economy_func.h"

View File

@@ -9,6 +9,7 @@
/** @file ai_cargolist.cpp Implementation of AICargoList and friends. */
#include "../../stdafx.h"
#include "ai_cargolist.hpp"
#include "ai_industry.hpp"
#include "../../cargotype.h"

View File

@@ -15,21 +15,31 @@
* functions may still be available if you return an older API version
* in GetAPIVersion() in info.nut.
*
* \b 1.1.0
* \b 1.1.2
*
* 1.1.0 is not yet released. The following changes are not set in stone yet.
* No changes
*
* \b 1.1.1
*
* No changes
*
* \b 1.1.0
*
* API additions:
* \li IsEnd for all lists.
* \li AIEventTownFounded
* \li AIIndustry::GetIndustryID
* \li AIIndustryType::INDUSTRYTYPE_TOWN
* \li AIIndustryType::INDUSTRYTYPE_UNKNOWN
* \li AIOrder::IsVoidOrder
* \li AIRail::GetName
* \li AITown::IsCity
*
* API removals:
* \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.

View File

@@ -9,6 +9,7 @@
/** @file ai_company.cpp Implementation of AICompany. */
#include "../../stdafx.h"
#include "ai_company.hpp"
#include "ai_error.hpp"
#include "../../command_func.h"

View File

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

View File

@@ -9,6 +9,7 @@
/** @file ai_date.cpp Implementation of AIDate. */
#include "../../stdafx.h"
#include "ai_date.hpp"
#include "../../date_func.h"

View File

@@ -9,6 +9,7 @@
/** @file ai_depotlist.cpp Implementation of AIDepotList and friends. */
#include "../../stdafx.h"
#include "ai_depotlist.hpp"
#include "../../company_func.h"
#include "../../depot_base.h"

View File

@@ -9,6 +9,7 @@
/** @file ai_engine.cpp Implementation of AIEngine. */
#include "../../stdafx.h"
#include "ai_engine.hpp"
#include "ai_cargo.hpp"
#include "../../company_func.h"

View File

@@ -12,9 +12,7 @@
#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"

View File

@@ -9,6 +9,7 @@
/** @file ai_enginelist.cpp Implementation of AIEngineList and friends. */
#include "../../stdafx.h"
#include "ai_enginelist.hpp"
#include "../../company_func.h"
#include "../../engine_base.h"

View File

@@ -9,6 +9,7 @@
/** @file ai_error.cpp Implementation of AIError. */
#include "../../stdafx.h"
#include "ai_error.hpp"
#include "../../core/bitmath_func.hpp"

View File

@@ -9,6 +9,7 @@
/** @file ai_event.cpp Implementation of AIEvent. */
#include "../../stdafx.h"
#include "ai_event_types.hpp"
#include <queue>

View File

@@ -50,6 +50,7 @@ public:
AI_ET_STATION_FIRST_VEHICLE,
AI_ET_DISASTER_ZEPPELINER_CRASHED,
AI_ET_DISASTER_ZEPPELINER_CLEARED,
AI_ET_TOWN_FOUNDED,
};
/**

View File

@@ -52,6 +52,7 @@ void SQAIEvent_Register(Squirrel *engine)
SQAIEvent.DefSQConst(engine, AIEvent::AI_ET_STATION_FIRST_VEHICLE, "AI_ET_STATION_FIRST_VEHICLE");
SQAIEvent.DefSQConst(engine, AIEvent::AI_ET_DISASTER_ZEPPELINER_CRASHED, "AI_ET_DISASTER_ZEPPELINER_CRASHED");
SQAIEvent.DefSQConst(engine, AIEvent::AI_ET_DISASTER_ZEPPELINER_CLEARED, "AI_ET_DISASTER_ZEPPELINER_CLEARED");
SQAIEvent.DefSQConst(engine, AIEvent::AI_ET_TOWN_FOUNDED, "AI_ET_TOWN_FOUNDED");
SQAIEvent.DefSQMethod(engine, &AIEvent::GetEventType, "GetEventType", 1, "x");

View File

@@ -9,6 +9,7 @@
/** @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"
@@ -18,8 +19,15 @@
#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);
@@ -30,6 +38,7 @@ char *AIEventEnginePreview::GetName()
CargoID AIEventEnginePreview::GetCargoType()
{
if (!this->IsEngineValid()) return CT_INVALID;
CargoArray cap = ::GetCapacityOfArticulatedParts(this->engine);
CargoID most_cargo = CT_INVALID;
@@ -46,6 +55,7 @@ CargoID AIEventEnginePreview::GetCargoType()
int32 AIEventEnginePreview::GetCapacity()
{
if (!this->IsEngineValid()) return -1;
const Engine *e = ::Engine::Get(this->engine);
switch (e->type) {
case VEH_ROAD:
@@ -68,6 +78,7 @@ 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;
@@ -76,16 +87,19 @@ 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;
@@ -97,6 +111,7 @@ int32 AIEventEnginePreview::GetVehicleType()
bool AIEventEnginePreview::AcceptPreview()
{
if (!this->IsEngineValid()) return false;
return AIObject::DoCommand(0, this->engine, 0, CMD_WANT_ENGINE_PREVIEW);
}

View File

@@ -12,7 +12,6 @@
#ifndef AI_EVENT_TYPES_HPP
#define AI_EVENT_TYPES_HPP
#include "ai_object.hpp"
#include "ai_event.hpp"
#include "ai_company.hpp"
@@ -297,6 +296,7 @@ public:
private:
EngineID engine;
bool IsEngineValid() const;
};
/**
@@ -800,4 +800,37 @@ private:
StationID station;
};
/**
* Event Town Founded, indicating a new town has been created.
*/
class AIEventTownFounded : public AIEvent {
public:
/** Get the name of this class to identify it towards squirrel. */
static const char *GetClassName() { return "AIEventTownFounded"; }
/**
* @param town The town that was created.
*/
AIEventTownFounded(TownID town) :
AIEvent(AI_ET_TOWN_FOUNDED),
town(town)
{}
/**
* Convert an AIEvent to the real instance.
* @param instance The instance to convert.
* @return The converted instance.
*/
static AIEventTownFounded *Convert(AIEvent *instance) { return (AIEventTownFounded *)instance; }
/**
* Get the TownID of the town.
* @return The TownID of the town that was created.
*/
TownID GetTownID() { return this->town; }
private:
TownID town;
};
#endif /* AI_EVENT_TYPES_HPP */

View File

@@ -454,3 +454,24 @@ void SQAIEventDisasterZeppelinerCleared_Register(Squirrel *engine)
SQAIEventDisasterZeppelinerCleared.PostRegister(engine);
}
namespace SQConvert {
/* Allow AIEventTownFounded to be used as Squirrel parameter */
template <> AIEventTownFounded *GetParam(ForceType<AIEventTownFounded *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (AIEventTownFounded *)instance; }
template <> AIEventTownFounded &GetParam(ForceType<AIEventTownFounded &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(AIEventTownFounded *)instance; }
template <> const AIEventTownFounded *GetParam(ForceType<const AIEventTownFounded *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (AIEventTownFounded *)instance; }
template <> const AIEventTownFounded &GetParam(ForceType<const AIEventTownFounded &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(AIEventTownFounded *)instance; }
template <> int Return<AIEventTownFounded *>(HSQUIRRELVM vm, AIEventTownFounded *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIEventTownFounded", res, NULL, DefSQDestructorCallback<AIEventTownFounded>); return 1; }
} // namespace SQConvert
void SQAIEventTownFounded_Register(Squirrel *engine)
{
DefSQClass <AIEventTownFounded> SQAIEventTownFounded("AIEventTownFounded");
SQAIEventTownFounded.PreRegister(engine, "AIEvent");
SQAIEventTownFounded.DefSQStaticMethod(engine, &AIEventTownFounded::Convert, "Convert", 2, ".x");
SQAIEventTownFounded.DefSQMethod(engine, &AIEventTownFounded::GetTownID, "GetTownID", 1, "x");
SQAIEventTownFounded.PostRegister(engine);
}

View File

@@ -9,6 +9,7 @@
/** @file ai_execmode.cpp Implementation of AIExecMode. */
#include "../../stdafx.h"
#include "ai_execmode.hpp"
#include "../../company_base.h"
#include "../../company_func.h"

View File

@@ -9,6 +9,7 @@
/** @file ai_gamesettings.cpp Implementation of AIGameSettings. */
#include "../../stdafx.h"
#include "ai_gamesettings.hpp"
#include "../../settings_internal.h"

View File

@@ -12,7 +12,6 @@
#ifndef AI_GAMESETTINGS_HPP
#define AI_GAMESETTINGS_HPP
#include "ai_object.hpp"
#include "ai_vehicle.hpp"
/**

View File

@@ -9,6 +9,7 @@
/** @file ai_group.cpp Implementation of AIGroup. */
#include "../../stdafx.h"
#include "ai_group.hpp"
#include "ai_engine.hpp"
#include "../ai_instance.hpp"

View File

@@ -12,7 +12,6 @@
#ifndef AI_GROUP_HPP
#define AI_GROUP_HPP
#include "ai_object.hpp"
#include "ai_vehicle.hpp"
/**

View File

@@ -9,6 +9,7 @@
/** @file ai_grouplist.cpp Implementation of AIGroupList and friends. */
#include "../../stdafx.h"
#include "ai_grouplist.hpp"
#include "../../company_func.h"
#include "../../group.h"

View File

@@ -9,6 +9,7 @@
/** @file ai_industry.cpp Implementation of AIIndustry. */
#include "../../stdafx.h"
#include "ai_industry.hpp"
#include "ai_cargo.hpp"
#include "ai_map.hpp"

View File

@@ -9,6 +9,7 @@
/** @file ai_industrylist.cpp Implementation of AIIndustryList and friends. */
#include "../../stdafx.h"
#include "ai_industrylist.hpp"
#include "../../industry.h"

View File

@@ -9,8 +9,10 @@
/** @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"

View File

@@ -12,8 +12,6 @@
#ifndef AI_INDUSTRYTYPE_HPP
#define AI_INDUSTRYTYPE_HPP
#include "ai_object.hpp"
#include "ai_error.hpp"
#include "ai_list.hpp"
/**

View File

@@ -9,6 +9,7 @@
/** @file ai_industrytypelist.cpp Implementation of AIIndustryTypeList. */
#include "../../stdafx.h"
#include "ai_industrytypelist.hpp"
#include "../../industry.h"

View File

@@ -12,7 +12,6 @@
#ifndef AI_INDUSTRYTYPELIST_HPP
#define AI_INDUSTRYTYPELIST_HPP
#include "ai_list.hpp"
#include "ai_industrytype.hpp"
/**

View File

@@ -9,6 +9,7 @@
/** @file ai_list.cpp Implementation of AIList. */
#include "../../stdafx.h"
#include "ai_list.hpp"
#include "../../debug.h"
#include "../../script/squirrel.hpp"

View File

@@ -9,6 +9,7 @@
/** @file ai_log.cpp Implementation of AILog. */
#include "../../stdafx.h"
#include "ai_log.hpp"
#include "../../core/alloc_func.hpp"
#include "../../company_func.h"

View File

@@ -9,6 +9,7 @@
/** @file ai_map.cpp Implementation of AIMap. */
#include "../../stdafx.h"
#include "ai_map.hpp"
#include "../../tile_map.h"

View File

@@ -9,6 +9,7 @@
/** @file ai_marine.cpp Implementation of AIMarine. */
#include "../../stdafx.h"
#include "ai_marine.hpp"
#include "ai_station.hpp"
#include "../../station_base.h"

View File

@@ -12,7 +12,6 @@
#ifndef AI_MARINE_HPP
#define AI_MARINE_HPP
#include "ai_object.hpp"
#include "ai_error.hpp"
/**

View File

@@ -11,7 +11,11 @@
#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"

View File

@@ -12,7 +12,6 @@
#ifndef AI_OBJECT_HPP
#define AI_OBJECT_HPP
#include "../../stdafx.h"
#include "../../misc/countedptr.hpp"
#include "../../road_type.h"
#include "../../rail_type.h"

View File

@@ -9,6 +9,8 @@
/** @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"
@@ -46,7 +48,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)->GetNumOrders() || order_position == ORDER_CURRENT);
return AIVehicle::IsValidVehicle(vehicle_id) && order_position >= 0 && (order_position < ::Vehicle::Get(vehicle_id)->GetNumManualOrders() || order_position == ORDER_CURRENT);
}
/**
@@ -63,7 +65,14 @@ 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;
}
return v->GetOrder(order_position);
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;
}
/* static */ bool AIOrder::IsGotoStationOrder(VehicleID vehicle_id, OrderPosition order_position)
@@ -122,8 +131,18 @@ static const Order *ResolveOrder(VehicleID vehicle_id, AIOrder::OrderPosition or
{
if (!AIVehicle::IsValidVehicle(vehicle_id)) return 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;
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;
}
@@ -260,7 +279,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 = Vehicle::Get(vehicle_id)->GetOrder(order_position);
const Order *order = ::ResolveOrder(vehicle_id, order_position);
return (OrderPosition)order->GetConditionSkipToOrder();
}
@@ -269,7 +288,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 = Vehicle::Get(vehicle_id)->GetOrder(order_position);
const Order *order = ::ResolveOrder(vehicle_id, order_position);
return (OrderCondition)order->GetConditionVariable();
}
@@ -278,7 +297,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 = Vehicle::Get(vehicle_id)->GetOrder(order_position);
const Order *order = ::ResolveOrder(vehicle_id, order_position);
return (CompareFunction)order->GetConditionComparator();
}
@@ -287,7 +306,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 = Vehicle::Get(vehicle_id)->GetOrder(order_position);
const Order *order = ::ResolveOrder(vehicle_id, order_position);
int32 value = order->GetConditionValue();
if (order->GetConditionVariable() == OCV_MAX_SPEED) value = value * 16 / 10;
return value;
@@ -299,7 +318,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 = Vehicle::Get(vehicle_id)->GetOrder(order_position);
const Order *order = ::ResolveOrder(vehicle_id, order_position);
return (AIOrder::StopLocation)order->GetStopLocation();
}
@@ -486,10 +505,12 @@ 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 = Vehicle::Get(vehicle_id)->GetOrder(order_position);
const Order *order = ::ResolveOrder(vehicle_id, 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);
}

View File

@@ -12,7 +12,6 @@
#ifndef AI_ORDER_HPP
#define AI_ORDER_HPP
#include "ai_object.hpp"
#include "ai_error.hpp"
/**
@@ -113,7 +112,13 @@ public:
CF_INVALID = -1, ///< Invalid compare function, do not use.
};
/** Different constants related to the OrderPosition */
/**
* 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.
*/
enum OrderPosition {
ORDER_CURRENT = 0xFF, ///< Constant that gets resolved to the current order.
ORDER_INVALID = -1, ///< An invalid order.
@@ -452,6 +457,7 @@ 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.
*/

View File

@@ -9,6 +9,7 @@
/** @file ai_rail.cpp Implementation of AIRail. */
#include "../../stdafx.h"
#include "ai_rail.hpp"
#include "ai_map.hpp"
#include "ai_station.hpp"
@@ -19,6 +20,18 @@
#include "../../newgrf.h"
#include "../../newgrf_generic.h"
#include "../../newgrf_station.h"
#include "../../strings_func.h"
/* static */ char *AIRail::GetName(RailType rail_type)
{
if (!IsRailTypeAvailable(rail_type)) return NULL;
static const int len = 64;
char *railtype_name = MallocT<char>(len);
::GetString(railtype_name, GetRailTypeInfo((::RailType)rail_type)->strings.menu_text, &railtype_name[len - 1]);
return railtype_name;
}
/* static */ bool AIRail::IsRailTile(TileIndex tile)
{

View File

@@ -12,8 +12,6 @@
#ifndef AI_RAIL_HPP
#define AI_RAIL_HPP
#include "ai_object.hpp"
#include "ai_error.hpp"
#include "ai_tile.hpp"
/**
@@ -37,9 +35,6 @@ 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]
};
@@ -96,6 +91,18 @@ public:
BT_WAYPOINT, ///< Build a rail waypoint
};
/**
* Get the name of a rail type.
* @param rail_type The rail type to get the name of.
* @pre IsRailTypeAvailable(rail_type).
* @return The name the rail type has.
* @note Since there is no string with only the name of the track, the text which
* is shown in the dropdown where you can chose a track type is returned. This
* means that the name could be something like "Maglev construction" instead
* of just "Maglev".
*/
static char *GetName(RailType rail_type);
/**
* Checks whether the given tile is actually a tile with rail that can be
* used to traverse a tile. This excludes rail depots but includes

View File

@@ -38,47 +38,45 @@ 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_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");
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");
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::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::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");
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");
SQAIRail.DefSQStaticMethod(engine, &AIRail::GetName, "GetName", 2, ".i");
SQAIRail.DefSQStaticMethod(engine, &AIRail::IsRailTile, "IsRailTile", 2, ".i");
SQAIRail.DefSQStaticMethod(engine, &AIRail::IsLevelCrossingTile, "IsLevelCrossingTile", 2, ".i");
SQAIRail.DefSQStaticMethod(engine, &AIRail::IsRailDepotTile, "IsRailDepotTile", 2, ".i");

View File

@@ -9,6 +9,7 @@
/** @file ai_railtypelist.cpp Implementation of AIRailTypeList and friends. */
#include "../../stdafx.h"
#include "ai_railtypelist.hpp"
#include "../../rail.h"
#include "../../company_func.h"

Some files were not shown because too many files have changed in this diff Show More