Commit Graph

63 Commits (009e8cf00127c2bfbb009eae04d24e0bf4a4a520)

Author SHA1 Message Date
frosch bc19dd6a25 (svn r18566) -Codechange: When both the union and intersection of refit masks of articulated vehicles are needed, they can be determined at once. 15 years ago
peter1138 d2ee7941f5 (svn r17911) -Codechange: bool * is a pointer, not a bool 15 years ago
frosch 1996e93edf (svn r17907) -Codechange: Deduplicate result interpretation of articulated vehicle callback. 15 years ago
frosch 241415e76a (svn r17728) -Cleanup: Remove some more unneeded/unused parameters. 15 years ago
frosch b25f03a447 (svn r17726) -Cleanup: Remove some unneeded/unused parameters. 15 years ago
frosch 2adc2f4324 (svn r17700) -Codechange: Integrate ShipVehicleInfo::refittable into EngineInfo::refit_mask during initialisation. 15 years ago
frosch a9717da0d3 (svn r17684) -Fix: tcache.first_engine and rcache.first_engine need to be set before first callback/sprite-resolving. For RV fronts it was missing at all, causing livery selection to fail. 15 years ago
rubidium c2c0f4403e (svn r17534) -Codechange: unify the naming of callback masks/flags 15 years ago
rubidium 99d46e0ad7 (svn r17248) -Fix: add GPL license notice where appropriate 15 years ago
smatz 32bf91aa41 (svn r16723) -Codechange: make GetNextArticPart(), GetLastEnginePart(), GetNextVehicle(), GetPrevVehicle(), GetNextUnit(), GetPrevUnit() members of Train 15 years ago
rubidium 18fbe0aac4 (svn r16722) -Codechange: unify the naming of the Is/Set/HasArticulatedPart functions 15 years ago
rubidium f97bd41ed4 (svn r16721) -Codechange: make Is/SetRoadVehicleFront, Is/Set/HasArticulatedPart member of RoadVehicle. 15 years ago
smatz 9b10bc9cdf (svn r16720) -Codechange: make Set/ClearFrontEngine(), Set/ClearArticulatedPart(), Set/ClearWagon(), Set/ClearEngine(), Set/ClearFreeWagon() and Set/ClearMultiheaded() members of Train 15 years ago
smatz 1e1f0ab2cf (svn r16719) -Codechange: make IsArticulatedPart(), IsTrainEngine(), IsTrainWagon(), IsMultiheaded(), EngineHasArticPart() and IsRearDualheaded() members of Train 15 years ago
frosch ce55eda3e1 (svn r16679) -Codechange: Let GetCapacityOfArticulatedParts() return a CargoArray instead of a pointer to a static array. 15 years ago
smatz af85994f7f (svn r16527) -Codechange: use static member functions instead of simple casts when converting Vehicle to specialised vehicle types. Includes safety check 15 years ago
rubidium 37b391901a (svn r16426) -Fix [FS#2921] (r16390): articulated parts got the wrong image assigned 15 years ago
rubidium c496a3e014 (svn r16421) -Codechange: do not unnecessarily remove constness or unnecessarily add it. 15 years ago
frosch e60a1ec090 (svn r16412) -Cleanup: Shuffle vehicle pointers in AddArticulatedParts(), and remove two of them. 15 years ago
frosch 8ae1c5d908 (svn r16411) -Fix (r16390): Building articulated roadvehicles caused infinite loop due to v->Next() pointing to v itself. 15 years ago
rubidium cd382b28a3 (svn r16394) -Codechange: move (NewGRF) cache variables into a separate struct so (some vehicle related) NewGRF cache 'desyncs' can be tested easier. 15 years ago
rubidium 4c0542c17f (svn r16393) -Codechange: move VehicleRail to Train. 15 years ago
rubidium 6350648a6c (svn r16392) -Codechange: move some variables (the ones that aren't caches) from VehicleRail to Train 15 years ago
rubidium 1324100d69 (svn r16391) -Codechange: use Train instead of Vehicle where appropriate. 15 years ago
rubidium 489253b630 (svn r16390) -Codechange: move u.road to RoadVehicle. 15 years ago
smatz 50624d5c0f (svn r16378) -Codechange: replace OldPool with simpler Pool. Compilation time, binary size and run time (with asserts disabled) should be improved 15 years ago
smatz d495dc5dbc (svn r16325) -Codechange: replace GetPoolItem(index) by PoolItem::Get(index) 15 years ago
frosch 2431cc099e (svn r16303) -Codechange: Use the question mark as default sprite when creating vehicles, instead of arbitrary sprites not related to the vehicle. (though that also applies to the question mark) 15 years ago
smatz c189a15e3e (svn r16302) -Codechange: remove Vehicle::AllocateList 15 years ago
frosch c297a99eff (svn r15763) -Codechange/Fix: Add Engine::GetDisplayDefaultCapacity() and use it everywhere, so CB 36 is also used everywhere. 15 years ago
frosch d86e821f53 (svn r15701) -Fix [FS#2595]: Blame NewGRFs returning inconsistent information in purchase-list/after building before users have a chance to blame OpenTTD for incorrectly autorenewing/-replacing. 15 years ago
rubidium b003536ea8 (svn r15676) -Codechange: remove the need for BeginVehicleMove and merge VehiclePositionChanged and EndVehicleMove. 15 years ago
michi_cc 1c9749dba8 (svn r15655) -Codechange: Initialise vehicle vars only after a placement new so possible default constructors don't overwrite the values. 15 years ago
frosch 90a81da62b (svn r15654) -Fix: Only ever call any vehicle callbacks after the whole articulated engine has been built. (except 0x16) 15 years ago
frosch da78726e0c (svn r15592) -Fix: Refit-info in purchase list did only check the first articulated part. 16 years ago
frosch abe4692da2 (svn r15541) -Revert (r15399): 'v->cargo_type' is also used in other places, which cannot accept CT_INVALID.
-Codechange: Add Engine::GetDefaultCargoType() and Engine::CanCarryCargo() and use them.
-Fix [FS#2617]: When articulated parts have no available default cargo, use the cargo type of the first part for livery selection.
-Change: To decide whether a vehicle is refittable do not test its current capacity for being zero, but always use the 'capacity property'.
  Note: The property is used unmodifed without calling CB 15/36. By setting it to a non-zero value and returning zero in the callback vehicles can be refitted to/from zero capacity for e.g. livery effects.
  Note: It is intentional that you cannot control refittability by CB 36.
16 years ago
smatz 9021c20b5e (svn r15299) -Cleanup: remove many redundant includes 16 years ago
rubidium d197060137 (svn r14933) -Codechange: check the whether a pool item can be constructed instead of trying to make it and check for NULL. 16 years ago
frosch 62f3aa89f2 (svn r14903) -Fix: First create all articulated parts of roadvehicles, then call callback 36 capacity, also call it for all articulated parts. 16 years ago
frosch a3662216ee (svn r13850) -Fix [FS#2146]: Fix resp. implement refitting of articulated vehicles during autoreplace. 16 years ago
frosch ab31260386 (svn r13847) -Codechange: Add MAX_ARTICULATED_PARTS and set it to 100. 16 years ago
peter1138 ecfac35ccc (svn r13385) -Fix (r12137): In the purchase list, CB36 for capacity was not called for the first part of rail and road vehicles. 16 years ago
rubidium 1ce0b03bf0 (svn r12971) -Documentation: add @file in files that missed them and add something more than whitespace as description of files that don't have a description. 16 years ago
peter1138 c8e10ac1f8 (svn r12932) -Fix [FS#1970]: Articulated engines ignored GRF engine overrides. 16 years ago
peter1138 45034bc522 (svn r12924) -Feature: Introducing the so called 'engine pool' which primarily removes the fixed engine type limits and also happens to allow (with the patch option 'dynamic_engines') multiple NewGRF vehicle sets to coexist. 16 years ago
rubidium e947fde701 (svn r12819) -Codechange: handle more NewGRFs in the same way as TTDP does it, i.e. testing the low bits for 0xFF or 0 instead of all bits. 16 years ago
rubidium df1d9bd880 (svn r12490) -Codechange: rename engine.h to engine_func.h and remove unneeded inclusions of engine.h and/or replace them with engine_type.h. 16 years ago
peter1138 6d333e5d3e (svn r12137) -Fix [FS#1769]: Show cargo capacity for articulated vehicles correctly in the purchase list. Multiple cargo types can also now been shown. 17 years ago
rubidium 722613f7f3 (svn r11706) -Codechange: split vehicle.h and remove another bunch of useless includes. 17 years ago
rubidium 81bf9f8503 (svn r11692) -Codechange: move some functions from 'functions.h' to a more logical place and remove about 50% of the includes of 'functions.h' 17 years ago