mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-03-12 18:40:29 +00:00
(svn r22504) -Codechange: Add EV_END and use it to check the lengths of _effect_init_procs and _effect_tick_procs.
This commit is contained in:
parent
1b34d22620
commit
7c21083227
@ -544,6 +544,7 @@ static EffectInitProc * const _effect_init_procs[] = {
|
|||||||
BulldozerInit, // EV_BULLDOZER
|
BulldozerInit, // EV_BULLDOZER
|
||||||
BubbleInit, // EV_BUBBLE
|
BubbleInit, // EV_BUBBLE
|
||||||
};
|
};
|
||||||
|
assert_compile(lengthof(_effect_init_procs) == EV_END);
|
||||||
|
|
||||||
/** Functions for controling effect vehicles at each tick. */
|
/** Functions for controling effect vehicles at each tick. */
|
||||||
static EffectTickProc * const _effect_tick_procs[] = {
|
static EffectTickProc * const _effect_tick_procs[] = {
|
||||||
@ -558,6 +559,7 @@ static EffectTickProc * const _effect_tick_procs[] = {
|
|||||||
BulldozerTick, // EV_BULLDOZER
|
BulldozerTick, // EV_BULLDOZER
|
||||||
BubbleTick, // EV_BUBBLE
|
BubbleTick, // EV_BUBBLE
|
||||||
};
|
};
|
||||||
|
assert_compile(lengthof(_effect_tick_procs) == EV_END);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -26,6 +26,7 @@ enum EffectVehicleType {
|
|||||||
EV_EXPLOSION_SMALL = 7, ///< Various explosions.
|
EV_EXPLOSION_SMALL = 7, ///< Various explosions.
|
||||||
EV_BULLDOZER = 8, ///< Bulldozer at roadworks.
|
EV_BULLDOZER = 8, ///< Bulldozer at roadworks.
|
||||||
EV_BUBBLE = 9, ///< Bubble of bubble generator (industry).
|
EV_BUBBLE = 9, ///< Bubble of bubble generator (industry).
|
||||||
|
EV_END
|
||||||
};
|
};
|
||||||
|
|
||||||
EffectVehicle *CreateEffectVehicle(int x, int y, int z, EffectVehicleType type);
|
EffectVehicle *CreateEffectVehicle(int x, int y, int z, EffectVehicleType type);
|
||||||
|
Loading…
Reference in New Issue
Block a user