9 /** |
9 /** |
10 * List of implemented NewGRF callbacks. |
10 * List of implemented NewGRF callbacks. |
11 * Names are formatted as CBID_<CLASS>_<CALLBACK> |
11 * Names are formatted as CBID_<CLASS>_<CALLBACK> |
12 */ |
12 */ |
13 enum CallbackID { |
13 enum CallbackID { |
14 // Powered wagons, if the result is lower as 0x40 then the wagon is powered |
14 /* Powered wagons, if the result is lower as 0x40 then the wagon is powered |
15 // TODO: interpret the rest of the result, aka "visual effects" |
15 * @todo : interpret the rest of the result, aka "visual effects" */ |
16 CBID_TRAIN_WAGON_POWER = 0x10, |
16 CBID_TRAIN_WAGON_POWER = 0x10, |
17 |
17 |
18 // Vehicle length, returns the amount of 1/8's the vehicle is shorter |
18 /* Vehicle length, returns the amount of 1/8's the vehicle is shorter |
19 // only for train vehicles |
19 * only for train vehicles */ |
20 CBID_TRAIN_VEHICLE_LENGTH = 0x11, |
20 CBID_TRAIN_VEHICLE_LENGTH = 0x11, |
21 |
21 |
22 /* Called to determine the amount of cargo to load per unit of time when |
22 /* Called (if appropriate bit in callback mask is set) to determine the |
23 * using gradual loading. */ |
23 * amount of cargo to load per unit of time when using gradual loading. */ |
24 CBID_VEHICLE_LOAD_AMOUNT = 0x12, |
24 CBID_VEHICLE_LOAD_AMOUNT = 0x12, |
25 |
25 |
26 /* Called (if appropriate bit in callback mask is set) to determine if a |
26 /* Called (if appropriate bit in callback mask is set) to determine if a |
27 * newstation should be made available to build */ |
27 * newstation should be made available to build */ |
28 CBID_STATION_AVAILABILITY = 0x13, |
28 CBID_STATION_AVAILABILITY = 0x13, |
29 |
29 |
30 /* Called (if appropriate bit in callback mask is set) when drawing a tile |
30 /* Called (if appropriate bit in callback mask is set) when drawing a tile |
31 * to choose a sprite layout to draw, instead of the standard 0-7 range */ |
31 * to choose a sprite layout to draw, instead of the standard 0-7 range */ |
32 CBID_STATION_SPRITE_LAYOUT = 0x14, |
32 CBID_STATION_SPRITE_LAYOUT = 0x14, |
33 |
33 |
34 // Refit capacity, the passed vehicle needs to have its ->cargo_type set to |
34 /* Refit capacity, the passed vehicle needs to have its ->cargo_type set to |
35 // the cargo we are refitting to, returns the new cargo capacity |
35 * the cargo we are refitting to, returns the new cargo capacity */ |
36 CBID_VEHICLE_REFIT_CAPACITY = 0x15, |
36 CBID_VEHICLE_REFIT_CAPACITY = 0x15, |
37 |
37 |
38 CBID_TRAIN_ARTIC_ENGINE = 0x16, |
38 CBID_TRAIN_ARTIC_ENGINE = 0x16, |
39 |
39 |
40 CBID_VEHICLE_CARGO_SUFFIX = 0x19, |
40 CBID_VEHICLE_CARGO_SUFFIX = 0x19, |