src/newgrf_callbacks.h
author KUDr
Mon, 26 Mar 2007 22:15:38 +0000
branchcpp_gui
changeset 6303 84c215fc8eb8
parent 6298 c30fe89622df
child 6307 f40e88cff863
permissions -rw-r--r--
(svn r9486) [cpp_gui] -Sync with trunk (r9100:9476)
2186
461a2aff3486 (svn r2701) Insert Id tags into all source files
tron
parents: 2129
diff changeset
     1
/* $Id$ */
461a2aff3486 (svn r2701) Insert Id tags into all source files
tron
parents: 2129
diff changeset
     2
2982
286f69caaf05 (svn r3557) - NewGRF: move callback enums to a new file as more than just engines will use them
peter1138
parents: 2971
diff changeset
     3
#ifndef NEWGRF_CALLBACKS_H
286f69caaf05 (svn r3557) - NewGRF: move callback enums to a new file as more than just engines will use them
peter1138
parents: 2971
diff changeset
     4
#define NEWGRF_CALLBACKS_H
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
     5
2982
286f69caaf05 (svn r3557) - NewGRF: move callback enums to a new file as more than just engines will use them
peter1138
parents: 2971
diff changeset
     6
/** @file newgrf_callbacks.h
2962
dbd168a4703a (svn r3524) - Split newgrf features from engine.[ch] into newgrf_engine.[ch], and add the new files to project files.
peter1138
parents: 2848
diff changeset
     7
 */
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
     8
3007
6f65203dc324 (svn r3587) - NewGRF: Rename Callback IDs to include their "class"
peter1138
parents: 2982
diff changeset
     9
/**
6f65203dc324 (svn r3587) - NewGRF: Rename Callback IDs to include their "class"
peter1138
parents: 2982
diff changeset
    10
 * List of implemented NewGRF callbacks.
6f65203dc324 (svn r3587) - NewGRF: Rename Callback IDs to include their "class"
peter1138
parents: 2982
diff changeset
    11
 * Names are formatted as CBID_<CLASS>_<CALLBACK>
6f65203dc324 (svn r3587) - NewGRF: Rename Callback IDs to include their "class"
peter1138
parents: 2982
diff changeset
    12
 */
1883
3b02000cfbe0 (svn r2389) - Feature: [newgrf] Implement the mechanism for handling newgrf callbacks.
hackykid
parents: 1802
diff changeset
    13
enum CallbackID {
6303
84c215fc8eb8 (svn r9486) [cpp_gui] -Sync with trunk (r9100:9476)
KUDr
parents: 6298
diff changeset
    14
	/* Powered wagons, if the result is lower as 0x40 then the wagon is powered
84c215fc8eb8 (svn r9486) [cpp_gui] -Sync with trunk (r9100:9476)
KUDr
parents: 6298
diff changeset
    15
	 * @todo : interpret the rest of the result, aka "visual effects" */
3007
6f65203dc324 (svn r3587) - NewGRF: Rename Callback IDs to include their "class"
peter1138
parents: 2982
diff changeset
    16
	CBID_TRAIN_WAGON_POWER          = 0x10,
1908
bc48a30aba72 (svn r2414) - Feature: [newgrf] Implement powered wagons, and the callback that goes with it.
hackykid
parents: 1895
diff changeset
    17
6303
84c215fc8eb8 (svn r9486) [cpp_gui] -Sync with trunk (r9100:9476)
KUDr
parents: 6298
diff changeset
    18
	/* Vehicle length, returns the amount of 1/8's the vehicle is shorter
84c215fc8eb8 (svn r9486) [cpp_gui] -Sync with trunk (r9100:9476)
KUDr
parents: 6298
diff changeset
    19
	 * only for train vehicles */
3007
6f65203dc324 (svn r3587) - NewGRF: Rename Callback IDs to include their "class"
peter1138
parents: 2982
diff changeset
    20
	CBID_TRAIN_VEHICLE_LENGTH       = 0x11,
1922
797081e56d13 (svn r2428) - Feature: [newgrf] Implement shorter train vehicles (Therax), and the callback that goes with it.
hackykid
parents: 1909
diff changeset
    21
6298
c30fe89622df (svn r9119) [cpp_gui] -Sync with trunk (r9003:9100)
bjarni
parents: 5968
diff changeset
    22
	/* Called (if appropriate bit in callback mask is set) to determine the
c30fe89622df (svn r9119) [cpp_gui] -Sync with trunk (r9003:9100)
bjarni
parents: 5968
diff changeset
    23
	 * amount of cargo to load per unit of time when using gradual loading. */
5211
651c9272ad22 (svn r7326) -Feature: Add support for gradual (un)loading of vehicles (Maedhros)
peter1138
parents: 4694
diff changeset
    24
	CBID_VEHICLE_LOAD_AMOUNT        = 0x12,
651c9272ad22 (svn r7326) -Feature: Add support for gradual (un)loading of vehicles (Maedhros)
peter1138
parents: 4694
diff changeset
    25
3754
04356ae401b4 (svn r4742) - Newstations: Add callbacks for building and drawing custom stations.
peter1138
parents: 3727
diff changeset
    26
	/* Called (if appropriate bit in callback mask is set) to determine if a
04356ae401b4 (svn r4742) - Newstations: Add callbacks for building and drawing custom stations.
peter1138
parents: 3727
diff changeset
    27
	 * newstation should be made available to build */
04356ae401b4 (svn r4742) - Newstations: Add callbacks for building and drawing custom stations.
peter1138
parents: 3727
diff changeset
    28
	CBID_STATION_AVAILABILITY       = 0x13,
04356ae401b4 (svn r4742) - Newstations: Add callbacks for building and drawing custom stations.
peter1138
parents: 3727
diff changeset
    29
04356ae401b4 (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) when drawing a tile
04356ae401b4 (svn r4742) - Newstations: Add callbacks for building and drawing custom stations.
peter1138
parents: 3727
diff changeset
    31
	 * to choose a sprite layout to draw, instead of the standard 0-7 range */
04356ae401b4 (svn r4742) - Newstations: Add callbacks for building and drawing custom stations.
peter1138
parents: 3727
diff changeset
    32
	CBID_STATION_SPRITE_LAYOUT      = 0x14,
04356ae401b4 (svn r4742) - Newstations: Add callbacks for building and drawing custom stations.
peter1138
parents: 3727
diff changeset
    33
6303
84c215fc8eb8 (svn r9486) [cpp_gui] -Sync with trunk (r9100:9476)
KUDr
parents: 6298
diff changeset
    34
	/* Refit capacity, the passed vehicle needs to have its ->cargo_type set to
84c215fc8eb8 (svn r9486) [cpp_gui] -Sync with trunk (r9100:9476)
KUDr
parents: 6298
diff changeset
    35
	 * the cargo we are refitting to, returns the new cargo capacity */
3007
6f65203dc324 (svn r3587) - NewGRF: Rename Callback IDs to include their "class"
peter1138
parents: 2982
diff changeset
    36
	CBID_VEHICLE_REFIT_CAPACITY     = 0x15,
2602
f0e2dcce3695 (svn r3139) -NewGRF, Feature: support for articulated rail vehicles. This is used, for example, by coal tenders.
peter1138
parents: 2542
diff changeset
    37
3007
6f65203dc324 (svn r3587) - NewGRF: Rename Callback IDs to include their "class"
peter1138
parents: 2982
diff changeset
    38
	CBID_TRAIN_ARTIC_ENGINE         = 0x16,
3650
92a3f5cae745 (svn r4561) - NewGRF: implement most of callback 0x23: additional text in vehicle purchase windows.
peter1138
parents: 3505
diff changeset
    39
6303
84c215fc8eb8 (svn r9486) [cpp_gui] -Sync with trunk (r9100:9476)
KUDr
parents: 6298
diff changeset
    40
	/* Called (if appropriate bit in callback mask is set) to determine whether
84c215fc8eb8 (svn r9486) [cpp_gui] -Sync with trunk (r9100:9476)
KUDr
parents: 6298
diff changeset
    41
	 * the house can be built on the specified tile. */
84c215fc8eb8 (svn r9486) [cpp_gui] -Sync with trunk (r9100:9476)
KUDr
parents: 6298
diff changeset
    42
	CBID_HOUSE_ALLOW_CONSTRUCTION   = 0x17,
84c215fc8eb8 (svn r9486) [cpp_gui] -Sync with trunk (r9100:9476)
KUDr
parents: 6298
diff changeset
    43
4694
a4d2a3abe75c (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
    44
	CBID_VEHICLE_CARGO_SUFFIX       = 0x19,
a4d2a3abe75c (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
    45
6303
84c215fc8eb8 (svn r9486) [cpp_gui] -Sync with trunk (r9100:9476)
KUDr
parents: 6298
diff changeset
    46
	/* Called (if appropriate bit in callback mask is set) to determine
84c215fc8eb8 (svn r9486) [cpp_gui] -Sync with trunk (r9100:9476)
KUDr
parents: 6298
diff changeset
    47
	 * the next animation frame. */
84c215fc8eb8 (svn r9486) [cpp_gui] -Sync with trunk (r9100:9476)
KUDr
parents: 6298
diff changeset
    48
	CBID_HOUSE_ANIMATION_NEXT_FRAME = 0x1A,
84c215fc8eb8 (svn r9486) [cpp_gui] -Sync with trunk (r9100:9476)
KUDr
parents: 6298
diff changeset
    49
84c215fc8eb8 (svn r9486) [cpp_gui] -Sync with trunk (r9100:9476)
KUDr
parents: 6298
diff changeset
    50
	/* Called (if appropriate bit in callback mask is set) for periodically
84c215fc8eb8 (svn r9486) [cpp_gui] -Sync with trunk (r9100:9476)
KUDr
parents: 6298
diff changeset
    51
	 * starting or stopping the animation. */
84c215fc8eb8 (svn r9486) [cpp_gui] -Sync with trunk (r9100:9476)
KUDr
parents: 6298
diff changeset
    52
	CBID_HOUSE_ANIMATION_START_STOP = 0x1B,
84c215fc8eb8 (svn r9486) [cpp_gui] -Sync with trunk (r9100:9476)
KUDr
parents: 6298
diff changeset
    53
84c215fc8eb8 (svn r9486) [cpp_gui] -Sync with trunk (r9100:9476)
KUDr
parents: 6298
diff changeset
    54
	/* Called (if appropriate bit in callback mask is set) whenever the
84c215fc8eb8 (svn r9486) [cpp_gui] -Sync with trunk (r9100:9476)
KUDr
parents: 6298
diff changeset
    55
	 * construction state of a house changes. */
84c215fc8eb8 (svn r9486) [cpp_gui] -Sync with trunk (r9100:9476)
KUDr
parents: 6298
diff changeset
    56
	CBID_CONSTRUCTION_STATE_CHANGE  = 0x1C,
84c215fc8eb8 (svn r9486) [cpp_gui] -Sync with trunk (r9100:9476)
KUDr
parents: 6298
diff changeset
    57
3727
b4d9a8ab4ce4 (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
    58
	CBID_TRAIN_ALLOW_WAGON_ATTACH   = 0x1D,
b4d9a8ab4ce4 (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
    59
6303
84c215fc8eb8 (svn r9486) [cpp_gui] -Sync with trunk (r9100:9476)
KUDr
parents: 6298
diff changeset
    60
	/* Called (if appropriate bit in callback mask is set) to determine the
84c215fc8eb8 (svn r9486) [cpp_gui] -Sync with trunk (r9100:9476)
KUDr
parents: 6298
diff changeset
    61
	 * colour of a town building. */
84c215fc8eb8 (svn r9486) [cpp_gui] -Sync with trunk (r9100:9476)
KUDr
parents: 6298
diff changeset
    62
	CBID_BUILDING_COLOUR            = 0x1E,
84c215fc8eb8 (svn r9486) [cpp_gui] -Sync with trunk (r9100:9476)
KUDr
parents: 6298
diff changeset
    63
84c215fc8eb8 (svn r9486) [cpp_gui] -Sync with trunk (r9100:9476)
KUDr
parents: 6298
diff changeset
    64
	/* Called (if appropriate bit in callback mask is set) to decide how much
84c215fc8eb8 (svn r9486) [cpp_gui] -Sync with trunk (r9100:9476)
KUDr
parents: 6298
diff changeset
    65
	 * cargo a town building can accept. */
84c215fc8eb8 (svn r9486) [cpp_gui] -Sync with trunk (r9100:9476)
KUDr
parents: 6298
diff changeset
    66
	CBID_HOUSE_CARGO_ACCEPTANCE     = 0x1F, // not yet implemented
84c215fc8eb8 (svn r9486) [cpp_gui] -Sync with trunk (r9100:9476)
KUDr
parents: 6298
diff changeset
    67
84c215fc8eb8 (svn r9486) [cpp_gui] -Sync with trunk (r9100:9476)
KUDr
parents: 6298
diff changeset
    68
	/* Called (if appropriate bit in callback mask is set) to indicate
84c215fc8eb8 (svn r9486) [cpp_gui] -Sync with trunk (r9100:9476)
KUDr
parents: 6298
diff changeset
    69
	 * how long the current animation frame should last. */
84c215fc8eb8 (svn r9486) [cpp_gui] -Sync with trunk (r9100:9476)
KUDr
parents: 6298
diff changeset
    70
	CBID_HOUSE_ANIMATION_SPEED      = 0x20,
84c215fc8eb8 (svn r9486) [cpp_gui] -Sync with trunk (r9100:9476)
KUDr
parents: 6298
diff changeset
    71
84c215fc8eb8 (svn r9486) [cpp_gui] -Sync with trunk (r9100:9476)
KUDr
parents: 6298
diff changeset
    72
	/* Called (if appropriate bit in callback mask is set) periodically to
84c215fc8eb8 (svn r9486) [cpp_gui] -Sync with trunk (r9100:9476)
KUDr
parents: 6298
diff changeset
    73
	 * determine if a house should be destroyed. */
84c215fc8eb8 (svn r9486) [cpp_gui] -Sync with trunk (r9100:9476)
KUDr
parents: 6298
diff changeset
    74
	CBID_HOUSE_DESTRUCTION          = 0x21,
84c215fc8eb8 (svn r9486) [cpp_gui] -Sync with trunk (r9100:9476)
KUDr
parents: 6298
diff changeset
    75
3650
92a3f5cae745 (svn r4561) - NewGRF: implement most of callback 0x23: additional text in vehicle purchase windows.
peter1138
parents: 3505
diff changeset
    76
	/* This callback is called from vehicle purchase lists. It returns a value to be
92a3f5cae745 (svn r4561) - NewGRF: implement most of callback 0x23: additional text in vehicle purchase windows.
peter1138
parents: 3505
diff changeset
    77
	 * used as a custom string ID in the 0xD000 range. */
92a3f5cae745 (svn r4561) - NewGRF: implement most of callback 0x23: additional text in vehicle purchase windows.
peter1138
parents: 3505
diff changeset
    78
	CBID_VEHICLE_ADDITIONAL_TEXT    = 0x23,
3754
04356ae401b4 (svn r4742) - Newstations: Add callbacks for building and drawing custom stations.
peter1138
parents: 3727
diff changeset
    79
04356ae401b4 (svn r4742) - Newstations: Add callbacks for building and drawing custom stations.
peter1138
parents: 3727
diff changeset
    80
	/* Called when building a station to customize the tile layout */
04356ae401b4 (svn r4742) - Newstations: Add callbacks for building and drawing custom stations.
peter1138
parents: 3727
diff changeset
    81
	CBID_STATION_TILE_LAYOUT        = 0x24,
4244
44dcec623504 (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
    82
6303
84c215fc8eb8 (svn r9486) [cpp_gui] -Sync with trunk (r9100:9476)
KUDr
parents: 6298
diff changeset
    83
	/* Called (if appropriate bit in callback mask is set) to determine which
84c215fc8eb8 (svn r9486) [cpp_gui] -Sync with trunk (r9100:9476)
KUDr
parents: 6298
diff changeset
    84
	 * cargoes a town building should accept. */
84c215fc8eb8 (svn r9486) [cpp_gui] -Sync with trunk (r9100:9476)
KUDr
parents: 6298
diff changeset
    85
	CBID_HOUSE_ACCEPT_CARGO         = 0x2A, // not yet implemented
84c215fc8eb8 (svn r9486) [cpp_gui] -Sync with trunk (r9100:9476)
KUDr
parents: 6298
diff changeset
    86
5968
eecf6681445e (svn r8211) -Codechange: (NewGRF) Implement callback 2D, explicit vehicle colour map
peter1138
parents: 5726
diff changeset
    87
	/* Called to determine if a specific colour map should be used for a vehicle
eecf6681445e (svn r8211) -Codechange: (NewGRF) Implement callback 2D, explicit vehicle colour map
peter1138
parents: 5726
diff changeset
    88
	 * instead of the default livery */
eecf6681445e (svn r8211) -Codechange: (NewGRF) Implement callback 2D, explicit vehicle colour map
peter1138
parents: 5726
diff changeset
    89
	CBID_VEHICLE_COLOUR_MAPPING     = 0x2D,
eecf6681445e (svn r8211) -Codechange: (NewGRF) Implement callback 2D, explicit vehicle colour map
peter1138
parents: 5726
diff changeset
    90
6303
84c215fc8eb8 (svn r9486) [cpp_gui] -Sync with trunk (r9100:9476)
KUDr
parents: 6298
diff changeset
    91
	/* Called (if appropriate bit in callback mask is set) to determine how much
84c215fc8eb8 (svn r9486) [cpp_gui] -Sync with trunk (r9100:9476)
KUDr
parents: 6298
diff changeset
    92
	 * cargo a town building produces. */
84c215fc8eb8 (svn r9486) [cpp_gui] -Sync with trunk (r9100:9476)
KUDr
parents: 6298
diff changeset
    93
	CBID_HOUSE_PRODUCE_CARGO        = 0x2E, // not yet implemented
84c215fc8eb8 (svn r9486) [cpp_gui] -Sync with trunk (r9100:9476)
KUDr
parents: 6298
diff changeset
    94
4244
44dcec623504 (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
    95
	/* Called when the player (or AI) tries to start or stop a vehicle. Mainly
44dcec623504 (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
    96
	 * used for preventing a vehicle from leaving the depot. */
44dcec623504 (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
    97
	CBID_VEHICLE_START_STOP_CHECK   = 0x31,
4656
acffecd6f484 (svn r6532) - Feature: Add support for NewGRF sound effects. Currently sound priority isn't supported.
peter1138
parents: 4244
diff changeset
    98
acffecd6f484 (svn r6532) - Feature: Add support for NewGRF sound effects. Currently sound priority isn't supported.
peter1138
parents: 4244
diff changeset
    99
	/* Called to play a special sound effect */
acffecd6f484 (svn r6532) - Feature: Add support for NewGRF sound effects. Currently sound priority isn't supported.
peter1138
parents: 4244
diff changeset
   100
	CBID_VEHICLE_SOUND_EFFECT       = 0x33,
6303
84c215fc8eb8 (svn r9486) [cpp_gui] -Sync with trunk (r9100:9476)
KUDr
parents: 6298
diff changeset
   101
84c215fc8eb8 (svn r9486) [cpp_gui] -Sync with trunk (r9100:9476)
KUDr
parents: 6298
diff changeset
   102
	/* Called to calculate the income of delivered cargo */
84c215fc8eb8 (svn r9486) [cpp_gui] -Sync with trunk (r9100:9476)
KUDr
parents: 6298
diff changeset
   103
	CBID_CARGO_PROFIT_CALC          = 0x39,
84c215fc8eb8 (svn r9486) [cpp_gui] -Sync with trunk (r9100:9476)
KUDr
parents: 6298
diff changeset
   104
84c215fc8eb8 (svn r9486) [cpp_gui] -Sync with trunk (r9100:9476)
KUDr
parents: 6298
diff changeset
   105
	/* Called (if appropriate bit in callback mask set) to determine whether a
84c215fc8eb8 (svn r9486) [cpp_gui] -Sync with trunk (r9100:9476)
KUDr
parents: 6298
diff changeset
   106
	 * town building can be destroyed. */
84c215fc8eb8 (svn r9486) [cpp_gui] -Sync with trunk (r9100:9476)
KUDr
parents: 6298
diff changeset
   107
	CBID_HOUSE_DENY_DESTRUCTION     = 0x143,
84c215fc8eb8 (svn r9486) [cpp_gui] -Sync with trunk (r9100:9476)
KUDr
parents: 6298
diff changeset
   108
84c215fc8eb8 (svn r9486) [cpp_gui] -Sync with trunk (r9100:9476)
KUDr
parents: 6298
diff changeset
   109
	/* Called to calculate part of a station rating */
84c215fc8eb8 (svn r9486) [cpp_gui] -Sync with trunk (r9100:9476)
KUDr
parents: 6298
diff changeset
   110
	CBID_CARGO_STATION_RATING_CALC  = 0x145,
1895
398f156479c8 (svn r2401) - Fix: [newgrf] Finish up callback mechanism, implement 'refit capacity' callback slightly more correct.
hackykid
parents: 1883
diff changeset
   111
};
398f156479c8 (svn r2401) - Fix: [newgrf] Finish up callback mechanism, implement 'refit capacity' callback slightly more correct.
hackykid
parents: 1883
diff changeset
   112
3007
6f65203dc324 (svn r3587) - NewGRF: Rename Callback IDs to include their "class"
peter1138
parents: 2982
diff changeset
   113
/**
6f65203dc324 (svn r3587) - NewGRF: Rename Callback IDs to include their "class"
peter1138
parents: 2982
diff changeset
   114
 * Callback masks for vehicles, indicates which callbacks are used by a vehicle.
6f65203dc324 (svn r3587) - NewGRF: Rename Callback IDs to include their "class"
peter1138
parents: 2982
diff changeset
   115
 * Some callbacks are always used and don't have a mask.
6f65203dc324 (svn r3587) - NewGRF: Rename Callback IDs to include their "class"
peter1138
parents: 2982
diff changeset
   116
 */
6f65203dc324 (svn r3587) - NewGRF: Rename Callback IDs to include their "class"
peter1138
parents: 2982
diff changeset
   117
enum VehicleCallbackMask {
6f65203dc324 (svn r3587) - NewGRF: Rename Callback IDs to include their "class"
peter1138
parents: 2982
diff changeset
   118
	CBM_WAGON_POWER    = 0, ///< Powered wagons (trains only)
6f65203dc324 (svn r3587) - NewGRF: Rename Callback IDs to include their "class"
peter1138
parents: 2982
diff changeset
   119
	CBM_VEHICLE_LENGTH = 1, ///< Vehicle length (trains only)
6f65203dc324 (svn r3587) - NewGRF: Rename Callback IDs to include their "class"
peter1138
parents: 2982
diff changeset
   120
	CBM_LOAD_AMOUNT    = 2, ///< Load amount
6f65203dc324 (svn r3587) - NewGRF: Rename Callback IDs to include their "class"
peter1138
parents: 2982
diff changeset
   121
	CBM_REFIT_CAPACITY = 3, ///< Cargo capacity after refit
6f65203dc324 (svn r3587) - NewGRF: Rename Callback IDs to include their "class"
peter1138
parents: 2982
diff changeset
   122
	CBM_ARTIC_ENGINE   = 4, ///< Add articulated engines (trains only)
6f65203dc324 (svn r3587) - NewGRF: Rename Callback IDs to include their "class"
peter1138
parents: 2982
diff changeset
   123
	CBM_CARGO_SUFFIX   = 5, ///< Show suffix after cargo name
6f65203dc324 (svn r3587) - NewGRF: Rename Callback IDs to include their "class"
peter1138
parents: 2982
diff changeset
   124
	CBM_COLOUR_REMAP   = 6, ///< Change colour mapping of vehicle
6f65203dc324 (svn r3587) - NewGRF: Rename Callback IDs to include their "class"
peter1138
parents: 2982
diff changeset
   125
	CBM_SOUND_EFFECT   = 7, ///< Vehicle uses custom sound effects
1883
3b02000cfbe0 (svn r2389) - Feature: [newgrf] Implement the mechanism for handling newgrf callbacks.
hackykid
parents: 1802
diff changeset
   126
};
3b02000cfbe0 (svn r2389) - Feature: [newgrf] Implement the mechanism for handling newgrf callbacks.
hackykid
parents: 1802
diff changeset
   127
3007
6f65203dc324 (svn r3587) - NewGRF: Rename Callback IDs to include their "class"
peter1138
parents: 2982
diff changeset
   128
/**
3505
e9a3a6b79561 (svn r4356) - NewGRF: Load more newstation properties.
peter1138
parents: 3007
diff changeset
   129
 * Callback masks for stations.
e9a3a6b79561 (svn r4356) - NewGRF: Load more newstation properties.
peter1138
parents: 3007
diff changeset
   130
 */
e9a3a6b79561 (svn r4356) - NewGRF: Load more newstation properties.
peter1138
parents: 3007
diff changeset
   131
enum StationCallbackMask {
e9a3a6b79561 (svn r4356) - NewGRF: Load more newstation properties.
peter1138
parents: 3007
diff changeset
   132
	CBM_STATION_AVAIL = 0, ///< Availability of station in construction window
e9a3a6b79561 (svn r4356) - NewGRF: Load more newstation properties.
peter1138
parents: 3007
diff changeset
   133
	CBM_CUSTOM_LAYOUT = 1, ///< Use callback to select a tile layout to use
e9a3a6b79561 (svn r4356) - NewGRF: Load more newstation properties.
peter1138
parents: 3007
diff changeset
   134
};
e9a3a6b79561 (svn r4356) - NewGRF: Load more newstation properties.
peter1138
parents: 3007
diff changeset
   135
e9a3a6b79561 (svn r4356) - NewGRF: Load more newstation properties.
peter1138
parents: 3007
diff changeset
   136
/**
6303
84c215fc8eb8 (svn r9486) [cpp_gui] -Sync with trunk (r9100:9476)
KUDr
parents: 6298
diff changeset
   137
 * Callback masks for houses.
84c215fc8eb8 (svn r9486) [cpp_gui] -Sync with trunk (r9100:9476)
KUDr
parents: 6298
diff changeset
   138
 */
84c215fc8eb8 (svn r9486) [cpp_gui] -Sync with trunk (r9100:9476)
KUDr
parents: 6298
diff changeset
   139
enum HouseCallbackMask {
84c215fc8eb8 (svn r9486) [cpp_gui] -Sync with trunk (r9100:9476)
KUDr
parents: 6298
diff changeset
   140
	CBM_HOUSE_ALLOW_CONSTRUCTION  = 0,
84c215fc8eb8 (svn r9486) [cpp_gui] -Sync with trunk (r9100:9476)
KUDr
parents: 6298
diff changeset
   141
	CBM_ANIMATION_NEXT_FRAME      = 1,
84c215fc8eb8 (svn r9486) [cpp_gui] -Sync with trunk (r9100:9476)
KUDr
parents: 6298
diff changeset
   142
	CBM_ANIMATION_START_STOP      = 2,
84c215fc8eb8 (svn r9486) [cpp_gui] -Sync with trunk (r9100:9476)
KUDr
parents: 6298
diff changeset
   143
	CBM_CONSTRUCTION_STATE_CHANGE = 3,
84c215fc8eb8 (svn r9486) [cpp_gui] -Sync with trunk (r9100:9476)
KUDr
parents: 6298
diff changeset
   144
	CBM_BUILDING_COLOUR           = 4,
84c215fc8eb8 (svn r9486) [cpp_gui] -Sync with trunk (r9100:9476)
KUDr
parents: 6298
diff changeset
   145
	CBM_CARGO_ACCEPTANCE          = 5,
84c215fc8eb8 (svn r9486) [cpp_gui] -Sync with trunk (r9100:9476)
KUDr
parents: 6298
diff changeset
   146
	CBM_ANIMATION_SPEED           = 6,
84c215fc8eb8 (svn r9486) [cpp_gui] -Sync with trunk (r9100:9476)
KUDr
parents: 6298
diff changeset
   147
	CBM_HOUSE_DESTRUCTION         = 7,
84c215fc8eb8 (svn r9486) [cpp_gui] -Sync with trunk (r9100:9476)
KUDr
parents: 6298
diff changeset
   148
	CBM_HOUSE_ACCEPT_CARGO        = 8,
84c215fc8eb8 (svn r9486) [cpp_gui] -Sync with trunk (r9100:9476)
KUDr
parents: 6298
diff changeset
   149
	CBM_HOUSE_PRODUCE_CARGO       = 9,
84c215fc8eb8 (svn r9486) [cpp_gui] -Sync with trunk (r9100:9476)
KUDr
parents: 6298
diff changeset
   150
	CBM_HOUSE_DENY_DESTRUCTION    = 10,
84c215fc8eb8 (svn r9486) [cpp_gui] -Sync with trunk (r9100:9476)
KUDr
parents: 6298
diff changeset
   151
};
84c215fc8eb8 (svn r9486) [cpp_gui] -Sync with trunk (r9100:9476)
KUDr
parents: 6298
diff changeset
   152
84c215fc8eb8 (svn r9486) [cpp_gui] -Sync with trunk (r9100:9476)
KUDr
parents: 6298
diff changeset
   153
/**
84c215fc8eb8 (svn r9486) [cpp_gui] -Sync with trunk (r9100:9476)
KUDr
parents: 6298
diff changeset
   154
 * Callback masks for cargos.
84c215fc8eb8 (svn r9486) [cpp_gui] -Sync with trunk (r9100:9476)
KUDr
parents: 6298
diff changeset
   155
 */
84c215fc8eb8 (svn r9486) [cpp_gui] -Sync with trunk (r9100:9476)
KUDr
parents: 6298
diff changeset
   156
enum CargoCallbackMask {
84c215fc8eb8 (svn r9486) [cpp_gui] -Sync with trunk (r9100:9476)
KUDr
parents: 6298
diff changeset
   157
	CBM_CARGO_PROFIT_CALC         = 0,
84c215fc8eb8 (svn r9486) [cpp_gui] -Sync with trunk (r9100:9476)
KUDr
parents: 6298
diff changeset
   158
	CBM_CARGO_STATION_RATING_CALC = 1,
84c215fc8eb8 (svn r9486) [cpp_gui] -Sync with trunk (r9100:9476)
KUDr
parents: 6298
diff changeset
   159
};
84c215fc8eb8 (svn r9486) [cpp_gui] -Sync with trunk (r9100:9476)
KUDr
parents: 6298
diff changeset
   160
84c215fc8eb8 (svn r9486) [cpp_gui] -Sync with trunk (r9100:9476)
KUDr
parents: 6298
diff changeset
   161
/**
3007
6f65203dc324 (svn r3587) - NewGRF: Rename Callback IDs to include their "class"
peter1138
parents: 2982
diff changeset
   162
 * Result of a failed callback.
6f65203dc324 (svn r3587) - NewGRF: Rename Callback IDs to include their "class"
peter1138
parents: 2982
diff changeset
   163
 */
1883
3b02000cfbe0 (svn r2389) - Feature: [newgrf] Implement the mechanism for handling newgrf callbacks.
hackykid
parents: 1802
diff changeset
   164
enum {
3b02000cfbe0 (svn r2389) - Feature: [newgrf] Implement the mechanism for handling newgrf callbacks.
hackykid
parents: 1802
diff changeset
   165
	CALLBACK_FAILED = 0xFFFF
3b02000cfbe0 (svn r2389) - Feature: [newgrf] Implement the mechanism for handling newgrf callbacks.
hackykid
parents: 1802
diff changeset
   166
};
3b02000cfbe0 (svn r2389) - Feature: [newgrf] Implement the mechanism for handling newgrf callbacks.
hackykid
parents: 1802
diff changeset
   167
2982
286f69caaf05 (svn r3557) - NewGRF: move callback enums to a new file as more than just engines will use them
peter1138
parents: 2971
diff changeset
   168
#endif /* NEWGRF_CALLBACKS_H */