Commit Graph

39 Commits (7e4d0f112edbe2acb8ceebdf3161fa7c90cd66f9)

Author SHA1 Message Date
rubidium ca9ec81fd1 (svn r6380) -Codechange: unify all ways to quit OTTD.
This means that in the intro menu the 'Quit' button immediatelly quits
  and the 'Quit' in the menu of the normal game and scenario editor
  immediatelly quits when the 'autosave_on_exit' patch is turned on.
  This is the same way as the OS/window manager initiated quits, like
  alt-F4 and the 'x' in the (OS/window manager drawn) title bar of OTTD.
18 years ago
rubidium 908d3bcfe6 (svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct. 18 years ago
truelight 7abad2b20e (svn r5946) -Add: merged the TGP branch to mainline. TGP adds:
- New optional landscape generator (TerraGenesis Perlin)
  - Load heightmaps (either BMP or PNG)
  - Progress dialog while generating worlds (no longer a 'hanging' screen)
  - New dialogs for NewGame, Create Scenario and Play Heightmap
    - Easier to configure your landscape
    - More things to configure (tree-placer, ..)
  - Speedup of world generation
  - New console command 'restart': restart the map EXACTLY as it was when you
      first started it (needs a game made after or with this commit)
  - New console command 'getseed': get the seed of your map and share it with
      others (of course only works with generated maps)
  - Many new, world generation related, things
  - Many internal cleanups and rewrites
  Many tnx to those people who helped making this:
     Belugas, DaleStan, glx, KUDr, RichK67, Rubidium, and TrueLight (alfabetic)
  Many tnx to those who helped testing:
     Arnau, Bjarni, and tokai (alfabetic)
  And to all other people who helped testing and sending comments / bugs
  Stats: 673 lines changed, 3534 new lines, 79 new strings
18 years ago
Darkvater 4d67281e48 (svn r5873) - Fix a bad comment in r5871, and add a further check for saving strings. 18 years ago
Darkvater bc5de7808a (svn r5871) -Feature: Add a possibility to handle pointer strings without a buffer from the configuration file. Handy for variables that will never be changed during runtime 18 years ago
Darkvater 97ab1b2aa9 (svn r4524) - Codechange: Use GB() macros for getting the saveload file/memory types 18 years ago
Darkvater 9b3f41df3b (svn r3914) - Properly implement SDT(G)_CONDNULL macro's without special cases (add flag SLF_CONFIG_NO and empty string as name) 19 years ago
Darkvater 650b1b0c93 (svn r3895) - Add proper SLE(G)_CONDNULL macros for the empty space reservation in savegames and update where used
- Also add this capability to settings
19 years ago
Darkvater a9d33943d7 (svn r3721) - [3/4] Present the game with a unified structure for the configuration-ini, saveload, console and gui representations of the settings. From part 3 on, OpenTTD is once again compilable.
- Code has been added to the saveload code to honour the SLF_SAVE_NO and SLF_NETWORK_NO flags. SLF_NETWORK_NO just reads in the the bytestream and then discards it because that setting is not synchronised. For this the function SlSkipBytes() has been reinstated
- SAVEGAME_VERSION has been changed from a constant ENUM to a constant integer. This was done for the configuration-code to be able to tell which version of a CONDVAR type to handle. As said before, because settings can be saved to the savegame, they will become conditional at some point. The configuration code always has to read the 'most recent' version.
- GameOptions are saved through the new structure. It is fully compatible with any old savegame...however it is better. Because of the move to this new format we can instruct the loader to skip certain variables. Autosave for example isn't synchronised anymore (in the network). The same goes for currency and kilometers :D. That is the only functionality change this patch is supposed to have if I have written it correctly.
- NOTE! Patches are still not saved so for Multiplayer to work network_client.c and network_server.c needed slight modifications.
19 years ago
Darkvater f5b51b1cb9 (svn r3719) - [1/4] Present the game with a unified structure for the configuration-ini, saveload, console and gui representations of the settings. This first part rewrites the configuration section to use the SaveLoad VarType in general.
- This unified structure consists of a SaveLoad type which stores all data relevant about the variable internals such as type, mem/filesize, address, version-control. The SettingDesc type is concerned more about the representation. Things like default value, string-name, minimum/maximum values, gui-behaviour etc.
- The SaveLoad type has received a few flags controlling saving/loading. These are:
  SLF_SAVE_NO: the setting is not saved with the savegame, effectively making this setting player-based. Eg. it will NOT be overwritten when joining a network-game
  SLF_CONFIG_NO: the setting is not saved to the configuration file so you cannot overwrite it ingame.
  SLF_NETWORK_NO: the setting is not synchronised with the local settings when the game is loaded during network-play. Note that when SLF_SAVE_NO is set, SLF_NETWORK_NO is also set (which is logical), at least if the proper macros are used (in [2/4]).
- NOTE! The game is not compilable after this commit.
19 years ago
Darkvater 8e8bd459a6 (svn r3718) - Add proper Doxygen comments to some saveload-structs (using ///<) 19 years ago
Darkvater f86be948d8 (svn r3711) - Extract the WriteValue() and ReadValue() parts of the saveload code to assign/read to/from a variable. Preparatory work to make this the general function type for such assignments 19 years ago
Darkvater f3b50cdd35 (svn r3662) Fix regression FS#58 with union, endiannes and static decleration problems. Removed the union. 19 years ago
bjarni 6e4bd06aa1 (svn r3661) -Fix [PPC computers] quick dirty fix for failure to start the game on BE CPUs
3626 broke the game on Big endian CPUs and this is a quick dirty fix
	so the nightly builds for OSX and MorphOS will work again
	the game will still fail on 64 bit BE CPUs
	note: the game runs in 32 bit mode on G5, so it will work on G5
	we need to make a better fix for this, but we also need the nightly builds to work
19 years ago
Darkvater c3ae5e4c8f (svn r3639) Silence warnings on gcc about {} initializers around unions 19 years ago
Darkvater d77d704d27 (svn r3628) - Add BOOL and STRING types to saveload capabilities. String is unused up till now and it saves the full-buffer, regardless of how many characters the string actually has. So give a warning for that and figure it out later. 19 years ago
Darkvater 6d89d2bfa1 (svn r3626) - Merge the SlGlobVarList (global variables) and SaveLoad (offset in struct, variable determined runtime) structs. The only difference between these two is the last element that either holds the address or the offset in the struct. Which one to take is determined by which function is called; SlObject or SlGlobList. 19 years ago
Darkvater 493e4d9ac5 (svn r3625) - Move sl_version inside the functions where they are used to force usage. 19 years ago
Darkvater c36746058a (svn r3624) - CodeChange: Some cosmetic changes in the saveload code;
- hide and validate variable-size calculation (SlCalcConvMemLen/SlCalcConvFileLen)
   - some signed/unsigned fixes
   - handle conditional variables the same way for global -and struct types, through checking version_from and version_to
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 898bb915ac (svn r3227) -Codechange: [Savegame] removed 'minor' version, and renamed 'major' version to just: version. 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 0d6f3dbc4d (svn r2863) Move some type declarations into saveload.c, should've been part of r2819 19 years ago
tron 765fc0bbc6 (svn r2861) Move inclusion of setjmp.h into saveload.c, should've been part of r2819 19 years ago
tron 486cffd2ad (svn r2819) Make variables, which are exclusive for internal use of the save/load code, static in saveload.c 19 years ago
tron f315c95fa1 (svn r2809) Implement more generic threading functions, which allow more than one thread 19 years ago
tron 647cbd6bdd (svn r2701) Insert Id tags into all source files 19 years ago
tron a4ec4da221 (svn r2672) Move saving/loading related declarations to saveload.h 19 years ago
orudge fb1b0896dc (svn r2393) - Implemented threaded saving for OS/2
- Fixed discrepancy with SlArray declaration
19 years ago
Darkvater f4f5cb93f8 (svn r2387) - CodeChange: made the saveload code more readable and also removed the 'byte' saveload arrays which means you can save an array of more than 255 elements, or bigger structs than 255 bytes. This doesn't yet solve the problem that a chunk can be a maximum of 16384 big.
- Fix: also fix an unnoticed error in SlSaveLoadConv() due to wrong types.
19 years ago
celestar 3c82a2b3c7 (svn r1721) -Feature: It is now possible to build multiple road stations (up to 8) on
a single station.
Thanks to: Truelight for the saveload code, Darkvater and Hackykid for
network testing and Tron for proof-reading 1500 lines of diff.
20 years ago
tron 94d5aeabb2 (svn r1594) Convert all undefined parameter lists to (void) and add the appropriate warning flags in the Makefile 20 years ago
truelight 7cafdf3b0b (svn r1525) -Codechange: rewrote the _order_array, now it can be made dynamic.
-Codechange: renamed all 'schedule' stuff to 'order(list)'
-Codechange: moved all order-stuff to order_cmd.c / order.h
-Codechange: vehicles that share orders are now linked to eachother
  with next_shared/prev_shared in Vehicle

  Developers: please use AssignOrder to assign data to an order. If not, 
   you _WILL_ make the save-routine to assert!
20 years ago
truelight 3e84b9781f (svn r1448) -Fix: The current_order of a vehicle is now correctly saved (caused
massive desyncs)
  Warning: savegames which are made with the nightly of 08-01-2005 will 
   NO LONGER work!!
20 years ago
truelight 1d9d128f65 (svn r1426) -Codechange: cleaned up the reference code in the saveload routines
-Codechange: removed next_in_chain_old, and saved ->next for Vehicles
  (and bumped savegame revision for that to version 4.4)
-Codechange: Added _sl.full_version, which has both major and minor version
20 years ago
truelight 2f9e0b8e0c (svn r1288) -Codechange: changed _map2 to an uint16. It is still saved and loaded as
an uint8 till the savegame version is bumped to version 5. Then it works 
automaticly as a fully uint16. So _stations[] can not be increased till 
after the bump!!
20 years ago
darkvater 5b18e2328a (svn r959) -Fix: fix previous typo for workaround of braindead MSVC6 (Tron)
-Fix: added debug code to autosave cause it is buggy in multiplayer (does not remember settings; takes them from _opt instead of _new_opt (or vice versa)).
20 years ago
darkvater 54d3f2aff3 (svn r957) -Fix: vehicle.c compiler problems for MSVC6 only! (Tron) 20 years ago
truelight efaeb275f7 (svn r1) Import of revision 975 of old (crashed) SVN 20 years ago