src/newgrf_callbacks.h
author rubidium
Sun, 08 Jul 2007 17:40:04 +0000
changeset 7199 e65a28455ee3
parent 7198 27559e21e9f5
child 7205 0a6d45455ae5
permissions -rw-r--r--
(svn r10477) -Codechange: add some callbacks to customise the acceptance of industries.
2186
db48cf29b983 (svn r2701) Insert Id tags into all source files
tron
parents: 2129
diff changeset
     1
/* $Id$ */
db48cf29b983 (svn r2701) Insert Id tags into all source files
tron
parents: 2129
diff changeset
     2
6413
c3e23d3a4ae3 (svn r9549) -Codechange: Add definition of callbacks and callback masks for both industries and industry tiles
belugas
parents: 6359
diff changeset
     3
/** @file newgrf_callbacks.h
c3e23d3a4ae3 (svn r9549) -Codechange: Add definition of callbacks and callback masks for both industries and industry tiles
belugas
parents: 6359
diff changeset
     4
 */
c3e23d3a4ae3 (svn r9549) -Codechange: Add definition of callbacks and callback masks for both industries and industry tiles
belugas
parents: 6359
diff changeset
     5
2982
eb7f50dcb249 (svn r3557) - NewGRF: move callback enums to a new file as more than just engines will use them
peter1138
parents: 2971
diff changeset
     6
#ifndef NEWGRF_CALLBACKS_H
eb7f50dcb249 (svn r3557) - NewGRF: move callback enums to a new file as more than just engines will use them
peter1138
parents: 2971
diff changeset
     7
#define NEWGRF_CALLBACKS_H
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
     8
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
     9
3007
5c0d90264d47 (svn r3587) - NewGRF: Rename Callback IDs to include their "class"
peter1138
parents: 2982
diff changeset
    10
/**
5c0d90264d47 (svn r3587) - NewGRF: Rename Callback IDs to include their "class"
peter1138
parents: 2982
diff changeset
    11
 * List of implemented NewGRF callbacks.
5c0d90264d47 (svn r3587) - NewGRF: Rename Callback IDs to include their "class"
peter1138
parents: 2982
diff changeset
    12
 * Names are formatted as CBID_<CLASS>_<CALLBACK>
5c0d90264d47 (svn r3587) - NewGRF: Rename Callback IDs to include their "class"
peter1138
parents: 2982
diff changeset
    13
 */
1883
ad68cd0a0a25 (svn r2389) - Feature: [newgrf] Implement the mechanism for handling newgrf callbacks.
hackykid
parents: 1802
diff changeset
    14
enum CallbackID {
7169
314b046af3a1 (svn r10443) -Fix: randomizing triggers should be called with callback type set to 1
peter1138
parents: 6490
diff changeset
    15
	/* Set when calling a randomizing trigger (almost undocumented) */
314b046af3a1 (svn r10443) -Fix: randomizing triggers should be called with callback type set to 1
peter1138
parents: 6490
diff changeset
    16
	CBID_RANDOM_TRIGGER             = 0x01,
314b046af3a1 (svn r10443) -Fix: randomizing triggers should be called with callback type set to 1
peter1138
parents: 6490
diff changeset
    17
6310
c9ec0a1dde30 (svn r9215) -Documentation : correct Doxygen of comments
belugas
parents: 6227
diff changeset
    18
	/* Powered wagons, if the result is lower as 0x40 then the wagon is powered
c9ec0a1dde30 (svn r9215) -Documentation : correct Doxygen of comments
belugas
parents: 6227
diff changeset
    19
	 * @todo : interpret the rest of the result, aka "visual effects" */
3007
5c0d90264d47 (svn r3587) - NewGRF: Rename Callback IDs to include their "class"
peter1138
parents: 2982
diff changeset
    20
	CBID_TRAIN_WAGON_POWER          = 0x10,
1908
2fa391fed79a (svn r2414) - Feature: [newgrf] Implement powered wagons, and the callback that goes with it.
hackykid
parents: 1895
diff changeset
    21
6310
c9ec0a1dde30 (svn r9215) -Documentation : correct Doxygen of comments
belugas
parents: 6227
diff changeset
    22
	/* Vehicle length, returns the amount of 1/8's the vehicle is shorter
c9ec0a1dde30 (svn r9215) -Documentation : correct Doxygen of comments
belugas
parents: 6227
diff changeset
    23
	 * only for train vehicles */
3007
5c0d90264d47 (svn r3587) - NewGRF: Rename Callback IDs to include their "class"
peter1138
parents: 2982
diff changeset
    24
	CBID_TRAIN_VEHICLE_LENGTH       = 0x11,
1922
bda6f85eefaa (svn r2428) - Feature: [newgrf] Implement shorter train vehicles (Therax), and the callback that goes with it.
hackykid
parents: 1909
diff changeset
    25
6227
e38177bd77c4 (svn r9029) -Fix (r7326): Only call the gradual loading amount callback if the bit for it is set in the vehicle's callbackmask.
maedhros
parents: 5717
diff changeset
    26
	/* Called (if appropriate bit in callback mask is set) to determine the
e38177bd77c4 (svn r9029) -Fix (r7326): Only call the gradual loading amount callback if the bit for it is set in the vehicle's callbackmask.
maedhros
parents: 5717
diff changeset
    27
	 * amount of cargo to load per unit of time when using gradual loading. */
5211
fb4dc0ca975d (svn r7326) -Feature: Add support for gradual (un)loading of vehicles (Maedhros)
peter1138
parents: 4694
diff changeset
    28
	CBID_VEHICLE_LOAD_AMOUNT        = 0x12,
fb4dc0ca975d (svn r7326) -Feature: Add support for gradual (un)loading of vehicles (Maedhros)
peter1138
parents: 4694
diff changeset
    29
3754
4c8cbaaa0bbe (svn r4742) - Newstations: Add callbacks for building and drawing custom stations.
peter1138
parents: 3727
diff changeset
    30
	/* Called (if appropriate bit in callback mask is set) to determine if a
4c8cbaaa0bbe (svn r4742) - Newstations: Add callbacks for building and drawing custom stations.
peter1138
parents: 3727
diff changeset
    31
	 * newstation should be made available to build */
4c8cbaaa0bbe (svn r4742) - Newstations: Add callbacks for building and drawing custom stations.
peter1138
parents: 3727
diff changeset
    32
	CBID_STATION_AVAILABILITY       = 0x13,
4c8cbaaa0bbe (svn r4742) - Newstations: Add callbacks for building and drawing custom stations.
peter1138
parents: 3727
diff changeset
    33
4c8cbaaa0bbe (svn r4742) - Newstations: Add callbacks for building and drawing custom stations.
peter1138
parents: 3727
diff changeset
    34
	/* Called (if appropriate bit in callback mask is set) when drawing a tile
4c8cbaaa0bbe (svn r4742) - Newstations: Add callbacks for building and drawing custom stations.
peter1138
parents: 3727
diff changeset
    35
	 * to choose a sprite layout to draw, instead of the standard 0-7 range */
4c8cbaaa0bbe (svn r4742) - Newstations: Add callbacks for building and drawing custom stations.
peter1138
parents: 3727
diff changeset
    36
	CBID_STATION_SPRITE_LAYOUT      = 0x14,
4c8cbaaa0bbe (svn r4742) - Newstations: Add callbacks for building and drawing custom stations.
peter1138
parents: 3727
diff changeset
    37
6310
c9ec0a1dde30 (svn r9215) -Documentation : correct Doxygen of comments
belugas
parents: 6227
diff changeset
    38
	/* Refit capacity, the passed vehicle needs to have its ->cargo_type set to
c9ec0a1dde30 (svn r9215) -Documentation : correct Doxygen of comments
belugas
parents: 6227
diff changeset
    39
	 * the cargo we are refitting to, returns the new cargo capacity */
3007
5c0d90264d47 (svn r3587) - NewGRF: Rename Callback IDs to include their "class"
peter1138
parents: 2982
diff changeset
    40
	CBID_VEHICLE_REFIT_CAPACITY     = 0x15,
2602
1a6561c9a408 (svn r3139) -NewGRF, Feature: support for articulated rail vehicles. This is used, for example, by coal tenders.
peter1138
parents: 2542
diff changeset
    41
3007
5c0d90264d47 (svn r3587) - NewGRF: Rename Callback IDs to include their "class"
peter1138
parents: 2982
diff changeset
    42
	CBID_TRAIN_ARTIC_ENGINE         = 0x16,
3650
4dd8517bdcf6 (svn r4561) - NewGRF: implement most of callback 0x23: additional text in vehicle purchase windows.
peter1138
parents: 3505
diff changeset
    43
6332
f3f436dcd7d0 (svn r9315) -Merge: The newhouses branch. With this merge comes almost complete support for
maedhros
parents: 6310
diff changeset
    44
	/* Called (if appropriate bit in callback mask is set) to determine whether
f3f436dcd7d0 (svn r9315) -Merge: The newhouses branch. With this merge comes almost complete support for
maedhros
parents: 6310
diff changeset
    45
	 * the house can be built on the specified tile. */
f3f436dcd7d0 (svn r9315) -Merge: The newhouses branch. With this merge comes almost complete support for
maedhros
parents: 6310
diff changeset
    46
	CBID_HOUSE_ALLOW_CONSTRUCTION   = 0x17,
f3f436dcd7d0 (svn r9315) -Merge: The newhouses branch. With this merge comes almost complete support for
maedhros
parents: 6310
diff changeset
    47
4694
c917a3ad0dd2 (svn r6601) - Codechange: Support cargo subtypes in the refit window. The refit window has been altered to support resizing and scrolling. Note that the cargo subtype isn't yet passed for actual refitting yet. (Based on mart3p's patch)
peter1138
parents: 4656
diff changeset
    48
	CBID_VEHICLE_CARGO_SUFFIX       = 0x19,
c917a3ad0dd2 (svn r6601) - Codechange: Support cargo subtypes in the refit window. The refit window has been altered to support resizing and scrolling. Note that the cargo subtype isn't yet passed for actual refitting yet. (Based on mart3p's patch)
peter1138
parents: 4656
diff changeset
    49
6332
f3f436dcd7d0 (svn r9315) -Merge: The newhouses branch. With this merge comes almost complete support for
maedhros
parents: 6310
diff changeset
    50
	/* Called (if appropriate bit in callback mask is set) to determine
f3f436dcd7d0 (svn r9315) -Merge: The newhouses branch. With this merge comes almost complete support for
maedhros
parents: 6310
diff changeset
    51
	 * the next animation frame. */
f3f436dcd7d0 (svn r9315) -Merge: The newhouses branch. With this merge comes almost complete support for
maedhros
parents: 6310
diff changeset
    52
	CBID_HOUSE_ANIMATION_NEXT_FRAME = 0x1A,
f3f436dcd7d0 (svn r9315) -Merge: The newhouses branch. With this merge comes almost complete support for
maedhros
parents: 6310
diff changeset
    53
f3f436dcd7d0 (svn r9315) -Merge: The newhouses branch. With this merge comes almost complete support for
maedhros
parents: 6310
diff changeset
    54
	/* Called (if appropriate bit in callback mask is set) for periodically
f3f436dcd7d0 (svn r9315) -Merge: The newhouses branch. With this merge comes almost complete support for
maedhros
parents: 6310
diff changeset
    55
	 * starting or stopping the animation. */
f3f436dcd7d0 (svn r9315) -Merge: The newhouses branch. With this merge comes almost complete support for
maedhros
parents: 6310
diff changeset
    56
	CBID_HOUSE_ANIMATION_START_STOP = 0x1B,
f3f436dcd7d0 (svn r9315) -Merge: The newhouses branch. With this merge comes almost complete support for
maedhros
parents: 6310
diff changeset
    57
f3f436dcd7d0 (svn r9315) -Merge: The newhouses branch. With this merge comes almost complete support for
maedhros
parents: 6310
diff changeset
    58
	/* Called (if appropriate bit in callback mask is set) whenever the
f3f436dcd7d0 (svn r9315) -Merge: The newhouses branch. With this merge comes almost complete support for
maedhros
parents: 6310
diff changeset
    59
	 * construction state of a house changes. */
f3f436dcd7d0 (svn r9315) -Merge: The newhouses branch. With this merge comes almost complete support for
maedhros
parents: 6310
diff changeset
    60
	CBID_CONSTRUCTION_STATE_CHANGE  = 0x1C,
f3f436dcd7d0 (svn r9315) -Merge: The newhouses branch. With this merge comes almost complete support for
maedhros
parents: 6310
diff changeset
    61
3727
3a3ebb0bde7e (svn r4703) - NewGRF: add support for callback 0x1D, "can wagon be attached". This can be used to disallow freight wagons to be placed in passenger trains, along with other uses.
peter1138
parents: 3650
diff changeset
    62
	CBID_TRAIN_ALLOW_WAGON_ATTACH   = 0x1D,
3a3ebb0bde7e (svn r4703) - NewGRF: add support for callback 0x1D, "can wagon be attached". This can be used to disallow freight wagons to be placed in passenger trains, along with other uses.
peter1138
parents: 3650
diff changeset
    63
6332
f3f436dcd7d0 (svn r9315) -Merge: The newhouses branch. With this merge comes almost complete support for
maedhros
parents: 6310
diff changeset
    64
	/* Called (if appropriate bit in callback mask is set) to determine the
f3f436dcd7d0 (svn r9315) -Merge: The newhouses branch. With this merge comes almost complete support for
maedhros
parents: 6310
diff changeset
    65
	 * colour of a town building. */
f3f436dcd7d0 (svn r9315) -Merge: The newhouses branch. With this merge comes almost complete support for
maedhros
parents: 6310
diff changeset
    66
	CBID_BUILDING_COLOUR            = 0x1E,
f3f436dcd7d0 (svn r9315) -Merge: The newhouses branch. With this merge comes almost complete support for
maedhros
parents: 6310
diff changeset
    67
f3f436dcd7d0 (svn r9315) -Merge: The newhouses branch. With this merge comes almost complete support for
maedhros
parents: 6310
diff changeset
    68
	/* Called (if appropriate bit in callback mask is set) to decide how much
f3f436dcd7d0 (svn r9315) -Merge: The newhouses branch. With this merge comes almost complete support for
maedhros
parents: 6310
diff changeset
    69
	 * cargo a town building can accept. */
7198
27559e21e9f5 (svn r10476) -Fix: some newgrf callbacks were already implemented even though the comment said they were not.
rubidium
parents: 7169
diff changeset
    70
	CBID_HOUSE_CARGO_ACCEPTANCE     = 0x1F,
6332
f3f436dcd7d0 (svn r9315) -Merge: The newhouses branch. With this merge comes almost complete support for
maedhros
parents: 6310
diff changeset
    71
f3f436dcd7d0 (svn r9315) -Merge: The newhouses branch. With this merge comes almost complete support for
maedhros
parents: 6310
diff changeset
    72
	/* Called (if appropriate bit in callback mask is set) to indicate
f3f436dcd7d0 (svn r9315) -Merge: The newhouses branch. With this merge comes almost complete support for
maedhros
parents: 6310
diff changeset
    73
	 * how long the current animation frame should last. */
f3f436dcd7d0 (svn r9315) -Merge: The newhouses branch. With this merge comes almost complete support for
maedhros
parents: 6310
diff changeset
    74
	CBID_HOUSE_ANIMATION_SPEED      = 0x20,
f3f436dcd7d0 (svn r9315) -Merge: The newhouses branch. With this merge comes almost complete support for
maedhros
parents: 6310
diff changeset
    75
f3f436dcd7d0 (svn r9315) -Merge: The newhouses branch. With this merge comes almost complete support for
maedhros
parents: 6310
diff changeset
    76
	/* Called (if appropriate bit in callback mask is set) periodically to
f3f436dcd7d0 (svn r9315) -Merge: The newhouses branch. With this merge comes almost complete support for
maedhros
parents: 6310
diff changeset
    77
	 * determine if a house should be destroyed. */
f3f436dcd7d0 (svn r9315) -Merge: The newhouses branch. With this merge comes almost complete support for
maedhros
parents: 6310
diff changeset
    78
	CBID_HOUSE_DESTRUCTION          = 0x21,
f3f436dcd7d0 (svn r9315) -Merge: The newhouses branch. With this merge comes almost complete support for
maedhros
parents: 6310
diff changeset
    79
6413
c3e23d3a4ae3 (svn r9549) -Codechange: Add definition of callbacks and callback masks for both industries and industry tiles
belugas
parents: 6359
diff changeset
    80
	/* Called to determine if the given industry type is available */
c3e23d3a4ae3 (svn r9549) -Codechange: Add definition of callbacks and callback masks for both industries and industry tiles
belugas
parents: 6359
diff changeset
    81
	CBID_INDUSTRY_AVAILABLE         = 0x22, // not yet implemented
c3e23d3a4ae3 (svn r9549) -Codechange: Add definition of callbacks and callback masks for both industries and industry tiles
belugas
parents: 6359
diff changeset
    82
3650
4dd8517bdcf6 (svn r4561) - NewGRF: implement most of callback 0x23: additional text in vehicle purchase windows.
peter1138
parents: 3505
diff changeset
    83
	/* This callback is called from vehicle purchase lists. It returns a value to be
4dd8517bdcf6 (svn r4561) - NewGRF: implement most of callback 0x23: additional text in vehicle purchase windows.
peter1138
parents: 3505
diff changeset
    84
	 * used as a custom string ID in the 0xD000 range. */
4dd8517bdcf6 (svn r4561) - NewGRF: implement most of callback 0x23: additional text in vehicle purchase windows.
peter1138
parents: 3505
diff changeset
    85
	CBID_VEHICLE_ADDITIONAL_TEXT    = 0x23,
3754
4c8cbaaa0bbe (svn r4742) - Newstations: Add callbacks for building and drawing custom stations.
peter1138
parents: 3727
diff changeset
    86
4c8cbaaa0bbe (svn r4742) - Newstations: Add callbacks for building and drawing custom stations.
peter1138
parents: 3727
diff changeset
    87
	/* Called when building a station to customize the tile layout */
4c8cbaaa0bbe (svn r4742) - Newstations: Add callbacks for building and drawing custom stations.
peter1138
parents: 3727
diff changeset
    88
	CBID_STATION_TILE_LAYOUT        = 0x24,
4244
d40c73c55357 (svn r5822) - NewGRF: add support for callback 31, vehicle start/stop check. This allows a set to disallow a vehicle from being started, i.e. to not be able to leave the depot. This is almost a partner to callback 1D.
peter1138
parents: 3754
diff changeset
    89
6413
c3e23d3a4ae3 (svn r9549) -Codechange: Add definition of callbacks and callback masks for both industries and industry tiles
belugas
parents: 6359
diff changeset
    90
	/* Called for periodically starting or stopping the animation. */
c3e23d3a4ae3 (svn r9549) -Codechange: Add definition of callbacks and callback masks for both industries and industry tiles
belugas
parents: 6359
diff changeset
    91
	CBID_INDTILE_ANIM_START_STOP    = 0x25, // not yet implemented
c3e23d3a4ae3 (svn r9549) -Codechange: Add definition of callbacks and callback masks for both industries and industry tiles
belugas
parents: 6359
diff changeset
    92
c3e23d3a4ae3 (svn r9549) -Codechange: Add definition of callbacks and callback masks for both industries and industry tiles
belugas
parents: 6359
diff changeset
    93
	/* Called to determine industry tile next animation frame. */
c3e23d3a4ae3 (svn r9549) -Codechange: Add definition of callbacks and callback masks for both industries and industry tiles
belugas
parents: 6359
diff changeset
    94
	CBID_INDTILE_ANIM_NEXT_FRAME    = 0x26, // not yet implemented
c3e23d3a4ae3 (svn r9549) -Codechange: Add definition of callbacks and callback masks for both industries and industry tiles
belugas
parents: 6359
diff changeset
    95
c3e23d3a4ae3 (svn r9549) -Codechange: Add definition of callbacks and callback masks for both industries and industry tiles
belugas
parents: 6359
diff changeset
    96
	/* Called to indicate how long the current animation frame should last. */
c3e23d3a4ae3 (svn r9549) -Codechange: Add definition of callbacks and callback masks for both industries and industry tiles
belugas
parents: 6359
diff changeset
    97
	CBID_INDTILE_ANIMATION_SPEED    = 0x27, // not yet implemented
c3e23d3a4ae3 (svn r9549) -Codechange: Add definition of callbacks and callback masks for both industries and industry tiles
belugas
parents: 6359
diff changeset
    98
c3e23d3a4ae3 (svn r9549) -Codechange: Add definition of callbacks and callback masks for both industries and industry tiles
belugas
parents: 6359
diff changeset
    99
	/* Called to determine if the given industry can be built on specific area */
c3e23d3a4ae3 (svn r9549) -Codechange: Add definition of callbacks and callback masks for both industries and industry tiles
belugas
parents: 6359
diff changeset
   100
	CBID_INDUSTRY_LOCATION          = 0x28, // not yet implemented
c3e23d3a4ae3 (svn r9549) -Codechange: Add definition of callbacks and callback masks for both industries and industry tiles
belugas
parents: 6359
diff changeset
   101
c3e23d3a4ae3 (svn r9549) -Codechange: Add definition of callbacks and callback masks for both industries and industry tiles
belugas
parents: 6359
diff changeset
   102
	/* Called on production changes, so it can be adjusted */
c3e23d3a4ae3 (svn r9549) -Codechange: Add definition of callbacks and callback masks for both industries and industry tiles
belugas
parents: 6359
diff changeset
   103
	CBID_INDUSTRY_PRODUCTION_CHANGE = 0x29, // not yet implemented
c3e23d3a4ae3 (svn r9549) -Codechange: Add definition of callbacks and callback masks for both industries and industry tiles
belugas
parents: 6359
diff changeset
   104
6332
f3f436dcd7d0 (svn r9315) -Merge: The newhouses branch. With this merge comes almost complete support for
maedhros
parents: 6310
diff changeset
   105
	/* Called (if appropriate bit in callback mask is set) to determine which
f3f436dcd7d0 (svn r9315) -Merge: The newhouses branch. With this merge comes almost complete support for
maedhros
parents: 6310
diff changeset
   106
	 * cargoes a town building should accept. */
7198
27559e21e9f5 (svn r10476) -Fix: some newgrf callbacks were already implemented even though the comment said they were not.
rubidium
parents: 7169
diff changeset
   107
	CBID_HOUSE_ACCEPT_CARGO         = 0x2A,
6332
f3f436dcd7d0 (svn r9315) -Merge: The newhouses branch. With this merge comes almost complete support for
maedhros
parents: 6310
diff changeset
   108
6413
c3e23d3a4ae3 (svn r9549) -Codechange: Add definition of callbacks and callback masks for both industries and industry tiles
belugas
parents: 6359
diff changeset
   109
	/* Called to query the cargo acceptance of the industry tile */
7199
e65a28455ee3 (svn r10477) -Codechange: add some callbacks to customise the acceptance of industries.
rubidium
parents: 7198
diff changeset
   110
	CBID_INDTILE_CARGO_ACCEPTANCE   = 0x2B,
6413
c3e23d3a4ae3 (svn r9549) -Codechange: Add definition of callbacks and callback masks for both industries and industry tiles
belugas
parents: 6359
diff changeset
   111
c3e23d3a4ae3 (svn r9549) -Codechange: Add definition of callbacks and callback masks for both industries and industry tiles
belugas
parents: 6359
diff changeset
   112
	/* Called to determine which cargoes an industry should accept. */
7199
e65a28455ee3 (svn r10477) -Codechange: add some callbacks to customise the acceptance of industries.
rubidium
parents: 7198
diff changeset
   113
	CBID_INDTILE_ACCEPT_CARGO       = 0x2C,
6413
c3e23d3a4ae3 (svn r9549) -Codechange: Add definition of callbacks and callback masks for both industries and industry tiles
belugas
parents: 6359
diff changeset
   114
5717
b6fb89cd9cce (svn r8211) -Codechange: (NewGRF) Implement callback 2D, explicit vehicle colour map
peter1138
parents: 5475
diff changeset
   115
	/* Called to determine if a specific colour map should be used for a vehicle
b6fb89cd9cce (svn r8211) -Codechange: (NewGRF) Implement callback 2D, explicit vehicle colour map
peter1138
parents: 5475
diff changeset
   116
	 * instead of the default livery */
b6fb89cd9cce (svn r8211) -Codechange: (NewGRF) Implement callback 2D, explicit vehicle colour map
peter1138
parents: 5475
diff changeset
   117
	CBID_VEHICLE_COLOUR_MAPPING     = 0x2D,
b6fb89cd9cce (svn r8211) -Codechange: (NewGRF) Implement callback 2D, explicit vehicle colour map
peter1138
parents: 5475
diff changeset
   118
6332
f3f436dcd7d0 (svn r9315) -Merge: The newhouses branch. With this merge comes almost complete support for
maedhros
parents: 6310
diff changeset
   119
	/* Called (if appropriate bit in callback mask is set) to determine how much
f3f436dcd7d0 (svn r9315) -Merge: The newhouses branch. With this merge comes almost complete support for
maedhros
parents: 6310
diff changeset
   120
	 * cargo a town building produces. */
f3f436dcd7d0 (svn r9315) -Merge: The newhouses branch. With this merge comes almost complete support for
maedhros
parents: 6310
diff changeset
   121
	CBID_HOUSE_PRODUCE_CARGO        = 0x2E, // not yet implemented
f3f436dcd7d0 (svn r9315) -Merge: The newhouses branch. With this merge comes almost complete support for
maedhros
parents: 6310
diff changeset
   122
6413
c3e23d3a4ae3 (svn r9549) -Codechange: Add definition of callbacks and callback masks for both industries and industry tiles
belugas
parents: 6359
diff changeset
   123
	/* Called to determine if the given industry tile can be built on specific tile */
c3e23d3a4ae3 (svn r9549) -Codechange: Add definition of callbacks and callback masks for both industries and industry tiles
belugas
parents: 6359
diff changeset
   124
	CBID_INDTILE_SHAPE_CHECK        = 0x2F, // not yet implemented
c3e23d3a4ae3 (svn r9549) -Codechange: Add definition of callbacks and callback masks for both industries and industry tiles
belugas
parents: 6359
diff changeset
   125
c3e23d3a4ae3 (svn r9549) -Codechange: Add definition of callbacks and callback masks for both industries and industry tiles
belugas
parents: 6359
diff changeset
   126
	/* Called to determine the type (if any) of foundation to draw for industry tile */
c3e23d3a4ae3 (svn r9549) -Codechange: Add definition of callbacks and callback masks for both industries and industry tiles
belugas
parents: 6359
diff changeset
   127
	CBID_INDUSTRY_DRAW_FOUNDATIONS  = 0x30, // not yet implemented
c3e23d3a4ae3 (svn r9549) -Codechange: Add definition of callbacks and callback masks for both industries and industry tiles
belugas
parents: 6359
diff changeset
   128
4244
d40c73c55357 (svn r5822) - NewGRF: add support for callback 31, vehicle start/stop check. This allows a set to disallow a vehicle from being started, i.e. to not be able to leave the depot. This is almost a partner to callback 1D.
peter1138
parents: 3754
diff changeset
   129
	/* Called when the player (or AI) tries to start or stop a vehicle. Mainly
d40c73c55357 (svn r5822) - NewGRF: add support for callback 31, vehicle start/stop check. This allows a set to disallow a vehicle from being started, i.e. to not be able to leave the depot. This is almost a partner to callback 1D.
peter1138
parents: 3754
diff changeset
   130
	 * used for preventing a vehicle from leaving the depot. */
d40c73c55357 (svn r5822) - NewGRF: add support for callback 31, vehicle start/stop check. This allows a set to disallow a vehicle from being started, i.e. to not be able to leave the depot. This is almost a partner to callback 1D.
peter1138
parents: 3754
diff changeset
   131
	CBID_VEHICLE_START_STOP_CHECK   = 0x31,
4656
9c1d8c4d3e60 (svn r6532) - Feature: Add support for NewGRF sound effects. Currently sound priority isn't supported.
peter1138
parents: 4244
diff changeset
   132
9c1d8c4d3e60 (svn r6532) - Feature: Add support for NewGRF sound effects. Currently sound priority isn't supported.
peter1138
parents: 4244
diff changeset
   133
	/* Called to play a special sound effect */
9c1d8c4d3e60 (svn r6532) - Feature: Add support for NewGRF sound effects. Currently sound priority isn't supported.
peter1138
parents: 4244
diff changeset
   134
	CBID_VEHICLE_SOUND_EFFECT       = 0x33,
6332
f3f436dcd7d0 (svn r9315) -Merge: The newhouses branch. With this merge comes almost complete support for
maedhros
parents: 6310
diff changeset
   135
6413
c3e23d3a4ae3 (svn r9549) -Codechange: Add definition of callbacks and callback masks for both industries and industry tiles
belugas
parents: 6359
diff changeset
   136
	/* Called monthly on production changes, so it can be adjusted more frequently */
c3e23d3a4ae3 (svn r9549) -Codechange: Add definition of callbacks and callback masks for both industries and industry tiles
belugas
parents: 6359
diff changeset
   137
	CBID_INDUSTRY_MONTHLYPROD_CHANGE= 0x35, // not yet implemented
c3e23d3a4ae3 (svn r9549) -Codechange: Add definition of callbacks and callback masks for both industries and industry tiles
belugas
parents: 6359
diff changeset
   138
6490
fe4443fba5e3 (svn r9671) -Codechange: Implement NewGRF callback 36, which allows changing of various properties which were previously static. Vehicle max speed and train power/te/running costs are adjustable.
peter1138
parents: 6413
diff changeset
   139
	/* Called to modify various vehicle properties. Callback parameter 1
fe4443fba5e3 (svn r9671) -Codechange: Implement NewGRF callback 36, which allows changing of various properties which were previously static. Vehicle max speed and train power/te/running costs are adjustable.
peter1138
parents: 6413
diff changeset
   140
	 * specifies the property index, as used in Action 0, to change. */
fe4443fba5e3 (svn r9671) -Codechange: Implement NewGRF callback 36, which allows changing of various properties which were previously static. Vehicle max speed and train power/te/running costs are adjustable.
peter1138
parents: 6413
diff changeset
   141
	CBID_VEHICLE_MODIFY_PROPERTY    = 0x36,
fe4443fba5e3 (svn r9671) -Codechange: Implement NewGRF callback 36, which allows changing of various properties which were previously static. Vehicle max speed and train power/te/running costs are adjustable.
peter1138
parents: 6413
diff changeset
   142
6413
c3e23d3a4ae3 (svn r9549) -Codechange: Add definition of callbacks and callback masks for both industries and industry tiles
belugas
parents: 6359
diff changeset
   143
	/* Called to determine text to display after cargo name */
c3e23d3a4ae3 (svn r9549) -Codechange: Add definition of callbacks and callback masks for both industries and industry tiles
belugas
parents: 6359
diff changeset
   144
	CBID_INDUSTRY_CARGO_SUFFIX      = 0x37, // not yet implemented
c3e23d3a4ae3 (svn r9549) -Codechange: Add definition of callbacks and callback masks for both industries and industry tiles
belugas
parents: 6359
diff changeset
   145
c3e23d3a4ae3 (svn r9549) -Codechange: Add definition of callbacks and callback masks for both industries and industry tiles
belugas
parents: 6359
diff changeset
   146
	/* Called to determine more text in the fund industry window */
c3e23d3a4ae3 (svn r9549) -Codechange: Add definition of callbacks and callback masks for both industries and industry tiles
belugas
parents: 6359
diff changeset
   147
	CBID_INDUSTRY_FUND_MORE_TEXT    = 0x38, // not yet implemented
c3e23d3a4ae3 (svn r9549) -Codechange: Add definition of callbacks and callback masks for both industries and industry tiles
belugas
parents: 6359
diff changeset
   148
6359
8527262c4cf8 (svn r9411) -Codechange: Add support for loading of newcargo data.
peter1138
parents: 6332
diff changeset
   149
	/* Called to calculate the income of delivered cargo */
8527262c4cf8 (svn r9411) -Codechange: Add support for loading of newcargo data.
peter1138
parents: 6332
diff changeset
   150
	CBID_CARGO_PROFIT_CALC          = 0x39,
8527262c4cf8 (svn r9411) -Codechange: Add support for loading of newcargo data.
peter1138
parents: 6332
diff changeset
   151
6413
c3e23d3a4ae3 (svn r9549) -Codechange: Add definition of callbacks and callback masks for both industries and industry tiles
belugas
parents: 6359
diff changeset
   152
	/* Called to determine more text in the industry window */
7198
27559e21e9f5 (svn r10476) -Fix: some newgrf callbacks were already implemented even though the comment said they were not.
rubidium
parents: 7169
diff changeset
   153
	CBID_INDUSTRY_WINDOW_MORE_TEXT  = 0x3A,
6413
c3e23d3a4ae3 (svn r9549) -Codechange: Add definition of callbacks and callback masks for both industries and industry tiles
belugas
parents: 6359
diff changeset
   154
c3e23d3a4ae3 (svn r9549) -Codechange: Add definition of callbacks and callback masks for both industries and industry tiles
belugas
parents: 6359
diff changeset
   155
	/* Called to determine industry special effects */
c3e23d3a4ae3 (svn r9549) -Codechange: Add definition of callbacks and callback masks for both industries and industry tiles
belugas
parents: 6359
diff changeset
   156
	CBID_INDUSTRY_SPECIAL_EFFECT    = 0x3B, // not yet implemented
c3e23d3a4ae3 (svn r9549) -Codechange: Add definition of callbacks and callback masks for both industries and industry tiles
belugas
parents: 6359
diff changeset
   157
c3e23d3a4ae3 (svn r9549) -Codechange: Add definition of callbacks and callback masks for both industries and industry tiles
belugas
parents: 6359
diff changeset
   158
	/* Called to determine if industry can alter the ground below industry tile */
c3e23d3a4ae3 (svn r9549) -Codechange: Add definition of callbacks and callback masks for both industries and industry tiles
belugas
parents: 6359
diff changeset
   159
	CBID_INDUSTRY_AUTOSLOPE         = 0x3C, // not yet implemented
c3e23d3a4ae3 (svn r9549) -Codechange: Add definition of callbacks and callback masks for both industries and industry tiles
belugas
parents: 6359
diff changeset
   160
7199
e65a28455ee3 (svn r10477) -Codechange: add some callbacks to customise the acceptance of industries.
rubidium
parents: 7198
diff changeset
   161
	/* Called to determine if the industry can still accept or refuse more cargo arrival */
e65a28455ee3 (svn r10477) -Codechange: add some callbacks to customise the acceptance of industries.
rubidium
parents: 7198
diff changeset
   162
	CBID_INDUSTRY_REFUSE_CARGO      = 0x3D,
6413
c3e23d3a4ae3 (svn r9549) -Codechange: Add definition of callbacks and callback masks for both industries and industry tiles
belugas
parents: 6359
diff changeset
   163
6332
f3f436dcd7d0 (svn r9315) -Merge: The newhouses branch. With this merge comes almost complete support for
maedhros
parents: 6310
diff changeset
   164
	/* Called (if appropriate bit in callback mask set) to determine whether a
f3f436dcd7d0 (svn r9315) -Merge: The newhouses branch. With this merge comes almost complete support for
maedhros
parents: 6310
diff changeset
   165
	 * town building can be destroyed. */
f3f436dcd7d0 (svn r9315) -Merge: The newhouses branch. With this merge comes almost complete support for
maedhros
parents: 6310
diff changeset
   166
	CBID_HOUSE_DENY_DESTRUCTION     = 0x143,
6359
8527262c4cf8 (svn r9411) -Codechange: Add support for loading of newcargo data.
peter1138
parents: 6332
diff changeset
   167
8527262c4cf8 (svn r9411) -Codechange: Add support for loading of newcargo data.
peter1138
parents: 6332
diff changeset
   168
	/* Called to calculate part of a station rating */
8527262c4cf8 (svn r9411) -Codechange: Add support for loading of newcargo data.
peter1138
parents: 6332
diff changeset
   169
	CBID_CARGO_STATION_RATING_CALC  = 0x145,
1895
0d499b71a782 (svn r2401) - Fix: [newgrf] Finish up callback mechanism, implement 'refit capacity' callback slightly more correct.
hackykid
parents: 1883
diff changeset
   170
};
0d499b71a782 (svn r2401) - Fix: [newgrf] Finish up callback mechanism, implement 'refit capacity' callback slightly more correct.
hackykid
parents: 1883
diff changeset
   171
3007
5c0d90264d47 (svn r3587) - NewGRF: Rename Callback IDs to include their "class"
peter1138
parents: 2982
diff changeset
   172
/**
5c0d90264d47 (svn r3587) - NewGRF: Rename Callback IDs to include their "class"
peter1138
parents: 2982
diff changeset
   173
 * Callback masks for vehicles, indicates which callbacks are used by a vehicle.
5c0d90264d47 (svn r3587) - NewGRF: Rename Callback IDs to include their "class"
peter1138
parents: 2982
diff changeset
   174
 * Some callbacks are always used and don't have a mask.
5c0d90264d47 (svn r3587) - NewGRF: Rename Callback IDs to include their "class"
peter1138
parents: 2982
diff changeset
   175
 */
5c0d90264d47 (svn r3587) - NewGRF: Rename Callback IDs to include their "class"
peter1138
parents: 2982
diff changeset
   176
enum VehicleCallbackMask {
5c0d90264d47 (svn r3587) - NewGRF: Rename Callback IDs to include their "class"
peter1138
parents: 2982
diff changeset
   177
	CBM_WAGON_POWER    = 0, ///< Powered wagons (trains only)
5c0d90264d47 (svn r3587) - NewGRF: Rename Callback IDs to include their "class"
peter1138
parents: 2982
diff changeset
   178
	CBM_VEHICLE_LENGTH = 1, ///< Vehicle length (trains only)
5c0d90264d47 (svn r3587) - NewGRF: Rename Callback IDs to include their "class"
peter1138
parents: 2982
diff changeset
   179
	CBM_LOAD_AMOUNT    = 2, ///< Load amount
5c0d90264d47 (svn r3587) - NewGRF: Rename Callback IDs to include their "class"
peter1138
parents: 2982
diff changeset
   180
	CBM_REFIT_CAPACITY = 3, ///< Cargo capacity after refit
5c0d90264d47 (svn r3587) - NewGRF: Rename Callback IDs to include their "class"
peter1138
parents: 2982
diff changeset
   181
	CBM_ARTIC_ENGINE   = 4, ///< Add articulated engines (trains only)
5c0d90264d47 (svn r3587) - NewGRF: Rename Callback IDs to include their "class"
peter1138
parents: 2982
diff changeset
   182
	CBM_CARGO_SUFFIX   = 5, ///< Show suffix after cargo name
5c0d90264d47 (svn r3587) - NewGRF: Rename Callback IDs to include their "class"
peter1138
parents: 2982
diff changeset
   183
	CBM_COLOUR_REMAP   = 6, ///< Change colour mapping of vehicle
5c0d90264d47 (svn r3587) - NewGRF: Rename Callback IDs to include their "class"
peter1138
parents: 2982
diff changeset
   184
	CBM_SOUND_EFFECT   = 7, ///< Vehicle uses custom sound effects
1883
ad68cd0a0a25 (svn r2389) - Feature: [newgrf] Implement the mechanism for handling newgrf callbacks.
hackykid
parents: 1802
diff changeset
   185
};
ad68cd0a0a25 (svn r2389) - Feature: [newgrf] Implement the mechanism for handling newgrf callbacks.
hackykid
parents: 1802
diff changeset
   186
3007
5c0d90264d47 (svn r3587) - NewGRF: Rename Callback IDs to include their "class"
peter1138
parents: 2982
diff changeset
   187
/**
3505
091f0285df7d (svn r4356) - NewGRF: Load more newstation properties.
peter1138
parents: 3007
diff changeset
   188
 * Callback masks for stations.
091f0285df7d (svn r4356) - NewGRF: Load more newstation properties.
peter1138
parents: 3007
diff changeset
   189
 */
091f0285df7d (svn r4356) - NewGRF: Load more newstation properties.
peter1138
parents: 3007
diff changeset
   190
enum StationCallbackMask {
091f0285df7d (svn r4356) - NewGRF: Load more newstation properties.
peter1138
parents: 3007
diff changeset
   191
	CBM_STATION_AVAIL = 0, ///< Availability of station in construction window
091f0285df7d (svn r4356) - NewGRF: Load more newstation properties.
peter1138
parents: 3007
diff changeset
   192
	CBM_CUSTOM_LAYOUT = 1, ///< Use callback to select a tile layout to use
091f0285df7d (svn r4356) - NewGRF: Load more newstation properties.
peter1138
parents: 3007
diff changeset
   193
};
091f0285df7d (svn r4356) - NewGRF: Load more newstation properties.
peter1138
parents: 3007
diff changeset
   194
091f0285df7d (svn r4356) - NewGRF: Load more newstation properties.
peter1138
parents: 3007
diff changeset
   195
/**
6332
f3f436dcd7d0 (svn r9315) -Merge: The newhouses branch. With this merge comes almost complete support for
maedhros
parents: 6310
diff changeset
   196
 * Callback masks for houses.
f3f436dcd7d0 (svn r9315) -Merge: The newhouses branch. With this merge comes almost complete support for
maedhros
parents: 6310
diff changeset
   197
 */
f3f436dcd7d0 (svn r9315) -Merge: The newhouses branch. With this merge comes almost complete support for
maedhros
parents: 6310
diff changeset
   198
enum HouseCallbackMask {
f3f436dcd7d0 (svn r9315) -Merge: The newhouses branch. With this merge comes almost complete support for
maedhros
parents: 6310
diff changeset
   199
	CBM_HOUSE_ALLOW_CONSTRUCTION  = 0,
f3f436dcd7d0 (svn r9315) -Merge: The newhouses branch. With this merge comes almost complete support for
maedhros
parents: 6310
diff changeset
   200
	CBM_ANIMATION_NEXT_FRAME      = 1,
f3f436dcd7d0 (svn r9315) -Merge: The newhouses branch. With this merge comes almost complete support for
maedhros
parents: 6310
diff changeset
   201
	CBM_ANIMATION_START_STOP      = 2,
f3f436dcd7d0 (svn r9315) -Merge: The newhouses branch. With this merge comes almost complete support for
maedhros
parents: 6310
diff changeset
   202
	CBM_CONSTRUCTION_STATE_CHANGE = 3,
f3f436dcd7d0 (svn r9315) -Merge: The newhouses branch. With this merge comes almost complete support for
maedhros
parents: 6310
diff changeset
   203
	CBM_BUILDING_COLOUR           = 4,
f3f436dcd7d0 (svn r9315) -Merge: The newhouses branch. With this merge comes almost complete support for
maedhros
parents: 6310
diff changeset
   204
	CBM_CARGO_ACCEPTANCE          = 5,
f3f436dcd7d0 (svn r9315) -Merge: The newhouses branch. With this merge comes almost complete support for
maedhros
parents: 6310
diff changeset
   205
	CBM_ANIMATION_SPEED           = 6,
f3f436dcd7d0 (svn r9315) -Merge: The newhouses branch. With this merge comes almost complete support for
maedhros
parents: 6310
diff changeset
   206
	CBM_HOUSE_DESTRUCTION         = 7,
f3f436dcd7d0 (svn r9315) -Merge: The newhouses branch. With this merge comes almost complete support for
maedhros
parents: 6310
diff changeset
   207
	CBM_HOUSE_ACCEPT_CARGO        = 8,
f3f436dcd7d0 (svn r9315) -Merge: The newhouses branch. With this merge comes almost complete support for
maedhros
parents: 6310
diff changeset
   208
	CBM_HOUSE_PRODUCE_CARGO       = 9,
f3f436dcd7d0 (svn r9315) -Merge: The newhouses branch. With this merge comes almost complete support for
maedhros
parents: 6310
diff changeset
   209
	CBM_HOUSE_DENY_DESTRUCTION    = 10,
f3f436dcd7d0 (svn r9315) -Merge: The newhouses branch. With this merge comes almost complete support for
maedhros
parents: 6310
diff changeset
   210
};
f3f436dcd7d0 (svn r9315) -Merge: The newhouses branch. With this merge comes almost complete support for
maedhros
parents: 6310
diff changeset
   211
f3f436dcd7d0 (svn r9315) -Merge: The newhouses branch. With this merge comes almost complete support for
maedhros
parents: 6310
diff changeset
   212
/**
6359
8527262c4cf8 (svn r9411) -Codechange: Add support for loading of newcargo data.
peter1138
parents: 6332
diff changeset
   213
 * Callback masks for cargos.
8527262c4cf8 (svn r9411) -Codechange: Add support for loading of newcargo data.
peter1138
parents: 6332
diff changeset
   214
 */
8527262c4cf8 (svn r9411) -Codechange: Add support for loading of newcargo data.
peter1138
parents: 6332
diff changeset
   215
enum CargoCallbackMask {
8527262c4cf8 (svn r9411) -Codechange: Add support for loading of newcargo data.
peter1138
parents: 6332
diff changeset
   216
	CBM_CARGO_PROFIT_CALC         = 0,
8527262c4cf8 (svn r9411) -Codechange: Add support for loading of newcargo data.
peter1138
parents: 6332
diff changeset
   217
	CBM_CARGO_STATION_RATING_CALC = 1,
8527262c4cf8 (svn r9411) -Codechange: Add support for loading of newcargo data.
peter1138
parents: 6332
diff changeset
   218
};
8527262c4cf8 (svn r9411) -Codechange: Add support for loading of newcargo data.
peter1138
parents: 6332
diff changeset
   219
8527262c4cf8 (svn r9411) -Codechange: Add support for loading of newcargo data.
peter1138
parents: 6332
diff changeset
   220
/**
6413
c3e23d3a4ae3 (svn r9549) -Codechange: Add definition of callbacks and callback masks for both industries and industry tiles
belugas
parents: 6359
diff changeset
   221
 * Callback masks for Industries
c3e23d3a4ae3 (svn r9549) -Codechange: Add definition of callbacks and callback masks for both industries and industry tiles
belugas
parents: 6359
diff changeset
   222
 */
c3e23d3a4ae3 (svn r9549) -Codechange: Add definition of callbacks and callback masks for both industries and industry tiles
belugas
parents: 6359
diff changeset
   223
enum IndustryCallbackMask {
c3e23d3a4ae3 (svn r9549) -Codechange: Add definition of callbacks and callback masks for both industries and industry tiles
belugas
parents: 6359
diff changeset
   224
	CBM_IND_AVAILABLE                 = 0,  ///< industry availability callback
c3e23d3a4ae3 (svn r9549) -Codechange: Add definition of callbacks and callback masks for both industries and industry tiles
belugas
parents: 6359
diff changeset
   225
	CBM_IND_PRODUCTION_CARGO_ARRIVAL  = 1,  ///< call production callback when cargo arrives at the industry
c3e23d3a4ae3 (svn r9549) -Codechange: Add definition of callbacks and callback masks for both industries and industry tiles
belugas
parents: 6359
diff changeset
   226
	CBM_IND_PRODUCTION_256_TICKS      = 2,  ///< call production callback every 256 ticks
c3e23d3a4ae3 (svn r9549) -Codechange: Add definition of callbacks and callback masks for both industries and industry tiles
belugas
parents: 6359
diff changeset
   227
	CBM_IND_LOCATION                  = 3,  ///< check industry construction on given area
c3e23d3a4ae3 (svn r9549) -Codechange: Add definition of callbacks and callback masks for both industries and industry tiles
belugas
parents: 6359
diff changeset
   228
	CBM_IND_PRODUCTION_CHANGE         = 4,  ///< controls random production change
c3e23d3a4ae3 (svn r9549) -Codechange: Add definition of callbacks and callback masks for both industries and industry tiles
belugas
parents: 6359
diff changeset
   229
	CBM_IND_MONTHLYPROD_CHANGE        = 5,  ///< controls monthly random production change
c3e23d3a4ae3 (svn r9549) -Codechange: Add definition of callbacks and callback masks for both industries and industry tiles
belugas
parents: 6359
diff changeset
   230
	CBM_IND_CARGO_SUFFIX              = 6,  ///< cargo sub-type display
c3e23d3a4ae3 (svn r9549) -Codechange: Add definition of callbacks and callback masks for both industries and industry tiles
belugas
parents: 6359
diff changeset
   231
	CBM_IND_FUND_MORE_TEXT            = 7,  ///< additional text in fund window
c3e23d3a4ae3 (svn r9549) -Codechange: Add definition of callbacks and callback masks for both industries and industry tiles
belugas
parents: 6359
diff changeset
   232
	CBM_IND_WINDOW_MORE_TEXT          = 8,  ///< additional text in industry window
c3e23d3a4ae3 (svn r9549) -Codechange: Add definition of callbacks and callback masks for both industries and industry tiles
belugas
parents: 6359
diff changeset
   233
	CBM_IND_SPECIAL_EFFECT            = 9,  ///< control special effects
c3e23d3a4ae3 (svn r9549) -Codechange: Add definition of callbacks and callback masks for both industries and industry tiles
belugas
parents: 6359
diff changeset
   234
	CBM_IND_REFUSE_CARGO              = 10, ///< option out of accepting cargo
c3e23d3a4ae3 (svn r9549) -Codechange: Add definition of callbacks and callback masks for both industries and industry tiles
belugas
parents: 6359
diff changeset
   235
};
c3e23d3a4ae3 (svn r9549) -Codechange: Add definition of callbacks and callback masks for both industries and industry tiles
belugas
parents: 6359
diff changeset
   236
c3e23d3a4ae3 (svn r9549) -Codechange: Add definition of callbacks and callback masks for both industries and industry tiles
belugas
parents: 6359
diff changeset
   237
/**
c3e23d3a4ae3 (svn r9549) -Codechange: Add definition of callbacks and callback masks for both industries and industry tiles
belugas
parents: 6359
diff changeset
   238
 * Callback masks for industry tiles
c3e23d3a4ae3 (svn r9549) -Codechange: Add definition of callbacks and callback masks for both industries and industry tiles
belugas
parents: 6359
diff changeset
   239
 */
c3e23d3a4ae3 (svn r9549) -Codechange: Add definition of callbacks and callback masks for both industries and industry tiles
belugas
parents: 6359
diff changeset
   240
enum IndustryTileCallbackMask {
c3e23d3a4ae3 (svn r9549) -Codechange: Add definition of callbacks and callback masks for both industries and industry tiles
belugas
parents: 6359
diff changeset
   241
	CBM_INDT_ANIM_NEXT_FRAME          = 0,  ///< decides next animation frame
c3e23d3a4ae3 (svn r9549) -Codechange: Add definition of callbacks and callback masks for both industries and industry tiles
belugas
parents: 6359
diff changeset
   242
	CBM_INDT_ANIM_SPEED               = 1,  ///< decides animation speed
7199
e65a28455ee3 (svn r10477) -Codechange: add some callbacks to customise the acceptance of industries.
rubidium
parents: 7198
diff changeset
   243
	CBM_INDT_CARGO_ACCEPTANCE         = 2,  ///< decides amount of cargo acceptance
6413
c3e23d3a4ae3 (svn r9549) -Codechange: Add definition of callbacks and callback masks for both industries and industry tiles
belugas
parents: 6359
diff changeset
   244
	CBM_INDT_ACCEPT_CARGO             = 3,  ///< decides accepted types
c3e23d3a4ae3 (svn r9549) -Codechange: Add definition of callbacks and callback masks for both industries and industry tiles
belugas
parents: 6359
diff changeset
   245
	CBM_INDT_SHAPE_CHECK              = 4,  ///< decides slope suitability
c3e23d3a4ae3 (svn r9549) -Codechange: Add definition of callbacks and callback masks for both industries and industry tiles
belugas
parents: 6359
diff changeset
   246
	CBM_INDT_DRAW_FOUNDATIONS         = 5,  ///< decides if default foundations need to be drawn
c3e23d3a4ae3 (svn r9549) -Codechange: Add definition of callbacks and callback masks for both industries and industry tiles
belugas
parents: 6359
diff changeset
   247
	CBM_INDT_AUTOSLOPE                = 6,  ///< decides allowance of autosloping
c3e23d3a4ae3 (svn r9549) -Codechange: Add definition of callbacks and callback masks for both industries and industry tiles
belugas
parents: 6359
diff changeset
   248
};
c3e23d3a4ae3 (svn r9549) -Codechange: Add definition of callbacks and callback masks for both industries and industry tiles
belugas
parents: 6359
diff changeset
   249
c3e23d3a4ae3 (svn r9549) -Codechange: Add definition of callbacks and callback masks for both industries and industry tiles
belugas
parents: 6359
diff changeset
   250
/**
3007
5c0d90264d47 (svn r3587) - NewGRF: Rename Callback IDs to include their "class"
peter1138
parents: 2982
diff changeset
   251
 * Result of a failed callback.
5c0d90264d47 (svn r3587) - NewGRF: Rename Callback IDs to include their "class"
peter1138
parents: 2982
diff changeset
   252
 */
1883
ad68cd0a0a25 (svn r2389) - Feature: [newgrf] Implement the mechanism for handling newgrf callbacks.
hackykid
parents: 1802
diff changeset
   253
enum {
ad68cd0a0a25 (svn r2389) - Feature: [newgrf] Implement the mechanism for handling newgrf callbacks.
hackykid
parents: 1802
diff changeset
   254
	CALLBACK_FAILED = 0xFFFF
ad68cd0a0a25 (svn r2389) - Feature: [newgrf] Implement the mechanism for handling newgrf callbacks.
hackykid
parents: 1802
diff changeset
   255
};
ad68cd0a0a25 (svn r2389) - Feature: [newgrf] Implement the mechanism for handling newgrf callbacks.
hackykid
parents: 1802
diff changeset
   256
2982
eb7f50dcb249 (svn r3557) - NewGRF: move callback enums to a new file as more than just engines will use them
peter1138
parents: 2971
diff changeset
   257
#endif /* NEWGRF_CALLBACKS_H */