aboutsummaryrefslogtreecommitdiff
path: root/engines/agos/vga_ww.cpp
diff options
context:
space:
mode:
authorTravis Howell2007-06-21 03:14:20 +0000
committerTravis Howell2007-06-21 03:14:20 +0000
commit89b2cf75e22fd76b48e9e27d70ba617d5b2468b6 (patch)
tree2acc580f2cac44a4524003665387a9f0b5484185 /engines/agos/vga_ww.cpp
parent3f5eb0f976e3e6cf0d8e4306ffd3767759eb707f (diff)
downloadscummvm-rg350-89b2cf75e22fd76b48e9e27d70ba617d5b2468b6.tar.gz
scummvm-rg350-89b2cf75e22fd76b48e9e27d70ba617d5b2468b6.tar.bz2
scummvm-rg350-89b2cf75e22fd76b48e9e27d70ba617d5b2468b6.zip
Use frameBuffer directly, in order to drop extra buffer (frontBuffer) and cleanup code.
svn-id: r27577
Diffstat (limited to 'engines/agos/vga_ww.cpp')
-rw-r--r--engines/agos/vga_ww.cpp18
1 files changed, 13 insertions, 5 deletions
diff --git a/engines/agos/vga_ww.cpp b/engines/agos/vga_ww.cpp
index 09b51ecfe1..a14129cc72 100644
--- a/engines/agos/vga_ww.cpp
+++ b/engines/agos/vga_ww.cpp
@@ -31,6 +31,8 @@
#include "common/system.h"
+#include "graphics/surface.h"
+
namespace AGOS {
void AGOSEngine_Waxworks::setupVideoOpcodes(VgaOpcodeProc *op) {
@@ -139,13 +141,15 @@ void AGOSEngine::vc61() {
byte *src, *dst, *dstPtr;
uint h, tmp;
+ Graphics::Surface *screen = _system->lockScreen();
+
if (a == 6) {
src = _curVgaFile2 + 800;
- dstPtr = getFrontBuf();
+ dstPtr = (byte *)screen->pixels;
memcpy(dstPtr, src, 64000);
tmp = 4 - 1;
} else {
- dstPtr = getFrontBuf();
+ dstPtr = (byte *)screen->pixels;
tmp = a - 1;
}
@@ -164,8 +168,10 @@ void AGOSEngine::vc61() {
dst += _screenWidth;
}
- if (a != 6)
+ if (a != 6) {
+ _system->unlockScreen();
return;
+ }
src = _curVgaFile2 + 9984 * 16 + 15344;
}
@@ -177,6 +183,8 @@ void AGOSEngine::vc61() {
dst += _screenWidth;
}
+ _system->unlockScreen();
+
if (a == 6) {
//fullFade();
src = _curVgaFile2 + 32;
@@ -229,10 +237,10 @@ void AGOSEngine::vc62_fastFadeOut() {
if (getGameType() == GType_FF || getGameType() == GType_PP) {
clearSurfaces(_screenHeight);
} else if (getGameType() == GType_WW) {
- memset(getFrontBuf(), 0, _screenWidth * _screenHeight);
+ _system->clearScreen();
} else {
if (_windowNum != 4) {
- memset(getFrontBuf(), 0, _screenWidth * _screenHeight);
+ _system->clearScreen();
}
}
}