tron@2186: /* $Id$ */ tron@2186: peter1138@2982: #ifndef NEWGRF_CALLBACKS_H peter1138@2982: #define NEWGRF_CALLBACKS_H truelight@0: peter1138@2982: /** @file newgrf_callbacks.h peter1138@2962: */ truelight@0: peter1138@3007: /** peter1138@3007: * List of implemented NewGRF callbacks. peter1138@3007: * Names are formatted as CBID__ peter1138@3007: */ hackykid@1883: enum CallbackID { hackykid@1908: // Powered wagons, if the result is lower as 0x40 then the wagon is powered hackykid@1908: // TODO: interpret the rest of the result, aka "visual effects" peter1138@3007: CBID_TRAIN_WAGON_POWER = 0x10, hackykid@1908: hackykid@1922: // Vehicle length, returns the amount of 1/8's the vehicle is shorter hackykid@1922: // only for train vehicles peter1138@3007: CBID_TRAIN_VEHICLE_LENGTH = 0x11, hackykid@1922: hackykid@1883: // Refit capacity, the passed vehicle needs to have its ->cargo_type set to hackykid@1883: // the cargo we are refitting to, returns the new cargo capacity peter1138@3007: CBID_VEHICLE_REFIT_CAPACITY = 0x15, peter1138@2602: peter1138@3007: CBID_TRAIN_ARTIC_ENGINE = 0x16, hackykid@1895: }; hackykid@1895: peter1138@3007: /** peter1138@3007: * Callback masks for vehicles, indicates which callbacks are used by a vehicle. peter1138@3007: * Some callbacks are always used and don't have a mask. peter1138@3007: */ peter1138@3007: enum VehicleCallbackMask { peter1138@3007: CBM_WAGON_POWER = 0, ///< Powered wagons (trains only) peter1138@3007: CBM_VEHICLE_LENGTH = 1, ///< Vehicle length (trains only) peter1138@3007: CBM_LOAD_AMOUNT = 2, ///< Load amount peter1138@3007: CBM_REFIT_CAPACITY = 3, ///< Cargo capacity after refit peter1138@3007: CBM_ARTIC_ENGINE = 4, ///< Add articulated engines (trains only) peter1138@3007: CBM_CARGO_SUFFIX = 5, ///< Show suffix after cargo name peter1138@3007: CBM_COLOUR_REMAP = 6, ///< Change colour mapping of vehicle peter1138@3007: CBM_SOUND_EFFECT = 7, ///< Vehicle uses custom sound effects hackykid@1883: }; hackykid@1883: peter1138@3007: /** peter1138@3007: * Result of a failed callback. peter1138@3007: */ hackykid@1883: enum { hackykid@1883: CALLBACK_FAILED = 0xFFFF hackykid@1883: }; hackykid@1883: peter1138@2982: #endif /* NEWGRF_CALLBACKS_H */