From ec1dd0bf618f2c4fe17c62db9eec3b5e056574a0 Mon Sep 17 00:00:00 2001 From: Patric Stout Date: Sat, 20 Feb 2021 11:15:15 +0100 Subject: 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. --- src/video/allegro_v.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/video/allegro_v.cpp') 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(); } -- cgit v1.2.3-54-g00ecf