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