summaryrefslogtreecommitdiff
path: root/saveload.c
AgeCommit message (Collapse)Author
2005-11-26(svn r3236) - Fix: warnings about 'CDECL must be used with ...' on VS6Darkvater
2005-11-22(svn r3227) -Codechange: [Savegame] removed 'minor' version, and renamed ↵truelight
'major' version to just: version.
2005-11-18(svn r3218) -Feature: Multiheaded train engines will now stay in the same trainbjarni
This means that any user attempt to remove a rear engine will tell the user to move the front engine instead This fixes the assert when moving multiheaded engines (introduced in r3144) Note: to make old savegames use this feature, some engines might be turned around in order to link engines in pairs -Codechange: train subtype is now a bitmask This allows fast access to info like if it is a wagon or engine and if it is in front and so on Note: savegame version bump
2005-11-16(svn r3212) - Waypoints/Depots: Store waypoint index in m2 for waypoints. ↵peter1138
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.
2005-11-07(svn r3155) -Feature: [autoreplace] autoreplace can now remove cars from too ↵bjarni
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
2005-10-22(svn r3077) static, const, bracing, indentation, 0 -> '\0'/NULL, typos in ↵tron
comments, excess empty lines, minor other changes nothing spectacular, just some stuff, which piled up
2005-10-02(svn r3008) [ 1247535 ] Native Support for Win64 (compile&run only) (michi_cc)Darkvater
Fix warning in graph_gui.c with const problem
2005-09-11(svn r2944) Add Revision keyword to the file for --version/-vDarkvater
2005-09-11(svn r2940) (Internal) Remove the need for the 'tmp' variable for _sl.buf, ↵Darkvater
instead operate on _sl.buf_ori which is not changed for init/deinit.
2005-09-11(svn r2939) Fix racing condition when using threaded saving (last one I hope).Darkvater
When game is saved and you save again you get an error message (not when autosaving) and it's aborted. When a game is loaded in the meanwhile execution pauses until saving thread finishes.
2005-09-02(svn r2908) If threaded saving fails or does not happen, sending subsequent ↵Darkvater
messages might hang ottd. So don't send them :)
2005-09-02(svn r2906) Fix some threaded saving problems. Now the thread only ↵Darkvater
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.
2005-08-13(svn r2863) Move some type declarations into saveload.c, should've been part ↵tron
of r2819
2005-08-12(svn r2861) Move inclusion of setjmp.h into saveload.c, should've been part ↵tron
of r2819
2005-08-06(svn r2819) Make variables, which are exclusive for internal use of the ↵tron
save/load code, static in saveload.c
2005-08-06(svn r2817) -Codechange: [autoreplace]: moved autoreplace and autorenew to ↵bjarni
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)
2005-08-06(svn r2813) Plug a thread leak and prevent a race condition which could lead ↵tron
to multiple simultaneous saves and therefore severe corruption
2005-08-05(svn r2810) Threads may now return information when they terminate using a ↵tron
void*. Also add the new files to the MSVC project files.
2005-08-05(svn r2809) Implement more generic threading functions, which allow more ↵tron
than one thread
2005-08-05(svn r2807) Fix two major bugs in the threaded save code:tron
- Do not dereference a local variable which no longer exists; this lead to random crashes when saving - (Win32) Do not close a handle before it is used last There are still many major problems (race conditions and resulting memory corruption/crashes) left
2005-07-24(svn r2701) Insert Id tags into all source filestron
2005-07-22(svn r2673) Include functions.h directly, not globally via openttd.htron
2005-07-22(svn r2672) Move saving/loading related declarations to saveload.htron
2005-07-21(svn r2669) Shuffle some more stuff around to reduce dependenciestron
2005-07-21(svn r2660) Get rid of some more shifting/anding/castingtron
2005-07-20(svn r2654) SlWriteUint16() should have a uint16 as parameter, not some ↵tron
arbitrary enum
2005-07-20(svn r2651) - Fix: [ 1220776 ] Removes warning when compiling saveload.c on ↵Darkvater
some GCC versions (glx). This only works as long as there is only 1 saving thread active, as is the case now.
2005-07-20(svn r2648) Only use _stdcall calling convention for zlib on win32/msvc.ludde
2005-07-19(svn r2636) Fix: Switched to using the _fastcall calling convention instead ↵ludde
of cdecl. (Please tell me if you get linking problems)
2005-07-16(svn r2587) - Fix: Don't close the save-thread if it wasn't started because ↵Darkvater
of some error or a network-server
2005-07-13(svn r2560) Fix: various minor code changes.ludde
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.
2005-07-12(svn r2550) raise 32767 limit of gamma values, and 16MB limit of RIFF chunks ↵ludde
in saveload code.
2005-07-08(svn r2535) Tabstron
2005-06-30(svn r2499) -Codechange: Moved the semaphore bit from bit 2 to bit 3 in ↵celestar
_map_hi for rails, in order to make way for pbs
2005-06-15(svn r2441) -Feature: You can now give transfer order to set up feeder systemscelestar
2005-06-06(svn r2420) - Codechange: magic number elminitation of cursorsprites.Darkvater
2005-06-06(svn r2419) - Fix: saving no longer changes your cursor if it is in a ↵Darkvater
non-mouse state. - Fix: autosaving/loading; it no longer returns a fail code when saving is already in progress. In the case of a load, the game pauses to wait for the save to finish. (glx) - Fix (regression): fix a bug in the 'buggy load' code where a wrong offset was used for the LZO format.
2005-06-02(svn r2397) - CodeChange: rename all "ttd" files to "openttd" files.Darkvater
2005-06-01(svn r2392) - Fix some typos (Tron)Darkvater
2005-06-01(svn r2391) - Feature: saving games happen in a seperate thread so you no ↵Darkvater
longer will have to wait such a long time (especially handy on bigger maps and multiplayer games). The mouse also changes into the 'ZZZ' state :P. The thread on windows is currently given a little-bit-less-than-normal priority so it should not interfere that much with the gameplay; it will take a bit longer though. Upon the exit of the game any pending saves are waited upon. - Fix: fixed GetSavegameFormat() so that it takes the best compressor (highest), or a forced one added with the parameter - Open issues: 1. Don't attempt to load a game while saving is in progress, it will kick you back to the intro-screen with only the vast ocean to look at. 2. The server is disabled from threaded-saving, but might be enabled in the future. 3. Current implementation only allows 1 additional running thread. 4. Stupid global variables.....grrr Big thanks for TrueLight and the amazing memorypool :D
2005-06-01(svn r2390) - Codechange: Fix some warnings on GCC 4.0.0hackykid
2005-05-30(svn r2387) - CodeChange: made the saveload code more readable and also ↵Darkvater
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.
2005-04-02(svn r2118) - Fix: Fix compilation with network disabled, and comment out ↵Darkvater
some of the warnings (unused function)
2005-03-27(svn r2080) - Fix: [OldAI] p->ai.state_counter was uint16 but could hold a ↵pasky
tile index, therefore overflowing - changed that to uint32 and bumped the savegame revision to 32. It *MIGHT* close bug 1151374 - it certainly caused AI to stop building anything sometimes. - While at it, use TileIndex as the tile index type in AiRemovePlayerRailOrRoad() and AiStateRemoveTrack(). - Make the number of tiles scanned 4*MapSizeX() instead of 1000. It *MIGHT* close bug 1116614.
2005-03-24(svn r2046) -Codechange: moved all waypoint code to waypoint.c/waypoint.htruelight
-Codechange: rewrote some functions while moving waypoint-stuff -Add: added support for 64k waypoints -Fix: made the waypoint struct a bit more logic (no bit-fucking)
2005-03-24(svn r2041) -Fix: not all vehicles did get a day_proc call (because of ↵truelight
rounding errors)
2005-03-20(svn r2033) - Fix: Fix some more desync by saving the town growth frequency ↵pasky
iterator _cur_town_iter. Needed to bump a svg revision for that thanks to the braindead SlGlob thing, or at least I don't know how to do it without bumping it.
2005-03-19(svn r2030) -Fix: Save _cur_town_ctr with all its bits to prevent desyncscelestar
2005-03-15(svn r2018) Yet another workaroundtron
2005-03-15(svn r2017) Explicitly mark SlReadByte as 'inline'tron