engine.h
changeset 1883 3b02000cfbe0
parent 1802 448f187042d3
child 1895 398f156479c8
--- a/engine.h	Wed Jun 01 10:30:45 2005 +0000
+++ b/engine.h	Wed Jun 01 11:34:37 2005 +0000
@@ -122,6 +122,17 @@
 	NUM_GLOBAL_CID  =  31
 };
 
+// This enum only lists implemented callbacks
+enum CallbackID {
+	// Refit capacity, the passed vehicle needs to have its ->cargo_type set to
+	// the cargo we are refitting to, returns the new cargo capacity
+	CB_REFIT_CAP = 0x15,
+};
+
+enum {
+	CALLBACK_FAILED = 0xFFFF
+};
+
 VARDEF const uint32 _default_refitmasks[NUM_VEHICLE_TYPES];
 VARDEF const CargoID _global_cargo_id[NUM_LANDSCAPE][NUM_CARGO];
 VARDEF const uint32 _landscape_global_cargo_mask[NUM_LANDSCAPE];
@@ -133,6 +144,7 @@
 void SetCustomEngineSprites(byte engine, byte cargo, struct SpriteGroup *group);
 // loaded is in percents, overriding_engine 0xffff is none
 int GetCustomEngineSprite(byte engine, const Vehicle *v, byte direction);
+uint16 GetCallBackResult(uint16 callback_info, byte engine, const Vehicle *v);
 #define GetCustomVehicleSprite(v, direction) GetCustomEngineSprite(v->engine_type, v, direction)
 #define GetCustomVehicleIcon(et, direction) GetCustomEngineSprite(et, NULL, direction)