Commit Graph

160 Commits (b05233c51d6bbe759f9d6debf7bc59f35bd75ac1)

Author SHA1 Message Date
Darkvater bde8e9ee44 (svn r7468) -Codechange: [win32] Add some comments to MB/WIDE_TO_WIDE/MB_[BUFFER] macros and
use them some more in win32 code. Also for the clipboard use the convert_from_fs
 function instead of calling Win32 API directly. Make the static buffers in OTTD2FS
 and FS2OTTD the same size (character-length wise)
18 years ago
Darkvater f0e1f9842d (svn r7467) -Cleanup: [win32] Disable the submit-savegame-on-crash code as we (webserver)
doesn't do anything with it and the button has been disabled for ages.
18 years ago
Darkvater e3d94c6e12 (svn r7466) -Cleanup: [win32] Coding style, indentation, variable localization. 18 years ago
Darkvater 533034780b (svn r7460) -Fix (r7337): [win32] If the underlying OS didn't have support for SHGetFolderPath the
application failed to run. Now test if the function exists and if not try a different
 approach using our own OTTDSHGetFolderPath wrapper.
18 years ago
Darkvater 1422f6a17a (svn r7449) -Codechange: Rename _path to _paths as it is technically more correct, but mainly because
it interferes with OS/2 symbol in libc (psmedley)
18 years ago
Darkvater 9a5a37abbe (svn r7333) -Codechange: [win32] Extend the OTTD2FS and FS2OTTD functions to also accept conversions
into a predefined buffer insted of using the static (global) buffer. This is useful if
 the converted value will be used later on; no need to copy it somewhere else to save it.
-CodeChange: [win32] Added appropiate macros WIDE_TO_MB_BUFFER, MB_TO_WIDE_BUFFER next to
 existing WIDE_TO_MB and MB_TO_WIDE that only do work when UNICODE is defined, saves
 #ifdefs all over the place
18 years ago
Darkvater 8d29e3efdb (svn r7278) -Codechange: [win32] Add UNICODE support so it should compile on OS's using UNICODE
API exclusively.
18 years ago
Darkvater bf907c8d3c (svn r7274) -Codechange [utf8]: Add input/output unicode support. This actually only changes win32
since it uses UTF16 for file access. To keep os-specific code to a minimum, OpenTTD
 uses UTF8 internally everywhere, converting to OS-type when needed (save/load/screenshot/etc.)
18 years ago
Darkvater 1a87a33911 (svn r7200) -Codechange: remove unneeded redraw (console.c), coding style, use FindWindowById
instead of _windows loop (viewport.c), remove dump-code (mixer.c), MSVC6 borkdness
 in stdafx.h, constness (viewport.c), variable localization (win32.c), comments (window.c)
18 years ago
peter1138 f660d48e6a (svn r7182) -Feature: Merge utf8 branch. This brings us support for Unicode/UTF-8 and the option for fonts rendered by FreeType. Language changes to come. 18 years ago
Darkvater 5b67443d04 (svn r6421) -Revert r6420: The dedicated server's console actually needs to work. It misses half the input at the moment. Sorry, too hasty commit. 18 years ago
Darkvater c1fa005024 (svn r6420) -Feature [Win32]: Use an existing console if openttd was started from one.
Unfortunately this only works for WindowsXP or higher, all older MS-OS's
 are stuck with the old behaviour.
18 years ago
truelight be345323f6 (svn r6089) -Backport r6088: added -s (source) and -d (destination) to strgen (Darkvater) 18 years ago
rubidium 5540485fd8 (svn r6086) -Fix: InteractiveRandom was not seeded properly resulting in the dedicated server always generating the same map. Thanks to the #openttdcoop team for detecting. 18 years ago
truelight 73cd71db04 (svn r5974) -Codechange: added casts all around the place to make Windows 64bit happy (michi_cc) 18 years ago
truelight 7abad2b20e (svn r5946) -Add: merged the TGP branch to mainline. TGP adds:
- New optional landscape generator (TerraGenesis Perlin)
  - Load heightmaps (either BMP or PNG)
  - Progress dialog while generating worlds (no longer a 'hanging' screen)
  - New dialogs for NewGame, Create Scenario and Play Heightmap
    - Easier to configure your landscape
    - More things to configure (tree-placer, ..)
  - Speedup of world generation
  - New console command 'restart': restart the map EXACTLY as it was when you
      first started it (needs a game made after or with this commit)
  - New console command 'getseed': get the seed of your map and share it with
      others (of course only works with generated maps)
  - Many new, world generation related, things
  - Many internal cleanups and rewrites
  Many tnx to those people who helped making this:
     Belugas, DaleStan, glx, KUDr, RichK67, Rubidium, and TrueLight (alfabetic)
  Many tnx to those who helped testing:
     Arnau, Bjarni, and tokai (alfabetic)
  And to all other people who helped testing and sending comments / bugs
  Stats: 673 lines changed, 3534 new lines, 79 new strings
18 years ago
truelight d3f2180438 (svn r5944) -Merge TGP (r5578, r5579, r5724, r5726): -Feature: filter for textboxes to only
allow certain patterns (like numbers only)
18 years ago
Darkvater 50d2530adc (svn r5836) - Silence a warning on mingw. Thanks glx. 18 years ago
Darkvater 1f006f2062 (svn r5831) - Fix (r5765): regression regarding windows filetimes. st->st_mtime's type time_t is only 64bit on windows64, so we need to convert it. 18 years ago
Darkvater 597f64f07d (svn r5801) - Codechange: The exception dialog showed the last modification-date of win32.c instead of the last compilation-date. Use __DATE__ __TIME__ instead of __TIMESTAMP__; only affected windows not built with mingw/cygwin. 18 years ago
Darkvater 50616a9e13 (svn r5769) - Fix (r5762): fix some mistakes in the opendir code and filesize calculation. Thanks to Tron for noticing (and fixing). 18 years ago
Darkvater 97c3b5cad8 (svn r5767) - Cleanup: Improve upon the header file mess regarding fios. Move all relevant types from hal.h into fios.h, eliminate the unneccessary passing of a global variable, and extern variables in header files (declare in fios.c and misc_gui.c 18 years ago
Darkvater 54f199e495 (svn r5766) - Cleanup: Unify FiosBrowseTo and FiosGetDescText 18 years ago
Darkvater bd458586a0 (svn r5765) - Codechange: Fully unify the OS-specific FiosGet...List functions into fios.c, as well as FiosGetSavegameList and FiosGetScenarioList functions with the help of some callbacks. 18 years ago
Darkvater 48ea9fde32 (svn r5764) - Cleanup: - Cleanup: Move the now unified FiosAlloc, compare_FiosItems, FiosFreeSavegameList, FiosMakeSavegameName, FiosDelete and FileExists to newly created file fios.c where it belongs.
- Fix: forgot to remove GetLanguageList from functions.h in previous commit
18 years ago
Darkvater dcda134080 (svn r5763) - Cleanup: Move the now unified GetLanguageList and comparator function to strings.c where it belongs. 18 years ago
Darkvater 9e0fb16d0e (svn r5762) - Codechange: Implementation of POSIX-style opendir/readdir/closedir functions for windows using FindFirstFile/FindNextFile/FindClose.
- Add new header file fios.h that will be the place for all FIOS (game-list) types.
18 years ago
Darkvater cb1a3e095d (svn r5698) - Fix [r5697]: don't remove ctype include for win32.c; needed for toupper...ugh 18 years ago
Darkvater b79774e710 (svn r5697) -Fix [r5684]: tolower() was undefined for certain architectures, strangly VS2003 didn't complain, VS2005 did. Thanks glx 18 years ago
belugas 5f358a5b7b (svn r5393) CodeChange : Little typo correction. Nothing spectacular. Only broke in MSVC 18 years ago
tron 772fbda3e3 (svn r5391) Miscellaneous, mostly bracing and whitespace, nothing spectacular 18 years ago
glx 19464e028a (svn r4807) - Fix: win32 compilation was broken by r4802 19 years ago
Darkvater 61fc5a0d81 (svn r4560) - Fix: (r3008) Remove VS2005 undefined vsnprintf() as it doesn't exist in the windows libraries (only _vsnprintf). This caused the bad function to be called that could result in non-properly terminated strings. Thanks for noticing Tron. 19 years ago
Darkvater c8a85d5419 (svn r4301) - Fix: the maxlength parameter of Textbuf is supposed to be the size of the buffer (so length of string + '\0'), but in the code it was a mix of both. It didn't cause any problems though, only an occasionaly one-less character than allowed. (thanks Tron for noticing) 19 years ago
orudge d3fdba9556 (svn r4203) - Fix compilation on mingw32 (stdint.h not included) 19 years ago
Darkvater c9bf9b7553 (svn r4125) - Feature: Add a general TIC() TOC() mechanism using rdtsc or something similar on non-i386 architectures to performance-tune (critical) code. Some systems are probably missing, but those can be added later. 19 years ago
Darkvater f829fa2a73 (svn r4124) - CodeChange: remove windows-specific code from initializing the random generator. There was no need for it. 19 years ago
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.
19 years ago
Darkvater 413dd85cd7 (svn r4001) - Add length parameter to FiosMakeSavegameName() and use this function for creating the full path instead of home-brewn snprintf. 19 years ago
Darkvater bf3fefb129 (svn r3872) - [win32] Show the revision in crash.txt and enable the button to show the crash text in the crash-window 19 years ago
tron 1c3e8630fe (svn r3511) More whitespace ([FS#46] by Rubidium) 19 years ago
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 '?' 19 years ago
Darkvater 0855449106 (svn r3442) - Fix: Only windows has stricmp. So define strcasecmp to stricmp when using MSVC 19 years ago
peter1138 32d75fd922 (svn r3309) Cygwin doesn't define _MSC_VER; check it exists before basing decisions on its value. 19 years ago
tron 9d0e7b6458 (svn r3181) -Bracing
-Indentation
-Whitespace
-DeMorgan's Law
-Test with NULL or 0 for non-booleans
-'\0' instead of 0 for chars
-Remove redundantly redundant comments (like DoFoo(); // Do foo)
-Join multiple short lines with a single statement
-Split single lines with multiple statements
-Avoid assignments in if
19 years ago
tron 388c7df1d7 (svn r3163) Include header for toupper() 19 years ago
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 19 years ago
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.
19 years ago
Darkvater 687cfa8a1b (svn r3061) - CodeChange: revert r3056, r3057 and add a simpler fix to satisfy the needs of the absolute strict (eg. root directory is C:\ not C:) 19 years ago
Darkvater 82d0f525e5 (svn r3057) - (Post)Fix: fix backslash occurence in all cases, also when going to root directory through 'parent directory', and of course don't show parent dir in root. 19 years ago