[Scummvm-git-logs] scummvm master -> c1913a29ace98e27b59b3d5c2b6a808d5666dfa0
sdelamarre
noreply at scummvm.org
Wed May 3 22:00:22 UTC 2023
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:
c1913a29ac GOB: one Adibou1 version must be marked explicitly as using 16 colors
Commit: c1913a29ace98e27b59b3d5c2b6a808d5666dfa0
https://github.com/scummvm/scummvm/commit/c1913a29ace98e27b59b3d5c2b6a808d5666dfa0
Author: Simon Delamarre (simon.delamarre14 at gmail.com)
Date: 2023-05-03T23:59:35+02:00
Commit Message:
GOB: one Adibou1 version must be marked explicitly as using 16 colors
Exception to the usual rules based on platform and video mode, that would have classified it as 256 colors (see initVideo).
That version was previously abusively marked "EGA" as a workaround to this issue.
Changed paths:
engines/gob/detection/detection.h
engines/gob/detection/tables_adibou1.h
engines/gob/gob.cpp
engines/gob/gob.h
engines/gob/init_v2.cpp
diff --git a/engines/gob/detection/detection.h b/engines/gob/detection/detection.h
index c628eb98831..79225dcb1f0 100644
--- a/engines/gob/detection/detection.h
+++ b/engines/gob/detection/detection.h
@@ -66,7 +66,8 @@ enum Features {
kFeaturesBATDemo = 1 << 4,
kFeatures640x480 = 1 << 5,
kFeatures800x600 = 1 << 6,
- kFeaturesTrueColor = 1 << 7
+ kFeaturesTrueColor = 1 << 7,
+ kFeatures16Colors = 1 << 8
};
enum AdditionalGameFlags {
diff --git a/engines/gob/detection/tables_adibou1.h b/engines/gob/detection/tables_adibou1.h
index 8ff868a8d3d..2e4cdd30add 100644
--- a/engines/gob/detection/tables_adibou1.h
+++ b/engines/gob/detection/tables_adibou1.h
@@ -52,7 +52,7 @@
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
kGameTypeAdibou1,
- kFeaturesAdLib | kFeaturesEGA,
+ kFeaturesAdLib | kFeatures16Colors,
0, "base.tot", 0
},
diff --git a/engines/gob/gob.cpp b/engines/gob/gob.cpp
index 0fe5feba76c..91d22399def 100644
--- a/engines/gob/gob.cpp
+++ b/engines/gob/gob.cpp
@@ -221,6 +221,10 @@ bool GobEngine::is800x600() const {
return (_features & kFeatures800x600) != 0;
}
+bool GobEngine::is16Colors() const {
+ return (_features & kFeatures16Colors) != 0;
+}
+
bool GobEngine::isTrueColor() const {
return (_features & kFeaturesTrueColor) != 0;
}
diff --git a/engines/gob/gob.h b/engines/gob/gob.h
index 3244ce14f1c..b84d177c169 100644
--- a/engines/gob/gob.h
+++ b/engines/gob/gob.h
@@ -206,6 +206,7 @@ public:
bool isBATDemo() const;
bool is640x480() const;
bool is800x600() const;
+ bool is16Colors() const;
bool isTrueColor() const;
bool isDemo() const;
diff --git a/engines/gob/init_v2.cpp b/engines/gob/init_v2.cpp
index 4fe66f48f40..88e66e02c87 100644
--- a/engines/gob/init_v2.cpp
+++ b/engines/gob/init_v2.cpp
@@ -46,11 +46,12 @@ void Init_v2::initVideo() {
_vm->_global->_colorCount = 16;
if (!_vm->isEGA() &&
- ((_vm->getPlatform() == Common::kPlatformDOS) ||
- (_vm->getPlatform() == Common::kPlatformMacintosh) ||
- (_vm->getPlatform() == Common::kPlatformWindows)) &&
- ((_vm->_global->_videoMode == 0x13) ||
- (_vm->_global->_videoMode == 0x14)))
+ !_vm->is16Colors() &&
+ ((_vm->getPlatform() == Common::kPlatformDOS) ||
+ (_vm->getPlatform() == Common::kPlatformMacintosh) ||
+ (_vm->getPlatform() == Common::kPlatformWindows)) &&
+ ((_vm->_global->_videoMode == 0x13) ||
+ (_vm->_global->_videoMode == 0x14)))
_vm->_global->_colorCount = 256;
_vm->_global->_pPaletteDesc = &_vm->_global->_paletteStruct;
More information about the Scummvm-git-logs
mailing list