Age | Commit message (Collapse) | Author |
|
Another step toward merging XTDwidget.
The only two files not converted (window.h and widget.c) will be done at the very last commit)
|
|
It made no sense to maintain 8 nearly identically arrays when a single one can do the job
Also made the two buttons always use half of the bottom width each, even when resizing
|
|
This was requested by peter1138
|
|
This change is intended to make it easier to make depot behaviour consistent
and faster to code when adding more features in the future
The user interface should hopefully not be affected by this
|
|
This will ensure that you can always get the same list when checking for vehicles in a depot (no need to duplicate code for each place, that needs such a list)
Since the vehicles are only looped once for each redraw, drawing speed is around twice as fast (measured to be 114%-121% faster depending on the number of vehicles in the game)
|
|
WindowEvent, which is now a struct
|
|
contained "service in depot" displayed the stopping in depot string
This turned out to be due to OFB_HALT_IN_DEPOT and OFB_SERVICE_IF_NEEDED using the same bit
It appears that it doesn't matter for the code, so I adapted the string selection code to handle this
|
|
to 'data'.
|
|
PlayerVehWndProc() into WE_CREATE
|
|
depot/hangar (noticed by Neonox)
|
|
large as any type of destinataion (StationID, DepotID, WaypointID) it can hold
DestinationID being a union of these types is just hassle without benefit and cannot be handled correctly everywhere because of local lack of information
|
|
PlayerVehWndProc()
This is possible now that the window number is known when running WE_CREATE and it's a nicer solution
|
|
goto depot button
-Codechange: unified the code for mass goto depot to avoid duplicated code
-Fix: Vehicles already on the way to depots will not be cancelled by mass goto depot (made it really hard to send all vehicles at once)
|
|
clarity
|
|
code to delete an empty shared orders list is now much simpler
cleaned up the code to handle button clicks
fixed an assert if widget 9 was pressed on a list with vehicles for another company
|
|
this makes the list type detection much easier and allowed an if cascade to be turned into a switch case
this also makes it easier to add more list types
|
|
Player(vehicle)WndProc into PlayerVehWndProc
Those 4 unified functions were really much alike, so there was no reason to have so much dublicated code
|
|
{' -> '} else {', tabs between code and comment, etc.
|
|
bit of display code mixed up with the list of vehicles with shared orders (nycom)
|
|
8) with SHARE_FLAG
|
|
at the depot and leave right away.
To tell the difference the status of stopping vehicles will be in red,
while servicing vehicles will be green.
-Codechange: remove some dead code in CmdSendAircraftToHangar() since it is
conflicting with new functionality. Now p2 means the same for all types
|
|
the list is available in the orders window and looks like the list buttons from the station windows (small vehicle)
The button is disabled if the vehicle do not have any shared orders or it got shared orders, but an empty order list
based on a patch by nycom, thought it ended up getting heavily modified
Thanks to TrueLight for proofreading and suggestions
|
|
-Codechange: introduced DestinationID, which is in fact an union of several types
Used in Order struct, so no longer StationID is abused for all targets.
Hangars are a big exception, as they use a station-id with GOTO_DEPOT (go figure)
|
|
label
CodeChange : Move almost all fixed strings from ON_PAINT event to Widget array using WWT_LABEL.
Feature : All "Select Refit Cargo" are now centered, instead of been left aligned
|
|
whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
|
|
|
|
textboxes to only
allow certain patterns (like numbers only)
|
|
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
|
|
convert a Date to/from a YearMonthDay.
-Cleanup: swap ConvertDateToYMD's parameters to make the order consistent with the name of the function.
|
|
BASE_YEAR when comparing _cur_year with a 'full' year.
-Cleanup: replace some magic '1920' values with BASE_YEAR.
|
|
of r5907.
|
|
code. Less code, less data, simply better
|
|
date.[ch]
-Cleanup: fix whitespace related coding style issues in date.[ch]
-Cleanup: make original comments doxygen compatible and remove/change outdated comments
|
|
list for road vehicles, aircraft and ships.
|
|
|
|
|
|
they close themselves
This is unnecessary, because their parents already close them when they get closed
Therefore remove the code for the periodic checks
|
|
scope, CSE for readability, DeMorgan, if cascades -> switch, whitespace, parentheses, bracing, misc.
|
|
|
|
doesn't mean it's in the depot. Use the proper test for this
|
|
|
|
_new_vehicle_id is enough.
|
|
|
|
It serves no real purpose except causing confusion
|
|
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.
|
|
1) Improved the road vehicle allocation (aka slotting) for multistop. Stops can now accept unlimited, er... 256, vehicles.
2) Removed the "wait for stop" feature, because it did not work in practise.
3) Slotting now ignores unreachable stations. Uses NPF at the moment because the old pathfinder cannot do it (yet)
4) Now matter how many vehicles approach a station, they will always be distributed evenly over existing stops.
5) Hopefully the last fundamental change to multistop
|
|
-Codechange: No longer hijack the VS_STOPPED flag when waiting for a slot.
-Fix: Vehicles waiting for slots can still be controlled (sent to depot, orders modified, ...)
-Fix: Vehicles no longer stop on crossings and during overtake operations
|
|
DiagDirection and friends
|
|
optimization in the form of the ternary operator.
|
|
function call for drawing of vehicles.
|