Commit Graph

91 Commits

Author SHA1 Message Date
Darkvater
dcda134080 (svn r5763) - Cleanup: Move the now unified GetLanguageList and comparator function to strings.c where it belongs. 2006-08-04 23:45:20 +00:00
truelight
e0661a9214 (svn r5491) -Fix: [#9] MorphOS crashed when you go a level up on root level (tokai) 2006-07-13 18:16:15 +00:00
tron
772fbda3e3 (svn r5391) Miscellaneous, mostly bracing and whitespace, nothing spectacular 2006-06-27 21:25:53 +00:00
Darkvater
38cd74a0bd (svn r4219) - Add support for WITH_ICONV. It is enabled by default for OSX > 10.3 for all others set it with WITH_ICONV in Makefile.config or with --with-iconv with configure. --with-config=/somedir will search for iconv include files somewhere (or in Makefile.config with WITH_ICONV_PATH). Custom library loading is not (yet) supported 2006-03-31 21:22:41 +00:00
Darkvater
c3602c7f9d (svn r4109) - Fix (r4105) [iconv]: Only include the needed headers when ICONV is actually used. Thanks for noticing Bjarni 2006-03-25 15:47:20 +00:00
Darkvater
84a824212b (svn r4107) - Fix (r4105): Mixup of string parameters in debug message if iconv_open() failed. Also clarify the message a bit. 2006-03-25 10:15:53 +00:00
Darkvater
e3685faad0 (svn r4105) - Feature: Add proper ISO-8859-15 <> LOCALCODE conversion. As the mess that is makefile can't properly support it at the moment, it is only available for MACOSX. Windows doesn't need FS conversion and I have no idea about OS/2 so it's disabled for them.
- CodeChange: Change the function GetCurrentLocale(). It returns the locale from some default environment-variables, plus a custom one defined as parameter. If all fail, it tries $LANG.
2006-03-25 09:22:10 +00:00
bjarni
14b12efa4a (svn r4019) -Fix: [OSX] stopped using iconv for 10.2.8, since it was added in 10.3
this have the sideeffect that 10.2.8 will still have the "failure to save with certain chars in the filename bug", but at least it can compile again
2006-03-22 13:06:50 +00:00
Darkvater
413dd85cd7 (svn r4001) - Add length parameter to FiosMakeSavegameName() and use this function for creating the full path instead of home-brewn snprintf. 2006-03-21 22:08:15 +00:00
Darkvater
1c7d522482 (svn r3994) - Fix: convert filenames to UTF-8-MAC instead of UTF-8 for MACOSX, because that's what it uses. This is no real fix for the current iconv hack but it should at least work properly 2006-03-21 09:14:41 +00:00
bjarni
a59b2b96b0 (svn r3972) changed r3966 to only affect OSX. Too bad linuxes with utf-8 filesystems now got the saving problem again, but now we can compile on all platforms again 2006-03-18 16:37:25 +00:00
bjarni
556e144628 (svn r3966) -Fix: [OSX and some linux] [ 1157244 ] Can't save game if name contains german umlauts
now it saves correctly, but the load window still display some chars wrong (fix by ln-)
2006-03-18 15:55:24 +00:00
tron
1c3e8630fe (svn r3511) More whitespace ([FS#46] by Rubidium) 2006-02-01 07:36:15 +00:00
peter1138
0ad6dc9cc2 (svn r3496) - Validate filename titles before they get displayed. This avoids crashes with UTF-8 encoded or bad filenames by replacing undisplayable characters with a '?' 2006-01-31 12:08:49 +00:00
bjarni
50a1e16943 (svn r3281) -Feature: [OSX] added native cocoa sound and video drivers (egladil)
you can still use SDL drivers if you like and you have to run "make upgradeconf" to start using the cocoa drivers (or manually write WITH_COCOA:=1)
	since SDL breaks the cocoa drivers, you can't compile with both SDL and cocoa support
	Using cocoa drivers makes it easier to make universal binaries and it solves:
	-FS#18 [OSX] SDL is weird in universal binaries
	-FS#2  [OSX] lazy pointer crash on exit
	-FS#10 [OSX] linking error when linking statically to SDL 1.2.8 (needless to explain this, but it means it should be able to compile statically with the default settings now)
	-[ 1215073 ] Switching to large size out of fullscreen crashes
	Using SDL drivers will still have those issues though
2005-12-10 11:16:45 +00:00
bjarni
3923eab424 (svn r3276) reverted the last two commits. OSX 10.2 kept finding new stuff to prevent it from running OpenTTD, so now it's not supported anymore 2005-12-09 13:17:31 +00:00
bjarni
073aae307e (svn r3275) -Fix: [OSX] removed libpng support and error dialogs from jaguar crosscompiles to fix crash 2005-12-09 13:07:21 +00:00
Darkvater
4cc9761cb5 (svn r3097) - Fix (regression): unix has a trailing slash after the paths, windows does not, no idea why os2 has. Way to go consistency :s. So anyways, just strip trailing slash 2005-10-28 00:18:57 +00:00
Darkvater
71fb375f8c (svn r3096) - Feature: 'HOME' icon to saveload dialogs that jumps to the default save/load directory based on the dialog (added icon to openttd.grf, introduced FIOS_TYPE_DIRECT that allows arbitrary directory jumping).
- Fix: on Win32 capitalize the drive-letter in the saveload dialog windows when it is first opened.
2005-10-28 00:09:59 +00:00
tron
c042fd3de3 (svn r3055) Give the savegame/scenarion sort order flags symbolic names 2005-10-17 19:57:00 +00:00
Darkvater
a948fcb605 (svn r2906) Fix some threaded saving problems. Now the thread only 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-09-02 16:05:59 +00:00
tron
c7a6af38fe (svn r2882) Some fixes for MorphOS (by tokai)
- 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-21 10:44:57 +00:00
tron
ec0ebea3d7 (svn r2864) Code simplification and diff reduction 2005-08-13 21:35:31 +00:00
tron
207700ac36 (svn r2860) Fix some issues in the savegame/scenario list code:
-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-12 06:37:48 +00:00
tron
df7182017d (svn r2849) Fix r2806: pwd.h is necessary, but only if USE_HOMEDIR is defined 2005-08-11 07:29:24 +00:00
tron
f315c95fa1 (svn r2809) Implement more generic threading functions, which allow more than one thread 2005-08-05 09:15:41 +00:00
tron
484fae74a2 (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
2005-08-05 08:24:12 +00:00
tron
062472161a (svn r2806) Remove unnecessary #includes 2005-08-04 18:02:03 +00:00
tron
984a4c68d6 (svn r2775) Deleting a file can fail, display an error message when it happens 2005-08-01 00:14:22 +00:00
bjarni
7e25cd6240 (svn r2741) -Feature: [OSX] added a window to display asserts on OSX (Tobin) 2005-07-28 21:47:41 +00:00
bjarni
41795423cf (svn r2735) -Fix: [OSX] fixed issue introduced in 2733 where dedicated servers on OSX included sdl.h even when WITH_SDL was not defined (oops) 2005-07-28 09:01:41 +00:00
bjarni
2f2775323f (svn r2733) -Fix: [OSX] solved include issue introduced in 2714, which prevented OSX from opening a window to run the game in (sdl.h was not included anymore) 2005-07-28 08:45:57 +00:00
tron
5fd69294ee (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.
2005-07-27 19:57:12 +00:00
tron
8e9d4df256 (svn r2714) Remove unnecessary includes 2005-07-26 18:24:18 +00:00
tron
030b4c2704 (svn r2710) Simplify dedicated server code a bit and don't compile it at all, if network support ist disabled 2005-07-25 16:33:58 +00:00
bjarni
f1c254befa (svn r2703) - Feature: [OSX] Added a native alert window to show whatever 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 20:47:42 +00:00
tron
647cbd6bdd (svn r2701) Insert Id tags into all source files 2005-07-24 14:12:37 +00:00
tron
393f4b2149 (svn r2691) Separate dedicated video driver and fix bemidi declarations 2005-07-23 17:22:39 +00:00
tron
9bb81b8eef (svn r2688) MSVC and Watcom can't handle identical file names in different directories, oh my... 2005-07-23 15:48:00 +00:00
tron
126fed74d6 (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.)
2005-07-23 15:16:57 +00:00
tron
54cbd01825 (svn r2673) Include functions.h directly, not globally via openttd.h 2005-07-22 07:02:20 +00:00
tron
71140a5768 (svn r2669) Shuffle some more stuff around to reduce dependencies 2005-07-21 22:15:02 +00:00
Darkvater
cda6efd919 (svn r2609) - Feature: remove extension from savegames/scenarios when browsing the folders. 2005-07-17 15:58:47 +00:00
ludde
fd0cee7418 (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
2005-07-15 20:29:06 +00:00
Darkvater
b3779d63ae (svn r2418) - Fix: typo 2005-06-06 12:27:47 +00:00
Darkvater
a6f2b8ae74 (svn r2417) - Fix: threads on morphos are apparently unexistent, so implement stubs for them (tokai) 2005-06-06 12:11:44 +00:00
tron
1273f21ff5 (svn r2405) Simplify a few '? true : false' and '? false : true', especially the latter is confusing 2005-06-04 07:35:12 +00:00
Darkvater
a8601e9f40 (svn r2398) - CodeChange: forgot to update unix and os2 specific files as well. 2005-06-02 19:39:29 +00:00
Darkvater
13c7b2b337 (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
tron
88837fa0b1 (svn r2356) Make check if statvfs() is availible a bit more sensible 2005-05-21 19:42:34 +00:00