[Scummvm-git-logs] scummvm master -> b19fb671d6080de4e10457bb97335bbeac09c02a
dreammaster
paulfgilbert at gmail.com
Fri Sep 27 03:19:16 CEST 2019
This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
6175aac187 GLK: ADRIFT: ADRIFT 5 games aren't supported
b19fb671d6 GLK: ADRIFT: Move subengine out of release build exclusions
Commit: 6175aac187ad76a6e6b97361ad2df5388e691009
https://github.com/scummvm/scummvm/commit/6175aac187ad76a6e6b97361ad2df5388e691009
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2019-09-26T18:15:38-07:00
Commit Message:
GLK: ADRIFT: ADRIFT 5 games aren't supported
Changed paths:
engines/glk/adrift/scprotos.h
engines/glk/adrift/sctaffil.cpp
engines/glk/adrift/scutils.cpp
diff --git a/engines/glk/adrift/scprotos.h b/engines/glk/adrift/scprotos.h
index 39fba6b..6fd383c 100644
--- a/engines/glk/adrift/scprotos.h
+++ b/engines/glk/adrift/scprotos.h
@@ -97,10 +97,11 @@ extern sc_uint sc_hash(const sc_char *string);
/* TAF file reader/decompressor enumerations, opaque typedef and functions. */
enum {
TAF_VERSION_NONE = 0,
+ TAF_VERSION_SAVE = 999,
TAF_VERSION_500 = 500,
TAF_VERSION_400 = 400,
TAF_VERSION_390 = 390,
- TAF_VERSION_380 = 380
+ TAF_VERSION_380 = 380,
};
typedef struct sc_taf_s *sc_tafref_t;
diff --git a/engines/glk/adrift/sctaffil.cpp b/engines/glk/adrift/sctaffil.cpp
index 0cda5ec..e5c94a5 100644
--- a/engines/glk/adrift/sctaffil.cpp
+++ b/engines/glk/adrift/sctaffil.cpp
@@ -50,22 +50,22 @@ static const sc_char NEWLINE = '\n';
static const sc_char CARRIAGE_RETURN = '\r';
static const sc_char NUL = '\0';
-/* Version 4.0, version 3.9, and version 3.8 TAF file signatures. */
-static const sc_byte
-V400_SIGNATURE[VERSION_HEADER_SIZE] = {0x3c, 0x42, 0x3f, 0xc9, 0x6a, 0x87,
- 0xc2, 0xcf, 0x93, 0x45, 0x3e, 0x61,
- 0x39, 0xfa
- };
-static const sc_byte
-V390_SIGNATURE[VERSION_HEADER_SIZE] = {0x3c, 0x42, 0x3f, 0xc9, 0x6a, 0x87,
- 0xc2, 0xcf, 0x94, 0x45, 0x37, 0x61,
- 0x39, 0xfa
- };
-static const sc_byte
-V380_SIGNATURE[VERSION_HEADER_SIZE] = {0x3c, 0x42, 0x3f, 0xc9, 0x6a, 0x87,
- 0xc2, 0xcf, 0x94, 0x45, 0x36, 0x61,
- 0x39, 0xfa
- };
+/* Various version TAF file signatures. */
+static const sc_byte V500_SIGNATURE[VERSION_HEADER_SIZE] = {
+ 0x3c, 0x42, 0x3f, 0xc9, 0x6a, 0x87, 0xc2, 0xcf, 0x92, 0x45, 0x3e, 0x61, 0x30, 0x30
+};
+
+static const sc_byte V400_SIGNATURE[VERSION_HEADER_SIZE] = {
+ 0x3c, 0x42, 0x3f, 0xc9, 0x6a, 0x87, 0xc2, 0xcf, 0x93, 0x45, 0x3e, 0x61, 0x39, 0xfa
+};
+
+static const sc_byte V390_SIGNATURE[VERSION_HEADER_SIZE] = {
+ 0x3c, 0x42, 0x3f, 0xc9, 0x6a, 0x87, 0xc2, 0xcf, 0x94, 0x45, 0x37, 0x61, 0x39, 0xfa
+};
+
+static const sc_byte V380_SIGNATURE[VERSION_HEADER_SIZE] = {
+ 0x3c, 0x42, 0x3f, 0xc9, 0x6a, 0x87, 0xc2, 0xcf, 0x94, 0x45, 0x36, 0x61, 0x39, 0xfa
+};
/*
* Game TAF data structure. The game structure contains the original TAF
@@ -499,7 +499,10 @@ static sc_tafref_t taf_create_from_callback(sc_read_callbackref_t callback,
* Compare the header with the known TAF signatures, and set TAF version
* appropriately.
*/
- if (memcmp(taf->header, V400_SIGNATURE, VERSION_HEADER_SIZE) == 0) {
+ if (memcmp(taf->header, V500_SIGNATURE, VERSION_HEADER_SIZE) == 0) {
+ taf->version = TAF_VERSION_500;
+
+ } else if (memcmp(taf->header, V400_SIGNATURE, VERSION_HEADER_SIZE) == 0) {
/* Read in the version 4.0 header extension. */
in_bytes = callback(opaque,
taf->header + VERSION_HEADER_SIZE,
@@ -522,7 +525,7 @@ static sc_tafref_t taf_create_from_callback(sc_read_callbackref_t callback,
}
} else {
/* Saved games are always considered to be for ScummVM, version 5.0. */
- taf->version = TAF_VERSION_500;
+ taf->version = TAF_VERSION_SAVE;
}
/*
@@ -531,10 +534,14 @@ static sc_tafref_t taf_create_from_callback(sc_read_callbackref_t callback,
* it's obfuscated with the Visual Basic PRNG.
*/
switch (taf->version) {
- case TAF_VERSION_500:
+ case TAF_VERSION_SAVE:
status = taf_read_raw(taf, callback, opaque, is_gamefile);
break;
-
+
+ case TAF_VERSION_500:
+ sc_error("taf_create: ADRIFT 5 games are not yet supported");
+ break;
+
case TAF_VERSION_400:
status = taf_decompress(taf, callback, opaque, is_gamefile);
break;
diff --git a/engines/glk/adrift/scutils.cpp b/engines/glk/adrift/scutils.cpp
index 0c8165d..d1dc514 100644
--- a/engines/glk/adrift/scutils.cpp
+++ b/engines/glk/adrift/scutils.cpp
@@ -65,7 +65,7 @@ void sc_error(const sc_char *format, ...) {
assert(format);
va_start(ap, format);
- Common::String s = Common::String::format(format, ap);
+ Common::String s = Common::String::vformat(format, ap);
va_end(ap);
warning("%s", s.c_str());
}
Commit: b19fb671d6080de4e10457bb97335bbeac09c02a
https://github.com/scummvm/scummvm/commit/b19fb671d6080de4e10457bb97335bbeac09c02a
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2019-09-26T18:18:38-07:00
Commit Message:
GLK: ADRIFT: Move subengine out of release build exclusions
Changed paths:
engines/glk/detection.cpp
diff --git a/engines/glk/detection.cpp b/engines/glk/detection.cpp
index 4be0c38..60b2faa 100644
--- a/engines/glk/detection.cpp
+++ b/engines/glk/detection.cpp
@@ -156,7 +156,8 @@ Common::Error GlkMetaEngine::createInstance(OSystem *syst, Engine **engine) cons
// Create the correct engine
*engine = nullptr;
- if ((*engine = create<Glk::AdvSys::AdvSysMetaEngine, Glk::AdvSys::AdvSys>(syst, gameDesc)) != nullptr) {}
+ if ((*engine = create<Glk::Adrift::AdriftMetaEngine, Glk::Adrift::Adrift>(syst, gameDesc)) != nullptr) {}
+ else if ((*engine = create<Glk::AdvSys::AdvSysMetaEngine, Glk::AdvSys::AdvSys>(syst, gameDesc)) != nullptr) {}
else if ((*engine = create<Glk::Alan2::Alan2MetaEngine, Glk::Alan2::Alan2>(syst, gameDesc)) != nullptr) {}
else if ((*engine = create<Glk::Alan3::Alan3MetaEngine, Glk::Alan3::Alan3>(syst, gameDesc)) != nullptr) {}
else if ((*engine = create<Glk::Frotz::FrotzMetaEngine, Glk::Frotz::Frotz>(syst, gameDesc)) != nullptr) {}
@@ -164,7 +165,6 @@ Common::Error GlkMetaEngine::createInstance(OSystem *syst, Engine **engine) cons
else if ((*engine = create<Glk::Hugo::HugoMetaEngine, Glk::Hugo::Hugo>(syst, gameDesc)) != nullptr) {}
else if ((*engine = create<Glk::Scott::ScottMetaEngine, Glk::Scott::Scott>(syst, gameDesc)) != nullptr) {}
#ifndef RELEASE_BUILD
- else if ((*engine = create<Glk::Adrift::AdriftMetaEngine, Glk::Adrift::Adrift>(syst, gameDesc)) != nullptr) {}
else if ((*engine = create<Glk::Magnetic::MagneticMetaEngine, Glk::Magnetic::Magnetic>(syst, gameDesc)) != nullptr) {}
else if ((td = Glk::TADS::TADSMetaEngine::findGame(gameDesc._gameId.c_str()))._description) {
if (td._options & Glk::TADS::OPTION_TADS3)
@@ -204,6 +204,7 @@ Common::String GlkMetaEngine::findFileByGameId(const Common::String &gameId) con
PlainGameList GlkMetaEngine::getSupportedGames() const {
PlainGameList list;
+ Glk::Adrift::AdriftMetaEngine::getSupportedGames(list);
Glk::AdvSys::AdvSysMetaEngine::getSupportedGames(list);
Glk::Alan2::Alan2MetaEngine::getSupportedGames(list);
Glk::Alan3::Alan3MetaEngine::getSupportedGames(list);
@@ -212,7 +213,6 @@ PlainGameList GlkMetaEngine::getSupportedGames() const {
Glk::Hugo::HugoMetaEngine::getSupportedGames(list);
Glk::Scott::ScottMetaEngine::getSupportedGames(list);
#ifndef RELEASE_BUILD
- Glk::Adrift::AdriftMetaEngine::getSupportedGames(list);
Glk::Magnetic::MagneticMetaEngine::getSupportedGames(list);
Glk::TADS::TADSMetaEngine::getSupportedGames(list);
#endif
@@ -221,7 +221,10 @@ PlainGameList GlkMetaEngine::getSupportedGames() const {
}
PlainGameDescriptor GlkMetaEngine::findGame(const char *gameId) const {
- Glk::GameDescriptor gd = Glk::AdvSys::AdvSysMetaEngine::findGame(gameId);
+ Glk::GameDescriptor gd = Glk::Adrift::AdriftMetaEngine::findGame(gameId);
+ if (gd._description) return gd;
+
+ gd = Glk::AdvSys::AdvSysMetaEngine::findGame(gameId);
if (gd._description) return gd;
gd = Glk::Alan2::Alan2MetaEngine::findGame(gameId);
@@ -243,9 +246,6 @@ PlainGameDescriptor GlkMetaEngine::findGame(const char *gameId) const {
if (gd._description) return gd;
#ifndef RELEASE_BUILD
- gd = Glk::Adrift::AdriftMetaEngine::findGame(gameId);
- if (gd._description) return gd;
-
gd = Glk::Magnetic::MagneticMetaEngine::findGame(gameId);
if (gd._description) return gd;
@@ -260,6 +260,7 @@ DetectedGames GlkMetaEngine::detectGames(const Common::FSList &fslist) const {
detectClashes();
DetectedGames detectedGames;
+ Glk::Adrift::AdriftMetaEngine::detectGames(fslist, detectedGames);
Glk::AdvSys::AdvSysMetaEngine::detectGames(fslist, detectedGames);
Glk::Alan2::Alan2MetaEngine::detectGames(fslist, detectedGames);
Glk::Alan3::Alan3MetaEngine::detectGames(fslist, detectedGames);
@@ -269,7 +270,6 @@ DetectedGames GlkMetaEngine::detectGames(const Common::FSList &fslist) const {
Glk::Scott::ScottMetaEngine::detectGames(fslist, detectedGames);
#ifndef RELEASE_BUILD
- Glk::Adrift::AdriftMetaEngine::detectGames(fslist, detectedGames);
Glk::Magnetic::MagneticMetaEngine::detectGames(fslist, detectedGames);
Glk::TADS::TADSMetaEngine::detectGames(fslist, detectedGames);
#endif
@@ -279,6 +279,7 @@ DetectedGames GlkMetaEngine::detectGames(const Common::FSList &fslist) const {
void GlkMetaEngine::detectClashes() const {
Common::StringMap map;
+ Glk::Adrift::AdriftMetaEngine::detectClashes(map);
Glk::AdvSys::AdvSysMetaEngine::detectClashes(map);
Glk::Alan2::Alan2MetaEngine::detectClashes(map);
Glk::Alan3::Alan3MetaEngine::detectClashes(map);
@@ -288,7 +289,6 @@ void GlkMetaEngine::detectClashes() const {
Glk::Scott::ScottMetaEngine::detectClashes(map);
#ifndef RELEASE_BUILD
- Glk::Adrift::AdriftMetaEngine::detectClashes(map);
Glk::Magnetic::MagneticMetaEngine::detectClashes(map);
Glk::TADS::TADSMetaEngine::detectClashes(map);
#endif
More information about the Scummvm-git-logs
mailing list