OpenTTD Source: src/newgrf_callbacks.h Source File

OpenTTD Source 14.0-RC3

newgrf_callbacks.h
Go to the documentation of this file.
1 /*
2 * This file is part of OpenTTD.
3 * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
4 * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
5 * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
6 */
7
10 #ifndef NEWGRF_CALLBACKS_H
11 #define NEWGRF_CALLBACKS_H
12
20 enum CallbackID {
22 CBID_NO_CALLBACK = 0x00,
23
25 CBID_RANDOM_TRIGGER = 0x01,
26
27 /* There are no callbacks 0x02 - 0x0F. */
28
30 CBID_VEHICLE_VISUAL_EFFECT = 0x10, // 8 bit callback
31
33 CBID_VEHICLE_LENGTH = 0x11,
34
36 CBID_VEHICLE_LOAD_AMOUNT = 0x12, // 8 bit callback
37
39 CBID_STATION_AVAILABILITY = 0x13, // 8 bit callback
40
42 CBID_STATION_SPRITE_LAYOUT = 0x14,
43
48 CBID_VEHICLE_REFIT_CAPACITY = 0x15, // 15 bit callback
49
51 CBID_VEHICLE_ARTIC_ENGINE = 0x16, // 8 bit callback for grf version < 8
52
54 CBID_HOUSE_ALLOW_CONSTRUCTION = 0x17, // 8 bit callback
55
57 CBID_GENERIC_AI_PURCHASE_SELECTION = 0x18, // 8 bit callback, implemented for stations only
58
60 CBID_VEHICLE_CARGO_SUFFIX = 0x19,
61
63 CBID_HOUSE_ANIMATION_NEXT_FRAME = 0x1A, // 15 bit callback
64
66 CBID_HOUSE_ANIMATION_START_STOP = 0x1B, // 15 bit callback
67
69 CBID_HOUSE_CONSTRUCTION_STATE_CHANGE = 0x1C, // 15 bit callback
70
72 CBID_TRAIN_ALLOW_WAGON_ATTACH = 0x1D,
73
75 CBID_HOUSE_COLOUR = 0x1E, // 15 bit callback
76
78 CBID_HOUSE_CARGO_ACCEPTANCE = 0x1F, // 15 bit callback
79
81 CBID_HOUSE_ANIMATION_SPEED = 0x20, // 8 bit callback
82
84 CBID_HOUSE_DESTRUCTION = 0x21, // 8 bit callback
85
87 CBID_INDUSTRY_PROBABILITY = 0x22, // 15 bit callback
88
93 CBID_VEHICLE_ADDITIONAL_TEXT = 0x23,
94
96 CBID_STATION_TILE_LAYOUT = 0x24, // 15 bit callback
97
99 CBID_INDTILE_ANIM_START_STOP = 0x25, // 15 bit callback
100
102 CBID_INDTILE_ANIM_NEXT_FRAME = 0x26, // 15 bit callback
103
105 CBID_INDTILE_ANIMATION_SPEED = 0x27, // 8 bit callback
106
108 CBID_INDUSTRY_LOCATION = 0x28, // 15 bit callback
109
111 CBID_INDUSTRY_PRODUCTION_CHANGE = 0x29, // 15 bit callback
112
114 CBID_HOUSE_ACCEPT_CARGO = 0x2A, // 15 bit callback
115
117 CBID_INDTILE_CARGO_ACCEPTANCE = 0x2B, // 15 bit callback
118
120 CBID_INDTILE_ACCEPT_CARGO = 0x2C, // 15 bit callback
121
126 CBID_VEHICLE_COLOUR_MAPPING = 0x2D, // 15 bit callback
127
129 CBID_HOUSE_PRODUCE_CARGO = 0x2E, // 15 bit callback
130
132 CBID_INDTILE_SHAPE_CHECK = 0x2F, // 15 bit callback
133
135 CBID_INDTILE_DRAW_FOUNDATIONS = 0x30, // 15 bit callback
136
141 CBID_VEHICLE_START_STOP_CHECK = 0x31, // 15 bit callback, but 0xFF test is done with 8 bit
142
144 CBID_VEHICLE_32DAY_CALLBACK = 0x32, // 2 bit callback
145
147 CBID_VEHICLE_SOUND_EFFECT = 0x33, // 15 bit callback
148
150 CBID_VEHICLE_AUTOREPLACE_SELECTION = 0x34, // 15 bit callback, not implemented
151
153 CBID_INDUSTRY_MONTHLYPROD_CHANGE = 0x35, // 15 bit callback
154
159 CBID_VEHICLE_MODIFY_PROPERTY = 0x36, // 8/15 bit depends on queried property
160
162 CBID_INDUSTRY_CARGO_SUFFIX = 0x37, // 15 bit callback, but 0xFF test is done with 8 bit
163
165 CBID_INDUSTRY_FUND_MORE_TEXT = 0x38, // 15 bit callback
166
168 CBID_CARGO_PROFIT_CALC = 0x39, // 15 bit callback
169
171 CBID_INDUSTRY_WINDOW_MORE_TEXT = 0x3A, // 15 bit callback
172
174 CBID_INDUSTRY_SPECIAL_EFFECT = 0x3B, // 15 bit callback
175
177 CBID_INDTILE_AUTOSLOPE = 0x3C, // 15 bit callback
178
180 CBID_INDUSTRY_REFUSE_CARGO = 0x3D, // 15 bit callback
181
182 /* There are no callbacks 0x3E - 0x13F */
183
185 CBID_STATION_ANIM_START_STOP = 0x140, // 15 bit callback
186
188 CBID_STATION_ANIM_NEXT_FRAME = 0x141, // 15 bit callback
189
191 CBID_STATION_ANIMATION_SPEED = 0x142, // 8 bit callback
192
194 CBID_HOUSE_DENY_DESTRUCTION = 0x143, // 15 bit callback
195
197 CBID_SOUNDS_AMBIENT_EFFECT = 0x144, // 15 bit callback
198
200 CBID_CARGO_STATION_RATING_CALC = 0x145, // 15 bit callback
201
203 CBID_NEW_SIGNALS_SPRITE_DRAW = 0x146, // 15 bit callback, not implemented
204
206 CBID_CANALS_SPRITE_OFFSET = 0x147, // 15 bit callback
207
209 CBID_HOUSE_WATCHED_CARGO_ACCEPTED = 0x148, // 15 bit callback
210
212 CBID_STATION_LAND_SLOPE_CHECK = 0x149, // 15 bit callback
213
215 CBID_INDUSTRY_DECIDE_COLOUR = 0x14A, // 4 bit callback
216
218 CBID_INDUSTRY_INPUT_CARGO_TYPES = 0x14B, // 8 bit callback
219
221 CBID_INDUSTRY_OUTPUT_CARGO_TYPES = 0x14C, // 8 bit callback
222
224 CBID_HOUSE_CUSTOM_NAME = 0x14D, // 15 bit callback
225
227 CBID_HOUSE_DRAW_FOUNDATIONS = 0x14E, // 15 bit callback
228
230 CBID_HOUSE_AUTOSLOPE = 0x14F, // 15 bit callback
231
233 CBID_AIRPTILE_DRAW_FOUNDATIONS = 0x150, // 15 bit callback
234
236 CBID_AIRPTILE_ANIM_START_STOP = 0x152, // 15 bit callback
237
239 CBID_AIRPTILE_ANIM_NEXT_FRAME = 0x153, // 15 bit callback
240
242 CBID_AIRPTILE_ANIMATION_SPEED = 0x154, // 8 bit callback
243
248 CBID_AIRPORT_ADDITIONAL_TEXT = 0x155, // 15 bit callback
249
251 CBID_AIRPORT_LAYOUT_NAME = 0x156, // 15 bit callback
252
254 CBID_OBJECT_LAND_SLOPE_CHECK = 0x157, // 15 bit callback
255
257 CBID_OBJECT_ANIMATION_NEXT_FRAME = 0x158, // 15 bit callback
258
260 CBID_OBJECT_ANIMATION_START_STOP = 0x159, // 15 bit callback
261
263 CBID_OBJECT_ANIMATION_SPEED = 0x15A, // 8 bit callback
264
266 CBID_OBJECT_COLOUR = 0x15B, // 15 bit callback
267
269 CBID_OBJECT_FUND_MORE_TEXT = 0x15C, // 15 bit callback
270
272 CBID_OBJECT_AUTOSLOPE = 0x15D, // 15 bit callback
273
275 CBID_VEHICLE_REFIT_COST = 0x15E, // 15 bit callback
276
278 CBID_INDUSTRY_PROD_CHANGE_BUILD = 0x15F, // 15 bit callback
279
281 CBID_VEHICLE_SPAWN_VISUAL_EFFECT = 0x160, // 15 bit callback
282
284 CBID_VEHICLE_NAME = 0x161, // 15 bit callback
285
287 CBID_VEHICLE_BUILD_PROBABILITY = 0x162, // 15 bit callback
288 };
289
294 enum VehicleCallbackMask {
295 CBM_VEHICLE_VISUAL_EFFECT = 0,
296 CBM_VEHICLE_LENGTH = 1,
297 CBM_VEHICLE_LOAD_AMOUNT = 2,
298 CBM_VEHICLE_REFIT_CAPACITY = 3,
299 CBM_VEHICLE_ARTIC_ENGINE = 4,
300 CBM_VEHICLE_CARGO_SUFFIX = 5,
301 CBM_VEHICLE_COLOUR_REMAP = 6,
302 CBM_VEHICLE_SOUND_EFFECT = 7,
303 CBM_VEHICLE_NAME = 8,
304 };
305
309 enum StationCallbackMask {
310 CBM_STATION_AVAIL = 0,
311 CBM_STATION_SPRITE_LAYOUT = 1,
312 CBM_STATION_ANIMATION_NEXT_FRAME = 2,
313 CBM_STATION_ANIMATION_SPEED = 3,
314 CBM_STATION_SLOPE_CHECK = 4,
315 };
316
320 enum RoadStopCallbackMask {
321 CBM_ROAD_STOP_AVAIL = 0,
322 CBM_ROAD_STOP_ANIMATION_NEXT_FRAME = 1,
323 CBM_ROAD_STOP_ANIMATION_SPEED = 2,
324 };
325
329 enum HouseCallbackMask {
330 CBM_HOUSE_ALLOW_CONSTRUCTION = 0,
331 CBM_HOUSE_ANIMATION_NEXT_FRAME = 1,
332 CBM_HOUSE_ANIMATION_START_STOP = 2,
333 CBM_HOUSE_CONSTRUCTION_STATE_CHANGE = 3,
334 CBM_HOUSE_COLOUR = 4,
335 CBM_HOUSE_CARGO_ACCEPTANCE = 5,
336 CBM_HOUSE_ANIMATION_SPEED = 6,
337 CBM_HOUSE_DESTRUCTION = 7,
338 CBM_HOUSE_ACCEPT_CARGO = 8,
339 CBM_HOUSE_PRODUCE_CARGO = 9,
340 CBM_HOUSE_DENY_DESTRUCTION = 10,
341 CBM_HOUSE_DRAW_FOUNDATIONS = 11,
342 CBM_HOUSE_AUTOSLOPE = 12,
343 };
344
348 enum CanalCallbackMask {
349 CBM_CANAL_SPRITE_OFFSET = 0,
350 };
351
355 enum CargoCallbackMask {
356 CBM_CARGO_PROFIT_CALC = 0,
357 CBM_CARGO_STATION_RATING_CALC = 1,
358 };
359
363 enum IndustryCallbackMask {
364 CBM_IND_PROBABILITY = 0,
365 CBM_IND_PRODUCTION_CARGO_ARRIVAL = 1,
366 CBM_IND_PRODUCTION_256_TICKS = 2,
367 CBM_IND_LOCATION = 3,
368 CBM_IND_PRODUCTION_CHANGE = 4,
369 CBM_IND_MONTHLYPROD_CHANGE = 5,
370 CBM_IND_CARGO_SUFFIX = 6,
371 CBM_IND_FUND_MORE_TEXT = 7,
372 CBM_IND_WINDOW_MORE_TEXT = 8,
373 CBM_IND_SPECIAL_EFFECT = 9,
374 CBM_IND_REFUSE_CARGO = 10,
375 CBM_IND_DECIDE_COLOUR = 11,
376 CBM_IND_INPUT_CARGO_TYPES = 12,
377 CBM_IND_OUTPUT_CARGO_TYPES = 13,
378 CBM_IND_PROD_CHANGE_BUILD = 14,
379 };
380
384 enum IndustryTileCallbackMask {
385 CBM_INDT_ANIM_NEXT_FRAME = 0,
386 CBM_INDT_ANIM_SPEED = 1,
387 CBM_INDT_CARGO_ACCEPTANCE = 2,
388 CBM_INDT_ACCEPT_CARGO = 3,
389 CBM_INDT_SHAPE_CHECK = 4,
390 CBM_INDT_DRAW_FOUNDATIONS = 5,
391 CBM_INDT_AUTOSLOPE = 6,
392 };
393
397 enum ObjectCallbackMask {
398 CBM_OBJ_SLOPE_CHECK = 0,
399 CBM_OBJ_ANIMATION_NEXT_FRAME = 1,
400 CBM_OBJ_ANIMATION_SPEED = 2,
401 CBM_OBJ_COLOUR = 3,
402 CBM_OBJ_FUND_MORE_TEXT = 4,
403 CBM_OBJ_AUTOSLOPE = 5,
404 };
405
409 enum AirportTileCallbackMask {
410 CBM_AIRT_ANIM_NEXT_FRAME = 0,
411 CBM_AIRT_ANIM_SPEED = 1,
412 CBM_AIRT_SHAPE_CHECK = 4,
413 CBM_AIRT_DRAW_FOUNDATIONS = 5,
414 CBM_AIRT_AUTOSLOPE = 6,
415 };
416
420 static const uint CALLBACK_FAILED = 0xFFFF;
421 static const uint CALLBACK_HOUSEPRODCARGO_END = 0x20FF;
422
423 #endif /* NEWGRF_CALLBACKS_H */
CBM_AIRT_SHAPE_CHECK
@ CBM_AIRT_SHAPE_CHECK
decides slope suitability
Definition: newgrf_callbacks.h:412
CBID_OBJECT_COLOUR
@ CBID_OBJECT_COLOUR
Called to determine the colour of a town building.
Definition: newgrf_callbacks.h:266
CBM_OBJ_ANIMATION_SPEED
@ CBM_OBJ_ANIMATION_SPEED
decides animation speed
Definition: newgrf_callbacks.h:400
CBM_IND_PRODUCTION_CARGO_ARRIVAL
@ CBM_IND_PRODUCTION_CARGO_ARRIVAL
call production callback when cargo arrives at the industry
Definition: newgrf_callbacks.h:365
CanalCallbackMask
CanalCallbackMask
Callback masks for canals.
Definition: newgrf_callbacks.h:348
CBM_IND_CARGO_SUFFIX
@ CBM_IND_CARGO_SUFFIX
cargo sub-type display
Definition: newgrf_callbacks.h:370
CBM_CARGO_PROFIT_CALC
@ CBM_CARGO_PROFIT_CALC
custom profit calculation
Definition: newgrf_callbacks.h:356
CBM_AIRT_ANIM_NEXT_FRAME
@ CBM_AIRT_ANIM_NEXT_FRAME
decides next animation frame
Definition: newgrf_callbacks.h:410
CBID_OBJECT_LAND_SLOPE_CHECK
@ CBID_OBJECT_LAND_SLOPE_CHECK
Callback done for each tile of an object to check the slope.
Definition: newgrf_callbacks.h:254
CBID_OBJECT_ANIMATION_NEXT_FRAME
@ CBID_OBJECT_ANIMATION_NEXT_FRAME
Determine the next animation frame for a house.
Definition: newgrf_callbacks.h:257
CBM_AIRT_AUTOSLOPE
@ CBM_AIRT_AUTOSLOPE
decides allowance of autosloping
Definition: newgrf_callbacks.h:414
CBM_HOUSE_CARGO_ACCEPTANCE
@ CBM_HOUSE_CARGO_ACCEPTANCE
decides amount of cargo acceptance
Definition: newgrf_callbacks.h:335
CBID_VEHICLE_START_STOP_CHECK
@ CBID_VEHICLE_START_STOP_CHECK
Called when the company (or AI) tries to start or stop a vehicle.
Definition: newgrf_callbacks.h:141
CBID_VEHICLE_VISUAL_EFFECT
@ CBID_VEHICLE_VISUAL_EFFECT
Visual effects and wagon power.
Definition: newgrf_callbacks.h:30
CBID_VEHICLE_ARTIC_ENGINE
@ CBID_VEHICLE_ARTIC_ENGINE
Builds articulated engines for trains and RVs.
Definition: newgrf_callbacks.h:51
CBID_HOUSE_ANIMATION_SPEED
@ CBID_HOUSE_ANIMATION_SPEED
Called to indicate how long the current animation frame should last.
Definition: newgrf_callbacks.h:81
CBID_VEHICLE_CARGO_SUFFIX
@ CBID_VEHICLE_CARGO_SUFFIX
Determine the cargo "suffixes" for each refit possibility of a cargo.
Definition: newgrf_callbacks.h:60
CBID_SOUNDS_AMBIENT_EFFECT
@ CBID_SOUNDS_AMBIENT_EFFECT
Select an ambient sound to play for a given type of tile.
Definition: newgrf_callbacks.h:197
CBM_OBJ_ANIMATION_NEXT_FRAME
@ CBM_OBJ_ANIMATION_NEXT_FRAME
decides next animation frame
Definition: newgrf_callbacks.h:399
CBM_CARGO_STATION_RATING_CALC
@ CBM_CARGO_STATION_RATING_CALC
custom station rating for this cargo type
Definition: newgrf_callbacks.h:357
CBID_INDUSTRY_PRODUCTION_CHANGE
@ CBID_INDUSTRY_PRODUCTION_CHANGE
Called on production changes, so it can be adjusted.
Definition: newgrf_callbacks.h:111
CBID_STATION_AVAILABILITY
@ CBID_STATION_AVAILABILITY
Determine whether a newstation should be made available to build.
Definition: newgrf_callbacks.h:39
CBID_VEHICLE_MODIFY_PROPERTY
@ CBID_VEHICLE_MODIFY_PROPERTY
Called to modify various vehicle properties.
Definition: newgrf_callbacks.h:159
CBID_INDTILE_CARGO_ACCEPTANCE
@ CBID_INDTILE_CARGO_ACCEPTANCE
Called to query the cargo acceptance of the industry tile.
Definition: newgrf_callbacks.h:117
CBM_INDT_SHAPE_CHECK
@ CBM_INDT_SHAPE_CHECK
decides slope suitability
Definition: newgrf_callbacks.h:389
CBID_CANALS_SPRITE_OFFSET
@ CBID_CANALS_SPRITE_OFFSET
Add an offset to the default sprite numbers to show another sprite.
Definition: newgrf_callbacks.h:206
CBM_VEHICLE_SOUND_EFFECT
@ CBM_VEHICLE_SOUND_EFFECT
Vehicle uses custom sound effects.
Definition: newgrf_callbacks.h:302
CBID_HOUSE_WATCHED_CARGO_ACCEPTED
@ CBID_HOUSE_WATCHED_CARGO_ACCEPTED
Called when a cargo type specified in property 20 is accepted.
Definition: newgrf_callbacks.h:209
CBID_CARGO_STATION_RATING_CALC
@ CBID_CARGO_STATION_RATING_CALC
Called to calculate part of a station rating.
Definition: newgrf_callbacks.h:200
RoadStopCallbackMask
RoadStopCallbackMask
Callback masks for road stops.
Definition: newgrf_callbacks.h:320
CBID_INDUSTRY_PROBABILITY
@ CBID_INDUSTRY_PROBABILITY
Called to determine if the given industry type is available.
Definition: newgrf_callbacks.h:87
CBM_STATION_SLOPE_CHECK
@ CBM_STATION_SLOPE_CHECK
Check slope of new station tiles.
Definition: newgrf_callbacks.h:314
CBID_HOUSE_CUSTOM_NAME
@ CBID_HOUSE_CUSTOM_NAME
Called on the Get Tile Description for an house tile.
Definition: newgrf_callbacks.h:224
CBM_INDT_ACCEPT_CARGO
@ CBM_INDT_ACCEPT_CARGO
decides accepted types
Definition: newgrf_callbacks.h:388
CBM_STATION_ANIMATION_NEXT_FRAME
@ CBM_STATION_ANIMATION_NEXT_FRAME
Use a custom next frame callback.
Definition: newgrf_callbacks.h:312
CBID_INDTILE_ANIM_START_STOP
@ CBID_INDTILE_ANIM_START_STOP
Called for periodically starting or stopping the animation.
Definition: newgrf_callbacks.h:99
CBID_INDTILE_DRAW_FOUNDATIONS
@ CBID_INDTILE_DRAW_FOUNDATIONS
Called to determine the type (if any) of foundation to draw for industry tile.
Definition: newgrf_callbacks.h:135
CBM_IND_PRODUCTION_256_TICKS
@ CBM_IND_PRODUCTION_256_TICKS
call production callback every 256 ticks
Definition: newgrf_callbacks.h:366
CargoCallbackMask
CargoCallbackMask
Callback masks for cargoes.
Definition: newgrf_callbacks.h:355
CBM_HOUSE_DESTRUCTION
@ CBM_HOUSE_DESTRUCTION
trigger destruction of building
Definition: newgrf_callbacks.h:337
CallbackID
CallbackID
List of implemented NewGRF callbacks.
Definition: newgrf_callbacks.h:20
CBM_VEHICLE_CARGO_SUFFIX
@ CBM_VEHICLE_CARGO_SUFFIX
Show suffix after cargo name.
Definition: newgrf_callbacks.h:300
CBID_HOUSE_DRAW_FOUNDATIONS
@ CBID_HOUSE_DRAW_FOUNDATIONS
Called to determine the type (if any) of foundation to draw for house tile.
Definition: newgrf_callbacks.h:227
CBM_CANAL_SPRITE_OFFSET
@ CBM_CANAL_SPRITE_OFFSET
Enable add sprite offset callback.
Definition: newgrf_callbacks.h:349
CBID_INDUSTRY_OUTPUT_CARGO_TYPES
@ CBID_INDUSTRY_OUTPUT_CARGO_TYPES
Customize the output cargo types of a newly build industry.
Definition: newgrf_callbacks.h:221
CBID_INDTILE_ACCEPT_CARGO
@ CBID_INDTILE_ACCEPT_CARGO
Called to determine which cargoes an industry should accept.
Definition: newgrf_callbacks.h:120
CBM_VEHICLE_ARTIC_ENGINE
@ CBM_VEHICLE_ARTIC_ENGINE
Add articulated engines (trains and road vehicles)
Definition: newgrf_callbacks.h:299
CBID_INDUSTRY_SPECIAL_EFFECT
@ CBID_INDUSTRY_SPECIAL_EFFECT
Called to determine industry special effects.
Definition: newgrf_callbacks.h:174
CBM_INDT_AUTOSLOPE
@ CBM_INDT_AUTOSLOPE
decides allowance of autosloping
Definition: newgrf_callbacks.h:391
CBM_HOUSE_PRODUCE_CARGO
@ CBM_HOUSE_PRODUCE_CARGO
custom cargo production
Definition: newgrf_callbacks.h:339
CBM_IND_FUND_MORE_TEXT
@ CBM_IND_FUND_MORE_TEXT
additional text in fund window
Definition: newgrf_callbacks.h:371
CBM_HOUSE_CONSTRUCTION_STATE_CHANGE
@ CBM_HOUSE_CONSTRUCTION_STATE_CHANGE
change animation when construction state changes
Definition: newgrf_callbacks.h:333
CBID_INDUSTRY_FUND_MORE_TEXT
@ CBID_INDUSTRY_FUND_MORE_TEXT
Called to determine more text in the fund industry window.
Definition: newgrf_callbacks.h:165
CBM_IND_PROBABILITY
@ CBM_IND_PROBABILITY
industry availability/probability callback
Definition: newgrf_callbacks.h:364
CBID_VEHICLE_ADDITIONAL_TEXT
@ CBID_VEHICLE_ADDITIONAL_TEXT
This callback is called from vehicle purchase lists.
Definition: newgrf_callbacks.h:93
CBID_AIRPORT_ADDITIONAL_TEXT
@ CBID_AIRPORT_ADDITIONAL_TEXT
This callback is called from airport list.
Definition: newgrf_callbacks.h:248
CBM_VEHICLE_NAME
@ CBM_VEHICLE_NAME
Engine name.
Definition: newgrf_callbacks.h:303
CBM_VEHICLE_LENGTH
@ CBM_VEHICLE_LENGTH
Vehicle length (trains and road vehicles)
Definition: newgrf_callbacks.h:296
CBID_VEHICLE_BUILD_PROBABILITY
@ CBID_VEHICLE_BUILD_PROBABILITY
Called to determine probability during build.
Definition: newgrf_callbacks.h:287
CBID_INDUSTRY_LOCATION
@ CBID_INDUSTRY_LOCATION
Called to determine if the given industry can be built on specific area.
Definition: newgrf_callbacks.h:108
CBM_HOUSE_ANIMATION_NEXT_FRAME
@ CBM_HOUSE_ANIMATION_NEXT_FRAME
decides next animation frame
Definition: newgrf_callbacks.h:331
CBM_OBJ_FUND_MORE_TEXT
@ CBM_OBJ_FUND_MORE_TEXT
additional text in fund window
Definition: newgrf_callbacks.h:402
CBID_GENERIC_AI_PURCHASE_SELECTION
@ CBID_GENERIC_AI_PURCHASE_SELECTION
AI construction/purchase selection.
Definition: newgrf_callbacks.h:57
CBID_HOUSE_COLOUR
@ CBID_HOUSE_COLOUR
Called to determine the colour of a town building.
Definition: newgrf_callbacks.h:75
CBID_VEHICLE_REFIT_COST
@ CBID_VEHICLE_REFIT_COST
Called to determine the cost factor for refitting a vehicle.
Definition: newgrf_callbacks.h:275
StationCallbackMask
StationCallbackMask
Callback masks for stations.
Definition: newgrf_callbacks.h:309
CBM_ROAD_STOP_ANIMATION_SPEED
@ CBM_ROAD_STOP_ANIMATION_SPEED
Customize the animation speed of the road stop.
Definition: newgrf_callbacks.h:323
CBID_HOUSE_DESTRUCTION
@ CBID_HOUSE_DESTRUCTION
Called periodically to determine if a house should be destroyed.
Definition: newgrf_callbacks.h:84
CBM_VEHICLE_LOAD_AMOUNT
@ CBM_VEHICLE_LOAD_AMOUNT
Load amount.
Definition: newgrf_callbacks.h:297
CBM_ROAD_STOP_ANIMATION_NEXT_FRAME
@ CBM_ROAD_STOP_ANIMATION_NEXT_FRAME
Use a custom next frame callback.
Definition: newgrf_callbacks.h:322
CBID_STATION_LAND_SLOPE_CHECK
@ CBID_STATION_LAND_SLOPE_CHECK
Callback done for each tile of a station to check the slope.
Definition: newgrf_callbacks.h:212
CBM_STATION_ANIMATION_SPEED
@ CBM_STATION_ANIMATION_SPEED
Customize the animation speed of the station.
Definition: newgrf_callbacks.h:313
CBID_AIRPTILE_ANIM_NEXT_FRAME
@ CBID_AIRPTILE_ANIM_NEXT_FRAME
Called to determine airport tile next animation frame.
Definition: newgrf_callbacks.h:239
CBID_VEHICLE_SOUND_EFFECT
@ CBID_VEHICLE_SOUND_EFFECT
Called to play a special sound effect.
Definition: newgrf_callbacks.h:147
CBID_VEHICLE_AUTOREPLACE_SELECTION
@ CBID_VEHICLE_AUTOREPLACE_SELECTION
Return the vehicles this given vehicle can be "upgraded" to.
Definition: newgrf_callbacks.h:150
CBID_NO_CALLBACK
@ CBID_NO_CALLBACK
Set when using the callback resolve system, but not to resolve a callback.
Definition: newgrf_callbacks.h:22
CBM_IND_PRODUCTION_CHANGE
@ CBM_IND_PRODUCTION_CHANGE
controls random production change
Definition: newgrf_callbacks.h:368
CBID_HOUSE_ALLOW_CONSTRUCTION
@ CBID_HOUSE_ALLOW_CONSTRUCTION
Determine whether the house can be built on the specified tile.
Definition: newgrf_callbacks.h:54
CBM_HOUSE_ACCEPT_CARGO
@ CBM_HOUSE_ACCEPT_CARGO
decides accepted types
Definition: newgrf_callbacks.h:338
CBID_INDUSTRY_MONTHLYPROD_CHANGE
@ CBID_INDUSTRY_MONTHLYPROD_CHANGE
Called monthly on production changes, so it can be adjusted more frequently.
Definition: newgrf_callbacks.h:153
CBID_HOUSE_CONSTRUCTION_STATE_CHANGE
@ CBID_HOUSE_CONSTRUCTION_STATE_CHANGE
Called whenever the construction state of a house changes.
Definition: newgrf_callbacks.h:69
CBM_INDT_DRAW_FOUNDATIONS
@ CBM_INDT_DRAW_FOUNDATIONS
decides if default foundations need to be drawn
Definition: newgrf_callbacks.h:390
CBM_IND_LOCATION
@ CBM_IND_LOCATION
check industry construction on given area
Definition: newgrf_callbacks.h:367
CBID_VEHICLE_SPAWN_VISUAL_EFFECT
@ CBID_VEHICLE_SPAWN_VISUAL_EFFECT
Called to spawn visual effects for vehicles.
Definition: newgrf_callbacks.h:281
CBM_IND_INPUT_CARGO_TYPES
@ CBM_IND_INPUT_CARGO_TYPES
customize the cargoes the industry requires
Definition: newgrf_callbacks.h:376
HouseCallbackMask
HouseCallbackMask
Callback masks for houses.
Definition: newgrf_callbacks.h:329
CBID_INDUSTRY_INPUT_CARGO_TYPES
@ CBID_INDUSTRY_INPUT_CARGO_TYPES
Customize the input cargo types of a newly build industry.
Definition: newgrf_callbacks.h:218
CBM_OBJ_COLOUR
@ CBM_OBJ_COLOUR
decide the colour of the building
Definition: newgrf_callbacks.h:401
CALLBACK_HOUSEPRODCARGO_END
static const uint CALLBACK_HOUSEPRODCARGO_END
Sentinel indicating that the loop for CBID_HOUSE_PRODUCE_CARGO has ended.
Definition: newgrf_callbacks.h:421
CBM_HOUSE_COLOUR
@ CBM_HOUSE_COLOUR
decide the colour of the building
Definition: newgrf_callbacks.h:334
CBM_HOUSE_ANIMATION_SPEED
@ CBM_HOUSE_ANIMATION_SPEED
decides animation speed
Definition: newgrf_callbacks.h:336
CBID_AIRPORT_LAYOUT_NAME
@ CBID_AIRPORT_LAYOUT_NAME
Called to determine text to show as airport layout name.
Definition: newgrf_callbacks.h:251
CBID_HOUSE_ANIMATION_START_STOP
@ CBID_HOUSE_ANIMATION_START_STOP
Called for periodically starting or stopping the animation.
Definition: newgrf_callbacks.h:66
CBM_IND_SPECIAL_EFFECT
@ CBM_IND_SPECIAL_EFFECT
control special effects
Definition: newgrf_callbacks.h:373
CBID_INDUSTRY_CARGO_SUFFIX
@ CBID_INDUSTRY_CARGO_SUFFIX
Called to determine text to display after cargo name.
Definition: newgrf_callbacks.h:162
CBM_STATION_AVAIL
@ CBM_STATION_AVAIL
Availability of station in construction window.
Definition: newgrf_callbacks.h:310
CBID_STATION_ANIM_NEXT_FRAME
@ CBID_STATION_ANIM_NEXT_FRAME
Called to determine station tile next animation frame.
Definition: newgrf_callbacks.h:188
CBID_HOUSE_CARGO_ACCEPTANCE
@ CBID_HOUSE_CARGO_ACCEPTANCE
Called to decide how much cargo a town building can accept.
Definition: newgrf_callbacks.h:78
CBID_STATION_TILE_LAYOUT
@ CBID_STATION_TILE_LAYOUT
Called when building a station to customize the tile layout.
Definition: newgrf_callbacks.h:96
CBM_HOUSE_ANIMATION_START_STOP
@ CBM_HOUSE_ANIMATION_START_STOP
periodically start/stop the animation
Definition: newgrf_callbacks.h:332
CBM_VEHICLE_REFIT_CAPACITY
@ CBM_VEHICLE_REFIT_CAPACITY
Cargo capacity after refit.
Definition: newgrf_callbacks.h:298
CBM_INDT_ANIM_NEXT_FRAME
@ CBM_INDT_ANIM_NEXT_FRAME
decides next animation frame
Definition: newgrf_callbacks.h:385
CBID_OBJECT_AUTOSLOPE
@ CBID_OBJECT_AUTOSLOPE
Called to determine if one can alter the ground below an object tile.
Definition: newgrf_callbacks.h:272
CBM_INDT_ANIM_SPEED
@ CBM_INDT_ANIM_SPEED
decides animation speed
Definition: newgrf_callbacks.h:386
CBID_INDTILE_ANIM_NEXT_FRAME
@ CBID_INDTILE_ANIM_NEXT_FRAME
Called to determine industry tile next animation frame.
Definition: newgrf_callbacks.h:102
CBID_VEHICLE_COLOUR_MAPPING
@ CBID_VEHICLE_COLOUR_MAPPING
Called to determine if a specific colour map should be used for a vehicle instead of the default live...
Definition: newgrf_callbacks.h:126
CBM_IND_MONTHLYPROD_CHANGE
@ CBM_IND_MONTHLYPROD_CHANGE
controls monthly random production change
Definition: newgrf_callbacks.h:369
CBID_INDUSTRY_PROD_CHANGE_BUILD
@ CBID_INDUSTRY_PROD_CHANGE_BUILD
Called when industry is built to set initial production level.
Definition: newgrf_callbacks.h:278
CBID_NEW_SIGNALS_SPRITE_DRAW
@ CBID_NEW_SIGNALS_SPRITE_DRAW
Allow signal sprites to be replaced dynamically.
Definition: newgrf_callbacks.h:203
CALLBACK_FAILED
static const uint CALLBACK_FAILED
Different values for Callback result evaluations.
Definition: newgrf_callbacks.h:420
CBID_INDUSTRY_REFUSE_CARGO
@ CBID_INDUSTRY_REFUSE_CARGO
Called to determine if the industry can still accept or refuse more cargo arrival.
Definition: newgrf_callbacks.h:180
CBM_OBJ_SLOPE_CHECK
@ CBM_OBJ_SLOPE_CHECK
decides slope suitability
Definition: newgrf_callbacks.h:398
CBM_AIRT_DRAW_FOUNDATIONS
@ CBM_AIRT_DRAW_FOUNDATIONS
decides if default foundations need to be drawn
Definition: newgrf_callbacks.h:413
CBID_AIRPTILE_ANIM_START_STOP
@ CBID_AIRPTILE_ANIM_START_STOP
Called for periodically starting or stopping the animation.
Definition: newgrf_callbacks.h:236
CBID_AIRPTILE_DRAW_FOUNDATIONS
@ CBID_AIRPTILE_DRAW_FOUNDATIONS
Called to determine the type (if any) of foundation to draw for an airport tile.
Definition: newgrf_callbacks.h:233
CBM_VEHICLE_VISUAL_EFFECT
@ CBM_VEHICLE_VISUAL_EFFECT
Visual effects and wagon power (trains, road vehicles and ships)
Definition: newgrf_callbacks.h:295
CBID_STATION_ANIM_START_STOP
@ CBID_STATION_ANIM_START_STOP
Called for periodically starting or stopping the animation.
Definition: newgrf_callbacks.h:185
CBM_INDT_CARGO_ACCEPTANCE
@ CBM_INDT_CARGO_ACCEPTANCE
decides amount of cargo acceptance
Definition: newgrf_callbacks.h:387
CBM_OBJ_AUTOSLOPE
@ CBM_OBJ_AUTOSLOPE
decides allowance of autosloping
Definition: newgrf_callbacks.h:403
IndustryTileCallbackMask
IndustryTileCallbackMask
Callback masks for industry tiles.
Definition: newgrf_callbacks.h:384
CBM_HOUSE_DENY_DESTRUCTION
@ CBM_HOUSE_DENY_DESTRUCTION
conditional protection
Definition: newgrf_callbacks.h:340
CBM_IND_REFUSE_CARGO
@ CBM_IND_REFUSE_CARGO
option out of accepting cargo
Definition: newgrf_callbacks.h:374
CBID_OBJECT_ANIMATION_START_STOP
@ CBID_OBJECT_ANIMATION_START_STOP
Called for periodically starting or stopping the animation.
Definition: newgrf_callbacks.h:260
CBID_INDTILE_AUTOSLOPE
@ CBID_INDTILE_AUTOSLOPE
Called to determine if industry can alter the ground below industry tile.
Definition: newgrf_callbacks.h:177
IndustryCallbackMask
IndustryCallbackMask
Callback masks for Industries.
Definition: newgrf_callbacks.h:363
CBID_STATION_ANIMATION_SPEED
@ CBID_STATION_ANIMATION_SPEED
Called to indicate how long the current animation frame should last.
Definition: newgrf_callbacks.h:191
ObjectCallbackMask
ObjectCallbackMask
Callback masks for objects.
Definition: newgrf_callbacks.h:397
CBM_IND_WINDOW_MORE_TEXT
@ CBM_IND_WINDOW_MORE_TEXT
additional text in industry window
Definition: newgrf_callbacks.h:372
VehicleCallbackMask
VehicleCallbackMask
Callback masks for vehicles, indicates which callbacks are used by a vehicle.
Definition: newgrf_callbacks.h:294
CBID_OBJECT_ANIMATION_SPEED
@ CBID_OBJECT_ANIMATION_SPEED
Called to indicate how long the current animation frame should last.
Definition: newgrf_callbacks.h:263
CBID_HOUSE_PRODUCE_CARGO
@ CBID_HOUSE_PRODUCE_CARGO
Called to determine how much cargo a town building produces.
Definition: newgrf_callbacks.h:129
CBID_VEHICLE_REFIT_CAPACITY
@ CBID_VEHICLE_REFIT_CAPACITY
Refit capacity, the passed vehicle needs to have its ->cargo_type set to the cargo we are refitting t...
Definition: newgrf_callbacks.h:48
CBID_INDUSTRY_DECIDE_COLOUR
@ CBID_INDUSTRY_DECIDE_COLOUR
Called to determine the colour of an industry.
Definition: newgrf_callbacks.h:215
CBM_ROAD_STOP_AVAIL
@ CBM_ROAD_STOP_AVAIL
Availability of road stop in construction window.
Definition: newgrf_callbacks.h:321
CBID_VEHICLE_32DAY_CALLBACK
@ CBID_VEHICLE_32DAY_CALLBACK
Called for every vehicle every 32 days (not all on same date though).
Definition: newgrf_callbacks.h:144
CBM_HOUSE_AUTOSLOPE
@ CBM_HOUSE_AUTOSLOPE
decides allowance of autosloping
Definition: newgrf_callbacks.h:342
CBID_INDUSTRY_WINDOW_MORE_TEXT
@ CBID_INDUSTRY_WINDOW_MORE_TEXT
Called to determine more text in the industry window.
Definition: newgrf_callbacks.h:171
CBM_IND_DECIDE_COLOUR
@ CBM_IND_DECIDE_COLOUR
give a custom colour to newly build industries
Definition: newgrf_callbacks.h:375
CBID_VEHICLE_LOAD_AMOUNT
@ CBID_VEHICLE_LOAD_AMOUNT
Determine the amount of cargo to load per unit of time when using gradual loading.
Definition: newgrf_callbacks.h:36
CBID_VEHICLE_LENGTH
@ CBID_VEHICLE_LENGTH
Vehicle length, returns the amount of 1/8's the vehicle is shorter for trains and RVs.
Definition: newgrf_callbacks.h:33
CBM_IND_PROD_CHANGE_BUILD
@ CBM_IND_PROD_CHANGE_BUILD
initialise production level on construction
Definition: newgrf_callbacks.h:378
CBID_RANDOM_TRIGGER
@ CBID_RANDOM_TRIGGER
Set when calling a randomizing trigger (almost undocumented).
Definition: newgrf_callbacks.h:25
CBM_VEHICLE_COLOUR_REMAP
@ CBM_VEHICLE_COLOUR_REMAP
Change colour mapping of vehicle.
Definition: newgrf_callbacks.h:301
CBM_HOUSE_DRAW_FOUNDATIONS
@ CBM_HOUSE_DRAW_FOUNDATIONS
decides if default foundations need to be drawn
Definition: newgrf_callbacks.h:341
CBM_STATION_SPRITE_LAYOUT
@ CBM_STATION_SPRITE_LAYOUT
Use callback to select a sprite layout to use.
Definition: newgrf_callbacks.h:311
CBID_CARGO_PROFIT_CALC
@ CBID_CARGO_PROFIT_CALC
Called to calculate the income of delivered cargo.
Definition: newgrf_callbacks.h:168
CBID_AIRPTILE_ANIMATION_SPEED
@ CBID_AIRPTILE_ANIMATION_SPEED
Called to indicate how long the current animation frame should last.
Definition: newgrf_callbacks.h:242
CBID_INDTILE_ANIMATION_SPEED
@ CBID_INDTILE_ANIMATION_SPEED
Called to indicate how long the current animation frame should last.
Definition: newgrf_callbacks.h:105
CBM_HOUSE_ALLOW_CONSTRUCTION
@ CBM_HOUSE_ALLOW_CONSTRUCTION
decide whether the house can be built on a given tile
Definition: newgrf_callbacks.h:330
CBID_STATION_SPRITE_LAYOUT
@ CBID_STATION_SPRITE_LAYOUT
Choose a sprite layout to draw, instead of the standard 0-7 range.
Definition: newgrf_callbacks.h:42
CBID_HOUSE_DENY_DESTRUCTION
@ CBID_HOUSE_DENY_DESTRUCTION
Called to determine whether a town building can be destroyed.
Definition: newgrf_callbacks.h:194
CBID_HOUSE_ACCEPT_CARGO
@ CBID_HOUSE_ACCEPT_CARGO
Called to determine which cargoes a town building should accept.
Definition: newgrf_callbacks.h:114
CBID_VEHICLE_NAME
@ CBID_VEHICLE_NAME
Called to determine the engine name to show.
Definition: newgrf_callbacks.h:284
CBID_HOUSE_ANIMATION_NEXT_FRAME
@ CBID_HOUSE_ANIMATION_NEXT_FRAME
Determine the next animation frame for a house.
Definition: newgrf_callbacks.h:63
CBM_IND_OUTPUT_CARGO_TYPES
@ CBM_IND_OUTPUT_CARGO_TYPES
customize the cargoes the industry produces
Definition: newgrf_callbacks.h:377
CBID_HOUSE_AUTOSLOPE
@ CBID_HOUSE_AUTOSLOPE
Called to determine if one can alter the ground below a house tile.
Definition: newgrf_callbacks.h:230
CBID_INDTILE_SHAPE_CHECK
@ CBID_INDTILE_SHAPE_CHECK
Called to determine if the given industry tile can be built on specific tile.
Definition: newgrf_callbacks.h:132
CBID_TRAIN_ALLOW_WAGON_ATTACH
@ CBID_TRAIN_ALLOW_WAGON_ATTACH
Determine whether a wagon can be attached to an already existing train.
Definition: newgrf_callbacks.h:72
CBID_OBJECT_FUND_MORE_TEXT
@ CBID_OBJECT_FUND_MORE_TEXT
Called to determine more text in the fund object window.
Definition: newgrf_callbacks.h:269
AirportTileCallbackMask
AirportTileCallbackMask
Callback masks for airport tiles.
Definition: newgrf_callbacks.h:409
CBM_AIRT_ANIM_SPEED
@ CBM_AIRT_ANIM_SPEED
decides animation speed
Definition: newgrf_callbacks.h:411