summaryrefslogtreecommitdiff
path: root/unix.c
AgeCommit message (Collapse)Author
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-21(svn r2882) Some fixes for MorphOS (by tokai)tron
- Don't track dependencies on system headers - Add an include path - Silence a warning regarding a bad signal prototype - Remove executable flag from pictures - Add proper OTTD icon
2005-08-13(svn r2864) Code simplification and diff reductiontron
2005-08-12(svn r2860) Fix some issues in the savegame/scenario list code:tron
-Fix: Sort the directories when making a scenario list -Fix: Sort the directories when making a savegame list on Windows -Fix: On OS/2 show the trailing \ if the current directory is a root directory -Regression: On OS/2 the savegame list showed the scenario directory or crashed (probably introduced in r2609) The rest is diff reduction between the 3 variants
2005-08-11(svn r2849) Fix r2806: pwd.h is necessary, but only if USE_HOMEDIR is definedtron
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-08-04(svn r2806) Remove unnecessary #includestron
2005-08-01(svn r2775) Deleting a file can fail, display an error message when it happenstron
2005-07-28(svn r2741) -Feature: [OSX] added a window to display asserts on OSX (Tobin)bjarni
2005-07-28(svn r2735) -Fix: [OSX] fixed issue introduced in 2733 where dedicated ↵bjarni
servers on OSX included sdl.h even when WITH_SDL was not defined (oops)
2005-07-28(svn r2733) -Fix: [OSX] solved include issue introduced in 2714, which ↵bjarni
prevented OSX from opening a window to run the game in (sdl.h was not included anymore)
2005-07-27(svn r2728) -Fix/Feature: Change the driver probing algorithmtron
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.
2005-07-26(svn r2714) Remove unnecessary includestron
2005-07-25(svn r2710) Simplify dedicated server code a bit and don't compile it at ↵tron
all, if network support ist disabled
2005-07-24(svn r2703) - Feature: [OSX] Added a native alert window to show whatever ↵bjarni
error() needs to print (Tobin made this, while I fixed some issued in it) - As a bonus, we now have an objective C file (os/macosx/macos.m) to use the functions Apple made to interact with OS stuff
2005-07-24(svn r2701) Insert Id tags into all source filestron
2005-07-23(svn r2691) Separate dedicated video driver and fix bemidi declarationstron
2005-07-23(svn r2688) MSVC and Watcom can't handle identical file names in different ↵tron
directories, oh my...
2005-07-23(svn r2685) -Codechange: Split the music/sound/video drivers into separate ↵tron
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.)
2005-07-22(svn r2673) Include functions.h directly, not globally via openttd.htron
2005-07-21(svn r2669) Shuffle some more stuff around to reduce dependenciestron
2005-07-17(svn r2609) - Feature: remove extension from savegames/scenarios when ↵Darkvater
browsing the folders.
2005-07-15(svn r2583) Move OS specific code out of misc.cludde
Added support for Mersenne Twister random number generator (not implemented in network yet) Wrap player randoms around #ifdef
2005-06-06(svn r2418) - Fix: typoDarkvater
2005-06-06(svn r2417) - Fix: threads on morphos are apparently unexistent, so ↵Darkvater
implement stubs for them (tokai)
2005-06-04(svn r2405) Simplify a few '? true : false' and '? false : true', especially ↵tron
the latter is confusing
2005-06-02(svn r2398) - CodeChange: forgot to update unix and os2 specific files as well.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-05-21(svn r2356) Make check if statvfs() is availible a bit more sensibletron
2005-04-13(svn r2191) -Add: OpenTTD now compiles with dietlibc (Aard)truelight
2005-03-28(svn r2101) statvfs() is availible on POSIX.1 conformant systems.tron
Also use a different field, which has a better chance of containing meaningful information, of the returned struct to determine the free space on the filesystem and fix a small bug introduced in r2100 (s/!=/==/)
2005-03-28(svn r2100) - Fix: [1024703]: Infinite access for A:\ (win32). Patch ↵darkvater
[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)
2005-03-26(svn r2076) Set the name for the parent directory to ".."tron
2005-03-15(svn r2013) Always ignore SIGPIPE, not only when SDL is used (ShadowJK)tron
2005-03-15(svn r2012) When making a savegame name, don't append the extension, if it ↵tron
is already there
2005-03-12(svn r1999) r1990 broke savegame deletion, fix that [1161729]tron
2005-03-11(svn r1990) Reduce the diff between the OS specific files with respect to ↵tron
file handling and fix some inconsitencies (I hope I didn't break the OS/2 part, couldn't test it, feedback is welcome)
2005-03-10(svn r1986) - Fix: free _config_file when shutting down openttd. Strange ↵Darkvater
that Valgrind didn't catch this, kudos to TrueLight - Feature (small): new command-line option -c <config_file>. You can have OpenTTD load alternative config files with this setup, handy for servers, or for saves from other players if you don't want to rename your own config. This will have to do until all game-related settings are saved ingame. Couldn't find the SF patch, so credits to the guy that wrote it.
2005-03-09(svn r1974) Cleanups, quite similar to those done to win32.c in r1972 (code ↵tron
duplication, anyone?)
2005-03-07(svn r1953) Codechange: Tidyup, reduced ridiculous indentation levels, some ↵pasky
sprintf()s replced by snprintf()s.
2005-02-21(svn r1894) - Codechange: cleaned up the console a bit, wholly unified ↵Darkvater
handling of text with that of editboxes - Codechange: Introduction of Textbuf struct which not only holds physical data as length but also pixel-constrains (width) and information about the caret - Codechange: Move Clipboard function to OS specific file. Currently only Windows has clipboard actions - Feature: Editboxes, console and exit screen also accept the numeric-enter as a yes - Feature: Navigation through text with cursor keys is possible, as well as arbitrary insertion (also paste) and deletion; both backspace and del keys. Functions DeleteTextBufferChar, InsertTextBufferChar and InsertTextBufferClipboard handle input and deletion. Navigation is done through MoveTextBufferPos. - Fix: OTTD crash when opening 'add server' editbox - CodeChange: fix up some stringwidth calculations in gfx.c. You can get the width in pixels of a character by calling GetCharacterWidth().
2005-02-08(svn r1850) Change the last consumers of str_buffr so they use local static ↵tron
buffers now and remove the global array str_buffr.
2005-02-07(svn r1840) Repel str_buffr and use local buffers where possibletron
2005-02-06(svn r1821) Move generic string handling functions to string.[ch] and ↵tron
introduce stre{cpy,cat}, see string.h for their semantics
2005-01-22(svn r1594) Convert all undefined parameter lists to (void) and add the ↵tron
appropriate warning flags in the Makefile
2005-01-17(svn r1551) Silence a warning and simplify a preprocessor checktron
2005-01-14(svn r1509) Const correctness and add static where appropriate while ↵tron
touching the lines anyway
2005-01-11(svn r1479) -Added highscore chart (accessible from the difficulty window) ↵darkvater
with top5 companies for a given difficulty (select the difficulty in the menu) -Added endgame score on 1 jan 2051 where you are added to the highscore if sufficiently large points have been accumulated. Game is paused while -These values are saved in hs.dat; added read/write functions for it -Added code to delete all windows to show charts. There is one issue left: somehow a news-gui pops up in front of the the chart at the end of the game.
2005-01-06(svn r1402) Trim trailing whitespacetron