aboutsummaryrefslogtreecommitdiff
path: root/engines/hopkins/graphics.cpp
diff options
context:
space:
mode:
authorStrangerke2013-01-05 13:10:58 +0100
committerStrangerke2013-01-05 13:10:58 +0100
commitc9f342f4ce3fd3f1e400d1a9ea35b2e1868119e4 (patch)
tree35e08efe56342f9c99c0109e3d3414ed85eb8f78 /engines/hopkins/graphics.cpp
parent907d705c1e725e5df0a7a4b378d0c237f1df2961 (diff)
downloadscummvm-rg350-c9f342f4ce3fd3f1e400d1a9ea35b2e1868119e4.tar.gz
scummvm-rg350-c9f342f4ce3fd3f1e400d1a9ea35b2e1868119e4.tar.bz2
scummvm-rg350-c9f342f4ce3fd3f1e400d1a9ea35b2e1868119e4.zip
HOPKINS: Remove 8b CopyAsm, rename the 16b one
Diffstat (limited to 'engines/hopkins/graphics.cpp')
-rw-r--r--engines/hopkins/graphics.cpp46
1 files changed, 7 insertions, 39 deletions
diff --git a/engines/hopkins/graphics.cpp b/engines/hopkins/graphics.cpp
index 8521e3bf53..5e45098998 100644
--- a/engines/hopkins/graphics.cpp
+++ b/engines/hopkins/graphics.cpp
@@ -170,7 +170,7 @@ void GraphicsManager::loadVgaImage(const Common::String &file) {
max_x = 320;
lockScreen();
- CopyAsm16(_vesaBuffer);
+ copy16bToSurfaceScaleX2(_vesaBuffer);
unlockScreen();
fadeInBreakout();
@@ -683,7 +683,7 @@ void GraphicsManager::fadeOutDefaultLength(const byte *surface) {
void GraphicsManager::fadeInBreakout() {
setpal_vga256(_palette);
lockScreen();
- CopyAsm16(_vesaBuffer);
+ copy16bToSurfaceScaleX2(_vesaBuffer);
unlockScreen();
DD_VBL();
}
@@ -698,7 +698,7 @@ void GraphicsManager::fateOutBreakout() {
setpal_vga256(palette);
lockScreen();
- CopyAsm16(_vesaBuffer);
+ copy16bToSurfaceScaleX2(_vesaBuffer);
unlockScreen();
DD_VBL();
}
@@ -1202,42 +1202,10 @@ void GraphicsManager::AFFICHE_SPEEDVGA(const byte *objectData, int xp, int yp, i
addVesaSegment(xp, yp, xp + width, yp + height);
}
-void GraphicsManager::CopyAsm(const byte *surface) {
- const byte *srcP;
- byte srcByte;
- byte *destP;
- byte *dest1P;
- byte *dest2P;
- byte *dest3P;
- byte *destPitch;
- const byte *srcPitch;
-
- assert(_videoPtr);
- srcP = surface;
- srcByte = 30 * WinScan;
- destP = (byte *)_videoPtr->pixels + 30 * WinScan;
- for (int yCtr = 200; yCtr != 0; yCtr--) {
- srcPitch = srcP;
- destPitch = destP;
- for (int xCtr = 320; xCtr != 0; xCtr--) {
- srcByte = *srcP;
- *destP = *srcP;
- dest1P = WinScan + destP;
- *dest1P = srcByte;
- dest2P = dest1P - WinScan + 1;
- *dest2P = srcByte;
- dest3P = WinScan + dest2P;
- *dest3P = srcByte;
- destP = dest3P - WinScan + 1;
- ++srcP;
- }
-
- srcP = srcPitch + 320;
- destP = WinScan + WinScan + destPitch;
- }
-}
-
-void GraphicsManager::CopyAsm16(const byte *surface) {
+/**
+ * Copy to surface to video buffer, scale 2x.
+ */
+void GraphicsManager::copy16bToSurfaceScaleX2(const byte *surface) {
const byte *v1;
byte *v2;
byte *v6;