mirror of
https://github.com/scummvm/scummvm.git
synced 2026-06-20 05:45:29 +00:00
BACKENDS: ATARI: Move g_unalignedPitch check into OSystem::engineInit()
This commit is contained in:
@@ -43,7 +43,6 @@
|
||||
|
||||
#define SCREEN_ACTIVE
|
||||
|
||||
bool g_unalignedPitch = false;
|
||||
mspace g_mspace = nullptr;
|
||||
|
||||
static const Graphics::PixelFormat PIXELFORMAT_CLUT8 = Graphics::PixelFormat::createFormatCLUT8();
|
||||
@@ -473,7 +472,6 @@ OSystem::TransactionError AtariGraphicsManager::endGFXTransaction() {
|
||||
_pendingScreenChanges.queuePalette();
|
||||
|
||||
if (_overlayState == kOverlayIgnoredHide) {
|
||||
_checkUnalignedPitch = true;
|
||||
_overlayState = kOverlayHidden;
|
||||
_ignoreHideOverlay = false;
|
||||
_pendingScreenChanges.queueAll();
|
||||
@@ -602,36 +600,6 @@ void AtariGraphicsManager::updateScreen() {
|
||||
// avoid falling into the atari_debugger (screen may not not initialized yet)
|
||||
Common::setErrorHandler(nullptr);
|
||||
|
||||
if (_checkUnalignedPitch) {
|
||||
const Common::ConfigManager::Domain *activeDomain = ConfMan.getActiveDomain();
|
||||
if (activeDomain) {
|
||||
// FIXME: Some engines are too bound to linear surfaces that it is very
|
||||
// hard to repair them. So instead of polluting the engine with
|
||||
// Surface::init() & delete[] Surface::getPixels() just use this hack.
|
||||
const Common::String engineId = activeDomain->getValOrDefault("engineid");
|
||||
const Common::String gameId = activeDomain->getValOrDefault("gameid");
|
||||
|
||||
atari_debug("checking %s/%s", engineId.c_str(), gameId.c_str());
|
||||
|
||||
if (engineId == "composer"
|
||||
|| engineId == "hypno"
|
||||
|| engineId == "mohawk"
|
||||
|| engineId == "parallaction"
|
||||
|| engineId == "private"
|
||||
|| (engineId == "sci"
|
||||
&& (gameId == "phantasmagoria" || gameId == "shivers"))
|
||||
|| engineId == "sherlock"
|
||||
|| engineId == "teenagent"
|
||||
|| engineId == "tsage") {
|
||||
g_unalignedPitch = true;
|
||||
} else {
|
||||
g_unalignedPitch = false;
|
||||
}
|
||||
}
|
||||
|
||||
_checkUnalignedPitch = false;
|
||||
}
|
||||
|
||||
Screen *workScreen = nullptr;
|
||||
Graphics::Surface *srcSurface = nullptr;
|
||||
if (_overlayState == kOverlayVisible || _overlayState == kOverlayIgnoredHide) {
|
||||
|
||||
@@ -177,7 +177,6 @@ private:
|
||||
|
||||
bool _vgaMonitor = true;
|
||||
bool _tt = false;
|
||||
bool _checkUnalignedPitch = false;
|
||||
|
||||
struct GraphicsState {
|
||||
GraphicsState()
|
||||
|
||||
@@ -66,6 +66,8 @@
|
||||
*/
|
||||
#include "backends/fs/posix/posix-fs-factory.h"
|
||||
|
||||
bool g_unalignedPitch = false;
|
||||
|
||||
extern "C" void atari_kbdvec(void *);
|
||||
extern "C" void atari_mousevec(void *);
|
||||
typedef void (*KBDVEC)(void *);
|
||||
@@ -347,6 +349,34 @@ void OSystem_Atari::initBackend() {
|
||||
BaseBackend::initBackend();
|
||||
}
|
||||
|
||||
void OSystem_Atari::engineInit() {
|
||||
const Common::ConfigManager::Domain *activeDomain = ConfMan.getActiveDomain();
|
||||
if (activeDomain) {
|
||||
// FIXME: Some engines are too bound to linear surfaces that it is very
|
||||
// hard to repair them. So instead of polluting the engine with
|
||||
// Surface::init() & delete[] Surface::getPixels() just use this hack.
|
||||
const Common::String engineId = activeDomain->getValOrDefault("engineid");
|
||||
const Common::String gameId = activeDomain->getValOrDefault("gameid");
|
||||
|
||||
atari_debug("checking %s/%s", engineId.c_str(), gameId.c_str());
|
||||
|
||||
if (engineId == "composer"
|
||||
|| engineId == "hypno"
|
||||
|| engineId == "mohawk"
|
||||
|| engineId == "parallaction"
|
||||
|| engineId == "private"
|
||||
|| (engineId == "sci"
|
||||
&& (gameId == "phantasmagoria" || gameId == "shivers"))
|
||||
|| engineId == "sherlock"
|
||||
|| engineId == "teenagent"
|
||||
|| engineId == "tsage") {
|
||||
g_unalignedPitch = true;
|
||||
} else {
|
||||
g_unalignedPitch = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Common::MutexInternal *OSystem_Atari::createMutex() {
|
||||
return new NullMutexInternal();
|
||||
}
|
||||
|
||||
@@ -31,6 +31,8 @@ public:
|
||||
|
||||
void initBackend() override;
|
||||
|
||||
void engineInit() override;
|
||||
|
||||
Common::MutexInternal *createMutex() override;
|
||||
uint32 getMillis(bool skipRecord = false) override;
|
||||
void delayMillis(uint msecs) override;
|
||||
|
||||
@@ -84,8 +84,9 @@ void unlockSuperBlitter() {
|
||||
#endif
|
||||
}
|
||||
|
||||
// see atari-graphics.cpp
|
||||
// see osystem-atari.cpp
|
||||
extern bool g_unalignedPitch;
|
||||
// see atari-graphics.cpp
|
||||
extern mspace g_mspace;
|
||||
|
||||
namespace Graphics {
|
||||
|
||||
Reference in New Issue
Block a user