comparison src/newgrf_callbacks.h @ 6359:21fea0b1dca7 draft

(svn r9411) -Codechange: Add support for loading of newcargo data.
author peter1138 <peter1138@openttd.org>
date Thu, 22 Mar 2007 23:19:40 +0000
parents 60486b0b3e39
children 087adf9081fc
comparison
equal deleted inserted replaced
6358:9542d9811d07 6359:21fea0b1dca7
97 CBID_VEHICLE_START_STOP_CHECK = 0x31, 97 CBID_VEHICLE_START_STOP_CHECK = 0x31,
98 98
99 /* Called to play a special sound effect */ 99 /* Called to play a special sound effect */
100 CBID_VEHICLE_SOUND_EFFECT = 0x33, 100 CBID_VEHICLE_SOUND_EFFECT = 0x33,
101 101
102 /* Called to calculate the income of delivered cargo */
103 CBID_CARGO_PROFIT_CALC = 0x39,
104
102 /* Called (if appropriate bit in callback mask set) to determine whether a 105 /* Called (if appropriate bit in callback mask set) to determine whether a
103 * town building can be destroyed. */ 106 * town building can be destroyed. */
104 CBID_HOUSE_DENY_DESTRUCTION = 0x143, 107 CBID_HOUSE_DENY_DESTRUCTION = 0x143,
108
109 /* Called to calculate part of a station rating */
110 CBID_CARGO_STATION_RATING_CALC = 0x145,
105 }; 111 };
106 112
107 /** 113 /**
108 * Callback masks for vehicles, indicates which callbacks are used by a vehicle. 114 * Callback masks for vehicles, indicates which callbacks are used by a vehicle.
109 * Some callbacks are always used and don't have a mask. 115 * Some callbacks are always used and don't have a mask.
143 CBM_HOUSE_PRODUCE_CARGO = 9, 149 CBM_HOUSE_PRODUCE_CARGO = 9,
144 CBM_HOUSE_DENY_DESTRUCTION = 10, 150 CBM_HOUSE_DENY_DESTRUCTION = 10,
145 }; 151 };
146 152
147 /** 153 /**
154 * Callback masks for cargos.
155 */
156 enum CargoCallbackMask {
157 CBM_CARGO_PROFIT_CALC = 0,
158 CBM_CARGO_STATION_RATING_CALC = 1,
159 };
160
161 /**
148 * Result of a failed callback. 162 * Result of a failed callback.
149 */ 163 */
150 enum { 164 enum {
151 CALLBACK_FAILED = 0xFFFF 165 CALLBACK_FAILED = 0xFFFF
152 }; 166 };