summaryrefslogtreecommitdiff
path: root/vehicle.h
AgeCommit message (Collapse)Author
2006-10-17(svn r6800) -Feature change: [train is lost] message is now generated ↵KUDr
immediately when pathfinder can't find the path. (thanks MeusH, peter1138 and Brianetta for ideas and help).
2006-10-05(svn r6646) -Codechange: [vehicle list window] Cleaned up the drawing codebjarni
This moved a few of the strings and sprites a few pixels. Hopefully this will work out ok.
2006-10-04(svn r6637) -Codechange: merged all (vehicle type)EnterDepot into ↵bjarni
VehicleEnterDepot() This revealed duplicated code like aircraft lists got invalidated twice Moved invalidation of the vehicle detail window to VehicleServiceInDepot() as it should always be updated when serviced
2006-09-30(svn r6586) -Feature: [depot window] added a vehicle list window with all ↵bjarni
vehicles having a certain depot in their orders It got one known issue though. The top bar got a plural issue so expect to see stuff like "1 trains" until we figure out why it behaves this way Added the button to the depot windows. Made the autoreplace button bigger while I was moving some widgets anyway Made road vehicle depot windows start with one more row to make room for the buttons
2006-09-29(svn r6582) -Codechange: changed GenerateVehicleSortList() to reuse the same ↵bjarni
allocation over and over if possible (like BuildDepotVehicleList() ) This will prevent some reallocations when sorting vehicle list windows It also prevents moving the whole array into a new one each time the list is generated/updated (it used to make the list in one array and then move it into another one each time) Also ensured that neither GenerateVehicleSortList() or BuildDepotVehicleList() will never allocate lists longer than the total number of vehicles in the game
2006-09-27(svn r6532) - Feature: Add support for NewGRF sound effects. Currently sound ↵peter1138
priority isn't supported.
2006-09-24(svn r6503) -Codechange: added a function to tell what vehicles a depot containsbjarni
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)
2006-09-08(svn r6424) -Codechange: [autoreplace] removed a loop though all vehicles ↵bjarni
from each time the window is redrawn To do this, the player struct contains an array, that contains the count of each engine type that the player owns Those arrays are updated each time a vehicle is build or deleted and is calculated on load (it's not saved) It's possible to access the arrays outside of the autoreplace GUI, so feel free to read from them in other patches as well
2006-09-04(svn r6376) -Codechange: [vehicle refit] moved all refit cost calculations ↵bjarni
into GetRefitCost() Now it's possible to tell refit costs for an EngineID without actually having build a vehicle
2006-09-01(svn r6291) -Feature: Vehicle lists from the station window now also got the ↵bjarni
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)
2006-08-31(svn r6282) -Codechange: made a function to create the vehicle list for ↵bjarni
vehicle list windows this list is also used by mass goto depot to ensure that they use the same vehicles right now only the list of all vehicles use this for goto depot, but eventually all the types will use this
2006-08-31(svn r6279) -Codechange (r1525): Use proper const pointers for functions ↵Darkvater
that do not change them .
2006-08-30(svn r6246) -Feature: added the many times requested "send all vehicle to ↵bjarni
depot" button it's located in the vehicle list screen and does the same as in the shared orders window (send all vehicles in list to a depot) it will still not inform the player if a vehicle failed to find a depot, so don't take for granted that all of them go
2006-08-29(svn r6229) -Feature: Shared order lists now got a "goto depot" buttonbjarni
this will try to send all vehicles in the list to depots/hangars currently if one fails to find a depot, it will not tell the player
2006-08-28(svn r6204) -Cleanup: replace non-indentation with spaces; like '}<TAB>else ↵rubidium
{' -> '} else {', tabs between code and comment, etc.
2006-08-26(svn r6157) -Codechange: DeleteVehicle removes a vehicle from the pooltruelight
-Codechange: DestroyVehicle is called by DeleteVehicle to remove all things where a vehicle depends on. Last 2 changes to prepare for new pool system. Not pretty now, will be soon.
2006-08-26(svn r6144) -Codechange: renamed OrderID to VehicleOrderID, because it had ↵truelight
nothing to do with the Order-pool, but with the place of the order within the vehicle-order (hence its name) (part of FS#13, blathijs)
2006-08-26(svn r6137) -Codechange: some very minor cleanups:truelight
- Start using DeleteXXX for every pool item, not manually doing it - Use some wrapper to improve logic - Rewrote some pieces to improve logic
2006-08-22(svn r6055) -Codechange: added GetXXXArraySize, which returns HighestID + 1 ↵truelight
(or, will do that). It isn't the best name, but we couldn't find any better. This unifies the pool-system even more.
2006-08-22(svn r6053) -Codechange: renamed all IsXXXIndex to IsValidXXXIDtruelight
-Codechange: IsValidXXXID now also checks if XXX is really valid, not if the number is within range Both changes again in preperation of the new mem-pool system, which requires this. IsValidXXXID is not a bit less pretty, but that will be cleaned up after the new mem-pool system
2006-08-22(svn r6047) -Codechange: FOR_ALL now _only_ loops valid items, and skips ↵truelight
invalid ones -Codechange: use IsValidXXX where ever possible Note: both changes to prepare for new pool system, which needs those changes. For every pool there are 2 ugly lines, which will be removed when done implementing new pool system. Based on FS#13 by blathijs, partly implemented.
2006-08-22(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. ↵rubidium
whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
2006-08-20(svn r5999) -Feature: change the original date format to a 32 bits format ↵rubidium
based at the year 0. The game date subsystem now allows someone to start in the year 0 and continue up to the year 5 000 000. However, you currently cannot build anything before 1920 as there is no newgrf support for dates before 1920 or after 2090 yet.
2006-08-15(svn r5919) -Cleanup: use the type Date when the variable really is a daterubidium
2006-07-26(svn r5614) Move a type declaration to its only usertron
2006-07-26(svn r5613) Rename VS_DISASTER to VS_SHADOW, because this is what this flag ↵tron
actually means
2006-06-27(svn r5391) Miscellaneous, mostly bracing and whitespace, nothing spectaculartron
2006-06-07(svn r5155) - Remove the bridge branch merge (revision r5070)tron
2006-06-07(svn r5146) - NewGRF: Support selection of aircraft default cargo type by ↵peter1138
checking its refit mask. If aircraft can be refitted to passengers, no change happens, else the first refittable type is chosen. Also use refit capacity to determine the default capacity.
2006-06-04(svn r5094) Remove _new_{aircraft,roadveh,ship,train,wagon}_id. ↵tron
_new_vehicle_id is enough.
2006-06-02(svn r5070) Merged the bridge branchcelestar
-Feature: Bridges can now be placed above: Any railway track combination (excluding depots and waypoints) Any road combination (excluding depots) Clear tiles (duh), including fields Tunnel entrances Bridge heads Thanks to Tron for idea and implementation, KUDr for the yapf synchronization and many others for hours of testing There are still a number of visual problems remaining, especially when electric railways are on or under the bridge. DO NOT REPORT THOSE BUGS FOR THE TIME BEING please.
2006-05-21(svn r4937) Reduce the use of _error_message a bittron
2006-05-19(svn r4910) - NewGRF: add and initialize cargo subtype for vehicle visual ↵peter1138
variations
2006-04-18(svn r4466) -Fix: (FS#71) Game no longer crashes when the last vehicle ↵celestar
serving a station has been deleted. -Negative side effect: upon loading old games, stations whose last vehicle was a station have (temporarily) lower ratings. -Positive side effect: station.h no longer includes vehicle.h (breaks the station.h->vehicle.h->rail.h chain)
2006-04-03(svn r4259) -[multistop] Fix/Feature/Codechange:celestar
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
2006-03-29(svn r4150) -Feature: Merged elrails into trunk. Thanks to Tron for lots of ↵celestar
code and proofreading, thanks to peter1138 for another lot of code and ideas.
2006-03-26(svn r4131) - CodeChange: Add proper semantics for StationID for such ↵Darkvater
variables instead of using the general uint16-type. StationID was added for depots, waypoints and stations where necessary. We probably need to change GetDepot(), IsDepotIndex(), IsStationIndex(), GetWaypoint() and IsWaypointIndex() as well to use StationID.
2006-03-26(svn r4128) - CodeChange: Add proper semantics for CargoID for such ↵Darkvater
variables instead of using the general byte-type.
2006-03-26(svn r4120) Use the new station functions where appropriatetron
2006-03-18(svn r3944) -Feature: it's now possible to turn a single unit in a trainbjarni
control-click on a unit in a train in a depot will make the click unit turn around this is useful if you want "normal" engines to act as dualheaded (one each way) or similar this only works on single unit units. Multiheaded and articulated engines get a red error box this is based on a quick hack peter1138 while I made it network safe and correctly handling of multible unit engines
2006-03-09(svn r3805) - [FS#62] Fix doxygen comments to refer to the correct ↵peter1138
parameter. (sulai)
2006-03-09(svn r3803) Change the second parameter of UpdateSignalsOnSegment() from ↵tron
Direction to DiagDirection as that's what it really operates on
2006-03-08(svn r3783) Replace further ints and magic numbers by Direction, ↵tron
DiagDirection and friends
2006-03-06(svn r3776) Replace many ints and magic numbers by Direction, DiagDirection ↵tron
and friends
2006-03-02(svn r3730) Multistop modifications:celestar
-Codechange: Completely rewritten the slot assignment system. It now consumes less CPU cycles and memory -Codechange: Increased maximum number of roadstops to 16. -Fix: Several conditions where a slot becomes unliked from a vehicle -Codechange: ClearSlot now only takes one parameter, the vehicle -Feature: Console command 'clearslots' to clear ALL currently assinged slots. debug usage only -Feature: vehicles that cannot get a slot now wait on the road instead of planlessly blocking stops or circling around -Codechange: Adjusted debug levels TODO: Make the slot finder compatible with (a) pathfinder(s).
2006-03-01(svn r3701) [2cc] move vehicle/engine palette functions out of header file ↵peter1138
and document the remaining definitions
2006-02-20(svn r3620) - 2cc: Replace use of macro to determine colour map with a ↵peter1138
function call for drawing of vehicles.
2006-02-13(svn r3602) - Move _railveh_score data to _rail_vehicle_info->ai_rank and ↵peter1138
remove global variable to return data as we can now access this directly.
2006-02-11(svn r3589) - Rename u.road.unk2 to u.road.blocked_ctrpeter1138
2006-02-11(svn r3588) - Refit: Use only one global to return the refit capacity rather ↵peter1138
than one per vehicle type.