@@ -28,25 +28,25 @@ struct TextEffect : public ViewportSign
uint8 duration; ///< How long the text effect should stay, in ticks (applies only when mode == TE_RISING)
TextEffectMode mode; ///< Type of text effect
/** Reset the text effect */
void Reset()
{
this->MarkDirty();
this->width_normal = 0;
this->string_id = INVALID_STRING_ID;
}
};
static SmallVector<struct TextEffect, 32> _text_effects; ///< Text effects are stored there
static std::vector<struct TextEffect> _text_effects; ///< Text effects are stored there
/* Text Effects */
TextEffectID AddTextEffect(StringID msg, int center, int y, uint8 duration, TextEffectMode mode)
if (_game_mode == GM_MENU) return INVALID_TE_ID;
TextEffectID i;
for (i = 0; i < _text_effects.size(); i++) {
if (_text_effects[i].string_id == INVALID_STRING_ID) break;
if (i == _text_effects.size()) _text_effects.emplace_back();