Revert: 4c59dfb6
, move DoPaletteAnimations back into GameLoop
Race fix to follow
This commit is contained in:
@@ -1279,11 +1279,6 @@ void DoPaletteAnimations()
|
||||
}
|
||||
}
|
||||
|
||||
void GameLoopPaletteAnimations()
|
||||
{
|
||||
if (!_pause_mode && HasBit(_display_opt, DO_FULL_ANIMATION)) DoPaletteAnimations();
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine a contrasty text colour for a coloured background.
|
||||
* @param background Background colour.
|
||||
|
@@ -44,7 +44,6 @@
|
||||
#include "string_type.h"
|
||||
|
||||
void GameLoop();
|
||||
void GameLoopPaletteAnimations();
|
||||
|
||||
void CreateConsole();
|
||||
|
||||
|
@@ -94,6 +94,7 @@
|
||||
|
||||
void CallLandscapeTick();
|
||||
void IncreaseDate();
|
||||
void DoPaletteAnimations();
|
||||
void MusicLoop();
|
||||
void ResetMusic();
|
||||
void CallWindowGameTickEvent();
|
||||
@@ -1970,6 +1971,8 @@ void GameLoop()
|
||||
StateGameLoop();
|
||||
}
|
||||
|
||||
if (!_pause_mode && HasBit(_display_opt, DO_FULL_ANIMATION)) DoPaletteAnimations();
|
||||
|
||||
SoundDriver::GetInstance()->MainLoop();
|
||||
MusicLoop();
|
||||
}
|
||||
|
@@ -51,14 +51,12 @@ void VideoDriver_Null::MainLoop()
|
||||
if (this->until_exit) {
|
||||
while (!_exit_game) {
|
||||
::GameLoop();
|
||||
::GameLoopPaletteAnimations();
|
||||
::InputLoop();
|
||||
::UpdateWindows();
|
||||
}
|
||||
} else {
|
||||
for (int i = 0; i < this->ticks; i++) {
|
||||
::GameLoop();
|
||||
::GameLoopPaletteAnimations();
|
||||
::InputLoop();
|
||||
::UpdateWindows();
|
||||
}
|
||||
|
@@ -34,10 +34,6 @@ void VideoDriver::GameLoop()
|
||||
std::lock_guard<std::mutex> lock(this->game_state_mutex);
|
||||
|
||||
::GameLoop();
|
||||
|
||||
// TODO: lock
|
||||
::GameLoopPaletteAnimations();
|
||||
// TODO: unlock
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user