src/newgrf_callbacks.h
author convert-repo
Mon, 07 Apr 2008 16:21:55 +0000
changeset 10076 dfd70e42c4ae
parent 9255 22da20a012ba
child 10266 435142fa43dc
permissions -rw-r--r--
update tags
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
6909
aa800cc4b216 (svn r9549) -Codechange: Add definition of callbacks and callback masks for both industries and industry tiles
belugas
parents: 6685
diff changeset
     3
/** @file newgrf_callbacks.h
aa800cc4b216 (svn r9549) -Codechange: Add definition of callbacks and callback masks for both industries and industry tiles
belugas
parents: 6685
diff changeset
     4
 */
aa800cc4b216 (svn r9549) -Codechange: Add definition of callbacks and callback masks for both industries and industry tiles
belugas
parents: 6685
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
#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
     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
6f65203dc324 (svn r3587) - NewGRF: Rename Callback IDs to include their "class"
peter1138
parents: 2982
diff changeset
    10
/**
6f65203dc324 (svn r3587) - NewGRF: Rename Callback IDs to include their "class"
peter1138
parents: 2982
diff changeset
    11
 * List of implemented NewGRF callbacks.
7711
66dffbd3b136 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium
parents: 7708
diff changeset
    12
 * Most of these callbacks are only triggered when the corresponding
66dffbd3b136 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium
parents: 7708
diff changeset
    13
 * bit is set in the callback flags/trigger for a vehicle, house,
66dffbd3b136 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium
parents: 7708
diff changeset
    14
 * industry, etc.
3007
6f65203dc324 (svn r3587) - NewGRF: Rename Callback IDs to include their "class"
peter1138
parents: 2982
diff changeset
    15
 * Names are formatted as CBID_<CLASS>_<CALLBACK>
8096
9e87db1c5925 (svn r11127) -Fix: truncate the result of 8 bits callbacks.
rubidium
parents: 8078
diff changeset
    16
 *
9e87db1c5925 (svn r11127) -Fix: truncate the result of 8 bits callbacks.
rubidium
parents: 8078
diff changeset
    17
 * @note Do not forget to add 15 bits callbacks to the switch in
9e87db1c5925 (svn r11127) -Fix: truncate the result of 8 bits callbacks.
rubidium
parents: 8078
diff changeset
    18
 *       newgrf_spritegroup.cpp (search for "15 bits callback").
3007
6f65203dc324 (svn r3587) - NewGRF: Rename Callback IDs to include their "class"
peter1138
parents: 2982
diff changeset
    19
 */
1883
3b02000cfbe0 (svn r2389) - Feature: [newgrf] Implement the mechanism for handling newgrf callbacks.
hackykid
parents: 1802
diff changeset
    20
enum CallbackID {
7823
cad4dec2b899 (svn r10690) -Codechange: use the enum that describes all callback IDs in favor of "just" using an untyped integer.
rubidium
parents: 7779
diff changeset
    21
	/** Set when using the callback resolve system, but not to resolve a callback. */
cad4dec2b899 (svn r10690) -Codechange: use the enum that describes all callback IDs in favor of "just" using an untyped integer.
rubidium
parents: 7779
diff changeset
    22
	CBID_NO_CALLBACK                     = 0x00,
cad4dec2b899 (svn r10690) -Codechange: use the enum that describes all callback IDs in favor of "just" using an untyped integer.
rubidium
parents: 7779
diff changeset
    23
7711
66dffbd3b136 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium
parents: 7708
diff changeset
    24
	/** Set when calling a randomizing trigger (almost undocumented). */
66dffbd3b136 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium
parents: 7708
diff changeset
    25
	CBID_RANDOM_TRIGGER                  = 0x01,
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
    26
8138
7dc73953c47e (svn r11173) -Codechange: rename some callback enums so they are more uniform.
rubidium
parents: 8111
diff changeset
    27
	/* There are no callbacks 0x02 - 0x0F. */
7dc73953c47e (svn r11173) -Codechange: rename some callback enums so they are more uniform.
rubidium
parents: 8111
diff changeset
    28
7711
66dffbd3b136 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium
parents: 7708
diff changeset
    29
	/** Powered wagons, if the result is lower as 0x40 then the wagon is powered
66dffbd3b136 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium
parents: 7708
diff changeset
    30
	 * @todo : interpret the rest of the result, aka "visual effects". */
66dffbd3b136 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium
parents: 7708
diff changeset
    31
	CBID_TRAIN_WAGON_POWER               = 0x10,
6909
aa800cc4b216 (svn r9549) -Codechange: Add definition of callbacks and callback masks for both industries and industry tiles
belugas
parents: 6685
diff changeset
    32
7711
66dffbd3b136 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium
parents: 7708
diff changeset
    33
	/** Vehicle length, returns the amount of 1/8's the vehicle is shorter for trains and RVs. */
66dffbd3b136 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium
parents: 7708
diff changeset
    34
	CBID_VEHICLE_LENGTH                  = 0x11,
6909
aa800cc4b216 (svn r9549) -Codechange: Add definition of callbacks and callback masks for both industries and industry tiles
belugas
parents: 6685
diff changeset
    35
7711
66dffbd3b136 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium
parents: 7708
diff changeset
    36
	/** Determine the amount of cargo to load per unit of time when using gradual loading. */
66dffbd3b136 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium
parents: 7708
diff changeset
    37
	CBID_VEHICLE_LOAD_AMOUNT             = 0x12,
6909
aa800cc4b216 (svn r9549) -Codechange: Add definition of callbacks and callback masks for both industries and industry tiles
belugas
parents: 6685
diff changeset
    38
7711
66dffbd3b136 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium
parents: 7708
diff changeset
    39
	/** Determine whether a newstation should be made available to build. */
66dffbd3b136 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium
parents: 7708
diff changeset
    40
	CBID_STATION_AVAILABILITY            = 0x13,
6909
aa800cc4b216 (svn r9549) -Codechange: Add definition of callbacks and callback masks for both industries and industry tiles
belugas
parents: 6685
diff changeset
    41
7711
66dffbd3b136 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium
parents: 7708
diff changeset
    42
	/** Choose a sprite layout to draw, instead of the standard 0-7 range. */
66dffbd3b136 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium
parents: 7708
diff changeset
    43
	CBID_STATION_SPRITE_LAYOUT           = 0x14,
6685
410bba0abb67 (svn r9411) -Codechange: Add support for loading of newcargo data.
peter1138
parents: 6658
diff changeset
    44
7711
66dffbd3b136 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium
parents: 7708
diff changeset
    45
	/** Refit capacity, the passed vehicle needs to have its ->cargo_type set to
66dffbd3b136 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium
parents: 7708
diff changeset
    46
	 * the cargo we are refitting to, returns the new cargo capacity. */
66dffbd3b136 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium
parents: 7708
diff changeset
    47
	CBID_VEHICLE_REFIT_CAPACITY          = 0x15,
66dffbd3b136 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium
parents: 7708
diff changeset
    48
66dffbd3b136 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium
parents: 7708
diff changeset
    49
	/** Builds articulated engines for trains and RVs. */
66dffbd3b136 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium
parents: 7708
diff changeset
    50
	CBID_VEHICLE_ARTIC_ENGINE            = 0x16,
66dffbd3b136 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium
parents: 7708
diff changeset
    51
66dffbd3b136 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium
parents: 7708
diff changeset
    52
	/** Determine whether the house can be built on the specified tile. */
66dffbd3b136 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium
parents: 7708
diff changeset
    53
	CBID_HOUSE_ALLOW_CONSTRUCTION        = 0x17,
66dffbd3b136 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium
parents: 7708
diff changeset
    54
66dffbd3b136 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium
parents: 7708
diff changeset
    55
	/** AI construction/purchase selection */
66dffbd3b136 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium
parents: 7708
diff changeset
    56
	CBID_GENERIC_AI_PURCHASE_SELECTION   = 0x18, // not implemented
66dffbd3b136 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium
parents: 7708
diff changeset
    57
66dffbd3b136 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium
parents: 7708
diff changeset
    58
	/** Determine the cargo "suffixes" for each refit possibility of a cargo. */
66dffbd3b136 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium
parents: 7708
diff changeset
    59
	CBID_VEHICLE_CARGO_SUFFIX            = 0x19,
66dffbd3b136 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium
parents: 7708
diff changeset
    60
66dffbd3b136 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium
parents: 7708
diff changeset
    61
	/** Determine the next animation frame for a house. */
66dffbd3b136 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium
parents: 7708
diff changeset
    62
	CBID_HOUSE_ANIMATION_NEXT_FRAME      = 0x1A,
66dffbd3b136 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium
parents: 7708
diff changeset
    63
66dffbd3b136 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium
parents: 7708
diff changeset
    64
	/** Called for periodically starting or stopping the animation. */
66dffbd3b136 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium
parents: 7708
diff changeset
    65
	CBID_HOUSE_ANIMATION_START_STOP      = 0x1B,
66dffbd3b136 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium
parents: 7708
diff changeset
    66
66dffbd3b136 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium
parents: 7708
diff changeset
    67
	/** Called whenever the construction state of a house changes. */
66dffbd3b136 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium
parents: 7708
diff changeset
    68
	CBID_HOUSE_CONSTRUCTION_STATE_CHANGE = 0x1C,
66dffbd3b136 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium
parents: 7708
diff changeset
    69
66dffbd3b136 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium
parents: 7708
diff changeset
    70
	/** Determine whether a wagon can be attached to an already existing train. */
66dffbd3b136 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium
parents: 7708
diff changeset
    71
	CBID_TRAIN_ALLOW_WAGON_ATTACH        = 0x1D,
66dffbd3b136 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium
parents: 7708
diff changeset
    72
66dffbd3b136 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium
parents: 7708
diff changeset
    73
	/** Called to determine the colour of a town building. */
8138
7dc73953c47e (svn r11173) -Codechange: rename some callback enums so they are more uniform.
rubidium
parents: 8111
diff changeset
    74
	CBID_HOUSE_COLOUR                    = 0x1E,
7711
66dffbd3b136 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium
parents: 7708
diff changeset
    75
66dffbd3b136 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium
parents: 7708
diff changeset
    76
	/** Called to decide how much cargo a town building can accept. */
66dffbd3b136 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium
parents: 7708
diff changeset
    77
	CBID_HOUSE_CARGO_ACCEPTANCE          = 0x1F,
66dffbd3b136 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium
parents: 7708
diff changeset
    78
66dffbd3b136 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium
parents: 7708
diff changeset
    79
	/** Called to indicate how long the current animation frame should last. */
66dffbd3b136 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium
parents: 7708
diff changeset
    80
	CBID_HOUSE_ANIMATION_SPEED           = 0x20,
66dffbd3b136 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium
parents: 7708
diff changeset
    81
66dffbd3b136 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium
parents: 7708
diff changeset
    82
	/** Called periodically to determine if a house should be destroyed. */
66dffbd3b136 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium
parents: 7708
diff changeset
    83
	CBID_HOUSE_DESTRUCTION               = 0x21,
66dffbd3b136 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium
parents: 7708
diff changeset
    84
66dffbd3b136 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium
parents: 7708
diff changeset
    85
	/** Called to determine if the given industry type is available */
7779
ad42dbf9069d (svn r10622) -Feature: Introduction of the CBID_INDUSTRY_AVAILABLE's handling, in fund industry window.
belugas
parents: 7725
diff changeset
    86
	CBID_INDUSTRY_AVAILABLE              = 0x22,
7711
66dffbd3b136 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium
parents: 7708
diff changeset
    87
66dffbd3b136 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium
parents: 7708
diff changeset
    88
	/** This callback is called from vehicle purchase lists. It returns a value to be
66dffbd3b136 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium
parents: 7708
diff changeset
    89
	 * used as a custom string ID in the 0xD000 range. */
66dffbd3b136 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium
parents: 7708
diff changeset
    90
	CBID_VEHICLE_ADDITIONAL_TEXT         = 0x23,
66dffbd3b136 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium
parents: 7708
diff changeset
    91
66dffbd3b136 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium
parents: 7708
diff changeset
    92
	/** Called when building a station to customize the tile layout */
66dffbd3b136 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium
parents: 7708
diff changeset
    93
	CBID_STATION_TILE_LAYOUT             = 0x24,
66dffbd3b136 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium
parents: 7708
diff changeset
    94
66dffbd3b136 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium
parents: 7708
diff changeset
    95
	/** Called for periodically starting or stopping the animation. */
7725
e3892b38aa14 (svn r10508) -Codechange: allow customizable animation schemes for industries.
rubidium
parents: 7720
diff changeset
    96
	CBID_INDTILE_ANIM_START_STOP         = 0x25,
7711
66dffbd3b136 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium
parents: 7708
diff changeset
    97
66dffbd3b136 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium
parents: 7708
diff changeset
    98
	/** Called to determine industry tile next animation frame. */
7725
e3892b38aa14 (svn r10508) -Codechange: allow customizable animation schemes for industries.
rubidium
parents: 7720
diff changeset
    99
	CBID_INDTILE_ANIM_NEXT_FRAME         = 0x26,
7711
66dffbd3b136 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium
parents: 7708
diff changeset
   100
66dffbd3b136 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium
parents: 7708
diff changeset
   101
	/** Called to indicate how long the current animation frame should last. */
7725
e3892b38aa14 (svn r10508) -Codechange: allow customizable animation schemes for industries.
rubidium
parents: 7720
diff changeset
   102
	CBID_INDTILE_ANIMATION_SPEED         = 0x27,
7711
66dffbd3b136 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium
parents: 7708
diff changeset
   103
66dffbd3b136 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium
parents: 7708
diff changeset
   104
	/** Called to determine if the given industry can be built on specific area. */
66dffbd3b136 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium
parents: 7708
diff changeset
   105
	CBID_INDUSTRY_LOCATION               = 0x28,
66dffbd3b136 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium
parents: 7708
diff changeset
   106
66dffbd3b136 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium
parents: 7708
diff changeset
   107
	/** Called on production changes, so it can be adjusted. */
8111
23e6be5756bb (svn r11144) -Codechange: add support for newgrf callbacks 29 and 35
glx
parents: 8096
diff changeset
   108
	CBID_INDUSTRY_PRODUCTION_CHANGE      = 0x29,
7711
66dffbd3b136 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium
parents: 7708
diff changeset
   109
66dffbd3b136 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium
parents: 7708
diff changeset
   110
	/** Called to determine which cargoes a town building should accept. */
66dffbd3b136 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium
parents: 7708
diff changeset
   111
	CBID_HOUSE_ACCEPT_CARGO              = 0x2A,
66dffbd3b136 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium
parents: 7708
diff changeset
   112
66dffbd3b136 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium
parents: 7708
diff changeset
   113
	/** Called to query the cargo acceptance of the industry tile */
66dffbd3b136 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium
parents: 7708
diff changeset
   114
	CBID_INDTILE_CARGO_ACCEPTANCE        = 0x2B,
66dffbd3b136 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium
parents: 7708
diff changeset
   115
66dffbd3b136 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium
parents: 7708
diff changeset
   116
	/** Called to determine which cargoes an industry should accept. */
66dffbd3b136 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium
parents: 7708
diff changeset
   117
	CBID_INDTILE_ACCEPT_CARGO            = 0x2C,
66dffbd3b136 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium
parents: 7708
diff changeset
   118
66dffbd3b136 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium
parents: 7708
diff changeset
   119
	/** Called to determine if a specific colour map should be used for a vehicle
66dffbd3b136 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium
parents: 7708
diff changeset
   120
	 * instead of the default livery. */
66dffbd3b136 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium
parents: 7708
diff changeset
   121
	CBID_VEHICLE_COLOUR_MAPPING          = 0x2D,
66dffbd3b136 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium
parents: 7708
diff changeset
   122
66dffbd3b136 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium
parents: 7708
diff changeset
   123
	/** Called to determine how much cargo a town building produces. */
66dffbd3b136 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium
parents: 7708
diff changeset
   124
	CBID_HOUSE_PRODUCE_CARGO             = 0x2E,
66dffbd3b136 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium
parents: 7708
diff changeset
   125
66dffbd3b136 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium
parents: 7708
diff changeset
   126
	/** Called to determine if the given industry tile can be built on specific tile. */
66dffbd3b136 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium
parents: 7708
diff changeset
   127
	CBID_INDTILE_SHAPE_CHECK             = 0x2F,
66dffbd3b136 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium
parents: 7708
diff changeset
   128
66dffbd3b136 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium
parents: 7708
diff changeset
   129
	/** Called to determine the type (if any) of foundation to draw for industry tile. */
66dffbd3b136 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium
parents: 7708
diff changeset
   130
	CBID_INDUSTRY_DRAW_FOUNDATIONS       = 0x30,
66dffbd3b136 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium
parents: 7708
diff changeset
   131
66dffbd3b136 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium
parents: 7708
diff changeset
   132
	/** Called when the player (or AI) tries to start or stop a vehicle. Mainly
66dffbd3b136 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium
parents: 7708
diff changeset
   133
	 * used for preventing a vehicle from leaving the depot. */
66dffbd3b136 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium
parents: 7708
diff changeset
   134
	CBID_VEHICLE_START_STOP_CHECK        = 0x31,
66dffbd3b136 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium
parents: 7708
diff changeset
   135
66dffbd3b136 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium
parents: 7708
diff changeset
   136
	/** Called for every vehicle every 32 days (not all on same date though). */
8299
d5c112dc0726 (svn r11353) -Codechange: add support for newgrf callback 32
glx
parents: 8287
diff changeset
   137
	CBID_VEHICLE_32DAY_CALLBACK          = 0x32,
7711
66dffbd3b136 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium
parents: 7708
diff changeset
   138
66dffbd3b136 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium
parents: 7708
diff changeset
   139
	/** Called to play a special sound effect */
66dffbd3b136 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium
parents: 7708
diff changeset
   140
	CBID_VEHICLE_SOUND_EFFECT            = 0x33,
66dffbd3b136 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium
parents: 7708
diff changeset
   141
66dffbd3b136 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium
parents: 7708
diff changeset
   142
	/** Return the vehicles this given vehicle can be "upgraded" to. */
66dffbd3b136 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium
parents: 7708
diff changeset
   143
	CBID_VEHICLE_AUTOREPLACE_SELECTION   = 0x34,
66dffbd3b136 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium
parents: 7708
diff changeset
   144
66dffbd3b136 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium
parents: 7708
diff changeset
   145
	/** Called monthly on production changes, so it can be adjusted more frequently */
8111
23e6be5756bb (svn r11144) -Codechange: add support for newgrf callbacks 29 and 35
glx
parents: 8096
diff changeset
   146
	CBID_INDUSTRY_MONTHLYPROD_CHANGE     = 0x35,
7711
66dffbd3b136 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium
parents: 7708
diff changeset
   147
66dffbd3b136 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium
parents: 7708
diff changeset
   148
	/** Called to modify various vehicle properties. Callback parameter 1
66dffbd3b136 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium
parents: 7708
diff changeset
   149
	 * specifies the property index, as used in Action 0, to change. */
66dffbd3b136 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium
parents: 7708
diff changeset
   150
	CBID_VEHICLE_MODIFY_PROPERTY         = 0x36,
66dffbd3b136 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium
parents: 7708
diff changeset
   151
66dffbd3b136 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium
parents: 7708
diff changeset
   152
	/** Called to determine text to display after cargo name */
9255
22da20a012ba (svn r12455) -Codechange: Implement NewGRF callback 37 (cargo sub-type display for industries)
glx
parents: 9181
diff changeset
   153
	CBID_INDUSTRY_CARGO_SUFFIX           = 0x37,
7711
66dffbd3b136 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium
parents: 7708
diff changeset
   154
66dffbd3b136 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium
parents: 7708
diff changeset
   155
	/** Called to determine more text in the fund industry window */
7720
ce015c1ac3a6 (svn r10503) -Codechange: Mark Callback CBID_INDUSTRY_FUND_MORE_TEXT (cb38) as implemented.
belugas
parents: 7711
diff changeset
   156
	CBID_INDUSTRY_FUND_MORE_TEXT         = 0x38,
7711
66dffbd3b136 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium
parents: 7708
diff changeset
   157
66dffbd3b136 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium
parents: 7708
diff changeset
   158
	/** Called to calculate the income of delivered cargo */
66dffbd3b136 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium
parents: 7708
diff changeset
   159
	CBID_CARGO_PROFIT_CALC               = 0x39,
66dffbd3b136 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium
parents: 7708
diff changeset
   160
66dffbd3b136 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium
parents: 7708
diff changeset
   161
	/** Called to determine more text in the industry window */
66dffbd3b136 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium
parents: 7708
diff changeset
   162
	CBID_INDUSTRY_WINDOW_MORE_TEXT       = 0x3A,
66dffbd3b136 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium
parents: 7708
diff changeset
   163
66dffbd3b136 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium
parents: 7708
diff changeset
   164
	/** Called to determine industry special effects */
66dffbd3b136 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium
parents: 7708
diff changeset
   165
	CBID_INDUSTRY_SPECIAL_EFFECT         = 0x3B,
66dffbd3b136 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium
parents: 7708
diff changeset
   166
66dffbd3b136 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium
parents: 7708
diff changeset
   167
	/** Called to determine if industry can alter the ground below industry tile */
8078
bdf94bf88568 (svn r11107) -Feature: some tool so one can still build tunnels under rails (and other structures) when the owner of the structure built it on foundations and if you have enough "empty" space ofcourse. One could use the tool for some other construction needs too. Patch by frosch.
rubidium
parents: 7823
diff changeset
   168
	CBID_INDUSTRY_AUTOSLOPE              = 0x3C,
7711
66dffbd3b136 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium
parents: 7708
diff changeset
   169
66dffbd3b136 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium
parents: 7708
diff changeset
   170
	/** Called to determine if the industry can still accept or refuse more cargo arrival */
66dffbd3b136 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium
parents: 7708
diff changeset
   171
	CBID_INDUSTRY_REFUSE_CARGO           = 0x3D,
66dffbd3b136 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium
parents: 7708
diff changeset
   172
8287
5e43bdaf2d8b (svn r11341) -Codechange: add missing callback ID enums, add stub for house property 20 and reorder unimplemented action 0 properties
glx
parents: 8146
diff changeset
   173
	/* There are no callbacks 0x3E - 0x13F */
5e43bdaf2d8b (svn r11341) -Codechange: add missing callback ID enums, add stub for house property 20 and reorder unimplemented action 0 properties
glx
parents: 8146
diff changeset
   174
5e43bdaf2d8b (svn r11341) -Codechange: add missing callback ID enums, add stub for house property 20 and reorder unimplemented action 0 properties
glx
parents: 8146
diff changeset
   175
	/** Called for periodically starting or stopping the animation. */
5e43bdaf2d8b (svn r11341) -Codechange: add missing callback ID enums, add stub for house property 20 and reorder unimplemented action 0 properties
glx
parents: 8146
diff changeset
   176
	CBID_STATION_ANIM_START_STOP         = 0x140, // not implemented
5e43bdaf2d8b (svn r11341) -Codechange: add missing callback ID enums, add stub for house property 20 and reorder unimplemented action 0 properties
glx
parents: 8146
diff changeset
   177
5e43bdaf2d8b (svn r11341) -Codechange: add missing callback ID enums, add stub for house property 20 and reorder unimplemented action 0 properties
glx
parents: 8146
diff changeset
   178
	/** Called to determine station tile next animation frame. */
5e43bdaf2d8b (svn r11341) -Codechange: add missing callback ID enums, add stub for house property 20 and reorder unimplemented action 0 properties
glx
parents: 8146
diff changeset
   179
	CBID_STATION_ANIM_NEXT_FRAME         = 0x141, // not implemented
5e43bdaf2d8b (svn r11341) -Codechange: add missing callback ID enums, add stub for house property 20 and reorder unimplemented action 0 properties
glx
parents: 8146
diff changeset
   180
5e43bdaf2d8b (svn r11341) -Codechange: add missing callback ID enums, add stub for house property 20 and reorder unimplemented action 0 properties
glx
parents: 8146
diff changeset
   181
	/** Called to indicate how long the current animation frame should last. */
5e43bdaf2d8b (svn r11341) -Codechange: add missing callback ID enums, add stub for house property 20 and reorder unimplemented action 0 properties
glx
parents: 8146
diff changeset
   182
	CBID_STATION_ANIMATION_SPEED         = 0x142, // not implemented
8138
7dc73953c47e (svn r11173) -Codechange: rename some callback enums so they are more uniform.
rubidium
parents: 8111
diff changeset
   183
7711
66dffbd3b136 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium
parents: 7708
diff changeset
   184
	/** Called to determine whether a town building can be destroyed. */
66dffbd3b136 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium
parents: 7708
diff changeset
   185
	CBID_HOUSE_DENY_DESTRUCTION          = 0x143,
66dffbd3b136 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium
parents: 7708
diff changeset
   186
66dffbd3b136 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium
parents: 7708
diff changeset
   187
	/** Select an ambient sound to play for a given type of tile. */
66dffbd3b136 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium
parents: 7708
diff changeset
   188
	CBID_SOUNDS_AMBIENT_EFFECT           = 0x144, // not implemented
66dffbd3b136 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium
parents: 7708
diff changeset
   189
66dffbd3b136 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium
parents: 7708
diff changeset
   190
	/** Called to calculate part of a station rating. */
66dffbd3b136 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium
parents: 7708
diff changeset
   191
	CBID_CARGO_STATION_RATING_CALC       = 0x145,
66dffbd3b136 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium
parents: 7708
diff changeset
   192
66dffbd3b136 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium
parents: 7708
diff changeset
   193
	/** Allow signal sprites to be replaced dynamically. */
66dffbd3b136 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium
parents: 7708
diff changeset
   194
	CBID_NEW_SIGNALS_SPRITE_DRAW         = 0x146, // not implemented
66dffbd3b136 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium
parents: 7708
diff changeset
   195
66dffbd3b136 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium
parents: 7708
diff changeset
   196
	/** Add an offset to the default sprite numbers to show another sprite. */
66dffbd3b136 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
rubidium
parents: 7708
diff changeset
   197
	CBID_CANALS_SPRITE_OFFSET            = 0x147, // not implemented
8138
7dc73953c47e (svn r11173) -Codechange: rename some callback enums so they are more uniform.
rubidium
parents: 8111
diff changeset
   198
8287
5e43bdaf2d8b (svn r11341) -Codechange: add missing callback ID enums, add stub for house property 20 and reorder unimplemented action 0 properties
glx
parents: 8146
diff changeset
   199
	/** Called when a cargo type specified in property 20 is accepted. */
5e43bdaf2d8b (svn r11341) -Codechange: add missing callback ID enums, add stub for house property 20 and reorder unimplemented action 0 properties
glx
parents: 8146
diff changeset
   200
	CBID_HOUSE_WATCHED_CARGO_ACCEPTED    = 0x148, // not implemented
8138
7dc73953c47e (svn r11173) -Codechange: rename some callback enums so they are more uniform.
rubidium
parents: 8111
diff changeset
   201
7dc73953c47e (svn r11173) -Codechange: rename some callback enums so they are more uniform.
rubidium
parents: 8111
diff changeset
   202
	/** Callback done for each tile of a station to check the slope. */
7dc73953c47e (svn r11173) -Codechange: rename some callback enums so they are more uniform.
rubidium
parents: 8111
diff changeset
   203
	CBID_STATION_LAND_SLOPE_CHECK        = 0x149, // not implemented
7dc73953c47e (svn r11173) -Codechange: rename some callback enums so they are more uniform.
rubidium
parents: 8111
diff changeset
   204
7dc73953c47e (svn r11173) -Codechange: rename some callback enums so they are more uniform.
rubidium
parents: 8111
diff changeset
   205
	/** Called to determine the color of an industry. */
8146
fae08d49a223 (svn r11181) -Codechange: add support for newgrf callback 14A (Belugas)
glx
parents: 8142
diff changeset
   206
	CBID_INDUSTRY_DECIDE_COLOUR          = 0x14A,
8138
7dc73953c47e (svn r11173) -Codechange: rename some callback enums so they are more uniform.
rubidium
parents: 8111
diff changeset
   207
7dc73953c47e (svn r11173) -Codechange: rename some callback enums so they are more uniform.
rubidium
parents: 8111
diff changeset
   208
	/** Customize the input cargo types of a newly build industry. */
8142
aaac2a5f116b (svn r11177) -Codechange: add support for newgrf callbacks 14B and 14C
glx
parents: 8138
diff changeset
   209
	CBID_INDUSTRY_INPUT_CARGO_TYPES      = 0x14B,
8138
7dc73953c47e (svn r11173) -Codechange: rename some callback enums so they are more uniform.
rubidium
parents: 8111
diff changeset
   210
7dc73953c47e (svn r11173) -Codechange: rename some callback enums so they are more uniform.
rubidium
parents: 8111
diff changeset
   211
	/** Customize the output cargo types of a newly build industry. */
8142
aaac2a5f116b (svn r11177) -Codechange: add support for newgrf callbacks 14B and 14C
glx
parents: 8138
diff changeset
   212
	CBID_INDUSTRY_OUTPUT_CARGO_TYPES     = 0x14C,
9181
b65dd02939dd (svn r12352) -Fix: Some callback-results were treated as 8 bit, when they were 15 bit, and vice versa.
frosch
parents: 8783
diff changeset
   213
b65dd02939dd (svn r12352) -Fix: Some callback-results were treated as 8 bit, when they were 15 bit, and vice versa.
frosch
parents: 8783
diff changeset
   214
	/* ATTENTION:
b65dd02939dd (svn r12352) -Fix: Some callback-results were treated as 8 bit, when they were 15 bit, and vice versa.
frosch
parents: 8783
diff changeset
   215
	 * When adding new callbacks and their result is 15bit, add them to newgrf_spritegroup.cpp:Is8BitCallback().
b65dd02939dd (svn r12352) -Fix: Some callback-results were treated as 8 bit, when they were 15 bit, and vice versa.
frosch
parents: 8783
diff changeset
   216
	 * It does not harm to add them there though they are not implemented. But it does harm if they get forgotton.
b65dd02939dd (svn r12352) -Fix: Some callback-results were treated as 8 bit, when they were 15 bit, and vice versa.
frosch
parents: 8783
diff changeset
   217
	 */
1895
398f156479c8 (svn r2401) - Fix: [newgrf] Finish up callback mechanism, implement 'refit capacity' callback slightly more correct.
hackykid
parents: 1883
diff changeset
   218
};
398f156479c8 (svn r2401) - Fix: [newgrf] Finish up callback mechanism, implement 'refit capacity' callback slightly more correct.
hackykid
parents: 1883
diff changeset
   219
3007
6f65203dc324 (svn r3587) - NewGRF: Rename Callback IDs to include their "class"
peter1138
parents: 2982
diff changeset
   220
/**
6f65203dc324 (svn r3587) - NewGRF: Rename Callback IDs to include their "class"
peter1138
parents: 2982
diff changeset
   221
 * 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
   222
 * 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
   223
 */
6f65203dc324 (svn r3587) - NewGRF: Rename Callback IDs to include their "class"
peter1138
parents: 2982
diff changeset
   224
enum VehicleCallbackMask {
8138
7dc73953c47e (svn r11173) -Codechange: rename some callback enums so they are more uniform.
rubidium
parents: 8111
diff changeset
   225
	CBM_TRAIN_WAGON_POWER      = 0, ///< Powered wagons (trains only)
7dc73953c47e (svn r11173) -Codechange: rename some callback enums so they are more uniform.
rubidium
parents: 8111
diff changeset
   226
	CBM_VEHICLE_LENGTH         = 1, ///< Vehicle length (trains and road vehicles)
7dc73953c47e (svn r11173) -Codechange: rename some callback enums so they are more uniform.
rubidium
parents: 8111
diff changeset
   227
	CBM_VEHICLE_LOAD_AMOUNT    = 2, ///< Load amount
7dc73953c47e (svn r11173) -Codechange: rename some callback enums so they are more uniform.
rubidium
parents: 8111
diff changeset
   228
	CBM_VEHICLE_REFIT_CAPACITY = 3, ///< Cargo capacity after refit
7dc73953c47e (svn r11173) -Codechange: rename some callback enums so they are more uniform.
rubidium
parents: 8111
diff changeset
   229
	CBM_VEHICLE_ARTIC_ENGINE   = 4, ///< Add articulated engines (trains only)
7dc73953c47e (svn r11173) -Codechange: rename some callback enums so they are more uniform.
rubidium
parents: 8111
diff changeset
   230
	CBM_VEHICLE_CARGO_SUFFIX   = 5, ///< Show suffix after cargo name
7dc73953c47e (svn r11173) -Codechange: rename some callback enums so they are more uniform.
rubidium
parents: 8111
diff changeset
   231
	CBM_VEHICLE_COLOUR_REMAP   = 6, ///< Change colour mapping of vehicle
7dc73953c47e (svn r11173) -Codechange: rename some callback enums so they are more uniform.
rubidium
parents: 8111
diff changeset
   232
	CBM_VEHICLE_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
   233
};
3b02000cfbe0 (svn r2389) - Feature: [newgrf] Implement the mechanism for handling newgrf callbacks.
hackykid
parents: 1802
diff changeset
   234
3007
6f65203dc324 (svn r3587) - NewGRF: Rename Callback IDs to include their "class"
peter1138
parents: 2982
diff changeset
   235
/**
3505
e9a3a6b79561 (svn r4356) - NewGRF: Load more newstation properties.
peter1138
parents: 3007
diff changeset
   236
 * Callback masks for stations.
e9a3a6b79561 (svn r4356) - NewGRF: Load more newstation properties.
peter1138
parents: 3007
diff changeset
   237
 */
e9a3a6b79561 (svn r4356) - NewGRF: Load more newstation properties.
peter1138
parents: 3007
diff changeset
   238
enum StationCallbackMask {
8138
7dc73953c47e (svn r11173) -Codechange: rename some callback enums so they are more uniform.
rubidium
parents: 8111
diff changeset
   239
	CBM_STATION_AVAIL                = 0, ///< Availability of station in construction window
7dc73953c47e (svn r11173) -Codechange: rename some callback enums so they are more uniform.
rubidium
parents: 8111
diff changeset
   240
	CBM_STATION_SPRITE_LAYOUT        = 1, ///< Use callback to select a sprite layout to use
7dc73953c47e (svn r11173) -Codechange: rename some callback enums so they are more uniform.
rubidium
parents: 8111
diff changeset
   241
	CBM_STATION_ANIMATION_NEXT_FRAME = 2, ///< Use a custom next frame callback
7dc73953c47e (svn r11173) -Codechange: rename some callback enums so they are more uniform.
rubidium
parents: 8111
diff changeset
   242
	CBM_STATION_ANIMATION_SPEED      = 3, ///< Customize the animation speed of the station
7dc73953c47e (svn r11173) -Codechange: rename some callback enums so they are more uniform.
rubidium
parents: 8111
diff changeset
   243
	CBM_STATION_SLOPE_CHECK          = 4, ///< Check slope of new station tiles
3505
e9a3a6b79561 (svn r4356) - NewGRF: Load more newstation properties.
peter1138
parents: 3007
diff changeset
   244
};
e9a3a6b79561 (svn r4356) - NewGRF: Load more newstation properties.
peter1138
parents: 3007
diff changeset
   245
e9a3a6b79561 (svn r4356) - NewGRF: Load more newstation properties.
peter1138
parents: 3007
diff changeset
   246
/**
6658
59048224be55 (svn r9315) -Merge: The newhouses branch. With this merge comes almost complete support for
maedhros
parents: 6636
diff changeset
   247
 * Callback masks for houses.
59048224be55 (svn r9315) -Merge: The newhouses branch. With this merge comes almost complete support for
maedhros
parents: 6636
diff changeset
   248
 */
59048224be55 (svn r9315) -Merge: The newhouses branch. With this merge comes almost complete support for
maedhros
parents: 6636
diff changeset
   249
enum HouseCallbackMask {
8138
7dc73953c47e (svn r11173) -Codechange: rename some callback enums so they are more uniform.
rubidium
parents: 8111
diff changeset
   250
	CBM_HOUSE_ALLOW_CONSTRUCTION        =  0,
7dc73953c47e (svn r11173) -Codechange: rename some callback enums so they are more uniform.
rubidium
parents: 8111
diff changeset
   251
	CBM_HOUSE_ANIMATION_NEXT_FRAME      =  1,
7dc73953c47e (svn r11173) -Codechange: rename some callback enums so they are more uniform.
rubidium
parents: 8111
diff changeset
   252
	CBM_HOUSE_ANIMATION_START_STOP      =  2,
7dc73953c47e (svn r11173) -Codechange: rename some callback enums so they are more uniform.
rubidium
parents: 8111
diff changeset
   253
	CBM_HOUSE_CONSTRUCTION_STATE_CHANGE =  3,
7dc73953c47e (svn r11173) -Codechange: rename some callback enums so they are more uniform.
rubidium
parents: 8111
diff changeset
   254
	CBM_HOUSE_COLOUR                    =  4,
7dc73953c47e (svn r11173) -Codechange: rename some callback enums so they are more uniform.
rubidium
parents: 8111
diff changeset
   255
	CBM_HOUSE_CARGO_ACCEPTANCE          =  5,
7dc73953c47e (svn r11173) -Codechange: rename some callback enums so they are more uniform.
rubidium
parents: 8111
diff changeset
   256
	CBM_HOUSE_ANIMATION_SPEED           =  6,
7dc73953c47e (svn r11173) -Codechange: rename some callback enums so they are more uniform.
rubidium
parents: 8111
diff changeset
   257
	CBM_HOUSE_DESTRUCTION               =  7,
7dc73953c47e (svn r11173) -Codechange: rename some callback enums so they are more uniform.
rubidium
parents: 8111
diff changeset
   258
	CBM_HOUSE_ACCEPT_CARGO              =  8,
7dc73953c47e (svn r11173) -Codechange: rename some callback enums so they are more uniform.
rubidium
parents: 8111
diff changeset
   259
	CBM_HOUSE_PRODUCE_CARGO             =  9,
7dc73953c47e (svn r11173) -Codechange: rename some callback enums so they are more uniform.
rubidium
parents: 8111
diff changeset
   260
	CBM_HOUSE_DENY_DESTRUCTION          = 10,
6658
59048224be55 (svn r9315) -Merge: The newhouses branch. With this merge comes almost complete support for
maedhros
parents: 6636
diff changeset
   261
};
59048224be55 (svn r9315) -Merge: The newhouses branch. With this merge comes almost complete support for
maedhros
parents: 6636
diff changeset
   262
59048224be55 (svn r9315) -Merge: The newhouses branch. With this merge comes almost complete support for
maedhros
parents: 6636
diff changeset
   263
/**
6685
410bba0abb67 (svn r9411) -Codechange: Add support for loading of newcargo data.
peter1138
parents: 6658
diff changeset
   264
 * Callback masks for cargos.
410bba0abb67 (svn r9411) -Codechange: Add support for loading of newcargo data.
peter1138
parents: 6658
diff changeset
   265
 */
410bba0abb67 (svn r9411) -Codechange: Add support for loading of newcargo data.
peter1138
parents: 6658
diff changeset
   266
enum CargoCallbackMask {
8138
7dc73953c47e (svn r11173) -Codechange: rename some callback enums so they are more uniform.
rubidium
parents: 8111
diff changeset
   267
	CBM_CARGO_PROFIT_CALC         = 0, ///< custom profit calculation
7dc73953c47e (svn r11173) -Codechange: rename some callback enums so they are more uniform.
rubidium
parents: 8111
diff changeset
   268
	CBM_CARGO_STATION_RATING_CALC = 1, ///< custom station rating for this cargo type
6685
410bba0abb67 (svn r9411) -Codechange: Add support for loading of newcargo data.
peter1138
parents: 6658
diff changeset
   269
};
410bba0abb67 (svn r9411) -Codechange: Add support for loading of newcargo data.
peter1138
parents: 6658
diff changeset
   270
410bba0abb67 (svn r9411) -Codechange: Add support for loading of newcargo data.
peter1138
parents: 6658
diff changeset
   271
/**
6909
aa800cc4b216 (svn r9549) -Codechange: Add definition of callbacks and callback masks for both industries and industry tiles
belugas
parents: 6685
diff changeset
   272
 * Callback masks for Industries
aa800cc4b216 (svn r9549) -Codechange: Add definition of callbacks and callback masks for both industries and industry tiles
belugas
parents: 6685
diff changeset
   273
 */
aa800cc4b216 (svn r9549) -Codechange: Add definition of callbacks and callback masks for both industries and industry tiles
belugas
parents: 6685
diff changeset
   274
enum IndustryCallbackMask {
8138
7dc73953c47e (svn r11173) -Codechange: rename some callback enums so they are more uniform.
rubidium
parents: 8111
diff changeset
   275
	CBM_IND_AVAILABLE                 =  0, ///< industry availability callback
7dc73953c47e (svn r11173) -Codechange: rename some callback enums so they are more uniform.
rubidium
parents: 8111
diff changeset
   276
	CBM_IND_PRODUCTION_CARGO_ARRIVAL  =  1, ///< call production callback when cargo arrives at the industry
7dc73953c47e (svn r11173) -Codechange: rename some callback enums so they are more uniform.
rubidium
parents: 8111
diff changeset
   277
	CBM_IND_PRODUCTION_256_TICKS      =  2, ///< call production callback every 256 ticks
7dc73953c47e (svn r11173) -Codechange: rename some callback enums so they are more uniform.
rubidium
parents: 8111
diff changeset
   278
	CBM_IND_LOCATION                  =  3, ///< check industry construction on given area
7dc73953c47e (svn r11173) -Codechange: rename some callback enums so they are more uniform.
rubidium
parents: 8111
diff changeset
   279
	CBM_IND_PRODUCTION_CHANGE         =  4, ///< controls random production change
7dc73953c47e (svn r11173) -Codechange: rename some callback enums so they are more uniform.
rubidium
parents: 8111
diff changeset
   280
	CBM_IND_MONTHLYPROD_CHANGE        =  5, ///< controls monthly random production change
7dc73953c47e (svn r11173) -Codechange: rename some callback enums so they are more uniform.
rubidium
parents: 8111
diff changeset
   281
	CBM_IND_CARGO_SUFFIX              =  6, ///< cargo sub-type display
7dc73953c47e (svn r11173) -Codechange: rename some callback enums so they are more uniform.
rubidium
parents: 8111
diff changeset
   282
	CBM_IND_FUND_MORE_TEXT            =  7, ///< additional text in fund window
7dc73953c47e (svn r11173) -Codechange: rename some callback enums so they are more uniform.
rubidium
parents: 8111
diff changeset
   283
	CBM_IND_WINDOW_MORE_TEXT          =  8, ///< additional text in industry window
7dc73953c47e (svn r11173) -Codechange: rename some callback enums so they are more uniform.
rubidium
parents: 8111
diff changeset
   284
	CBM_IND_SPECIAL_EFFECT            =  9, ///< control special effects
6909
aa800cc4b216 (svn r9549) -Codechange: Add definition of callbacks and callback masks for both industries and industry tiles
belugas
parents: 6685
diff changeset
   285
	CBM_IND_REFUSE_CARGO              = 10, ///< option out of accepting cargo
8138
7dc73953c47e (svn r11173) -Codechange: rename some callback enums so they are more uniform.
rubidium
parents: 8111
diff changeset
   286
	CBM_IND_DECIDE_COLOUR             = 11, ///< give a custom colour to newly build industries
7dc73953c47e (svn r11173) -Codechange: rename some callback enums so they are more uniform.
rubidium
parents: 8111
diff changeset
   287
	CBM_IND_INPUT_CARGO_TYPES         = 12, ///< customize the cargos the industry requires
7dc73953c47e (svn r11173) -Codechange: rename some callback enums so they are more uniform.
rubidium
parents: 8111
diff changeset
   288
	CBM_IND_OUTPUT_CARGO_TYPES        = 13, ///< customize the cargos the industry produces
6909
aa800cc4b216 (svn r9549) -Codechange: Add definition of callbacks and callback masks for both industries and industry tiles
belugas
parents: 6685
diff changeset
   289
};
aa800cc4b216 (svn r9549) -Codechange: Add definition of callbacks and callback masks for both industries and industry tiles
belugas
parents: 6685
diff changeset
   290
aa800cc4b216 (svn r9549) -Codechange: Add definition of callbacks and callback masks for both industries and industry tiles
belugas
parents: 6685
diff changeset
   291
/**
aa800cc4b216 (svn r9549) -Codechange: Add definition of callbacks and callback masks for both industries and industry tiles
belugas
parents: 6685
diff changeset
   292
 * Callback masks for industry tiles
aa800cc4b216 (svn r9549) -Codechange: Add definition of callbacks and callback masks for both industries and industry tiles
belugas
parents: 6685
diff changeset
   293
 */
aa800cc4b216 (svn r9549) -Codechange: Add definition of callbacks and callback masks for both industries and industry tiles
belugas
parents: 6685
diff changeset
   294
enum IndustryTileCallbackMask {
aa800cc4b216 (svn r9549) -Codechange: Add definition of callbacks and callback masks for both industries and industry tiles
belugas
parents: 6685
diff changeset
   295
	CBM_INDT_ANIM_NEXT_FRAME          = 0,  ///< decides next animation frame
aa800cc4b216 (svn r9549) -Codechange: Add definition of callbacks and callback masks for both industries and industry tiles
belugas
parents: 6685
diff changeset
   296
	CBM_INDT_ANIM_SPEED               = 1,  ///< decides animation speed
7695
b15538ba7152 (svn r10477) -Codechange: add some callbacks to customise the acceptance of industries.
rubidium
parents: 7694
diff changeset
   297
	CBM_INDT_CARGO_ACCEPTANCE         = 2,  ///< decides amount of cargo acceptance
6909
aa800cc4b216 (svn r9549) -Codechange: Add definition of callbacks and callback masks for both industries and industry tiles
belugas
parents: 6685
diff changeset
   298
	CBM_INDT_ACCEPT_CARGO             = 3,  ///< decides accepted types
aa800cc4b216 (svn r9549) -Codechange: Add definition of callbacks and callback masks for both industries and industry tiles
belugas
parents: 6685
diff changeset
   299
	CBM_INDT_SHAPE_CHECK              = 4,  ///< decides slope suitability
aa800cc4b216 (svn r9549) -Codechange: Add definition of callbacks and callback masks for both industries and industry tiles
belugas
parents: 6685
diff changeset
   300
	CBM_INDT_DRAW_FOUNDATIONS         = 5,  ///< decides if default foundations need to be drawn
aa800cc4b216 (svn r9549) -Codechange: Add definition of callbacks and callback masks for both industries and industry tiles
belugas
parents: 6685
diff changeset
   301
	CBM_INDT_AUTOSLOPE                = 6,  ///< decides allowance of autosloping
aa800cc4b216 (svn r9549) -Codechange: Add definition of callbacks and callback masks for both industries and industry tiles
belugas
parents: 6685
diff changeset
   302
};
aa800cc4b216 (svn r9549) -Codechange: Add definition of callbacks and callback masks for both industries and industry tiles
belugas
parents: 6685
diff changeset
   303
aa800cc4b216 (svn r9549) -Codechange: Add definition of callbacks and callback masks for both industries and industry tiles
belugas
parents: 6685
diff changeset
   304
/**
8783
9ae8c79c7708 (svn r11851) -Codechange: A few magic numbers removal, plus a little code style
belugas
parents: 8299
diff changeset
   305
 * Different values for Callback result evaluations
3007
6f65203dc324 (svn r3587) - NewGRF: Rename Callback IDs to include their "class"
peter1138
parents: 2982
diff changeset
   306
 */
1883
3b02000cfbe0 (svn r2389) - Feature: [newgrf] Implement the mechanism for handling newgrf callbacks.
hackykid
parents: 1802
diff changeset
   307
enum {
8783
9ae8c79c7708 (svn r11851) -Codechange: A few magic numbers removal, plus a little code style
belugas
parents: 8299
diff changeset
   308
	CALLBACK_FAILED              = 0xFFFF,  ///< Result of a failed callback.
9ae8c79c7708 (svn r11851) -Codechange: A few magic numbers removal, plus a little code style
belugas
parents: 8299
diff changeset
   309
	CALLBACK_HOUSEPRODCARGO_END  = 0x20FF,  ///< Sentinel indicating that the loop for CBID_HOUSE_PRODUCE_CARGO has ended
1883
3b02000cfbe0 (svn r2389) - Feature: [newgrf] Implement the mechanism for handling newgrf callbacks.
hackykid
parents: 1802
diff changeset
   310
};
3b02000cfbe0 (svn r2389) - Feature: [newgrf] Implement the mechanism for handling newgrf callbacks.
hackykid
parents: 1802
diff changeset
   311
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
   312
#endif /* NEWGRF_CALLBACKS_H */