summaryrefslogtreecommitdiff
path: root/vehicle.h
AgeCommit message (Collapse)Author
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.
2006-01-29(svn r3472) - [PBS] Remove from trunk. Anyone interested can still find it ↵Darkvater
in branch/pbs. This reverts revisions r3158, r3140, r3075, r2977, r2674, r2625, r2621, r2529, r2528, r2525, r2524, r2519, r2517, r2516, r2507, r2499. (in conjunction with Tron) - The only change is that the nsignalsw.grf file is kept and that existing nightlies with PBS signals get those signals converted to combo-signals.
2006-01-18(svn r3403) -Codechange: [multiheaded engines] the references between the ↵bjarni
front and rear engines are no longer saved instead the pointers are generated on load
2006-01-12(svn r3396) - Autoreplace changes:peter1138
- Change fixed array per player to a single pool. This avoids future problems with vehicle numbers and decreases savegame size. Engine replacements from previous savegames will be lost. - Move engine replacement code from players.c to engine.c. (thanks to blathijs for rewriting this)
2006-01-05(svn r3366) Make an unnecessarily global variable localtron
2006-01-05(svn r3365) Staticise 36 functionstron
2006-01-04(svn r3362) Fix issue with loading old (TTD) savegames:peter1138
- move call to convert from old to new train subtypes. - ensure AI is started for AI players.
2005-12-29(svn r3353) Simplify the automatic length adjustment algorithm for replacing ↵tron
trains: Use the length of the train before the replacement as reference length
2005-12-28(svn r3352) - NewGRF: Move initialization of vehicle random_bits to DC_EXEC ↵peter1138
blocks to allow use of Random() instead of InteractiveRandom(), which will alleviate some possible network desyncs.
2005-11-29(svn r3248) - Codechange: Change interface of CanRefitTo() to supply the ↵peter1138
engine type directly instead of getting it from a vehicle. This allows the function to be used before vehicles are involved.
2005-11-18(svn r3218) -Feature: Multiheaded train engines will now stay in the same trainbjarni
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
2005-11-16(svn r3208) Don't explicitly pass the engine type to look for to ↵tron
GetRearEngine(), because it's the engine type of the vehicle which gets passed as first parameter
2005-11-16(svn r3200) Remove the unused function GfxScalePalette() and the unused ↵tron
struct WorldSprite