aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorStrangerke2013-04-10 13:03:53 +0200
committerStrangerke2013-04-10 13:03:53 +0200
commit9149f363a6abd493550ae13aa12aa087c668bba3 (patch)
tree2471b4cc6a7b27e2ebb9c3f4b6608910adfa6844 /engines
parentbccb460e36120d3555684ef13b23e00a367a8eb7 (diff)
downloadscummvm-rg350-9149f363a6abd493550ae13aa12aa087c668bba3.tar.gz
scummvm-rg350-9149f363a6abd493550ae13aa12aa087c668bba3.tar.bz2
scummvm-rg350-9149f363a6abd493550ae13aa12aa087c668bba3.zip
HOPKINS: Finish lock/unlockScreen() cleanup. Set them as private.
Diffstat (limited to 'engines')
-rw-r--r--engines/hopkins/anim.cpp6
-rw-r--r--engines/hopkins/graphics.cpp2
-rw-r--r--engines/hopkins/graphics.h5
3 files changed, 5 insertions, 8 deletions
diff --git a/engines/hopkins/anim.cpp b/engines/hopkins/anim.cpp
index 43b75521e7..95384ebe2d 100644
--- a/engines/hopkins/anim.cpp
+++ b/engines/hopkins/anim.cpp
@@ -632,10 +632,8 @@ void AnimationManager::playSequence(const Common::String &file, uint32 rate1, ui
break;
_vm->_events->_rateCounter = 0;
- _vm->_graphicsMan->lockScreen();
if (*screenP != kByteStop)
_vm->_graphicsMan->copyVideoVbe16a(screenP);
- _vm->_graphicsMan->unlockScreen();
_vm->_graphicsMan->addRefreshRect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT);
_vm->_graphicsMan->updateScreen();
@@ -697,9 +695,7 @@ void AnimationManager::playSequence2(const Common::String &file, uint32 rate1, u
if (skipSeqFl) {
_vm->_graphicsMan->setPaletteVGA256(_vm->_graphicsMan->_palette);
} else {
- _vm->_graphicsMan->lockScreen();
_vm->_graphicsMan->setPaletteVGA256(_vm->_graphicsMan->_palette);
- _vm->_graphicsMan->unlockScreen();
_vm->_graphicsMan->copy16BitRect(screenP, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0);
_vm->_graphicsMan->addRefreshRect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT);
@@ -739,10 +735,8 @@ void AnimationManager::playSequence2(const Common::String &file, uint32 rate1, u
}
_vm->_events->_rateCounter = 0;
- _vm->_graphicsMan->lockScreen();
if (*screenP != kByteStop)
_vm->_graphicsMan->copyVideoVbe16a(screenP);
- _vm->_graphicsMan->unlockScreen();
_vm->_graphicsMan->addRefreshRect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT);
_vm->_graphicsMan->updateScreen();
diff --git a/engines/hopkins/graphics.cpp b/engines/hopkins/graphics.cpp
index 2a29b351b6..b58c2c3544 100644
--- a/engines/hopkins/graphics.cpp
+++ b/engines/hopkins/graphics.cpp
@@ -801,6 +801,7 @@ void GraphicsManager::copyVideoVbe16a(const byte *srcData) {
int destOffset = 0;
const byte *srcP = srcData;
+ lockScreen();
for (;;) {
srcByte = srcP[0];
if (srcByte == kByteStop)
@@ -825,6 +826,7 @@ void GraphicsManager::copyVideoVbe16a(const byte *srcData) {
++srcP;
++destOffset;
}
+ unlockScreen();
}
void GraphicsManager::copySurfaceRect(const byte *srcSurface, byte *destSurface, int xs, int ys, int width, int height) {
diff --git a/engines/hopkins/graphics.h b/engines/hopkins/graphics.h
index 23b7d4338f..25a8197817 100644
--- a/engines/hopkins/graphics.h
+++ b/engines/hopkins/graphics.h
@@ -83,6 +83,9 @@ private:
void translateSurface(byte *destP, const byte *srcP, int count, int minThreshold, int maxThreshold);
void copy8BitRect(const byte *surface, int xp, int yp, int width, int height, int destX, int destY);
+
+ void lockScreen();
+ void unlockScreen();
public:
byte _colorTable[PALETTE_EXT_BLOCK_SIZE];
byte _palette[PALETTE_EXT_BLOCK_SIZE];
@@ -121,8 +124,6 @@ public:
GraphicsManager(HopkinsEngine *vm);
~GraphicsManager();
- void lockScreen();
- void unlockScreen();
void clearPalette();
void clearScreen();
void clearVesaScreen();