Commit Graph

88 Commits (ea73b466844a048f9f55b933f243ec19bdaaa18c)

Author SHA1 Message Date
tron 453b30e387 (svn r3564) Several smaller changes:
- Don't treat non-booleans as booleans
- Reduce variable scope
- Bracing
- Use DeMorgan's law to make conditionals easier to read
- if cascade -> switch
- Replace some magic numbers by symbolic names
- Avoid assignments within other statements
19 years ago
Darkvater 94dfa09424 (svn r3534) - Codechange: remove unused savedump patch-settings. 19 years ago
tron 22dc05faf2 (svn r3510) Fiddle with whitespace and parentheses 19 years ago
tron 8cdd3261fc (svn r3509) Now -p is really gone (fix r3508) 19 years ago
tron 6c1db94a7d (svn r3508) Completly remove the deprecated -p parameter (is superseded by -n) 19 years ago
Darkvater f2448ebfd4 (svn r3500) - Workaround the inaccurate count of spectators/companies that can happen in certain border-cases. For now just dynamically get this value when requested so it is always right. To do properly all player/client creation/destruction needs a hook for networking. 19 years ago
Darkvater 61a7b45dd9 (svn r3485) - [Post-PBS]: when reverting PBS and removing station-tile reservations a station can of course not be a crossing as well. Thanks glx. 19 years ago
bjarni 8c7e594b08 (svn r3484) -fix: fixed issue in last commit where loading savegame versions 18 and 19 didn't init the multiheaded engine pointers 19 years ago
Darkvater 4e09974975 (svn r3472) - [PBS] Remove from trunk. Anyone interested can still find it in branch/pbs. This reverts revisions r3158, r3140, r3075, r2977, r2674, r2625, r2621, r2529, r2528, r2525, r2524, r2519, r2517, r2516, r2507, r2499. (in conjunction with Tron)
- The only change is that the nsignalsw.grf file is kept and that existing nightlies with PBS signals get those signals converted to combo-signals.
19 years ago
Darkvater b3a2f09ae9 (svn r3454) - Fix: company-count was not updated correctly when loading a saved game with already existing companies for multiplayer. 19 years ago
peter1138 70efa805cb (svn r3421) - Revert r3412 as it didn't work.
- Fix station builder issue by checking the tile is in bounds.
19 years ago
peter1138 935ab76f0f (svn r3412) - Fix: When changing game mode, reset the tile highlight data, as it may now be out of bounds. This fixes (at least) an assertion when opening the station builder window. 19 years ago
bjarni e35a131153 (svn r3403) -Codechange: [multiheaded engines] the references between the front and rear engines are no longer saved
instead the pointers are generated on load
19 years ago
peter1138 90aff7a026 (svn r3396) - Autoreplace changes:
- Change fixed array per player to a single pool. This avoids future problems
    with vehicle numbers and decreases savegame size. Engine replacements from
    previous savegames will be lost.
  - Move engine replacement code from players.c to engine.c.
                                      (thanks to blathijs for rewriting this)
19 years ago
truelight e373bd02ba (svn r3380) -Fix: removed 'size' from r3379, because it was pretty silly
-Note: no longer showhelp publish -p, as it is deprecated
19 years ago
truelight 835cd6ea28 (svn r3379) -Fix: protect showhelp against any possible overflow
-Add: [ FS#15 ] Added revision / version at top of help (./openttd -h)
19 years ago
truelight efd3d42107 (svn r3376) -Codechange: made enums for GenerateWorld and InitializeGame 'mode'
-Fix: [ FS#30 ] don't reset date in SE when pressing RandomLand (rewrote patch of MeusH, but Peter warned me I should put his name in, so... oh well)
19 years ago
tron 5ac1a89f92 (svn r3366) Make an unnecessarily global variable local 19 years ago
tron e272b03fee (svn r3365) Staticise 36 functions 19 years ago
peter1138 4b464093e7 (svn r3362) Fix issue with loading old (TTD) savegames:
- move call to convert from old to new train subtypes.
 - ensure AI is started for AI players.
19 years ago
peter1138 2a94a64711 (svn r3356) - Remove unused parameter of AfterLoadGame().
- Initialize _sl_version after loading an old savegame.
19 years ago
tron 246c126d25 (svn r3353) Simplify the automatic length adjustment algorithm for replacing trains: Use the length of the train before the replacement as reference length 19 years ago
peter1138 3532b91eef (svn r3316) - NewGRF: Unload engine names before loading grf files. This fixes names in climates where the engines don't get loaded. Renamed function to reflect its purpose. 19 years ago
tron b06b3e2ca2 (svn r3313) Remove GPMI related changes from trunk
Revisions in detail: 2542, 3226 (partial), 3229, 3231, 3232, 3238, 3242-3245, 3251, 3253, 3260, 3263, 3265, 3266, 3269, 3277, 3278, 3279, 3283 (partial), 3304, 3305, 3306
19 years ago
tron 560e92aa4a (svn r3301) One more static 19 years ago
tron 4634243110 (svn r3299) Remove the unimplemented -l option, which should select the language 19 years ago
Darkvater 56998926e7 (svn r3294) - Fix: use INVALID_STRING_ID instead of -1.
- Fix: savegames only give back one message, show this by ignoring the first argument. Perhaps make the message more verbose in the future by adding STR_ equivalents next to the already existing debug messages.
19 years ago
truelight c963c59b67 (svn r3245) -Add: allow OpenTTD to give his GPMI-params to the GPMI modules 19 years ago
peter1138 87f54ebf92 (svn r3239) - Codechange: Introduce and use helper functions for engine replacement code. 19 years ago
Darkvater a090886073 (svn r3235) - Fix: fix two crashes, one with making a screenshot in the main menu without any game loaded, another when failing to load a scenario in 'New Game' 19 years ago
truelight b8f8f3869d (svn r3231) Fix: update the GPMI implementation to the latest GPMI-API version 19 years ago
truelight 4927236912 (svn r3229) -Add: add more GPMI support. Now GPMI-based AIs can be loaded (doesn't change a thing if you didn't enable GPMI) 19 years ago
truelight 4845ff063b (svn r3227) -Codechange: [Savegame] removed 'minor' version, and renamed 'major' version to just: version. 19 years ago
truelight 6a4ba84320 (svn r3226) -Fix: GPMI implementation had minor glitches
-Fix: the AI speed control is done by the AI-core, individual AIs don't have to do it (so, AIs were delayed twice ;)
-Add: Support for AI-network-clients (an AI, connecting to a remote server)
-Fix: minor AI-core problems
19 years ago
bjarni eba1f68439 (svn r3214) -Feature: openttd.cfg can now set how many autosaves to keep before starting to overwrite old ones
max_autosave_num in the config files sets the number of autosaves to keep (default 16)
	MAX_NUM_AUTOSAVES in Makefile.config sets the default value. 16 is used if no value is given
	this behaviour can still be overwritten by keep_all_autosave (openttd.config setting)
	Note: this is a requested behaviour for PDA ports, since they got limited storage space
19 years ago
peter1138 754d26407e (svn r3212) - Waypoints/Depots: Store waypoint index in m2 for waypoints. This moves the ground type bits from m2 to m4 for waypoints and depots (leaving room for depot index in m2 in future), and moves the custom graphics ID to the waypoint struct.
- Waypoints: Until now stat_id was saved but never assigned to. Instead we now save the GRFID/local index of the custom graphics so that GRF file changes can leave graphics intact.
19 years ago
tron 1d109214bc (svn r3191) Move declaration and definition of _dbg_screen_rect to a place where it somewhat makes sense and wrap them in #ifdef _DEBUG 19 years ago
tron 9f8c5d8fd2 (svn r3186) Unnecessary casts and truncation 19 years ago
tron b9729fb72e (svn r3185) const 19 years ago
tron 8658560229 (svn r3183) Remove an unused declaration and properly declare CheckExternalFiles() in a header 19 years ago
tron f7abff5f96 (svn r3181) -Bracing
-Indentation
-Whitespace
-DeMorgan's Law
-Test with NULL or 0 for non-booleans
-'\0' instead of 0 for chars
-Remove redundantly redundant comments (like DoFoo(); // Do foo)
-Join multiple short lines with a single statement
-Split single lines with multiple statements
-Avoid assignments in if
19 years ago
tron 357aba7475 (svn r3176) Use proper types, not some variants of int 19 years ago
tron 4a14a586e2 (svn r3173) Use the trinary operator and switch to improve readability
Also align short cases nicely
19 years ago
peter1138 7d888a5715 (svn r3158) - PBS: [ 1252192 ] Fix an assertion failure due to possible junk data in pre-PBS savegames. This will not correct pre-PBS savegames loaded and saved since PBS was introduced. (thanks glx) 19 years ago
bjarni 5481dcd191 (svn r3155) -Feature: [autoreplace] autoreplace can now remove cars from too long trains
-Trains will now remember the length of stations it visits and sell cars
        when being autoreplaced if they became too long
        -If it needs to remove cars, then it starts from the front and sells
        all it can find until the train is short enough
        -This only works for trains, that knows the station length of the route
        so a full uninterrupted run is needed
        -a train needs 1-2 runs to detect if the shortest station is expanded
        -This feature can be turned on and off in the train replace window
        and each company can have it's own setting
        -NOTE: minor savegame version bump
19 years ago
peter1138 7298b0b31b (svn r3109) Replace two occurrences of '256' with TOTAL_NUM_ENGINES 19 years ago
tron 2cc2154ad2 (svn r3077) static, const, bracing, indentation, 0 -> '\0'/NULL, typos in comments, excess empty lines, minor other changes
nothing spectacular, just some stuff, which piled up
19 years ago
tron 23ecc82ad3 (svn r3055) Give the savegame/scenarion sort order flags symbolic names 19 years ago
tron 3397e202c8 (svn r3024) -Codechange: Another batch of replacements of int/uint/int16/byte/-1 with proper types and constants 19 years ago
tron ce1c72cf6e (svn r2995) Replace 0xFF/0xFFFF with CT_INVALID/OWNER_SPECTATOR/INVALID_STATION where appropriate 19 years ago