Commit Graph

160 Commits

Author SHA1 Message Date
ludde 951cde5b72 (svn r2648) Only use _stdcall calling convention for zlib on win32/msvc. 2005-07-20 09:35:05 +00:00
ludde 5862c0a174 (svn r2636) Fix: Switched to using the _fastcall calling convention instead of cdecl. (Please tell me if you get linking problems) 2005-07-19 11:55:47 +00:00
Darkvater 19cb5e054a (svn r2587) - Fix: Don't close the save-thread if it wasn't started because of some error or a network-server 2005-07-16 09:55:31 +00:00
ludde 6013b327f7 (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.
2005-07-13 19:51:31 +00:00
ludde b5a30ed0fc (svn r2550) raise 32767 limit of gamma values, and 16MB limit of RIFF chunks in saveload code. 2005-07-12 19:15:56 +00:00
tron 1b4a0897b6 (svn r2535) Tabs 2005-07-08 22:25:24 +00:00
celestar 27e61cbd84 (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 2005-06-30 13:24:17 +00:00
celestar 9b8cb17831 (svn r2441) -Feature: You can now give transfer order to set up feeder systems 2005-06-15 16:58:15 +00:00
Darkvater 5fed47964e (svn r2420) - Codechange: magic number elminitation of cursorsprites. 2005-06-06 13:47:06 +00:00
Darkvater 71c2a573e1 (svn r2419) - Fix: saving no longer changes your cursor if it is in a 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-06 13:11:35 +00:00
Darkvater b438b1248c (svn r2397) - CodeChange: rename all "ttd" files to "openttd" files. 2005-06-02 19:30:21 +00:00
Darkvater 6b7f3da7c6 (svn r2392) - Fix some typos (Tron) 2005-06-01 23:12:29 +00:00
Darkvater a51cfd58b8 (svn r2391) - Feature: saving games happen in a seperate thread so you no 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 23:08:33 +00:00
hackykid f7dcd2e834 (svn r2390) - Codechange: Fix some warnings on GCC 4.0.0 2005-06-01 11:52:44 +00:00
Darkvater 55423efb06 (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.
2005-05-30 22:16:05 +00:00
Darkvater 35ff9d850c (svn r2118) - Fix: Fix compilation with network disabled, and comment out some of the warnings (unused function) 2005-04-02 00:17:16 +00:00
pasky 0c5d61bd56 (svn r2080) - Fix: [OldAI] p->ai.state_counter was uint16 but could hold a 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-27 00:28:14 +00:00
truelight 83637d164e (svn r2046) -Codechange: moved all waypoint code to waypoint.c/waypoint.h
-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 17:03:37 +00:00
truelight 88ef277dc3 (svn r2041) -Fix: not all vehicles did get a day_proc call (because of rounding errors) 2005-03-24 13:59:44 +00:00
pasky 087d78d465 (svn r2033) - Fix: Fix some more desync by saving the town growth frequency 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-20 00:32:26 +00:00
celestar f41be0b25a (svn r2030) -Fix: Save _cur_town_ctr with all its bits to prevent desyncs 2005-03-19 22:45:59 +00:00
tron 195e515de1 (svn r2018) Yet another workaround 2005-03-15 21:07:09 +00:00
tron dad3d12406 (svn r2017) Explicitly mark SlReadByte as 'inline' 2005-03-15 20:07:46 +00:00
tron f91f8d9559 (svn r2014) Don't manually inline a piece of code 2005-03-15 16:56:05 +00:00
Darkvater 50ac80cb4c (svn r1909) - Fix: [ 1145593 ] assertion failed when saving the game. It is nice to also update the savegame format when you update town statistics :) 2005-02-23 00:07:03 +00:00
truelight 020c1e9b6c (svn r1818) -Add: Dynamic orders (up to 64k orders) 2005-02-06 10:24:57 +00:00
truelight e9c93f9c0c (svn r1817) -Codechange: Moved depot-functions to depot.c
-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-06 10:18:47 +00:00
tron f0f85a7ef3 (svn r1803) Move debugging stuff into files of it's own 2005-02-05 15:58:59 +00:00
truelight 10adda0d73 (svn r1788) -Add: Made RoadStops dynamic. You can now create up to 64k roadstops. 2005-02-04 15:31:30 +00:00
truelight 97728357e4 (svn r1786) -Fix: unitnumber is increased to 16bit, so now you can have up 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 14:24:23 +00:00
truelight 42f98c7eec (svn r1783) -Add: Dynamic vehicles (now up to 64k of vehicles) 2005-02-04 13:23:29 +00:00
truelight 1938a73c90 (svn r1776) -Add: Dynamic stations. You can now have up to 64k of stations 2005-02-03 17:22:35 +00:00
truelight ab3ed5c431 (svn r1770) -Fix: Hopefully last pieces of code that are containing a station-id
(and should be an uint16, not uint8)
2005-02-02 16:16:43 +00:00
celestar 30a328705e (svn r1768) -Codechange: Store town index in _map2 of town tiles
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-02 14:17:13 +00:00
truelight 777dd99585 (svn r1764) -Add: dynamic towns, you can now have up to 64k towns (let me know when
you have that amount of towns in a map ;))
2005-02-01 18:32:01 +00:00
tron 3a89108a55 (svn r1722) -Feature: Bigger maps - anyone? 2005-01-29 19:45:14 +00:00
celestar 752b3f0dd6 (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.
2005-01-29 19:41:44 +00:00
dominik 085ae9cab2 (svn r1673) - Codechange: Removed some redundant comments from r1667
Saving the player color for signs will work right after the savegame bump
2005-01-25 17:05:38 +00:00
dominik d439221c62 (svn r1667) - Feature: Signs are now shown in the color of the player who 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-25 15:38:36 +00:00
tron e5cd6b6193 (svn r1596) Add some more statics 2005-01-22 22:47:58 +00:00
tron e75c48ec7a (svn r1595) EmergencySave() is only used on WIN32, add preprocessor guard to hide it everywhere else 2005-01-22 22:46:10 +00:00
tron 189ca73707 (svn r1594) Convert all undefined parameter lists to (void) and add the appropriate warning flags in the Makefile 2005-01-22 20:23:18 +00:00
truelight d275109e79 (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!
2005-01-15 19:06:22 +00:00
celestar e17a8989cf (svn r1440) -Feature: Allows more flexible airport layouts now, as the number of
terminals in every group can be freely chosen
-Codechange: AT_OILRIG is now 15, so that new airports can be added
easily.
2005-01-09 08:49:40 +00:00
truelight 788f543bc3 (svn r1429) Change: bumped savegame to revision 5.
- Now orders are bigger
   - Now _map2 is official 16 bits
2005-01-08 12:47:26 +00:00
truelight dcca3cf80b (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
2005-01-08 09:48:08 +00:00
dominik b78b576b21 (svn r1417) Fix: The invisible tiles on the southern border are now converted to class MP_VOID when an old map (with wrong classified invisible tiles) is loaded.
I bumped the minor savegame version for that, even though it's not really necessary. We're not gonna run out of minor savegame versions anyway though. ;)
2005-01-07 18:13:56 +00:00
truelight c2ee8d70e4 (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!!
2004-12-28 11:51:31 +00:00
truelight a9bb5be49d (svn r1248) -Add: initial OS/2 support (read docs/ReadMe_OS2.txt) (orudge)
Works fine, beside some minor stuff:
  - Network is not working yet
  - Keyboard is not working
  - No MIDI support
  - 'A few file selector bugs involving drives'
2004-12-23 14:46:16 +00:00
dominik b7f71b026d (svn r1222) Currency cleanup. Changed some currency symbols according to forum suggestions (thx ChrisCF) and rearranged the currencies alphabetically (except for the major ones). 2004-12-22 16:54:55 +00:00
dominik 7196860373 (svn r1082) Feature: Chat toolbar
- to chat with all players press Return (or Shift-T) and type in the message
- Press Return again to send the message
2004-12-14 16:53:38 +00:00
dominik 77e882c3bd (svn r1076) Feature: Patch setting to autosave the game on exit
If you set autosave_on_exit = true in openttd.cfg, your game will be saved as exit.sav in the autosave folder and you won't be asked if you want to quit the game any more.
2004-12-13 22:10:12 +00:00
tron 523b37a3e9 (svn r1041) Under certain circumstances obsolete fields are included in the size calculation of a chunk in a savegame which leads to failed loads. This wasn't triggered because the necessary conditions weren't met. 2004-12-13 07:41:04 +00:00
tron c00258237e (svn r907) Sprinkle holy ANSI water:
- "inline" must before the return type (and after "static")
- Initialise all struct members, not just some of them
- Remove (one) spurious semicolon
2004-12-03 07:43:00 +00:00
tron fca55e3741 (svn r793) Merge INLINE -> inline replacement (revision 376) 2004-11-24 13:19:48 +00:00
tron 249a170ace (svn r607) -Patch: [ 985102 ] static cleanup
Thanks to lvoge
2004-11-14 19:44:06 +00:00
darkvater e295e46e3e (svn r223) -Fix: Const correctness and miscellaneous fixes. Thank you Tron for your diligent fixing of warnings (and some possibly bugs) (Tron)
-CodeLayout: Remove trailing spaces and Windows linebreaks
2004-09-12 21:49:38 +00:00
truelight eb49a19460 (svn r194) -Codechange: stripping trailing-spaces. Please keep this that way! 2004-09-10 19:02:27 +00:00
dominik 770f86bbbe (svn r122) Change: exclusive transport rights are now stored per town instead of per station
Exclusive rights from old savegames will be reset.
2004-08-23 21:04:39 +00:00
truelight efaeb275f7 (svn r1) Import of revision 975 of old (crashed) SVN 2004-08-09 17:04:08 +00:00