Mercurial > hg > openttd
comparison src/newgrf_engine.h @ 13114:940252f91c5f draft
(svn r17616) -Codechange [FS#3222]: Enumerize properties used in callback 0x36. Based on Terkhen's work.
author | frosch <frosch@openttd.org> |
---|---|
date | Tue, 22 Sep 2009 19:28:57 +0000 |
parents | bc7926153e19 |
children | a899d4e5ee1a |
comparison
equal
deleted
inserted
replaced
13113:07789c94f3db | 13114:940252f91c5f |
---|---|
12 #ifndef NEWGRF_ENGINE_H | 12 #ifndef NEWGRF_ENGINE_H |
13 #define NEWGRF_ENGINE_H | 13 #define NEWGRF_ENGINE_H |
14 | 14 |
15 #include "direction_type.h" | 15 #include "direction_type.h" |
16 #include "newgrf_callbacks.h" | 16 #include "newgrf_callbacks.h" |
17 #include "newgrf_properties.h" | |
17 | 18 |
18 enum { | 19 enum { |
19 TRAININFO_DEFAULT_VEHICLE_WIDTH = 29, | 20 TRAININFO_DEFAULT_VEHICLE_WIDTH = 29, |
20 ROADVEHINFO_DEFAULT_VEHICLE_WIDTH = 28, | 21 ROADVEHINFO_DEFAULT_VEHICLE_WIDTH = 28, |
21 VEHICLEINFO_FULL_VEHICLE_WIDTH = 32, | 22 VEHICLEINFO_FULL_VEHICLE_WIDTH = 32, |
43 #define GetCustomVehicleSprite(v, direction) GetCustomEngineSprite(v->engine_type, v, direction) | 44 #define GetCustomVehicleSprite(v, direction) GetCustomEngineSprite(v->engine_type, v, direction) |
44 #define GetCustomVehicleIcon(et, direction) GetCustomEngineSprite(et, NULL, direction) | 45 #define GetCustomVehicleIcon(et, direction) GetCustomEngineSprite(et, NULL, direction) |
45 | 46 |
46 /* Handler to Evaluate callback 36. If the callback fails (i.e. most of the | 47 /* Handler to Evaluate callback 36. If the callback fails (i.e. most of the |
47 * time) orig_value is returned */ | 48 * time) orig_value is returned */ |
48 uint GetVehicleProperty(const Vehicle *v, uint8 property, uint orig_value); | 49 uint GetVehicleProperty(const Vehicle *v, PropertyID property, uint orig_value); |
49 uint GetEngineProperty(EngineID engine, uint8 property, uint orig_value); | 50 uint GetEngineProperty(EngineID engine, PropertyID property, uint orig_value); |
50 | 51 |
51 enum VehicleTrigger { | 52 enum VehicleTrigger { |
52 VEHICLE_TRIGGER_NEW_CARGO = 0x01, | 53 VEHICLE_TRIGGER_NEW_CARGO = 0x01, |
53 /* Externally triggered only for the first vehicle in chain */ | 54 /* Externally triggered only for the first vehicle in chain */ |
54 VEHICLE_TRIGGER_DEPOT = 0x02, | 55 VEHICLE_TRIGGER_DEPOT = 0x02, |