Commit Graph

219 Commits

Author SHA1 Message Date
rubidium b46e57d364 (svn r21338) -Fix [FS#4272]: bogus cache mismatch warnings with desync debugging because some cache was invalidated but never reset 2010-11-27 21:09:41 +00:00
rubidium a6a2fbd937 (svn r21198) -Fix: don't call variables properties in debug messages 2010-11-15 16:43:46 +00:00
terkhen 18e3a3ddfc (svn r21099) -Codechange: Store road vehicle max speed in the vehicle cache. 2010-11-06 13:05:11 +00:00
terkhen 25d1b2f54b (svn r21098) -Codechange: Ships now store their max speed in the cache instead of recalculating it every time. 2010-11-06 13:03:17 +00:00
terkhen c8a56f17f8 (svn r21097) -Codechange: Unify cached max speed for all vehicle types. 2010-11-06 12:53:31 +00:00
terkhen cfac2ced69 (svn r21095) -Codechange: Use a function to convert aircraft speed to old units. 2010-11-06 12:47:12 +00:00
terkhen d699c4a345 (svn r21091) -Codechange: Add bit constants for checking NewGRFCache validity. 2010-11-06 12:39:18 +00:00
terkhen 8eb3d653da (svn r21090) -Codechange: Rename VehicleCache to NewGRFCache. 2010-11-06 12:37:55 +00:00
yexo aaf370dce2 (svn r20800) -Fix: [NewGRF] clamp some more vehicle variables 2010-09-13 14:20:30 +00:00
yexo ce649b0a73 (svn r20799) -Fix: [NewGRF] clamp vehicle var 0xC2 (max age) to uint16 (Hirundo) 2010-09-13 13:55:25 +00:00
yexo 8fafaf3224 (svn r20792) -Fix (r8973): [NewGRF] vehicle vars 0x98 and 0xB4 (max speed and current speed) used the wrong unit for aircraft (Hirundo) 2010-09-12 19:54:25 +00:00
rubidium 30f2afac9b (svn r20632) -Cleanup: remove "a few" unneeded includes, and add them to some headers 2010-08-26 22:01:16 +00:00
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. 2010-08-23 22:28:35 +00:00
frosch c52f42ea21 (svn r20502) -Fix (r12330): VRF_POWEREDWAGON is part of train flags, not vehicle_flags. 2010-08-15 18:25:57 +00:00
yexo e4117dbfb7 (svn r20477) -Codechange: remove some airport-related constants/functions and add some documentation 2010-08-13 00:21:03 +00:00
rubidium 29b489a055 (svn r20437) -Codechange: lets Engines use GRFFilePropsBase as well 2010-08-10 15:54:53 +00:00
frosch ed4f806f1d (svn r20283) -Codechange: Unify start of doygen comments. 2010-08-01 19:22:34 +00:00
rubidium e356cb9405 (svn r20281) -Codechange: unify case scope closure + break coding style 2010-08-01 18:53:30 +00:00
yexo 5ac645ac1f (svn r20199) -Fix [FS#3964]: NewGRFs that defined a vehicle without either loaded or loading groups could crash OpenTTD 2010-07-21 11:29:59 +00:00
frosch f87e9c21f2 (svn r20175) -Change: [NewGRF] Adapt vehicle var FE bit 6 to new railtypes. 2010-07-17 15:38:51 +00:00
michi_cc 2a3ec78d9f (svn r20165) -Feature: [NewGRF] Information (var 4A) about the current railtype a train is on. 2010-07-16 19:02:59 +00:00
frosch 1055c2b0fd (svn r20106) -Fix (r5999): Engine and vehicle age were clamped at 0xFFFF, though there are 32bit available. 2010-07-10 08:54:57 +00:00
rubidium 062dd0e24c (svn r19814) -Codechange: give some more unnamed enums a name, in case they consisted of unrelated values use static const (u)int 2010-05-13 10:14:29 +00:00
peter1138 92042c6237 (svn r19782) -Fix [FS#3828]: NULL pointer deference when testing relative scope *action2 on an unbuilt engine. 2010-05-10 17:27:34 +00:00
frosch cf0a20863f (svn r19761) -Fix: [NewGRF] Vehicle var 43 missed AI information in purchase list. 2010-05-05 16:55:43 +00:00
rubidium 1da0086a45 (svn r19707) -Add: helper functions to instantiate/fill ResolverObjects 2010-04-24 13:35:18 +00:00
yexo c4a88ce022 (svn r19455) -Codechange: split all airport information in Station to a seperate class 2010-03-18 21:02:20 +00:00
terkhen e4a5a556b4 (svn r19338) -Codechange: Move the acceleration cache to GroundVehicle. 2010-03-06 12:42:53 +00:00
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
2010-03-01 20:17:21 +00:00
rubidium c1c401b51b (svn r18935) -Fix [FS#3551] (r18764): value of variables 90 and 91 weren't what NARS expects 2010-01-28 18:19:34 +00:00
rubidium 82fc28f77f (svn r18809) -Codechange/Cleanup: remove unneeded headers from some files, if a header require a header make it include that header 2010-01-15 16:41:15 +00:00
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 2010-01-09 14:43:08 +00:00
frosch 79627b4f89 (svn r17976) -Codechange: Move CargoClass to cargotype.h and clean up including of newgrf_cargo.h 2009-11-05 19:46:17 +00:00
rubidium d6cded5380 (svn r17693) -Cleanup: remove some unneeded includes 2009-10-04 17:16:41 +00:00
frosch 3863742c72 (svn r17671) -Codechange: Move ResolverObject::info_view into u.vehicle as it is only needed for them. 2009-09-30 18:54:33 +00:00
frosch e261d8d9a0 (svn r17616) -Codechange [FS#3222]: Enumerize properties used in callback 0x36. Based on Terkhen's work. 2009-09-22 19:28:57 +00:00
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. 2009-09-15 20:58:44 +00:00
rubidium 7fbc33dae1 (svn r17248) -Fix: add GPL license notice where appropriate 2009-08-21 20:21:05 +00:00
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. 2009-07-17 22:00:13 +00:00
smatz 1f29e38b83 (svn r16849) -Codechange: replace GetCargo() by CargoSpec::Get() 2009-07-16 19:00:13 +00:00
smatz d86e17d65a (svn r16719) -Codechange: make IsArticulatedPart(), IsTrainEngine(), IsTrainWagon(), IsMultiheaded(), EngineHasArticPart() and IsRearDualheaded() members of Train 2009-07-01 23:57:20 +00:00
smatz ecfaa0564d (svn r16718) -Codechange: make IsFreeWagon() member of Train 2009-07-01 23:49:13 +00:00
yexo 44c15e4196 (svn r16647) -Codechange: remove newgrf.h include from newgrf_engine.h to prevent unnecessary inclusion newgrf.h anyway 2009-06-24 21:33:11 +00:00
smatz 8343340acb (svn r16643) -Codechange: replace GetStationByTile() by Station::GetByTile() 2009-06-24 17:39:54 +00:00
smatz 22cf8d8480 (svn r16634) -Codechange: use Company::IsHumanID() instead of IsHumanCompany() 2009-06-23 12:11:35 +00:00
yexo 2aeaa7a11a (svn r16615) -Fix (r16613): 0x10 != 2 2009-06-21 13:30:21 +00:00
yexo 548a605263 (svn r16613) -Fix [NewGRF]: some of the var action 2 80+ variables contained wrong results due to OpenTTD codechanges 2009-06-21 10:11:04 +00:00
smatz 0c10006907 (svn r16527) -Codechange: use static member functions instead of simple casts when converting Vehicle to specialised vehicle types. Includes safety check 2009-06-06 16:54:22 +00:00
frosch 9853c0dc22 (svn r16480) -Fix (r15617): Invalidate newgrf variable caches of more vehicles in more places. Esp. they were only invalidated for trains. 2009-05-31 12:03:14 +00:00
frosch c64fdcbef2 (svn r16478) -Fix (r15378): Determining most common (sub-)cargo-type was broken due to someone confusing similiary named variables. 2009-05-31 11:27:10 +00:00
rubidium 168ae6f7e2 (svn r16422) -Codechange: use const_cast for removing const and warn when const is (accidentally?) removed using C-style casts. 2009-05-24 21:09:00 +00:00
rubidium 0d99b6c71c (svn r16421) -Codechange: do not unnecessarily remove constness or unnecessarily add it. 2009-05-24 20:29:04 +00:00
rubidium f2317d0d9d (svn r16402) -Codechange: make Resolve a function of SpriteGroup 2009-05-23 15:25:52 +00:00
rubidium f490394aa8 (svn r16396) -Codechange: split NewGRF spritegroup into multiple subclasses instead of using a big union 2009-05-23 12:13:42 +00:00
rubidium 6237fe1462 (svn r16394) -Codechange: move (NewGRF) cache variables into a separate struct so (some vehicle related) NewGRF cache 'desyncs' can be tested easier. 2009-05-23 09:10:56 +00:00
rubidium da5661a0c8 (svn r16393) -Codechange: move VehicleRail to Train. 2009-05-22 22:55:41 +00:00
rubidium c4b627af42 (svn r16392) -Codechange: move some variables (the ones that aren't caches) from VehicleRail to Train 2009-05-22 22:33:05 +00:00
rubidium 80e94b9bb1 (svn r16391) -Codechange: use Train instead of Vehicle where appropriate. 2009-05-22 22:22:46 +00:00
rubidium 7a37220881 (svn r16390) -Codechange: move u.road to RoadVehicle. 2009-05-22 20:22:20 +00:00
rubidium c882248348 (svn r16388) -Codechange: move u.air to Aircraft 2009-05-22 20:07:26 +00:00
rubidium ada3067960 (svn r16387) -Codechange: use Aircraft instead of Vehicle where appropriate 2009-05-22 20:03:26 +00:00
smatz 871107f529 (svn r16327) -Codechange: replace IsValidPoolItemID(index) by PoolItem::IsValidID(index) 2009-05-17 01:00:56 +00:00
smatz 6221d74644 (svn r16325) -Codechange: replace GetPoolItem(index) by PoolItem::Get(index) 2009-05-16 23:34:14 +00:00
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
2009-05-10 17:27:25 +00:00
peter1138 5df06384d3 (svn r15739) -Codechange: Expose GRF ID of engines in var action property 0x25. 2009-03-16 08:03:50 +00:00
rubidium b25a4f8231 (svn r15718) -Cleanup: apply some comment coding style on the rest of the sources too 2009-03-15 00:32:18 +00:00
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. 2009-03-04 23:32:23 +00:00
frosch 157e0481ad (svn r15542) -Feature(ette): Support vehicle vars 0x47 and 0xF2 in purchase list. 2009-02-21 13:24:55 +00:00
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.
2009-02-21 12:52:41 +00:00
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. 2009-02-18 20:40:24 +00:00
frosch 3542b1dced (svn r15516) -Fix (r10097): Livery overrides for articulated parts of roadvehicles were not applied. 2009-02-18 20:35:02 +00:00
frosch 769573d1e9 (svn r15399) -Fix [FS#2617]: For articulated parts v->cargo_type == CT_INVALID is possible. 2009-02-07 16:17:03 +00:00
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. 2009-02-06 18:06:05 +00:00
smatz 0d3f5e6e74 (svn r15299) -Cleanup: remove many redundant includes 2009-01-31 20:16:06 +00:00
rubidium 11da45ee55 (svn r14949) -Cleanup: pointer coding style 2009-01-10 00:31:47 +00:00
frosch 3ca73b0c4c (svn r14945) -Feature(ette): Support var 0x45 (curvature info) also for road vehicles. 2009-01-09 23:04:51 +00:00
rubidium d428da5a35 (svn r14801) -Codechange: don't reference Vehicle::num_orders directly but through a method GetNumOrders() (PhilSophus) 2009-01-03 13:20:32 +00:00
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. 2008-12-30 21:04:09 +00:00
smatz 2e2086f3f8 (svn r14742) -Codechange: use SmallMap in two cases to reduce compilation time and binary size 2008-12-26 13:50:46 +00:00
rubidium bfe9743f20 (svn r14678) -Fix [FS#2435]: gradual filling graphics were not chosen according to the NewGRF spec (Maedhros) 2008-12-15 22:22:23 +00:00
smatz 3cd2957544 (svn r14669) -Codechange: use SmallVector instead of std::list at one place 2008-12-13 15:59:25 +00:00
rubidium b650a86e58 (svn r14422) -Codechange: also reflect the changes of r14421 in the filenames. 2008-09-30 20:51:04 +00:00
rubidium 3b798599b6 (svn r14421) -Codechange: rename all player variables/types to company *or* client so it is immediatelly clear which one you are working with. 2008-09-30 20:39:50 +00:00
smatz abbc9cd9cb (svn r14383) -Fix [FS#2316](r14343): handle invalid 'v->u.air.targetairport' in the NewGRF code, too 2008-09-22 14:34:38 +00:00
frosch 93d0ca8731 (svn r13885) -Fix [FS#2168]: Var 0x7F is not feature-specific. 2008-07-30 18:23:12 +00:00
peter1138 e6a1f1c012 (svn r13761) -Codechange: Remove dependency on rail for altering purchase list position (mostly function renaming) 2008-07-20 21:23:28 +00:00
rubidium d06529ef4d (svn r13719) -Codechange: rename IsValidPlayer to IsValidPlayerID in line with all other structs/classes that are in a pool. 2008-07-17 20:13:01 +00:00
frosch 77ff05a5f1 (svn r13397) -Fix: Do not crash when resolving vehicle sprite groups with zero sprites. 2008-06-07 00:06:36 +00:00
peter1138 f78ea7c6bf (svn r13377) -Codechange: Let 'long format' build year work in vehicle purchase list. 2008-06-04 06:40:07 +00:00
belugas 2550f353e9 (svn r13376) -Feature: Add access to current long year and date from Action 7/9/D and VarAction2 (23/24 or A3/A4)
Add access to (long format) building year, in Variational Action2 Variable 49 for Vehicles
2008-06-04 00:17:48 +00:00
smatz ed462507b2 (svn r13351) -Codechange: disable warnings about unused variable for builds without asserts 2008-06-01 15:08:14 +00:00
rubidium 923e21129c (svn r13325) -Codechange: split the client-side only settings from the settings stored in the savegame so there is no need to have a duplicate copy of it for new games. 2008-05-29 15:13:28 +00:00
rubidium 4625695653 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
-Codechange: move all Settings into substructs of _settings in a way that they are logically grouped.
2008-05-25 19:17:03 +00:00
smatz 75a87a7266 (svn r12982) -Fix: compiler warning when compiling without asserts 2008-05-06 23:45:25 +00:00
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. 2008-05-06 15:11:33 +00:00
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. 2008-04-29 21:31:29 +00:00
peter1138 a37ee93f8d (svn r12914) -Fix: Game crash when a spectator/server tried to show an engine with no owner when a NewGRF requested a specific variable. 2008-04-28 11:15:13 +00:00
peter1138 3f2513b5ac (svn r12910) -Fix: Report reverse sprite status (FD/FE) to NewGRF for manually toggled vehicles. 2008-04-27 10:19:41 +00:00
peter1138 f8612ad5b9 (svn r12872) -Codechange: Remove obsolete unused engine list order function 2008-04-24 15:51:29 +00:00
rubidium 8cd1795fe3 (svn r12587) -Codechange: unduplicate some code in the Unpack*Order functions and move the 'normal' case Pack/Unpack to Order. 2008-04-06 07:22:26 +00:00