diff options
author | Strangerke | 2013-01-06 11:33:12 +0100 |
---|---|---|
committer | Strangerke | 2013-01-06 11:33:12 +0100 |
commit | 117d99f22b5d90b411055b0657036f2932e6ff82 (patch) | |
tree | 8a5bff8dc2c3f5886456754dc0ee49983edc2e56 /engines/hopkins | |
parent | 2e331ee630d941d0a3625c7a497900598b1854b7 (diff) | |
download | scummvm-rg350-117d99f22b5d90b411055b0657036f2932e6ff82.tar.gz scummvm-rg350-117d99f22b5d90b411055b0657036f2932e6ff82.tar.bz2 scummvm-rg350-117d99f22b5d90b411055b0657036f2932e6ff82.zip |
HOPKINS: Remove a GOTO in Copy_WinScan_Vbe
Diffstat (limited to 'engines/hopkins')
-rw-r--r-- | engines/hopkins/graphics.cpp | 29 |
1 files changed, 14 insertions, 15 deletions
diff --git a/engines/hopkins/graphics.cpp b/engines/hopkins/graphics.cpp index 3820dbb5c1..03617fc08f 100644 --- a/engines/hopkins/graphics.cpp +++ b/engines/hopkins/graphics.cpp @@ -1856,24 +1856,23 @@ void GraphicsManager::Copy_WinScan_Vbe(const byte *src, byte *dest) { srcPtr = src; for (;;) { byteVal = *srcPtr; - if (*srcPtr < kByteStop) - goto Video_Cont_wVbe; if (byteVal == kByteStop) return; - if (byteVal == k8bVal) { - destOffset += srcPtr[1]; - byteVal = srcPtr[2]; - srcPtr += 2; - } else if (byteVal == k16bVal) { - destOffset += READ_LE_UINT16(srcPtr + 1); - byteVal = srcPtr[3]; - srcPtr += 3; - } else { - destOffset += READ_LE_UINT32(srcPtr + 1); - byteVal = srcPtr[5]; - srcPtr += 5; + if (*srcPtr > kByteStop) { + if (byteVal == k8bVal) { + destOffset += srcPtr[1]; + byteVal = srcPtr[2]; + srcPtr += 2; + } else if (byteVal == k16bVal) { + destOffset += READ_LE_UINT16(srcPtr + 1); + byteVal = srcPtr[3]; + srcPtr += 3; + } else { + destOffset += READ_LE_UINT32(srcPtr + 1); + byteVal = srcPtr[5]; + srcPtr += 5; + } } -Video_Cont_wVbe: dest[destOffset] = byteVal; ++srcPtr; ++destOffset; |