[Scummvm-git-logs] scummvm master -> 606abe73c8e85cc09351de592e22da43c62d35e3
bluegr
noreply at scummvm.org
Sat Nov 19 11:55:33 UTC 2022
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:
606abe73c8 HADESCH: Remove reliance on zlib by using gzio implementation instead
Commit: 606abe73c8e85cc09351de592e22da43c62d35e3
https://github.com/scummvm/scummvm/commit/606abe73c8e85cc09351de592e22da43c62d35e3
Author: Vladimir Serbinenko (phcoder at gmail.com)
Date: 2022-11-19T13:55:28+02:00
Commit Message:
HADESCH: Remove reliance on zlib by using gzio implementation instead
Changed paths:
engines/hadesch/hadesch.cpp
diff --git a/engines/hadesch/hadesch.cpp b/engines/hadesch/hadesch.cpp
index b5e9f9cb3f6..483c5d397ad 100644
--- a/engines/hadesch/hadesch.cpp
+++ b/engines/hadesch/hadesch.cpp
@@ -31,7 +31,7 @@
#include "common/keyboard.h"
#include "common/macresman.h"
#include "common/util.h"
-#include "common/zlib.h"
+#include "common/gzio.h"
#include "common/config-manager.h"
#include "engines/advancedDetector.h"
@@ -129,8 +129,6 @@ void HadeschEngine::newGame() {
moveToRoom(kWallOfFameRoom);
}
-#if defined(USE_ZLIB)
-
struct WiseFile {
uint start;
uint end;
@@ -161,8 +159,8 @@ Common::MemoryReadStream *readWiseFile(Common::File &setupFile, const struct Wis
byte *uncompressedBuffer = new byte[wiseFile.uncompressedLength];
setupFile.seek(wiseFile.start);
setupFile.read(compressedBuffer, wiseFile.end - wiseFile.start - 4);
- if (!Common::inflateZlibHeaderless(uncompressedBuffer, wiseFile.uncompressedLength,
- compressedBuffer, wiseFile.end - wiseFile.start - 4)) {
+ if (Common::GzioReadStream::deflateDecompress(uncompressedBuffer, wiseFile.uncompressedLength,
+ compressedBuffer, wiseFile.end - wiseFile.start - 4) != wiseFile.uncompressedLength) {
debug("wise inflate failed");
delete[] compressedBuffer;
delete[] uncompressedBuffer;
@@ -172,7 +170,6 @@ Common::MemoryReadStream *readWiseFile(Common::File &setupFile, const struct Wis
delete[] compressedBuffer;
return new Common::MemoryReadStream(uncompressedBuffer, wiseFile.uncompressedLength);
}
-#endif
Common::ErrorCode HadeschEngine::loadWindowsCursors(const Common::ScopedPtr<Common::PEResources>& exe) {
for (unsigned i = 0; i < ARRAYSIZE(cursorids); i++) {
@@ -231,7 +228,6 @@ Common::ErrorCode HadeschEngine::loadCursors() {
return Common::kNoError;
}
-#if defined(USE_ZLIB)
Common::File setupFile;
if (setupFile.open("Setup.exe")) {
uint len = setupFile.size();
@@ -260,7 +256,6 @@ Common::ErrorCode HadeschEngine::loadCursors() {
}
}
}
-#endif
debug("Cannot open hadesch.exe");
return Common::kUnsupportedGameidError;
More information about the Scummvm-git-logs
mailing list