(svn r17616) -Codechange [FS#3222]: Enumerize properties used in callback 0x36. Based on Terkhen's work.

This commit is contained in:
frosch
2009-09-22 19:28:57 +00:00
parent 29dc97afb6
commit b6156da5e9
13 changed files with 106 additions and 53 deletions

View File

@@ -14,6 +14,7 @@
#include "direction_type.h"
#include "newgrf_callbacks.h"
#include "newgrf_properties.h"
enum {
TRAININFO_DEFAULT_VEHICLE_WIDTH = 29,
@@ -45,8 +46,8 @@ bool UsesWagonOverride(const Vehicle *v);
/* Handler to Evaluate callback 36. If the callback fails (i.e. most of the
* time) orig_value is returned */
uint GetVehicleProperty(const Vehicle *v, uint8 property, uint orig_value);
uint GetEngineProperty(EngineID engine, uint8 property, uint orig_value);
uint GetVehicleProperty(const Vehicle *v, PropertyID property, uint orig_value);
uint GetEngineProperty(EngineID engine, PropertyID property, uint orig_value);
enum VehicleTrigger {
VEHICLE_TRIGGER_NEW_CARGO = 0x01,