Age | Commit message (Collapse) | Author |
|
|
|
committing here :)
|
|
well
|
|
servicing, the NON_STOP flag failed the command.
|
|
their actual use, and add "Close Window" tooltip where missing.
|
|
This means that any user attempt to remove a rear engine will tell the user to move the front engine instead
This fixes the assert when moving multiheaded engines (introduced in r3144)
Note: to make old savegames use this feature, some engines might be turned around in order to link engines in pairs
-Codechange: train subtype is now a bitmask
This allows fast access to info like if it is a wagon or engine and if it is in front and so on
Note: savegame version bump
|
|
magicnumbers)
-Codechange: IsRailWaypoint should take 'tile', not 'm5'
|
|
|
|
-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
|
|
Also align short cases nicely
|
|
- 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
|
|
comments, excess empty lines, minor other changes
nothing spectacular, just some stuff, which piled up
|
|
functions that don't change their pointer parameters
- change a lot of byte player types to PlayerID
- beautify header files, same "#endif /* filename */" ending
|
|
|
|
|
|
new string system.
Also fixed a bug introduced in r2564, forgot to remove 4 global variables in network_gui.c.
|
|
structs, this doesn't change the saved format for now. It's a stepping stone for further changes.
|
|
|
|
|
|
|
|
|
|
some bogus reads of _map_owner
|
|
|
|
for this was buggy, fundamentally flawed and barely useful. (Hackykid)
|
|
- Add: GetVehicleTrackdir() helper function.
- Codechange: Moved SortStruct from vehicle_gui.h to ttd.h, so the dependency from vehicle.h on vehicle_gui.h could be removed.
- Codechange: Typedeffed the VehicleTypes struct so it can be used as the type for Vehicle.type instead of "byte".
- Codechange: Removed prototype for VehicleSorter(), which had no implementation anymore and was never called.
|
|
-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)
|
|
flags for depots by something more meaningful
|
|
|
|
|
|
enter other players' depots. TODO
- Add: asserts to find the v->u.rail.track == 0 problem.
- Add: IsValidDepot(), IsValidTown(), IsValidSign(), IsValidVehicle(), IsValidStation()
- Add: GetTileOwner(), IsTileOwner()
- Codechange: Replaced IsShipDepotTile(), IsTrainDepotTile(), IsRoadDepotTile() by IsTileDepotType().
- Codechange: typedeffed the MAP_OWNERS as Owner. Should be used as variable type.
- Codechange: Replaced a few uint by TileIndex.
|
|
to Tron)
|
|
|
|
-Codechange: Added wrappers around depot-access (GetDepot no exists)
-Codechange: Made depot-functions a bit more logic (no longer
GetDepotByTile crashes your game when you request it on a non-depot tile)
-Add: made depots dynamic (yes, 64k depots are possible now)
|
|
disabled Full Load button
|
|
|
|
[GS]etTileType() instead of plain int.
This makes it necessary to rename TileType() to GetTileType() because a type and a function may not share the same name.
|
|
single tile from map.h and put them into a seperate file tile.h
|
|
|
|
|
|
|
|
saveroutine to
crash from time to time
-Codechange: added const before 'Order *' where possible
|
|
them into inline functions and add some asserts
|
|
-Codechange: renamed all 'schedule' stuff to 'order(list)'
-Codechange: moved all order-stuff to order_cmd.c / order.h
-Codechange: vehicles that share orders are now linked to eachother
with next_shared/prev_shared in Vehicle
Developers: please use AssignOrder to assign data to an order. If not,
you _WILL_ make the save-routine to assert!
|
|
|
|
|
|
had most
of the code written 4 - 8 times in the code.
This currently causes the "non-stop" button to appear for all
vehicles, which is disabled all the time. Don't report this as a bug
please.
This is (hopefully) the first patch in a joint effort to simplify
the order system
|
|
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
|
|
Works fine, beside some minor stuff:
- Network is not working yet
- Keyboard is not working
- No MIDI support
- 'A few file selector bugs involving drives'
|