Commit Graph

96 Commits (ca226df7398391adb3f4eda21aeaf593df05bdba)

Author SHA1 Message Date
rubidium f4762cdae4 (svn r5919) -Cleanup: use the type Date when the variable really is a date 18 years ago
rubidium 7d2ceb2063 (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.
18 years ago
rubidium c55962f8a2 (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.
18 years ago
rubidium 9fc837ad85 (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
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
belugas 351c878365 (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.
18 years ago
peter1138 c2019a32ae (svn r4855) - Fix r4854: Remove 4 character offset, as buff is already in correct place. 18 years ago
peter1138 593aa609ab (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.
18 years ago
belugas 235082dfcd (svn r4513) Codechange : Assemble a bit the scattered parts of Cargo types. 18 years ago
belugas bbb2c58456 (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 :)
18 years ago
peter1138 ba0bc756b6 (svn r4340) Add force {FORCE} to the units system. This is currently unused. 19 years ago
peter1138 f4e0e91ee2 (svn r4336) Fix units conversion of volume for SI 19 years ago
peter1138 59ace676eb (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. 19 years ago
peter1138 67bc818bbe (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.
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
tron 7692556c62 (svn r3613) Some more const, indentation, whitespace and similar stuff 19 years ago
Darkvater e57ea5e57d (svn r3529) - Fix: [ 1415782 ] crash in string code with openbsd/zaurus; alignment issues (thanks Tron for the help) 19 years ago
tron b197b9422f (svn r3516) Fix embarrassing bug in r3514 19 years ago
tron 1c3e8630fe (svn r3511) More whitespace ([FS#46] by Rubidium) 19 years ago
tron 9712d6f639 (svn r3510) Fiddle with whitespace and parentheses 19 years ago
tron 1d9e838a2b (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 19 years ago
tron 8a3587fa28 (svn r3185) const 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 524fd25cbd (svn r3177) GB, CLRBIT, HASBIT, TOGGLEBIT 19 years ago
tron 81e5b16d71 (svn r3172) static, const 19 years ago
tron 0b936c3222 (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
19 years ago
tron f0e3072b6c (svn r2994) Another small hack regarding currencies: add a #define to emulate a variable, that holds the current currency; again this should increase readability 19 years ago
tron 2ce1cdd03f (svn r2936) Move string commands to a non-printable range and remove stale comments 19 years ago
tron f0393bc4b1 (svn r2879) Major step twoards ISO-8859-15
Add several missing chars:
- Š/š (S with hacek, all sizes)
- Ž/ž (Z with hacek, all sizes)
- Œ/œ (OE ligature, all sizes)
- Ð/ð (eth, large font was missing)
- Þ/þ (thorn, large font was missing)
- º   (male ordinal sign, all sizes)
Also move Ÿ (Y with umlaut, all sizes) to the correct position in the charset
To add some chars it was necessary to shuffle some OTTD specific chars (arrows, transport type markers) around
19 years ago
tron b62887b973 (svn r2815) Store the currency information in one central place instead of scattering it in several unrelated files 19 years ago
tron 398301c7df (svn r2777) -Feature: When starting without a config file determine the language on basis of the current locale 19 years ago
tron c043670cf8 (svn r2717) Move _userstring to strings.[ch] 19 years ago
tron 647cbd6bdd (svn r2701) Insert Id tags into all source files 19 years ago
tron 54cbd01825 (svn r2673) Include functions.h directly, not globally via openttd.h 19 years ago
tron 71140a5768 (svn r2669) Shuffle some more stuff around to reduce dependencies 19 years ago
tron 6ad3895306 (svn r2660) Get rid of some more shifting/anding/casting 19 years ago
tron f09638ad3d (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 d4e424bc48 (svn r2641) Fix: [strings] forgot to increase argv pointer twice for {CARGO} 19 years ago
tron 6500fd2b91 (svn r2632) Revert accidently commited change 19 years ago
tron bce6f5c0a5 (svn r2631) Move screenshot related variables from variables.h to screenshot.[ch] 19 years ago
Darkvater 5261529887 (svn r2617) - Fix: fix some warnings, and reenable vs.net2003 signed/unsigned warnings 19 years ago
ludde a419ed0bd4 (svn r2597) Feature: [string system] Support cases.
- Cases are used to change a string, such as Coal Mine, depending on the surrounding context.
  - Cases are defined like "STR_4802_COAL_MINE.ack  :Coala Mina"
  - All cases need to be listed on the top of the file like this "##case ack"
  - When using the string, type {STRING.ack} to choose the "ack" version of Coal mine.
  - Also combined the strgen arrays into a struct, and fixed a bug with SetXY.
19 years ago
ludde 594dd34e84 (svn r2594) Fix: [strgen] Misc updates to the string system.
- Renamed the plural command to "P" instead of "PLURAL". Now write something like this to append an s on plural: {P "" s}. (You can optionally still add an argument index to explicitly specifiy which number that's used)
  - Removed the pluralized cargo strings from the string files. The new method is to use the plural specifier {P}
  - Added support for genders. First add "##gender der das die" on top, then use {G=der} on a cargoname/industry to set the gender, and to switch between genders do something like {G neu neu neue} {STRING}
  - Updated the swedish/english translation with P strings.
19 years ago
ludde ec8a15d191 (svn r2592) Feature: [strgen] New way to specify plural forms.
- {NUM} {PLURAL 0 car cars}: Prints either car or cars depending on if the argument 0 is plural.
    Also supports languages with weird plural forms such as Polish. 
    The plural format needs to be specified in the beginning of the langfile, like "##plural 7" for Polish.
19 years ago
Darkvater bc11fe03ee (svn r2585) - Fix [Makefile]: some small cleanups, remove warnings, and add mersenne to makefile (Luca) 19 years ago
ludde dc3ca73bd5 (svn r2580) Change: Added {INDUSTRY} command for printing industry names instead of the old {TOWN} {STRING} way.
- The formatting of the industry name can be controlled with the string STR_INDUSTRY_FORMAT.
Change: Changed several occurences of {STRING1} into {TOWN} to get rid of townnametype being used directly.
19 years ago
ludde 275e2f477a (svn r2572) - Codechange: [string] Changed string system so it's not as dependent on decode_parameters
- Feature: [strgen] Allow changing the order of parameters in translated strings.
  - Use {1:TOWN} syntax to set the order.
- Codechange: [strgen] Rewrote lots of strgen internals.
19 years ago
tron d364efea27 (svn r2566) Rename COMMA{8,16,32} to just COMMA, because it's the same anyway 19 years ago
ludde 20b7c66f7f (svn r2565) Fix: Remove GetParamInt8, GetParamInt16, GetParamUint16.. they are just confusing and just do the same thing as GetParamInt32 19 years ago
ludde 8086017097 (svn r2564) Fix: Fixed conceptual issue in network_gui.c. AllocateName is not meant to be used by GUI-code, because it modifies the "game-state".
Added a way to bind a C-string to an openttd string which doesn't modify the game state.
19 years ago