Commit Graph

238 Commits (c8779fb311c2665d3fc45c18b2f3460cd998d179)

Author SHA1 Message Date
michi_cc d7d032f70a (svn r23231) -Fix: [NewGRF] Make train var 0xF3 consistent with TTDPatch. 13 years ago
frosch 50b480b959 (svn r23174) -Codechange: Deduplicate code between GetEngineProperty() and GetVehicleProperty(). 13 years ago
frosch 8a2342a5e6 (svn r23156) -Change: [NewGRF] Clamp height in aircraft variable 44. 13 years ago
frosch 449d679230 (svn r23143) -Change: [NewGRF v8] Return the translated cargobit in vehicle var 42. 13 years ago
frosch 1ad7239247 (svn r23138) -Feature: [NewGRF] Allow passing 32bit parameters to 60+x variables (using var 7B). Currently most useful for vehicle var 60. 13 years ago
frosch bbc3409942 (svn r23080) -Feature: [NewGRF] Use variable 10 to enable vehicle GRFs to draw different sprites on the map and in various GUIs. 13 years ago
frosch acc3c75951 (svn r23075) -Codechange: Add GetGRF() and GetGRFID() methods to Engine and Vehicle to simplify code. 13 years ago
frosch 72cd855978 (svn r23074) -Codechange: Add Vehicle::GetEngine() to simplify code. 13 years ago
michi_cc a6713244df (svn r23068) -Add: [NewGRF] Long date of last service for vehicles, also available in the purchase list. 13 years ago
michi_cc 12e28de818 (svn r22998) -Add [FS#2521]: [NewGRF] Act2 var 0x62 to get curvature/position difference to the n-th vehicle in vehicle chain. 13 years ago
michi_cc 3cb1dcf31c (svn r22997) -Feature: [NewGRF] Allow access to other vehicles in the vehicle chain in VarAction 2. 13 years ago
frosch 427dd736ae (svn r22946) -Fix [FS#4781]: [NewGRF] Crash when accessing vehicle var 44 for a non-front aircraft. 13 years ago
frosch c6e29a5b89 (svn r22848) -Add: The missing bits in station variable 43. 13 years ago
frosch 8930337aae (svn r22635) -Fix: Correctly reseed random bits of industries and industry tiles. 13 years ago
frosch 8b18292a2e (svn r22634) -Codechange: Deduplicate some code. Note that zeroing 'count' is intentionally removed, it is only used together with 'scope'. 13 years ago
frosch a97d52a29a (svn r21933) -Codechange: Split cur_order_index into cur_auto_order_index and cur_real_order_index to keep track of the current real order in an unambiguous way.
-Fix [FS#4440]: Automatic orders behave now stable wrt. service orders and are not added or removed depending on the need of servicing.
-Fix: Various other issues with automatic orders, e.g. vehicles getting stuck with "no orders" when there are automatic orders at the end of the order list.
14 years ago
terkhen 48b7916458 (svn r21521) -Codechange: Unify some cached values that were present in both road vehicles and trains. 14 years ago
terkhen 12c86a1391 (svn r21518) -Codechange: Rename AccelerationCache to GroundVehicleCache. 14 years ago
terkhen 79e2b3153d (svn r21516) -Codechange: Add IsGroundVehicle function to the Vehicle class. 14 years ago
rubidium b46e57d364 (svn r21338) -Fix [FS#4272]: bogus cache mismatch warnings with desync debugging because some cache was invalidated but never reset 14 years ago
rubidium a6a2fbd937 (svn r21198) -Fix: don't call variables properties in debug messages 14 years ago
terkhen 18e3a3ddfc (svn r21099) -Codechange: Store road vehicle max speed in the vehicle cache. 14 years ago
terkhen 25d1b2f54b (svn r21098) -Codechange: Ships now store their max speed in the cache instead of recalculating it every time. 14 years ago
terkhen c8a56f17f8 (svn r21097) -Codechange: Unify cached max speed for all vehicle types. 14 years ago
terkhen cfac2ced69 (svn r21095) -Codechange: Use a function to convert aircraft speed to old units. 14 years ago
terkhen d699c4a345 (svn r21091) -Codechange: Add bit constants for checking NewGRFCache validity. 14 years ago
terkhen 8eb3d653da (svn r21090) -Codechange: Rename VehicleCache to NewGRFCache. 14 years ago
yexo aaf370dce2 (svn r20800) -Fix: [NewGRF] clamp some more vehicle variables 14 years ago
yexo ce649b0a73 (svn r20799) -Fix: [NewGRF] clamp vehicle var 0xC2 (max age) to uint16 (Hirundo) 14 years ago
yexo 8fafaf3224 (svn r20792) -Fix (r8973): [NewGRF] vehicle vars 0x98 and 0xB4 (max speed and current speed) used the wrong unit for aircraft (Hirundo) 14 years ago
rubidium 30f2afac9b (svn r20632) -Cleanup: remove "a few" unneeded includes, and add them to some headers 14 years ago
rubidium 9d1145e50c (svn r20605) -Fix [FS#4063]: let NewGRFs var43 var (information about liveries) for vehicles not be influenced by the local setting determining whether to show liveries or not. 14 years ago
frosch c52f42ea21 (svn r20502) -Fix (r12330): VRF_POWEREDWAGON is part of train flags, not vehicle_flags. 14 years ago
yexo e4117dbfb7 (svn r20477) -Codechange: remove some airport-related constants/functions and add some documentation 14 years ago
rubidium 29b489a055 (svn r20437) -Codechange: lets Engines use GRFFilePropsBase as well 14 years ago
frosch ed4f806f1d (svn r20283) -Codechange: Unify start of doygen comments. 14 years ago
rubidium e356cb9405 (svn r20281) -Codechange: unify case scope closure + break coding style 14 years ago
yexo 5ac645ac1f (svn r20199) -Fix [FS#3964]: NewGRFs that defined a vehicle without either loaded or loading groups could crash OpenTTD 14 years ago
frosch f87e9c21f2 (svn r20175) -Change: [NewGRF] Adapt vehicle var FE bit 6 to new railtypes. 14 years ago
michi_cc 2a3ec78d9f (svn r20165) -Feature: [NewGRF] Information (var 4A) about the current railtype a train is on. 14 years ago
frosch 1055c2b0fd (svn r20106) -Fix (r5999): Engine and vehicle age were clamped at 0xFFFF, though there are 32bit available. 14 years ago
rubidium 062dd0e24c (svn r19814) -Codechange: give some more unnamed enums a name, in case they consisted of unrelated values use static const (u)int 14 years ago
peter1138 92042c6237 (svn r19782) -Fix [FS#3828]: NULL pointer deference when testing relative scope *action2 on an unbuilt engine. 14 years ago
frosch cf0a20863f (svn r19761) -Fix: [NewGRF] Vehicle var 43 missed AI information in purchase list. 14 years ago
rubidium 1da0086a45 (svn r19707) -Add: helper functions to instantiate/fill ResolverObjects 14 years ago
yexo c4a88ce022 (svn r19455) -Codechange: split all airport information in Station to a seperate class 14 years ago
terkhen e4a5a556b4 (svn r19338) -Codechange: Move the acceleration cache to GroundVehicle. 15 years ago
yexo 3cda09170c (svn r19299) -Codechange: store the most compatible ttd airport type in AirportSpec
-Fix: [NewGRF] return the ttd airport type in station var 0xF1
15 years ago
rubidium c1c401b51b (svn r18935) -Fix [FS#3551] (r18764): value of variables 90 and 91 weren't what NARS expects 15 years ago
rubidium 82fc28f77f (svn r18809) -Codechange/Cleanup: remove unneeded headers from some files, if a header require a header make it include that header 15 years ago
rubidium e4af35d316 (svn r18764) -Fix [FS#3422]: split the (un)load ticks counter and signal wait counter; sometimes they might get into eachother's way 15 years ago
frosch 79627b4f89 (svn r17976) -Codechange: Move CargoClass to cargotype.h and clean up including of newgrf_cargo.h 15 years ago
rubidium d6cded5380 (svn r17693) -Cleanup: remove some unneeded includes 15 years ago
frosch 3863742c72 (svn r17671) -Codechange: Move ResolverObject::info_view into u.vehicle as it is only needed for them. 15 years ago
frosch e261d8d9a0 (svn r17616) -Codechange [FS#3222]: Enumerize properties used in callback 0x36. Based on Terkhen's work. 15 years ago
rubidium af457fc9fe (svn r17552) -Codechange: rename load_unload_time_rem to something more generic as it's used for more than just load/unload. Also add some documentation about where it is used. 15 years ago
rubidium 7fbc33dae1 (svn r17248) -Fix: add GPL license notice where appropriate 15 years ago
frosch f129634f52 (svn r16867) -Feature(ette): Turn variable 0E/8E (vertical offset for trains in depot) and variable 1E/9E bit 3 (wagon width in depot) into grf-local variables. 15 years ago
smatz 1f29e38b83 (svn r16849) -Codechange: replace GetCargo() by CargoSpec::Get() 15 years ago
smatz d86e17d65a (svn r16719) -Codechange: make IsArticulatedPart(), IsTrainEngine(), IsTrainWagon(), IsMultiheaded(), EngineHasArticPart() and IsRearDualheaded() members of Train 15 years ago
smatz ecfaa0564d (svn r16718) -Codechange: make IsFreeWagon() member of Train 15 years ago
yexo 44c15e4196 (svn r16647) -Codechange: remove newgrf.h include from newgrf_engine.h to prevent unnecessary inclusion newgrf.h anyway 15 years ago
smatz 8343340acb (svn r16643) -Codechange: replace GetStationByTile() by Station::GetByTile() 15 years ago
smatz 22cf8d8480 (svn r16634) -Codechange: use Company::IsHumanID() instead of IsHumanCompany() 15 years ago
yexo 2aeaa7a11a (svn r16615) -Fix (r16613): 0x10 != 2 15 years ago
yexo 548a605263 (svn r16613) -Fix [NewGRF]: some of the var action 2 80+ variables contained wrong results due to OpenTTD codechanges 15 years ago
smatz 0c10006907 (svn r16527) -Codechange: use static member functions instead of simple casts when converting Vehicle to specialised vehicle types. Includes safety check 15 years ago
frosch 9853c0dc22 (svn r16480) -Fix (r15617): Invalidate newgrf variable caches of more vehicles in more places. Esp. they were only invalidated for trains. 15 years ago
frosch c64fdcbef2 (svn r16478) -Fix (r15378): Determining most common (sub-)cargo-type was broken due to someone confusing similiary named variables. 15 years ago
rubidium 168ae6f7e2 (svn r16422) -Codechange: use const_cast for removing const and warn when const is (accidentally?) removed using C-style casts. 15 years ago
rubidium 0d99b6c71c (svn r16421) -Codechange: do not unnecessarily remove constness or unnecessarily add it. 15 years ago
rubidium f2317d0d9d (svn r16402) -Codechange: make Resolve a function of SpriteGroup 15 years ago
rubidium f490394aa8 (svn r16396) -Codechange: split NewGRF spritegroup into multiple subclasses instead of using a big union 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
rubidium c882248348 (svn r16388) -Codechange: move u.air to Aircraft 15 years ago
rubidium ada3067960 (svn r16387) -Codechange: use Aircraft instead of Vehicle where appropriate 15 years ago
smatz 871107f529 (svn r16327) -Codechange: replace IsValidPoolItemID(index) by PoolItem::IsValidID(index) 15 years ago
smatz 6221d74644 (svn r16325) -Codechange: replace GetPoolItem(index) by PoolItem::Get(index) 15 years ago
smatz f5316c5cbd (svn r16269) -Codechange: use gcc's ability to check parameters sent to printf-like functions
-Fix: wrong number of parameters or wrong parameter types sent to printf-like functions at several places
15 years ago
peter1138 5df06384d3 (svn r15739) -Codechange: Expose GRF ID of engines in var action property 0x25. 16 years ago
rubidium b25a4f8231 (svn r15718) -Cleanup: apply some comment coding style on the rest of the sources too 16 years ago
rubidium c0d71b84f9 (svn r15617) -Change [FS#2694]: vehicle variables 40-43 weren't cached (though spec stated they are). Caching these variables can yield a 10+% speed increase when those vehicle variables are queried often. 16 years ago
frosch 157e0481ad (svn r15542) -Feature(ette): Support vehicle vars 0x47 and 0xF2 in purchase list. 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
frosch 336fda62be (svn r15517) -Fix [FS#2642](r6455): Wagonoverrides and articulated engine parts use the colour scheme of the engine, but not its recolour callback, nor its 2CC flag. Same applies to roadvehicles. 16 years ago
frosch 3542b1dced (svn r15516) -Fix (r10097): Livery overrides for articulated parts of roadvehicles were not applied. 16 years ago
frosch 769573d1e9 (svn r15399) -Fix [FS#2617]: For articulated parts v->cargo_type == CT_INVALID is possible. 16 years ago
frosch a5d515bfd6 (svn r15378) -Fix: The subcargo returned by vehicle variable 0x42 should be the most-common-subcargo of the most-common-cargo. If nothing is transported 0x..FFFF00 should be returned. 16 years ago
smatz 0d3f5e6e74 (svn r15299) -Cleanup: remove many redundant includes 16 years ago
rubidium 11da45ee55 (svn r14949) -Cleanup: pointer coding style 16 years ago
frosch 3ca73b0c4c (svn r14945) -Feature(ette): Support var 0x45 (curvature info) also for road vehicles. 16 years ago
rubidium d428da5a35 (svn r14801) -Codechange: don't reference Vehicle::num_orders directly but through a method GetNumOrders() (PhilSophus) 16 years ago
peter1138 5f4aef3c11 (svn r14776) -Fix (r14742): ListPositionMap relied on std::map having sorted the map, which is now done by a manual key sorter on SmallMap. This fixes engine ID list sorting. 16 years ago
smatz 2e2086f3f8 (svn r14742) -Codechange: use SmallMap in two cases to reduce compilation time and binary size 16 years ago
rubidium bfe9743f20 (svn r14678) -Fix [FS#2435]: gradual filling graphics were not chosen according to the NewGRF spec (Maedhros) 16 years ago
smatz 3cd2957544 (svn r14669) -Codechange: use SmallVector instead of std::list at one place 16 years ago