author | KUDr |
Sat, 21 Apr 2007 08:23:57 +0000 | |
branch | cpp_gui |
changeset 6308 | 646711c5feaa |
parent 6307 | f40e88cff863 |
permissions | -rw-r--r-- |
2186 | 1 |
/* $Id$ */ |
2 |
||
6307 | 3 |
/** @file newgrf_callbacks.h |
4 |
*/ |
|
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 | 8 |
|
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. |
6f65203dc324
(svn r3587) - NewGRF: Rename Callback IDs to include their "class"
peter1138
parents:
2982
diff
changeset
|
12 |
* Names are formatted as CBID_<CLASS>_<CALLBACK> |
6f65203dc324
(svn r3587) - NewGRF: Rename Callback IDs to include their "class"
peter1138
parents:
2982
diff
changeset
|
13 |
*/ |
1883
3b02000cfbe0
(svn r2389) - Feature: [newgrf] Implement the mechanism for handling newgrf callbacks.
hackykid
parents:
1802
diff
changeset
|
14 |
enum CallbackID { |
6303 | 15 |
/* Powered wagons, if the result is lower as 0x40 then the wagon is powered |
16 |
* @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
|
17 |
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
|
18 |
|
6303 | 19 |
/* Vehicle length, returns the amount of 1/8's the vehicle is shorter |
20 |
* only for train vehicles */ |
|
3007
6f65203dc324
(svn r3587) - NewGRF: Rename Callback IDs to include their "class"
peter1138
parents:
2982
diff
changeset
|
21 |
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
|
22 |
|
6298
c30fe89622df
(svn r9119) [cpp_gui] -Sync with trunk (r9003:9100)
bjarni
parents:
5968
diff
changeset
|
23 |
/* 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
|
24 |
* 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
|
25 |
CBID_VEHICLE_LOAD_AMOUNT = 0x12, |
651c9272ad22
(svn r7326) -Feature: Add support for gradual (un)loading of vehicles (Maedhros)
peter1138
parents:
4694
diff
changeset
|
26 |
|
3754
04356ae401b4
(svn r4742) - Newstations: Add callbacks for building and drawing custom stations.
peter1138
parents:
3727
diff
changeset
|
27 |
/* 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
|
28 |
* newstation should be made available to build */ |
04356ae401b4
(svn r4742) - Newstations: Add callbacks for building and drawing custom stations.
peter1138
parents:
3727
diff
changeset
|
29 |
CBID_STATION_AVAILABILITY = 0x13, |
04356ae401b4
(svn r4742) - Newstations: Add callbacks for building and drawing custom stations.
peter1138
parents:
3727
diff
changeset
|
30 |
|
04356ae401b4
(svn r4742) - Newstations: Add callbacks for building and drawing custom stations.
peter1138
parents:
3727
diff
changeset
|
31 |
/* 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
|
32 |
* 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
|
33 |
CBID_STATION_SPRITE_LAYOUT = 0x14, |
04356ae401b4
(svn r4742) - Newstations: Add callbacks for building and drawing custom stations.
peter1138
parents:
3727
diff
changeset
|
34 |
|
6303 | 35 |
/* Refit capacity, the passed vehicle needs to have its ->cargo_type set to |
36 |
* 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
|
37 |
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
|
38 |
|
3007
6f65203dc324
(svn r3587) - NewGRF: Rename Callback IDs to include their "class"
peter1138
parents:
2982
diff
changeset
|
39 |
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
|
40 |
|
6303 | 41 |
/* Called (if appropriate bit in callback mask is set) to determine whether |
42 |
* the house can be built on the specified tile. */ |
|
43 |
CBID_HOUSE_ALLOW_CONSTRUCTION = 0x17, |
|
44 |
||
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
|
45 |
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
|
46 |
|
6303 | 47 |
/* Called (if appropriate bit in callback mask is set) to determine |
48 |
* the next animation frame. */ |
|
49 |
CBID_HOUSE_ANIMATION_NEXT_FRAME = 0x1A, |
|
50 |
||
51 |
/* Called (if appropriate bit in callback mask is set) for periodically |
|
52 |
* starting or stopping the animation. */ |
|
53 |
CBID_HOUSE_ANIMATION_START_STOP = 0x1B, |
|
54 |
||
55 |
/* Called (if appropriate bit in callback mask is set) whenever the |
|
56 |
* construction state of a house changes. */ |
|
57 |
CBID_CONSTRUCTION_STATE_CHANGE = 0x1C, |
|
58 |
||
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
|
59 |
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
|
60 |
|
6303 | 61 |
/* Called (if appropriate bit in callback mask is set) to determine the |
62 |
* colour of a town building. */ |
|
63 |
CBID_BUILDING_COLOUR = 0x1E, |
|
64 |
||
65 |
/* Called (if appropriate bit in callback mask is set) to decide how much |
|
66 |
* cargo a town building can accept. */ |
|
67 |
CBID_HOUSE_CARGO_ACCEPTANCE = 0x1F, // not yet implemented |
|
68 |
||
69 |
/* Called (if appropriate bit in callback mask is set) to indicate |
|
70 |
* how long the current animation frame should last. */ |
|
71 |
CBID_HOUSE_ANIMATION_SPEED = 0x20, |
|
72 |
||
73 |
/* Called (if appropriate bit in callback mask is set) periodically to |
|
74 |
* determine if a house should be destroyed. */ |
|
75 |
CBID_HOUSE_DESTRUCTION = 0x21, |
|
76 |
||
6307 | 77 |
/* Called to determine if the given industry type is available */ |
78 |
CBID_INDUSTRY_AVAILABLE = 0x22, // not yet implemented |
|
79 |
||
3650
92a3f5cae745
(svn r4561) - NewGRF: implement most of callback 0x23: additional text in vehicle purchase windows.
peter1138
parents:
3505
diff
changeset
|
80 |
/* 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
|
81 |
* 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
|
82 |
CBID_VEHICLE_ADDITIONAL_TEXT = 0x23, |
3754
04356ae401b4
(svn r4742) - Newstations: Add callbacks for building and drawing custom stations.
peter1138
parents:
3727
diff
changeset
|
83 |
|
04356ae401b4
(svn r4742) - Newstations: Add callbacks for building and drawing custom stations.
peter1138
parents:
3727
diff
changeset
|
84 |
/* 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
|
85 |
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
|
86 |
|
6307 | 87 |
/* Called for periodically starting or stopping the animation. */ |
88 |
CBID_INDTILE_ANIM_START_STOP = 0x25, // not yet implemented |
|
89 |
||
90 |
/* Called to determine industry tile next animation frame. */ |
|
91 |
CBID_INDTILE_ANIM_NEXT_FRAME = 0x26, // not yet implemented |
|
92 |
||
93 |
/* Called to indicate how long the current animation frame should last. */ |
|
94 |
CBID_INDTILE_ANIMATION_SPEED = 0x27, // not yet implemented |
|
95 |
||
96 |
/* Called to determine if the given industry can be built on specific area */ |
|
97 |
CBID_INDUSTRY_LOCATION = 0x28, // not yet implemented |
|
98 |
||
99 |
/* Called on production changes, so it can be adjusted */ |
|
100 |
CBID_INDUSTRY_PRODUCTION_CHANGE = 0x29, // not yet implemented |
|
101 |
||
6303 | 102 |
/* Called (if appropriate bit in callback mask is set) to determine which |
103 |
* cargoes a town building should accept. */ |
|
104 |
CBID_HOUSE_ACCEPT_CARGO = 0x2A, // not yet implemented |
|
105 |
||
6307 | 106 |
/* Called to query the cargo acceptance of the industry tile */ |
107 |
CBID_INDTILE_ACCEPT_CARGO = 0x2B, // not yet implemented |
|
108 |
||
109 |
/* Called to determine which cargoes an industry should accept. */ |
|
110 |
CBID_INDUSTRY_ACCEPT_CARGO = 0x2C, // not yet implemented |
|
111 |
||
5968
eecf6681445e
(svn r8211) -Codechange: (NewGRF) Implement callback 2D, explicit vehicle colour map
peter1138
parents:
5726
diff
changeset
|
112 |
/* 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
|
113 |
* instead of the default livery */ |
eecf6681445e
(svn r8211) -Codechange: (NewGRF) Implement callback 2D, explicit vehicle colour map
peter1138
parents:
5726
diff
changeset
|
114 |
CBID_VEHICLE_COLOUR_MAPPING = 0x2D, |
eecf6681445e
(svn r8211) -Codechange: (NewGRF) Implement callback 2D, explicit vehicle colour map
peter1138
parents:
5726
diff
changeset
|
115 |
|
6303 | 116 |
/* Called (if appropriate bit in callback mask is set) to determine how much |
117 |
* cargo a town building produces. */ |
|
118 |
CBID_HOUSE_PRODUCE_CARGO = 0x2E, // not yet implemented |
|
119 |
||
6307 | 120 |
/* Called to determine if the given industry tile can be built on specific tile */ |
121 |
CBID_INDTILE_SHAPE_CHECK = 0x2F, // not yet implemented |
|
122 |
||
123 |
/* Called to determine the type (if any) of foundation to draw for industry tile */ |
|
124 |
CBID_INDUSTRY_DRAW_FOUNDATIONS = 0x30, // not yet implemented |
|
125 |
||
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
|
126 |
/* 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
|
127 |
* 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
|
128 |
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
|
129 |
|
acffecd6f484
(svn r6532) - Feature: Add support for NewGRF sound effects. Currently sound priority isn't supported.
peter1138
parents:
4244
diff
changeset
|
130 |
/* 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
|
131 |
CBID_VEHICLE_SOUND_EFFECT = 0x33, |
6303 | 132 |
|
6307 | 133 |
/* Called monthly on production changes, so it can be adjusted more frequently */ |
134 |
CBID_INDUSTRY_MONTHLYPROD_CHANGE= 0x35, // not yet implemented |
|
135 |
||
6308 | 136 |
/* Called to modify various vehicle properties. Callback parameter 1 |
137 |
* specifies the property index, as used in Action 0, to change. */ |
|
138 |
CBID_VEHICLE_MODIFY_PROPERTY = 0x36, |
|
139 |
||
6307 | 140 |
/* Called to determine text to display after cargo name */ |
141 |
CBID_INDUSTRY_CARGO_SUFFIX = 0x37, // not yet implemented |
|
142 |
||
143 |
/* Called to determine more text in the fund industry window */ |
|
144 |
CBID_INDUSTRY_FUND_MORE_TEXT = 0x38, // not yet implemented |
|
145 |
||
6303 | 146 |
/* Called to calculate the income of delivered cargo */ |
147 |
CBID_CARGO_PROFIT_CALC = 0x39, |
|
148 |
||
6307 | 149 |
/* Called to determine more text in the industry window */ |
150 |
CBID_INDUSTRY_WINDOW_MORE_TEXT = 0x3A, // not yet implemented |
|
151 |
||
152 |
/* Called to determine industry special effects */ |
|
153 |
CBID_INDUSTRY_SPECIAL_EFFECT = 0x3B, // not yet implemented |
|
154 |
||
155 |
/* Called to determine if industry can alter the ground below industry tile */ |
|
156 |
CBID_INDUSTRY_AUTOSLOPE = 0x3C, // not yet implemented |
|
157 |
||
158 |
/* Called to determine if the industry can still accept or refuse more cargo arrival */ |
|
159 |
CBID_INDUSTRY_REFUSE_CARGO = 0x3D, // not yet implemented |
|
160 |
||
6303 | 161 |
/* Called (if appropriate bit in callback mask set) to determine whether a |
162 |
* town building can be destroyed. */ |
|
163 |
CBID_HOUSE_DENY_DESTRUCTION = 0x143, |
|
164 |
||
165 |
/* Called to calculate part of a station rating */ |
|
166 |
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
|
167 |
}; |
398f156479c8
(svn r2401) - Fix: [newgrf] Finish up callback mechanism, implement 'refit capacity' callback slightly more correct.
hackykid
parents:
1883
diff
changeset
|
168 |
|
3007
6f65203dc324
(svn r3587) - NewGRF: Rename Callback IDs to include their "class"
peter1138
parents:
2982
diff
changeset
|
169 |
/** |
6f65203dc324
(svn r3587) - NewGRF: Rename Callback IDs to include their "class"
peter1138
parents:
2982
diff
changeset
|
170 |
* 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
|
171 |
* 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
|
172 |
*/ |
6f65203dc324
(svn r3587) - NewGRF: Rename Callback IDs to include their "class"
peter1138
parents:
2982
diff
changeset
|
173 |
enum VehicleCallbackMask { |
6f65203dc324
(svn r3587) - NewGRF: Rename Callback IDs to include their "class"
peter1138
parents:
2982
diff
changeset
|
174 |
CBM_WAGON_POWER = 0, ///< Powered wagons (trains only) |
6f65203dc324
(svn r3587) - NewGRF: Rename Callback IDs to include their "class"
peter1138
parents:
2982
diff
changeset
|
175 |
CBM_VEHICLE_LENGTH = 1, ///< Vehicle length (trains only) |
6f65203dc324
(svn r3587) - NewGRF: Rename Callback IDs to include their "class"
peter1138
parents:
2982
diff
changeset
|
176 |
CBM_LOAD_AMOUNT = 2, ///< Load amount |
6f65203dc324
(svn r3587) - NewGRF: Rename Callback IDs to include their "class"
peter1138
parents:
2982
diff
changeset
|
177 |
CBM_REFIT_CAPACITY = 3, ///< Cargo capacity after refit |
6f65203dc324
(svn r3587) - NewGRF: Rename Callback IDs to include their "class"
peter1138
parents:
2982
diff
changeset
|
178 |
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
|
179 |
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
|
180 |
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
|
181 |
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
|
182 |
}; |
3b02000cfbe0
(svn r2389) - Feature: [newgrf] Implement the mechanism for handling newgrf callbacks.
hackykid
parents:
1802
diff
changeset
|
183 |
|
3007
6f65203dc324
(svn r3587) - NewGRF: Rename Callback IDs to include their "class"
peter1138
parents:
2982
diff
changeset
|
184 |
/** |
3505
e9a3a6b79561
(svn r4356) - NewGRF: Load more newstation properties.
peter1138
parents:
3007
diff
changeset
|
185 |
* Callback masks for stations. |
e9a3a6b79561
(svn r4356) - NewGRF: Load more newstation properties.
peter1138
parents:
3007
diff
changeset
|
186 |
*/ |
e9a3a6b79561
(svn r4356) - NewGRF: Load more newstation properties.
peter1138
parents:
3007
diff
changeset
|
187 |
enum StationCallbackMask { |
e9a3a6b79561
(svn r4356) - NewGRF: Load more newstation properties.
peter1138
parents:
3007
diff
changeset
|
188 |
CBM_STATION_AVAIL = 0, ///< Availability of station in construction window |
e9a3a6b79561
(svn r4356) - NewGRF: Load more newstation properties.
peter1138
parents:
3007
diff
changeset
|
189 |
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
|
190 |
}; |
e9a3a6b79561
(svn r4356) - NewGRF: Load more newstation properties.
peter1138
parents:
3007
diff
changeset
|
191 |
|
e9a3a6b79561
(svn r4356) - NewGRF: Load more newstation properties.
peter1138
parents:
3007
diff
changeset
|
192 |
/** |
6303 | 193 |
* Callback masks for houses. |
194 |
*/ |
|
195 |
enum HouseCallbackMask { |
|
196 |
CBM_HOUSE_ALLOW_CONSTRUCTION = 0, |
|
197 |
CBM_ANIMATION_NEXT_FRAME = 1, |
|
198 |
CBM_ANIMATION_START_STOP = 2, |
|
199 |
CBM_CONSTRUCTION_STATE_CHANGE = 3, |
|
200 |
CBM_BUILDING_COLOUR = 4, |
|
201 |
CBM_CARGO_ACCEPTANCE = 5, |
|
202 |
CBM_ANIMATION_SPEED = 6, |
|
203 |
CBM_HOUSE_DESTRUCTION = 7, |
|
204 |
CBM_HOUSE_ACCEPT_CARGO = 8, |
|
205 |
CBM_HOUSE_PRODUCE_CARGO = 9, |
|
206 |
CBM_HOUSE_DENY_DESTRUCTION = 10, |
|
207 |
}; |
|
208 |
||
209 |
/** |
|
210 |
* Callback masks for cargos. |
|
211 |
*/ |
|
212 |
enum CargoCallbackMask { |
|
213 |
CBM_CARGO_PROFIT_CALC = 0, |
|
214 |
CBM_CARGO_STATION_RATING_CALC = 1, |
|
215 |
}; |
|
216 |
||
217 |
/** |
|
6307 | 218 |
* Callback masks for Industries |
219 |
*/ |
|
220 |
enum IndustryCallbackMask { |
|
221 |
CBM_IND_AVAILABLE = 0, ///< industry availability callback |
|
222 |
CBM_IND_PRODUCTION_CARGO_ARRIVAL = 1, ///< call production callback when cargo arrives at the industry |
|
223 |
CBM_IND_PRODUCTION_256_TICKS = 2, ///< call production callback every 256 ticks |
|
224 |
CBM_IND_LOCATION = 3, ///< check industry construction on given area |
|
225 |
CBM_IND_PRODUCTION_CHANGE = 4, ///< controls random production change |
|
226 |
CBM_IND_MONTHLYPROD_CHANGE = 5, ///< controls monthly random production change |
|
227 |
CBM_IND_CARGO_SUFFIX = 6, ///< cargo sub-type display |
|
228 |
CBM_IND_FUND_MORE_TEXT = 7, ///< additional text in fund window |
|
229 |
CBM_IND_WINDOW_MORE_TEXT = 8, ///< additional text in industry window |
|
230 |
CBM_IND_SPECIAL_EFFECT = 9, ///< control special effects |
|
231 |
CBM_IND_REFUSE_CARGO = 10, ///< option out of accepting cargo |
|
232 |
}; |
|
233 |
||
234 |
/** |
|
235 |
* Callback masks for industry tiles |
|
236 |
*/ |
|
237 |
enum IndustryTileCallbackMask { |
|
238 |
CBM_INDT_ANIM_NEXT_FRAME = 0, ///< decides next animation frame |
|
239 |
CBM_INDT_ANIM_SPEED = 1, ///< decides animation speed |
|
240 |
CBM_INDT_ACCEPTANCE_CARGO = 2, ///< decides amount of cargo acceptance |
|
241 |
CBM_INDT_ACCEPT_CARGO = 3, ///< decides accepted types |
|
242 |
CBM_INDT_SHAPE_CHECK = 4, ///< decides slope suitability |
|
243 |
CBM_INDT_DRAW_FOUNDATIONS = 5, ///< decides if default foundations need to be drawn |
|
244 |
CBM_INDT_AUTOSLOPE = 6, ///< decides allowance of autosloping |
|
245 |
}; |
|
246 |
||
247 |
/** |
|
3007
6f65203dc324
(svn r3587) - NewGRF: Rename Callback IDs to include their "class"
peter1138
parents:
2982
diff
changeset
|
248 |
* Result of a failed callback. |
6f65203dc324
(svn r3587) - NewGRF: Rename Callback IDs to include their "class"
peter1138
parents:
2982
diff
changeset
|
249 |
*/ |
1883
3b02000cfbe0
(svn r2389) - Feature: [newgrf] Implement the mechanism for handling newgrf callbacks.
hackykid
parents:
1802
diff
changeset
|
250 |
enum { |
3b02000cfbe0
(svn r2389) - Feature: [newgrf] Implement the mechanism for handling newgrf callbacks.
hackykid
parents:
1802
diff
changeset
|
251 |
CALLBACK_FAILED = 0xFFFF |
3b02000cfbe0
(svn r2389) - Feature: [newgrf] Implement the mechanism for handling newgrf callbacks.
hackykid
parents:
1802
diff
changeset
|
252 |
}; |
3b02000cfbe0
(svn r2389) - Feature: [newgrf] Implement the mechanism for handling newgrf callbacks.
hackykid
parents:
1802
diff
changeset
|
253 |
|
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
|
254 |
#endif /* NEWGRF_CALLBACKS_H */ |