Commit Graph

65 Commits (452652e85e0e10a73e727cc389f125347fc17681)

Author SHA1 Message Date
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
ludde 404575e4d3 (svn r2562) Fix: Merged {NUMU16}, {INT32}. They do the same thing now. 19 years ago
ludde 569a03dd34 (svn r2561) Fix: Remove {COMMA16} and {COMMA8}. Those are not needed anymore. 19 years ago
Darkvater ba8c649fac (svn r2397) - CodeChange: rename all "ttd" files to "openttd" files. 19 years ago
tron 2b16445f26 (svn r2359) Use strecpy instead of str_cat (which was rather a cpy than a cat, btw), remove the latter and simplify some constructs 19 years ago
Darkvater b3d7216848 (svn r2208) - Fix: [ 1174237 ] Max loan always in euros, use _opt_ptr instead of _opt (glx) 19 years ago
pasky ff403d04a2 (svn r2129) Reverted r2125 and depending revisions (map size selector in the intro window). Will be done in a separate dialog. This also fixes showing of various rail/road-related strings. 20 years ago
pasky 225aa2ef48 (svn r2125) - Feature: In the intro dialog, show a map size selector below the landscape type selector. 20 years ago
truelight d1e158d6f7 (svn r2046) -Codechange: moved all waypoint code to waypoint.c/waypoint.h
-Codechange: rewrote some functions while moving waypoint-stuff
-Add: added support for 64k waypoints
-Fix: made the waypoint struct a bit more logic (no bit-fucking)
20 years ago
miham 6186162742 (svn r1880) [Codechange] Added isocodes to langfiles and support code to strgen (Lauri Nurmi) 20 years ago
tron 2d48c71e82 (svn r1825) Further style improvements:
- uint16 -> StringID where appropriate
- if cascades -> switch
- remove redundant ifs
- misc. stuff
20 years ago
tron d6d33304bf (svn r1823) Get rid of some ugly cast magic concerning language packs 20 years ago
tron 4683b5a97f (svn r1822) Const correctness 20 years ago
tron 59fa465dce (svn r1821) Move generic string handling functions to string.[ch] and introduce stre{cpy,cat}, see string.h for their semantics 20 years ago
tron bcf4b3b913 (svn r1820) Style cleanup:
- indentation
- 0 -> '\0' in string handling
- whitespaces
- space after for, switch, etc.
- don't treat non-boolean values as boolean
- space before and after binary operators
- bracing style
20 years ago
tron e4913f1de8 (svn r1816) Use char instead of byte for string formatting 20 years ago
tron 3aac710c68 (svn r1815) Remove some unused declarations 20 years ago
tron d3f84347ac (svn r1813) Declare functions implemented in strings.c in their own shiny new header (though i think some of these function don't belong into strings.c) 20 years ago
tron 8f68e8def1 (svn r1810) Move town name generation declarations into a header of their own 20 years ago
darkvater c92bd3abdd (svn r1603) -Fix: unused variable in FormatTinyDate
-Fix: added void to all win32.c functions as well
20 years ago
dominik bb34830bee (svn r1598) Feature: Message history now is stickyable and resizeable
The news messages are now precisely cropped according to pixel width to fit optimal into the window.
Introduced a new date format: DATE_TINY, which is ISOish.
20 years ago
tron 94d5aeabb2 (svn r1594) Convert all undefined parameter lists to (void) and add the appropriate warning flags in the Makefile 20 years ago
darkvater 781648ada3 (svn r1465) -Fix: [1099101] starting year patch goes out of range. Clamped year between 1920-2090 as wel as adding defines for it. 20 years ago
truelight b450603437 (svn r1407) -Codechange: changed a lot around _stations, _vehicles, _towns and _industries
(in prepare of dynamic arrays):
  - DEREF_XXX is changed into GetXXX
  - All direct call are directed via GetXXX
  - struct Industry has now an index-field
  - ENUM'd some stuff
  - Replaced home built loops with FOR_ALL_XXX
  - Added _stations_size, _vehicles_size, ... which gives the length of the
    array (which will be dynamic in the near future)
  - Changed lengtof(XXX) to _XXX_size (e.g. _stations_size)
  - Removed all endof(XXX) (because mostly it was part of a FOR_ALL_XXX)
  - Made the sort-functions of all 4 dynamic
  - Made all 4 Initialize functions more of the same
  - Some minor tab-fixing and stuff
  (tnx to Tron for proof-reading my 100kb patch ;))

  Note for all: please do NOT directly call _stations, _vehicles, _towns and
  _industries, but use the right wrapper to access them. Thank you.
  Ps: please also do not use 'v++', where v is of type Vehicle *.
20 years ago
dominik 1fa1a391dc (svn r1255) Renamed "postfix" to "suffix", for strings and variable names 20 years ago
dominik 13eba00152 (svn r1222) Currency cleanup. Changed some currency symbols according to forum suggestions (thx ChrisCF) and rearranged the currencies alphabetically (except for the major ones). 20 years ago
dominik 38b8b7848f (svn r1215) Feature: You can now make a custom currency by chosing "Custom..." 20 years ago
darkvater d7f4528a57 (svn r1098) -Fix: server without revision build doesn't care about the client's version. Also moved all revision things where it belongs (network.c) 20 years ago
darkvater c21659ae7e (svn r1093) -Fix: Hopefully fixed windows revision issues once and for all. Removed globalness of _openttd_revision and put all such ifdefs into one place. If server has a revision only the same revisions can join; if the server has no revision everyone can join. I reckon this should be a server-side option to allow people to join or not to join. 20 years ago
truelight b0fa342aaa (svn r1090) -Fix: Made the _openttd_revision variable global, and with that
hopefully killed the windows-revision problem. If WITH_REV is defined, 
for both Windows as *nix system _openttd_revision is filled with normal 
info, else _openttd_revision is set to 'norev000'
-Fix: Small possible server-crash
20 years ago
tron 265ac67183 (svn r901) Small step in the process to clean up the DPARAM mess:
- reduce to 2 sizes (*DParam64 for 64bit values, *DParam for the rest)
- use inline functions instead of macros
- add assert()s to check for buffer overruns
20 years ago
tron acbd1801c7 (svn r815) Include strings.h only in the files which need it.
This should reduce the compile time after altering english.txt by about 1/3, because "only" 62 instead of 90 .c files must be recompiled.
20 years ago