Age | Commit message (Collapse) | Author |
|
comments, aligning arrays etc...
|
|
their actual use, and add "Close Window" tooltip where missing.
|
|
-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
|
|
|
|
|
|
- const, whitespace, indentation, bracing, GB/SB, pointless casts
- use the trinary operator where appropriate
- data types (uint[] -> AcceptedCargo, ...)
- if cascade -> switch
- if (ptr) -> if (ptr != NULL)
- DeMorgan's Law
- Fix some comments
- 0 -> '\0', change magic numbers to symbolic constants
|
|
0/-1 -> INVALID_ENGINE
0x10 -> OWNER_NONE
|
|
don't pass them
|
|
attribute of stations
|
|
int/uint/int16/byte/-1 with proper types and constants
|
|
proper types or just removing them
|
|
s/byte/PlayerID/
s/int/PlayerID/
and related changes
|
|
|
|
|
|
|
|
- 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.
|
|
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.
|
|
|
|
|
|
|
|
of abusing _decode_parameters as text buffer. This should prevent several possible buffer overruns and is a bit cleaner to use. As bonus it reduces the size of most command packets by 79 bytes.
|
|
GetPlayer(). Bouys and oilrigs don't have owners, so it cannot get the vehicle-list of the station-owner. Just use _current_player
|
|
|
|
|
|
|
|
- Fix: fix some VS.NET warnings
- Add missing file to VS.NET project file
|
|
|
|
drawing functions and buffers
|
|
new header (though i think some of these function don't belong into strings.c)
|
|
|
|
|
|
(and should be an uint16, not uint8)
|
|
appropriate warning flags in the Makefile
|
|
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 *.
|
|
widgets. Sticky/Resize- and Scrollbar must be 11 pixels wide, Horizontal scrollbar 11 pixels high, caption must be 13 pixels. I hope I didn't forget any widgets, the game will assert for that so report them to me!
|
|
find out
how the system works. All useful windows are already made resizable. Enjoy :)
-Fix: fixed some GUI-glitches and flaws along the way
|
|
loaded as
an uint8 till the savegame version is bumped to version 5. Then it works
automaticly as a fully uint16. So _stations[] can not be increased till
after the bump!!
|
|
three), Stations (list & window) and Towns (list & window). I hope I didn't forget to update a widget somewhere :O
-Feature: With the sticky windows on and some unfortunate resizing of your game it the 'close' button might go outside of the playing field, making it impossible to close. Added an option to the Options menu that closes all windows, even if they are stickified ("Close ALL windows")
|
|
|
|
This adds a little button per vehicle class to the station window which opens a list of all vehicles that have this station on their schedule.
As side effect this gets rid of some global variables.
|
|
- 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
|
|
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.
|
|
hope I got it right this time.
|
|
overflow it anywhere (as long as we keep USERSTRING_LEN above 7 or so).
|
|
-Fix: Correctly resorting vehicle list of player when the list of another player is open.
|
|
for your diligent fixing of warnings (and some possibly bugs) (Tron)
-CodeLayout: Remove trailing spaces and Windows linebreaks
|
|
|
|
-Fix: added WIDGETS_END macro for WWT_LAST which does this for all last widget-types
|
|
Forgot to change owner-sort after changing function.
-Codechange: some more asserts to vehicle-sorts to quickly find any possible problems.
|
|
different criteria. Total independent sort for all types and players. Periodic resort of list every 10 TTD days. Thank you for your graphical inspiration follow and buxo (since none of you provided any code).
-Fix: Sorter icon pointing down 'v' sorts in every window lowest value first, '^' highest value first
-CodeChange: move Dropdownlist from settings_gui.c to widget.c. More in place there.
|