Change: Use GUITimer class instead of bare int/uints.

This commit is contained in:
Peter Nelson
2018-05-20 09:58:36 +01:00
committed by PeterN
parent 59fe4f28c8
commit 806e7d25dd
17 changed files with 140 additions and 85 deletions

View File

@@ -16,7 +16,7 @@
#include "core/smallvec_type.hpp"
#include "viewport_func.h"
#include "settings_type.h"
#include "window_func.h"
#include "guitimer_func.h"
#include "safeguards.h"
@@ -85,8 +85,8 @@ void RemoveTextEffect(TextEffectID te_id)
void MoveAllTextEffects(uint delta_ms)
{
static uint texteffecttimer = 0;
uint count = CountIntervalElapsed(texteffecttimer, delta_ms, MILLISECONDS_PER_TICK);
static GUITimer texteffecttimer = GUITimer(MILLISECONDS_PER_TICK);
uint count = texteffecttimer.CountElapsed(delta_ms);
if (count == 0) return;
const TextEffect *end = _text_effects.End();