Commit Graph

120 Commits

Author SHA1 Message Date
rubidium b70c3613fa (svn r9355) [0.5] -Backport from trunk (r8906):
- Feature: translation dependant formatting of dates (r8906)
2007-03-19 22:08:18 +00:00
Darkvater 9e3f020ae8 (svn r8872) [0.5] -Backport from trunk (r8784, r8821, r8823, r8824):
- Unable to load TTDP (on *NIX) games (r8784)
 - Unable to browse directories on *nix if the filesystem is not in UTF-8 charset and special characters are used (r8821, r8823, r8824)
2007-02-24 01:21:31 +00:00
Darkvater f87c8834e2 (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)
2006-12-09 10:56:12 +00:00
Darkvater 4e71091137 (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.)
2006-11-28 14:42:31 +00:00
peter1138 1a4f1c8177 (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. 2006-11-16 22:05:33 +00:00
belugas f48c419467 (svn r6930) -Codechange: Move industry name into IndustrySpec
-Codechange: member color_map is more related to random color, rename it as such
2006-10-24 19:19:25 +00:00
peter1138 4c4da881f0 (svn r6896) - Fix (r6895): Supply last position of the correct buffer *again* 2006-10-22 15:13:48 +00:00
peter1138 9f1163af09 (svn r6895) - Fix (r6884): Add 'last' parameter to the town name generators. 2006-10-22 10:08:49 +00:00
peter1138 697a8fa8c0 (svn r6890) - Fix (r6884): Supply last position of the correct buffer... 2006-10-22 00:05:19 +00:00
Darkvater ee27bb497c (svn r6884) -Codechange: Add strict bounds checking in string formatting system.
The last parameter should point to the end of the buffer (eg lastof(buf))
 Courtesy of Tron.
2006-10-21 23:31:34 +00:00
peter1138 df8b06dec6 (svn r6858) - Fix (r6855): Handle rail vehicles with no capacity (N/A) by setting cargo type to CT_INVALID and handling it later. STR_8838_N_A is not a valid cargo type... 2006-10-20 19:48:25 +00:00
Darkvater 1436bbbc84 (svn r6766) -Codechange: Move _openttd_revision[] into the functions that use it instead of global 2006-10-13 15:52:22 +00:00
peter1138 7be5422d83 (svn r6622) - Add support for NewGRF text includes. (Based on mart3p's patch) 2006-10-03 09:25:42 +00:00
belugas f9ea48bf3d (svn r6454) -Fix(r6108) : Allow custom currency to display both prefix and suffix
-Codechange : Divide rate of conversion from grf by 1000, to match OTTD internal system
2006-09-15 02:52:17 +00:00
tron 7d3685a8ad (svn r6290) -Feature: When automatically detecting the language try to first match language+territory (e.g. de_CH), then just language (e.g. de) and fall back to en_GB otherwise 2006-09-01 08:06:11 +00:00
tron 718c0214bf (svn r6288) -Regression: Restore automatic language detection, which was broken in r4886 when the language codes got extended 2006-08-31 22:07:49 +00:00
rubidium 27cee58ab8 (svn r6204) -Cleanup: replace non-indentation with spaces; like '}<TAB>else {' -> '} else {', tabs between code and comment, etc. 2006-08-28 18:53:03 +00:00
Darkvater 2f6a4bc1a9 (svn r6169) -Codechange: Use GetString() instead of GetStringWithArgs() which should be
integral to strings.c
2006-08-27 10:04:33 +00:00
Darkvater 6540ae18fd (svn r6158) -Revert r6139 as that breaks strings with cases. Thanks michi_cc 2006-08-26 20:54:30 +00:00
Darkvater 0babca183e (svn r6139) -Codechange: strings are StringID. This should be changed in strings.h as well, but you would need to include openttd.h and that opens a whole new can of worms. 2006-08-26 14:39:05 +00:00
belugas c9b32982fc (svn r6108) -NewGRF Feature: Implement currencies replacment via grf file.
All properties can now be modified i.e:
Introduction date for euro conversion
Currency name, decimal separator, currency symbol (before or after amount)
and the rate compared to the base currency, the british pound
2006-08-25 00:41:10 +00:00
truelight 0461d89612 (svn r6047) -Codechange: FOR_ALL now _only_ loops valid items, and skips invalid ones
-Codechange: use IsValidXXX where ever possible
  Note: both changes to prepare for new pool system, which needs those changes.
  For every pool there are 2 ugly lines, which will be removed when done
  implementing new pool system.
  Based on FS#13 by blathijs, partly implemented.
2006-08-22 15:33:35 +00:00
truelight 5fb6c9e1cc (svn r5974) -Codechange: added casts all around the place to make Windows 64bit happy (michi_cc) 2006-08-20 12:09:32 +00:00
rubidium 3cab5f30c0 (svn r5926) -Codechange: make _cur_year contain the full year, instead of the offset since 1920
-Codechange: store all year related variables that are _not_ stored in a savegame/transported over the network in the same format as _cur_year
2006-08-16 11:39:55 +00:00
rubidium a0b4a29a57 (svn r5919) -Cleanup: use the type Date when the variable really is a date 2006-08-15 16:55:40 +00:00
rubidium 1cc6e186f0 (svn r5918) -Cleanup: rename ConvertDayToYMD/ConvertYMDToDay as they really convert a Date to/from a YearMonthDay.
-Cleanup: swap ConvertDateToYMD's parameters to make the order consistent with the name of the function.
2006-08-15 16:49:48 +00:00
rubidium 0d3ccad29f (svn r5916) -Cleanup: use MIN_YEAR/MAX_YEAR for the year boundaries and BASE_YEAR when comparing _cur_year with a 'full' year.
-Cleanup: replace some magic '1920' values with BASE_YEAR.
2006-08-15 15:18:03 +00:00
rubidium 243872b4fd (svn r5887) -Cleanup: move date related functions, defines and variables to date.[ch]
-Cleanup: fix whitespace related coding style issues in date.[ch]
-Cleanup: make original comments doxygen compatible and remove/change outdated comments
2006-08-14 14:21:15 +00:00
Darkvater b5e3718ac4 (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
belugas 94692a2905 (svn r5464) [Behaviour Fix] : When starting the game, the system will now verify the presence of music files in gm forlder.
A song can now be removed from the programmed list (in custom list 1 and 2) by clicking on it.
Added music.c[ch] files, to make it all a bit cleaner.
Now, the name of the gm file is associated with the title of the song.
2006-07-07 02:44:51 +00:00
peter1138 d926fa9f60 (svn r4855) - Fix r4854: Remove 4 character offset, as buff is already in correct place. 2006-05-12 21:48:32 +00:00
peter1138 b7c7ec107e (svn r4854) - Codechange: don't assume a short format month is 3 characters -- copy the string in the same way the other parts
are copied.
2006-05-12 19:30:49 +00:00
belugas c0acac3a14 (svn r4513) Codechange : Assemble a bit the scattered parts of Cargo types. 2006-04-22 01:37:31 +00:00
belugas aab91d287a (svn r4493) Newgrf : Action 04. Beginning of implementation.
Some TODOs left, but the core is there.
Thanks to Peter1138 for code, advice and patience
And to Patchman for letting us define a lot of langids :)
2006-04-21 03:00:20 +00:00
peter1138 a4a891c007 (svn r4340) Add force {FORCE} to the units system. This is currently unused. 2006-04-09 18:25:31 +00:00
peter1138 dcde932043 (svn r4336) Fix units conversion of volume for SI 2006-04-09 14:49:45 +00:00
peter1138 ffadd91ca9 (svn r4322) - Codechange: Remove conversion of kmh to mph from gui code to within the units conversion system, in string.c. This means displaying kmh requires no conversion, instead of being convert from kmh to mph, and then back to kmh again. 2006-04-08 12:04:23 +00:00
peter1138 38a0ef3bc6 (svn r4126) - Feature: A new multi-lingual multi-measuring-unit system:
- Replace miles/kilometres game option with a general measuring units option.
  - Add {POWER}, {WEIGHT}, {WEIGHT_S} and {VOLUME_S} (_S for short) tags to the language/string system.
  - Add SI as option for measuring units.
  Language file updates to use the system will come soon.
2006-03-26 21:50:57 +00:00
Darkvater 9b5d8a9921 (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
tron 49c7eb934b (svn r3613) Some more const, indentation, whitespace and similar stuff 2006-02-18 14:41:24 +00:00
Darkvater c5a669b39f (svn r3529) - Fix: [ 1415782 ] crash in string code with openbsd/zaurus; alignment issues (thanks Tron for the help) 2006-02-03 21:51:42 +00:00
tron 21fb5b5150 (svn r3516) Fix embarrassing bug in r3514 2006-02-01 19:53:17 +00:00
tron 84fb96fe85 (svn r3511) More whitespace ([FS#46] by Rubidium) 2006-02-01 07:36:15 +00:00
tron 22dc05faf2 (svn r3510) Fiddle with whitespace and parentheses 2006-02-01 06:32:03 +00:00
tron 784d41b650 (svn r3192) Split the surname list into two lists (non-toyland/toyland) and use lengthof() to get the number of names instead of using magic numbers 2005-11-16 11:17:52 +00:00
tron b9729fb72e (svn r3185) const 2005-11-15 09:00:02 +00:00
tron f7abff5f96 (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
2005-11-14 19:48:04 +00:00
tron 833032adc0 (svn r3177) GB, CLRBIT, HASBIT, TOGGLEBIT 2005-11-14 08:09:57 +00:00
tron ee15e3de13 (svn r3172) static, const 2005-11-13 13:43:55 +00:00
tron 2cc2154ad2 (svn r3077) static, const, bracing, indentation, 0 -> '\0'/NULL, typos in comments, excess empty lines, minor other changes
nothing spectacular, just some stuff, which piled up
2005-10-22 06:39:32 +00:00