summaryrefslogtreecommitdiff
path: root/src/video/allegro_v.cpp
diff options
context:
space:
mode:
authorPatric Stout <truebrain@openttd.org>2021-02-20 11:15:15 +0100
committerPatric Stout <github@truebrain.nl>2021-02-20 17:08:44 +0100
commitec1dd0bf618f2c4fe17c62db9eec3b5e056574a0 (patch)
tree07ccc0fcb66cc6f73b01fc9e0cf1b29f6b82e7cb /src/video/allegro_v.cpp
parent790fa7102ec934544b427dd5fa9fc4f7099fd4da (diff)
downloadopenttd-ec1dd0bf618f2c4fe17c62db9eec3b5e056574a0.tar.xz
Codechange: be consistent in what CheckPaletteAnim() does and when it is called
Additionally, make sure this is a class method. Later commits will make use of this.
Diffstat (limited to 'src/video/allegro_v.cpp')
-rw-r--r--src/video/allegro_v.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/video/allegro_v.cpp b/src/video/allegro_v.cpp
index 9b5b2e1d9..883e1f72e 100644
--- a/src/video/allegro_v.cpp
+++ b/src/video/allegro_v.cpp
@@ -95,7 +95,7 @@ static void InitPalette()
UpdatePalette(0, 256);
}
-static void CheckPaletteAnim()
+void VideoDriver_Allegro::CheckPaletteAnim()
{
if (_cur_palette.count_dirty != 0) {
Blitter *blitter = BlitterFactory::GetCurrentBlitter();
@@ -484,8 +484,6 @@ void VideoDriver_Allegro::MainLoop()
auto next_game_tick = cur_ticks;
auto next_draw_tick = cur_ticks;
- CheckPaletteAnim();
-
for (;;) {
InteractiveRandom(); // randomness
@@ -522,7 +520,7 @@ void VideoDriver_Allegro::MainLoop()
this->InputLoop();
::InputLoop();
UpdateWindows();
- CheckPaletteAnim();
+ this->CheckPaletteAnim();
this->Paint();
}