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: hackykid@1895: // This enum lists the implemented callbacks hackykid@1895: // Use as argument for the GetCallBackResult function (see comments there) 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" hackykid@1908: CBID_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 hackykid@1922: CBID_VEH_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 hackykid@1895: CBID_REFIT_CAP = 0x15, peter1138@2602: peter1138@2602: CBID_ARTIC_ENGINE = 0x16, hackykid@1895: }; hackykid@1895: hackykid@1895: // bit positions for rvi->callbackmask, indicates which callbacks are used by an engine hackykid@1895: // (some callbacks are always used, and dont appear here) hackykid@1895: enum CallbackMask { hackykid@1909: CBM_WAGON_POWER = 0, hackykid@1922: CBM_VEH_LENGTH = 1, hackykid@1895: CBM_REFIT_CAP = 3, peter1138@2602: CBM_ARTIC_ENGINE = 4, hackykid@1883: }; hackykid@1883: hackykid@1883: enum { hackykid@1883: CALLBACK_FAILED = 0xFFFF hackykid@1883: }; hackykid@1883: peter1138@2982: #endif /* NEWGRF_CALLBACKS_H */