diff options
author | Paul Gilbert | 2012-10-13 16:41:51 +1100 |
---|---|---|
committer | Paul Gilbert | 2012-10-13 16:41:51 +1100 |
commit | cde057a5828ed0e4136436dd2c8628c2141e173f (patch) | |
tree | ac0ad9468216fe9d4be4d08ba8e8f40094e85f1b /engines/hopkins | |
parent | f2556a4caa517849e66e0f42f2da081d485a5f9b (diff) | |
download | scummvm-rg350-cde057a5828ed0e4136436dd2c8628c2141e173f.tar.gz scummvm-rg350-cde057a5828ed0e4136436dd2c8628c2141e173f.tar.bz2 scummvm-rg350-cde057a5828ed0e4136436dd2c8628c2141e173f.zip |
HOPKINS: Some cleanup to the video frame display and fading methods
Diffstat (limited to 'engines/hopkins')
-rw-r--r-- | engines/hopkins/graphics.cpp | 21 | ||||
-rw-r--r-- | engines/hopkins/graphics.h | 2 |
2 files changed, 12 insertions, 11 deletions
diff --git a/engines/hopkins/graphics.cpp b/engines/hopkins/graphics.cpp index 94dee59aac..c19ad05540 100644 --- a/engines/hopkins/graphics.cpp +++ b/engines/hopkins/graphics.cpp @@ -1051,15 +1051,17 @@ void GraphicsManager::DD_VBL() { } void GraphicsManager::FADE_OUTW_LINUX(const byte *surface) { + assert(surface); fade_out(Palette, FADESPD, surface); } void GraphicsManager::FADE_INW_LINUX(const byte *surface) { - return fade_in(Palette, FADESPD, surface); + assert(surface); + fade_in(Palette, FADESPD, surface); } -void GraphicsManager::Copy_WinScan_Vbe3(const byte *sourceSurface, byte *destSurface) { - int result; +void GraphicsManager::Copy_WinScan_Vbe3(const byte *srcData, byte *destSurface) { + byte v; int v3; int v4; const byte *v5; @@ -1071,10 +1073,9 @@ void GraphicsManager::Copy_WinScan_Vbe3(const byte *sourceSurface, byte *destSur unsigned int v11; byte *v12; - result = 0; v3 = 0; v4 = 0; - v5 = sourceSurface; + v5 = srcData; for (;;) { v6 = *v5; if (*v5 < 222) @@ -1091,7 +1092,7 @@ void GraphicsManager::Copy_WinScan_Vbe3(const byte *sourceSurface, byte *destSur v6 = *(v5 + 2); v5 += 2; } else if (v6 == 254) { - v3 += (int16)READ_LE_UINT16(v5 + 1); + v3 += READ_LE_UINT16(v5 + 1); v6 = *(v5 + 3); v5 += 3; } else { @@ -1105,19 +1106,19 @@ Video_Cont3_wVbe: if (v6 == 211) { v7 = v4; v8 = *(v5 + 1); - result = *(v5 + 2); + v = *(v5 + 2); v9 = v3 + destSurface; v3 += v8; - memset(v9, result, v8); + memset(v9, v, v8); v5 += 3; v4 = v7; } else { v10 = v4; v11 = *v5 + 45; - result = *(v5 + 1); + v = *(v5 + 1); v12 = v3 + destSurface; v3 += v11; - memset(v12, result, v11); + memset(v12, v, v11); v5 += 2; v4 = v10; } diff --git a/engines/hopkins/graphics.h b/engines/hopkins/graphics.h index 5be407ce46..b826058af4 100644 --- a/engines/hopkins/graphics.h +++ b/engines/hopkins/graphics.h @@ -144,7 +144,7 @@ public: void CHANGE_PALETTE(const byte *palette); uint16 MapRGB(byte r, byte g, byte b); void DD_VBL(); - void Copy_WinScan_Vbe3(const byte *sourceSurface, byte *destSurface); + void Copy_WinScan_Vbe3(const byte *srcData, byte *destSurface); void Copy_Video_Vbe3(const byte *srcData); void Copy_Video_Vbe16(const byte *srcData); void Copy_Video_Vbe16a(const byte *srcData); |