Commit Graph

47 Commits (da57fe63f348a1f4628b9f17df171f4c54f0d2e7)

Author SHA1 Message Date
rubidium 462c1ec4f3 (svn r16426) -Fix [FS#2921] (r16390): articulated parts got the wrong image assigned 15 years ago
rubidium 0d99b6c71c (svn r16421) -Codechange: do not unnecessarily remove constness or unnecessarily add it. 15 years ago
frosch 855edb0839 (svn r16412) -Cleanup: Shuffle vehicle pointers in AddArticulatedParts(), and remove two of them. 15 years ago
frosch 0337485284 (svn r16411) -Fix (r16390): Building articulated roadvehicles caused infinite loop due to v->Next() pointing to v itself. 15 years ago
rubidium 6237fe1462 (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 da5661a0c8 (svn r16393) -Codechange: move VehicleRail to Train. 15 years ago
rubidium c4b627af42 (svn r16392) -Codechange: move some variables (the ones that aren't caches) from VehicleRail to Train 15 years ago
rubidium 80e94b9bb1 (svn r16391) -Codechange: use Train instead of Vehicle where appropriate. 15 years ago
rubidium 7a37220881 (svn r16390) -Codechange: move u.road to RoadVehicle. 15 years ago
smatz 62a7948af0 (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 6221d74644 (svn r16325) -Codechange: replace GetPoolItem(index) by PoolItem::Get(index) 15 years ago
frosch 32ecc48ec8 (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 a1addc1d95 (svn r16302) -Codechange: remove Vehicle::AllocateList 15 years ago
frosch 6dd04a9a78 (svn r15763) -Codechange/Fix: Add Engine::GetDisplayDefaultCapacity() and use it everywhere, so CB 36 is also used everywhere. 16 years ago
frosch 4129b418cc (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. 16 years ago
rubidium 655b0ccc2e (svn r15676) -Codechange: remove the need for BeginVehicleMove and merge VehiclePositionChanged and EndVehicleMove. 16 years ago
michi_cc e982100fe6 (svn r15655) -Codechange: Initialise vehicle vars only after a placement new so possible default constructors don't overwrite the values. 16 years ago
frosch cfea2d428b (svn r15654) -Fix: Only ever call any vehicle callbacks after the whole articulated engine has been built. (except 0x16) 16 years ago
frosch e01106f66b (svn r15592) -Fix: Refit-info in purchase list did only check the first articulated part. 16 years ago
frosch d3850e101c (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 0d3f5e6e74 (svn r15299) -Cleanup: remove many redundant includes 16 years ago
rubidium f0b0691bfe (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 aedc0c1302 (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 1f31e117f0 (svn r13850) -Fix [FS#2146]: Fix resp. implement refitting of articulated vehicles during autoreplace. 16 years ago
frosch 80725edc3d (svn r13847) -Codechange: Add MAX_ARTICULATED_PARTS and set it to 100. 16 years ago
peter1138 9b971dab60 (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 d03994098b (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 3e0b6199c4 (svn r12932) -Fix [FS#1970]: Articulated engines ignored GRF engine overrides. 16 years ago
peter1138 a00371c8db (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 5ef8c01ce7 (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 ef2be7d0fc (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 3371d02449 (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 384503e7d3 (svn r11706) -Codechange: split vehicle.h and remove another bunch of useless includes. 17 years ago
rubidium 429521a7d1 (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
rubidium 9e9cfe6e59 (svn r11677) -Codechange: move price and command related types/functions to their respective places. 17 years ago
skidd13 71c4325c50 (svn r11481) -Codechange: Rename the HASBIT function to fit with the naming style 17 years ago
rubidium 127c7c9b0f (svn r11173) -Codechange: rename some callback enums so they are more uniform. 17 years ago
rubidium 257fdb38e6 (svn r11122) -Fix [FS#1234]: crash when building a NewGRF vehicle when the articulated build vehicle callback returneed a different value for the purchase window than the normal build. Thanks for Dalestan and _minime_ for pointers to possible causes. 17 years ago
rubidium 9da9e77641 (svn r11120) -Codechange: remove the arbitrary limit of 10 articulated parts for a vehicle. 17 years ago
rubidium 104300c9fa (svn r11047) -Fix (r11011) [FS#1205]: desync due to wrong cached vehicle length on articulated vehicle construction. 17 years ago
rubidium 52e1d03ec7 (svn r11033) -Fix [FS#1184] (r11011): building articulated vehicles failed. Based on a patch by SmatZ. 17 years ago
rubidium cb7eaff353 (svn r11003) -Codechange: replace Vehicle->next to Vehicle->Next() and Vehicle->SetNext() so we can trap instances that change a next pointer and (in the future) update the first/previous pointers based on that. 17 years ago
rubidium 836105864c (svn r10770) -Codechange: use the pool item class as super class for the vehicle struct.
-Codechange: do not force "special" vehicles to be allocated in the low 1024 vehicle slots and non "special" vehicles in the rest of the slots.
17 years ago
rubidium b876be0064 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments. 17 years ago
maedhros 3e326085fa (svn r10097) -Feature: Add support for articulated road vehicles, or callbacks 11 and 17 for
road vehicles for those who prefer the technical explanation.
17 years ago
maedhros 0d0a8661de (svn r10011) -Fix (r10008): Set the right svn properties on articulated_vehicles.h and correct a file comment. 17 years ago
maedhros ab8503f5a5 (svn r10008) -Codechange: Move a couple of functions related to articulated vehicles to a file of their own. 17 years ago