frosch
12ea92a257
(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
8718babe90
(svn r16849) -Codechange: replace GetCargo() by CargoSpec::Get()
2009-07-16 19:00:13 +00:00
smatz
1e1f0ab2cf
(svn r16719) -Codechange: make IsArticulatedPart(), IsTrainEngine(), IsTrainWagon(), IsMultiheaded(), EngineHasArticPart() and IsRearDualheaded() members of Train
2009-07-01 23:57:20 +00:00
smatz
378d01f2f4
(svn r16718) -Codechange: make IsFreeWagon() member of Train
2009-07-01 23:49:13 +00:00
yexo
b00726a5d2
(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
f6a4d61cca
(svn r16643) -Codechange: replace GetStationByTile() by Station::GetByTile()
2009-06-24 17:39:54 +00:00
smatz
54cbd17bd8
(svn r16634) -Codechange: use Company::IsHumanID() instead of IsHumanCompany()
2009-06-23 12:11:35 +00:00
yexo
2c82d10226
(svn r16615) -Fix (r16613): 0x10 != 2
2009-06-21 13:30:21 +00:00
yexo
3531315322
(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
af85994f7f
(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
6e06b592ad
(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
bec5f3f11b
(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
2832d69272
(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
c496a3e014
(svn r16421) -Codechange: do not unnecessarily remove constness or unnecessarily add it.
2009-05-24 20:29:04 +00:00
rubidium
846382a0f3
(svn r16402) -Codechange: make Resolve a function of SpriteGroup
2009-05-23 15:25:52 +00:00
rubidium
730b411878
(svn r16396) -Codechange: split NewGRF spritegroup into multiple subclasses instead of using a big union
2009-05-23 12:13:42 +00:00
rubidium
cd382b28a3
(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
4c0542c17f
(svn r16393) -Codechange: move VehicleRail to Train.
2009-05-22 22:55:41 +00:00
rubidium
6350648a6c
(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
1324100d69
(svn r16391) -Codechange: use Train instead of Vehicle where appropriate.
2009-05-22 22:22:46 +00:00
rubidium
489253b630
(svn r16390) -Codechange: move u.road to RoadVehicle.
2009-05-22 20:22:20 +00:00
rubidium
4ae19b7451
(svn r16388) -Codechange: move u.air to Aircraft
2009-05-22 20:07:26 +00:00
rubidium
1e853b1226
(svn r16387) -Codechange: use Aircraft instead of Vehicle where appropriate
2009-05-22 20:03:26 +00:00
smatz
0c10daa243
(svn r16327) -Codechange: replace IsValidPoolItemID(index) by PoolItem::IsValidID(index)
2009-05-17 01:00:56 +00:00
smatz
d495dc5dbc
(svn r16325) -Codechange: replace GetPoolItem(index) by PoolItem::Get(index)
2009-05-16 23:34:14 +00:00
smatz
ce7dff4acc
(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
5f57ea7198
(svn r15739) -Codechange: Expose GRF ID of engines in var action property 0x25.
2009-03-16 08:03:50 +00:00
rubidium
c3e87f345d
(svn r15718) -Cleanup: apply some comment coding style on the rest of the sources too
2009-03-15 00:32:18 +00:00
rubidium
b9aa5e17f2
(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
a9cccbd53a
(svn r15542) -Feature(ette): Support vehicle vars 0x47 and 0xF2 in purchase list.
2009-02-21 13:24:55 +00:00
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.
2009-02-21 12:52:41 +00:00
frosch
8aab3b09f5
(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
72c632742a
(svn r15516) -Fix (r10097): Livery overrides for articulated parts of roadvehicles were not applied.
2009-02-18 20:35:02 +00:00
frosch
85b49d72ce
(svn r15399) -Fix [FS#2617]: For articulated parts v->cargo_type == CT_INVALID is possible.
2009-02-07 16:17:03 +00:00
frosch
9bd5420450
(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
9021c20b5e
(svn r15299) -Cleanup: remove many redundant includes
2009-01-31 20:16:06 +00:00
rubidium
28ea38ae55
(svn r14949) -Cleanup: pointer coding style
2009-01-10 00:31:47 +00:00
frosch
e13dc4d99d
(svn r14945) -Feature(ette): Support var 0x45 (curvature info) also for road vehicles.
2009-01-09 23:04:51 +00:00
rubidium
abd3b8e0d7
(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
766bf8deaa
(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
bd92143e7b
(svn r14742) -Codechange: use SmallMap in two cases to reduce compilation time and binary size
2008-12-26 13:50:46 +00:00
rubidium
f1c7e4662a
(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
ae6107535a
(svn r14669) -Codechange: use SmallVector instead of std::list at one place
2008-12-13 15:59:25 +00:00
rubidium
e589c7e580
(svn r14422) -Codechange: also reflect the changes of r14421 in the filenames.
2008-09-30 20:51:04 +00:00
rubidium
f56e630e5c
(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
a756b23dc4
(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
d54d8bf295
(svn r13885) -Fix [FS#2168]: Var 0x7F is not feature-specific.
2008-07-30 18:23:12 +00:00
peter1138
f81b3b7357
(svn r13761) -Codechange: Remove dependency on rail for altering purchase list position (mostly function renaming)
2008-07-20 21:23:28 +00:00
rubidium
6898a76c5f
(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
5dd1387508
(svn r13397) -Fix: Do not crash when resolving vehicle sprite groups with zero sprites.
2008-06-07 00:06:36 +00:00