summaryrefslogtreecommitdiff
path: root/saveload.c
AgeCommit message (Collapse)Author
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
2005-03-15(svn r2014) Don't manually inline a piece of codetron
2005-02-23(svn r1909) - Fix: [ 1145593 ] assertion failed when saving the game. It is ↵Darkvater
nice to also update the savegame format when you update town statistics :)
2005-02-06(svn r1818) -Add: Dynamic orders (up to 64k orders)truelight
2005-02-06(svn r1817) -Codechange: Moved depot-functions to depot.ctruelight
-Codechange: Added wrappers around depot-access (GetDepot no exists) -Codechange: Made depot-functions a bit more logic (no longer GetDepotByTile crashes your game when you request it on a non-depot tile) -Add: made depots dynamic (yes, 64k depots are possible now)
2005-02-05(svn r1803) Move debugging stuff into files of it's owntron
2005-02-04(svn r1788) -Add: Made RoadStops dynamic. You can now create up to 64k ↵truelight
roadstops.
2005-02-04(svn r1786) -Fix: unitnumber is increased to 16bit, so now you can have up ↵truelight
to 5000 trains in one game (instead of the 240 which was the current value). Default max allowed vehicles per type is changed: Trains: 500 (old 80) Road: 500 (old 80) Ships: 200 (old 40) Aicraft: 300 (old 50) (Tnx to Celestar and Darkvater for checking the patch)
2005-02-04(svn r1783) -Add: Dynamic vehicles (now up to 64k of vehicles)truelight
2005-02-03(svn r1776) -Add: Dynamic stations. You can now have up to 64k of stationstruelight
2005-02-02(svn r1770) -Fix: Hopefully last pieces of code that are containing a station-idtruelight
(and should be an uint16, not uint8)
2005-02-02(svn r1768) -Codechange: Store town index in _map2 of town tilescelestar
Moved house type from _map2 to _map3_hi for MP_HOUSE Moved foundation and roadworks from _map2 to _map3 for MP_STREET This increases game speed by a factor of around 15(!) if many cities are around. Converting an old game is done automagically, but can take a while
2005-02-01(svn r1764) -Add: dynamic towns, you can now have up to 64k towns (let me ↵truelight
know when you have that amount of towns in a map ;))
2005-01-29(svn r1722) -Feature: Bigger maps - anyone?tron
2005-01-29(svn r1721) -Feature: It is now possible to build multiple road stations (up ↵celestar
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.
2005-01-25(svn r1673) - Codechange: Removed some redundant comments from r1667dominik
Saving the player color for signs will work right after the savegame bump
2005-01-25(svn r1667) - Feature: Signs are now shown in the color of the player who ↵dominik
created them (Note: The player information is currently not stored in savegames. Upon loading a game the signs will all be gray again)
2005-01-22(svn r1596) Add some more staticstron