Commit Graph

134 Commits (7ea68d68a6f2547d61863864097ad22f11c60143)

Author SHA1 Message Date
tron 6f1a6d7a87 (svn r3508) Completly remove the deprecated -p parameter (is superseded by -n) 19 years ago
Darkvater 5502f3bf3d (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 8316942f91 (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 6f183780c9 (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 4014e36aec (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 524f8b7f27 (svn r3454) - Fix: company-count was not updated correctly when loading a saved game with already existing companies for multiplayer. 19 years ago
peter1138 e2c90e8f5a (svn r3421) - Revert r3412 as it didn't work.
- Fix station builder issue by checking the tile is in bounds.
19 years ago
peter1138 d212bf205f (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 a4d1725de7 (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 2222907a40 (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 2ee4c11f1a (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 30232bf428 (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 45a0cc607c (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 9b87635c1f (svn r3366) Make an unnecessarily global variable local 19 years ago
tron 318fe153eb (svn r3365) Staticise 36 functions 19 years ago
peter1138 28668bc30b (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 b97d91b96e (svn r3356) - Remove unused parameter of AfterLoadGame().
- Initialize _sl_version after loading an old savegame.
19 years ago
tron ed4b89ee36 (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 0fbb9815ba (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 d5aa95b87e (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 82542799e2 (svn r3301) One more static 19 years ago
tron bd2eba11b7 (svn r3299) Remove the unimplemented -l option, which should select the language 19 years ago
Darkvater 573ce05eb8 (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 90e50e5ca9 (svn r3245) -Add: allow OpenTTD to give his GPMI-params to the GPMI modules 19 years ago
peter1138 14064b223d (svn r3239) - Codechange: Introduce and use helper functions for engine replacement code. 19 years ago
Darkvater af706b9ed3 (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 062d654df1 (svn r3231) Fix: update the GPMI implementation to the latest GPMI-API version 19 years ago
truelight d9e13cef71 (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 898bb915ac (svn r3227) -Codechange: [Savegame] removed 'minor' version, and renamed 'major' version to just: version. 19 years ago
truelight e4cb8ed457 (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 8b4d7f97da (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 479a9c2e47 (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 ce398adf8e (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 ca1dfe94d2 (svn r3186) Unnecessary casts and truncation 19 years ago
tron 8a3587fa28 (svn r3185) const 19 years ago
tron ba9157fbbc (svn r3183) Remove an unused declaration and properly declare CheckExternalFiles() in a header 19 years ago
tron 9d0e7b6458 (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 b34de09e62 (svn r3176) Use proper types, not some variants of int 19 years ago
tron 53f00c8f9d (svn r3173) Use the trinary operator and switch to improve readability
Also align short cases nicely
19 years ago
peter1138 d6e462dfca (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 df6c48fdba (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 8d4031a570 (svn r3109) Replace two occurrences of '256' with TOTAL_NUM_ENGINES 19 years ago
tron 0b936c3222 (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 c042fd3de3 (svn r3055) Give the savegame/scenarion sort order flags symbolic names 19 years ago
tron 8980891b09 (svn r3024) -Codechange: Another batch of replacements of int/uint/int16/byte/-1 with proper types and constants 19 years ago
tron 90e33aed22 (svn r2995) Replace 0xFF/0xFFFF with CT_INVALID/OWNER_SPECTATOR/INVALID_STATION where appropriate 19 years ago
peter1138 81052c160b (svn r2963) Fix: calculate proportions of non-square giant screenshot correctly. 19 years ago
truelight 6145b99c22 (svn r2921) -Codechange: moved all AI-code to 1 central place (ai/ai.c)
-Fix: removed the ability for the oldAI to cheat (this will criple him somewhat)
-Add: base-code for many improvements to come in the AI-system
-Add: added base-code for multiplayer AIs (DOES NOT WORK YET!)
19 years ago
Darkvater 9ab7af9eaf (svn r2909) Game would hang where the autosave_on_exit was activated.
- Updated VS.NET and VS6 project files changed AI files
19 years ago
Darkvater a948fcb605 (svn r2906) Fix some threaded saving problems. Now the thread only interfaces with the main program through a sort of mutex. Communication uses the function OTTD_SendThreadMessage() with the approiate message which is handled in ProcessSentMessage() during the main loop. 19 years ago
tron 8b74a95d36 (svn r2886) Rename the "owner" attribute to "m1", because when it stores an owner it is accessed by [GS]etOwner anyway and when it doesn't store an owner, but arbitrary data, accessing a field called "owner" is confusing. 19 years ago
tron a7d6b41c6a (svn r2866) Move all functions and tables which aren't directly involved in managing the sprite heap to a new file gfxinit.c.
This doesn't ease the global variable mess, but makes the distinction between sprite heap and gfx loading routines easier.
19 years ago
bjarni 0472a80be6 (svn r2848) -Fix: [ 1256044 ] fixed crash when loading a map made before rev 2817 in scenario editor. This was introduced in 2817 19 years ago
tron 56705ecffb (svn r2821) Remove a write-only variable 19 years ago
bjarni 9952ff0b59 (svn r2817) -Codechange: [autoreplace]: moved autoreplace and autorenew to serverside
-This means that one company can only have one setting for renew and replacing
    more clients will not fight due to different settings anymore
  -This is a needed step in the line to fix autoreplacing dualheaded locomotives
  NOTE: savegame revision bump (peter1138 + me in coop)
19 years ago
truelight 22c06dffde (svn r2814) -Fix: made MorphOS to compile again 19 years ago
tron f315c95fa1 (svn r2809) Implement more generic threading functions, which allow more than one thread 19 years ago
tron e91cb150a4 (svn r2754) Move str_fmt into string.[ch] 19 years ago
tron 452f8fee2a (svn r2748) Remove unused cruft from the main loop 19 years ago
tron 452652e85e (svn r2720) Remove unused declarations and definitions 19 years ago
tron 8e9d4df256 (svn r2714) Remove unnecessary includes 19 years ago
tron 647cbd6bdd (svn r2701) Insert Id tags into all source files 19 years ago
tron 126fed74d6 (svn r2685) -Codechange: Split the music/sound/video drivers into separate files and move them into subfolders.
This results in shorter and hopefully easier to maintain files.
Note: I had to change paths in #include statements of some unrelated files, because I added the ottd base directory to the include path (-I.)
19 years ago
tron 54cbd01825 (svn r2673) Include functions.h directly, not globally via openttd.h 19 years ago
tron a4ec4da221 (svn r2672) Move saving/loading related declarations to saveload.h 19 years ago
celestar 7bce410f61 (svn r2657) -Codechange: The available railtypes per player are now a bitmask, so
that railtypes do not be in ascending order of appearance. Allows easier
implementation or more railtypes
19 years ago
Darkvater 6a91b08cad (svn r2610) - Feature: set server map name to the loaded name of the game/scenario. Also truncate where neccessary
- Feature: truncate the path of the saveload window
19 years ago
truelight a28295b394 (svn r2606) -Codechange: renamed ai.c to ai_old.c, and ai.h to ai_new.h to make room
for a global AI-handler
19 years ago
truelight 8f405a42da (svn r2602) -Codechange: removed unused variable (disable_computer)
-Fix: Changed some stuff to make server-side AIs possible in the far future
19 years ago
ludde 04e45dac34 (svn r2588) Codechange: Remove PLAYER_SEED_RANDOM 19 years ago
ludde fd0cee7418 (svn r2583) Move OS specific code out of misc.c
Added support for Mersenne Twister random number generator (not implemented in network yet)
Wrap player randoms around #ifdef
19 years ago
ludde 8086017097 (svn r2564) Fix: Fixed conceptual issue in network_gui.c. AllocateName is not meant to be used by GUI-code, because it modifies the "game-state".
Added a way to bind a C-string to an openttd string which doesn't modify the game state.
19 years ago
ludde 2123deff13 (svn r2560) Fix: various minor code changes.
Added RandomTile/RandomTileSeed functions to generate a random tile.
Changed landscape routines so they don't assume that the Y map side is a power of two. (support for this is not complete, though)
Changed some frequently used map macros to not compute the values each time.
Silence some warnings on MSVC.
19 years ago
tron a4bf608d40 (svn r2558) Change the internal map format from 7 arrays to one array of structs, this doesn't change the saved format for now. It's a stepping stone for further changes. 19 years ago
truelight 48b3b8699d (svn r2542) -Add: [GPMI] Added GPMI (http://sourceforge.net/projects/libgpmi/)
support to OpenTTD in preperation of AIScripts (long term). It is OFF 
  by default. Add GPMI:=1 to Makefile.config to enable.
19 years ago
tron 1307f90b5e (svn r2535) Tabs 19 years ago
celestar 189a1c4017 (svn r2499) -Codechange: Moved the semaphore bit from bit 2 to bit 3 in _map_hi for rails, in order to make way for pbs 19 years ago
tron 9617614b04 (svn r2487) Replace TILE_XY by TileXY/TileDiffXY 19 years ago
tron a733fede9b (svn r2483) Replace almost 500 "uint tile" (and variants) with "TileIndex tile" 19 years ago
celestar 354058341b (svn r2468) -Codechange: Got rid of DEREF_PLAYER and replaced it by GetPlayer 19 years ago
Darkvater c37cf285ce (svn r2433) - CodeChange: unmagicify all road/train crossings with IsLevelCrossing() function (peter1138) 19 years ago
tron ff0030936e (svn r2408) Introduce SetTileOwner() and use it 19 years ago
tron a9b95b3cbb (svn r2407) Use {Get,Is}TileOwner to get/check the owner of a tile and fix some bogus reads of _map_owner 19 years ago
Darkvater ba8c649fac (svn r2397) - CodeChange: rename all "ttd" files to "openttd" files. 19 years ago