mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-08-13 01:29:10 +00:00
Compare commits
1 Commits
1.0.0-beta
...
1.0.0-beta
Author | SHA1 | Date | |
---|---|---|---|
|
ebeb4115e9 |
308
changelog.txt
308
changelog.txt
@@ -1,41 +1,3 @@
|
||||
1.0.0-beta3 (2010-01-21)
|
||||
------------------------------------------------------------------------
|
||||
- Feature: Make building (long) roads work like building rail; build upon the first obstruction instead of failing totally [FS#3318] (r18803)
|
||||
- Feature: Allow user customisable compression levels for the zlib compression (r18772)
|
||||
- Feature: [NoAI] Rerandomise AIs on reloading (via the debug window) when they were randomly chosen [FS#3095] (r18763)
|
||||
- Feature: [NewGRF] Implement VarAction2Houses variables 66 and 67 (r18736)
|
||||
- Change: [SDL/Allegro] Make the number of samples/frequency runtime configurable (r18821, r18820)
|
||||
- Change: Be consistent with airport naming [FS#3493] (r18819)
|
||||
- Change: [NewGRF] Consider callback 19 only broken after subcargos 0 to 255 have been used, instead of stopping at 15 (r18774)
|
||||
- Change: Replace MiniLZO with the real library (r18769)
|
||||
- Fix: Town noise population settings could not be changed in-game [FS#3532] (r18864)
|
||||
- Fix: Do not pass AI strings through iconv [FS#3544] (r18862)
|
||||
- Fix: Do not do screen redraw when the landscape contains broken slopes [FS#3540] (r18850)
|
||||
- Fix: Default-waypoint was drawn incorrectly for monorail and maglev in the waypoint picker (r18841)
|
||||
- Fix: In some cases error messages were not properly sent to the client before closing the connection. As a result the client would say 'connection lost' when the cause was something completely different (r18801)
|
||||
- Fix: In some cases with invalid packets one can crash OpenTTD (r18800)
|
||||
- Fix: [SDL] Possible deadlock when killing OpenTTD while starting it [FS#3521] (r18796)
|
||||
- Fix: When copying an 'image' back into the buffer the 32bpp anim blitter triggered palette check of the whole window instead of only the part the got copied back [FS#3504] (r18791)
|
||||
- Fix: Viewport could jump under high CPU load [FS#3515] (r18790)
|
||||
- Fix: Crash when getting the tooltip of the industry amount in the world generation window [FS#3516] (r18787)
|
||||
- Fix: [NoAI] NoAI's custom implementation of DoCommandP has several flaws (not masking of bits, not resetting town authority updates on checks/estimates, ...). Let it use DoCommandPInternal, DoCommandP without showing error messages and such, instead [FS#3507] (r18786)
|
||||
- Fix: [NoAI] AIs did update their last cost incorrectly in network games if the cost of the DC_EXEC phase differed from the ~DC_EXEC phase (r18781)
|
||||
- Fix: [YAPP] Remove a special check for two-sided signals when reserving a path as this causes trains to get stuck in front of them [FS#3483] (r18778)
|
||||
- Fix: Assertions because the unloading and signal wait counter got into eachother's way [FS#3422] (r18764)
|
||||
- Fix: [NewGRF] Spritelayouts do not need an Action 1 if only using default sprites [FS#3497] (r18761)
|
||||
- Fix: [NewGRF] Action 9 did not properly detect whether an Action 8 was encountered already [FS#3500] (r18760)
|
||||
- Fix: [NewGRF] Do not segfault when a NewGRF contains an Action 2 and Action 3 but no Action 0 (r18759)
|
||||
- Fix: [NewGRF] CircularTileSearch skipped a few tiles close to the starting tile, as a result some NewGRF houses could be placed too close together [FS#3495] (r18755)
|
||||
- Fix: The cargo payment button states were not properly set on opening the window [FS#3492] (r18750)
|
||||
- Fix: [NoAI] The AI's name and version in the debug panel was not properly centered [FS#3491] (r18749)
|
||||
- Fix: Clear the cached NewGRFs of a server when receiving a reply instead of when requesting the information. With slow/unstable network connections it would look like the NewGRF settings button went randomly missing [FS#3489] (r18746)
|
||||
- Fix: Do not toggle the sticky- and shading-button twice per mouseclick when clicking fast [FS#3487] (r18744)
|
||||
- Fix: [NewGRF] House prop 1D was trashed when a NewGRF contains prop 14 after prop 1D (r18742)
|
||||
- Fix: Building trees on snow with rocks underneed caused an assert [FS#3501] (r18739)
|
||||
- Fix: When a tree died while there was snow the amount of snow on the tile changed (r18738)
|
||||
- Fix: [NewGRF] VarAction2Station variable 67 was not swapped properly for orientation (r18737)
|
||||
|
||||
|
||||
1.0.0-beta2 (2010-01-05)
|
||||
------------------------------------------------------------------------
|
||||
- Feature: Do not delete the rough/rocky status of a tile when it is covered by snow, this allows rocky tiles under snow if you have a variable snowline (r18719)
|
||||
@@ -43,7 +5,7 @@
|
||||
- Feature: Allow virtually paying a percentage of the leg profit in feeder chains. This to give the user a better chance to get a feeder system without 'losses' (r18703)
|
||||
- Feature: Configurable slope steepness for trains from 0% to 10%, default is 3% as before [FS#3459] (r18674)
|
||||
- Feature: Allow contour-map to be shown with coloured industries in smallmap [FS#567] (r18665)
|
||||
- Add: [NoAI] AIEngine::IsBuildable to check if you can build a certain engine (r18687)
|
||||
- Add [NoAI]: AIEngine::IsBuildable to check if you can build a certain engine (r18687)
|
||||
- Change: [NoAI] Merge buoy and waypoint functions (r18725)
|
||||
- Change: [NoAI] AIEngine::IsValidEngine will now also return true when you have at least one vehicle of that type even if you cannot build it anymore (r18687)
|
||||
- Change: Update Squirrel from 2.2.3 to 2.2.4 (r18639)
|
||||
@@ -66,7 +28,7 @@
|
||||
- Fix: [NewGRF] Tile area of waypoints was not correctly given to NewGRFs in case of multi tile waypoints (r18679)
|
||||
- Fix: [NewGRF] If an action B did not have a 'data' string but would print it OpenTTD would segfault [FS#3452] (r18671)
|
||||
- Fix: Update all tiles when snowline height changes in larger steps than one tile [FS#3455] (r18670)
|
||||
- Fix: [NoAI] Crash when trying to get the order destination of a 'nearest depot' order [FS#3454] (r18667)
|
||||
- Fix: [NoAI] crash when trying to get the order destination of a 'nearest depot' order [FS#3454] (r18667)
|
||||
- Fix: Aircraft on the metropolitan airport took a long route to the closest loading pad [FS#3169] (r18661)
|
||||
- Fix: [NewGRF] Wrong strings drawn for cargo subtype in vehicle details [FS#3443] (r18658)
|
||||
- Fix: When trying to attach a wagon to an existing free wagon chain, do not attach it to itself [FS#3442] (r18653)
|
||||
@@ -93,7 +55,7 @@
|
||||
- Feature: Add the possibility to not make new tree tiles in-game (r18522)
|
||||
- Feature: Moving of AIs in the AI configuration window [FS#3359] (r18516)
|
||||
- Feature: Make maximum pathfinder penalties for finding depots customisable, also increase it slightly to 20 tiles worth of penalties (r18481)
|
||||
- Feature: [Strgen] Allow G and P to 'select' substrings of STRINGn for getting their gender (r18444)
|
||||
- Feature: [strgen] Allow G and P to 'select' substrings of STRINGn for getting their gender (r18444)
|
||||
- Feature: Make penalty for road stop occupancy user configurable (r18404)
|
||||
- Feature: Fully scalable, by font size and content, GUI and improved right-to-left language support [FS#1905] (r15800-r18350)
|
||||
- Feature: Set the start time of a timetable (r18294)
|
||||
@@ -157,7 +119,7 @@
|
||||
- Change: Make pause on join pause during the whole joining (including download) phase [FS#3287] (r18054)
|
||||
- Change: Prefer extmidi over allegro midi and allegro over null driver [FS#3272] (r17875)
|
||||
- Change: Several improvements to the performance of CargoPackets/CargoLists; time spent in those functions reduces by 55-85% (r17840, r17836, r17818, r17814, r17812, r17801, r17736, r17735, r17733, r17731, r17730)
|
||||
- Change: [SDL] Make 'update the video card'-process asynchronious. Improvements of 2%-25% (real time) during fast forward on dual core/hyperthreading-enabled CPUs (r17776)
|
||||
- Change: [SDL] make 'update the video card'-process asynchronious. Improvements of 2%-25% (real time) during fast forward on dual core/hyperthreading-enabled CPUs (r17776)
|
||||
- Change: [NoAI] Make AIEngine:CanRefitCargo() not report refittability to Mail by default for aircraft. It is not necessarily true, and the special case of carrying both passenger&mail is better handled by AIs themself than by the API (r17719)
|
||||
- Change: [OSX] Do not use deprecated methods/undocumented functions [FS#1411] (r17712, r17711)
|
||||
- Change: Make SDL's video driver more likely to be loaded than Allegro's video driver; SDL seems to perform better (r17583)
|
||||
@@ -240,7 +202,7 @@
|
||||
- Fix: When moving a wagon and only the last part of a dual headed engine you could split the dual headed engine over two vehicles. This could be used to crash servers [CVE-2009-4007] (r18462)
|
||||
- Fix: [Windows] Forgot to load the symbol from SDL.dll (r18439)
|
||||
- Fix: Do not run the 'jam protection' for vehicles in a depot [FS#3360] (r18428)
|
||||
- Fix: [Windows] The help window would be too large in some cases [FS#3327] (r18424)
|
||||
- Fix: [Windows] the help window would be too large in some cases [FS#3327] (r18424)
|
||||
- Fix: Under some circumstances a pointer could be left untouched and then freed. Make sure this does not happen by ensuring it starts out as NULL instead of 'garbage' [FS#3298] (r18418)
|
||||
- Fix: On slopes the original and better road layouts did not check their minimum distance requirements [FS#3332] (r18415)
|
||||
- Fix: Aqueducts were not influenced by the 'long bridges' setting [FS#3338] (r18407)
|
||||
@@ -388,7 +350,7 @@
|
||||
0.7.2-RC2 (2009-07-21)
|
||||
------------------------------------------------------------------------
|
||||
- Fix: When marking trains stuck do not reset the unload/stuck counter when the vehicle is unloading. It will be automatically reset once the vehicle wants to leave the station [FS#3038] (r16901)
|
||||
- Fix: [NoAI] Small errors in the API documentation [FS#3037] (r16865)
|
||||
- Fix: [NoAI]: Small errors in the API documentation [FS#3037] (r16865)
|
||||
- Fix: Savegames from before 0.4 would get their waypoint 'index' messed up (r16854)
|
||||
- Fix: Cargo payments were not destroyed when a vehicle was destructed. This only happened when you crashed a vehicle while it was unloading [FS#3032, FS#3046] (r16801)
|
||||
|
||||
@@ -404,7 +366,7 @@
|
||||
- Fix: Houses would not get build on the map edge [FS#3025] (r16795)
|
||||
- Fix: Audio playback rate was fixed at 11025Hz regardless of the rate specified to the audio driver, resulting in incorrect playback speed. It is still preferable to use 11025Hz output rate if possible as OpenTTD's sample rate converter is very low quality (r16784)
|
||||
- Fix: Do not use the same error message for turning around road vehicles and flipping parts of trains in the depot [FS#3019] (r16772)
|
||||
- Fix: [Windows] The binary packages would not get their readme converted to DOS line endings (r16769)
|
||||
- Fix: The win32 and win64 binary packages would not get their readme converted to DOS line endings (r16769)
|
||||
- Fix: [NoAI] AITile::GetCargoProduction/Acceptance did not accept a radius of 0 anymore (r16767)
|
||||
- Fix: In the refit window the 'Select cargo type to carry' line always showed the ship refit tooltip [FS#3018] (r16757)
|
||||
- Fix: When loading a savegame Engine::grffile might be left NULL in certain cases (dynamic_engines enabled, articulated vehicle with only wagon-override action3s) (r16737)
|
||||
@@ -573,7 +535,7 @@
|
||||
0.7.0-RC2 (2009-03-23)
|
||||
------------------------------------------------------------------------
|
||||
- Change: [NewGRF] Expose GRF ID of engines in var action property 0x25 (r15739)
|
||||
- Fix: Some (newer) GCCs have trouble compiling the Windows specific part of fontcache.cpp; jumps across variable declarations [FS#2752] (r15818)
|
||||
- Fix: Some (newer) GCCs have trouble compiling the Win32 specific part of fontcache.cpp; jumps across variable declarations [FS#2752] (r15818)
|
||||
- Fix: When sorting on cost do not sort on the running cost [FS#2749] (r15778)
|
||||
- Fix: Do not show the message about reporting an AI crash for the dummy AI (r15774)
|
||||
- Fix: Number of active clients was not always properly updated [FS#2475] (r15773)
|
||||
@@ -628,7 +590,7 @@
|
||||
- Fix: Undeterministic file sorting when the date is equal for all files [FS#2716] (r15657)
|
||||
- Fix: Changing vehicle.dynamic_engines when there are already vehicles can cause crashes (r15656, r15586)
|
||||
- Fix: Only ever call any vehicle callbacks after the whole articulated engine has been built (except 0x16) (r15654)
|
||||
- Fix: C++'s new (this) is seldom a good idea as destructors of member variables are not run causing memory leaks [FS#2706] (r15652)
|
||||
- Fix: new (this) is seldom a good idea as destructors of member variables are not run causing memory leaks [FS#2706] (r15652)
|
||||
- Fix: [OSX] Hack around an OSX stupidity in < 10.4 w.r.t. signals by not having any signal handling support for OSX < 10.4 (r15648)
|
||||
- Fix: Add an EngineOverrideManager to give the term 'compatible NewGRF' again some sense and to not crash because of trivial changes [FS#2612] (r15645)
|
||||
- Fix: Closing a network connection twice in the case that sending packets starts failing while disconnecting [FS#2710] (r15644)
|
||||
@@ -650,8 +612,8 @@
|
||||
- Fix: Crash when saving a preset with unknown NewGRFs [FS#2646] (r15561)
|
||||
- Fix: The font width cache was not updated when changing fonts causing the font spacing to be off when changing fonts in-game (auto font detection) (r15557)
|
||||
- Fix: -v null crashing in 2051 due to trying to show the high score of the spectator (r15554)
|
||||
- Fix: [NoAI] Crash when setting a depot order to the southern part of a ship depot [FS#2656] (r15551)
|
||||
- Fix: The keep_all_autosave setting was ignored for dedicated servers/spectators [FS#2651] (r15546)
|
||||
- Fix: [NoAI] crash when setting a depot order to the southern part of a ship depot [FS#2656] (r15551)
|
||||
- Fix: keep_all_autosave was ignored for dedicated servers/spectators [FS#2651] (r15546)
|
||||
- Fix: If a buoy was placed directly in front of a dock, that dock was seen as a buoy and thus skipped once within 3 tiles [FS#2653] (r15545)
|
||||
- Fix: Extracting downloaded content did not work for Windows if one uses a non-ASCII path [FS#2650] (r15544)
|
||||
- Fix: [NewGRF] When articulated parts have no available default cargo, use the cargo type of the first part for livery selection [FS#2617] (r15541)
|
||||
@@ -709,7 +671,7 @@
|
||||
- Feature: Double click to join selected server/company (r14209)
|
||||
- Feature: Allow both the German as well as non-German toyland graphics as 'correct' and official graphics (r14197)
|
||||
- Feature: Allow people to create their own base graphics easily and without requiring code changes (r14197)
|
||||
- Feature: [NewGRF] Add support for property 0x13 for Bridges. In other words, one can now specifies a 16 bits cost multiplier (r14172)
|
||||
- Feature: [NewGRF]: Add support for property 0x13 for Bridges. In other words, one can now specifies a 16 bits cost multiplier (r14172)
|
||||
- Feature: Make it possible to choose between the DOS and Windows graphics packs while retaining the possibility to override the palette (r14151)
|
||||
- Feature: Increase the size of the console backlog. Now it'll only remove backlog items when there are more than a threshold and when they are there longer than (another) threshold (r14056)
|
||||
- Feature: Make it possible to filter list_patches output like it's done for other list_* console commands (r14041)
|
||||
@@ -820,7 +782,7 @@
|
||||
- Fix: Moving the first vehicle of a train elsewhere might require a new unitnumber for the remaining chain which might not be available (r14384)
|
||||
- Fix: Trams jumping when reversing on a single trambit (like caused during road construction reworks) or when (manually) reversing in a corner [FS#1852] (r14371)
|
||||
- Fix: Multiheaded parts in free wagon chains were not connected (could cause desyncs) (r14366, r14362)
|
||||
- Fix: [Windows] Some keypress combinations could be handled twice [FS#2206] (r14363)
|
||||
- Fix: [Win32] Some keypress combinations could be handled twice [FS#2206] (r14363)
|
||||
- Fix: The ownership of roadtiles was not properly set for very old savegames (including TTD's) making it impossible to remove some pieces of road [FS#2311] (r14359)
|
||||
- Fix: Desync due to randomly ordered vehicle hash by flooding and road vehicle overtake/following (r14356, r14258)
|
||||
- Fix: Signs were not updated on company bankruptcy/sell, and thus could have the colour of invalid player (r14348)
|
||||
@@ -853,7 +815,7 @@
|
||||
- Fix: Incorrect cargo weights (r14144)
|
||||
- Fix: GetSlopeZ() gets a virtual coordinate, not a tile (r14139)
|
||||
- Fix: Close the 'manage vehicles' dropdown once the number of vehicles in the list reaches 0 [FS#2249] (r14133)
|
||||
- Fix: [Strgen] Changing order of parameters {X:...} did not work for strings including some {StringY} (r14111)
|
||||
- Fix: [strgen] Changing order of parameters {X:...} did not work for strings including some {StringY} (r14111)
|
||||
- Fix: Desync due to bubbles in toyland (r14110)
|
||||
- Fix: Make NewGRF action 0x06's changes persistent over the several loading stages [FS#1986] (r14102)
|
||||
- Fix: Make the 'Transfer Credit' display aware of the entire consist, not only the first vehicle (r14098)
|
||||
@@ -864,7 +826,7 @@
|
||||
- Fix: NewGRF callback 23 did not use the NewGRF compatible text stack [FS#2224] (r14058)
|
||||
- Fix: NewGRF text stack's 'push word' did not move the data around properly (r14057)
|
||||
- Fix: Long strings in the edit box would cause OpenTTD to stop drawing the string. This is especially noticable with low resolutions and the chat input box (r14054)
|
||||
- Fix: [OSX] Changed the condition for selecting 8 or 32 bpp blitter by default. Now we will pick 32 bpp if no 8 bpp fullscreen resolutions are available on the main display (the one with the dock) (r14032)
|
||||
- Fix: [OSX] changed the condition for selecting 8 or 32 bpp blitter by default. Now we will pick 32 bpp if no 8 bpp fullscreen resolutions are available on the main display (the one with the dock) (r14032)
|
||||
- Fix: Crash when the AI tries to find the depot of an airport that does not have a depot [FS#2190] (r13999)
|
||||
- Fix: MSVC cannot handle changed files in the prebuild event, so make the version determination a separate subproject [FS#2004] (r13998)
|
||||
- Fix: The dedicated console removed any character that was not a printable ASCII character instead. Now it allows UTF8 formated strings too [FS#2189] (r13992)
|
||||
@@ -997,7 +959,7 @@
|
||||
- Fix: Infinite loop in case your compiler decides that enums are unsigned by default (r12622)
|
||||
- Fix: The convert signal button disallowed signal dragging when the signal GUI was closed (r12577)
|
||||
- Fix: Binding to a specific IP could cause OpenTTD to not register properly with the masterserver if one has multiple external interfaces (r12574)
|
||||
- Fix: The function min() has 32bit arguments, clamping of 64bit values did not work (r12572)
|
||||
- Fix: min() has 32bit arguments, clamping of 64bit values did not work (r12572)
|
||||
- Fix: Towns could not terraform when inflation rised terraform prices enough (r12564)
|
||||
- Fix: Do not affect town rating change by the order in which we examine stations (r12561)
|
||||
- Fix: Redraw the signal GUI when the signal drag density changes in the patch settings and vice versa (r12553)
|
||||
@@ -1029,7 +991,7 @@
|
||||
- Fix: Refresh vehicle details window when cached values are updated (r12378)
|
||||
- Fix: Set cached value for vehicle property 25 before other cached values [FS#1854] (r12377)
|
||||
- Fix: Do not close a dropmenu when clicking on a dropdown widget (r12374)
|
||||
- Fix: Windows music driver fails if path is too long or if containing non-latin chars [FS#1849] (r12373, r12372)
|
||||
- Fix: win32 music driver fails if path is too long or if containing non-latin chars [FS#1849] (r12373, r12372)
|
||||
- Fix: Do not let window hide behind the main toolbar after resizing the screen [FS#1823] (r12371)
|
||||
- Fix: Close language drop down when parent window is clicked/closed [FS#1853] (r12370)
|
||||
- Fix: Reset train speed limits when _patches.realistic_acceleration changes (r12369)
|
||||
@@ -1065,7 +1027,7 @@
|
||||
- Fix: YAPF and NTP did not apply penalty for uphill tracks on steep slopes (r12313)
|
||||
- Fix: Restore timetable from backupped orders and add group ID to the backup [FS#1549] (r12296)
|
||||
- Fix: Do not draw trees nor lamps between tram tracks (r12290) [FS#1807]
|
||||
- Fix: [Windows] Do not create save dir on install (r12269)
|
||||
- Fix: [Win32] Do not create save dir on install (r12269)
|
||||
- Fix: Autoreplace did not update vehicle index for timetable window [FS#1805] (r12261)
|
||||
- Fix: GetProductionAroundTiles() may fail if only the second production slot exists (r12258)
|
||||
- Fix: Town variables 0x9E to 0xAD (company ratings) returned wrong values (r12247)
|
||||
@@ -1186,14 +1148,14 @@
|
||||
- Fix: Do not allow modifying roadbits when other roadtypes would need different foundation (r11953)
|
||||
- Fix: Loading of very old savegames was broken (r11951)
|
||||
- Fix: Slope detection of bridge ramps. Helps YAPF and Trolly (r11946)
|
||||
- Fix: [Windows] FileExists() failed for non latin paths (r11945)
|
||||
- Fix: FileExists() failed for non latin paths (win32) (r11945)
|
||||
- Fix: Allow building drive-through road/tram stops at road/tram track that has no owner (r11944)
|
||||
- Fix: 'BRIDGE_TOO_LOW_FOR_TERRAIN'-check was wrong for steep slopes (r11936)
|
||||
- Fix: [Autoreplace] Single to dualhead locomotive replacefailed when player had enough money to replace and refit one but not enough to refit the last one as well [FS#1624] (r11929)
|
||||
- Fix: [Autoreplace] Autoreplace could refit train engines to the wrong cargo type if the old engine had no cargo capacity and the new one had (r11928)
|
||||
- Fix: Loading old, pre savegame version 2, savegames (r11925)
|
||||
- Fix: AI was reading wrong tile slope while building road bridge (r11917)
|
||||
- Fix: Set correctly crossing state after train reversal, train leaving crossing, train crash (r11900)
|
||||
- Fix: set correctly crossing state after train reversal, train leaving crossing, train crash (r11900)
|
||||
- Fix: Segmentation faults/wrong frees due uninitialized memory in the AI [FS#1658] (r11887)
|
||||
- Fix: Assert when trying to remove rail from a house or industry tile [FS#1663,FS#1665-6-7-8,FS#1680,FS#1686-7-8 FS#1715 FS#1742 FS#1771 FS#1776](r11883)
|
||||
- Fix: Crash in MP in vehicle group window if the currently selected group is deleted by another player (r11878)
|
||||
@@ -1458,7 +1420,7 @@
|
||||
- Fix: Clone vehicles will no longer refit for free (r9689)
|
||||
- Fix: Improved loading does not use a huge amount of processing power anymore when having a lot of trains [FS#423] (r9683)
|
||||
- Fix: Truncate the NewGRF information text in the NewGRF GUI if it is too long (r9449)
|
||||
- Fix: Cancel in password queries reduces amount of players in the network game when they have not joined the game yet [FS#688] (r9378)
|
||||
- Fix: Cancel in password queries reduces amount of players in the network game when they have not joined the game yet [FS#688] r9378
|
||||
- Fix: If all news-setting buttons show 'full', make the ALL-button show 'full' too (r9137)
|
||||
- Fix: Open and close messages now have their own setting, so you can hide economy changes, but do show open/close of industries [FS#525] (r9097)
|
||||
- Fix: Do not make owner signs transparent, as then you loose the information who it owns [FS#637] (r9067)
|
||||
@@ -1476,8 +1438,8 @@
|
||||
- Fix: Rail vehicles can no longer enter tunnels or bridgeheads with wrong railtype (r7976)
|
||||
- Fix: When path finding onto a bridge or tunnel end from previous tile (but not warping from the opposite end) check the enter direction. This fixes signal setting if a rail ends on the top of a tunnel end (r7718)
|
||||
- Fix: When following path for signals, do not skip back to the previous tile, as for tunnels and bridge ends the entering direction is wrong (r7717)
|
||||
- Fix: [YAPF] Suppress 'Train is lost' message if path finding ended on the first two-way red signal due to YAPF.rail_firstred_twoway_eol option (r7628)
|
||||
- Fix: [OPF] Signal update was incorrectly propagated (r7620)
|
||||
- Fix: [YAPF] suppress 'Train is lost' message if path finding ended on the first two-way red signal due to YAPF.rail_firstred_twoway_eol option (r7628)
|
||||
- Fix: [OPF] signal update was incorrectly propagated (r7620)
|
||||
|
||||
|
||||
0.5.3 (2007-09-15)
|
||||
@@ -1522,7 +1484,7 @@
|
||||
0.5.3-RC1 (2007-06-28)
|
||||
------------------------------------------------------------------------
|
||||
- Feature: Make the client list window (for network games) stickyable (r10293)
|
||||
- Feature: Console command to get the current game date (r10137)
|
||||
- Feature: console command to get the current game date (r10137)
|
||||
- Fix: Waypoints could be renamed when you are not the owner (r10368)
|
||||
- Fix: Smooth economy did not close primary industries and it allowed increasing of production of industries that should not have rising productions (r10348, r10347, r10290)
|
||||
- Fix: Acceleration for trains on slopes is not calculated properly [FS#786] (r10344, r10317)
|
||||
@@ -1582,7 +1544,7 @@
|
||||
- Fix: Only non dedicated servers cannot have 0 players [FS#765] (r9785)
|
||||
- Fix: Remove arbitrary limit on length of NewGRF strings (r9775)
|
||||
- Fix: [NewGRF] Ignore axis-bit of station tile layouts [FS#756] (r9758)
|
||||
- Fix: [Windows] Dead key and open/close console (r9728)
|
||||
- Fix: [win32] Dead key and open/close console (r9728)
|
||||
- Fix: When you have closed the 'Load game'/'New game' windows which you started from the 'start server' menu, you should not start a server when starting a new game [SF#1244842] (r9757)
|
||||
- Fix: Trains were lost after autorenewal/autoreplace [FS#732] (r9753)
|
||||
- Fix: Stop flooded towns from building roads on water [FS#598] (r9743)
|
||||
@@ -1617,8 +1579,8 @@
|
||||
|
||||
0.5.1-RC2 (2007-03-23)
|
||||
------------------------------------------------------------------------
|
||||
- Fix: Crashes when the chatbox would be drawn outside of the main window [FS#701] (r9420)
|
||||
- Fix: Reading out of an array caused a segmentation fault [FS#694] (r9394)
|
||||
- Fix: crashes when the chatbox would be drawn outside of the main window [FS#701] (r9420)
|
||||
- Fix: reading out of an array caused a segmentation fault [FS#694] (r9394)
|
||||
|
||||
|
||||
0.5.1-RC1 (2007-03-20)
|
||||
@@ -1640,7 +1602,7 @@
|
||||
- Fix: Difficulty level button was not selected when opening the difficulty window (r9117)
|
||||
- Fix: The wrong catenary wires were drawn for tunnel entrances [FS#612] (r9077)
|
||||
- Fix: The intercontinental airport used 'T-junction' runway sprites when there is no exit in the middle of the runway as in the city airport [FS#529] (r9076)
|
||||
- Fix: [Windows] Dedicated console now does not need an extra 'enter' to fully quit [FS#459] (r9074)
|
||||
- Fix: [win] dedicated console now does not need an extra 'enter' to fully quit [FS#459] (r9074)
|
||||
- Fix: Take over companies properly in multiplayer games [FS#459] (r9071)
|
||||
- Fix: When a bribe failed and you have not picked up cargo yet, you would never be able to do so for a given station [FS#404] (r9070)
|
||||
- Fix: Do not keep on scrolling for non-numeric values in settings, but require reclick [FS#663] (r9064)
|
||||
@@ -1650,12 +1612,12 @@
|
||||
- Fix: Play the correct engine sound based on the engine type instead of the sprite (r9009)
|
||||
- Fix: New locomotive names were not announced in the news, it said 'new railway locomotive available - railway locomotive' [FS#581] (r9000, r9001)
|
||||
- Fix: [NewGRF] Do not select a disabled platform length/number of track count when going out of drag-drop mode [FS#450] (r8999)
|
||||
- Fix: [Windows] Resolution doubled in cfg file when fullscreen mode used [FS#642] (r8994)
|
||||
- Fix: [win] Resolution doubled in cfg file when fullscreen mode used [FS#642] (r8994)
|
||||
- Fix: The industry list should also be (re)set when the number of industries is 0 [FS#656] (r8980)
|
||||
- Fix: [Windows] Possible buffer overflow if unicode text is pasted into an input box and needs trimming (r8975)
|
||||
- Fix: [Windows] Support compilation with the Vista Platform SDK (r8974)
|
||||
- Fix: [win] Possible buffer overflow if unicode text is pasted into an input box and needs trimming (r8975)
|
||||
- Fix: [win] Support compilation with the Vista Platform SDK (r8974)
|
||||
- Fix: Crash on loading savegames with GRFs that do not have their GRF info/name set (r8955)
|
||||
- Fix: [NewGRF] Support for vehicle variable 48 was wrong (r8943)
|
||||
- Fix: [NewGRF] support for vehicle variable 48 was wrong (r8943)
|
||||
|
||||
|
||||
0.5.0 (2007-02-27)
|
||||
@@ -1714,10 +1676,10 @@
|
||||
------------------------------------------------------------------------
|
||||
- Codechange: Add Lithuanian language as an official translation (r7806)
|
||||
- Fix: The configure script did not work work for dash, a sh compatible shell [FS#485] (r7893)
|
||||
- Fix: [OSX] Control + enter no longer fullscreens, interfered with team-chat (r7886)
|
||||
- Fix: [OSX] control + enter no longer fullscreens, interfered with team-chat (r7886)
|
||||
- Fix: Offset engines/wagons by half width in details window; fixes overflowing for display (r7864)
|
||||
- Fix: [OSX] Remove incorrect debug message about missing grf files (r7766)
|
||||
- Fix: [SDL] Sometimes ALT-TAB could trigger the fast forward (r7727)
|
||||
- Fix: [sdl] sometimes ALT-TAB could trigger the fast forward (r7727)
|
||||
|
||||
|
||||
0.5.0-RC2 (2006-12-31)
|
||||
@@ -1753,7 +1715,7 @@
|
||||
- Feature: Allow towns to be built on top of trees in the scenario editor [FS#396] (r7152)
|
||||
- Feature: Allow over-building of compatible railtypes, i.e. normal and electrified rail. If building electrified rail, normal rail is upgraded for you (at a cost) (r7106)
|
||||
- Feature: Additional positioning for long dropdown lists with scrollbar support if dropdown list would not fit (r7086)
|
||||
- Feature: [Windows] Remember the window size between restarts when quit in fullscreen mode (r7061)
|
||||
- Feature: [win32] Remember the window size between restarts when quit in fullscreen mode (r7061)
|
||||
- Feature: Increase the chatbuffer of chat messages, messages longer than the graphical box will be wrapped to a new line (r6956)
|
||||
- Feature: Allow typing longer text than visible for an editbox; it will scroll properly now (r6954)
|
||||
- Feature: Allow spectators to team-speak to eachother (r6933)
|
||||
@@ -1784,7 +1746,7 @@
|
||||
- Feature: Possibility to generate scenarios by importing heightmaps. It can be in PNG or BMP format
|
||||
- Feature: New (optional) landscape generator based on TerraGenesis Perlin noise with GUI, progress bar and fine-tuning options (r5946)
|
||||
- Feature: Filter for textboxes to only allow input of certain patterns (like numbers only) (r5944)
|
||||
- Feature: [Windows] Remember the maximized state of the game window and restore on start [FS#234] (r5874)
|
||||
- Feature: [win32] Remember the maximized state of the game window and restore on start [FS#234] (r5874)
|
||||
- Feature: Add an icon to the SDL openttd executable (r5872)
|
||||
- Feature: Also allow horizontal and vertical rails on steep slopes (r5864)
|
||||
- Feature: Allow building of (certain) rails, roads and bridge ramps on steep sloped tiles (r5833)
|
||||
@@ -1827,10 +1789,10 @@
|
||||
- Codechange: Remove the 'unsorted' vehicle sorter, because it's plain useless (r6270)
|
||||
- Codechange: Remove MSVC6 support. The compiler was too stupid and too many workarounds were needed. Please switch to mingw or VC2005++ express (r5286)
|
||||
- Codechange: Allow a switch in Makefile.config to disable threads in OpenTTD (r5978)
|
||||
- Codechange: [Windows] Add native x64 target to VS2005 project files (r5813)
|
||||
- Codechange: [Windows] The exception dialog showed the last modification-date of win32.c instead of the last compilation-date (r5801)
|
||||
- Codechange: [win32] Add native x64 target to VS2005 project files (r5813)
|
||||
- Codechange: [win32]The exception dialog showed the last modification-date of win32.c instead of the last compilation-date (r5801)
|
||||
- Codechange: Add owner attribute to canals and locks. This makes them more useful in multiplayer games, as only the owner can delete them. Does not affect usage (r5084)
|
||||
- Codechange: [Windows] Add MSVC2005 support, project and solution files are in the _vs80.* files (r4581)
|
||||
- Codechange: Add MSVC2005 support, project and solution files are in the _vs80.* files (r4581)
|
||||
- Codechange: [OSX] Shark (Xcode's profiling tool) can now relate CPU usage to lines (r3611)
|
||||
- Codechange: Rewrite the multistop slot assignment system. More resource-friendly, several slot-assignment improvements (r3730, r4259)
|
||||
- Codechange: Completely remove the deprecated -p parameter (is superseded by -n) (r3508)
|
||||
@@ -1872,7 +1834,7 @@
|
||||
- Fix: Disable main toolbar buttons showing company list drop downs when there are no companies [FS#356] (r6695)
|
||||
- Fix: Autoreplace can now use the money for selling the old vehicle to build the new one (r6640)
|
||||
- Fix: A loop-hole that allowed docks to be built regardless of town authority rating (r6477)
|
||||
- Fix: [Windows] The dedicated server could overwrite the keyboard input buffer before it was handled by OpenTTD (r6449)
|
||||
- Fix: [win32] The dedicated server could overwrite the keyboard input buffer before it was handled by OpenTTD (r6449)
|
||||
- Fix: Reset the location of the last sound as that location can be outside the map when you are loading another, (smaller) map (r6437)
|
||||
- Fix: Show an error message when executing 'scrollto x' with x < 0 or >= MapSize() instead of asserting later on [FS#340] (r6435)
|
||||
- Fix: Station catchment area persists after switching tools [FS#136] (r6368)
|
||||
@@ -1946,7 +1908,7 @@
|
||||
- Fix: Crash when sorting an empty server list
|
||||
- Fix: The build-tree window button defaulted to a place-push-button on opening where no treetype is selected
|
||||
- Fix: Game crashes when cloning/autoreplace reaches train-limit
|
||||
- Fix: [NTP] Properly check for railtypes on non-plain-rail-tiles
|
||||
- Fix: [NTP] properly check for railtypes on non-plain-rail-tiles
|
||||
- Fix: Trains could enter certain sloped rail tiles under bridges with incompatible rail type
|
||||
- Fix: Ensure the map memory is cleared after it is allocated. This fixes random deserts that sometimes occurred
|
||||
- Fix: Some weird behaviour with tile selection near bridges
|
||||
@@ -1966,9 +1928,9 @@
|
||||
- Fix: Removing roads on crossings was done without a check for ownership
|
||||
- Fix: [Autoreplace] Fix drawing of train list for outdated engines
|
||||
- Fix: Malicious clients/servers could crash the game [CVE-2006-1999, CVE-2006-1998]
|
||||
- Fix: [Autoreplace] Allow replacement of wagons even when the engine fails to be replaced
|
||||
- Fix: [Autoreplace] allow replacement of wagons even when the engine fails to be replaced
|
||||
- Fix: Certain operations involving trains inside a depot could cause a crash
|
||||
- Fix: [Autoreplace] Cost for refitting a new vehicle is added to the cost animation (player always paid for it, it just was not shown)
|
||||
- Fix: [Autoreplace] cost for refitting a new vehicle is added to the cost animation (player always paid for it, it just was not shown)
|
||||
- Fix: [OSX] Save/Load issues solved for OSX 10.3.9 universal binaries
|
||||
- Fix: Illegal servers in the master-server list could kick the client back to the main menu, effectively making Multiplayer impossible
|
||||
- Fix: [NPF] Do not mark tiles when debugging in multiplayer, this will cause desyncs
|
||||
@@ -1978,7 +1940,7 @@
|
||||
0.4.7 (2006-03-26)
|
||||
------------------------------------------------------------------------
|
||||
- Feature: [OSX] Add support for triple-binaries (PPC, PPC970, i386) (r4102)
|
||||
- Fix: [OSX] Crash when going to fullscreen (r4100)
|
||||
- Fix: [OSX] crash when going to fullscreen (r4100)
|
||||
- Fix: Allow unused wagons to have their first cache set. Fixes faulty cache-warning message and noticably speeds up depot operations (r4094)
|
||||
- Fix: [NPF] Trains & busses were unable to find a route when leaving a depot or bus stop (r4072)
|
||||
|
||||
@@ -1986,12 +1948,12 @@
|
||||
0.4.6 (2006-03-22)
|
||||
------------------------------------------------------------------------
|
||||
|
||||
- Codechange: [Windows] Show the revision in crash.txt and enable the button to show the crash text in the crash-window (r3965)
|
||||
- Codechange: [win32] Show the revision in crash.txt and enable the button to show the crash text in the crash-window (r3965)
|
||||
- Codechange: Add additional linker information to release builds to help figure out crashes more easily (r3526)
|
||||
- Fix: [OSX] Cannot save game if name contains german umlauts (loading savegames with certain chars still look odd) [SF#1157244] (r4038)
|
||||
- Fix: [OSX] Major speedup for PPC fullscreen (r4034)
|
||||
- Fix: [OSX] major speedup for PPC fullscreen (r4034)
|
||||
- Fix: [Makefile] Make sure the ICON_DIR gets created before copying files there (r4032)
|
||||
- Fix: [Windows] Change compiler settings to use the multithreaded CRT. This prevents certain crashes on multi-threaded machines (r4031)
|
||||
- Fix: [win32] Change compiler settings to use the multithreaded CRT. This prevents certain crashes on multi-threaded machines (r4031)
|
||||
- Fix: [NPF] Road vehicles planning through the back of depots and stations [SF#1453646] (r4029)
|
||||
- Fix: Use the title of a savegame in the saveload dialog-editbox (r4018)
|
||||
- Fix: Improper resolution written to the configuration file when exiting from fullscreen (r4017)
|
||||
@@ -2011,11 +1973,11 @@
|
||||
- Fix: The tooltips for raising and lowering land buttons in the scenario editor are interchanged [FS#61] (r3959)
|
||||
- Fix: Correctly restore the roadside after roadworks are finished (r3957)
|
||||
- Fix: [Multistop] Check the status of the destination road stop instead of a station's first road stop. This only has effect with road vehicle queuing disabled (r3956)
|
||||
- Fix: Validate the setting of max_companies/spectators through the console (r3955)
|
||||
- Fix: validate the setting of max_companies/spectators through the console (r3955)
|
||||
- Fix: Improve game-load times (r3954)
|
||||
- Fix: On loading a game, GetPlayerRailtypes() did not account for the fact that vehicles are introduced a year after their introduction date. This will also relieve possible (rare) network desyncs (r3952)
|
||||
- Fix: Restore plural forms of cargo types for several languages (r3951)
|
||||
- Fix: [Windows] Add directives to allow Visual Studio 2005 compilation (r3950)
|
||||
- Fix: [win32] Add directives to allow Visual Studio 2005 compilation (r3950)
|
||||
- Fix: Crash in string code with openbsd/zaurus; alignment issues [SF#1415782] (r3948)
|
||||
|
||||
|
||||
@@ -2032,10 +1994,10 @@
|
||||
- Feature: New display option: 'transparent station signs' (r2438)
|
||||
- Feature: You can now give transfer order to set up feeder systems (r2441)
|
||||
- Feature: Removing tracks with the 'remove' tool, automatically removes signals on the tracks (r2469)
|
||||
- Feature: [Localisation] Allow changing the order of parameters in translated strings (r2573)
|
||||
- Feature: [Localisation] New way to specify plural forms (r2592)
|
||||
- Feature: [Localisation] Support genders (r2594)
|
||||
- Feature: [Localisation] Support cases (r2597)
|
||||
- Feature: [localisation] Allow changing the order of parameters in translated strings (r2573)
|
||||
- Feature: [localisation] New way to specify plural forms (r2592)
|
||||
- Feature: [localisation] Support genders (r2594)
|
||||
- Feature: [localisation] Support cases (r2597)
|
||||
- Feature: Add support for truncating strings to a given (pixel) length (r2607)
|
||||
- Feature: Overhaul DirectMusic MIDI backend, remove 'experimental' status (r2712)
|
||||
- Feature: Change the driver probing algorithm: Use the first music/sound/video which succeeds initialising instead of bailing out after the first. No need to specify -snull if no soundcard is present anymore (r2728)
|
||||
@@ -2043,7 +2005,7 @@
|
||||
- Feature: Clone vehicles (r2764)
|
||||
- Feature: When starting without a config file determine the language on basis of the current locale (r2777)
|
||||
- Feature: [NewGRF] Add support for 'extended bytes' (r2872)
|
||||
- Feature: [Localisation] Major step twoards ISO-8859-15: Implement missing characters (r2879)
|
||||
- Feature: [localisation] Major step twoards ISO-8859-15: Implement missing characters (r2879)
|
||||
- Feature: Implement the console command rm to remove savegames (r2941)
|
||||
- Feature: Danish town names (r2957)
|
||||
- Feature: Menu option to toggle console (r2958)
|
||||
@@ -2079,9 +2041,9 @@
|
||||
- Fix: Refitting to a cargo which is already carried by some vehicles takes their capacities into account for display (r2365)
|
||||
- Fix: Add 'multihead' TTDPatch option to OpenTTD NewGRF flags-emulation (r2368)
|
||||
- Fix: Make install tried to install scenarios in the (non-existing) personal dir when USE_HOMEDIR is specified (r2371)
|
||||
- Fix: [Console] Update the example scripts in the scripts/ directory to reflect the new console functionality (r2372)
|
||||
- Fix: [Console] Any line starting with a '#' is a comment so ignore it (r2372)
|
||||
- Fix: [Console] The special variables whose value can only be set by a custom process should, also print out their newly set value there (r2372)
|
||||
- Fix: [console] update the example scripts in the scripts/ directory to reflect the new console functionality (r2372)
|
||||
- Fix: [console] any line starting with a '#' is a comment so ignore it (r2372)
|
||||
- Fix: [console] The special variables whose value can only be set by a custom process should, also print out their newly set value there (r2372)
|
||||
- Fix: [NewGRF] Ignore action 0 prop 0x20 (air drag) (r2377)
|
||||
- Fix: [NewGRF] Further property stubs, help prevents subsequent incorrect reading of NewGRF data (r2378)
|
||||
- Fix: Build year for mail compartment of planes was not set correctly, affected station ratings (r2380)
|
||||
@@ -2089,7 +2051,7 @@
|
||||
- Fix: Check the airport type when building an airport (r2382)
|
||||
- Fix: Monkey-testing turned up some command crashes (r2383)
|
||||
- Fix: Check selling land and setting player colour. Also an extra map-bounds check for terraforming (r2384)
|
||||
- Fix: [Realistic acceleration] Very slow trains no longer get an increase in maximum speed when part of them is in a depot (r2388)
|
||||
- Fix: [realistic accel] Very slow trains no longer get an increase in maximum speed when part of them is in a depot (r2388)
|
||||
- Fix: [NewGRF] Load power for dual-headed engines correctly (r2400)
|
||||
- Fix: [NewGRF] When resolving callbacks, dont ignore wagon overrides (r2410)
|
||||
- Fix: Station ratings are not affected by speed limits from realistic acceleration anymore (r2411)
|
||||
@@ -2103,7 +2065,7 @@
|
||||
- Fix: Using the mouse wheel could lead to a crash if mouse was not over a widget (r2530)
|
||||
- Fix: Blinking 'lock' gfx in multiplayer games (r2548)
|
||||
- Fix: Remove original train pathfinder. Enhanced old pathfinder (r2553)
|
||||
- Fix: Spaces in the path to the MIDI files caused the Windows MIDI player to fail (r2563)
|
||||
- Fix: Spaces in the path to the MIDI files caused the win32 MIDI player to fail (r2563)
|
||||
- Fix: Set server map name to the loaded name of the game/scenario (r2610)
|
||||
- Fix: Improve the old pathfinder. Changed it to A* instead of Dijkstra. Benchmark shows that NTP is now around 10x faster than NPF (r2635)
|
||||
- Fix: Correctly save and load company_value, it's 64 bits wide, not 32 bits (r2684)
|
||||
@@ -2116,11 +2078,11 @@
|
||||
- Fix: Return a proper version number, when testing the TTDPatch version in the SkipIf action (r2862)
|
||||
- Fix: Change the way NewGRFs are loaded, this saves quite some sprite slots - about 2000 for DBSetXL for example (r2868)
|
||||
- Fix: Several format string vulnerabilities and buffer overflows in the network code [CVE-2005-2764, CVE-2005-2763] (r2899)
|
||||
- Fix: Fixed issue where autorenewed vehicles did not get all stats updated (r2912)
|
||||
- Fix: fixed issue where autorenewed vehicles did not get all stats updated (r2912)
|
||||
- Fix: Exit the child of the extmidi backend with _exit() instead of exit(), because we do not want any atexit handlers - especially flushing output streams - to run, if exec() fails (r2938)
|
||||
- Fix: Server crash with 'say'-command (r2950)
|
||||
- Fix: Fix Windows midi volume level control which did not work (r2960)
|
||||
- Fix: [OSX] Quitting the game no longer leaves a process behind that eats all the CPU power (r3281)
|
||||
- Fix: Fix win32 midi volume level control which did not work (r2960)
|
||||
- Fix: [OSX] quitting the game no longer leaves a process behind that eats all the CPU power (r3281)
|
||||
- Fix: Fix for UFO-broken waypoint [SF#1216203] (r2961)
|
||||
- Fix: [NewGRF] Include missing grf feature canal
|
||||
- Fix: [NewGRF] Add bounds checking to VehicleChangeInfo for vehicles
|
||||
@@ -2175,8 +2137,8 @@
|
||||
------------------------------------------------------------------------
|
||||
|
||||
- Feature: Add 'clear' command and CTRL+L to empty console window
|
||||
- Feature: Add the possibility to print out the current debug-level
|
||||
- Fix: [MacOSX] Default path for midi player on mac is now correct again
|
||||
- Feature: add the possibility to print out the current debug-level
|
||||
- Fix: [MacOSX] default path for midi player on mac is now correct again
|
||||
- Fix: Updated makefile for FreeBSD
|
||||
- Fix: Text overflows in about box
|
||||
- Fix: Link error while compiling as dedicated server
|
||||
@@ -2208,30 +2170,30 @@
|
||||
- Feature: Saving vehicle sorting criteria for each vehicle type [SF#1093261]
|
||||
- Feature: Resizable orders GUI [SF#1107690]
|
||||
- Feature: Focus keyboard on input-box in Multiplayer Menu [SF#1166978]
|
||||
- Feature: Terrain hotkeys nonfunctional in scenario editor (D,Q,W,E,R,T,Y,U fltr) [SF#1174313]
|
||||
- Feature: terrain hotkeys nonfunctional in scenario editor (D,Q,W,E,R,T,Y,U fltr) [SF#1174313]
|
||||
- Feature: Complete rework of console and new commands like ls, save, load, help, etc
|
||||
- Feature: Signs are shown in the colour of the player who created them
|
||||
- Feature: Add cheat option to set production of raw-material industries in game
|
||||
- Feature: Replace trian GUI remembers railtype selected from the dropdown menu
|
||||
- Feature: Improved Autoreplace
|
||||
- Feature: <any more smaller features :D
|
||||
- Feature: many more smaller features :D
|
||||
- Fix: A wrong error message was displayed when trying to [SF#1108618]
|
||||
- Fix: Game does not crash any more when a NewGRF file does not exist [SF#1110407]
|
||||
- Fix: Clearing land for free by reallocating HQ [SF#1112469]
|
||||
- Fix: Clearing land for free by reallocating HQ [SF#1112469]
|
||||
- Fix: Crash when accessing hi-scores in editor, it is now disabled [SF#1113037]
|
||||
- Fix: crash when accessing hi-scores in editor, it is now disabled [SF#1113037]
|
||||
- Fix: Game no longer crashes when right-clicking a disabled Full Load button [SF#1113399]
|
||||
- Fix: Dedicated server boots again [SF#1114100]
|
||||
- Fix: Game crashed sometimes when there were no industries in the map [SF#1114950]
|
||||
- Fix: In the main menu, when starting a new game while the load game dialog is open, openttd asserts [SF#1115200]
|
||||
- Fix: Non-stop orders are no longer accidently skipped [SF#1117538]
|
||||
- Fix: non-stop orders are no longer accidently skipped [SF#1117538]
|
||||
- Fix: Generate the correct smoke type for diesel trains [SF#1116619]
|
||||
- Fix: Max passengers / mail variables are now 32 bit [SF#1119308]
|
||||
- Fix: Better test if a string actually contains any console command [SF#1109400]
|
||||
- Fix: 'Play scenario' now loads game options and difficulty, 'Load game' starts game with user-selected values [SF#1108637]
|
||||
- Fix: Carriages of NewGRFs can be refitted again [SF#1143587]
|
||||
- Fix: carriages of NewGRFs can be refitted again [SF#1143587]
|
||||
- Fix: Production values of temperate-climate banks can now be altered [SF#1117730]
|
||||
- Fix: Mapwrap fixed in ship_cmd.c (was implicitely ok before biggermaps) [SF#1118810]
|
||||
- Fix: openttd: ship_cmd.c:642 ... Assertion failed. Mapwrap fixed in ship_cmd.c (was implicitely ok before biggermaps) [SF#1118810]
|
||||
- Fix: Assertion error on kick. When a company is cleaned all its windows need to be closed. For global vehicle lists, the no-staiton index of -1 was not taken into account [SF#1117327]
|
||||
- Fix: Speeding up when pressing ALT+TAB (Windows) [SF#1114261]
|
||||
- Fix: Signals dissaper after typing text and pressing enter!. Signs in Scenario Editor have no owner so ignore that [SF#1149403]
|
||||
@@ -2241,11 +2203,11 @@
|
||||
- Fix: Crash with german umlauts in station names [SF#1155696]
|
||||
- Fix: Segmentation fault when loading savegame, out of bounds array check [SF#1158618]
|
||||
- Fix: Autosave ignoring settings [SF#1149487]
|
||||
- Fix: [Windows] Infinite access for A:\. Only requery drive(s) if the user changes a directory, also supress the OS error box that pops up on some windows machines [SF#1024703]
|
||||
- Fix: Infinite access for A:\ (win32). Patch [1171208]. Only requery drive(s) if the user changes a directory, also surpress the OS error box that pops up on some windows machines [SF#1024703]
|
||||
- Fix: Create Lake and draggable Create Desert tools [SF#1095110]
|
||||
- Fix: Trains 'Go to depot' button: click twice skip to next order [SF#1172878]
|
||||
- Fix: Engine power not updated w/auto replace' autoreplace now forces an update of the cache [SF#1146215]
|
||||
- Fix: [Windows] Path displaying as 'C:\\' [SF#1173690]
|
||||
- Fix: Path displaying as 'C:\\' in saveload window win32-only [SF#1173690]
|
||||
- Fix: Click & drag removal of road assertion fail [SF#1179892]
|
||||
- Fix: Max loan always in euros, use _opt_ptr instead of _opt [SF#1174237]
|
||||
- Fix: AI orders its vehicles to a competitor's truck stop [SF#1184201]
|
||||
@@ -2257,15 +2219,15 @@
|
||||
- Fix: No HQ present for competitor, disable 'View HQ' button [SF#1187613]
|
||||
- Fix: Pre-signal stays red when there is only a single exit signal [SF#1193048]
|
||||
- Fix: Train in tunnel is not properly detected by signal code [SF#1185176]
|
||||
- Fix: [NewGRF] Rotors of custom helicopters are displayed correctly in the hangar window
|
||||
- Fix: [NewGRF] rotors of custom helicopters are displayed correctly in the hangar window
|
||||
- Fix: Scenario Editor now handles human-made roads better (try to build a city layout before placing the city, finally that works very nice)
|
||||
- Fix: [NewGRF] Helicopters are correctly recognized
|
||||
- Fix: [Autoreplace] Made sure that planes only show planes in replace GUI and helicopters only show helicopters
|
||||
- Fix: [NewGRF] helicopters are correctly recognized
|
||||
- Fix: [Autoreplace] made sure that planes only show planes in replace GUI and helicopters only show helicopters
|
||||
- Fix: Crash when generating tropical maps
|
||||
- Fix: [Autoreplace] Cheaters can no longer exploit autoreplace to get vehicles, that's not invented yet
|
||||
- Fix: [Autoreplace] Fixed a stupid bug introduced in r1687, that made a crash if anybody tried to autoreplace anything but an aircraft
|
||||
- Fix: Expand railroad stations beyond maximum spread
|
||||
- Fix: [Autoreplace] Fixed a typo that could prevent autoreplaced aircraft from automatically go to a hangar
|
||||
- Fix: [Autoreplace] fixed a typo that could prevent autoreplaced aircraft from automatically go to a hangar
|
||||
- Fix: Hacked clients can no longer be used to build vehicles that are not available yet
|
||||
- Fix: Minimum profit of vehicles was calculated wrong for Performance Rating
|
||||
- Fix: No longer a station where you only unload is bad for your town-rating
|
||||
@@ -2276,38 +2238,38 @@
|
||||
|
||||
0.3.6 (2005-01-24)
|
||||
------------------------------------------------------------------------
|
||||
- Feature: Resizable windows. All useful windows are already made resizable
|
||||
- Feature: Highscore chart (accessible from the difficulty window) with top5 companies for a given difficulty (select the difficulty in the menu)
|
||||
- Feature: Endgame score on 1 jan 2051 where you are added to the highscore if sufficiently large points have been accumulated. Game is paused while
|
||||
- Feature: resizable windows. All useful windows are already made resizable
|
||||
- Feature: highscore chart (accessible from the difficulty window) with top5 companies for a given difficulty (select the difficulty in the menu)
|
||||
- Feature: endgame score on 1 jan 2051 where you are added to the highscore if sufficiently large points have been accumulated. Game is paused while
|
||||
- Feature: Visually enhanced autorail placing
|
||||
- Feature: Autoreplace Vehicles (accessible from the vehicle lists)
|
||||
- Feature: A counter to tell how many engines you have of each type to the autoreplace vehicle windows
|
||||
- Feature: A display for the total map population to the town display
|
||||
- Feature: [Network] RCon (Remote console)
|
||||
- Feature: Hotkeys for dock and airport toolbar (see http://wiki.openttd.org/index.php/Hotkeys)
|
||||
- Feature: [Network] Banning system (mostly tnx to guru3) A server can ban people via ClientList using 'ban', 'unban', 'banlist'
|
||||
- Feature: [Network] Server can now pause and unpause a game through the console. Use 'pause' and 'unpause'
|
||||
- Feature: [network] RCon (Remote console)
|
||||
- Feature: hotkeys for dock and airport toolbar (see http://wiki.openttd.org/index.php/Hotkeys)
|
||||
- Feature: [Network] banning system (mostly tnx to guru3) A server can ban people via ClientList using 'ban', 'unban', 'banlist'
|
||||
- Feature: [Network] server can now pause and unpause a game through the console. Use 'pause' and 'unpause'
|
||||
- Feature: [OS/2] OS/2 support is now finished (Fixes for networking, file selection, keyboard input, plus many other minor issues)
|
||||
- Feature: [SDL] Show revision number in window title
|
||||
- Feature: [Unix] Check which gcc version is present and only set available compiler flags
|
||||
- Feature: [Windows] CTRL+V (Paste) now works on all editboxes. This includes 'Add Server', chat, etc
|
||||
- Feature: [Windows] Dedicated server is now functioning correctly
|
||||
- Feature: [Windows] dedicated server is now functioning correctly
|
||||
- Feature: Addded keyboard shortcuts for the order window
|
||||
- Feature: Aircraft refit options have been restricted to 'sane' values
|
||||
- Feature: Allows setting the production values of the rawmaterial producing industries in the editor
|
||||
- Feature: Console support for loading maps. Use 'load', 'list_files' and 'goto_dir' to navigate and load games
|
||||
- Feature: allows setting the production values of the rawmaterial producing industries in the editor
|
||||
- Feature: console support for loading maps. Use 'load', 'list_files' and 'goto_dir' to navigate and load games
|
||||
- Feature: Display server port in the multiplayer game info window
|
||||
- Feature: Dynamite in landscaping toolbar (hotkey 'D')
|
||||
- Feature: dynamite in landscaping toolbar (hotkey 'D')
|
||||
- Feature: Improved Network Lobby GUI with a green dot if company income is positive (else red dot) and lock icon if company is password protected
|
||||
- Feature: Make ottd compile on Zeta
|
||||
- Feature: MD5 hash check for TTD files
|
||||
- Feature: New companies receive a 5-year protection period against buying-up
|
||||
- Feature: Norwegian townnames
|
||||
- Feature: norwegian townnames
|
||||
- Feature: Order Checking is only execute for ONE vehicle in an order-share system
|
||||
- Feature: Passengers aircraft now ignore the amount of mail for 'full load any' options
|
||||
- Feature: Place multiple accepting industies nearby in the editor mode if the appropriate patches are set
|
||||
- Feature: Population in label of the town (patch setting)
|
||||
- Feature: Scrolling credits list (in alphabetical order)
|
||||
- Feature: place multiple accepting industies nearby in the editor mode if the appropriate patches are set
|
||||
- Feature: population in label of the town (patch setting)
|
||||
- Feature: scrolling credits list (in alphabetical order)
|
||||
- Feature: Train window now shows the number of vehicles per row
|
||||
- Feature: Swiss town-names [SF#1039061]
|
||||
- Feature: Adding 16:10 resolutions for mainly laptops [SF#1090950]
|
||||
@@ -2322,78 +2284,78 @@
|
||||
- Fix: Slopes under high bridges were not flooded [SF#1090495]
|
||||
- Fix: In scenario editor, when trees are placed randomly, they are no longer placed on farmland [SF#1092473]
|
||||
- Fix: On create, the scrollbar of the server-list was not updated [SF#1092661]
|
||||
- Fix: Placing rocks in scenario editor. You can place rocks on trees and vice versa [SF#1092707]
|
||||
- Fix: placing rocks in scenario editor. You can place rocks on trees and vice versa [SF#1092707]
|
||||
- Fix: Drive side in new games. Setting the driver side is possible during the game until someone buys road vehicles. In networked games only the server can change it [SF#1093200]
|
||||
- Fix: No more glitches with many maps in the scenario list when creating server [SF#1093466]
|
||||
- Fix: no more glitches with many maps in the scenario list when creating server [SF#1093466]
|
||||
- Fix: Dissappearing rocks in Scenario Editor [SF#1093485]
|
||||
- Fix: Toolbars accessible via keyboard in spectator mode [SF#1094092]
|
||||
- Fix: When all stations in an aircraft's order list are demolished, the plane eventually crashes (running out of fuel) [SF#1095020]
|
||||
- Fix: Servers list now also saves the port [SF#1095143]
|
||||
- Fix: Crash when all vehicles from a vehicles per station list had been removed [SF#1098553]
|
||||
- Fix: Starting year patch goes out of range. Clamped year between 1920-2090 [SF#1099101]
|
||||
- Fix: starting year patch goes out of range. Clamped year between 1920-2090 [SF#1099101]
|
||||
- Fix: Bug Fix - Vehicle Lists not updated at Acqusition [SF#1099225]
|
||||
- Fix: Game crashes after the click on Rename (see also Bug 10992). There was no check for non-selected engine [SF#1099451]
|
||||
- Fix: Wrong tooltip for place desert button [SF#1100736]
|
||||
- Fix: Fast forward in main menu [SF#1100767]
|
||||
- Fix: wrong tooltip for place desert button [SF#1100736]
|
||||
- Fix: fast forward in main menu [SF#1100767]
|
||||
- Fix: Crash if generating land while industry window is open. This also happened for towns and the land information window [SF#1101179]
|
||||
- Fix: Configure Patches window text overflow [SF#1101906]
|
||||
- Fix: Console in dedicated server [SF#1101963]
|
||||
- Fix: console in dedicated server [SF#1101963]
|
||||
- Fix: Game crashed when clicking 'new face' or 'company color' twice [SF#1102275]
|
||||
- Fix: Vehicle lists are now redrawn when a vehicle arrives in a depot. Station-specific vehicle lists are now redrawn daily as well (not only the master list) [SF#1099535, SF#1102776]
|
||||
- Fix: Font size changing. Dedicated server did not have code filtering, 'tab' could result in bigger fonts [SF#1103113]
|
||||
- Fix: font size changing. Dedicated server did not have code filtering, 'tab' could result in bigger fonts [SF#1103113]
|
||||
- Fix: Order Check messages are now validated before displayed [SF#1103187]
|
||||
- Fix: Railroad tracks on slopes were not flooded [SF#1103301]
|
||||
- Fix: Crashed trains do not initiate the lost vehicle message anymore [SF#1104350]
|
||||
- Fix: On horizontal/vertical tracks you are also charged for building/removing signals on the parallel track on the same tile [SF#110452]
|
||||
- Fix: Aircraft in hangar messages are now revalidated before display [SF#1104969]
|
||||
- Fix: Destroyed train locks crossings [SF#1105112]
|
||||
- Fix: Upgrade rail fails when train under bridge [SF#1105281]
|
||||
- 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: 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]
|
||||
- Fix: placing signals with 2x1 drags is treated as placing a single signal [SF#1106930]
|
||||
- Fix: console ignoring return character occasionally [SF#1107350]
|
||||
- Fix: Scenario creation bug; engines are of correct year when scenario is saved [SF#1108008]
|
||||
- Fix: Little red box in scenario editor [SF#1092474]
|
||||
- Fix: Scrolling through console sometimes crashed the whole game [SF#1099197]
|
||||
- Fix: little red box in scenario editor [SF#1092474]
|
||||
- Fix: scrolling through console sometimes crashed the whole game [SF#1099197]
|
||||
- Fix: Catchment area with drag&drop stations [SF#1099209]
|
||||
- Fix: [Network] 'kick 1' did crash dedicated servers
|
||||
- Fix: [Network] A server no longer crashes when a client sends an invalid DoCommand, but drops the client instead
|
||||
- Fix: [Network] Added packet protection. No longer a client or server
|
||||
- Fix: [Network] Bug in bind system. Advertising failed on systems with more then 1 ip, and server_bind active to one of them
|
||||
- Fix: [Network] Disabled 'money-cheat' (read: bug which could give people a lot of money)
|
||||
- Fix: [SDL] Now the binary never links to SDL if DEDICATED is set
|
||||
- Fix: [Windows] Somehow mousewheel was disabled on windows using SDL; reenabled again
|
||||
- Fix: A modified client could try to replace a vehicle to an invalid engine ID and crash the server
|
||||
- Fix: Autoreplace vehicle lists are now redrawn when a new vehicle becomes available
|
||||
- Fix: [SDL] now the binary never links to SDL if DEDICATED is set
|
||||
- Fix: [Windows] somehow mousewheel was disabled on windows using SDL; reenabled again
|
||||
- Fix: a modified client could try to replace a vehicle to an invalid engine ID and crash the server
|
||||
- Fix: autoreplace vehicle lists are now redrawn when a new vehicle becomes available
|
||||
- Fix: Buy Vehicle GUI now shows HPs bigger than 32000 correctly
|
||||
- Fix: Console alias, load_game functionality and load fix
|
||||
- Fix: Correct error message for when trying to build a railroad station over a bus/truck/etc-station
|
||||
- Fix: correct error message for when trying to build a railroad station over a bus/truck/etc-station
|
||||
- Fix: Correct landscaping buttons in monorail and maglev toolbars
|
||||
- Fix: Dedicated server also writes to log file if active
|
||||
- Fix: dedicated server also writes to log file if active
|
||||
- Fix: Desert-landscape does no longer crash
|
||||
- Fix: Expand town is a bit more agressive
|
||||
- Fix: Finally zooming in/out always works
|
||||
- Fix: Fixed chat-bug (that from a certain moment, nobody could talk)
|
||||
- Fix: Fixed weight for double-head trains and with that the acceleration (now maglev lvl4 can reach their top speed, and are faster than lvl3)
|
||||
- Fix: finally zooming in/out always works
|
||||
- Fix: fixed chat-bug (that from a certain moment, nobody could talk)
|
||||
- Fix: fixed weight for double-head trains and with that the acceleration (now maglev lvl4 can reach their top speed, and are faster than lvl3)
|
||||
- Fix: Full-Loading trains no longer get 'lost' after a while
|
||||
- Fix: Graphs were not updated correctly when one graph with a certain selection was already open and another graph window was opened
|
||||
- Fix: In multiplayer clientlist can only be opened once
|
||||
- Fix: in multiplayer clientlist can only be opened once
|
||||
- Fix: Loan does not count against the company value
|
||||
- Fix: Nasty bug where one could build one station OVER the other
|
||||
- Fix: nasty bug where one could build one station OVER the other
|
||||
- Fix: No crash when creating a game with New English town names any more
|
||||
- Fix: Now helicopters will use a hangar in schedule to be replaced in, even if they are only set to service there. Since helicopters are serviced at helipads, they will only go there if they needs to be replaced or renewed. They will also use a hangar in an airport in the schedule if needed
|
||||
- Fix: Only a server can rename a town in a MP game
|
||||
- Fix: Really old maps do load again
|
||||
- Fix: now helicopters will use a hangar in schedule to be replaced in, even if they are only set to service there. Since helicopters are serviced at helipads, they will only go there if they needs to be replaced or renewed. They will also use a hangar in an airport in the schedule if needed
|
||||
- Fix: only a server can rename a town in a MP game
|
||||
- Fix: really old maps do load again
|
||||
- Fix: Refit engine button is now disabled when cargo capacity equals zero
|
||||
- Fix: Server issue where some company names were wrong
|
||||
- Fix: server issue where some company names were wrong
|
||||
- Fix: Ship Vehicle Lists are now redrawn correctly
|
||||
- Fix: Signal stays red if a track is removed
|
||||
- Fix: Solve AI related order-problem
|
||||
- Fix: Starting openttd with -g <invalid_name> now acts normal
|
||||
- Fix: signal stays red if a track is removed
|
||||
- Fix: solve AI related order-problem
|
||||
- Fix: starting openttd with -g <invalid_name> now acts normal
|
||||
- Fix: The cost for an autorenew was not always send to the right player ;)
|
||||
- Fix: Autorenewing multiheaded train engines now costs the correct amount. Used to be twice the correct price
|
||||
- Fix: The scrollbar in the network gui (server list) now updates when scrolling
|
||||
- Fix: the scrollbar in the network gui (server list) now updates when scrolling
|
||||
- Fix: Train crashes should no longer desync the game
|
||||
- Fix: When deleting an order, the next pointer was not cleared, resulting in some unusual behavoir from time to time
|
||||
- Fix: You can now also delete automatically found servers by pressing 'del'
|
||||
@@ -2419,7 +2381,7 @@
|
||||
- Feature: Game compiles under BEOS_SERVER
|
||||
- Feature: Game compiles under OS/2 (no network-support)
|
||||
- Feature: OpenTTD runs with the grf files of the DOS version
|
||||
- Feature: [Big Endian computers, which are mac and MorphOS] Load savegames by TTD(Patch)
|
||||
- Feature: [Big Endian computers, which are mac and MorphOS]: are able to load savegames by TTD(Patch)
|
||||
- Add: 'l' openes the landscaping toolbar globally
|
||||
- Add: Make the town sometimes build streets on slopes
|
||||
- Add: Manpage
|
||||
@@ -2587,10 +2549,10 @@
|
||||
- Fix: [Makefile] Fixed issue where sdl-config was needed even on systems without SDL
|
||||
- Fix: [SDL] Performance fix fo palette animation and mouse jumping
|
||||
- Fix: [SDL] Same resolution was displayed more than once in game options
|
||||
- Fix: [SDL] Smoother mouse and performance fix, like in the Windows video driver
|
||||
- Fix: [SDL] Smoother mouse and performance fix, like in Win32
|
||||
- Fix: Wrong trains you can buy with scenarios [SF#963056]
|
||||
- Fix: Minimap crash [SF#972087]
|
||||
- Fix: Bug in 'weird non-uniform stations handling' [SF#972247]
|
||||
- Fix: Bug in '[a] weird non-uniform stations handling' [SF#972247]
|
||||
- Fix: Parent_list was too small [SF#976583]
|
||||
- Fix: Memoryleak in parent_list [SF#981934]
|
||||
- Fix: Max_loan in editor bug [SF#982666]
|
||||
@@ -2617,8 +2579,8 @@
|
||||
- Fix: Scenario editor pause bug [SF#1007630]
|
||||
- Fix: Signals not updated after ClearTunnel Bug [SF#1008605, SF#985920]
|
||||
- Fix: Too many save games prevented loading [SF#1009385]
|
||||
- Fix: Problem with transferred cargo crashes game [SF#1009567]
|
||||
- Fix: Build in pause is now a cheat instead of a patch [SF#1009621]
|
||||
- Fix: problem with transferred cargo crashes game [SF#1009567]
|
||||
- Fix: build in pause is now a cheat instead of a patch [SF#1009621]
|
||||
- Fix: Wrong multihead selling [SF#1009631]
|
||||
- Fix: Turning on the magic bulldozer removes oil rigs [SF#1010833]
|
||||
- Fix: Drunk pilot [SF#1012086]
|
||||
@@ -2654,7 +2616,7 @@
|
||||
- Feature: Added support for 64 bit CPUs
|
||||
- Feature: Added water quantity level 'very low', which is the default for easy mode now
|
||||
- Feature: Realistic acceleration turned on, train must first slow down and stop before it can reverse
|
||||
- Feature: [MorphOS] Various small improvement to make the the game feel more native
|
||||
- Feature: [MorphOS]: Various small improvement to make the the game feel more native
|
||||
- Feature: Alt + f now toggles full screen (alt + enter still works)
|
||||
- Feature: [OSX] Command + q shows the quit window and command + f or enter toggles full screen (alt and control still works too)
|
||||
- Feature: Autorenew, autorenews vehicles if enabled
|
||||
@@ -2891,11 +2853,11 @@
|
||||
- Feature: Clicking on the money brings up finances
|
||||
- Feature: [OSX] Distribution now uses Apples package system for easier updates
|
||||
- Feature: [OSX] Application is now a proper bundle application
|
||||
- Change: [Windows] Use save/ as save folder
|
||||
- Change: Use save/ as save folder on win32
|
||||
- Change: Moved date in news window
|
||||
- Change: Do not check if tiles around the clicked station is a station in order gui
|
||||
- Change: Keep checkpoint button down after placing
|
||||
- Change: [Windows] Moved disk devices to bottom of list
|
||||
- Change: Moved disk devices to bottom of list on win32
|
||||
- Change: Changed speedkey from Shift to Tab
|
||||
- Change: Enhanced patches window with pages
|
||||
- Change: Do not slow down trains as much on hills
|
||||
@@ -2958,7 +2920,7 @@
|
||||
- Feature: Road and rail removal by dragging a selection
|
||||
- Feature: News item for 'train is unprofitable'
|
||||
- Feature: News item for 'train is lost'
|
||||
- Feature: [Windows] Double size mode (Ctrl-d to toggle)
|
||||
- Feature: [Win32] Double size mode (Ctrl-d to toggle)
|
||||
- Feature: 'Multiple similar industries in close proximity' option
|
||||
- Feature: 'Multiple industries per down' option
|
||||
- Feature: 'Crossing tunnels' option
|
||||
@@ -3002,7 +2964,7 @@
|
||||
|
||||
0.1.4 (2004-03-25)
|
||||
------------------------------------------------------------------------
|
||||
- Feature: Crash submit system on Windows
|
||||
- Feature: Crash submit system on win32
|
||||
- Feature: Autosave
|
||||
- Feature: In-game resolution selection via settings window
|
||||
- Feature: Dutch town names
|
||||
@@ -3065,8 +3027,8 @@
|
||||
|
||||
0.1.2 (2004-03-15)
|
||||
------------------------------------------------------------------------
|
||||
- Feature: Mouse wheel can be used to zoom in out on Windows
|
||||
- Feature: Implemented some support for resizing the window dynamically in Windows
|
||||
- Feature: Mouse wheel can be used to zoom in out on win32
|
||||
- Feature: Implemented some support for resizing the window dynamically in win32
|
||||
- Fix: Tunnel mouse icon for maglev and monorail
|
||||
|
||||
|
||||
@@ -3076,7 +3038,7 @@
|
||||
- Feature: Center windows properly in higher resolutions
|
||||
- Feature: Command line -g flag now optionally takes a game to load
|
||||
- Add: External MIDI driver for Unix version
|
||||
- Add: DirectMusic driver for Windows version
|
||||
- Add: DirectMusic driver for Win32 version
|
||||
- Add: 'build tracks on slopes' feature
|
||||
- Fix: Problem where directories were not displayed under Linux
|
||||
- Fix: Colors in map window for routes
|
||||
|
60
config.lib
60
config.lib
@@ -11,7 +11,7 @@ log() {
|
||||
}
|
||||
|
||||
set_default() {
|
||||
released_version="1.0.0-beta3"
|
||||
released_version="1.0.0-beta2"
|
||||
|
||||
ignore_extra_parameters="0"
|
||||
# We set all kinds of defaults for params. Later on the user can override
|
||||
@@ -67,7 +67,6 @@ set_default() {
|
||||
with_sdl="1"
|
||||
with_cocoa="1"
|
||||
with_zlib="1"
|
||||
with_lzo2="1"
|
||||
with_png="1"
|
||||
enable_builtin_depend="1"
|
||||
with_makedepend="0"
|
||||
@@ -137,7 +136,6 @@ set_default() {
|
||||
with_sdl
|
||||
with_cocoa
|
||||
with_zlib
|
||||
with_lzo2
|
||||
with_png
|
||||
enable_builtin_depend
|
||||
with_makedepend
|
||||
@@ -321,13 +319,6 @@ detect_params() {
|
||||
--without-zlib) with_zlib="0";;
|
||||
--with-zlib=*) with_zlib="$optarg";;
|
||||
|
||||
--with-lzo2) with_lzo2="2";;
|
||||
--without-lzo2) with_lzo2="0";;
|
||||
--with-lzo2=*) with_lzo2="$optarg";;
|
||||
--with-liblzo2) with_lzo2="2";;
|
||||
--without-liblzo2) with_lzo2="0";;
|
||||
--with-liblzo2=*) with_lzo2="$optarg";;
|
||||
|
||||
--with-png) with_png="2";;
|
||||
--without-png) with_png="0";;
|
||||
--with-png=*) with_png="$optarg";;
|
||||
@@ -753,22 +744,6 @@ check_params() {
|
||||
fi
|
||||
fi
|
||||
|
||||
pre_detect_with_lzo2=$with_lzo2
|
||||
detect_lzo2
|
||||
|
||||
if [ "$with_lzo2" = "0" ] || [ -z "$lzo2" ]; then
|
||||
log 1 "WARNING: liblzo2 was not detected or disabled"
|
||||
log 1 "WARNING: OpenTTD doesn't require liblzo2, but it does mean that"
|
||||
log 1 "WARNING: loading old savegames/scenarios will be disabled."
|
||||
if [ "$pre_detect_with_lzo2" = "0" ]; then
|
||||
log 1 "WARNING: We strongly suggest you to install liblzo2."
|
||||
else
|
||||
log 1 "configure: error: no liblzo2 detected"
|
||||
log 1 " If you want to compile without liblzo2 use --without-liblzo2 as parameter"
|
||||
exit
|
||||
fi
|
||||
fi
|
||||
|
||||
detect_png
|
||||
detect_freetype
|
||||
detect_fontconfig
|
||||
@@ -1415,15 +1390,6 @@ make_cflags_and_ldflags() {
|
||||
CFLAGS="$CFLAGS -DWITH_ZLIB"
|
||||
fi
|
||||
|
||||
if [ "$with_lzo2" != "0" ]; then
|
||||
if [ "$enable_static" != "0" ] && [ "$os" != "OSX" ]; then
|
||||
LIBS="$LIBS $lzo2"
|
||||
else
|
||||
LIBS="$LIBS -llzo2"
|
||||
fi
|
||||
CFLAGS="$CFLAGS -DWITH_LZO"
|
||||
fi
|
||||
|
||||
# 64bit machines need -D_SQ64
|
||||
if [ "$cpu_type" = "64" ] && [ "$enable_universal" = "0" ]; then
|
||||
CFLAGS="$CFLAGS -D_SQ64"
|
||||
@@ -2270,11 +2236,10 @@ detect_library() {
|
||||
# $1 - config-param ($with_zlib value)
|
||||
# $2 - library name ('zlib', sets $zlib)
|
||||
# $3 - static library name (libz.a)
|
||||
# $4 - header directory ()
|
||||
# $5 - header name (zlib.h)
|
||||
# $6 - force static (if non-empty)
|
||||
# $4 - header name (zlib.h)
|
||||
# $5 - force static (if non-empty)
|
||||
|
||||
if [ -n "$6" ]; then force_static="1"; fi
|
||||
if [ -n "$5" ]; then force_static="1"; fi
|
||||
|
||||
# 0 means no, 1 is auto-detect, 2 is force
|
||||
if [ "$1" = "0" ]; then
|
||||
@@ -2287,15 +2252,15 @@ detect_library() {
|
||||
log 2 "detecting $2"
|
||||
|
||||
if [ "$1" = "1" ] || [ "$1" = "" ] || [ "$1" = "2" ]; then
|
||||
eval "$2=`ls -1 /usr/include/$4*.h 2>/dev/null | egrep \"\/$5\$\"`"
|
||||
eval "$2=`ls -1 /usr/include/*.h 2>/dev/null | egrep \"\/$4\$\"`"
|
||||
eval "res=\$$2"
|
||||
if [ -z "$res" ]; then
|
||||
log 2 " trying /usr/include/$4$5... no"
|
||||
eval "$2=`ls -1 /usr/local/include/$4*.h 2>/dev/null | egrep \"\/$5\$\"`"
|
||||
log 2 " trying /usr/include/$4... no"
|
||||
eval "$2=`ls -1 /usr/local/include/*.h 2>/dev/null | egrep \"\/$4\$\"`"
|
||||
fi
|
||||
eval "res=\$$2"
|
||||
if [ -z "$res" ]; then
|
||||
log 2 " trying /usr/local/include/$4$5... no"
|
||||
log 2 " trying /usr/local/include/$4... no"
|
||||
fi
|
||||
|
||||
eval "res=\$$2"
|
||||
@@ -2358,15 +2323,11 @@ detect_library() {
|
||||
}
|
||||
|
||||
detect_zlib() {
|
||||
detect_library "$with_zlib" "zlib" "libz.a" "" "zlib.h"
|
||||
}
|
||||
|
||||
detect_lzo2() {
|
||||
detect_library "$with_lzo2" "lzo2" "liblzo2.a" "lzo/" "lzo1x.h"
|
||||
detect_library "$with_zlib" "zlib" "libz.a" "zlib.h"
|
||||
}
|
||||
|
||||
detect_libtimidity() {
|
||||
detect_library "$with_libtimidity" "libtimidity" "libtimidity.a" "" "timidity.h"
|
||||
detect_library "$with_libtimidity" "libtimidity" "libtimidity.a" "timidity.h"
|
||||
}
|
||||
|
||||
detect_png() {
|
||||
@@ -3152,7 +3113,6 @@ showhelp() {
|
||||
echo " --with-cocoa enables COCOA video driver (OSX ONLY)"
|
||||
echo " --with-sdl[=sdl-config] enables SDL video driver support"
|
||||
echo " --with-zlib[=zlib.a] enables zlib support"
|
||||
echo " --with-liblzo2[=liblzo2.a] enables liblzo2 support"
|
||||
echo " --with-png[=libpng-config] enables libpng support"
|
||||
echo " --with-freetype[=freetype-config]"
|
||||
echo " enables libfreetype support"
|
||||
|
@@ -1,6 +1,6 @@
|
||||
.\" Hey, EMACS: -*- nroff -*-
|
||||
.\" Please adjust this date whenever revising the manpage.
|
||||
.Dd Jan 18, 2010
|
||||
.Dd Jun 10, 2009
|
||||
.Dt OPENTTD 6
|
||||
.Sh NAME
|
||||
.Nm openttd
|
||||
@@ -19,7 +19,6 @@
|
||||
.Op Fl I Ar graphicsset
|
||||
.Op Fl l Ar host[:port]
|
||||
.Op Fl m Ar driver
|
||||
.Op Fl M Ar musicset
|
||||
.Op Fl n Ar host[:port][#player]
|
||||
.Op Fl p Ar password
|
||||
.Op Fl P Ar password
|
||||
@@ -81,10 +80,6 @@ Redirect DEBUG(), See
|
||||
Set the music driver, see
|
||||
.Fl h
|
||||
for a full list
|
||||
.It Fl M Ar musicset
|
||||
Set the music set, see
|
||||
.Fl h
|
||||
for a full list
|
||||
.It Fl n Ar host[:port][#player]
|
||||
Join a network game, optionally specify a port to connect to and player to play as
|
||||
.It Fl p Ar password
|
||||
|
@@ -1,6 +1,6 @@
|
||||
OpenTTD's known bugs
|
||||
Last updated: 2010-01-21
|
||||
Release version: 1.0.0-beta3
|
||||
Last updated: 2010-01-05
|
||||
Release version: 1.0.0-beta2
|
||||
------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
@@ -1,15 +1,10 @@
|
||||
openttd (1.0.0~beta3) unstable; urgency=low
|
||||
|
||||
* New upstream release.
|
||||
|
||||
-- Matthijs Kooijman <matthijs@stdin.nl> Thu, 21 Jan 2010 00:01:02 +0100
|
||||
|
||||
openttd (1.0.0~beta2) unstable; urgency=low
|
||||
|
||||
* New upstream release.
|
||||
|
||||
-- Matthijs Kooijman <matthijs@stdin.nl> Tue, 05 Jan 2010 21:36:51 +0100
|
||||
|
||||
|
||||
openttd (1.0.0~beta1) unstable; urgency=low
|
||||
|
||||
* New upstream release.
|
||||
|
@@ -3,7 +3,7 @@ Section: contrib/games
|
||||
Priority: optional
|
||||
Maintainer: Matthijs Kooijman <matthijs@stdin.nl>
|
||||
Uploaders: Jordi Mallach <jordi@debian.org>
|
||||
Build-Depends: debhelper (>= 4.0.0), libsdl-dev, zlib1g-dev, libpng-dev, libfreetype6-dev, libfontconfig-dev, liblzo2-dev
|
||||
Build-Depends: debhelper (>= 4.0.0), libsdl-dev, zlib1g-dev, libpng-dev, libfreetype6-dev, libfontconfig-dev
|
||||
Standards-Version: 3.7.3
|
||||
Vcs-Browser: http://svn.debian.org/wsvn/collab-maint/deb-maint/openttd/trunk/
|
||||
Vcs-Svn: svn://svn.debian.org/svn/collab-maint/deb-maint/openttd/trunk
|
||||
|
@@ -1,6 +1,6 @@
|
||||
@echo off
|
||||
|
||||
set OPENTTD_VERSION=1.0.0-beta3
|
||||
set OPENTTD_VERSION=1.0.0-beta2
|
||||
set OPENSFX_VERSION=0.8.0
|
||||
set NOSOUND_VERSION=0.8.0
|
||||
set OPENGFX_VERSION=0.7.0
|
||||
|
@@ -2,8 +2,8 @@
|
||||
!define APPV_MAJOR 1
|
||||
!define APPV_MINOR 0
|
||||
!define APPV_MAINT 0
|
||||
!define APPV_BUILD 2
|
||||
!define APPV_EXTRA "-beta3"
|
||||
!define APPV_BUILD 1
|
||||
!define APPV_EXTRA "-beta2"
|
||||
|
||||
!define APPNAME "OpenTTD" ; Define application name
|
||||
!define APPVERSION "${APPV_MAJOR}.${APPV_MINOR}.${APPV_MAINT}${APPV_EXTRA}" ; Define application version
|
||||
|
@@ -39,7 +39,7 @@ Sub UpdateFiles(version)
|
||||
modified = Mid(version, InStrRev(version, Chr(9)) + 1)
|
||||
version = Mid(version, 1, InStr(version, Chr(9)) - 1)
|
||||
Else
|
||||
version = "1.0.0-beta3"
|
||||
version = "1.0.0-beta2"
|
||||
revision = 0
|
||||
modified = 1
|
||||
End If
|
||||
|
@@ -466,21 +466,6 @@
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\src\lang\malay.txt"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
Description="Generating malay language file"
|
||||
CommandLine="..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "$(InputPath)"
"
|
||||
AdditionalDependencies="..\src\lang\english.txt"
|
||||
Outputs="..\bin\lang\malay.lng"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\src\lang\norwegian_bokmal.txt"
|
||||
>
|
||||
|
@@ -467,21 +467,6 @@
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\src\lang\malay.txt"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
Description="Generating malay language file"
|
||||
CommandLine="..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "$(InputPath)"
"
|
||||
AdditionalDependencies="..\src\lang\english.txt"
|
||||
Outputs="..\bin\lang\malay.lng"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\src\lang\norwegian_bokmal.txt"
|
||||
>
|
||||
|
@@ -60,7 +60,7 @@
|
||||
FavorSizeOrSpeed="2"
|
||||
OmitFramePointers="true"
|
||||
AdditionalIncludeDirectories="..\objs\langs;..\src\3rdparty\squirrel\include"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_ZLIB;WITH_LZO;WITH_PNG;WITH_FREETYPE;WITH_ICU;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR=\"OpenTTD\";WITH_ASSERT"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_ZLIB;WITH_PNG;WITH_FREETYPE;WITH_ICU;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR=\"OpenTTD\";WITH_ASSERT"
|
||||
StringPooling="true"
|
||||
ExceptionHandling="1"
|
||||
RuntimeLibrary="0"
|
||||
@@ -97,7 +97,7 @@
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="winmm.lib ws2_32.lib libpng.lib zlibstat.lib lzo2.lib dxguid.lib libfreetype2.lib libicu.lib"
|
||||
AdditionalDependencies="winmm.lib ws2_32.lib libpng.lib zlibstat.lib dxguid.lib libfreetype2.lib libicu.lib"
|
||||
LinkIncremental="1"
|
||||
SuppressStartupBanner="true"
|
||||
IgnoreDefaultLibraryNames=""
|
||||
@@ -169,7 +169,7 @@
|
||||
AdditionalOptions="/MP"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="..\objs\langs;..\src\3rdparty\squirrel\include"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_ZLIB;WITH_LZO;WITH_PNG;WITH_FREETYPE;WITH_ICU;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR=\"OpenTTD\""
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_ZLIB;WITH_PNG;WITH_FREETYPE;WITH_ICU;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR=\"OpenTTD\""
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="1"
|
||||
UsePrecompiledHeader="0"
|
||||
@@ -197,7 +197,7 @@
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="winmm.lib ws2_32.lib libpng.lib zlibstat.lib lzo2.lib dxguid.lib libfreetype2.lib libicu.lib"
|
||||
AdditionalDependencies="winmm.lib ws2_32.lib libpng.lib zlibstat.lib dxguid.lib libfreetype2.lib libicu.lib"
|
||||
LinkIncremental="0"
|
||||
SuppressStartupBanner="true"
|
||||
IgnoreDefaultLibraryNames="LIBCMT.lib"
|
||||
@@ -273,7 +273,7 @@
|
||||
FavorSizeOrSpeed="2"
|
||||
OmitFramePointers="true"
|
||||
AdditionalIncludeDirectories="..\objs\langs;..\src\3rdparty\squirrel\include"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_ZLIB;WITH_LZO;WITH_PNG;WITH_FREETYPE;WITH_ICU;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR=\"OpenTTD\";_SQ64;WITH_ASSERT"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_ZLIB;WITH_PNG;WITH_FREETYPE;WITH_ICU;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR=\"OpenTTD\";_SQ64;WITH_ASSERT"
|
||||
StringPooling="true"
|
||||
ExceptionHandling="1"
|
||||
RuntimeLibrary="0"
|
||||
@@ -310,7 +310,7 @@
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="winmm.lib ws2_32.lib libpng.lib zlibstat.lib lzo2.lib dxguid.lib libfreetype2.lib libicu.lib"
|
||||
AdditionalDependencies="winmm.lib ws2_32.lib libpng.lib zlibstat.lib dxguid.lib libfreetype2.lib libicu.lib"
|
||||
LinkIncremental="1"
|
||||
SuppressStartupBanner="true"
|
||||
IgnoreDefaultLibraryNames=""
|
||||
@@ -383,7 +383,7 @@
|
||||
AdditionalOptions="/MP"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="..\objs\langs;..\src\3rdparty\squirrel\include"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_ZLIB;WITH_LZO;WITH_PNG;WITH_FREETYPE;WITH_ICU;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR=\"OpenTTD\";_SQ64"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_ZLIB;WITH_PNG;WITH_FREETYPE;WITH_ICU;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR=\"OpenTTD\";_SQ64"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="1"
|
||||
UsePrecompiledHeader="0"
|
||||
@@ -413,7 +413,7 @@
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="winmm.lib ws2_32.lib libpng.lib zlibstat.lib lzo2.lib dxguid.lib libfreetype2.lib libicu.lib"
|
||||
AdditionalDependencies="winmm.lib ws2_32.lib libpng.lib zlibstat.lib dxguid.lib libfreetype2.lib libicu.lib"
|
||||
LinkIncremental="0"
|
||||
SuppressStartupBanner="true"
|
||||
IgnoreDefaultLibraryNames="LIBCMT.lib"
|
||||
@@ -475,6 +475,10 @@
|
||||
RelativePath=".\..\src\bmp.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\..\src\callback_table.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\..\src\cargopacket.cpp"
|
||||
>
|
||||
@@ -683,10 +687,6 @@
|
||||
RelativePath=".\..\src\sound.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\..\src\sprite.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\..\src\spritecache.cpp"
|
||||
>
|
||||
@@ -759,6 +759,10 @@
|
||||
RelativePath=".\..\src\airport.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\..\src\airport_movement.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\..\src\animated_tile_func.h"
|
||||
>
|
||||
@@ -807,6 +811,10 @@
|
||||
RelativePath=".\..\src\bridge.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\..\src\callback_table.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\..\src\cargo_type.h"
|
||||
>
|
||||
@@ -2171,18 +2179,6 @@
|
||||
<Filter
|
||||
Name="Tables"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\..\src\table\airport_defaults.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\..\src\table\airporttiles.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\..\src\table\airport_movement.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\..\src\table\animcursors.h"
|
||||
>
|
||||
@@ -2320,6 +2316,26 @@
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="MiniLZO"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\..\src\3rdparty\minilzo\lzoconf.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\..\src\3rdparty\minilzo\lzodefs.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\..\src\3rdparty\minilzo\minilzo.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\..\src\3rdparty\minilzo\minilzo.h"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Script"
|
||||
>
|
||||
|
@@ -60,7 +60,7 @@
|
||||
FavorSizeOrSpeed="2"
|
||||
OmitFramePointers="true"
|
||||
AdditionalIncludeDirectories="..\objs\langs;..\src\3rdparty\squirrel\include"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_ZLIB;WITH_LZO;WITH_PNG;WITH_FREETYPE;WITH_ICU;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR=\"OpenTTD\";WITH_ASSERT"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_ZLIB;WITH_PNG;WITH_FREETYPE;WITH_ICU;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR=\"OpenTTD\";WITH_ASSERT"
|
||||
StringPooling="true"
|
||||
ExceptionHandling="1"
|
||||
RuntimeLibrary="0"
|
||||
@@ -97,7 +97,7 @@
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="winmm.lib ws2_32.lib libpng.lib zlibstat.lib lzo2.lib dxguid.lib libfreetype2.lib libicu.lib"
|
||||
AdditionalDependencies="winmm.lib ws2_32.lib libpng.lib zlibstat.lib dxguid.lib libfreetype2.lib libicu.lib"
|
||||
LinkIncremental="1"
|
||||
SuppressStartupBanner="true"
|
||||
IgnoreDefaultLibraryNames=""
|
||||
@@ -169,7 +169,7 @@
|
||||
AdditionalOptions="/MP"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="..\objs\langs;..\src\3rdparty\squirrel\include"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_ZLIB;WITH_LZO;WITH_PNG;WITH_FREETYPE;WITH_ICU;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR=\"OpenTTD\""
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_ZLIB;WITH_PNG;WITH_FREETYPE;WITH_ICU;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR=\"OpenTTD\""
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="1"
|
||||
UsePrecompiledHeader="0"
|
||||
@@ -197,7 +197,7 @@
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="winmm.lib ws2_32.lib libpng.lib zlibstat.lib lzo2.lib dxguid.lib libfreetype2.lib libicu.lib"
|
||||
AdditionalDependencies="winmm.lib ws2_32.lib libpng.lib zlibstat.lib dxguid.lib libfreetype2.lib libicu.lib"
|
||||
LinkIncremental="0"
|
||||
SuppressStartupBanner="true"
|
||||
IgnoreDefaultLibraryNames="LIBCMT.lib"
|
||||
@@ -273,7 +273,7 @@
|
||||
FavorSizeOrSpeed="2"
|
||||
OmitFramePointers="true"
|
||||
AdditionalIncludeDirectories="..\objs\langs;..\src\3rdparty\squirrel\include"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_ZLIB;WITH_LZO;WITH_PNG;WITH_FREETYPE;WITH_ICU;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR=\"OpenTTD\";_SQ64;WITH_ASSERT"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_ZLIB;WITH_PNG;WITH_FREETYPE;WITH_ICU;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR=\"OpenTTD\";_SQ64;WITH_ASSERT"
|
||||
StringPooling="true"
|
||||
ExceptionHandling="1"
|
||||
RuntimeLibrary="0"
|
||||
@@ -310,7 +310,7 @@
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="winmm.lib ws2_32.lib libpng.lib zlibstat.lib lzo2.lib dxguid.lib libfreetype2.lib libicu.lib"
|
||||
AdditionalDependencies="winmm.lib ws2_32.lib libpng.lib zlibstat.lib dxguid.lib libfreetype2.lib libicu.lib"
|
||||
LinkIncremental="1"
|
||||
SuppressStartupBanner="true"
|
||||
IgnoreDefaultLibraryNames=""
|
||||
@@ -383,7 +383,7 @@
|
||||
AdditionalOptions="/MP"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="..\objs\langs;..\src\3rdparty\squirrel\include"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_ZLIB;WITH_LZO;WITH_PNG;WITH_FREETYPE;WITH_ICU;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR=\"OpenTTD\";_SQ64"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_ZLIB;WITH_PNG;WITH_FREETYPE;WITH_ICU;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR=\"OpenTTD\";_SQ64"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="1"
|
||||
UsePrecompiledHeader="0"
|
||||
@@ -413,7 +413,7 @@
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="winmm.lib ws2_32.lib libpng.lib zlibstat.lib lzo2.lib dxguid.lib libfreetype2.lib libicu.lib"
|
||||
AdditionalDependencies="winmm.lib ws2_32.lib libpng.lib zlibstat.lib dxguid.lib libfreetype2.lib libicu.lib"
|
||||
LinkIncremental="0"
|
||||
SuppressStartupBanner="true"
|
||||
IgnoreDefaultLibraryNames="LIBCMT.lib"
|
||||
|
@@ -61,7 +61,7 @@
|
||||
FavorSizeOrSpeed="2"
|
||||
OmitFramePointers="true"
|
||||
AdditionalIncludeDirectories="..\objs\langs;..\src\3rdparty\squirrel\include"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_ZLIB;WITH_LZO;WITH_PNG;WITH_FREETYPE;WITH_ICU;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR=\"OpenTTD\";WITH_ASSERT"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_ZLIB;WITH_PNG;WITH_FREETYPE;WITH_ICU;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR=\"OpenTTD\";WITH_ASSERT"
|
||||
StringPooling="true"
|
||||
ExceptionHandling="1"
|
||||
RuntimeLibrary="0"
|
||||
@@ -98,7 +98,7 @@
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="winmm.lib ws2_32.lib libpng.lib zlibstat.lib lzo2.lib dxguid.lib libfreetype2.lib libicu.lib"
|
||||
AdditionalDependencies="winmm.lib ws2_32.lib libpng.lib zlibstat.lib dxguid.lib libfreetype2.lib libicu.lib"
|
||||
LinkIncremental="1"
|
||||
SuppressStartupBanner="true"
|
||||
IgnoreDefaultLibraryNames=""
|
||||
@@ -168,7 +168,7 @@
|
||||
AdditionalOptions="/MP"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="..\objs\langs;..\src\3rdparty\squirrel\include"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_ZLIB;WITH_LZO;WITH_PNG;WITH_FREETYPE;WITH_ICU;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR=\"OpenTTD\""
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_ZLIB;WITH_PNG;WITH_FREETYPE;WITH_ICU;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR=\"OpenTTD\""
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="1"
|
||||
UsePrecompiledHeader="0"
|
||||
@@ -196,7 +196,7 @@
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="winmm.lib ws2_32.lib libpng.lib zlibstat.lib lzo2.lib dxguid.lib libfreetype2.lib libicu.lib"
|
||||
AdditionalDependencies="winmm.lib ws2_32.lib libpng.lib zlibstat.lib dxguid.lib libfreetype2.lib libicu.lib"
|
||||
LinkIncremental="0"
|
||||
SuppressStartupBanner="true"
|
||||
IgnoreDefaultLibraryNames="LIBCMT.lib"
|
||||
@@ -271,7 +271,7 @@
|
||||
FavorSizeOrSpeed="2"
|
||||
OmitFramePointers="true"
|
||||
AdditionalIncludeDirectories="..\objs\langs;..\src\3rdparty\squirrel\include"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_ZLIB;WITH_LZO;WITH_PNG;WITH_FREETYPE;WITH_ICU;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR=\"OpenTTD\";_SQ64;WITH_ASSERT"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_ZLIB;WITH_PNG;WITH_FREETYPE;WITH_ICU;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR=\"OpenTTD\";_SQ64;WITH_ASSERT"
|
||||
StringPooling="true"
|
||||
ExceptionHandling="1"
|
||||
RuntimeLibrary="0"
|
||||
@@ -308,7 +308,7 @@
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="winmm.lib ws2_32.lib libpng.lib zlibstat.lib lzo2.lib dxguid.lib libfreetype2.lib libicu.lib"
|
||||
AdditionalDependencies="winmm.lib ws2_32.lib libpng.lib zlibstat.lib dxguid.lib libfreetype2.lib libicu.lib"
|
||||
LinkIncremental="1"
|
||||
SuppressStartupBanner="true"
|
||||
IgnoreDefaultLibraryNames=""
|
||||
@@ -380,7 +380,7 @@
|
||||
AdditionalOptions="/MP"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="..\objs\langs;..\src\3rdparty\squirrel\include"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_ZLIB;WITH_LZO;WITH_PNG;WITH_FREETYPE;WITH_ICU;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR=\"OpenTTD\";_SQ64"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_ZLIB;WITH_PNG;WITH_FREETYPE;WITH_ICU;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR=\"OpenTTD\";_SQ64"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="1"
|
||||
UsePrecompiledHeader="0"
|
||||
@@ -410,7 +410,7 @@
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="winmm.lib ws2_32.lib libpng.lib zlibstat.lib lzo2.lib dxguid.lib libfreetype2.lib libicu.lib"
|
||||
AdditionalDependencies="winmm.lib ws2_32.lib libpng.lib zlibstat.lib dxguid.lib libfreetype2.lib libicu.lib"
|
||||
LinkIncremental="0"
|
||||
SuppressStartupBanner="true"
|
||||
IgnoreDefaultLibraryNames="LIBCMT.lib"
|
||||
@@ -472,6 +472,10 @@
|
||||
RelativePath=".\..\src\bmp.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\..\src\callback_table.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\..\src\cargopacket.cpp"
|
||||
>
|
||||
@@ -680,10 +684,6 @@
|
||||
RelativePath=".\..\src\sound.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\..\src\sprite.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\..\src\spritecache.cpp"
|
||||
>
|
||||
@@ -756,6 +756,10 @@
|
||||
RelativePath=".\..\src\airport.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\..\src\airport_movement.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\..\src\animated_tile_func.h"
|
||||
>
|
||||
@@ -804,6 +808,10 @@
|
||||
RelativePath=".\..\src\bridge.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\..\src\callback_table.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\..\src\cargo_type.h"
|
||||
>
|
||||
@@ -2168,18 +2176,6 @@
|
||||
<Filter
|
||||
Name="Tables"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\..\src\table\airport_defaults.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\..\src\table\airporttiles.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\..\src\table\airport_movement.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\..\src\table\animcursors.h"
|
||||
>
|
||||
@@ -2317,6 +2313,26 @@
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="MiniLZO"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\..\src\3rdparty\minilzo\lzoconf.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\..\src\3rdparty\minilzo\lzodefs.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\..\src\3rdparty\minilzo\minilzo.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\..\src\3rdparty\minilzo\minilzo.h"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Script"
|
||||
>
|
||||
|
@@ -61,7 +61,7 @@
|
||||
FavorSizeOrSpeed="2"
|
||||
OmitFramePointers="true"
|
||||
AdditionalIncludeDirectories="..\objs\langs;..\src\3rdparty\squirrel\include"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_ZLIB;WITH_LZO;WITH_PNG;WITH_FREETYPE;WITH_ICU;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR=\"OpenTTD\";WITH_ASSERT"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_ZLIB;WITH_PNG;WITH_FREETYPE;WITH_ICU;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR=\"OpenTTD\";WITH_ASSERT"
|
||||
StringPooling="true"
|
||||
ExceptionHandling="1"
|
||||
RuntimeLibrary="0"
|
||||
@@ -98,7 +98,7 @@
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="winmm.lib ws2_32.lib libpng.lib zlibstat.lib lzo2.lib dxguid.lib libfreetype2.lib libicu.lib"
|
||||
AdditionalDependencies="winmm.lib ws2_32.lib libpng.lib zlibstat.lib dxguid.lib libfreetype2.lib libicu.lib"
|
||||
LinkIncremental="1"
|
||||
SuppressStartupBanner="true"
|
||||
IgnoreDefaultLibraryNames=""
|
||||
@@ -168,7 +168,7 @@
|
||||
AdditionalOptions="/MP"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="..\objs\langs;..\src\3rdparty\squirrel\include"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_ZLIB;WITH_LZO;WITH_PNG;WITH_FREETYPE;WITH_ICU;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR=\"OpenTTD\""
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_ZLIB;WITH_PNG;WITH_FREETYPE;WITH_ICU;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR=\"OpenTTD\""
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="1"
|
||||
UsePrecompiledHeader="0"
|
||||
@@ -196,7 +196,7 @@
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="winmm.lib ws2_32.lib libpng.lib zlibstat.lib lzo2.lib dxguid.lib libfreetype2.lib libicu.lib"
|
||||
AdditionalDependencies="winmm.lib ws2_32.lib libpng.lib zlibstat.lib dxguid.lib libfreetype2.lib libicu.lib"
|
||||
LinkIncremental="0"
|
||||
SuppressStartupBanner="true"
|
||||
IgnoreDefaultLibraryNames="LIBCMT.lib"
|
||||
@@ -271,7 +271,7 @@
|
||||
FavorSizeOrSpeed="2"
|
||||
OmitFramePointers="true"
|
||||
AdditionalIncludeDirectories="..\objs\langs;..\src\3rdparty\squirrel\include"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_ZLIB;WITH_LZO;WITH_PNG;WITH_FREETYPE;WITH_ICU;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR=\"OpenTTD\";_SQ64;WITH_ASSERT"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_ZLIB;WITH_PNG;WITH_FREETYPE;WITH_ICU;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR=\"OpenTTD\";_SQ64;WITH_ASSERT"
|
||||
StringPooling="true"
|
||||
ExceptionHandling="1"
|
||||
RuntimeLibrary="0"
|
||||
@@ -308,7 +308,7 @@
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="winmm.lib ws2_32.lib libpng.lib zlibstat.lib lzo2.lib dxguid.lib libfreetype2.lib libicu.lib"
|
||||
AdditionalDependencies="winmm.lib ws2_32.lib libpng.lib zlibstat.lib dxguid.lib libfreetype2.lib libicu.lib"
|
||||
LinkIncremental="1"
|
||||
SuppressStartupBanner="true"
|
||||
IgnoreDefaultLibraryNames=""
|
||||
@@ -380,7 +380,7 @@
|
||||
AdditionalOptions="/MP"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="..\objs\langs;..\src\3rdparty\squirrel\include"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_ZLIB;WITH_LZO;WITH_PNG;WITH_FREETYPE;WITH_ICU;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR=\"OpenTTD\";_SQ64"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_ZLIB;WITH_PNG;WITH_FREETYPE;WITH_ICU;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR=\"OpenTTD\";_SQ64"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="1"
|
||||
UsePrecompiledHeader="0"
|
||||
@@ -410,7 +410,7 @@
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="winmm.lib ws2_32.lib libpng.lib zlibstat.lib lzo2.lib dxguid.lib libfreetype2.lib libicu.lib"
|
||||
AdditionalDependencies="winmm.lib ws2_32.lib libpng.lib zlibstat.lib dxguid.lib libfreetype2.lib libicu.lib"
|
||||
LinkIncremental="0"
|
||||
SuppressStartupBanner="true"
|
||||
IgnoreDefaultLibraryNames="LIBCMT.lib"
|
||||
|
@@ -1,6 +1,6 @@
|
||||
OpenTTD README
|
||||
Last updated: 2010-01-21
|
||||
Release version: 1.0.0-beta3
|
||||
Last updated: 2010-01-05
|
||||
Release version: 1.0.0-beta2
|
||||
------------------------------------------------------------------------
|
||||
|
||||
|
||||
@@ -410,7 +410,6 @@ DOS:
|
||||
The following libraries are used by OpenTTD for:
|
||||
- libSDL/liballegro: hardware access (video, sound, mouse)
|
||||
- zlib: (de)compressing of savegames
|
||||
- liblzo2: (de)compressing of old (pre 0.3.0) savegames
|
||||
- libpng: making screenshots and loading heightmaps
|
||||
- libfreetype: loading generic fonts and rendering them
|
||||
- libfontconfig: searching for fonts, resolving font names to actual fonts
|
||||
@@ -547,6 +546,7 @@ Thanks to:
|
||||
Christian Rosentreter (tokai) - MorphOS / AmigaOS port
|
||||
Richard Kempton (RichK67) - Additional airports, initial TGP implementation
|
||||
Alberto Demichelis - Squirrel scripting language
|
||||
Markus F.X.J. Oberhumer - MiniLZO for loading old savegames
|
||||
L. Peter Deutsch - MD5 implementation
|
||||
Michael Blunck - For revolutionizing TTD with awesome graphics
|
||||
George - Canal graphics
|
||||
|
13
source.list
13
source.list
@@ -4,6 +4,7 @@ animated_tile.cpp
|
||||
articulated_vehicles.cpp
|
||||
autoreplace.cpp
|
||||
bmp.cpp
|
||||
callback_table.cpp
|
||||
cargopacket.cpp
|
||||
cargotype.cpp
|
||||
cheat.cpp
|
||||
@@ -58,7 +59,6 @@ settings.cpp
|
||||
signal.cpp
|
||||
signs.cpp
|
||||
sound.cpp
|
||||
sprite.cpp
|
||||
spritecache.cpp
|
||||
station.cpp
|
||||
string.cpp
|
||||
@@ -99,6 +99,7 @@ window.cpp
|
||||
#end
|
||||
aircraft.h
|
||||
airport.h
|
||||
airport_movement.h
|
||||
animated_tile_func.h
|
||||
articulated_vehicles.h
|
||||
autoreplace_base.h
|
||||
@@ -111,6 +112,7 @@ base_media_func.h
|
||||
base_station_base.h
|
||||
bmp.h
|
||||
bridge.h
|
||||
callback_table.h
|
||||
cargo_type.h
|
||||
cargopacket.h
|
||||
cargotype.h
|
||||
@@ -473,9 +475,6 @@ saveload/vehicle_sl.cpp
|
||||
saveload/waypoint_sl.cpp
|
||||
|
||||
# Tables
|
||||
table/airport_defaults.h
|
||||
table/airporttiles.h
|
||||
table/airport_movement.h
|
||||
table/animcursors.h
|
||||
table/autorail.h
|
||||
table/bridge_land.h
|
||||
@@ -512,6 +511,12 @@ table/water_land.h
|
||||
3rdparty/md5/md5.cpp
|
||||
3rdparty/md5/md5.h
|
||||
|
||||
# MiniLZO
|
||||
3rdparty/minilzo/lzoconf.h
|
||||
3rdparty/minilzo/lzodefs.h
|
||||
3rdparty/minilzo/minilzo.c
|
||||
3rdparty/minilzo/minilzo.h
|
||||
|
||||
# Script
|
||||
script/script_info.cpp
|
||||
script/script_info.hpp
|
||||
|
340
src/3rdparty/minilzo/COPYING
vendored
Normal file
340
src/3rdparty/minilzo/COPYING
vendored
Normal file
@@ -0,0 +1,340 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
License is intended to guarantee your freedom to share and change free
|
||||
software--to make sure the software is free for all its users. This
|
||||
General Public License applies to most of the Free Software
|
||||
Foundation's software and to any other program whose authors commit to
|
||||
using it. (Some other Free Software Foundation software is covered by
|
||||
the GNU Library General Public License instead.) You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
this service if you wish), that you receive source code or can get it
|
||||
if you want it, that you can change the software or use pieces of it
|
||||
in new free programs; and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
anyone to deny you these rights or to ask you to surrender the rights.
|
||||
These restrictions translate to certain responsibilities for you if you
|
||||
distribute copies of the software, or if you modify it.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must give the recipients all the rights that
|
||||
you have. You must make sure that they, too, receive or can get the
|
||||
source code. And you must show them these terms so they know their
|
||||
rights.
|
||||
|
||||
We protect your rights with two steps: (1) copyright the software, and
|
||||
(2) offer you this license which gives you legal permission to copy,
|
||||
distribute and/or modify the software.
|
||||
|
||||
Also, for each author's protection and ours, we want to make certain
|
||||
that everyone understands that there is no warranty for this free
|
||||
software. If the software is modified by someone else and passed on, we
|
||||
want its recipients to know that what they have is not the original, so
|
||||
that any problems introduced by others will not reflect on the original
|
||||
authors' reputations.
|
||||
|
||||
Finally, any free program is threatened constantly by software
|
||||
patents. We wish to avoid the danger that redistributors of a free
|
||||
program will individually obtain patent licenses, in effect making the
|
||||
program proprietary. To prevent this, we have made it clear that any
|
||||
patent must be licensed for everyone's free use or not licensed at all.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License applies to any program or other work which contains
|
||||
a notice placed by the copyright holder saying it may be distributed
|
||||
under the terms of this General Public License. The "Program", below,
|
||||
refers to any such program or work, and a "work based on the Program"
|
||||
means either the Program or any derivative work under copyright law:
|
||||
that is to say, a work containing the Program or a portion of it,
|
||||
either verbatim or with modifications and/or translated into another
|
||||
language. (Hereinafter, translation is included without limitation in
|
||||
the term "modification".) Each licensee is addressed as "you".
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running the Program is not restricted, and the output from the Program
|
||||
is covered only if its contents constitute a work based on the
|
||||
Program (independent of having been made by running the Program).
|
||||
Whether that is true depends on what the Program does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Program's
|
||||
source code as you receive it, in any medium, provided that you
|
||||
conspicuously and appropriately publish on each copy an appropriate
|
||||
copyright notice and disclaimer of warranty; keep intact all the
|
||||
notices that refer to this License and to the absence of any warranty;
|
||||
and give any other recipients of the Program a copy of this License
|
||||
along with the Program.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy, and
|
||||
you may at your option offer warranty protection in exchange for a fee.
|
||||
|
||||
2. You may modify your copy or copies of the Program or any portion
|
||||
of it, thus forming a work based on the Program, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) You must cause the modified files to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
b) You must cause any work that you distribute or publish, that in
|
||||
whole or in part contains or is derived from the Program or any
|
||||
part thereof, to be licensed as a whole at no charge to all third
|
||||
parties under the terms of this License.
|
||||
|
||||
c) If the modified program normally reads commands interactively
|
||||
when run, you must cause it, when started running for such
|
||||
interactive use in the most ordinary way, to print or display an
|
||||
announcement including an appropriate copyright notice and a
|
||||
notice that there is no warranty (or else, saying that you provide
|
||||
a warranty) and that users may redistribute the program under
|
||||
these conditions, and telling the user how to view a copy of this
|
||||
License. (Exception: if the Program itself is interactive but
|
||||
does not normally print such an announcement, your work based on
|
||||
the Program is not required to print an announcement.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Program,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Program, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Program.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Program
|
||||
with the Program (or with a work based on the Program) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may copy and distribute the Program (or a work based on it,
|
||||
under Section 2) in object code or executable form under the terms of
|
||||
Sections 1 and 2 above provided that you also do one of the following:
|
||||
|
||||
a) Accompany it with the complete corresponding machine-readable
|
||||
source code, which must be distributed under the terms of Sections
|
||||
1 and 2 above on a medium customarily used for software interchange; or,
|
||||
|
||||
b) Accompany it with a written offer, valid for at least three
|
||||
years, to give any third party, for a charge no more than your
|
||||
cost of physically performing source distribution, a complete
|
||||
machine-readable copy of the corresponding source code, to be
|
||||
distributed under the terms of Sections 1 and 2 above on a medium
|
||||
customarily used for software interchange; or,
|
||||
|
||||
c) Accompany it with the information you received as to the offer
|
||||
to distribute corresponding source code. (This alternative is
|
||||
allowed only for noncommercial distribution and only if you
|
||||
received the program in object code or executable form with such
|
||||
an offer, in accord with Subsection b above.)
|
||||
|
||||
The source code for a work means the preferred form of the work for
|
||||
making modifications to it. For an executable work, complete source
|
||||
code means all the source code for all modules it contains, plus any
|
||||
associated interface definition files, plus the scripts used to
|
||||
control compilation and installation of the executable. However, as a
|
||||
special exception, the source code distributed need not include
|
||||
anything that is normally distributed (in either source or binary
|
||||
form) with the major components (compiler, kernel, and so on) of the
|
||||
operating system on which the executable runs, unless that component
|
||||
itself accompanies the executable.
|
||||
|
||||
If distribution of executable or object code is made by offering
|
||||
access to copy from a designated place, then offering equivalent
|
||||
access to copy the source code from the same place counts as
|
||||
distribution of the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
4. You may not copy, modify, sublicense, or distribute the Program
|
||||
except as expressly provided under this License. Any attempt
|
||||
otherwise to copy, modify, sublicense or distribute the Program is
|
||||
void, and will automatically terminate your rights under this License.
|
||||
However, parties who have received copies, or rights, from you under
|
||||
this License will not have their licenses terminated so long as such
|
||||
parties remain in full compliance.
|
||||
|
||||
5. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Program or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Program (or any work based on the
|
||||
Program), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Program or works based on it.
|
||||
|
||||
6. Each time you redistribute the Program (or any work based on the
|
||||
Program), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute or modify the Program subject to
|
||||
these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties to
|
||||
this License.
|
||||
|
||||
7. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Program at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Program by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Program.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under
|
||||
any particular circumstance, the balance of the section is intended to
|
||||
apply and the section as a whole is intended to apply in other
|
||||
circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system, which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
8. If the distribution and/or use of the Program is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Program under this License
|
||||
may add an explicit geographical distribution limitation excluding
|
||||
those countries, so that distribution is permitted only in or among
|
||||
countries not thus excluded. In such case, this License incorporates
|
||||
the limitation as if written in the body of this License.
|
||||
|
||||
9. The Free Software Foundation may publish revised and/or new versions
|
||||
of the General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Program
|
||||
specifies a version number of this License which applies to it and "any
|
||||
later version", you have the option of following the terms and conditions
|
||||
either of that version or of any later version published by the Free
|
||||
Software Foundation. If the Program does not specify a version number of
|
||||
this License, you may choose any version ever published by the Free Software
|
||||
Foundation.
|
||||
|
||||
10. If you wish to incorporate parts of the Program into other free
|
||||
programs whose distribution conditions are different, write to the author
|
||||
to ask for permission. For software which is copyrighted by the Free
|
||||
Software Foundation, write to the Free Software Foundation; we sometimes
|
||||
make exceptions for this. Our decision will be guided by the two goals
|
||||
of preserving the free status of all derivatives of our free software and
|
||||
of promoting the sharing and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
||||
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
||||
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
||||
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
||||
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
||||
REPAIR OR CORRECTION.
|
||||
|
||||
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
||||
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
||||
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
||||
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
||||
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
||||
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) 19yy <name of author>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program is interactive, make it output a short notice like this
|
||||
when it starts in an interactive mode:
|
||||
|
||||
Gnomovision version 69, Copyright (C) 19yy name of author
|
||||
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, the commands you use may
|
||||
be called something other than `show w' and `show c'; they could even be
|
||||
mouse-clicks or menu items--whatever suits your program.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the program, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
||||
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1989
|
||||
Ty Coon, President of Vice
|
||||
|
||||
This General Public License does not permit incorporating your program into
|
||||
proprietary programs. If your program is a subroutine library, you may
|
||||
consider it more useful to permit linking proprietary applications with the
|
||||
library. If this is what you want to do, use the GNU Library General
|
||||
Public License instead of this License.
|
113
src/3rdparty/minilzo/Makefile
vendored
Normal file
113
src/3rdparty/minilzo/Makefile
vendored
Normal file
@@ -0,0 +1,113 @@
|
||||
#
|
||||
# a very simple Makefile for miniLZO
|
||||
#
|
||||
# Copyright (C) 1996-2008 Markus F.X.J. Oberhumer
|
||||
#
|
||||
|
||||
PROGRAM = testmini
|
||||
SOURCES = testmini.c minilzo.c
|
||||
|
||||
default:
|
||||
@echo "Please choose one of the following targets:"
|
||||
@echo " gcc: gcc"
|
||||
@echo " unix: hpux hpux9"
|
||||
@echo " win32: win32-bc win32-cygwin win32-dm win32-lccwin32"
|
||||
@echo " win32-intelc win32-mingw win32-vc win32-watcomc"
|
||||
@echo " dos16: dos16-bc dos16-mc dos16-wc"
|
||||
@echo " dos32: dos32-djgpp2 dos32-wc"
|
||||
|
||||
|
||||
# Make sure that minilzo.h, lzoconf.h and lzodefs.h are in the
|
||||
# current dircectory. Otherwise you may want to adjust CPPFLAGS.
|
||||
##CPPFLAGS = -I../include/lzo -I.
|
||||
|
||||
GCC_CFLAGS = -s -Wall -O2 -fomit-frame-pointer
|
||||
|
||||
|
||||
#
|
||||
# gcc (generic)
|
||||
#
|
||||
|
||||
gcc:
|
||||
gcc $(CPPFLAGS) $(GCC_CFLAGS) -o $(PROGRAM) $(SOURCES)
|
||||
|
||||
cc:
|
||||
cc $(CPPFLAGS) -o $(PROGRAM) $(SOURCES)
|
||||
|
||||
|
||||
#
|
||||
# UNIX
|
||||
#
|
||||
|
||||
hpux:
|
||||
cc -Ae $(CPPFLAGS) -o $(PROGRAM) $(SOURCES)
|
||||
|
||||
hpux9:
|
||||
cc -Aa -D_HPUX_SOURCE $(CPPFLAGS) -o $(PROGRAM) $(SOURCES)
|
||||
|
||||
|
||||
#
|
||||
# Windows (32-bit)
|
||||
#
|
||||
|
||||
win32-borlandc win32-bc:
|
||||
bcc32 -O2 -d -w -w-aus $(CPPFLAGS) $(SOURCES)
|
||||
|
||||
win32-cygwin32 win32-cygwin:
|
||||
gcc -mcygwin $(CPPFLAGS) $(GCC_CFLAGS) -o $(PROGRAM).exe $(SOURCES)
|
||||
|
||||
win32-digitalmars win32-dm:
|
||||
dmc -mn -o -w- $(CPPFLAGS) $(SOURCES)
|
||||
|
||||
win32-intelc win32-ic:
|
||||
icl -nologo -MD -W3 -O2 -GF $(CPPFLAGS) $(SOURCES)
|
||||
|
||||
win32-lccwin32:
|
||||
@echo "NOTE: need lcc 2002-07-25 or newer, older versions have bugs"
|
||||
lc -A -unused -O $(CPPFLAGS) $(SOURCES)
|
||||
|
||||
win32-mingw32 win32-mingw:
|
||||
gcc -mno-cygwin $(CPPFLAGS) $(GCC_CFLAGS) -o $(PROGRAM).exe $(SOURCES)
|
||||
|
||||
win32-visualc win32-vc:
|
||||
cl -nologo -MD -W3 -O2 -GF $(CPPFLAGS) $(SOURCES)
|
||||
|
||||
win32-watcomc win32-wc:
|
||||
wcl386 -bt=nt -zq -mf -5r -zc -w5 -oneatx $(CPPFLAGS) $(SOURCES)
|
||||
|
||||
|
||||
#
|
||||
# DOS (16-bit)
|
||||
#
|
||||
|
||||
dos16-borlandc dos16-bc:
|
||||
bcc -ml -w -d -O -4 $(CPPFLAGS) $(SOURCES)
|
||||
|
||||
dos16-microsoftc dos16-msc dos16-mc:
|
||||
cl -nologo -f- -AL -O -G2 -W3 $(CPPFLAGS) $(SOURCES)
|
||||
|
||||
dos16-watcomc dos16-wc:
|
||||
wcl -zq -ml -bt=dos -l=dos -ox -w5 $(CPPFLAGS) $(SOURCES)
|
||||
|
||||
|
||||
#
|
||||
# DOS (32-bit)
|
||||
#
|
||||
|
||||
dos32-djgpp2 dos32-dj2:
|
||||
gcc $(CPPFLAGS) $(GCC_CFLAGS) -o $(PROGRAM).exe $(SOURCES)
|
||||
|
||||
dos32-watcomc dos32-wc:
|
||||
wcl386 -zq -mf -bt=dos -l=dos4g -5r -ox -zc $(CPPFLAGS) $(SOURCES)
|
||||
|
||||
|
||||
#
|
||||
# other targets
|
||||
#
|
||||
|
||||
clean:
|
||||
rm -f $(PROGRAM) $(PROGRAM).exe $(PROGRAM).map $(PROGRAM).tds
|
||||
rm -f *.err *.o *.obj
|
||||
|
||||
.PHONY: default clean
|
||||
|
123
src/3rdparty/minilzo/README.LZO
vendored
Normal file
123
src/3rdparty/minilzo/README.LZO
vendored
Normal file
@@ -0,0 +1,123 @@
|
||||
|
||||
============================================================================
|
||||
miniLZO -- mini subset of the LZO real-time data compression library
|
||||
============================================================================
|
||||
|
||||
Author : Markus Franz Xaver Johannes Oberhumer
|
||||
<markus@oberhumer.com>
|
||||
http://www.oberhumer.com/opensource/lzo/
|
||||
Version : 2.03
|
||||
Date : 30 Apr 2008
|
||||
|
||||
I've created miniLZO for projects where it is inconvenient to
|
||||
include (or require) the full LZO source code just because you
|
||||
want to add a little bit of data compression to your application.
|
||||
|
||||
miniLZO implements the LZO1X-1 compressor and both the standard and
|
||||
safe LZO1X decompressor. Apart from fast compression it also useful
|
||||
for situations where you want to use pre-compressed data files (which
|
||||
must have been compressed with LZO1X-999).
|
||||
|
||||
miniLZO consists of one C source file and three header files:
|
||||
minilzo.c
|
||||
minilzo.h, lzoconf.h, lzodefs.h
|
||||
|
||||
To use miniLZO just copy these files into your source directory, add
|
||||
minilzo.c to your Makefile and #include minilzo.h from your program.
|
||||
Note: you also must distribute this file (`README.LZO') with your project.
|
||||
|
||||
minilzo.o compiles to about 6 kB (using gcc or Visual C on a i386), and
|
||||
the sources are about 30 kB when packed with zip - so there's no more
|
||||
excuse that your application doesn't support data compression :-)
|
||||
|
||||
For more information, documentation, example programs and other support
|
||||
files (like Makefiles and build scripts) please download the full LZO
|
||||
package from
|
||||
http://www.oberhumer.com/opensource/lzo/
|
||||
|
||||
Have fun,
|
||||
Markus
|
||||
|
||||
|
||||
P.S. minilzo.c is generated automatically from the LZO sources and
|
||||
therefore functionality is completely identical
|
||||
|
||||
|
||||
Appendix A: building miniLZO
|
||||
----------------------------
|
||||
miniLZO is written such a way that it should compile and run
|
||||
out-of-the-box on most machines.
|
||||
|
||||
If you are running on a very unusual architecture and lzo_init() fails then
|
||||
you should first recompile with `-DLZO_DEBUG' to see what causes the failure.
|
||||
The most probable case is something like `sizeof(char *) != sizeof(long)'.
|
||||
After identifying the problem you can compile by adding some defines
|
||||
like `-DSIZEOF_CHAR_P=8' to your Makefile.
|
||||
|
||||
The best solution is (of course) using Autoconf - if your project uses
|
||||
Autoconf anyway just add `-DMINILZO_HAVE_CONFIG_H' to your compiler
|
||||
flags when compiling minilzo.c. See the LZO distribution for an example
|
||||
how to set up configure.in.
|
||||
|
||||
|
||||
Appendix B: list of public functions available in miniLZO
|
||||
---------------------------------------------------------
|
||||
Library initialization
|
||||
lzo_init()
|
||||
|
||||
Compression
|
||||
lzo1x_1_compress()
|
||||
|
||||
Decompression
|
||||
lzo1x_decompress()
|
||||
lzo1x_decompress_safe()
|
||||
|
||||
Checksum functions
|
||||
lzo_adler32()
|
||||
|
||||
Version functions
|
||||
lzo_version()
|
||||
lzo_version_string()
|
||||
lzo_version_date()
|
||||
|
||||
Portable (but slow) string functions
|
||||
lzo_memcmp()
|
||||
lzo_memcpy()
|
||||
lzo_memmove()
|
||||
lzo_memset()
|
||||
|
||||
|
||||
Appendix C: suggested macros for `configure.in' when using Autoconf
|
||||
-------------------------------------------------------------------
|
||||
Checks for typedefs and structures
|
||||
AC_CHECK_TYPE(ptrdiff_t,long)
|
||||
AC_TYPE_SIZE_T
|
||||
AC_CHECK_SIZEOF(short)
|
||||
AC_CHECK_SIZEOF(int)
|
||||
AC_CHECK_SIZEOF(long)
|
||||
AC_CHECK_SIZEOF(long long)
|
||||
AC_CHECK_SIZEOF(__int64)
|
||||
AC_CHECK_SIZEOF(void *)
|
||||
AC_CHECK_SIZEOF(size_t)
|
||||
AC_CHECK_SIZEOF(ptrdiff_t)
|
||||
|
||||
Checks for compiler characteristics
|
||||
AC_C_CONST
|
||||
|
||||
Checks for library functions
|
||||
AC_CHECK_FUNCS(memcmp memcpy memmove memset)
|
||||
|
||||
|
||||
Appendix D: Copyright
|
||||
---------------------
|
||||
LZO and miniLZO are Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
2003, 2004, 2005, 2006, 2007, 2008 Markus Franz Xaver Johannes Oberhumer
|
||||
|
||||
LZO and miniLZO are distributed under the terms of the GNU General
|
||||
Public License (GPL). See the file COPYING.
|
||||
|
||||
Special licenses for commercial and other applications which
|
||||
are not willing to accept the GNU General Public License
|
||||
are available by contacting the author.
|
||||
|
||||
|
417
src/3rdparty/minilzo/lzoconf.h
vendored
Normal file
417
src/3rdparty/minilzo/lzoconf.h
vendored
Normal file
@@ -0,0 +1,417 @@
|
||||
/* lzoconf.h -- configuration for the LZO real-time data compression library
|
||||
|
||||
This file is part of the LZO real-time data compression library.
|
||||
|
||||
Copyright (C) 2008 Markus Franz Xaver Johannes Oberhumer
|
||||
Copyright (C) 2007 Markus Franz Xaver Johannes Oberhumer
|
||||
Copyright (C) 2006 Markus Franz Xaver Johannes Oberhumer
|
||||
Copyright (C) 2005 Markus Franz Xaver Johannes Oberhumer
|
||||
Copyright (C) 2004 Markus Franz Xaver Johannes Oberhumer
|
||||
Copyright (C) 2003 Markus Franz Xaver Johannes Oberhumer
|
||||
Copyright (C) 2002 Markus Franz Xaver Johannes Oberhumer
|
||||
Copyright (C) 2001 Markus Franz Xaver Johannes Oberhumer
|
||||
Copyright (C) 2000 Markus Franz Xaver Johannes Oberhumer
|
||||
Copyright (C) 1999 Markus Franz Xaver Johannes Oberhumer
|
||||
Copyright (C) 1998 Markus Franz Xaver Johannes Oberhumer
|
||||
Copyright (C) 1997 Markus Franz Xaver Johannes Oberhumer
|
||||
Copyright (C) 1996 Markus Franz Xaver Johannes Oberhumer
|
||||
All Rights Reserved.
|
||||
|
||||
The LZO library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License as
|
||||
published by the Free Software Foundation; either version 2 of
|
||||
the License, or (at your option) any later version.
|
||||
|
||||
The LZO library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with the LZO library; see the file COPYING.
|
||||
If not, write to the Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
Markus F.X.J. Oberhumer
|
||||
<markus@oberhumer.com>
|
||||
http://www.oberhumer.com/opensource/lzo/
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __LZOCONF_H_INCLUDED
|
||||
#define __LZOCONF_H_INCLUDED
|
||||
|
||||
#define LZO_VERSION 0x2030
|
||||
#define LZO_VERSION_STRING "2.03"
|
||||
#define LZO_VERSION_DATE "Apr 30 2008"
|
||||
|
||||
/* internal Autoconf configuration file - only used when building LZO */
|
||||
#if defined(LZO_HAVE_CONFIG_H)
|
||||
# include <config.h>
|
||||
#endif
|
||||
#include <limits.h>
|
||||
#include <stddef.h>
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
// LZO requires a conforming <limits.h>
|
||||
************************************************************************/
|
||||
|
||||
#if !defined(CHAR_BIT) || (CHAR_BIT != 8)
|
||||
# error "invalid CHAR_BIT"
|
||||
#endif
|
||||
#if !defined(UCHAR_MAX) || !defined(UINT_MAX) || !defined(ULONG_MAX)
|
||||
# error "check your compiler installation"
|
||||
#endif
|
||||
#if (USHRT_MAX < 1) || (UINT_MAX < 1) || (ULONG_MAX < 1)
|
||||
# error "your limits.h macros are broken"
|
||||
#endif
|
||||
|
||||
/* get OS and architecture defines */
|
||||
#ifndef __LZODEFS_H_INCLUDED
|
||||
#include "lzodefs.h"
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
// some core defines
|
||||
************************************************************************/
|
||||
|
||||
#if !defined(LZO_UINT32_C)
|
||||
# if (UINT_MAX < LZO_0xffffffffL)
|
||||
# define LZO_UINT32_C(c) c ## UL
|
||||
# else
|
||||
# define LZO_UINT32_C(c) ((c) + 0U)
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* memory checkers */
|
||||
#if !defined(__LZO_CHECKER)
|
||||
# if defined(__BOUNDS_CHECKING_ON)
|
||||
# define __LZO_CHECKER 1
|
||||
# elif defined(__CHECKER__)
|
||||
# define __LZO_CHECKER 1
|
||||
# elif defined(__INSURE__)
|
||||
# define __LZO_CHECKER 1
|
||||
# elif defined(__PURIFY__)
|
||||
# define __LZO_CHECKER 1
|
||||
# endif
|
||||
#endif
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
// integral and pointer types
|
||||
************************************************************************/
|
||||
|
||||
/* lzo_uint should match size_t */
|
||||
#if !defined(LZO_UINT_MAX)
|
||||
# if defined(LZO_ABI_LLP64) /* WIN64 */
|
||||
# if defined(LZO_OS_WIN64)
|
||||
typedef unsigned __int64 lzo_uint;
|
||||
typedef __int64 lzo_int;
|
||||
# else
|
||||
typedef unsigned long long lzo_uint;
|
||||
typedef long long lzo_int;
|
||||
# endif
|
||||
# define LZO_UINT_MAX 0xffffffffffffffffull
|
||||
# define LZO_INT_MAX 9223372036854775807LL
|
||||
# define LZO_INT_MIN (-1LL - LZO_INT_MAX)
|
||||
# elif defined(LZO_ABI_IP32L64) /* MIPS R5900 */
|
||||
typedef unsigned int lzo_uint;
|
||||
typedef int lzo_int;
|
||||
# define LZO_UINT_MAX UINT_MAX
|
||||
# define LZO_INT_MAX INT_MAX
|
||||
# define LZO_INT_MIN INT_MIN
|
||||
# elif (ULONG_MAX >= LZO_0xffffffffL)
|
||||
typedef unsigned long lzo_uint;
|
||||
typedef long lzo_int;
|
||||
# define LZO_UINT_MAX ULONG_MAX
|
||||
# define LZO_INT_MAX LONG_MAX
|
||||
# define LZO_INT_MIN LONG_MIN
|
||||
# else
|
||||
# error "lzo_uint"
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* Integral types with 32 bits or more. */
|
||||
#if !defined(LZO_UINT32_MAX)
|
||||
# if (UINT_MAX >= LZO_0xffffffffL)
|
||||
typedef unsigned int lzo_uint32;
|
||||
typedef int lzo_int32;
|
||||
# define LZO_UINT32_MAX UINT_MAX
|
||||
# define LZO_INT32_MAX INT_MAX
|
||||
# define LZO_INT32_MIN INT_MIN
|
||||
# elif (ULONG_MAX >= LZO_0xffffffffL)
|
||||
typedef unsigned long lzo_uint32;
|
||||
typedef long lzo_int32;
|
||||
# define LZO_UINT32_MAX ULONG_MAX
|
||||
# define LZO_INT32_MAX LONG_MAX
|
||||
# define LZO_INT32_MIN LONG_MIN
|
||||
# else
|
||||
# error "lzo_uint32"
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* The larger type of lzo_uint and lzo_uint32. */
|
||||
#if (LZO_UINT_MAX >= LZO_UINT32_MAX)
|
||||
# define lzo_xint lzo_uint
|
||||
#else
|
||||
# define lzo_xint lzo_uint32
|
||||
#endif
|
||||
|
||||
/* Memory model that allows to access memory at offsets of lzo_uint. */
|
||||
#if !defined(__LZO_MMODEL)
|
||||
# if (LZO_UINT_MAX <= UINT_MAX)
|
||||
# define __LZO_MMODEL
|
||||
# elif defined(LZO_HAVE_MM_HUGE_PTR)
|
||||
# define __LZO_MMODEL_HUGE 1
|
||||
# define __LZO_MMODEL __huge
|
||||
# else
|
||||
# define __LZO_MMODEL
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* no typedef here because of const-pointer issues */
|
||||
#define lzo_bytep unsigned char __LZO_MMODEL *
|
||||
#define lzo_charp char __LZO_MMODEL *
|
||||
#define lzo_voidp void __LZO_MMODEL *
|
||||
#define lzo_shortp short __LZO_MMODEL *
|
||||
#define lzo_ushortp unsigned short __LZO_MMODEL *
|
||||
#define lzo_uint32p lzo_uint32 __LZO_MMODEL *
|
||||
#define lzo_int32p lzo_int32 __LZO_MMODEL *
|
||||
#define lzo_uintp lzo_uint __LZO_MMODEL *
|
||||
#define lzo_intp lzo_int __LZO_MMODEL *
|
||||
#define lzo_xintp lzo_xint __LZO_MMODEL *
|
||||
#define lzo_voidpp lzo_voidp __LZO_MMODEL *
|
||||
#define lzo_bytepp lzo_bytep __LZO_MMODEL *
|
||||
/* deprecated - use `lzo_bytep' instead of `lzo_byte *' */
|
||||
#define lzo_byte unsigned char __LZO_MMODEL
|
||||
|
||||
typedef int lzo_bool;
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
// function types
|
||||
************************************************************************/
|
||||
|
||||
/* name mangling */
|
||||
#if !defined(__LZO_EXTERN_C)
|
||||
# ifdef __cplusplus
|
||||
# define __LZO_EXTERN_C extern "C"
|
||||
# else
|
||||
# define __LZO_EXTERN_C extern
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* calling convention */
|
||||
#if !defined(__LZO_CDECL)
|
||||
# define __LZO_CDECL __lzo_cdecl
|
||||
#endif
|
||||
|
||||
/* DLL export information */
|
||||
#if !defined(__LZO_EXPORT1)
|
||||
# define __LZO_EXPORT1
|
||||
#endif
|
||||
#if !defined(__LZO_EXPORT2)
|
||||
# define __LZO_EXPORT2
|
||||
#endif
|
||||
|
||||
/* __cdecl calling convention for public C and assembly functions */
|
||||
#if !defined(LZO_PUBLIC)
|
||||
# define LZO_PUBLIC(_rettype) __LZO_EXPORT1 _rettype __LZO_EXPORT2 __LZO_CDECL
|
||||
#endif
|
||||
#if !defined(LZO_EXTERN)
|
||||
# define LZO_EXTERN(_rettype) __LZO_EXTERN_C LZO_PUBLIC(_rettype)
|
||||
#endif
|
||||
#if !defined(LZO_PRIVATE)
|
||||
# define LZO_PRIVATE(_rettype) static _rettype __LZO_CDECL
|
||||
#endif
|
||||
|
||||
/* function types */
|
||||
typedef int
|
||||
(__LZO_CDECL *lzo_compress_t) ( const lzo_bytep src, lzo_uint src_len,
|
||||
lzo_bytep dst, lzo_uintp dst_len,
|
||||
lzo_voidp wrkmem );
|
||||
|
||||
typedef int
|
||||
(__LZO_CDECL *lzo_decompress_t) ( const lzo_bytep src, lzo_uint src_len,
|
||||
lzo_bytep dst, lzo_uintp dst_len,
|
||||
lzo_voidp wrkmem );
|
||||
|
||||
typedef int
|
||||
(__LZO_CDECL *lzo_optimize_t) ( lzo_bytep src, lzo_uint src_len,
|
||||
lzo_bytep dst, lzo_uintp dst_len,
|
||||
lzo_voidp wrkmem );
|
||||
|
||||
typedef int
|
||||
(__LZO_CDECL *lzo_compress_dict_t)(const lzo_bytep src, lzo_uint src_len,
|
||||
lzo_bytep dst, lzo_uintp dst_len,
|
||||
lzo_voidp wrkmem,
|
||||
const lzo_bytep dict, lzo_uint dict_len );
|
||||
|
||||
typedef int
|
||||
(__LZO_CDECL *lzo_decompress_dict_t)(const lzo_bytep src, lzo_uint src_len,
|
||||
lzo_bytep dst, lzo_uintp dst_len,
|
||||
lzo_voidp wrkmem,
|
||||
const lzo_bytep dict, lzo_uint dict_len );
|
||||
|
||||
|
||||
/* Callback interface. Currently only the progress indicator ("nprogress")
|
||||
* is used, but this may change in a future release. */
|
||||
|
||||
struct lzo_callback_t;
|
||||
typedef struct lzo_callback_t lzo_callback_t;
|
||||
#define lzo_callback_p lzo_callback_t __LZO_MMODEL *
|
||||
|
||||
/* malloc & free function types */
|
||||
typedef lzo_voidp (__LZO_CDECL *lzo_alloc_func_t)
|
||||
(lzo_callback_p self, lzo_uint items, lzo_uint size);
|
||||
typedef void (__LZO_CDECL *lzo_free_func_t)
|
||||
(lzo_callback_p self, lzo_voidp ptr);
|
||||
|
||||
/* a progress indicator callback function */
|
||||
typedef void (__LZO_CDECL *lzo_progress_func_t)
|
||||
(lzo_callback_p, lzo_uint, lzo_uint, int);
|
||||
|
||||
struct lzo_callback_t
|
||||
{
|
||||
/* custom allocators (set to 0 to disable) */
|
||||
lzo_alloc_func_t nalloc; /* [not used right now] */
|
||||
lzo_free_func_t nfree; /* [not used right now] */
|
||||
|
||||
/* a progress indicator callback function (set to 0 to disable) */
|
||||
lzo_progress_func_t nprogress;
|
||||
|
||||
/* NOTE: the first parameter "self" of the nalloc/nfree/nprogress
|
||||
* callbacks points back to this struct, so you are free to store
|
||||
* some extra info in the following variables. */
|
||||
lzo_voidp user1;
|
||||
lzo_xint user2;
|
||||
lzo_xint user3;
|
||||
};
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
// error codes and prototypes
|
||||
************************************************************************/
|
||||
|
||||
/* Error codes for the compression/decompression functions. Negative
|
||||
* values are errors, positive values will be used for special but
|
||||
* normal events.
|
||||
*/
|
||||
#define LZO_E_OK 0
|
||||
#define LZO_E_ERROR (-1)
|
||||
#define LZO_E_OUT_OF_MEMORY (-2) /* [not used right now] */
|
||||
#define LZO_E_NOT_COMPRESSIBLE (-3) /* [not used right now] */
|
||||
#define LZO_E_INPUT_OVERRUN (-4)
|
||||
#define LZO_E_OUTPUT_OVERRUN (-5)
|
||||
#define LZO_E_LOOKBEHIND_OVERRUN (-6)
|
||||
#define LZO_E_EOF_NOT_FOUND (-7)
|
||||
#define LZO_E_INPUT_NOT_CONSUMED (-8)
|
||||
#define LZO_E_NOT_YET_IMPLEMENTED (-9) /* [not used right now] */
|
||||
|
||||
|
||||
#ifndef lzo_sizeof_dict_t
|
||||
# define lzo_sizeof_dict_t ((unsigned)sizeof(lzo_bytep))
|
||||
#endif
|
||||
|
||||
/* lzo_init() should be the first function you call.
|
||||
* Check the return code !
|
||||
*
|
||||
* lzo_init() is a macro to allow checking that the library and the
|
||||
* compiler's view of various types are consistent.
|
||||
*/
|
||||
#define lzo_init() __lzo_init_v2(LZO_VERSION,(int)sizeof(short),(int)sizeof(int),\
|
||||
(int)sizeof(long),(int)sizeof(lzo_uint32),(int)sizeof(lzo_uint),\
|
||||
(int)lzo_sizeof_dict_t,(int)sizeof(char *),(int)sizeof(lzo_voidp),\
|
||||
(int)sizeof(lzo_callback_t))
|
||||
LZO_EXTERN(int) __lzo_init_v2(unsigned,int,int,int,int,int,int,int,int,int);
|
||||
|
||||
/* version functions (useful for shared libraries) */
|
||||
LZO_EXTERN(unsigned) lzo_version(void);
|
||||
LZO_EXTERN(const char *) lzo_version_string(void);
|
||||
LZO_EXTERN(const char *) lzo_version_date(void);
|
||||
LZO_EXTERN(const lzo_charp) _lzo_version_string(void);
|
||||
LZO_EXTERN(const lzo_charp) _lzo_version_date(void);
|
||||
|
||||
/* string functions */
|
||||
LZO_EXTERN(int)
|
||||
lzo_memcmp(const lzo_voidp _s1, const lzo_voidp _s2, lzo_uint _len);
|
||||
LZO_EXTERN(lzo_voidp)
|
||||
lzo_memcpy(lzo_voidp _dest, const lzo_voidp _src, lzo_uint _len);
|
||||
LZO_EXTERN(lzo_voidp)
|
||||
lzo_memmove(lzo_voidp _dest, const lzo_voidp _src, lzo_uint _len);
|
||||
LZO_EXTERN(lzo_voidp)
|
||||
lzo_memset(lzo_voidp _s, int _c, lzo_uint _len);
|
||||
|
||||
/* checksum functions */
|
||||
LZO_EXTERN(lzo_uint32)
|
||||
lzo_adler32(lzo_uint32 _adler, const lzo_bytep _buf, lzo_uint _len);
|
||||
LZO_EXTERN(lzo_uint32)
|
||||
lzo_crc32(lzo_uint32 _c, const lzo_bytep _buf, lzo_uint _len);
|
||||
LZO_EXTERN(const lzo_uint32p)
|
||||
lzo_get_crc32_table(void);
|
||||
|
||||
/* misc. */
|
||||
LZO_EXTERN(int) _lzo_config_check(void);
|
||||
typedef union { lzo_bytep p; lzo_uint u; } __lzo_pu_u;
|
||||
typedef union { lzo_bytep p; lzo_uint32 u32; } __lzo_pu32_u;
|
||||
typedef union { void *vp; lzo_bytep bp; lzo_uint32 u32; long l; } lzo_align_t;
|
||||
|
||||
/* align a char pointer on a boundary that is a multiple of `size' */
|
||||
LZO_EXTERN(unsigned) __lzo_align_gap(const lzo_voidp _ptr, lzo_uint _size);
|
||||
#define LZO_PTR_ALIGN_UP(_ptr,_size) \
|
||||
((_ptr) + (lzo_uint) __lzo_align_gap((const lzo_voidp)(_ptr),(lzo_uint)(_size)))
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
// deprecated macros - only for backward compatibility with LZO v1.xx
|
||||
************************************************************************/
|
||||
|
||||
#if defined(LZO_CFG_COMPAT)
|
||||
|
||||
#define __LZOCONF_H 1
|
||||
|
||||
#if defined(LZO_ARCH_I086)
|
||||
# define __LZO_i386 1
|
||||
#elif defined(LZO_ARCH_I386)
|
||||
# define __LZO_i386 1
|
||||
#endif
|
||||
|
||||
#if defined(LZO_OS_DOS16)
|
||||
# define __LZO_DOS 1
|
||||
# define __LZO_DOS16 1
|
||||
#elif defined(LZO_OS_DOS32)
|
||||
# define __LZO_DOS 1
|
||||
#elif defined(LZO_OS_WIN16)
|
||||
# define __LZO_WIN 1
|
||||
# define __LZO_WIN16 1
|
||||
#elif defined(LZO_OS_WIN32)
|
||||
# define __LZO_WIN 1
|
||||
#endif
|
||||
|
||||
#define __LZO_CMODEL
|
||||
#define __LZO_DMODEL
|
||||
#define __LZO_ENTRY __LZO_CDECL
|
||||
#define LZO_EXTERN_CDECL LZO_EXTERN
|
||||
#define LZO_ALIGN LZO_PTR_ALIGN_UP
|
||||
|
||||
#define lzo_compress_asm_t lzo_compress_t
|
||||
#define lzo_decompress_asm_t lzo_decompress_t
|
||||
|
||||
#endif /* LZO_CFG_COMPAT */
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
#endif
|
||||
|
||||
#endif /* already included */
|
||||
|
||||
|
||||
/* vim:set ts=4 et: */
|
1807
src/3rdparty/minilzo/lzodefs.h
vendored
Normal file
1807
src/3rdparty/minilzo/lzodefs.h
vendored
Normal file
File diff suppressed because it is too large
Load Diff
4112
src/3rdparty/minilzo/minilzo.c
vendored
Normal file
4112
src/3rdparty/minilzo/minilzo.c
vendored
Normal file
File diff suppressed because it is too large
Load Diff
106
src/3rdparty/minilzo/minilzo.h
vendored
Normal file
106
src/3rdparty/minilzo/minilzo.h
vendored
Normal file
@@ -0,0 +1,106 @@
|
||||
/* minilzo.h -- mini subset of the LZO real-time data compression library
|
||||
|
||||
This file is part of the LZO real-time data compression library.
|
||||
|
||||
Copyright (C) 2008 Markus Franz Xaver Johannes Oberhumer
|
||||
Copyright (C) 2007 Markus Franz Xaver Johannes Oberhumer
|
||||
Copyright (C) 2006 Markus Franz Xaver Johannes Oberhumer
|
||||
Copyright (C) 2005 Markus Franz Xaver Johannes Oberhumer
|
||||
Copyright (C) 2004 Markus Franz Xaver Johannes Oberhumer
|
||||
Copyright (C) 2003 Markus Franz Xaver Johannes Oberhumer
|
||||
Copyright (C) 2002 Markus Franz Xaver Johannes Oberhumer
|
||||
Copyright (C) 2001 Markus Franz Xaver Johannes Oberhumer
|
||||
Copyright (C) 2000 Markus Franz Xaver Johannes Oberhumer
|
||||
Copyright (C) 1999 Markus Franz Xaver Johannes Oberhumer
|
||||
Copyright (C) 1998 Markus Franz Xaver Johannes Oberhumer
|
||||
Copyright (C) 1997 Markus Franz Xaver Johannes Oberhumer
|
||||
Copyright (C) 1996 Markus Franz Xaver Johannes Oberhumer
|
||||
All Rights Reserved.
|
||||
|
||||
The LZO library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License as
|
||||
published by the Free Software Foundation; either version 2 of
|
||||
the License, or (at your option) any later version.
|
||||
|
||||
The LZO library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with the LZO library; see the file COPYING.
|
||||
If not, write to the Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
Markus F.X.J. Oberhumer
|
||||
<markus@oberhumer.com>
|
||||
http://www.oberhumer.com/opensource/lzo/
|
||||
*/
|
||||
|
||||
/*
|
||||
* NOTE:
|
||||
* the full LZO package can be found at
|
||||
* http://www.oberhumer.com/opensource/lzo/
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __MINILZO_H
|
||||
#define __MINILZO_H
|
||||
|
||||
#define MINILZO_VERSION 0x2030
|
||||
|
||||
#ifdef __LZOCONF_H
|
||||
# error "you cannot use both LZO and miniLZO"
|
||||
#endif
|
||||
|
||||
#undef LZO_HAVE_CONFIG_H
|
||||
#include "lzoconf.h"
|
||||
|
||||
#if !defined(LZO_VERSION) || (LZO_VERSION != MINILZO_VERSION)
|
||||
# error "version mismatch in header files"
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
//
|
||||
************************************************************************/
|
||||
|
||||
/* Memory required for the wrkmem parameter.
|
||||
* When the required size is 0, you can also pass a NULL pointer.
|
||||
*/
|
||||
|
||||
#define LZO1X_MEM_COMPRESS LZO1X_1_MEM_COMPRESS
|
||||
#define LZO1X_1_MEM_COMPRESS ((lzo_uint32) (16384L * lzo_sizeof_dict_t))
|
||||
#define LZO1X_MEM_DECOMPRESS (0)
|
||||
|
||||
|
||||
/* compression */
|
||||
LZO_EXTERN(int)
|
||||
lzo1x_1_compress ( const lzo_bytep src, lzo_uint src_len,
|
||||
lzo_bytep dst, lzo_uintp dst_len,
|
||||
lzo_voidp wrkmem );
|
||||
|
||||
/* decompression */
|
||||
LZO_EXTERN(int)
|
||||
lzo1x_decompress ( const lzo_bytep src, lzo_uint src_len,
|
||||
lzo_bytep dst, lzo_uintp dst_len,
|
||||
lzo_voidp wrkmem /* NOT USED */ );
|
||||
|
||||
/* safe decompression with overrun testing */
|
||||
LZO_EXTERN(int)
|
||||
lzo1x_decompress_safe ( const lzo_bytep src, lzo_uint src_len,
|
||||
lzo_bytep dst, lzo_uintp dst_len,
|
||||
lzo_voidp wrkmem /* NOT USED */ );
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
#endif
|
||||
|
||||
#endif /* already included */
|
||||
|
168
src/3rdparty/minilzo/testmini.c
vendored
Normal file
168
src/3rdparty/minilzo/testmini.c
vendored
Normal file
@@ -0,0 +1,168 @@
|
||||
/* testmini.c -- very simple test program for the miniLZO library
|
||||
|
||||
This file is part of the LZO real-time data compression library.
|
||||
|
||||
Copyright (C) 2008 Markus Franz Xaver Johannes Oberhumer
|
||||
Copyright (C) 2007 Markus Franz Xaver Johannes Oberhumer
|
||||
Copyright (C) 2006 Markus Franz Xaver Johannes Oberhumer
|
||||
Copyright (C) 2005 Markus Franz Xaver Johannes Oberhumer
|
||||
Copyright (C) 2004 Markus Franz Xaver Johannes Oberhumer
|
||||
Copyright (C) 2003 Markus Franz Xaver Johannes Oberhumer
|
||||
Copyright (C) 2002 Markus Franz Xaver Johannes Oberhumer
|
||||
Copyright (C) 2001 Markus Franz Xaver Johannes Oberhumer
|
||||
Copyright (C) 2000 Markus Franz Xaver Johannes Oberhumer
|
||||
Copyright (C) 1999 Markus Franz Xaver Johannes Oberhumer
|
||||
Copyright (C) 1998 Markus Franz Xaver Johannes Oberhumer
|
||||
Copyright (C) 1997 Markus Franz Xaver Johannes Oberhumer
|
||||
Copyright (C) 1996 Markus Franz Xaver Johannes Oberhumer
|
||||
All Rights Reserved.
|
||||
|
||||
The LZO library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License as
|
||||
published by the Free Software Foundation; either version 2 of
|
||||
the License, or (at your option) any later version.
|
||||
|
||||
The LZO library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with the LZO library; see the file COPYING.
|
||||
If not, write to the Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
Markus F.X.J. Oberhumer
|
||||
<markus@oberhumer.com>
|
||||
http://www.oberhumer.com/opensource/lzo/
|
||||
*/
|
||||
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
|
||||
/*************************************************************************
|
||||
// This program shows the basic usage of the LZO library.
|
||||
// We will compress a block of data and decompress again.
|
||||
//
|
||||
// For more information, documentation, example programs and other support
|
||||
// files (like Makefiles and build scripts) please download the full LZO
|
||||
// package from
|
||||
// http://www.oberhumer.com/opensource/lzo/
|
||||
**************************************************************************/
|
||||
|
||||
/* First let's include "minizo.h". */
|
||||
|
||||
#include "minilzo.h"
|
||||
|
||||
|
||||
/* We want to compress the data block at `in' with length `IN_LEN' to
|
||||
* the block at `out'. Because the input block may be incompressible,
|
||||
* we must provide a little more output space in case that compression
|
||||
* is not possible.
|
||||
*/
|
||||
|
||||
#if defined(__LZO_STRICT_16BIT)
|
||||
#define IN_LEN (8*1024u)
|
||||
#elif defined(LZO_ARCH_I086) && !defined(LZO_HAVE_MM_HUGE_ARRAY)
|
||||
#define IN_LEN (60*1024u)
|
||||
#else
|
||||
#define IN_LEN (128*1024ul)
|
||||
#endif
|
||||
#define OUT_LEN (IN_LEN + IN_LEN / 16 + 64 + 3)
|
||||
|
||||
static unsigned char __LZO_MMODEL in [ IN_LEN ];
|
||||
static unsigned char __LZO_MMODEL out [ OUT_LEN ];
|
||||
|
||||
|
||||
/* Work-memory needed for compression. Allocate memory in units
|
||||
* of `lzo_align_t' (instead of `char') to make sure it is properly aligned.
|
||||
*/
|
||||
|
||||
#define HEAP_ALLOC(var,size) \
|
||||
lzo_align_t __LZO_MMODEL var [ ((size) + (sizeof(lzo_align_t) - 1)) / sizeof(lzo_align_t) ]
|
||||
|
||||
static HEAP_ALLOC(wrkmem,LZO1X_1_MEM_COMPRESS);
|
||||
|
||||
|
||||
/*************************************************************************
|
||||
//
|
||||
**************************************************************************/
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
int r;
|
||||
lzo_uint in_len;
|
||||
lzo_uint out_len;
|
||||
lzo_uint new_len;
|
||||
|
||||
if (argc < 0 && argv == NULL) /* avoid warning about unused args */
|
||||
return 0;
|
||||
|
||||
printf("\nLZO real-time data compression library (v%s, %s).\n",
|
||||
lzo_version_string(), lzo_version_date());
|
||||
printf("Copyright (C) 1996-2008 Markus Franz Xaver Johannes Oberhumer\nAll Rights Reserved.\n\n");
|
||||
|
||||
|
||||
/*
|
||||
* Step 1: initialize the LZO library
|
||||
*/
|
||||
if (lzo_init() != LZO_E_OK)
|
||||
{
|
||||
printf("internal error - lzo_init() failed !!!\n");
|
||||
printf("(this usually indicates a compiler bug - try recompiling\nwithout optimizations, and enable `-DLZO_DEBUG' for diagnostics)\n");
|
||||
return 3;
|
||||
}
|
||||
|
||||
/*
|
||||
* Step 2: prepare the input block that will get compressed.
|
||||
* We just fill it with zeros in this example program,
|
||||
* but you would use your real-world data here.
|
||||
*/
|
||||
in_len = IN_LEN;
|
||||
lzo_memset(in,0,in_len);
|
||||
|
||||
/*
|
||||
* Step 3: compress from `in' to `out' with LZO1X-1
|
||||
*/
|
||||
r = lzo1x_1_compress(in,in_len,out,&out_len,wrkmem);
|
||||
if (r == LZO_E_OK)
|
||||
printf("compressed %lu bytes into %lu bytes\n",
|
||||
(unsigned long) in_len, (unsigned long) out_len);
|
||||
else
|
||||
{
|
||||
/* this should NEVER happen */
|
||||
printf("internal error - compression failed: %d\n", r);
|
||||
return 2;
|
||||
}
|
||||
/* check for an incompressible block */
|
||||
if (out_len >= in_len)
|
||||
{
|
||||
printf("This block contains incompressible data.\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* Step 4: decompress again, now going from `out' to `in'
|
||||
*/
|
||||
new_len = in_len;
|
||||
r = lzo1x_decompress(out,out_len,in,&new_len,NULL);
|
||||
if (r == LZO_E_OK && new_len == in_len)
|
||||
printf("decompressed %lu bytes back into %lu bytes\n",
|
||||
(unsigned long) out_len, (unsigned long) in_len);
|
||||
else
|
||||
{
|
||||
/* this should NEVER happen */
|
||||
printf("internal error - decompression failed: %d\n", r);
|
||||
return 1;
|
||||
}
|
||||
|
||||
printf("\nminiLZO simple compression test passed.\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
vi:ts=4:et
|
||||
*/
|
||||
|
2
src/3rdparty/squirrel/squirrel/sqobject.cpp
vendored
2
src/3rdparty/squirrel/squirrel/sqobject.cpp
vendored
@@ -201,7 +201,7 @@ const SQChar* SQFunctionProto::GetLocal(SQVM *vm,SQUnsignedInteger stackbase,SQU
|
||||
SQUnsignedInteger nvars=_nlocalvarinfos;
|
||||
const SQChar *res=NULL;
|
||||
if(nvars>=nseq){
|
||||
for(SQUnsignedInteger i=0;i<nvars;i++){
|
||||
for(SQUnsignedInteger i=0;i<nvars;i++){
|
||||
if(_localvarinfos[i]._start_op<=nop && _localvarinfos[i]._end_op>=nop)
|
||||
{
|
||||
if(nseq==0){
|
||||
|
2
src/3rdparty/squirrel/squirrel/sqvm.cpp
vendored
2
src/3rdparty/squirrel/squirrel/sqvm.cpp
vendored
@@ -436,7 +436,7 @@ bool SQVM::LOCAL_INC(SQInteger op,SQObjectPtr &target, SQObjectPtr &a, SQObjectP
|
||||
|
||||
bool SQVM::PLOCAL_INC(SQInteger op,SQObjectPtr &target, SQObjectPtr &a, SQObjectPtr &incr)
|
||||
{
|
||||
SQObjectPtr trg;
|
||||
SQObjectPtr trg;
|
||||
_RET_ON_FAIL(ARITH_OP( op , trg, a, incr));
|
||||
target = a;
|
||||
a = trg;
|
||||
|
@@ -20,6 +20,8 @@
|
||||
typedef std::map<const char *, class AIInfo *, StringCompare> AIInfoList;
|
||||
|
||||
|
||||
void CcAI(bool success, TileIndex tile, uint32 p1, uint32 p2);
|
||||
|
||||
class AI {
|
||||
public:
|
||||
/**
|
||||
@@ -43,9 +45,8 @@ public:
|
||||
/**
|
||||
* Start a new AI company.
|
||||
* @param company At which slot the AI company should start.
|
||||
* @param rerandomise_ai Whether to rerandomise the configured AI.
|
||||
*/
|
||||
static void StartNew(CompanyID company, bool rerandomise_ai = true);
|
||||
static void StartNew(CompanyID company);
|
||||
|
||||
/**
|
||||
* Called every game-tick to let AIs do something.
|
||||
|
@@ -16,13 +16,12 @@
|
||||
#include "ai.hpp"
|
||||
#include "ai_config.hpp"
|
||||
|
||||
void AIConfig::ChangeAI(const char *name, int version, bool is_random_ai)
|
||||
void AIConfig::ChangeAI(const char *name, int version)
|
||||
{
|
||||
free((void *)this->name);
|
||||
this->name = (name == NULL) ? NULL : strdup(name);
|
||||
this->info = (name == NULL) ? NULL : AI::FindInfo(this->name, version);
|
||||
this->version = (info == NULL) ? -1 : info->GetVersion();
|
||||
this->is_random_ai = is_random_ai;
|
||||
if (this->config_list != NULL) delete this->config_list;
|
||||
this->config_list = (info == NULL) ? NULL : new AIConfigItemList();
|
||||
if (this->config_list != NULL) this->config_list->push_back(_start_date_config);
|
||||
@@ -57,7 +56,6 @@ AIConfig::AIConfig(const AIConfig *config)
|
||||
this->info = config->info;
|
||||
this->version = config->version;
|
||||
this->config_list = NULL;
|
||||
this->is_random_ai = config->is_random_ai;
|
||||
|
||||
for (SettingValueList::const_iterator it = config->settings.begin(); it != config->settings.end(); it++) {
|
||||
this->settings[strdup((*it).first)] = (*it).second;
|
||||
@@ -72,7 +70,7 @@ AIConfig::~AIConfig()
|
||||
if (this->config_list != NULL) delete this->config_list;
|
||||
}
|
||||
|
||||
AIInfo *AIConfig::GetInfo() const
|
||||
AIInfo *AIConfig::GetInfo()
|
||||
{
|
||||
return this->info;
|
||||
}
|
||||
@@ -105,9 +103,9 @@ AIConfig *AIConfig::GetConfig(CompanyID company, bool forceNewgameSetting)
|
||||
return *config;
|
||||
}
|
||||
|
||||
int AIConfig::GetSetting(const char *name) const
|
||||
int AIConfig::GetSetting(const char *name)
|
||||
{
|
||||
SettingValueList::const_iterator it = this->settings.find(name);
|
||||
SettingValueList::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 (this->info == NULL) {
|
||||
@@ -164,22 +162,17 @@ void AIConfig::AddRandomDeviation()
|
||||
}
|
||||
}
|
||||
|
||||
bool AIConfig::HasAI() const
|
||||
bool AIConfig::HasAI()
|
||||
{
|
||||
return this->info != NULL;
|
||||
}
|
||||
|
||||
bool AIConfig::IsRandomAI() const
|
||||
{
|
||||
return this->is_random_ai;
|
||||
}
|
||||
|
||||
const char *AIConfig::GetName() const
|
||||
const char *AIConfig::GetName()
|
||||
{
|
||||
return this->name;
|
||||
}
|
||||
|
||||
int AIConfig::GetVersion() const
|
||||
int AIConfig::GetVersion()
|
||||
{
|
||||
return this->version;
|
||||
}
|
||||
@@ -210,10 +203,10 @@ void AIConfig::StringToSettings(const char *value)
|
||||
free(value_copy);
|
||||
}
|
||||
|
||||
void AIConfig::SettingsToString(char *string, size_t size) const
|
||||
void AIConfig::SettingsToString(char *string, size_t size)
|
||||
{
|
||||
string[0] = '\0';
|
||||
for (SettingValueList::const_iterator it = this->settings.begin(); it != this->settings.end(); it++) {
|
||||
for (SettingValueList::iterator it = this->settings.begin(); it != this->settings.end(); it++) {
|
||||
char no[10];
|
||||
snprintf(no, sizeof(no), "%d", (*it).second);
|
||||
|
||||
|
@@ -15,7 +15,6 @@
|
||||
#include <map>
|
||||
#include "ai_info.hpp"
|
||||
#include "../core/string_compare_type.hpp"
|
||||
#include "../company_type.h"
|
||||
|
||||
class AIConfig {
|
||||
private:
|
||||
@@ -26,8 +25,7 @@ public:
|
||||
name(NULL),
|
||||
version(-1),
|
||||
info(NULL),
|
||||
config_list(NULL),
|
||||
is_random_ai(false)
|
||||
config_list(NULL)
|
||||
{}
|
||||
AIConfig(const AIConfig *config);
|
||||
~AIConfig();
|
||||
@@ -36,9 +34,8 @@ public:
|
||||
* Set another AI to be loaded in this slot.
|
||||
* @param name The name of the AI.
|
||||
* @param version The version of the AI to load, or -1 of latest.
|
||||
* @param is_random Is the AI chosen randomly?
|
||||
*/
|
||||
void ChangeAI(const char *name, int version = -1, bool is_random = false);
|
||||
void ChangeAI(const char *name, int version = -1);
|
||||
|
||||
/**
|
||||
* When ever the AI Scanner is reloaded, all infos become invalid. This
|
||||
@@ -51,7 +48,7 @@ public:
|
||||
/**
|
||||
* Get the AIInfo linked to this AIConfig.
|
||||
*/
|
||||
class AIInfo *GetInfo() const;
|
||||
class AIInfo *GetInfo();
|
||||
|
||||
/**
|
||||
* Get the config list for this AIConfig.
|
||||
@@ -70,7 +67,7 @@ public:
|
||||
* @return The (default) value of the setting, or -1 if the setting was not
|
||||
* found.
|
||||
*/
|
||||
int GetSetting(const char *name) const;
|
||||
int GetSetting(const char *name);
|
||||
|
||||
/**
|
||||
* Set the value of a setting for this config.
|
||||
@@ -90,22 +87,17 @@ public:
|
||||
/**
|
||||
* Is this config attached to an AI?
|
||||
*/
|
||||
bool HasAI() const;
|
||||
|
||||
/**
|
||||
* Is the current AI a randomly chosen AI?
|
||||
*/
|
||||
bool IsRandomAI() const;
|
||||
bool HasAI();
|
||||
|
||||
/**
|
||||
* Get the name of the AI.
|
||||
*/
|
||||
const char *GetName() const;
|
||||
const char *GetName();
|
||||
|
||||
/**
|
||||
* Get the version of the AI.
|
||||
*/
|
||||
int GetVersion() const;
|
||||
int GetVersion();
|
||||
|
||||
/**
|
||||
* Convert a string which is stored in the config file or savegames to
|
||||
@@ -117,7 +109,7 @@ public:
|
||||
* Convert the custom settings to a string that can be stored in the config
|
||||
* file or savegames.
|
||||
*/
|
||||
void SettingsToString(char *string, size_t size) const;
|
||||
void SettingsToString(char *string, size_t size);
|
||||
|
||||
private:
|
||||
const char *name;
|
||||
@@ -125,7 +117,6 @@ private:
|
||||
class AIInfo *info;
|
||||
SettingValueList settings;
|
||||
AIConfigItemList *config_list;
|
||||
bool is_random_ai;
|
||||
};
|
||||
|
||||
#endif /* AI_CONFIG_HPP */
|
||||
|
@@ -17,6 +17,7 @@
|
||||
#include "../network/network.h"
|
||||
#include "../window_func.h"
|
||||
#include "../command_func.h"
|
||||
#include "ai.hpp"
|
||||
#include "ai_scanner.hpp"
|
||||
#include "ai_instance.hpp"
|
||||
#include "ai_config.hpp"
|
||||
@@ -31,20 +32,19 @@
|
||||
return !_networking || (_network_server && _settings_game.ai.ai_in_multiplayer);
|
||||
}
|
||||
|
||||
/* static */ void AI::StartNew(CompanyID company, bool rerandomise_ai)
|
||||
/* static */ void AI::StartNew(CompanyID company)
|
||||
{
|
||||
assert(Company::IsValidID(company));
|
||||
|
||||
/* Clients shouldn't start AIs */
|
||||
if (_networking && !_network_server) return;
|
||||
|
||||
AIConfig *config = AIConfig::GetConfig(company);
|
||||
AIInfo *info = config->GetInfo();
|
||||
if (info == NULL || (rerandomise_ai && config->IsRandomAI())) {
|
||||
AIInfo *info = AIConfig::GetConfig(company)->GetInfo();
|
||||
if (info == NULL) {
|
||||
info = AI::ai_scanner->SelectRandomAI();
|
||||
assert(info != NULL);
|
||||
/* Load default data and store the name in the settings */
|
||||
config->ChangeAI(info->GetName(), -1, true);
|
||||
AIConfig::GetConfig(company)->ChangeAI(info->GetName());
|
||||
}
|
||||
|
||||
_current_company = company;
|
||||
@@ -217,15 +217,14 @@
|
||||
event->Release();
|
||||
}
|
||||
|
||||
void CcAI(const CommandCost &result, TileIndex tile, uint32 p1, uint32 p2)
|
||||
void CcAI(bool success, TileIndex tile, uint32 p1, uint32 p2)
|
||||
{
|
||||
AIObject::SetLastCommandRes(result.Succeeded());
|
||||
AIObject::SetLastCommandRes(success);
|
||||
|
||||
if (result.Failed()) {
|
||||
AIObject::SetLastError(AIError::StringToError(result.GetErrorMessage()));
|
||||
if (!success) {
|
||||
AIObject::SetLastError(AIError::StringToError(_error_message));
|
||||
} else {
|
||||
AIObject::IncreaseDoCommandCosts(result.GetCost());
|
||||
AIObject::SetLastCost(result.GetCost());
|
||||
AIObject::IncreaseDoCommandCosts(AIObject::GetLastCost());
|
||||
}
|
||||
|
||||
Company::Get(_current_company)->ai_instance->Continue();
|
||||
|
@@ -815,23 +815,7 @@ struct AIDebugWindow : public Window {
|
||||
}
|
||||
}
|
||||
this->last_vscroll_pos = this->vscroll.GetPosition();
|
||||
}
|
||||
|
||||
virtual void SetStringParameters(int widget) const
|
||||
{
|
||||
switch (widget) {
|
||||
case AID_WIDGET_NAME_TEXT:
|
||||
if (ai_debug_company == INVALID_COMPANY || !Company::IsValidAiID(ai_debug_company)) {
|
||||
SetDParam(0, STR_EMPTY);
|
||||
} else {
|
||||
const AIInfo *info = Company::Get(ai_debug_company)->ai_info;
|
||||
assert(info != NULL);
|
||||
SetDParam(0, STR_AI_DEBUG_NAME_AND_VERSION);
|
||||
SetDParamStr(1, info->GetName());
|
||||
SetDParam(2, info->GetVersion());
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
virtual void DrawWidget(const Rect &r, int widget) const
|
||||
@@ -839,6 +823,15 @@ struct AIDebugWindow : public Window {
|
||||
if (ai_debug_company == INVALID_COMPANY) return;
|
||||
|
||||
switch (widget) {
|
||||
case AID_WIDGET_NAME_TEXT: {
|
||||
/* Draw the AI name */
|
||||
AIInfo *info = Company::Get(ai_debug_company)->ai_info;
|
||||
assert(info != NULL);
|
||||
char name[1024];
|
||||
snprintf(name, sizeof(name), "%s (v%d)", info->GetName(), info->GetVersion());
|
||||
DrawString(r.left + WD_FRAMERECT_LEFT, r.right - WD_FRAMERECT_RIGHT, r.top + WD_FRAMERECT_TOP, name, TC_BLACK, SA_CENTER);
|
||||
break;
|
||||
}
|
||||
case AID_WIDGET_LOG_PANEL: {
|
||||
CompanyID old_company = _current_company;
|
||||
_current_company = ai_debug_company;
|
||||
@@ -972,7 +965,8 @@ static const NWidgetPart _nested_ai_debug_widgets[] = {
|
||||
NWidget(NWID_SPACER), SetMinimalSize(0, 1), SetResize(1, 0),
|
||||
EndContainer(),
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_TEXTBTN, COLOUR_GREY, AID_WIDGET_NAME_TEXT), SetMinimalSize(150, 20), SetResize(1, 0), SetDataTip(STR_JUST_STRING, STR_AI_DEBUG_NAME_TOOLTIP),
|
||||
NWidget(WWT_PANEL, COLOUR_GREY, AID_WIDGET_NAME_TEXT), SetMinimalSize(150, 20), SetResize(1, 0), SetDataTip(0x0, STR_AI_DEBUG_NAME_TOOLTIP),
|
||||
EndContainer(),
|
||||
NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, AID_WIDGET_RELOAD_TOGGLE), SetMinimalSize(149, 20), SetDataTip(STR_AI_DEBUG_RELOAD, STR_AI_DEBUG_RELOAD_TOOLTIP),
|
||||
EndContainer(),
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
|
@@ -12,8 +12,6 @@
|
||||
#ifndef AI_GUI_HPP
|
||||
#define AI_GUI_HPP
|
||||
|
||||
#include "../company_type.h"
|
||||
|
||||
void ShowAIDebugWindow(CompanyID show_company = INVALID_COMPANY);
|
||||
void ShowAIConfigWindow();
|
||||
|
||||
|
@@ -14,6 +14,7 @@
|
||||
#include <squirrel.h>
|
||||
#include "../script/squirrel.hpp"
|
||||
#include "../script/squirrel_helper.hpp"
|
||||
#include "ai.hpp"
|
||||
#include "ai_info.hpp"
|
||||
#include "ai_scanner.hpp"
|
||||
#include "../settings_type.h"
|
||||
@@ -173,12 +174,12 @@ SQInteger AIInfo::AddSetting(HSQUIRRELVM vm)
|
||||
while (SQ_SUCCEEDED(sq_next(vm, -2))) {
|
||||
const SQChar *sqkey;
|
||||
if (SQ_FAILED(sq_getstring(vm, -2, &sqkey))) return SQ_ERROR;
|
||||
const char *key = SQ2OTTD(sqkey);
|
||||
const char *key = FS2OTTD(sqkey);
|
||||
|
||||
if (strcmp(key, "name") == 0) {
|
||||
const SQChar *sqvalue;
|
||||
if (SQ_FAILED(sq_getstring(vm, -1, &sqvalue))) return SQ_ERROR;
|
||||
char *name = strdup(SQ2OTTD(sqvalue));
|
||||
char *name = strdup(FS2OTTD(sqvalue));
|
||||
char *s;
|
||||
/* Don't allow '=' and ',' in configure setting names, as we need those
|
||||
* 2 chars to nicely store the settings as a string. */
|
||||
@@ -189,7 +190,7 @@ SQInteger AIInfo::AddSetting(HSQUIRRELVM vm)
|
||||
} else if (strcmp(key, "description") == 0) {
|
||||
const SQChar *sqdescription;
|
||||
if (SQ_FAILED(sq_getstring(vm, -1, &sqdescription))) return SQ_ERROR;
|
||||
config.description = strdup(SQ2OTTD(sqdescription));
|
||||
config.description = strdup(FS2OTTD(sqdescription));
|
||||
items |= 0x002;
|
||||
} else if (strcmp(key, "min_value") == 0) {
|
||||
SQInteger res;
|
||||
@@ -274,7 +275,7 @@ SQInteger AIInfo::AddLabels(HSQUIRRELVM vm)
|
||||
{
|
||||
const SQChar *sq_setting_name;
|
||||
if (SQ_FAILED(sq_getstring(vm, -2, &sq_setting_name))) return SQ_ERROR;
|
||||
const char *setting_name = SQ2OTTD(sq_setting_name);
|
||||
const char *setting_name = FS2OTTD(sq_setting_name);
|
||||
|
||||
AIConfigItem *config = NULL;
|
||||
for (AIConfigItemList::iterator it = this->config_list.begin(); it != this->config_list.end(); it++) {
|
||||
@@ -300,9 +301,9 @@ SQInteger AIInfo::AddLabels(HSQUIRRELVM vm)
|
||||
if (SQ_FAILED(sq_getstring(vm, -1, &sq_label))) return SQ_ERROR;
|
||||
/* Because squirrel doesn't support identifiers starting with a digit,
|
||||
* we skip the first character. */
|
||||
const char *key_string = SQ2OTTD(sq_key);
|
||||
const char *key_string = FS2OTTD(sq_key);
|
||||
int key = atoi(key_string + 1);
|
||||
const char *label = SQ2OTTD(sq_label);
|
||||
const char *label = FS2OTTD(sq_label);
|
||||
|
||||
if (config->labels->Find(key) == config->labels->End()) config->labels->Insert(key, strdup(label));
|
||||
|
||||
|
@@ -94,7 +94,7 @@ void AI_CreateAIDummy(HSQUIRRELVM vm)
|
||||
/* 3) We translate the error message in the character format that Squirrel wants.
|
||||
* We can use the fact that the wchar string printing also uses %s to print
|
||||
* old style char strings, which is what was generated during the script generation. */
|
||||
const SQChar *sq_dummy_script = OTTD2SQ(dummy_script);
|
||||
const SQChar *sq_dummy_script = OTTD2FS(dummy_script);
|
||||
|
||||
/* And finally we load and run the script */
|
||||
sq_pushroottable(vm);
|
||||
|
@@ -11,8 +11,10 @@
|
||||
|
||||
#include "../stdafx.h"
|
||||
#include "../debug.h"
|
||||
#include "../vehicle_base.h"
|
||||
#include "../saveload/saveload.h"
|
||||
#include "../gui.h"
|
||||
#include "table/strings.h"
|
||||
|
||||
#include <squirrel.h>
|
||||
#include "../script/squirrel.hpp"
|
||||
@@ -77,7 +79,6 @@
|
||||
#include "api/ai_waypoint.hpp.sq"
|
||||
#include "api/ai_waypointlist.hpp.sq"
|
||||
|
||||
#include "../company_base.h"
|
||||
#include "../fileio_func.h"
|
||||
|
||||
AIStorage::~AIStorage()
|
||||
@@ -90,7 +91,7 @@ AIStorage::~AIStorage()
|
||||
static void PrintFunc(bool error_msg, const SQChar *message)
|
||||
{
|
||||
/* Convert to OpenTTD internal capable string */
|
||||
AIController::Print(error_msg, SQ2OTTD(message));
|
||||
AIController::Print(error_msg, FS2OTTD(message));
|
||||
}
|
||||
|
||||
AIInstance::AIInstance(AIInfo *info) :
|
||||
@@ -390,7 +391,7 @@ void AIInstance::GameLoop()
|
||||
}
|
||||
}
|
||||
|
||||
void AIInstance::CollectGarbage() const
|
||||
void AIInstance::CollectGarbage()
|
||||
{
|
||||
if (this->is_started && !this->IsDead()) this->engine->CollectGarbage();
|
||||
}
|
||||
@@ -493,9 +494,9 @@ enum {
|
||||
}
|
||||
const SQChar *res;
|
||||
sq_getstring(vm, index, &res);
|
||||
/* @bug if a string longer than 512 characters is given to SQ2OTTD, the
|
||||
/* @bug if a string longer than 512 characters is given to FS2OTTD, the
|
||||
* internal buffer overflows. */
|
||||
const char *buf = SQ2OTTD(res);
|
||||
const char *buf = FS2OTTD(res);
|
||||
size_t len = strlen(buf) + 1;
|
||||
if (len >= 255) {
|
||||
AILog::Error("Maximum string length is 254 chars. No data saved.");
|
||||
@@ -673,7 +674,7 @@ void AIInstance::Save()
|
||||
SlObject(NULL, _ai_byte);
|
||||
static char buf[256];
|
||||
SlArray(buf, _ai_sl_byte, SLE_CHAR);
|
||||
if (vm != NULL) sq_pushstring(vm, OTTD2SQ(buf), -1);
|
||||
if (vm != NULL) sq_pushstring(vm, OTTD2FS(buf), -1);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -760,7 +761,7 @@ bool AIInstance::CallLoad()
|
||||
/* Go to the instance-root */
|
||||
sq_pushobject(vm, *this->instance);
|
||||
/* Find the function-name inside the script */
|
||||
sq_pushstring(vm, OTTD2SQ("Load"), -1);
|
||||
sq_pushstring(vm, OTTD2FS("Load"), -1);
|
||||
/* Change the "Load" string in a function pointer */
|
||||
sq_get(vm, -2);
|
||||
/* Push the main instance as "this" object */
|
||||
|
@@ -12,8 +12,6 @@
|
||||
#ifndef AI_INSTANCE_HPP
|
||||
#define AI_INSTANCE_HPP
|
||||
|
||||
#include <squirrel.h>
|
||||
|
||||
/**
|
||||
* The callback function when an AI suspends.
|
||||
*/
|
||||
@@ -72,7 +70,7 @@ public:
|
||||
/**
|
||||
* Let the VM collect any garbage.
|
||||
*/
|
||||
void CollectGarbage() const;
|
||||
void CollectGarbage();
|
||||
|
||||
/**
|
||||
* Get the storage of this AI.
|
||||
@@ -107,7 +105,7 @@ public:
|
||||
/**
|
||||
* Return the "this AI died" value
|
||||
*/
|
||||
inline bool IsDead() const { return this->is_dead; }
|
||||
inline bool IsDead() { return this->is_dead; }
|
||||
|
||||
/**
|
||||
* Call the AI Save function and save all data in the savegame.
|
||||
|
@@ -19,6 +19,7 @@
|
||||
#include "../script/squirrel.hpp"
|
||||
#include "../script/squirrel_helper.hpp"
|
||||
#include "../script/squirrel_class.hpp"
|
||||
#include "ai.hpp"
|
||||
#include "ai_info.hpp"
|
||||
#include "ai_scanner.hpp"
|
||||
#include "api/ai_controller.hpp"
|
||||
@@ -99,7 +100,7 @@ bool AIScanner::ImportLibrary(const char *library, const char *class_name, int v
|
||||
} else {
|
||||
snprintf(error, sizeof(error), "couldn't find library '%s' version %d. The latest version available is %d", library, version, (*iter).second->GetVersion());
|
||||
}
|
||||
sq_throwerror(vm, OTTD2SQ(error));
|
||||
sq_throwerror(vm, OTTD2FS(error));
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -116,13 +117,13 @@ bool AIScanner::ImportLibrary(const char *library, const char *class_name, int v
|
||||
|
||||
/* Load the library in a 'fake' namespace, so we can link it to the name the user requested */
|
||||
sq_pushroottable(vm);
|
||||
sq_pushstring(vm, OTTD2SQ(fake_class), -1);
|
||||
sq_pushstring(vm, OTTD2FS(fake_class), -1);
|
||||
sq_newclass(vm, SQFalse);
|
||||
/* Load the library */
|
||||
if (!Squirrel::LoadScript(vm, (*iter).second->GetMainScript(), false)) {
|
||||
char error[1024];
|
||||
snprintf(error, sizeof(error), "there was a compile error when importing '%s' version %d", library, version);
|
||||
sq_throwerror(vm, OTTD2SQ(error));
|
||||
sq_throwerror(vm, OTTD2FS(error));
|
||||
return false;
|
||||
}
|
||||
/* Create the fake class */
|
||||
@@ -134,16 +135,16 @@ bool AIScanner::ImportLibrary(const char *library, const char *class_name, int v
|
||||
|
||||
/* Find the real class inside the fake class (like 'sets.Vector') */
|
||||
sq_pushroottable(vm);
|
||||
sq_pushstring(vm, OTTD2SQ(fake_class), -1);
|
||||
sq_pushstring(vm, OTTD2FS(fake_class), -1);
|
||||
if (SQ_FAILED(sq_get(vm, -2))) {
|
||||
sq_throwerror(vm, _SC("internal error assigning library class"));
|
||||
return false;
|
||||
}
|
||||
sq_pushstring(vm, OTTD2SQ((*iter).second->GetInstanceName()), -1);
|
||||
sq_pushstring(vm, OTTD2FS((*iter).second->GetInstanceName()), -1);
|
||||
if (SQ_FAILED(sq_get(vm, -2))) {
|
||||
char error[1024];
|
||||
snprintf(error, sizeof(error), "unable to find class '%s' in the library '%s' version %d", (*iter).second->GetInstanceName(), library, version);
|
||||
sq_throwerror(vm, OTTD2SQ(error));
|
||||
sq_throwerror(vm, OTTD2FS(error));
|
||||
return false;
|
||||
}
|
||||
HSQOBJECT obj;
|
||||
@@ -157,7 +158,7 @@ bool AIScanner::ImportLibrary(const char *library, const char *class_name, int v
|
||||
|
||||
/* Now link the name the user wanted to our 'fake' class */
|
||||
sq_pushobject(vm, parent);
|
||||
sq_pushstring(vm, OTTD2SQ(class_name), -1);
|
||||
sq_pushstring(vm, OTTD2FS(class_name), -1);
|
||||
sq_pushobject(vm, obj);
|
||||
sq_newclass(vm, SQTrue);
|
||||
sq_newslot(vm, -3, SQFalse);
|
||||
@@ -244,10 +245,10 @@ void AIScanner::RegisterAI(AIInfo *info)
|
||||
}
|
||||
}
|
||||
|
||||
AIInfo *AIScanner::SelectRandomAI() const
|
||||
AIInfo *AIScanner::SelectRandomAI()
|
||||
{
|
||||
uint num_random_ais = 0;
|
||||
for (AIInfoList::const_iterator it = this->info_single_list.begin(); it != this->info_single_list.end(); it++) {
|
||||
for (AIInfoList::iterator it = this->info_single_list.begin(); it != this->info_single_list.end(); it++) {
|
||||
if (it->second->UseAsRandomAI()) num_random_ais++;
|
||||
}
|
||||
|
||||
@@ -265,7 +266,7 @@ AIInfo *AIScanner::SelectRandomAI() const
|
||||
}
|
||||
|
||||
/* Find the Nth item from the array */
|
||||
AIInfoList::const_iterator it = this->info_single_list.begin();
|
||||
AIInfoList::iterator it = this->info_single_list.begin();
|
||||
while (!it->second->UseAsRandomAI()) it++;
|
||||
for (; pos > 0; pos--) {
|
||||
it++;
|
||||
@@ -322,10 +323,10 @@ AIInfo *AIScanner::FindInfo(const char *nameParam, int versionParam)
|
||||
return info;
|
||||
}
|
||||
|
||||
char *AIScanner::GetAIConsoleList(char *p, const char *last) const
|
||||
char *AIScanner::GetAIConsoleList(char *p, const char *last)
|
||||
{
|
||||
p += seprintf(p, last, "List of AIs:\n");
|
||||
AIInfoList::const_iterator it = this->info_list.begin();
|
||||
AIInfoList::iterator it = this->info_list.begin();
|
||||
for (; it != this->info_list.end(); it++) {
|
||||
AIInfo *i = (*it).second;
|
||||
p += seprintf(p, last, "%10s (v%d): %s\n", i->GetName(), i->GetVersion(), i->GetDescription());
|
||||
|
@@ -12,10 +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 AIScanner : public ScriptScanner {
|
||||
@@ -43,7 +41,7 @@ public:
|
||||
/**
|
||||
* Select a Random AI.
|
||||
*/
|
||||
class AIInfo *SelectRandomAI() const;
|
||||
class AIInfo *SelectRandomAI();
|
||||
|
||||
/**
|
||||
* Find an AI by name.
|
||||
@@ -53,7 +51,7 @@ 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);
|
||||
|
||||
/**
|
||||
* Get the list of all registered AIs.
|
||||
|
@@ -19,16 +19,14 @@
|
||||
#include "../signs_func.h"
|
||||
#include "../tunnelbridge.h"
|
||||
#include "../vehicle_func.h"
|
||||
#include "../road_type.h"
|
||||
#include "../group.h"
|
||||
|
||||
#include "table/strings.h"
|
||||
#include <vector>
|
||||
|
||||
/**
|
||||
* The callback function for Mode-classes.
|
||||
*/
|
||||
typedef bool (AIModeProc)();
|
||||
typedef bool (AIModeProc)(TileIndex tile, uint32 p1, uint32 p2, uint procc, CommandCost costs);
|
||||
|
||||
/**
|
||||
* The storage for each AI. It keeps track of important information.
|
||||
|
@@ -9,6 +9,7 @@
|
||||
|
||||
/** @file ai_abstractlist.cpp Implementation of AIAbstractList. */
|
||||
|
||||
#include <squirrel.h>
|
||||
#include "ai_abstractlist.hpp"
|
||||
#include "../../debug.h"
|
||||
#include "../../script/squirrel.hpp"
|
||||
|
@@ -17,7 +17,7 @@
|
||||
|
||||
/* static */ bool AIAirport::IsValidAirportType(AirportType type)
|
||||
{
|
||||
return IsAirportInformationAvailable(type) && ::AirportSpec::Get(type)->IsAvailable();
|
||||
return IsAirportInformationAvailable(type) && ::GetAirport(type)->IsAvailable();
|
||||
}
|
||||
|
||||
/* static */ bool AIAirport::IsAirportInformationAvailable(AirportType type)
|
||||
@@ -29,8 +29,8 @@
|
||||
{
|
||||
if (!IsValidAirportType(type)) return -1;
|
||||
|
||||
const AirportSpec *as = ::AirportSpec::Get(type);
|
||||
return _price[PR_BUILD_STATION_AIRPORT] * as->size_x * as->size_y;
|
||||
const AirportFTAClass *afc = ::GetAirport(type);
|
||||
return _price[PR_BUILD_STATION_AIRPORT] * afc->size_x * afc->size_y;
|
||||
}
|
||||
|
||||
/* static */ bool AIAirport::IsHangarTile(TileIndex tile)
|
||||
@@ -51,21 +51,21 @@
|
||||
{
|
||||
if (!IsAirportInformationAvailable(type)) return -1;
|
||||
|
||||
return ::AirportSpec::Get(type)->size_x;
|
||||
return ::GetAirport(type)->size_x;
|
||||
}
|
||||
|
||||
/* static */ int32 AIAirport::GetAirportHeight(AirportType type)
|
||||
{
|
||||
if (!IsAirportInformationAvailable(type)) return -1;
|
||||
|
||||
return ::AirportSpec::Get(type)->size_y;
|
||||
return ::GetAirport(type)->size_y;
|
||||
}
|
||||
|
||||
/* static */ int32 AIAirport::GetAirportCoverageRadius(AirportType type)
|
||||
{
|
||||
if (!IsAirportInformationAvailable(type)) return -1;
|
||||
|
||||
return _settings_game.station.modified_catchment ? ::AirportSpec::Get(type)->catchment : (uint)CA_UNMODIFIED;
|
||||
return _settings_game.station.modified_catchment ? ::GetAirport(type)->catchment : (uint)CA_UNMODIFIED;
|
||||
}
|
||||
|
||||
/* static */ bool AIAirport::BuildAirport(TileIndex tile, AirportType type, StationID station_id)
|
||||
@@ -96,7 +96,7 @@
|
||||
if (st->owner != _current_company) return -1;
|
||||
if ((st->facilities & FACIL_AIRPORT) == 0) return -1;
|
||||
|
||||
return st->GetAirportSpec()->nof_depots;
|
||||
return st->Airport()->nof_depots;
|
||||
}
|
||||
|
||||
/* static */ TileIndex AIAirport::GetHangarOfAirport(TileIndex tile)
|
||||
@@ -109,7 +109,7 @@
|
||||
if (st->owner != _current_company) return INVALID_TILE;
|
||||
if ((st->facilities & FACIL_AIRPORT) == 0) return INVALID_TILE;
|
||||
|
||||
return st->GetHangarTile(0);
|
||||
return ::ToTileIndexDiff(st->Airport()->airport_depots[0]) + st->airport_tile;
|
||||
}
|
||||
|
||||
/* static */ AIAirport::AirportType AIAirport::GetAirportType(TileIndex tile)
|
||||
@@ -126,16 +126,16 @@
|
||||
|
||||
/* static */ int AIAirport::GetNoiseLevelIncrease(TileIndex tile, AirportType type)
|
||||
{
|
||||
extern Town *AirportGetNearestTown(const AirportSpec *as, TileIndex airport_tile);
|
||||
extern uint8 GetAirportNoiseLevelForTown(const AirportSpec *as, TileIndex town_tile, TileIndex tile);
|
||||
extern Town *AirportGetNearestTown(const AirportFTAClass *afc, TileIndex airport_tile);
|
||||
extern uint8 GetAirportNoiseLevelForTown(const AirportFTAClass *afc, TileIndex town_tile, TileIndex tile);
|
||||
|
||||
if (!::IsValidTile(tile)) return -1;
|
||||
if (!IsValidAirportType(type)) return -1;
|
||||
|
||||
if (_settings_game.economy.station_noise_level) {
|
||||
const AirportSpec *as = ::AirportSpec::Get(type);
|
||||
const Town *t = AirportGetNearestTown(as, tile);
|
||||
return GetAirportNoiseLevelForTown(as, t->xy, tile);
|
||||
const AirportFTAClass *afc = ::GetAirport(type);
|
||||
const Town *t = AirportGetNearestTown(afc, tile);
|
||||
return GetAirportNoiseLevelForTown(afc, t->xy, tile);
|
||||
}
|
||||
|
||||
return 1;
|
||||
@@ -143,10 +143,10 @@
|
||||
|
||||
/* static */ TownID AIAirport::GetNearestTown(TileIndex tile, AirportType type)
|
||||
{
|
||||
extern Town *AirportGetNearestTown(const AirportSpec *as, TileIndex airport_tile);
|
||||
extern Town *AirportGetNearestTown(const AirportFTAClass *afc, TileIndex airport_tile);
|
||||
|
||||
if (!::IsValidTile(tile)) return INVALID_TOWN;
|
||||
if (!IsAirportInformationAvailable(type)) return INVALID_TOWN;
|
||||
|
||||
return AirportGetNearestTown(AirportSpec::Get(type), tile)->index;
|
||||
return AirportGetNearestTown(GetAirport(type), tile)->index;
|
||||
}
|
||||
|
@@ -13,7 +13,9 @@
|
||||
#include "../../string_func.h"
|
||||
#include "../../company_base.h"
|
||||
#include "../../rev.h"
|
||||
#include "table/strings.h"
|
||||
|
||||
#include "../ai.hpp"
|
||||
#include "ai_controller.hpp"
|
||||
#include "../ai_storage.hpp"
|
||||
#include "../ai_instance.hpp"
|
||||
|
@@ -29,9 +29,9 @@ AIDepotList::AIDepotList(AITile::TransportType transport_type)
|
||||
const Station *st;
|
||||
FOR_ALL_STATIONS(st) {
|
||||
if (st->owner == ::_current_company) {
|
||||
const AirportSpec *as = st->GetAirportSpec();
|
||||
for (uint i = 0; i < as->nof_depots; i++) {
|
||||
this->AddItem(st->GetHangarTile(i));
|
||||
const AirportFTAClass *afc = st->Airport();
|
||||
for (uint i = 0; i < afc->nof_depots; i++) {
|
||||
this->AddItem(st->airport_tile + ToTileIndexDiff(afc->airport_depots[i]));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -14,6 +14,7 @@
|
||||
#include "../../company_func.h"
|
||||
#include "../../company_base.h"
|
||||
#include "../../strings_func.h"
|
||||
#include "../../settings_type.h"
|
||||
#include "../../rail.h"
|
||||
#include "../../engine_base.h"
|
||||
#include "../../articulated_vehicles.h"
|
||||
|
@@ -10,11 +10,12 @@
|
||||
/** @file ai_execmode.cpp Implementation of AIExecMode. */
|
||||
|
||||
#include "ai_execmode.hpp"
|
||||
#include "../../command_type.h"
|
||||
#include "../../company_base.h"
|
||||
#include "../../company_func.h"
|
||||
#include "../ai_instance.hpp"
|
||||
|
||||
bool AIExecMode::ModeProc()
|
||||
bool AIExecMode::ModeProc(TileIndex tile, uint32 p1, uint32 p2, uint procc, CommandCost costs)
|
||||
{
|
||||
/* In execution mode we only return 'true', telling the DoCommand it
|
||||
* should continue with the real execution of the command. */
|
||||
|
@@ -33,7 +33,7 @@ protected:
|
||||
/**
|
||||
* The callback proc for Execute mode.
|
||||
*/
|
||||
static bool ModeProc();
|
||||
static bool ModeProc(TileIndex tile, uint32 p1, uint32 p2, uint procc, CommandCost costs);
|
||||
|
||||
public:
|
||||
/**
|
||||
|
@@ -16,6 +16,7 @@
|
||||
#include "../../group.h"
|
||||
#include "../../string_func.h"
|
||||
#include "../../strings_func.h"
|
||||
#include "../../command_func.h"
|
||||
#include "../../autoreplace_func.h"
|
||||
#include "../../settings_func.h"
|
||||
#include "table/strings.h"
|
||||
|
@@ -14,7 +14,6 @@
|
||||
#include "../../command_type.h"
|
||||
#include "../../strings_func.h"
|
||||
#include "../../industry.h"
|
||||
#include "../../core/random_func.hpp"
|
||||
|
||||
/* static */ bool AIIndustryType::IsValidIndustryType(IndustryType industry_type)
|
||||
{
|
||||
|
@@ -9,6 +9,7 @@
|
||||
|
||||
/** @file ai_list.cpp Implementation of AIList. */
|
||||
|
||||
#include <squirrel.h>
|
||||
#include "ai_list.hpp"
|
||||
|
||||
void AIList::AddItem(int32 item, int32 value)
|
||||
|
@@ -9,6 +9,7 @@
|
||||
|
||||
/** @file ai_map.cpp Implementation of AIMap. */
|
||||
|
||||
#include "../../stdafx.h"
|
||||
#include "ai_map.hpp"
|
||||
#include "../../tile_map.h"
|
||||
|
||||
|
@@ -14,6 +14,8 @@
|
||||
#include "../../script/squirrel.hpp"
|
||||
#include "../../company_base.h"
|
||||
|
||||
#include "table/strings.h"
|
||||
#include "../ai.hpp"
|
||||
#include "../ai_storage.hpp"
|
||||
#include "../ai_instance.hpp"
|
||||
#include "ai_error.hpp"
|
||||
@@ -203,39 +205,54 @@ bool AIObject::DoCommand(TileIndex tile, uint32 p1, uint32 p2, uint cmd, const c
|
||||
throw AI_FatalError("You are not allowed to execute any DoCommand (even indirect) in your constructor, Save(), Load(), and any valuator.");
|
||||
}
|
||||
|
||||
CommandCost res;
|
||||
|
||||
/* Set the default callback to return a true/false result of the DoCommand */
|
||||
if (callback == NULL) callback = &AIInstance::DoCommandReturn;
|
||||
|
||||
/* Are we only interested in the estimate costs? */
|
||||
bool estimate_only = GetDoCommandMode() != NULL && !GetDoCommandMode()();
|
||||
/* Make sure the last error is reset, so we don't give faulty warnings */
|
||||
SetLastError(AIError::ERR_NONE);
|
||||
|
||||
/* Try to perform the command. */
|
||||
CommandCost res = ::DoCommandPInternal(tile, p1, p2, cmd, _networking ? CcAI : NULL, text, false, estimate_only);
|
||||
|
||||
/* We failed; set the error and bail out */
|
||||
if (res.Failed()) {
|
||||
res.SetGlobalErrorMessage();
|
||||
/* First, do a test-run to see if we can do this */
|
||||
res = ::DoCommand(tile, p1, p2, CommandFlagsToDCFlags(GetCommandFlags(cmd)), cmd, text);
|
||||
/* The command failed, so return */
|
||||
if (::CmdFailed(res)) {
|
||||
SetLastError(AIError::StringToError(_error_message));
|
||||
return false;
|
||||
}
|
||||
|
||||
/* No error, then clear it. */
|
||||
SetLastError(AIError::ERR_NONE);
|
||||
|
||||
/* Estimates, update the cost for the estimate and be done */
|
||||
if (estimate_only) {
|
||||
/* Check what the callback wants us to do */
|
||||
if (GetDoCommandMode() != NULL && !GetDoCommandMode()(tile, p1, p2, cmd, res)) {
|
||||
IncreaseDoCommandCosts(res.GetCost());
|
||||
return true;
|
||||
}
|
||||
|
||||
/* Costs of this operation. */
|
||||
SetLastCost(res.GetCost());
|
||||
SetLastCommandRes(true);
|
||||
|
||||
#ifdef ENABLE_NETWORK
|
||||
/* Send the command */
|
||||
if (_networking) {
|
||||
/* Suspend the AI till the command is really executed. */
|
||||
/* NetworkSend_Command needs _local_company to be set correctly, so
|
||||
* adjust it, and put it back right after the function */
|
||||
CompanyID old_company = _local_company;
|
||||
_local_company = _current_company;
|
||||
::NetworkSend_Command(tile, p1, p2, cmd, CcAI, text);
|
||||
_local_company = old_company;
|
||||
SetLastCost(res.GetCost());
|
||||
|
||||
/* Suspend the AI till the command is really executed */
|
||||
throw AI_VMSuspend(-(int)GetDoCommandDelay(), callback);
|
||||
} else {
|
||||
#else
|
||||
{
|
||||
#endif
|
||||
/* For SinglePlayer we execute the command immediatly */
|
||||
if (!::DoCommandP(tile, p1, p2, cmd, NULL, text)) res = CMD_ERROR;
|
||||
SetLastCommandRes(!::CmdFailed(res));
|
||||
|
||||
if (::CmdFailed(res)) {
|
||||
SetLastError(AIError::StringToError(_error_message));
|
||||
return false;
|
||||
}
|
||||
SetLastCost(res.GetCost());
|
||||
IncreaseDoCommandCosts(res.GetCost());
|
||||
|
||||
/* Suspend the AI player for 1+ ticks, so it simulates multiplayer. This
|
||||
|
@@ -27,7 +27,7 @@ typedef void (AISuspendCallbackProc)(class AIInstance *instance);
|
||||
/**
|
||||
* The callback function for Mode-classes.
|
||||
*/
|
||||
typedef bool (AIModeProc)();
|
||||
typedef bool (AIModeProc)(TileIndex tile, uint32 p1, uint32 p2, uint cmd, CommandCost costs);
|
||||
|
||||
/**
|
||||
* Uper-parent object of all API classes. You should never use this class in
|
||||
@@ -36,7 +36,7 @@ typedef bool (AIModeProc)();
|
||||
* command processing, and command-validation checks.
|
||||
*/
|
||||
class AIObject : public SimpleCountedObject {
|
||||
friend void CcAI(const CommandCost &result, TileIndex tile, uint32 p1, uint32 p2);
|
||||
friend void CcAI(bool success, TileIndex tile, uint32 p1, uint32 p2);
|
||||
friend class AIInstance;
|
||||
protected:
|
||||
/**
|
||||
|
@@ -181,8 +181,9 @@ static const Order *ResolveOrder(VehicleID vehicle_id, AIOrder::OrderPosition or
|
||||
if (v->type != VEH_AIRCRAFT) return ::Depot::Get(order->GetDestination())->xy;
|
||||
/* Aircraft's hangars are referenced by StationID, not DepotID */
|
||||
const Station *st = ::Station::Get(order->GetDestination());
|
||||
if (st->GetAirportSpec()->nof_depots == 0) return INVALID_TILE;
|
||||
return st->GetHangarTile(0);
|
||||
const AirportFTAClass *airport = st->Airport();
|
||||
if (airport == NULL || airport->nof_depots == 0) return INVALID_TILE;
|
||||
return st->airport_tile + ::ToTileIndexDiff(st->Airport()->airport_depots[0]);
|
||||
}
|
||||
|
||||
case OT_GOTO_STATION: {
|
||||
@@ -199,8 +200,8 @@ static const Order *ResolveOrder(VehicleID vehicle_id, AIOrder::OrderPosition or
|
||||
} else if (st->truck_stops != NULL) {
|
||||
return st->truck_stops->xy;
|
||||
} else if (st->airport_tile != INVALID_TILE) {
|
||||
const AirportSpec *as = st->GetAirportSpec();
|
||||
TILE_LOOP(tile, as->size_x, as->size_y, st->airport_tile) {
|
||||
const AirportFTAClass *fta = st->Airport();
|
||||
TILE_LOOP(tile, fta->size_x, fta->size_y, st->airport_tile) {
|
||||
if (!::IsHangar(tile)) return tile;
|
||||
}
|
||||
}
|
||||
|
@@ -16,7 +16,6 @@
|
||||
#include "../../debug.h"
|
||||
#include "../../station_base.h"
|
||||
#include "../../company_func.h"
|
||||
#include "../../newgrf.h"
|
||||
#include "../../newgrf_generic.h"
|
||||
#include "../../newgrf_station.h"
|
||||
|
||||
|
@@ -9,6 +9,7 @@
|
||||
|
||||
/** @file ai_road.cpp Implementation of AIRoad. */
|
||||
|
||||
#include "../../stdafx.h"
|
||||
#include "ai_map.hpp"
|
||||
#include "ai_station.hpp"
|
||||
#include "ai_cargo.hpp"
|
||||
@@ -471,7 +472,7 @@ static bool NeighbourHasReachableRoad(::RoadTypes rts, TileIndex start_tile, Dia
|
||||
EnforcePrecondition(false, !one_way || AIObject::GetRoadType() == ::ROADTYPE_ROAD);
|
||||
EnforcePrecondition(false, IsRoadTypeAvailable(GetCurrentRoadType()));
|
||||
|
||||
return AIObject::DoCommand(start, end, (::TileY(start) != ::TileY(end) ? 4 : 0) | (((start < end) == !full) ? 1 : 2) | (AIObject::GetRoadType() << 3) | ((one_way ? 1 : 0) << 5), CMD_BUILD_LONG_ROAD);
|
||||
return AIObject::DoCommand(end, start, (::TileY(start) != ::TileY(end) ? 4 : 0) | (((start < end) == !full) ? 1 : 2) | (AIObject::GetRoadType() << 3) | ((one_way ? 1 : 0) << 5), CMD_BUILD_LONG_ROAD);
|
||||
}
|
||||
|
||||
/* static */ bool AIRoad::BuildRoad(TileIndex start, TileIndex end)
|
||||
|
@@ -9,6 +9,7 @@
|
||||
|
||||
/** @file ai_station.cpp Implementation of AIStation. */
|
||||
|
||||
#include "../../stdafx.h"
|
||||
#include "ai_station.hpp"
|
||||
#include "ai_cargo.hpp"
|
||||
#include "ai_map.hpp"
|
||||
|
@@ -10,11 +10,12 @@
|
||||
/** @file ai_testmode.cpp Implementation of AITestMode. */
|
||||
|
||||
#include "ai_testmode.hpp"
|
||||
#include "../../command_type.h"
|
||||
#include "../../company_base.h"
|
||||
#include "../../company_func.h"
|
||||
#include "../ai_instance.hpp"
|
||||
|
||||
bool AITestMode::ModeProc()
|
||||
bool AITestMode::ModeProc(TileIndex tile, uint32 p1, uint32 p2, uint procc, CommandCost costs)
|
||||
{
|
||||
/* In test mode we only return 'false', telling the DoCommand it
|
||||
* should stop after testing the command and return with that result. */
|
||||
|
@@ -35,7 +35,7 @@ protected:
|
||||
/**
|
||||
* The callback proc for Testing mode.
|
||||
*/
|
||||
static bool ModeProc();
|
||||
static bool ModeProc(TileIndex tile, uint32 p1, uint32 p2, uint procc, CommandCost costs);
|
||||
|
||||
public:
|
||||
/**
|
||||
|
@@ -14,6 +14,7 @@
|
||||
#include "ai_town.hpp"
|
||||
#include "../../station_func.h"
|
||||
#include "../../company_func.h"
|
||||
#include "../../road_map.h"
|
||||
#include "../../water_map.h"
|
||||
#include "../../clear_map.h"
|
||||
#include "../../tree_map.h"
|
||||
|
@@ -22,7 +22,6 @@
|
||||
#include "../../roadveh.h"
|
||||
#include "../../train.h"
|
||||
#include "../../vehicle_func.h"
|
||||
#include "../../engine_base.h"
|
||||
#include "table/strings.h"
|
||||
|
||||
/* static */ bool AIVehicle::IsValidVehicle(VehicleID vehicle_id)
|
||||
@@ -121,7 +120,7 @@
|
||||
if (!AICargo::IsValidCargo(cargo)) return -1;
|
||||
|
||||
CommandCost res = ::DoCommand(0, vehicle_id, cargo, DC_QUERY_COST, GetCmdRefitVeh(::Vehicle::Get(vehicle_id)));
|
||||
return res.Succeeded() ? _returned_refit_capacity : -1;
|
||||
return CmdSucceeded(res) ? _returned_refit_capacity : -1;
|
||||
}
|
||||
|
||||
/* static */ bool AIVehicle::RefitVehicle(VehicleID vehicle_id, CargoID cargo)
|
||||
|
@@ -14,6 +14,8 @@
|
||||
|
||||
#include "station_map.h"
|
||||
#include "vehicle_base.h"
|
||||
#include "engine_func.h"
|
||||
#include "engine_base.h"
|
||||
|
||||
struct Aircraft;
|
||||
|
||||
@@ -26,6 +28,15 @@ enum AircraftSubType {
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* This is the Callback method after the construction attempt of an aircraft
|
||||
* @param success indicates completion (or not) of the operation
|
||||
* @param tile of depot where aircraft is built
|
||||
* @param p1 unused
|
||||
* @param p2 unused
|
||||
*/
|
||||
void CcBuildAircraft(bool success, TileIndex tile, uint32 p1, uint32 p2);
|
||||
|
||||
/** Handle Aircraft specific tasks when a an Aircraft enters a hangar
|
||||
* @param *v Vehicle that enters the hangar
|
||||
*/
|
||||
@@ -74,9 +85,6 @@ struct Aircraft : public SpecializedVehicle<Aircraft, VEH_AIRCRAFT> {
|
||||
DirectionByte last_direction;
|
||||
byte number_consecutive_turns;
|
||||
|
||||
/** Ticks between each turn to prevent > 45 degree turns. */
|
||||
byte turn_counter;
|
||||
|
||||
/** We don't want GCC to zero our struct! It already is zeroed and has an index! */
|
||||
Aircraft() : SpecializedVehicle<Aircraft, VEH_AIRCRAFT>() {}
|
||||
/** We want to 'destruct' the right class. */
|
||||
|
@@ -27,15 +27,14 @@
|
||||
#include "sound_func.h"
|
||||
#include "functions.h"
|
||||
#include "cheat_type.h"
|
||||
#include "company_base.h"
|
||||
#include "autoreplace_func.h"
|
||||
#include "autoreplace_gui.h"
|
||||
#include "gfx_func.h"
|
||||
#include "ai/ai.hpp"
|
||||
#include "company_func.h"
|
||||
#include "effectvehicle_func.h"
|
||||
#include "station_base.h"
|
||||
#include "engine_base.h"
|
||||
#include "engine_func.h"
|
||||
#include "core/random_func.hpp"
|
||||
#include "cargotype.h"
|
||||
|
||||
#include "table/strings.h"
|
||||
#include "table/sprites.h"
|
||||
@@ -117,8 +116,7 @@ static StationID FindNearestHangar(const Aircraft *v)
|
||||
if (st->owner != v->owner || !(st->facilities & FACIL_AIRPORT)) continue;
|
||||
|
||||
const AirportFTAClass *afc = st->Airport();
|
||||
const AirportSpec *as = st->GetAirportSpec();
|
||||
if (as->nof_depots == 0 || (
|
||||
if (afc->nof_depots == 0 || (
|
||||
/* don't crash the plane if we know it can't land at the airport */
|
||||
(afc->flags & AirportFTAClass::SHORT_STRIP) &&
|
||||
(avi->subtype & AIR_FAST) &&
|
||||
@@ -336,7 +334,8 @@ CommandCost CmdBuildAircraft(TileIndex tile, DoCommandFlag flags, uint32 p1, uin
|
||||
const Station *st = Station::GetByTile(tile);
|
||||
const AirportFTAClass *apc = st->Airport();
|
||||
|
||||
if (st->GetHangarTile(i) == tile) {
|
||||
assert(i != apc->nof_depots);
|
||||
if (st->airport_tile + ToTileIndexDiff(apc->airport_depots[i]) == tile) {
|
||||
assert(apc->layout[i].heading == HANGAR);
|
||||
v->pos = apc->layout[i].position;
|
||||
break;
|
||||
@@ -437,7 +436,7 @@ bool Aircraft::FindClosestDepot(TileIndex *location, DestinationID *destination,
|
||||
{
|
||||
const Station *st = GetTargetAirportIfValid(this);
|
||||
/* If the station is not a valid airport or if it has no hangars */
|
||||
if (st == NULL || st->GetAirportSpec()->nof_depots == 0) {
|
||||
if (st == NULL || st->Airport()->nof_depots == 0) {
|
||||
/* the aircraft has to search for a hangar on its own */
|
||||
StationID station = FindNearestHangar(this);
|
||||
|
||||
@@ -980,7 +979,7 @@ static bool AircraftController(Aircraft *v)
|
||||
count = UpdateAircraftSpeed(v, speed_limit, hard_limit);
|
||||
if (count == 0) return false;
|
||||
|
||||
if (v->turn_counter != 0) v->turn_counter--;
|
||||
if (v->time_counter != 0) v->time_counter--;
|
||||
|
||||
do {
|
||||
|
||||
@@ -1004,13 +1003,13 @@ static bool AircraftController(Aircraft *v)
|
||||
Direction newdir = GetDirectionTowards(v, x + amd->x, y + amd->y);
|
||||
if (newdir != v->direction) {
|
||||
if (amd->flag & AMED_SLOWTURN && v->number_consecutive_turns < 8 && v->subtype == AIR_AIRCRAFT) {
|
||||
if (v->turn_counter == 0 || newdir == v->last_direction) {
|
||||
if (v->time_counter == 0 || newdir == v->last_direction) {
|
||||
if (newdir == v->last_direction) {
|
||||
v->number_consecutive_turns = 0;
|
||||
} else {
|
||||
v->number_consecutive_turns++;
|
||||
}
|
||||
v->turn_counter = 2 * _settings_game.vehicle.plane_speed;
|
||||
v->time_counter = 2 * _settings_game.vehicle.plane_speed;
|
||||
v->last_direction = v->direction;
|
||||
v->direction = newdir;
|
||||
}
|
||||
@@ -1219,7 +1218,7 @@ void HandleMissingAircraftOrders(Aircraft *v)
|
||||
ret = DoCommand(v->tile, v->index, 0, DC_EXEC, CMD_SEND_AIRCRAFT_TO_HANGAR);
|
||||
_current_company = old_company;
|
||||
|
||||
if (ret.Failed()) CrashAirplane(v);
|
||||
if (CmdFailed(ret)) CrashAirplane(v);
|
||||
} else if (!v->current_order.IsType(OT_GOTO_DEPOT)) {
|
||||
v->current_order.Free();
|
||||
}
|
||||
@@ -1475,7 +1474,7 @@ static void AircraftEventHandler_AtTerminal(Aircraft *v, const AirportFTAClass *
|
||||
return;
|
||||
default: // orders have been deleted (no orders), goto depot and don't bother us
|
||||
v->current_order.Free();
|
||||
go_to_hangar = Station::Get(v->targetairport)->GetAirportSpec()->nof_depots != 0;
|
||||
go_to_hangar = Station::Get(v->targetairport)->Airport()->nof_depots != 0;
|
||||
}
|
||||
|
||||
if (go_to_hangar) {
|
||||
@@ -1616,8 +1615,7 @@ static void AircraftEventHandler_HeliEndLanding(Aircraft *v, const AirportFTACla
|
||||
if (v->current_order.IsType(OT_GOTO_STATION)) {
|
||||
if (AirportFindFreeHelipad(v, apc)) return;
|
||||
}
|
||||
const AirportSpec *as = Station::Get(v->targetairport)->GetAirportSpec();
|
||||
v->state = (as->nof_depots != 0) ? HANGAR : HELITAKEOFF;
|
||||
v->state = (apc->nof_depots != 0) ? HANGAR : HELITAKEOFF;
|
||||
}
|
||||
|
||||
typedef void AircraftStateHandler(Aircraft *v, const AirportFTAClass *apc);
|
||||
|
@@ -15,6 +15,7 @@
|
||||
#include "newgrf_engine.h"
|
||||
#include "strings_func.h"
|
||||
#include "vehicle_func.h"
|
||||
#include "gfx_func.h"
|
||||
#include "window_gui.h"
|
||||
#include "spritecache.h"
|
||||
|
||||
@@ -101,3 +102,23 @@ void DrawAircraftImage(const Vehicle *v, int left, int right, int y, VehicleID s
|
||||
DrawFrameRect(x - 1, y - 1, x + real_sprite->width + 1, y + real_sprite->height + (helicopter ? 5 : 0) + 1, COLOUR_WHITE, FR_BORDERONLY);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* This is the Callback method after the construction attempt of an aircraft
|
||||
* @param success indicates completion (or not) of the operation
|
||||
* @param tile of depot where aircraft is built
|
||||
* @param p1 unused
|
||||
* @param p2 unused
|
||||
*/
|
||||
void CcBuildAircraft(bool success, TileIndex tile, uint32 p1, uint32 p2)
|
||||
{
|
||||
if (success) {
|
||||
const Vehicle *v = Vehicle::Get(_new_vehicle_id);
|
||||
|
||||
if (v->tile == _backup_orders_tile) {
|
||||
_backup_orders_tile = 0;
|
||||
RestoreVehicleOrders(v);
|
||||
}
|
||||
ShowVehicleViewWindow(v);
|
||||
}
|
||||
}
|
||||
|
220
src/airport.cpp
220
src/airport.cpp
@@ -12,7 +12,7 @@
|
||||
#include "stdafx.h"
|
||||
#include "debug.h"
|
||||
#include "airport.h"
|
||||
#include "table/airport_movement.h"
|
||||
#include "airport_movement.h"
|
||||
#include "core/alloc_func.hpp"
|
||||
#include "date_func.h"
|
||||
#include "settings_type.h"
|
||||
@@ -122,37 +122,98 @@ enum AirportTiles {
|
||||
/* 141-143 used for flag animation */
|
||||
};
|
||||
|
||||
#include "table/airport_defaults.h"
|
||||
#include "table/airporttiles.h"
|
||||
/** Tiles for Country Airfield (small) */
|
||||
static const byte _airport_sections_country[] = {
|
||||
APT_SMALL_BUILDING_1, APT_SMALL_BUILDING_2, APT_SMALL_BUILDING_3, APT_SMALL_DEPOT_SE,
|
||||
APT_GRASS_FENCE_NE_FLAG, APT_GRASS_1, APT_GRASS_2, APT_GRASS_FENCE_SW,
|
||||
APT_RUNWAY_SMALL_FAR_END, APT_RUNWAY_SMALL_MIDDLE, APT_RUNWAY_SMALL_MIDDLE, APT_RUNWAY_SMALL_NEAR_END
|
||||
};
|
||||
|
||||
AirportSpec AirportSpec::dummy = {NULL, NULL, 0, 0, 0, 0, 0, MIN_YEAR, MIN_YEAR};
|
||||
AirportSpec AirportSpec::oilrig = {NULL, NULL, 0, 1, 1, 0, 4, MIN_YEAR, MIN_YEAR};
|
||||
/** Tiles for City Airport (large) */
|
||||
static const byte _airport_sections_town[] = {
|
||||
APT_BUILDING_1, APT_APRON_FENCE_NW, APT_STAND_1, APT_APRON_FENCE_NW, APT_APRON_FENCE_NW, APT_DEPOT_SE,
|
||||
APT_BUILDING_2, APT_PIER, APT_ROUND_TERMINAL, APT_STAND_PIER_NE, APT_APRON, APT_APRON_FENCE_SW,
|
||||
APT_BUILDING_3, APT_STAND, APT_PIER_NW_NE, APT_APRON_S, APT_APRON_HOR, APT_APRON_N_FENCE_SW,
|
||||
APT_RADIO_TOWER_FENCE_NE, APT_APRON_W, APT_APRON_VER_CROSSING_S, APT_APRON_HOR_CROSSING_E, APT_ARPON_N, APT_TOWER_FENCE_SW,
|
||||
APT_EMPTY_FENCE_NE, APT_APRON_S, APT_APRON_HOR_CROSSING_W, APT_APRON_VER_CROSSING_N, APT_APRON_E, APT_RADAR_GRASS_FENCE_SW,
|
||||
APT_RUNWAY_END_FENCE_SE, APT_RUNWAY_1, APT_RUNWAY_2, APT_RUNWAY_3, APT_RUNWAY_4, APT_RUNWAY_END_FENCE_SE
|
||||
};
|
||||
|
||||
/** Tiles for Metropolitain Airport (large) - 2 runways */
|
||||
static const byte _airport_sections_metropolitan[] = {
|
||||
APT_BUILDING_1, APT_APRON_FENCE_NW, APT_STAND_1, APT_APRON_FENCE_NW, APT_APRON_FENCE_NW, APT_DEPOT_SE,
|
||||
APT_BUILDING_2, APT_PIER, APT_ROUND_TERMINAL, APT_STAND_PIER_NE, APT_APRON, APT_APRON_FENCE_SW,
|
||||
APT_BUILDING_3, APT_STAND, APT_PIER_NW_NE, APT_APRON_S, APT_APRON_HOR, APT_APRON_N_FENCE_SW,
|
||||
APT_RADAR_FENCE_NE, APT_APRON, APT_APRON, APT_APRON, APT_APRON, APT_TOWER_FENCE_SW,
|
||||
APT_RUNWAY_END, APT_RUNWAY_5, APT_RUNWAY_5, APT_RUNWAY_5, APT_RUNWAY_5, APT_RUNWAY_END,
|
||||
APT_RUNWAY_END_FENCE_SE, APT_RUNWAY_2, APT_RUNWAY_2, APT_RUNWAY_2, APT_RUNWAY_2, APT_RUNWAY_END_FENCE_SE
|
||||
};
|
||||
|
||||
/** Tiles for International Airport (large) - 2 runways */
|
||||
static const byte _airport_sections_international[] = {
|
||||
APT_RUNWAY_END_FENCE_NW, APT_RUNWAY_FENCE_NW, APT_RUNWAY_FENCE_NW, APT_RUNWAY_FENCE_NW, APT_RUNWAY_FENCE_NW, APT_RUNWAY_FENCE_NW, APT_RUNWAY_END_FENCE_NW,
|
||||
APT_RADIO_TOWER_FENCE_NE, APT_APRON, APT_APRON, APT_APRON, APT_APRON, APT_APRON, APT_DEPOT_SE,
|
||||
APT_BUILDING_3, APT_APRON, APT_STAND, APT_BUILDING_2, APT_STAND, APT_APRON, APT_APRON_FENCE_SW,
|
||||
APT_DEPOT_SE, APT_APRON, APT_STAND, APT_BUILDING_2, APT_STAND, APT_APRON, APT_HELIPAD_1,
|
||||
APT_APRON_FENCE_NE, APT_APRON, APT_STAND, APT_TOWER, APT_STAND, APT_APRON, APT_HELIPAD_1,
|
||||
APT_APRON_FENCE_NE, APT_APRON, APT_APRON, APT_APRON, APT_APRON, APT_APRON, APT_RADAR_FENCE_SW,
|
||||
APT_RUNWAY_END_FENCE_SE, APT_RUNWAY_2, APT_RUNWAY_2, APT_RUNWAY_2, APT_RUNWAY_2, APT_RUNWAY_2, APT_RUNWAY_END_FENCE_SE
|
||||
};
|
||||
|
||||
/** Tiles for Intercontinental Airport (vlarge) - 4 runways */
|
||||
static const byte _airport_sections_intercontinental[] = {
|
||||
APT_RADAR_FENCE_NE, APT_RUNWAY_END_FENCE_NE_NW, APT_RUNWAY_FENCE_NW, APT_RUNWAY_FENCE_NW, APT_RUNWAY_FENCE_NW, APT_RUNWAY_FENCE_NW, APT_RUNWAY_FENCE_NW, APT_RUNWAY_FENCE_NW, APT_RUNWAY_END_FENCE_NW_SW,
|
||||
APT_RUNWAY_END_FENCE_NE_NW, APT_RUNWAY_2, APT_RUNWAY_2, APT_RUNWAY_2, APT_RUNWAY_2, APT_RUNWAY_2, APT_RUNWAY_2, APT_RUNWAY_END_FENCE_SE_SW, APT_APRON_FENCE_NE_SW,
|
||||
APT_APRON_FENCE_NE, APT_SMALL_BUILDING_1, APT_APRON_FENCE_NE, APT_APRON, APT_APRON, APT_APRON, APT_APRON, APT_RADIO_TOWER_FENCE_NE, APT_APRON_FENCE_NE_SW,
|
||||
APT_APRON_FENCE_NE, APT_APRON_HALF_EAST, APT_APRON_FENCE_NE, APT_TOWER, APT_HELIPAD_2, APT_HELIPAD_2, APT_APRON, APT_APRON_FENCE_NW, APT_APRON_FENCE_SW,
|
||||
APT_APRON_FENCE_NE, APT_APRON, APT_APRON, APT_STAND, APT_BUILDING_1, APT_STAND, APT_APRON, APT_LOW_BUILDING, APT_DEPOT_SE,
|
||||
APT_DEPOT_SE, APT_LOW_BUILDING, APT_APRON, APT_STAND, APT_BUILDING_2, APT_STAND, APT_APRON, APT_APRON, APT_APRON_FENCE_SW,
|
||||
APT_APRON_FENCE_NE, APT_APRON, APT_APRON, APT_STAND, APT_BUILDING_3, APT_STAND, APT_APRON, APT_APRON, APT_APRON_FENCE_SW,
|
||||
APT_APRON_FENCE_NE, APT_APRON_FENCE_SE, APT_APRON, APT_STAND, APT_ROUND_TERMINAL, APT_STAND, APT_APRON_FENCE_SW, APT_APRON_HALF_WEST, APT_APRON_FENCE_SW,
|
||||
APT_APRON_FENCE_NE, APT_GRASS_FENCE_NE_FLAG_2, APT_APRON_FENCE_NE, APT_APRON, APT_APRON, APT_APRON, APT_APRON_FENCE_SW, APT_EMPTY, APT_APRON_FENCE_NE_SW,
|
||||
APT_APRON_FENCE_NE, APT_RUNWAY_END_FENCE_NE_NW, APT_RUNWAY_FENCE_NW, APT_RUNWAY_FENCE_NW, APT_RUNWAY_FENCE_NW, APT_RUNWAY_FENCE_NW, APT_RUNWAY_FENCE_NW, APT_RUNWAY_FENCE_NW, APT_RUNWAY_END_FENCE_SE_SW,
|
||||
APT_RUNWAY_END_FENCE_NE_SE, APT_RUNWAY_2, APT_RUNWAY_2, APT_RUNWAY_2, APT_RUNWAY_2, APT_RUNWAY_2, APT_RUNWAY_2, APT_RUNWAY_END_FENCE_SE_SW, APT_EMPTY
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Retrieve airport spec for the given airport
|
||||
* @param type index of airport
|
||||
* @return A pointer to the corresponding AirportSpec
|
||||
*/
|
||||
/* static */ const AirportSpec *AirportSpec::Get(byte type)
|
||||
{
|
||||
if (type == AT_OILRIG) return &oilrig;
|
||||
assert(type < NUM_AIRPORTS);
|
||||
extern const AirportSpec _origin_airport_specs[];
|
||||
return &_origin_airport_specs[type];
|
||||
}
|
||||
/** Tiles for Commuter Airfield (small) */
|
||||
static const byte _airport_sections_commuter[] = {
|
||||
APT_TOWER, APT_BUILDING_3, APT_HELIPAD_2_FENCE_NW, APT_HELIPAD_2_FENCE_NW, APT_DEPOT_SE,
|
||||
APT_APRON_FENCE_NE, APT_APRON, APT_APRON, APT_APRON, APT_APRON_FENCE_SW,
|
||||
APT_APRON_FENCE_NE, APT_STAND, APT_STAND, APT_STAND, APT_APRON_FENCE_SW,
|
||||
APT_RUNWAY_END_FENCE_SE, APT_RUNWAY_2, APT_RUNWAY_2, APT_RUNWAY_2, APT_RUNWAY_END_FENCE_SE
|
||||
};
|
||||
|
||||
/**
|
||||
* Retrieve airport tile spec for the given airport tile
|
||||
* @param gfx index of airport tile
|
||||
* @return A pointer to the corresponding AirportTileSpec
|
||||
*/
|
||||
/* static */ const AirportTileSpec *AirportTileSpec::Get(StationGfx gfx)
|
||||
{
|
||||
assert(gfx < NUM_AIRPORTTILES);
|
||||
extern const AirportTileSpec _origin_airporttile_specs[];
|
||||
return &_origin_airporttile_specs[gfx];
|
||||
}
|
||||
/** Tiles for Heliport */
|
||||
static const byte _airport_sections_heliport[] = {
|
||||
APT_HELIPORT,
|
||||
};
|
||||
|
||||
/** Tiles for Helidepot */
|
||||
static const byte _airport_sections_helidepot[] = {
|
||||
APT_LOW_BUILDING_FENCE_N, APT_DEPOT_SE,
|
||||
APT_HELIPAD_2_FENCE_NE_SE, APT_APRON_FENCE_SE_SW
|
||||
};
|
||||
|
||||
/** Tiles for Helistation */
|
||||
static const byte _airport_sections_helistation[] = {
|
||||
APT_DEPOT_SE, APT_LOW_BUILDING_FENCE_NW, APT_HELIPAD_3_FENCE_NW, APT_HELIPAD_3_FENCE_NW_SW,
|
||||
APT_APRON_FENCE_NE_SE, APT_APRON_FENCE_SE, APT_APRON_FENCE_SE, APT_HELIPAD_3_FENCE_SE_SW
|
||||
};
|
||||
|
||||
const byte * const _airport_sections[] = {
|
||||
_airport_sections_country, // Country Airfield (small)
|
||||
_airport_sections_town, // City Airport (large)
|
||||
_airport_sections_heliport, // Heliport
|
||||
_airport_sections_metropolitan, // Metropolitain Airport (large)
|
||||
_airport_sections_international, // International Airport (xlarge)
|
||||
_airport_sections_commuter, // Commuter Airport (small)
|
||||
_airport_sections_helidepot, // Helidepot
|
||||
_airport_sections_intercontinental, // Intercontinental Airport (xxlarge)
|
||||
_airport_sections_helistation, // Helistation
|
||||
};
|
||||
|
||||
assert_compile(NUM_AIRPORTS == lengthof(_airport_sections));
|
||||
|
||||
/* Uncomment this to print out a full report of the airport-structure
|
||||
* You should either use
|
||||
@@ -183,7 +244,12 @@ void InitializeAirports()
|
||||
_airport_entries_dummy,
|
||||
AirportFTAClass::ALL,
|
||||
_airport_fta_dummy,
|
||||
0
|
||||
NULL,
|
||||
0,
|
||||
0, 0, 0,
|
||||
0,
|
||||
0,
|
||||
MAX_YEAR + 1, MAX_YEAR + 1
|
||||
);
|
||||
|
||||
_country_airport = new AirportFTAClass(
|
||||
@@ -193,7 +259,12 @@ void InitializeAirports()
|
||||
_airport_entries_country,
|
||||
AirportFTAClass::ALL | AirportFTAClass::SHORT_STRIP,
|
||||
_airport_fta_country,
|
||||
0
|
||||
_airport_depots_country,
|
||||
lengthof(_airport_depots_country),
|
||||
4, 3, 3,
|
||||
0,
|
||||
4,
|
||||
0, 1959
|
||||
);
|
||||
|
||||
_city_airport = new AirportFTAClass(
|
||||
@@ -203,7 +274,12 @@ void InitializeAirports()
|
||||
_airport_entries_city,
|
||||
AirportFTAClass::ALL,
|
||||
_airport_fta_city,
|
||||
0
|
||||
_airport_depots_city,
|
||||
lengthof(_airport_depots_city),
|
||||
6, 6, 5,
|
||||
0,
|
||||
5,
|
||||
1955, MAX_YEAR
|
||||
);
|
||||
|
||||
_metropolitan_airport = new AirportFTAClass(
|
||||
@@ -213,7 +289,12 @@ void InitializeAirports()
|
||||
_airport_entries_metropolitan,
|
||||
AirportFTAClass::ALL,
|
||||
_airport_fta_metropolitan,
|
||||
0
|
||||
_airport_depots_metropolitan,
|
||||
lengthof(_airport_depots_metropolitan),
|
||||
6, 6, 8,
|
||||
0,
|
||||
6,
|
||||
1980, MAX_YEAR
|
||||
);
|
||||
|
||||
_international_airport = new AirportFTAClass(
|
||||
@@ -223,7 +304,12 @@ void InitializeAirports()
|
||||
_airport_entries_international,
|
||||
AirportFTAClass::ALL,
|
||||
_airport_fta_international,
|
||||
0
|
||||
_airport_depots_international,
|
||||
lengthof(_airport_depots_international),
|
||||
7, 7, 17,
|
||||
0,
|
||||
8,
|
||||
1990, MAX_YEAR
|
||||
);
|
||||
|
||||
_intercontinental_airport = new AirportFTAClass(
|
||||
@@ -233,7 +319,12 @@ void InitializeAirports()
|
||||
_airport_entries_intercontinental,
|
||||
AirportFTAClass::ALL,
|
||||
_airport_fta_intercontinental,
|
||||
0
|
||||
_airport_depots_intercontinental,
|
||||
lengthof(_airport_depots_intercontinental),
|
||||
9, 11, 25,
|
||||
0,
|
||||
10,
|
||||
2002, MAX_YEAR
|
||||
);
|
||||
|
||||
_heliport = new AirportFTAClass(
|
||||
@@ -243,7 +334,12 @@ void InitializeAirports()
|
||||
_airport_entries_heliport_oilrig,
|
||||
AirportFTAClass::HELICOPTERS,
|
||||
_airport_fta_heliport_oilrig,
|
||||
60
|
||||
NULL,
|
||||
0,
|
||||
1, 1, 1,
|
||||
60,
|
||||
4,
|
||||
1963, MAX_YEAR
|
||||
);
|
||||
|
||||
_oilrig = new AirportFTAClass(
|
||||
@@ -253,7 +349,12 @@ void InitializeAirports()
|
||||
_airport_entries_heliport_oilrig,
|
||||
AirportFTAClass::HELICOPTERS,
|
||||
_airport_fta_heliport_oilrig,
|
||||
54
|
||||
NULL,
|
||||
0,
|
||||
1, 1, 0,
|
||||
54,
|
||||
3,
|
||||
MAX_YEAR + 1, MAX_YEAR + 1
|
||||
);
|
||||
|
||||
_commuter_airport = new AirportFTAClass(
|
||||
@@ -263,7 +364,12 @@ void InitializeAirports()
|
||||
_airport_entries_commuter,
|
||||
AirportFTAClass::ALL | AirportFTAClass::SHORT_STRIP,
|
||||
_airport_fta_commuter,
|
||||
0
|
||||
_airport_depots_commuter,
|
||||
lengthof(_airport_depots_commuter),
|
||||
5, 4, 4,
|
||||
0,
|
||||
4,
|
||||
1983, MAX_YEAR
|
||||
);
|
||||
|
||||
_heli_depot = new AirportFTAClass(
|
||||
@@ -273,7 +379,12 @@ void InitializeAirports()
|
||||
_airport_entries_helidepot,
|
||||
AirportFTAClass::HELICOPTERS,
|
||||
_airport_fta_helidepot,
|
||||
0
|
||||
_airport_depots_helidepot,
|
||||
lengthof(_airport_depots_helidepot),
|
||||
2, 2, 2,
|
||||
0,
|
||||
4,
|
||||
1976, MAX_YEAR
|
||||
);
|
||||
|
||||
_heli_station = new AirportFTAClass(
|
||||
@@ -283,7 +394,12 @@ void InitializeAirports()
|
||||
_airport_entries_helistation,
|
||||
AirportFTAClass::HELICOPTERS,
|
||||
_airport_fta_helistation,
|
||||
0
|
||||
_airport_depots_helistation,
|
||||
lengthof(_airport_depots_helistation),
|
||||
4, 2, 3,
|
||||
0,
|
||||
4,
|
||||
1980, MAX_YEAR
|
||||
);
|
||||
}
|
||||
|
||||
@@ -319,15 +435,31 @@ AirportFTAClass::AirportFTAClass(
|
||||
const byte *entry_points_,
|
||||
Flags flags_,
|
||||
const AirportFTAbuildup *apFA,
|
||||
byte delta_z_
|
||||
const TileIndexDiffC *depots_,
|
||||
const byte nof_depots_,
|
||||
uint size_x_,
|
||||
uint size_y_,
|
||||
byte noise_level_,
|
||||
byte delta_z_,
|
||||
byte catchment_,
|
||||
Year first_available_,
|
||||
Year last_available_
|
||||
) :
|
||||
moving_data(moving_data_),
|
||||
terminals(terminals_),
|
||||
helipads(helipads_),
|
||||
airport_depots(depots_),
|
||||
flags(flags_),
|
||||
nof_depots(nof_depots_),
|
||||
nofelements(AirportGetNofElements(apFA)),
|
||||
entry_points(entry_points_),
|
||||
delta_z(delta_z_)
|
||||
size_x(size_x_),
|
||||
size_y(size_y_),
|
||||
noise_level(noise_level_),
|
||||
delta_z(delta_z_),
|
||||
catchment(catchment_),
|
||||
first_available(first_available_),
|
||||
last_available(last_available_)
|
||||
{
|
||||
byte nofterminalgroups, nofhelipadgroups;
|
||||
|
||||
@@ -387,11 +519,11 @@ AirportFTAClass::~AirportFTAClass()
|
||||
free(layout);
|
||||
}
|
||||
|
||||
bool AirportSpec::IsAvailable() const
|
||||
bool AirportFTAClass::IsAvailable() const
|
||||
{
|
||||
if (_cur_year < this->min_year) return false;
|
||||
if (_cur_year < this->first_available) return false;
|
||||
if (_settings_game.station.never_expire_airports) return true;
|
||||
return _cur_year <= this->max_year;
|
||||
return _cur_year <= this->last_available;
|
||||
}
|
||||
|
||||
/** Get the number of elements of a source Airport state automata
|
||||
|
@@ -14,6 +14,7 @@
|
||||
|
||||
#include "direction_type.h"
|
||||
#include "map_type.h"
|
||||
#include "tile_type.h"
|
||||
#include "date_type.h"
|
||||
|
||||
/** Current limits for airports */
|
||||
@@ -21,11 +22,6 @@ enum {
|
||||
MAX_TERMINALS = 10, ///< maximum number of terminals per airport
|
||||
MAX_HELIPADS = 4, ///< maximum number of helipads per airport
|
||||
MAX_ELEMENTS = 255, ///< maximum number of aircraft positions at airport
|
||||
NUM_AIRPORTTILES = 144, ///< total number of airport tiles
|
||||
};
|
||||
|
||||
enum {
|
||||
AIRPORTTILE_NOANIM = 0xFF, ///< flag to mark airport tiles as having no animation
|
||||
};
|
||||
|
||||
/** Airport types */
|
||||
@@ -44,46 +40,6 @@ enum {
|
||||
AT_DUMMY = 255
|
||||
};
|
||||
|
||||
/* Copy from station_map.h */
|
||||
typedef byte StationGfx;
|
||||
|
||||
struct AirportTileTable {
|
||||
TileIndexDiffC ti;
|
||||
StationGfx gfx;
|
||||
};
|
||||
|
||||
/**
|
||||
* Defines the data structure for an airport.
|
||||
*/
|
||||
struct AirportSpec {
|
||||
const AirportTileTable * const *table; ///< list of the tiles composing the airport
|
||||
const TileIndexDiffC *depot_table; ///< gives the position of the depots on the airports
|
||||
byte nof_depots; ///< the number of depots in this airport
|
||||
byte size_x; ///< size of airport in x direction
|
||||
byte size_y; ///< size of airport in y direction
|
||||
byte noise_level; ///< noise that this airport generates
|
||||
byte catchment; ///< catchment area of this airport
|
||||
Year min_year; ///< first year the airport is available
|
||||
Year max_year; ///< last year the airport is available
|
||||
|
||||
static const AirportSpec *Get(byte type);
|
||||
|
||||
bool IsAvailable() const;
|
||||
|
||||
static AirportSpec dummy;
|
||||
static AirportSpec oilrig;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Defines the data structure of each indivudual tile of an airport.
|
||||
*/
|
||||
struct AirportTileSpec {
|
||||
StationGfx anim_next; ///< Next StationGfx in an animation
|
||||
uint8 animation_speed; ///< The speed of the animation
|
||||
|
||||
static const AirportTileSpec *Get(StationGfx gfx);
|
||||
};
|
||||
|
||||
enum {
|
||||
AMED_NOSPDCLAMP = 1 << 0,
|
||||
@@ -197,7 +153,15 @@ public:
|
||||
const byte *entry_points,
|
||||
Flags flags,
|
||||
const AirportFTAbuildup *apFA,
|
||||
byte delta_z
|
||||
const TileIndexDiffC *depots,
|
||||
byte nof_depots,
|
||||
uint size_x,
|
||||
uint size_y,
|
||||
uint8 noise_level,
|
||||
byte delta_z,
|
||||
byte catchment,
|
||||
Year first_available,
|
||||
Year last_available
|
||||
);
|
||||
|
||||
~AirportFTAClass();
|
||||
@@ -208,14 +172,25 @@ public:
|
||||
return &moving_data[position];
|
||||
}
|
||||
|
||||
/** Is this airport available at this date? */
|
||||
bool IsAvailable() const;
|
||||
|
||||
const AirportMovingData *moving_data;
|
||||
struct AirportFTA *layout; ///< state machine for airport
|
||||
const byte *terminals;
|
||||
const byte *helipads;
|
||||
const TileIndexDiffC *airport_depots; ///< gives the position of the depots on the airports
|
||||
Flags flags;
|
||||
byte nof_depots; ///< number of depots this airport has
|
||||
byte nofelements; ///< number of positions the airport consists of
|
||||
const byte *entry_points; ///< when an airplane arrives at this airport, enter it at position entry_point, index depends on direction
|
||||
byte size_x;
|
||||
byte size_y;
|
||||
uint8 noise_level; ///< noise that this airport generates
|
||||
byte delta_z; ///< Z adjustment for helicopter pads
|
||||
byte catchment;
|
||||
Year first_available; ///< the year this airport becomes available
|
||||
Year last_available; ///< the year this airport expires
|
||||
};
|
||||
|
||||
DECLARE_ENUM_AS_BIT_SET(AirportFTAClass::Flags)
|
||||
|
@@ -22,7 +22,6 @@
|
||||
#include "company_func.h"
|
||||
#include "tilehighlight_func.h"
|
||||
#include "company_base.h"
|
||||
#include "station_type.h"
|
||||
|
||||
#include "table/sprites.h"
|
||||
#include "table/strings.h"
|
||||
@@ -32,12 +31,12 @@ static byte _selected_airport_type;
|
||||
static void ShowBuildAirportPicker(Window *parent);
|
||||
|
||||
|
||||
void CcBuildAirport(const CommandCost &result, TileIndex tile, uint32 p1, uint32 p2)
|
||||
void CcBuildAirport(bool success, TileIndex tile, uint32 p1, uint32 p2)
|
||||
{
|
||||
if (result.Failed()) return;
|
||||
|
||||
SndPlayTileFx(SND_1F_SPLAT, tile);
|
||||
if (!_settings_client.gui.persistent_buildingtools) ResetObjectToPlace();
|
||||
if (success) {
|
||||
SndPlayTileFx(SND_1F_SPLAT, tile);
|
||||
if (!_settings_client.gui.persistent_buildingtools) ResetObjectToPlace();
|
||||
}
|
||||
}
|
||||
|
||||
static void PlaceAirport(TileIndex tile)
|
||||
@@ -203,8 +202,8 @@ public:
|
||||
{
|
||||
this->DrawWidgets();
|
||||
|
||||
const AirportSpec *as = AirportSpec::Get(_selected_airport_type);
|
||||
int rad = _settings_game.station.modified_catchment ? as->catchment : (uint)CA_UNMODIFIED;
|
||||
const AirportFTAClass *airport = GetAirport(_selected_airport_type);
|
||||
int rad = _settings_game.station.modified_catchment ? airport->catchment : (uint)CA_UNMODIFIED;
|
||||
|
||||
uint16 top = this->GetWidget<NWidgetBase>(BAW_BTN_DOHILIGHT)->pos_y + this->GetWidget<NWidgetBase>(BAW_BTN_DOHILIGHT)->current_y + WD_PAR_VSEP_NORMAL;
|
||||
NWidgetBase *panel_nwi = this->GetWidget<NWidgetBase>(BAW_BOTTOMPANEL);
|
||||
@@ -213,7 +212,7 @@ public:
|
||||
/* only show the station (airport) noise, if the noise option is activated */
|
||||
if (_settings_game.economy.station_noise_level) {
|
||||
/* show the noise of the selected airport */
|
||||
SetDParam(0, as->noise_level);
|
||||
SetDParam(0, airport->noise_level);
|
||||
DrawString(panel_nwi->pos_x + WD_FRAMERECT_LEFT, right - WD_FRAMERECT_RIGHT, top, STR_STATION_BUILD_NOISE);
|
||||
top += FONT_HEIGHT_NORMAL + WD_PAR_VSEP_NORMAL;
|
||||
}
|
||||
@@ -233,10 +232,10 @@ public:
|
||||
_selected_airport_type = airport_id;
|
||||
this->LowerWidget(airport_id + BAW_SMALL_AIRPORT);
|
||||
|
||||
const AirportSpec *as = AirportSpec::Get(airport_id);
|
||||
SetTileSelectSize(as->size_x, as->size_y);
|
||||
const AirportFTAClass *airport = GetAirport(airport_id);
|
||||
SetTileSelectSize(airport->size_x, airport->size_y);
|
||||
|
||||
int rad = _settings_game.station.modified_catchment ? as->catchment : (uint)CA_UNMODIFIED;
|
||||
int rad = _settings_game.station.modified_catchment ? airport->catchment : (uint)CA_UNMODIFIED;
|
||||
if (_settings_client.gui.station_show_coverage) SetTileSelectBigSize(-rad, -rad, 2 * rad, 2 * rad);
|
||||
|
||||
this->SetDirty();
|
||||
@@ -244,16 +243,16 @@ public:
|
||||
|
||||
virtual void OnInvalidateData(int data = 0)
|
||||
{
|
||||
if (!AirportSpec::Get(_selected_airport_type)->IsAvailable()) {
|
||||
if (!GetAirport(_selected_airport_type)->IsAvailable()) {
|
||||
for (int i = 0; i < BAW_AIRPORT_COUNT; i++) {
|
||||
if (AirportSpec::Get(i)->IsAvailable()) {
|
||||
if (GetAirport(i)->IsAvailable()) {
|
||||
this->SelectOtherAirport(i);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
for (int i = 0; i < BAW_AIRPORT_COUNT; i++) {
|
||||
this->SetWidgetDisabledState(i + BAW_SMALL_AIRPORT, !AirportSpec::Get(i)->IsAvailable());
|
||||
this->SetWidgetDisabledState(i + BAW_SMALL_AIRPORT, !GetAirport(i)->IsAvailable());
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -14,8 +14,6 @@
|
||||
#include "roadveh.h"
|
||||
#include "newgrf_engine.h"
|
||||
#include "vehicle_func.h"
|
||||
#include "engine_base.h"
|
||||
#include "engine_func.h"
|
||||
|
||||
#include "table/strings.h"
|
||||
#include "table/sprites.h"
|
||||
|
@@ -14,8 +14,6 @@
|
||||
|
||||
#include "core/pool_type.hpp"
|
||||
#include "autoreplace_type.h"
|
||||
#include "engine_type.h"
|
||||
#include "group_type.h"
|
||||
|
||||
typedef uint16 EngineRenewID;
|
||||
|
||||
|
@@ -20,7 +20,6 @@
|
||||
#include "functions.h"
|
||||
#include "autoreplace_func.h"
|
||||
#include "articulated_vehicles.h"
|
||||
#include "core/random_func.hpp"
|
||||
|
||||
#include "table/strings.h"
|
||||
|
||||
@@ -125,7 +124,7 @@ static void TransferCargo(Vehicle *old_veh, Vehicle *new_head, bool part_of_chai
|
||||
}
|
||||
|
||||
/* Update train weight etc., the old vehicle will be sold anyway */
|
||||
if (part_of_chain && new_head->type == VEH_TRAIN) Train::From(new_head)->ConsistChanged(true);
|
||||
if (part_of_chain && new_head->type == VEH_TRAIN) TrainConsistChanged(Train::From(new_head), true);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -12,10 +12,8 @@
|
||||
#ifndef AUTOREPLACE_FUNC_H
|
||||
#define AUTOREPLACE_FUNC_H
|
||||
|
||||
#include "command_type.h"
|
||||
#include "autoreplace_type.h"
|
||||
#include "company_base.h"
|
||||
#include "engine_type.h"
|
||||
#include "group_type.h"
|
||||
|
||||
/**
|
||||
* Remove all engine replacement settings for the company.
|
||||
|
@@ -18,13 +18,13 @@
|
||||
#include "strings_func.h"
|
||||
#include "window_func.h"
|
||||
#include "autoreplace_func.h"
|
||||
#include "gfx_func.h"
|
||||
#include "company_func.h"
|
||||
#include "widgets/dropdown_type.h"
|
||||
#include "engine_base.h"
|
||||
#include "window_gui.h"
|
||||
#include "engine_gui.h"
|
||||
#include "settings_func.h"
|
||||
#include "core/geometry_func.hpp"
|
||||
|
||||
#include "table/strings.h"
|
||||
|
||||
|
@@ -12,8 +12,6 @@
|
||||
#ifndef AUTOREPLACE_GUI_H
|
||||
#define AUTOREPLACE_GUI_H
|
||||
|
||||
#include "engine_type.h"
|
||||
#include "group_type.h"
|
||||
#include "vehicle_type.h"
|
||||
|
||||
/**
|
||||
|
@@ -12,11 +12,10 @@
|
||||
#ifndef AUTOSLOPE_H
|
||||
#define AUTOSLOPE_H
|
||||
|
||||
#include "settings_type.h"
|
||||
#include "company_func.h"
|
||||
#include "depot_func.h"
|
||||
#include "slope_func.h"
|
||||
#include "tile_map.h"
|
||||
#include "openttd.h"
|
||||
|
||||
/**
|
||||
* Autoslope check for tiles with an entrance on an edge.
|
||||
|
@@ -10,9 +10,8 @@
|
||||
/** @file base_media_func.h Generic function implementations for base data (graphics, sounds). */
|
||||
|
||||
#include "base_media_base.h"
|
||||
#include "debug.h"
|
||||
#include "ini_type.h"
|
||||
#include "string_func.h"
|
||||
#include "ini_type.h"
|
||||
|
||||
template <class Tbase_set> /* static */ const char *BaseMedia<Tbase_set>::ini_set;
|
||||
template <class Tbase_set> /* static */ const Tbase_set *BaseMedia<Tbase_set>::used_set;
|
||||
|
@@ -12,7 +12,12 @@
|
||||
#ifndef BASE_STATION_BASE_H
|
||||
#define BASE_STATION_BASE_H
|
||||
|
||||
#include "station_type.h"
|
||||
#include "core/pool_type.hpp"
|
||||
#include "town_type.h"
|
||||
#include "strings_type.h"
|
||||
#include "date_type.h"
|
||||
#include "company_type.h"
|
||||
#include "viewport_type.h"
|
||||
#include "station_map.h"
|
||||
|
||||
|
@@ -11,6 +11,7 @@
|
||||
|
||||
#include "../stdafx.h"
|
||||
#include "../core/math_func.hpp"
|
||||
#include "../gfx_func.h"
|
||||
#include "../video/video_driver.hpp"
|
||||
#include "32bpp_anim.hpp"
|
||||
|
||||
@@ -307,15 +308,11 @@ void Blitter_32bppAnim::CopyFromBuffer(void *video, const void *src, int width,
|
||||
assert(video >= _screen.dst_ptr && video <= (uint32 *)_screen.dst_ptr + _screen.width + _screen.height * _screen.pitch);
|
||||
uint32 *dst = (uint32 *)video;
|
||||
uint32 *usrc = (uint32 *)src;
|
||||
uint8 *anim_line = ((uint32 *)video - (uint32 *)_screen.dst_ptr) + this->anim_buf;
|
||||
uint8 *anim_line;
|
||||
|
||||
int count = (_use_palette == PAL_DOS) ? PALETTE_ANIM_SIZE_DOS : PALETTE_ANIM_SIZE_WIN;
|
||||
anim_line = ((uint32 *)video - (uint32 *)_screen.dst_ptr) + this->anim_buf;
|
||||
|
||||
for (; height > 0; height--) {
|
||||
/* We need to keep those for palette animation. */
|
||||
uint32 *dst_pal = dst;
|
||||
uint8 *anim_pal = anim_line;
|
||||
|
||||
memcpy(dst, usrc, width * sizeof(uint32));
|
||||
usrc += width;
|
||||
dst += _screen.pitch;
|
||||
@@ -323,24 +320,10 @@ void Blitter_32bppAnim::CopyFromBuffer(void *video, const void *src, int width,
|
||||
memcpy(anim_line, usrc, width * sizeof(uint8));
|
||||
usrc = (uint32 *)((uint8 *)usrc + width);
|
||||
anim_line += this->anim_buf_width;
|
||||
|
||||
/* Okay, it is *very* likely that the image we stored is using
|
||||
* the wrong palette animated colours. There are two things we
|
||||
* can do to fix this. The first is simply reviewing the whole
|
||||
* screen after we copied the buffer, i.e. run PaletteAnimate,
|
||||
* however that forces a full screen redraw which is expensive
|
||||
* for just the cursor. This just copies the implementation of
|
||||
* palette animation, much cheaper though slightly nastier. */
|
||||
for (int i = 0; i < width; i++) {
|
||||
uint colour = *anim_pal;
|
||||
if (IsInsideBS(colour, PALETTE_ANIM_SIZE_START, count)) {
|
||||
/* Update this pixel */
|
||||
*dst_pal = LookupColourInPalette(colour);
|
||||
}
|
||||
dst_pal++;
|
||||
anim_pal++;
|
||||
}
|
||||
}
|
||||
|
||||
/* We update the palette (or the pixels that do animation) immediatly, to avoid graphical glitches */
|
||||
this->PaletteAnimate(PALETTE_ANIM_SIZE_START, (_use_palette == PAL_DOS) ? PALETTE_ANIM_SIZE_DOS : PALETTE_ANIM_SIZE_WIN);
|
||||
}
|
||||
|
||||
void Blitter_32bppAnim::CopyToBuffer(const void *video, void *dst, int width, int height)
|
||||
|
@@ -13,6 +13,7 @@
|
||||
#define BLITTER_32BPP_ANIM_HPP
|
||||
|
||||
#include "32bpp_optimized.hpp"
|
||||
#include "factory.hpp"
|
||||
|
||||
class Blitter_32bppAnim : public Blitter_32bppOptimized {
|
||||
private:
|
||||
|
@@ -10,6 +10,7 @@
|
||||
/** @file 32bpp_base.cpp Implementation of base for 32 bpp blitters. */
|
||||
|
||||
#include "../stdafx.h"
|
||||
#include "../gfx_func.h"
|
||||
#include "32bpp_base.hpp"
|
||||
|
||||
void *Blitter_32bppBase::MoveTo(const void *video, int x, int y)
|
||||
|
@@ -14,7 +14,6 @@
|
||||
|
||||
#include "base.hpp"
|
||||
#include "../core/bitmath_func.hpp"
|
||||
#include "../gfx_func.h"
|
||||
|
||||
class Blitter_32bppBase : public Blitter {
|
||||
public:
|
||||
|
@@ -11,6 +11,7 @@
|
||||
|
||||
#include "../stdafx.h"
|
||||
#include "../zoom_func.h"
|
||||
#include "../gfx_func.h"
|
||||
#include "../core/math_func.hpp"
|
||||
#include "32bpp_optimized.hpp"
|
||||
|
||||
|
@@ -10,6 +10,7 @@
|
||||
/** @file 32bpp_simple.cpp Implementation of the simple 32 bpp blitter. */
|
||||
|
||||
#include "../stdafx.h"
|
||||
#include "../gfx_func.h"
|
||||
#include "../zoom_func.h"
|
||||
#include "32bpp_simple.hpp"
|
||||
|
||||
|
@@ -14,6 +14,7 @@
|
||||
|
||||
#include "../spritecache.h"
|
||||
#include "../spriteloader/spriteloader.hpp"
|
||||
#include "../zoom_type.h"
|
||||
|
||||
enum BlitterMode {
|
||||
BM_NORMAL,
|
||||
|
@@ -13,6 +13,7 @@
|
||||
#define BRIDGE_H
|
||||
|
||||
#include "gfx_type.h"
|
||||
#include "direction_type.h"
|
||||
#include "tile_cmd.h"
|
||||
|
||||
/** This enum is related to the definition of bridge pieces,
|
||||
|
@@ -11,6 +11,7 @@
|
||||
|
||||
#include "stdafx.h"
|
||||
#include "gui.h"
|
||||
#include "window_gui.h"
|
||||
#include "command_func.h"
|
||||
#include "economy_func.h"
|
||||
#include "bridge.h"
|
||||
@@ -21,7 +22,6 @@
|
||||
#include "tunnelbridge.h"
|
||||
#include "sortlist_type.h"
|
||||
#include "widgets/dropdown_func.h"
|
||||
#include "core/geometry_func.hpp"
|
||||
|
||||
#include "table/strings.h"
|
||||
|
||||
@@ -44,14 +44,14 @@ typedef GUIList<BuildBridgeData> GUIBridgeList;
|
||||
/**
|
||||
* Callback executed after a build Bridge CMD has been called
|
||||
*
|
||||
* @param result Whether the build succeded
|
||||
* @param success True if the build succeded
|
||||
* @param tile The tile where the command has been executed
|
||||
* @param p1 not used
|
||||
* @param p2 not used
|
||||
*/
|
||||
void CcBuildBridge(const CommandCost &result, TileIndex tile, uint32 p1, uint32 p2)
|
||||
void CcBuildBridge(bool success, TileIndex tile, uint32 p1, uint32 p2)
|
||||
{
|
||||
if (result.Succeeded()) SndPlayTileFx(SND_27_BLACKSMITH_ANVIL, tile);
|
||||
if (success) SndPlayTileFx(SND_27_BLACKSMITH_ANVIL, tile);
|
||||
}
|
||||
|
||||
/* Names of the build bridge selection window */
|
||||
@@ -386,7 +386,7 @@ void ShowBuildBridgeWindow(TileIndex start, TileIndex end, TransportType transpo
|
||||
CommandCost ret = DoCommand(end, start, type, DC_AUTO | DC_QUERY_COST, CMD_BUILD_BRIDGE);
|
||||
|
||||
GUIBridgeList *bl = NULL;
|
||||
if (ret.Failed()) {
|
||||
if (CmdFailed(ret)) {
|
||||
errmsg = _error_message;
|
||||
} else {
|
||||
/* check which bridges can be built */
|
||||
|
@@ -12,6 +12,9 @@
|
||||
#ifndef BRIDGE_MAP_H
|
||||
#define BRIDGE_MAP_H
|
||||
|
||||
#include "direction_func.h"
|
||||
#include "rail_type.h"
|
||||
#include "transport_type.h"
|
||||
#include "road_map.h"
|
||||
#include "bridge.h"
|
||||
|
||||
|
@@ -9,9 +9,10 @@
|
||||
|
||||
/** @file build_vehicle_gui.cpp GUI for building vehicles. */
|
||||
|
||||
#include "stdafx.h"
|
||||
#include "engine_base.h"
|
||||
#include "engine_func.h"
|
||||
#include "train.h"
|
||||
#include "roadveh.h"
|
||||
#include "ship.h"
|
||||
#include "aircraft.h"
|
||||
#include "station_base.h"
|
||||
#include "articulated_vehicles.h"
|
||||
#include "textbuf_gui.h"
|
||||
@@ -25,7 +26,9 @@
|
||||
#include "window_func.h"
|
||||
#include "date_func.h"
|
||||
#include "vehicle_func.h"
|
||||
#include "gfx_func.h"
|
||||
#include "widgets/dropdown_func.h"
|
||||
#include "window_gui.h"
|
||||
#include "engine_gui.h"
|
||||
#include "cargotype.h"
|
||||
|
||||
@@ -479,7 +482,7 @@ static int DrawRailEnginePurchaseInfo(int left, int right, int y, EngineID engin
|
||||
y += FONT_HEIGHT_NORMAL;
|
||||
|
||||
/* Max tractive effort - not applicable if old acceleration or maglev */
|
||||
if (_settings_game.vehicle.train_acceleration_model != TAM_ORIGINAL && GetRailTypeInfo(rvi->railtype)->acceleration_type != 2) {
|
||||
if (_settings_game.vehicle.train_acceleration_model != TAM_ORIGINAL && rvi->railtype != RAILTYPE_MAGLEV) {
|
||||
SetDParam(0, e->GetDisplayMaxTractiveEffort());
|
||||
DrawString(left, right, y, STR_PURCHASE_INFO_MAX_TE);
|
||||
y += FONT_HEIGHT_NORMAL;
|
||||
@@ -1031,7 +1034,14 @@ struct BuildVehicleWindow : Window {
|
||||
case BUILD_VEHICLE_WIDGET_BUILD: {
|
||||
EngineID sel_eng = this->sel_engine;
|
||||
if (sel_eng != INVALID_ENGINE) {
|
||||
CommandCallback *callback = (this->vehicle_type == VEH_TRAIN && RailVehInfo(sel_eng)->railveh_type == RAILVEH_WAGON) ? CcBuildWagon : CcBuildPrimaryVehicle;
|
||||
CommandCallback *callback;
|
||||
switch (this->vehicle_type) {
|
||||
default: NOT_REACHED();
|
||||
case VEH_TRAIN: callback = (RailVehInfo(sel_eng)->railveh_type == RAILVEH_WAGON) ? CcBuildWagon : CcBuildLoco; break;
|
||||
case VEH_ROAD: callback = CcBuildRoadVeh; break;
|
||||
case VEH_SHIP: callback = CcBuildShip; break;
|
||||
case VEH_AIRCRAFT: callback = CcBuildAircraft; break;
|
||||
}
|
||||
DoCommandP(this->window_number, sel_eng, 0, GetCmdBuildVeh(this->vehicle_type), callback);
|
||||
}
|
||||
break;
|
||||
|
102
src/callback_table.cpp
Normal file
102
src/callback_table.cpp
Normal file
@@ -0,0 +1,102 @@
|
||||
/* $Id$ */
|
||||
|
||||
/*
|
||||
* This file is part of OpenTTD.
|
||||
* OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
|
||||
* OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
/** @file callback_table.cpp All command callbacks. */
|
||||
|
||||
#include "stdafx.h"
|
||||
#include "callback_table.h"
|
||||
#include "command_type.h"
|
||||
|
||||
/* If you add a callback for DoCommandP, also add the callback in here
|
||||
* see below for the full list!
|
||||
* If you don't do it, it won't work across the network!! */
|
||||
|
||||
/* aircraft_gui.cpp */
|
||||
CommandCallback CcBuildAircraft;
|
||||
|
||||
/* airport_gui.cpp */
|
||||
CommandCallback CcBuildAirport;
|
||||
|
||||
/* bridge_gui.cpp */
|
||||
CommandCallback CcBuildBridge;
|
||||
|
||||
/* dock_gui.cpp */
|
||||
CommandCallback CcBuildDocks;
|
||||
CommandCallback CcBuildCanal;
|
||||
|
||||
/* depot_gui.cpp */
|
||||
CommandCallback CcCloneVehicle;
|
||||
|
||||
/* main_gui.cpp */
|
||||
CommandCallback CcPlaySound10;
|
||||
CommandCallback CcPlaceSign;
|
||||
CommandCallback CcTerraform;
|
||||
CommandCallback CcGiveMoney;
|
||||
|
||||
/* rail_gui.cpp */
|
||||
CommandCallback CcPlaySound1E;
|
||||
CommandCallback CcRailDepot;
|
||||
CommandCallback CcStation;
|
||||
CommandCallback CcBuildRailTunnel;
|
||||
|
||||
/* road_gui.cpp */
|
||||
CommandCallback CcPlaySound1D;
|
||||
CommandCallback CcBuildRoadTunnel;
|
||||
CommandCallback CcRoadDepot;
|
||||
|
||||
/* roadveh_gui.cpp */
|
||||
CommandCallback CcBuildRoadVeh;
|
||||
|
||||
/* ship_gui.cpp */
|
||||
CommandCallback CcBuildShip;
|
||||
|
||||
/* train_gui.cpp */
|
||||
CommandCallback CcBuildWagon;
|
||||
CommandCallback CcBuildLoco;
|
||||
|
||||
/* town_gui.cpp */
|
||||
CommandCallback CcFoundTown;
|
||||
CommandCallback CcFoundRandomTown;
|
||||
|
||||
/* group_gui.cpp */
|
||||
CommandCallback CcCreateGroup;
|
||||
|
||||
/* ai/ai_core.cpp */
|
||||
CommandCallback CcAI;
|
||||
|
||||
CommandCallback * const _callback_table[] = {
|
||||
/* 0x00 */ NULL,
|
||||
/* 0x01 */ CcBuildAircraft,
|
||||
/* 0x02 */ CcBuildAirport,
|
||||
/* 0x03 */ CcBuildBridge,
|
||||
/* 0x04 */ CcBuildCanal,
|
||||
/* 0x05 */ CcBuildDocks,
|
||||
/* 0x06 */ CcBuildLoco,
|
||||
/* 0x07 */ CcBuildRoadVeh,
|
||||
/* 0x08 */ CcBuildShip,
|
||||
/* 0x09 */ CcFoundTown,
|
||||
/* 0x0A */ CcBuildRoadTunnel,
|
||||
/* 0x0B */ CcBuildRailTunnel,
|
||||
/* 0x0C */ CcBuildWagon,
|
||||
/* 0x0D */ CcRoadDepot,
|
||||
/* 0x0E */ CcRailDepot,
|
||||
/* 0x0F */ CcPlaceSign,
|
||||
/* 0x10 */ CcPlaySound10,
|
||||
/* 0x11 */ CcPlaySound1D,
|
||||
/* 0x12 */ CcPlaySound1E,
|
||||
/* 0x13 */ CcStation,
|
||||
/* 0x14 */ CcTerraform,
|
||||
/* 0x15 */ CcAI,
|
||||
/* 0x16 */ CcCloneVehicle,
|
||||
/* 0x17 */ CcGiveMoney,
|
||||
/* 0x18 */ CcCreateGroup,
|
||||
/* 0x19 */ CcFoundRandomTown,
|
||||
};
|
||||
|
||||
const int _callback_table_count = lengthof(_callback_table);
|
20
src/callback_table.h
Normal file
20
src/callback_table.h
Normal file
@@ -0,0 +1,20 @@
|
||||
/* $Id$ */
|
||||
|
||||
/*
|
||||
* This file is part of OpenTTD.
|
||||
* OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
|
||||
* OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
/** @file callback_table.h Table with all command callbacks. */
|
||||
|
||||
#ifndef CALLBACK_TABLE_H
|
||||
#define CALLBACK_TABLE_H
|
||||
|
||||
#include "command_type.h"
|
||||
|
||||
extern CommandCallback * const _callback_table[];
|
||||
extern const int _callback_table_count;
|
||||
|
||||
#endif /* CALLBACK_TABLE_H */
|
@@ -14,6 +14,7 @@
|
||||
|
||||
#include "core/pool_type.hpp"
|
||||
#include "economy_type.h"
|
||||
#include "tile_type.h"
|
||||
#include "station_type.h"
|
||||
#include "cargo_type.h"
|
||||
#include "vehicle_type.h"
|
||||
|
@@ -21,7 +21,6 @@
|
||||
#include "economy_func.h"
|
||||
#include "viewport_func.h"
|
||||
#include "water.h"
|
||||
#include "core/random_func.hpp"
|
||||
|
||||
#include "table/strings.h"
|
||||
#include "table/sprites.h"
|
||||
@@ -64,18 +63,13 @@ void DrawHillyLandTile(const TileInfo *ti)
|
||||
|
||||
void DrawClearLandFence(const TileInfo *ti)
|
||||
{
|
||||
bool fence_sw = GetFenceSW(ti->tile) != 0;
|
||||
bool fence_se = GetFenceSE(ti->tile) != 0;
|
||||
|
||||
if (!fence_sw && !fence_se) return;
|
||||
|
||||
int z = GetSlopeZInCorner(ti->tileh, CORNER_S);
|
||||
|
||||
if (fence_sw) {
|
||||
if (GetFenceSW(ti->tile) != 0) {
|
||||
DrawGroundSpriteAt(_clear_land_fence_sprites[GetFenceSW(ti->tile) - 1] + _fence_mod_by_tileh_sw[ti->tileh], PAL_NONE, 0, 0, z);
|
||||
}
|
||||
|
||||
if (fence_se) {
|
||||
if (GetFenceSE(ti->tile) != 0) {
|
||||
DrawGroundSpriteAt(_clear_land_fence_sprites[GetFenceSE(ti->tile) - 1] + _fence_mod_by_tileh_se[ti->tileh], PAL_NONE, 0, 0, z);
|
||||
}
|
||||
}
|
||||
|
@@ -310,14 +310,14 @@ static inline void MakeField(TileIndex t, uint field_type, IndustryID industry)
|
||||
* @param t the tile to make snowy
|
||||
* @pre GetClearGround(t) != CLEAR_SNOW
|
||||
*/
|
||||
static inline void MakeSnow(TileIndex t, uint density = 0)
|
||||
static inline void MakeSnow(TileIndex t)
|
||||
{
|
||||
assert(GetClearGround(t) != CLEAR_SNOW);
|
||||
SetBit(_m[t].m3, 4);
|
||||
if (GetClearGround(t) == CLEAR_FIELDS) {
|
||||
SetClearGroundDensity(t, CLEAR_GRASS, density);
|
||||
SetClearGroundDensity(t, CLEAR_GRASS, 0);
|
||||
} else {
|
||||
SetClearDensity(t, density);
|
||||
SetClearDensity(t, 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
464
src/command.cpp
464
src/command.cpp
@@ -31,163 +31,175 @@
|
||||
|
||||
StringID _error_message;
|
||||
|
||||
CommandProc CmdBuildRailroadTrack;
|
||||
CommandProc CmdRemoveRailroadTrack;
|
||||
CommandProc CmdBuildSingleRail;
|
||||
CommandProc CmdRemoveSingleRail;
|
||||
/**
|
||||
* Helper macro to define the header of all command handler macros.
|
||||
*
|
||||
* This macro create the function header for a given command handler function, as
|
||||
* all command handler functions got the parameters from the #CommandProc callback
|
||||
* type.
|
||||
*
|
||||
* @param yyyy The desired function name of the new command handler function.
|
||||
*/
|
||||
#define DEF_COMMAND(yyyy) CommandCost yyyy(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text)
|
||||
|
||||
CommandProc CmdLandscapeClear;
|
||||
DEF_COMMAND(CmdBuildRailroadTrack);
|
||||
DEF_COMMAND(CmdRemoveRailroadTrack);
|
||||
DEF_COMMAND(CmdBuildSingleRail);
|
||||
DEF_COMMAND(CmdRemoveSingleRail);
|
||||
|
||||
CommandProc CmdBuildBridge;
|
||||
DEF_COMMAND(CmdLandscapeClear);
|
||||
|
||||
CommandProc CmdBuildRailStation;
|
||||
CommandProc CmdRemoveFromRailStation;
|
||||
CommandProc CmdConvertRail;
|
||||
DEF_COMMAND(CmdBuildBridge);
|
||||
|
||||
CommandProc CmdBuildSingleSignal;
|
||||
CommandProc CmdRemoveSingleSignal;
|
||||
DEF_COMMAND(CmdBuildRailStation);
|
||||
DEF_COMMAND(CmdRemoveFromRailStation);
|
||||
DEF_COMMAND(CmdConvertRail);
|
||||
|
||||
CommandProc CmdTerraformLand;
|
||||
DEF_COMMAND(CmdBuildSingleSignal);
|
||||
DEF_COMMAND(CmdRemoveSingleSignal);
|
||||
|
||||
CommandProc CmdPurchaseLandArea;
|
||||
CommandProc CmdSellLandArea;
|
||||
DEF_COMMAND(CmdTerraformLand);
|
||||
|
||||
CommandProc CmdBuildTunnel;
|
||||
DEF_COMMAND(CmdPurchaseLandArea);
|
||||
DEF_COMMAND(CmdSellLandArea);
|
||||
|
||||
CommandProc CmdBuildTrainDepot;
|
||||
CommandProc CmdBuildRailWaypoint;
|
||||
CommandProc CmdRenameWaypoint;
|
||||
CommandProc CmdRemoveFromRailWaypoint;
|
||||
DEF_COMMAND(CmdBuildTunnel);
|
||||
|
||||
CommandProc CmdBuildRoadStop;
|
||||
CommandProc CmdRemoveRoadStop;
|
||||
DEF_COMMAND(CmdBuildTrainDepot);
|
||||
DEF_COMMAND(CmdBuildRailWaypoint);
|
||||
DEF_COMMAND(CmdRenameWaypoint);
|
||||
DEF_COMMAND(CmdRemoveFromRailWaypoint);
|
||||
|
||||
CommandProc CmdBuildLongRoad;
|
||||
CommandProc CmdRemoveLongRoad;
|
||||
CommandProc CmdBuildRoad;
|
||||
CommandProc CmdRemoveRoad;
|
||||
DEF_COMMAND(CmdBuildRoadStop);
|
||||
DEF_COMMAND(CmdRemoveRoadStop);
|
||||
|
||||
CommandProc CmdBuildRoadDepot;
|
||||
DEF_COMMAND(CmdBuildLongRoad);
|
||||
DEF_COMMAND(CmdRemoveLongRoad);
|
||||
DEF_COMMAND(CmdBuildRoad);
|
||||
DEF_COMMAND(CmdRemoveRoad);
|
||||
|
||||
CommandProc CmdBuildAirport;
|
||||
DEF_COMMAND(CmdBuildRoadDepot);
|
||||
|
||||
CommandProc CmdBuildDock;
|
||||
DEF_COMMAND(CmdBuildAirport);
|
||||
|
||||
CommandProc CmdBuildShipDepot;
|
||||
DEF_COMMAND(CmdBuildDock);
|
||||
|
||||
CommandProc CmdBuildBuoy;
|
||||
DEF_COMMAND(CmdBuildShipDepot);
|
||||
|
||||
CommandProc CmdPlantTree;
|
||||
DEF_COMMAND(CmdBuildBuoy);
|
||||
|
||||
CommandProc CmdBuildRailVehicle;
|
||||
CommandProc CmdMoveRailVehicle;
|
||||
DEF_COMMAND(CmdPlantTree);
|
||||
|
||||
CommandProc CmdSellRailWagon;
|
||||
DEF_COMMAND(CmdBuildRailVehicle);
|
||||
DEF_COMMAND(CmdMoveRailVehicle);
|
||||
|
||||
CommandProc CmdSendTrainToDepot;
|
||||
CommandProc CmdForceTrainProceed;
|
||||
CommandProc CmdReverseTrainDirection;
|
||||
DEF_COMMAND(CmdSellRailWagon);
|
||||
|
||||
CommandProc CmdModifyOrder;
|
||||
CommandProc CmdSkipToOrder;
|
||||
CommandProc CmdDeleteOrder;
|
||||
CommandProc CmdInsertOrder;
|
||||
CommandProc CmdChangeServiceInt;
|
||||
CommandProc CmdRestoreOrderIndex;
|
||||
DEF_COMMAND(CmdSendTrainToDepot);
|
||||
DEF_COMMAND(CmdForceTrainProceed);
|
||||
DEF_COMMAND(CmdReverseTrainDirection);
|
||||
|
||||
CommandProc CmdBuildIndustry;
|
||||
DEF_COMMAND(CmdModifyOrder);
|
||||
DEF_COMMAND(CmdSkipToOrder);
|
||||
DEF_COMMAND(CmdDeleteOrder);
|
||||
DEF_COMMAND(CmdInsertOrder);
|
||||
DEF_COMMAND(CmdChangeServiceInt);
|
||||
DEF_COMMAND(CmdRestoreOrderIndex);
|
||||
|
||||
CommandProc CmdBuildCompanyHQ;
|
||||
CommandProc CmdSetCompanyManagerFace;
|
||||
CommandProc CmdSetCompanyColour;
|
||||
DEF_COMMAND(CmdBuildIndustry);
|
||||
|
||||
CommandProc CmdIncreaseLoan;
|
||||
CommandProc CmdDecreaseLoan;
|
||||
DEF_COMMAND(CmdBuildCompanyHQ);
|
||||
DEF_COMMAND(CmdSetCompanyManagerFace);
|
||||
DEF_COMMAND(CmdSetCompanyColour);
|
||||
|
||||
CommandProc CmdWantEnginePreview;
|
||||
DEF_COMMAND(CmdIncreaseLoan);
|
||||
DEF_COMMAND(CmdDecreaseLoan);
|
||||
|
||||
CommandProc CmdRenameVehicle;
|
||||
CommandProc CmdRenameEngine;
|
||||
DEF_COMMAND(CmdWantEnginePreview);
|
||||
|
||||
CommandProc CmdRenameCompany;
|
||||
CommandProc CmdRenamePresident;
|
||||
DEF_COMMAND(CmdRenameVehicle);
|
||||
DEF_COMMAND(CmdRenameEngine);
|
||||
|
||||
CommandProc CmdRenameStation;
|
||||
DEF_COMMAND(CmdRenameCompany);
|
||||
DEF_COMMAND(CmdRenamePresident);
|
||||
|
||||
CommandProc CmdSellAircraft;
|
||||
CommandProc CmdBuildAircraft;
|
||||
CommandProc CmdSendAircraftToHangar;
|
||||
CommandProc CmdRefitAircraft;
|
||||
DEF_COMMAND(CmdRenameStation);
|
||||
|
||||
CommandProc CmdPlaceSign;
|
||||
CommandProc CmdRenameSign;
|
||||
DEF_COMMAND(CmdSellAircraft);
|
||||
DEF_COMMAND(CmdBuildAircraft);
|
||||
DEF_COMMAND(CmdSendAircraftToHangar);
|
||||
DEF_COMMAND(CmdRefitAircraft);
|
||||
|
||||
CommandProc CmdBuildRoadVeh;
|
||||
CommandProc CmdSellRoadVeh;
|
||||
CommandProc CmdSendRoadVehToDepot;
|
||||
CommandProc CmdTurnRoadVeh;
|
||||
CommandProc CmdRefitRoadVeh;
|
||||
DEF_COMMAND(CmdPlaceSign);
|
||||
DEF_COMMAND(CmdRenameSign);
|
||||
|
||||
CommandProc CmdPause;
|
||||
DEF_COMMAND(CmdBuildRoadVeh);
|
||||
DEF_COMMAND(CmdSellRoadVeh);
|
||||
DEF_COMMAND(CmdSendRoadVehToDepot);
|
||||
DEF_COMMAND(CmdTurnRoadVeh);
|
||||
DEF_COMMAND(CmdRefitRoadVeh);
|
||||
|
||||
CommandProc CmdBuyShareInCompany;
|
||||
CommandProc CmdSellShareInCompany;
|
||||
CommandProc CmdBuyCompany;
|
||||
DEF_COMMAND(CmdPause);
|
||||
|
||||
CommandProc CmdFoundTown;
|
||||
DEF_COMMAND(CmdBuyShareInCompany);
|
||||
DEF_COMMAND(CmdSellShareInCompany);
|
||||
DEF_COMMAND(CmdBuyCompany);
|
||||
|
||||
CommandProc CmdRenameTown;
|
||||
CommandProc CmdDoTownAction;
|
||||
DEF_COMMAND(CmdFoundTown);
|
||||
|
||||
CommandProc CmdChangeSetting;
|
||||
CommandProc CmdChangeCompanySetting;
|
||||
DEF_COMMAND(CmdRenameTown);
|
||||
DEF_COMMAND(CmdDoTownAction);
|
||||
|
||||
CommandProc CmdSellShip;
|
||||
CommandProc CmdBuildShip;
|
||||
CommandProc CmdSendShipToDepot;
|
||||
CommandProc CmdRefitShip;
|
||||
DEF_COMMAND(CmdChangeSetting);
|
||||
DEF_COMMAND(CmdChangeCompanySetting);
|
||||
|
||||
CommandProc CmdOrderRefit;
|
||||
CommandProc CmdCloneOrder;
|
||||
DEF_COMMAND(CmdSellShip);
|
||||
DEF_COMMAND(CmdBuildShip);
|
||||
DEF_COMMAND(CmdSendShipToDepot);
|
||||
DEF_COMMAND(CmdRefitShip);
|
||||
|
||||
CommandProc CmdClearArea;
|
||||
DEF_COMMAND(CmdOrderRefit);
|
||||
DEF_COMMAND(CmdCloneOrder);
|
||||
|
||||
CommandProc CmdGiveMoney;
|
||||
CommandProc CmdMoneyCheat;
|
||||
CommandProc CmdBuildCanal;
|
||||
CommandProc CmdBuildLock;
|
||||
DEF_COMMAND(CmdClearArea);
|
||||
|
||||
CommandProc CmdCompanyCtrl;
|
||||
DEF_COMMAND(CmdGiveMoney);
|
||||
DEF_COMMAND(CmdMoneyCheat);
|
||||
DEF_COMMAND(CmdBuildCanal);
|
||||
DEF_COMMAND(CmdBuildLock);
|
||||
|
||||
CommandProc CmdLevelLand;
|
||||
DEF_COMMAND(CmdCompanyCtrl);
|
||||
|
||||
CommandProc CmdRefitRailVehicle;
|
||||
DEF_COMMAND(CmdLevelLand);
|
||||
|
||||
CommandProc CmdBuildSignalTrack;
|
||||
CommandProc CmdRemoveSignalTrack;
|
||||
DEF_COMMAND(CmdRefitRailVehicle);
|
||||
|
||||
CommandProc CmdSetAutoReplace;
|
||||
DEF_COMMAND(CmdBuildSignalTrack);
|
||||
DEF_COMMAND(CmdRemoveSignalTrack);
|
||||
|
||||
CommandProc CmdCloneVehicle;
|
||||
CommandProc CmdStartStopVehicle;
|
||||
CommandProc CmdMassStartStopVehicle;
|
||||
CommandProc CmdAutoreplaceVehicle;
|
||||
CommandProc CmdDepotSellAllVehicles;
|
||||
CommandProc CmdDepotMassAutoReplace;
|
||||
DEF_COMMAND(CmdSetAutoReplace);
|
||||
|
||||
CommandProc CmdCreateGroup;
|
||||
CommandProc CmdRenameGroup;
|
||||
CommandProc CmdDeleteGroup;
|
||||
CommandProc CmdAddVehicleGroup;
|
||||
CommandProc CmdAddSharedVehicleGroup;
|
||||
CommandProc CmdRemoveAllVehiclesGroup;
|
||||
CommandProc CmdSetGroupReplaceProtection;
|
||||
DEF_COMMAND(CmdCloneVehicle);
|
||||
DEF_COMMAND(CmdStartStopVehicle);
|
||||
DEF_COMMAND(CmdMassStartStopVehicle);
|
||||
DEF_COMMAND(CmdAutoreplaceVehicle);
|
||||
DEF_COMMAND(CmdDepotSellAllVehicles);
|
||||
DEF_COMMAND(CmdDepotMassAutoReplace);
|
||||
|
||||
CommandProc CmdMoveOrder;
|
||||
CommandProc CmdChangeTimetable;
|
||||
CommandProc CmdSetVehicleOnTime;
|
||||
CommandProc CmdAutofillTimetable;
|
||||
CommandProc CmdSetTimetableStart;
|
||||
DEF_COMMAND(CmdCreateGroup);
|
||||
DEF_COMMAND(CmdRenameGroup);
|
||||
DEF_COMMAND(CmdDeleteGroup);
|
||||
DEF_COMMAND(CmdAddVehicleGroup);
|
||||
DEF_COMMAND(CmdAddSharedVehicleGroup);
|
||||
DEF_COMMAND(CmdRemoveAllVehiclesGroup);
|
||||
DEF_COMMAND(CmdSetGroupReplaceProtection);
|
||||
|
||||
DEF_COMMAND(CmdMoveOrder);
|
||||
DEF_COMMAND(CmdChangeTimetable);
|
||||
DEF_COMMAND(CmdSetVehicleOnTime);
|
||||
DEF_COMMAND(CmdAutofillTimetable);
|
||||
DEF_COMMAND(CmdSetTimetableStart);
|
||||
#undef DEF_COMMAND
|
||||
|
||||
/**
|
||||
* The master command table
|
||||
@@ -411,13 +423,15 @@ CommandCost DoCommand(TileIndex tile, uint32 p1, uint32 p2, DoCommandFlag flags,
|
||||
SetTownRatingTestMode(true);
|
||||
res = proc(tile, flags & ~DC_EXEC, p1, p2, text);
|
||||
SetTownRatingTestMode(false);
|
||||
if (res.Failed()) {
|
||||
if (CmdFailed(res)) {
|
||||
res.SetGlobalErrorMessage();
|
||||
goto error;
|
||||
}
|
||||
|
||||
if (_docommand_recursive == 1 &&
|
||||
!(flags & DC_QUERY_COST) &&
|
||||
!(flags & DC_BANKRUPT) &&
|
||||
res.GetCost() != 0 &&
|
||||
!CheckCompanyHasMoney(res)) {
|
||||
goto error;
|
||||
}
|
||||
@@ -431,9 +445,9 @@ CommandCost DoCommand(TileIndex tile, uint32 p1, uint32 p2, DoCommandFlag flags,
|
||||
/* Execute the command here. All cost-relevant functions set the expenses type
|
||||
* themselves to the cost object at some point */
|
||||
res = proc(tile, flags, p1, p2, text);
|
||||
if (res.Failed()) {
|
||||
error:
|
||||
if (CmdFailed(res)) {
|
||||
res.SetGlobalErrorMessage();
|
||||
error:
|
||||
_docommand_recursive--;
|
||||
return CMD_ERROR;
|
||||
}
|
||||
@@ -488,90 +502,23 @@ bool DoCommandP(const CommandContainer *container, bool my_cmd)
|
||||
*/
|
||||
bool DoCommandP(TileIndex tile, uint32 p1, uint32 p2, uint32 cmd, CommandCallback *callback, const char *text, bool my_cmd)
|
||||
{
|
||||
/* Cost estimation is generally only done when the
|
||||
* local user presses shift while doing somthing.
|
||||
* However, in case of incoming network commands,
|
||||
* map generation of the pause button we do want
|
||||
* to execute. */
|
||||
bool estimate_only = _shift_pressed && IsLocalCompany() &&
|
||||
!IsGeneratingWorld() &&
|
||||
!(cmd & CMD_NETWORK_COMMAND) &&
|
||||
(cmd & CMD_ID_MASK) != CMD_PAUSE;
|
||||
assert(_docommand_recursive == 0);
|
||||
|
||||
/* We're only sending the command, so don't do
|
||||
* fancy things for 'success'. */
|
||||
bool only_sending = _networking && !(cmd & CMD_NETWORK_COMMAND);
|
||||
CommandCost res, res2;
|
||||
|
||||
/* Where to show the message? */
|
||||
int x = TileX(tile) * TILE_SIZE;
|
||||
int y = TileY(tile) * TILE_SIZE;
|
||||
|
||||
CommandCost res = DoCommandPInternal(tile, p1, p2, cmd, callback, text, my_cmd, estimate_only);
|
||||
if (res.Failed()) {
|
||||
res.SetGlobalErrorMessage();
|
||||
|
||||
/* Only show the error when it's for us. */
|
||||
StringID error_part1 = GB(cmd, 16, 16);
|
||||
if (estimate_only || (IsLocalCompany() && error_part1 != 0 && my_cmd)) {
|
||||
ShowErrorMessage(error_part1, _error_message, x, y);
|
||||
}
|
||||
} else if (estimate_only) {
|
||||
ShowEstimatedCostOrIncome(res.GetCost(), x, y);
|
||||
} else if (!only_sending && res.GetCost() != 0 && tile != 0 && IsLocalCompany() && _game_mode != GM_EDITOR) {
|
||||
/* Only show the cost animation when we did actually
|
||||
* execute the command, i.e. we're not sending it to
|
||||
* the server, when it has cost the local company
|
||||
* something. Furthermore in the editor there is no
|
||||
* concept of cost, so don't show it there either. */
|
||||
ShowCostOrIncomeAnimation(x, y, GetSlopeZ(x, y), res.GetCost());
|
||||
}
|
||||
|
||||
if (!estimate_only && !only_sending && callback != NULL) {
|
||||
callback(res, tile, p1, p2);
|
||||
}
|
||||
|
||||
return res.Succeeded();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Helper to deduplicate the code for returning.
|
||||
* @param cmd the command cost to return.
|
||||
* @param clear whether to keep the storage changes or not.
|
||||
*/
|
||||
#define return_dcpi(cmd, clear) { _docommand_recursive = 0; ClearStorageChanges(clear); return cmd; }
|
||||
|
||||
/*!
|
||||
* Helper function for the toplevel network safe docommand function for the current company.
|
||||
*
|
||||
* @param tile The tile to perform a command on (see #CommandProc)
|
||||
* @param p1 Additional data for the command (see #CommandProc)
|
||||
* @param p2 Additional data for the command (see #CommandProc)
|
||||
* @param cmd The command to execute (a CMD_* value)
|
||||
* @param callback A callback function to call after the command is finished
|
||||
* @param text The text to pass
|
||||
* @param my_cmd indicator if the command is from a company or server (to display error messages for a user)
|
||||
* @param estimate_only whether to give only the estimate or also execute the command
|
||||
* @return the command cost of this function.
|
||||
*/
|
||||
CommandCost DoCommandPInternal(TileIndex tile, uint32 p1, uint32 p2, uint32 cmd, CommandCallback *callback, const char *text, bool my_cmd, bool estimate_only)
|
||||
{
|
||||
/* Prevent recursion; it gives a mess over the network */
|
||||
assert(_docommand_recursive == 0);
|
||||
_docommand_recursive = 1;
|
||||
|
||||
/* Reset the state. */
|
||||
_error_message = INVALID_STRING_ID;
|
||||
StringID error_part1 = GB(cmd, 16, 16);
|
||||
_additional_cash_required = 0;
|
||||
|
||||
/* Get pointer to command handler */
|
||||
/* get pointer to command handler */
|
||||
byte cmd_id = cmd & CMD_ID_MASK;
|
||||
assert(cmd_id < lengthof(_command_proc_table));
|
||||
|
||||
CommandProc *proc = _command_proc_table[cmd_id].proc;
|
||||
/* Shouldn't happen, but you never know when someone adds
|
||||
* NULLs to the _command_proc_table. */
|
||||
assert(proc != NULL);
|
||||
if (proc == NULL) return false;
|
||||
|
||||
/* Command flags are used internally */
|
||||
uint cmd_flags = GetCommandFlags(cmd);
|
||||
@@ -579,7 +526,7 @@ CommandCost DoCommandPInternal(TileIndex tile, uint32 p1, uint32 p2, uint32 cmd,
|
||||
DoCommandFlag flags = CommandFlagsToDCFlags(cmd_flags);
|
||||
|
||||
/* Do not even think about executing out-of-bounds tile-commands */
|
||||
if (tile != 0 && (tile >= MapSize() || (!IsValidTile(tile) && (cmd_flags & CMD_ALL_TILES) == 0))) return_dcpi(CMD_ERROR, false);
|
||||
if (tile != 0 && (tile >= MapSize() || (!IsValidTile(tile) && (cmd_flags & CMD_ALL_TILES) == 0))) return false;
|
||||
|
||||
/* Always execute server and spectator commands as spectator */
|
||||
if (cmd_flags & (CMD_SPECTATOR | CMD_SERVER)) _current_company = COMPANY_SPECTATOR;
|
||||
@@ -590,41 +537,49 @@ CommandCost DoCommandPInternal(TileIndex tile, uint32 p1, uint32 p2, uint32 cmd,
|
||||
* The server will ditch any server commands a client sends to it, so effectively
|
||||
* this guards the server from executing functions for an invalid company. */
|
||||
if (_game_mode == GM_NORMAL && (cmd_flags & (CMD_SPECTATOR | CMD_SERVER)) == 0 && !Company::IsValidID(_current_company)) {
|
||||
return_dcpi(CMD_ERROR, false);
|
||||
if (my_cmd) ShowErrorMessage(error_part1, _error_message, x, y);
|
||||
return false;
|
||||
}
|
||||
|
||||
bool test_and_exec_can_differ = (cmd_flags & CMD_NO_TEST) != 0;
|
||||
bool skip_test = _networking && (cmd & CMD_NO_TEST_IF_IN_NETWORK) != 0;
|
||||
bool notest = (cmd_flags & CMD_NO_TEST) != 0;
|
||||
|
||||
/* Do we need to do a test run?
|
||||
* Basically we need to always do this, except when
|
||||
* the no-test-in-network flag is giving and we're
|
||||
* in a network game (e.g. restoring orders would
|
||||
* fail this test because the first order does not
|
||||
* exist yet when inserting the second, giving that
|
||||
* a wrong insert location and ignoring the command
|
||||
* and thus breaking restoring). However, when we
|
||||
* just want to do cost estimation we don't care
|
||||
* because it's only done once anyway. */
|
||||
CommandCost res;
|
||||
if (estimate_only || !skip_test) {
|
||||
/* Test the command. */
|
||||
_docommand_recursive = 1;
|
||||
|
||||
/* cost estimation only? */
|
||||
if (!IsGeneratingWorld() &&
|
||||
_shift_pressed &&
|
||||
IsLocalCompany() &&
|
||||
!(cmd & CMD_NETWORK_COMMAND) &&
|
||||
cmd_id != CMD_PAUSE) {
|
||||
/* estimate the cost. */
|
||||
SetTownRatingTestMode(true);
|
||||
res = proc(tile, flags, p1, p2, text);
|
||||
SetTownRatingTestMode(false);
|
||||
|
||||
/* Make sure we're not messing things up here. */
|
||||
assert(cmd_id == CMD_COMPANY_CTRL || old_company == _current_company);
|
||||
|
||||
/* If the command fails, we're doing an estimate
|
||||
* or the player does not have enough money
|
||||
* (unless it's a command where the test and
|
||||
* execution phase might return different costs)
|
||||
* we bail out here. */
|
||||
if (res.Failed() || estimate_only ||
|
||||
(!test_and_exec_can_differ && !CheckCompanyHasMoney(res))) {
|
||||
return_dcpi(res, false);
|
||||
if (CmdFailed(res)) {
|
||||
res.SetGlobalErrorMessage();
|
||||
ShowErrorMessage(error_part1, _error_message, x, y);
|
||||
} else {
|
||||
ShowEstimatedCostOrIncome(res.GetCost(), x, y);
|
||||
}
|
||||
|
||||
_docommand_recursive = 0;
|
||||
ClearStorageChanges(false);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
if (!((cmd & CMD_NO_TEST_IF_IN_NETWORK) && _networking)) {
|
||||
/* first test if the command can be executed. */
|
||||
SetTownRatingTestMode(true);
|
||||
res = proc(tile, flags, p1, p2, text);
|
||||
SetTownRatingTestMode(false);
|
||||
assert(cmd_id == CMD_COMPANY_CTRL || old_company == _current_company);
|
||||
if (CmdFailed(res)) {
|
||||
res.SetGlobalErrorMessage();
|
||||
goto show_error;
|
||||
}
|
||||
/* no money? Only check if notest is off */
|
||||
if (!notest && res.GetCost() != 0 && !CheckCompanyHasMoney(res)) goto show_error;
|
||||
}
|
||||
|
||||
#ifdef ENABLE_NETWORK
|
||||
@@ -633,55 +588,70 @@ CommandCost DoCommandPInternal(TileIndex tile, uint32 p1, uint32 p2, uint32 cmd,
|
||||
* send it to the command-queue and abort execution
|
||||
*/
|
||||
if (_networking && !(cmd & CMD_NETWORK_COMMAND)) {
|
||||
NetworkSend_Command(tile, p1, p2, cmd & ~CMD_FLAGS_MASK, callback, text, _current_company);
|
||||
|
||||
/* Don't return anything special here; no error, no costs.
|
||||
* This way it's not handled by DoCommand and only the
|
||||
* actual execution of the command causes messages. Also
|
||||
* reset the storages as we've not executed the command. */
|
||||
return_dcpi(CommandCost(), false);
|
||||
NetworkSend_Command(tile, p1, p2, cmd & ~CMD_FLAGS_MASK, callback, text);
|
||||
_docommand_recursive = 0;
|
||||
ClearStorageChanges(false);
|
||||
return true;
|
||||
}
|
||||
#endif /* ENABLE_NETWORK */
|
||||
DEBUG(desync, 1, "cmd: %08x; %08x; %1x; %06x; %08x; %08x; %04x; %s\n", _date, _date_fract, (int)_current_company, tile, p1, p2, cmd & ~CMD_NETWORK_COMMAND, text);
|
||||
|
||||
/* Actually try and execute the command. If no cost-type is given
|
||||
* use the construction one */
|
||||
CommandCost res2 = proc(tile, flags | DC_EXEC, p1, p2, text);
|
||||
|
||||
/* Make sure nothing bad happened, like changing the current company. */
|
||||
assert(cmd_id == CMD_COMPANY_CTRL || old_company == _current_company);
|
||||
|
||||
/* If the test and execution can differ, or we skipped the test
|
||||
* we have to check the return of the command. Otherwise we can
|
||||
* check whether the test and execution have yielded the same
|
||||
* result, i.e. cost and error state are the same. */
|
||||
if (!test_and_exec_can_differ && !skip_test) {
|
||||
assert(res.GetCost() == res2.GetCost() && res.Failed() == res2.Failed()); // sanity check
|
||||
} else if (res2.Failed()) {
|
||||
return_dcpi(res2, false);
|
||||
}
|
||||
|
||||
/* If we're needing more money and we haven't done
|
||||
* anything yet, ask for the money! */
|
||||
if (_additional_cash_required != 0 && res2.GetCost() == 0) {
|
||||
SetDParam(0, _additional_cash_required);
|
||||
return_dcpi(CommandCost(STR_ERROR_NOT_ENOUGH_CASH_REQUIRES_CURRENCY), false);
|
||||
}
|
||||
|
||||
/* update last build coordinate of company. */
|
||||
if (tile != 0) {
|
||||
Company *c = Company::GetIfValid(_current_company);
|
||||
if (c != NULL) c->last_build_coordinate = tile;
|
||||
}
|
||||
|
||||
/* Actually try and execute the command. If no cost-type is given
|
||||
* use the construction one */
|
||||
res2 = proc(tile, flags | DC_EXEC, p1, p2, text);
|
||||
|
||||
assert(cmd_id == CMD_COMPANY_CTRL || old_company == _current_company);
|
||||
|
||||
/* If notest is on, it means the result of the test can be different than
|
||||
* the real command.. so ignore the test */
|
||||
if (!notest && !((cmd & CMD_NO_TEST_IF_IN_NETWORK) && _networking)) {
|
||||
assert(res.GetCost() == res2.GetCost() && CmdFailed(res) == CmdFailed(res2)); // sanity check
|
||||
} else {
|
||||
if (CmdFailed(res2)) {
|
||||
res2.SetGlobalErrorMessage();
|
||||
goto show_error;
|
||||
}
|
||||
}
|
||||
|
||||
SubtractMoneyFromCompany(res2);
|
||||
|
||||
/* update signals if needed */
|
||||
UpdateSignalsInBuffer();
|
||||
|
||||
return_dcpi(res2, true);
|
||||
if (IsLocalCompany() && _game_mode != GM_EDITOR) {
|
||||
if (res2.GetCost() != 0 && tile != 0) ShowCostOrIncomeAnimation(x, y, GetSlopeZ(x, y), res2.GetCost());
|
||||
if (_additional_cash_required != 0) {
|
||||
SetDParam(0, _additional_cash_required);
|
||||
if (my_cmd) ShowErrorMessage(error_part1, STR_ERROR_NOT_ENOUGH_CASH_REQUIRES_CURRENCY, x, y);
|
||||
if (res2.GetCost() == 0) goto callb_err;
|
||||
}
|
||||
}
|
||||
|
||||
_docommand_recursive = 0;
|
||||
|
||||
if (callback) callback(true, tile, p1, p2);
|
||||
ClearStorageChanges(true);
|
||||
return true;
|
||||
|
||||
show_error:
|
||||
/* show error message if the command fails? */
|
||||
if (IsLocalCompany() && error_part1 != 0 && my_cmd) {
|
||||
ShowErrorMessage(error_part1, _error_message, x, y);
|
||||
}
|
||||
|
||||
callb_err:
|
||||
_docommand_recursive = 0;
|
||||
|
||||
if (callback) callback(false, tile, p1, p2);
|
||||
ClearStorageChanges(false);
|
||||
return false;
|
||||
}
|
||||
#undef return_dcpi
|
||||
|
||||
|
||||
CommandCost CommandCost::AddCost(CommandCost ret)
|
||||
|
@@ -13,7 +13,30 @@
|
||||
#define COMMAND_FUNC_H
|
||||
|
||||
#include "command_type.h"
|
||||
#include "company_type.h"
|
||||
|
||||
/**
|
||||
* Checks if a command failes.
|
||||
*
|
||||
* As you see the parameter is not a command but the return value of a command,
|
||||
* the CommandCost class. This function checks if the command executed by
|
||||
* the CommandProc function failed and returns true if it does.
|
||||
*
|
||||
* @param cost The return value of a CommandProc call
|
||||
* @return true if the command failes
|
||||
* @see CmdSucceded
|
||||
*/
|
||||
static inline bool CmdFailed(CommandCost cost) { return cost.Failed(); }
|
||||
|
||||
/**
|
||||
* Checks if a command succeeded.
|
||||
*
|
||||
* As #CmdFailed this function checks if a command succeeded
|
||||
*
|
||||
* @param cost The return value of a CommandProc call
|
||||
* @return true if the command succeeded
|
||||
* @see CmdSucceeded
|
||||
*/
|
||||
static inline bool CmdSucceeded(CommandCost cost) { return cost.Succeeded(); }
|
||||
|
||||
/**
|
||||
* Define a default return value for a failed command.
|
||||
@@ -46,14 +69,12 @@ CommandCost DoCommand(const CommandContainer *container, DoCommandFlag flags);
|
||||
bool DoCommandP(TileIndex tile, uint32 p1, uint32 p2, uint32 cmd, CommandCallback *callback = NULL, const char *text = NULL, bool my_cmd = true);
|
||||
bool DoCommandP(const CommandContainer *container, bool my_cmd = true);
|
||||
|
||||
/** Internal helper function for DoCommandP. Do not use. */
|
||||
CommandCost DoCommandPInternal(TileIndex tile, uint32 p1, uint32 p2, uint32 cmd, CommandCallback *callback, const char *text, bool my_cmd, bool estimate_only);
|
||||
|
||||
#ifdef ENABLE_NETWORK
|
||||
|
||||
/**
|
||||
* Send a command over the network
|
||||
*/
|
||||
void NetworkSend_Command(TileIndex tile, uint32 p1, uint32 p2, uint32 cmd, CommandCallback *callback, const char *text, CompanyID company);
|
||||
void NetworkSend_Command(TileIndex tile, uint32 p1, uint32 p2, uint32 cmd, CommandCallback *callback, const char *text);
|
||||
#endif /* ENABLE_NETWORK */
|
||||
|
||||
extern Money _additional_cash_required;
|
||||
@@ -86,52 +107,4 @@ static inline DoCommandFlag CommandFlagsToDCFlags(uint cmd_flags)
|
||||
return flags;
|
||||
}
|
||||
|
||||
/*** All command callbacks that exist ***/
|
||||
|
||||
/* ai/ai_core.cpp */
|
||||
CommandCallback CcAI;
|
||||
|
||||
/* airport_gui.cpp */
|
||||
CommandCallback CcBuildAirport;
|
||||
|
||||
/* bridge_gui.cpp */
|
||||
CommandCallback CcBuildBridge;
|
||||
|
||||
/* dock_gui.cpp */
|
||||
CommandCallback CcBuildDocks;
|
||||
CommandCallback CcBuildCanal;
|
||||
|
||||
/* depot_gui.cpp */
|
||||
CommandCallback CcCloneVehicle;
|
||||
|
||||
/* group_gui.cpp */
|
||||
CommandCallback CcCreateGroup;
|
||||
|
||||
/* main_gui.cpp */
|
||||
CommandCallback CcPlaySound10;
|
||||
CommandCallback CcPlaceSign;
|
||||
CommandCallback CcTerraform;
|
||||
CommandCallback CcGiveMoney;
|
||||
|
||||
/* rail_gui.cpp */
|
||||
CommandCallback CcPlaySound1E;
|
||||
CommandCallback CcRailDepot;
|
||||
CommandCallback CcStation;
|
||||
CommandCallback CcBuildRailTunnel;
|
||||
|
||||
/* road_gui.cpp */
|
||||
CommandCallback CcPlaySound1D;
|
||||
CommandCallback CcBuildRoadTunnel;
|
||||
CommandCallback CcRoadDepot;
|
||||
|
||||
/* train_gui.cpp */
|
||||
CommandCallback CcBuildWagon;
|
||||
|
||||
/* town_gui.cpp */
|
||||
CommandCallback CcFoundTown;
|
||||
CommandCallback CcFoundRandomTown;
|
||||
|
||||
/* vehicle_gui.cpp */
|
||||
CommandCallback CcBuildPrimaryVehicle;
|
||||
|
||||
#endif /* COMMAND_FUNC_H */
|
||||
|
@@ -107,17 +107,6 @@ public:
|
||||
if (this->message != INVALID_STRING_ID) _error_message = this->message;
|
||||
}
|
||||
|
||||
/**
|
||||
* Makes this CommandCost behave like an error command.
|
||||
* @param mesasge the error message.
|
||||
*/
|
||||
void MakeError(StringID message)
|
||||
{
|
||||
assert(message != INVALID_STRING_ID);
|
||||
this->success = false;
|
||||
this->message = message;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the error message of a command
|
||||
* @return the error message, if succeeded INVALID_STRING_ID
|
||||
@@ -403,13 +392,13 @@ struct Command {
|
||||
* are from the #CommandProc callback type. The boolean parameter indicates if the
|
||||
* command succeeded or failed.
|
||||
*
|
||||
* @param result The result of the executed command
|
||||
* @param success If the command succeeded or not.
|
||||
* @param tile The tile of the command action
|
||||
* @param p1 Additional data of the command
|
||||
* @param p1 Additional data of the command
|
||||
* @see CommandProc
|
||||
*/
|
||||
typedef void CommandCallback(const CommandCost &result, TileIndex tile, uint32 p1, uint32 p2);
|
||||
typedef void CommandCallback(bool success, TileIndex tile, uint32 p1, uint32 p2);
|
||||
|
||||
/**
|
||||
* Structure for buffering the build command when selecting a station to join.
|
||||
|
@@ -12,9 +12,12 @@
|
||||
#ifndef COMPANY_BASE_H
|
||||
#define COMPANY_BASE_H
|
||||
|
||||
#include "company_type.h"
|
||||
#include "core/pool_type.hpp"
|
||||
#include "road_type.h"
|
||||
#include "rail_type.h"
|
||||
#include "date_type.h"
|
||||
#include "engine_type.h"
|
||||
#include "livery.h"
|
||||
#include "autoreplace_type.h"
|
||||
#include "economy_type.h"
|
||||
|
@@ -34,7 +34,6 @@
|
||||
#include "settings_func.h"
|
||||
#include "vehicle_base.h"
|
||||
#include "vehicle_func.h"
|
||||
#include "sprite.h"
|
||||
|
||||
#include "table/strings.h"
|
||||
|
||||
@@ -157,13 +156,13 @@ void InvalidateCompanyWindows(const Company *company)
|
||||
SetWindowDirty(WC_FINANCES, cid);
|
||||
}
|
||||
|
||||
bool CheckCompanyHasMoney(CommandCost &cost)
|
||||
bool CheckCompanyHasMoney(CommandCost cost)
|
||||
{
|
||||
if (cost.GetCost() > 0) {
|
||||
const Company *c = Company::GetIfValid(_current_company);
|
||||
if (c != NULL && cost.GetCost() > c->money) {
|
||||
SetDParam(0, cost.GetCost());
|
||||
cost.MakeError(STR_ERROR_NOT_ENOUGH_CASH_REQUIRES_CURRENCY);
|
||||
_error_message = STR_ERROR_NOT_ENOUGH_CASH_REQUIRES_CURRENCY;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -791,6 +790,7 @@ CommandCost CmdCompanyCtrl(TileIndex tile, DoCommandFlag flags, uint32 p1, uint3
|
||||
NetworkUpdateClientInfo(ci->client_id);
|
||||
|
||||
if (Company::IsValidID(ci->client_playas)) {
|
||||
CompanyID company_backup = _local_company;
|
||||
_network_company_states[c->index].months_empty = 0;
|
||||
_network_company_states[c->index].password[0] = '\0';
|
||||
NetworkServerUpdateCompanyPassworded(ci->client_playas, false);
|
||||
@@ -806,7 +806,9 @@ CommandCost CmdCompanyCtrl(TileIndex tile, DoCommandFlag flags, uint32 p1, uint3
|
||||
* TODO: Perhaps this could be improved by when the client is ready
|
||||
* with joining to let it send itself the command, and not the server?
|
||||
* For example in network_client.c:534? */
|
||||
NetworkSend_Command(0, 0, 0, CMD_RENAME_PRESIDENT, NULL, ci->client_name, ci->client_playas);
|
||||
_local_company = ci->client_playas;
|
||||
NetworkSend_Command(0, 0, 0, CMD_RENAME_PRESIDENT, NULL, ci->client_name);
|
||||
_local_company = company_backup;
|
||||
}
|
||||
|
||||
/* Announce new company on network, if the client was a SPECTATOR before */
|
||||
|
@@ -12,8 +12,10 @@
|
||||
#ifndef COMPANY_FUNC_H
|
||||
#define COMPANY_FUNC_H
|
||||
|
||||
#include "core/math_func.hpp"
|
||||
#include "company_type.h"
|
||||
#include "tile_type.h"
|
||||
#include "strings_type.h"
|
||||
#include "gfx_type.h"
|
||||
|
||||
void ChangeOwnershipOfCompanyItems(Owner old_owner, Owner new_owner);
|
||||
|
@@ -14,6 +14,7 @@
|
||||
#include "window_gui.h"
|
||||
#include "textbuf_gui.h"
|
||||
#include "viewport_func.h"
|
||||
#include "gfx_func.h"
|
||||
#include "company_func.h"
|
||||
#include "command_func.h"
|
||||
#include "network/network.h"
|
||||
@@ -27,9 +28,6 @@
|
||||
#include "date_func.h"
|
||||
#include "widgets/dropdown_type.h"
|
||||
#include "tilehighlight_func.h"
|
||||
#include "sprite.h"
|
||||
#include "company_base.h"
|
||||
#include "core/geometry_func.hpp"
|
||||
|
||||
#include "table/strings.h"
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user