[Scummvm-git-logs] scummvm master -> 95abc65d04f2ae3e52aaf42b8bded9b762abcadd
neuromancer
noreply at scummvm.org
Sun Sep 29 10:25:01 UTC 2024
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
95abc65d04 FREESCAPE: Fix RLE decoding
Commit: 95abc65d04f2ae3e52aaf42b8bded9b762abcadd
https://github.com/scummvm/scummvm/commit/95abc65d04f2ae3e52aaf42b8bded9b762abcadd
Author: Steven Don (shd at earthling.net)
Date: 2024-09-29T12:24:58+02:00
Commit Message:
FREESCAPE: Fix RLE decoding
Simplified binary image RLE decoding, thereby implementing missing codes. This
also allows decoding the bitmaps for Hercules display mode. Hercules images are
encoded using the same scheme, but at 720x348 resolution.
Changed paths:
engines/freescape/loaders/8bitImage.cpp
diff --git a/engines/freescape/loaders/8bitImage.cpp b/engines/freescape/loaders/8bitImage.cpp
index f5f28d79cd4..53875ee05c8 100644
--- a/engines/freescape/loaders/8bitImage.cpp
+++ b/engines/freescape/loaders/8bitImage.cpp
@@ -52,21 +52,13 @@ int FreescapeEngine::execute8bitBinImageMultiCommand(Common::SeekableReadStream
int FreescapeEngine::execute8bitBinImageCommand(Common::SeekableReadStream *file, Graphics::ManagedSurface *surface, int row, int column, int bit) {
int code = file->readByte();
- if (code >= 0xD0) {
- int count;
- if (code >= 0xF0) {
- count = 17 - (code & 0x0F);
- } else if (code >= 0xE0) {
- count = 33 - (code & 0x0F);
- } else {
- count = 34 + (0xDF - code);
- }
+ if (code >= 0x80) {
+ int count = 257 - code;
return execute8bitBinImageSingleCommand(file, surface, row, column, bit, count);
- } else if ((code & 0x80) == 0) {
+ } else {
int count = code + 1;
return execute8bitBinImageMultiCommand(file, surface, row, column, bit, count);
}
- error("Unknown code %d", code);
}
void FreescapeEngine::load8bitBinImageRowIteration(Common::SeekableReadStream *file, Graphics::ManagedSurface *surface, int row, int bit) {
More information about the Scummvm-git-logs
mailing list