Commit Graph

103 Commits (732acc8eaddadcb87ec8ee3701bfb861d5ba1579)

Author SHA1 Message Date
tron 4696ef802a (svn r2809) Implement more generic threading functions, which allow more than one thread 19 years ago
tron a86e9689df (svn r2807) Fix two major bugs in the threaded save code:
- 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
19 years ago
tron fc5e2d4861 (svn r2775) Deleting a file can fail, display an error message when it happens 19 years ago
tron 2ff85cdc56 (svn r2729) Fix #include 19 years ago
tron 5821529859 (svn r2728) -Fix/Feature: Change the driver probing algorithm
Instead of trying to start a single driver and bailing out if that fails, try to initialise one by one and use the first one which succeeds.
This should fix problems on machines with no sound card, where -s null had to be specified manually.
19 years ago
tron 6c52a8629d (svn r2727) Fix last commit, don't ask 19 years ago
tron c43653b565 (svn r2726) Fix last commit 19 years ago
tron 286f8726d5 (svn r2725) Move MyShowCursor() back into win32.c, it fits better there 19 years ago
tron 84f78ea44a (svn r2710) Simplify dedicated server code a bit and don't compile it at all, if network support ist disabled 19 years ago
tron 201990b5d9 (svn r2704) Remove . from include path again, too much trouble. Also add some #ifdefs and #includes for the Windows build 19 years ago
tron a227065ab7 (svn r2701) Insert Id tags into all source files 19 years ago
tron 384b284846 (svn r2699) Hopefully fix the compilation on Windows when SDL is not present 19 years ago
tron 475d7fc0ae (svn r2697) Make compiling with SDL on Windows work again (missing #includes) and fix some warnings 19 years ago
tron 4a14350711 (svn r2691) Separate dedicated video driver and fix bemidi declarations 19 years ago
tron 10fd03e222 (svn r2688) MSVC and Watcom can't handle identical file names in different directories, oh my... 19 years ago
tron 5178ad768d (svn r2686) Revert accidently commited change 19 years ago
tron 07a6e612ec (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 559babcdc9 (svn r2673) Include functions.h directly, not globally via openttd.h 19 years ago
tron 18d79cc30f (svn r2672) Move saving/loading related declarations to saveload.h 19 years ago
tron 11d21bb2a1 (svn r2670) Fix r2669 19 years ago
tron ac66e3e28f (svn r2650) Convert many explicit shifts+ands to extract bits to invocations of GB - should be a bit nicer to read 19 years ago
ludde f432314fa9 (svn r2649) Get rid of 2 warnings. 19 years ago
ludde 3e97dda275 (svn r2635) Fix: [ntp/misc] Improve the old pathfinder. Changed it to A* instead of Dijkstra.
- Benchmark shows that NTP is now around 10x faster than NPF.
  - Made IsTunnelTile macro to determine if a tile is a tunnel.
  - Added some useful debugging functions for making tiles red / getting accurate timestamps.
  - Remove old depot finding algorithm.
  - Disable warning for signed/unsigned comparisons.
19 years ago
Darkvater 80aa8c868b (svn r2609) - Feature: remove extension from savegames/scenarios when browsing the folders. 19 years ago
ludde 3ce9fb6bbd (svn r2601) Fix: Added TIC,TOC macros do be able to do profiling easier. 19 years ago
ludde 71f9078bdd (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
tron 8f71864bef (svn r2571) Add explicit type Pixel for ... Pixels 19 years ago
tron 1a046ff4c6 (svn r2563) -Fix: [1209084] Spaces in the path to the MIDI files caused the win32 MIDI player to fail 19 years ago
tron 1b4a0897b6 (svn r2535) Tabs 19 years ago
tron 75bb548da4 (svn r2501) Forgot to change part of the win32 code in r2497 19 years ago
tron 9d75047211 (svn r2497) Use a struct array for palette entries instead of a flat byte array 19 years ago
Darkvater e9115f28c9 (svn r2463) - Fix: partly revert the strncat madness and update nightly script (invisible) to correctly insert date. 19 years ago
Darkvater 3042e945d3 (svn r2459) - Fix: windows title-bar did not correctly add date/revision for nightly build 19 years ago
Darkvater 2bcb41293f (svn r2417) - Fix: threads on morphos are apparently unexistent, so implement stubs for them (tokai) 19 years ago
tron 43f7974f6d (svn r2405) Simplify a few '? true : false' and '? false : true', especially the latter is confusing 19 years ago
Darkvater b438b1248c (svn r2397) - CodeChange: rename all "ttd" files to "openttd" files. 19 years ago
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
19 years ago
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.
19 years ago
Darkvater 7daaf1f100 (svn r2334) - Fix (regression): moved togglefullscreen into the video-driver, now windows works, dedicated works and sdl works. Also reverted the change to the makefile. 19 years ago
Darkvater 2aa94201dc (svn r2310) - Fix: Game would crash if you full-screened with the 'fullscreen' button than chose a resolution from the dropdown box that was no longer valid. Big thanks to DaleStan for track down the crashing bug.
- Fix: There would be duplicate entries in the resolutions dropdown box. Copy SDL method or removing duplicates and sort the list.
- Feature: in the settings menu, you don't have to click on the arrows anymore, clicking on the dropdown box itself has the same effect. Consistent with other dropdowns in the game
19 years ago
darkvater 860242b811 (svn r2190) - Fix: [1179424] '.. (Parent directory)' does not show up in the root-directory anymore; win32 only (mgasterix) 20 years ago
darkvater dfe6c34bf1 (svn r2153) - Fix: [ 1173690 ] Path displaying as "C:\\" in saveload window win32-only (glx) 20 years ago
darkvater 6bca4c041a (svn r2100) - Fix: [1024703]: Infinite access for A:\ (win32). Patch [1171208]. Only requery drive(s) if the user changes a directory, also surpress the OS error box that pops up on some windows machines. Tron + glx (and me) 20 years ago
pasky 8acc24f000 (svn r2086) - Codechange: Two indentation fixes coming from Loic Guilloux' patch 1171208. 20 years ago
tron aba225c88d (svn r2084) Set the name for drive items 20 years ago
tron 742513d708 (svn r2076) Set the name for the parent directory to ".." 20 years ago
darkvater 602fda327f (svn r2052) - Fix Regression: ALT+F4 once again shuts down openttd in windows and F10, etc. is fixed. 20 years ago
tron 3763ec7652 (svn r2012) When making a savegame name, don't append the extension, if it is already there 20 years ago
tron f04780e66d (svn r2000) Split the sound system into backend (mixer.[ch]) and frontend (sound.[ch]) 20 years ago
tron 70be35f319 (svn r1999) r1990 broke savegame deletion, fix that [1161729] 20 years ago