[Scummvm-git-logs] scummvm master -> 1d6b27d64b09beb10771510983c222e0d96b3865
sev-
sev at scummvm.org
Sun Jun 13 12:17:09 UTC 2021
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:
5e304c9274 DIRECTOR: Fix compilation on platforms with dynamic detection
1d6b27d64b DIRECTOR: Avoid duplicated data when not necessary
Commit: 5e304c92746f0eb6fa84e1f7eeae50437a14a4ea
https://github.com/scummvm/scummvm/commit/5e304c92746f0eb6fa84e1f7eeae50437a14a4ea
Author: Cameron Cawley (ccawley2011 at gmail.com)
Date: 2021-06-13T14:17:06+02:00
Commit Message:
DIRECTOR: Fix compilation on platforms with dynamic detection
Changed paths:
A engines/director/detection_paths.h
engines/director/detection.cpp
engines/director/detection.h
engines/director/director.cpp
diff --git a/engines/director/detection.cpp b/engines/director/detection.cpp
index a641e962e0..cf278e98d3 100644
--- a/engines/director/detection.cpp
+++ b/engines/director/detection.cpp
@@ -30,92 +30,7 @@
#include "director/director.h"
#include "director/detection_tables.h"
-
-namespace Director {
-const char *directoryGlobs[] = {
- "install",
- "l_zone",
- "win_data", // L-ZONE
- "data",
- "gadget", // Gadget
- "vnc",
- "vnc2", // Virtual Nightclub
- "program", // Arc Media products
- "demodata", // Edmark demos
- "media", // Gundam
- "mvm", // Master of the Elements
- "module_1",
- "module_2", // Takeru
- "simpdata",
- "simpsons", // Simpsons Cartoon Studio
- "dane", // Polish Kontyngent '99 catalog
- "datas", // O!KAY! subscription from Domino Verlag
- "daten", // Bibi Blocksberg games (German)
- "source", // Grand Prix 2006 directory
- "data_k",
- "data_1",
- "data_2", // JumpStart World
- "numbers", // JumpStart Learning Games
- "xtras",
- "files", // Babar
- "swanlake", // Barbie Swan Lake
- "assets", // Barbie Nail Designer
- "fjpc", // Forestia Jr
- "movies", // Mulle Meck (Gary Gadget) series
- "demos", // Headbone samplers
- "blender", // Blender CD-ROM magazines
- "bilder",
- "endsoung",
- "gerhelp",
- "gervideo",
- "mausejagd mit ton", // Rename from Mäusejagd mit Ton
- "music",
- "solos",
- "sounds",
- "startsnd", // GGMD German
- "duthelp",
- "dutvideo",
- "endsound",
- "muizen in \'t hotel, geluid", // GGMD Dutch
- "macos9",
- "macosx", // Sethi 3
- "kripos",
- "strisser",
- "polis",
- "poliisi",
- "cd_data", // Polis
- "fusion macintosh folder", // Fusion
- "oslo", // Oslo's Tools & Gadgets
- "ojo2000",
- "stuff", // Abrapalabra
- "tooned", // Stay Tooned
- "sam rupert", // Who Killed Sam Rupert?
- "content",
- "pcinst", // Gus and the CyberBuds series
- "p2data",
- "p2media",
- "p3media",
- "annat", // Pettson & Findus
- "fctdata",
- "fct", // Felix the Cat
- "dayfiles",
- "xmasfun", // Fisher-Price Xmas Fun
- "95instal", // Fisher-Price Little People
- "01", // Doing it in C++
- "freading",
- "fsetup", // My First Reading Words (Eureka)
- "english",
- "deutsch",
- "francais", // Rename from Français
- "italiano", // Virtual Tourism Paris
- "please copy to hd. G3", // Rename from HDã«ï½ºï¾ï¾ï½°ãã¦ä¸ãããG3
- "_files_", // The Gate
- "popup", // Pop Up Computer
- "alpha", // Interactive Alphabet
- "technik", // Glasklar Technology Interactive
- 0
-};
-}
+#include "director/detection_paths.h"
static const char *customTargetList[] = {
"d2-mac",
diff --git a/engines/director/detection.h b/engines/director/detection.h
index 1565138af5..39f4e72fe6 100644
--- a/engines/director/detection.h
+++ b/engines/director/detection.h
@@ -40,8 +40,6 @@ struct DirectorGameDescription {
uint16 version;
};
-extern const char *directoryGlobs[];
-
} // End of namespace Director
#endif // DIRECTOR_DETECTION_H
diff --git a/engines/director/detection_paths.h b/engines/director/detection_paths.h
new file mode 100644
index 0000000000..6ea3ec7445
--- /dev/null
+++ b/engines/director/detection_paths.h
@@ -0,0 +1,114 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#ifndef DIRECTOR_DETECTION_PATHS_H
+#define DIRECTOR_DETECTION_PATHS_H
+
+namespace Director {
+
+static const char *directoryGlobs[] = {
+ "install",
+ "l_zone",
+ "win_data", // L-ZONE
+ "data",
+ "gadget", // Gadget
+ "vnc",
+ "vnc2", // Virtual Nightclub
+ "program", // Arc Media products
+ "demodata", // Edmark demos
+ "media", // Gundam
+ "mvm", // Master of the Elements
+ "module_1",
+ "module_2", // Takeru
+ "simpdata",
+ "simpsons", // Simpsons Cartoon Studio
+ "dane", // Polish Kontyngent '99 catalog
+ "datas", // O!KAY! subscription from Domino Verlag
+ "daten", // Bibi Blocksberg games (German)
+ "source", // Grand Prix 2006 directory
+ "data_k",
+ "data_1",
+ "data_2", // JumpStart World
+ "numbers", // JumpStart Learning Games
+ "xtras",
+ "files", // Babar
+ "swanlake", // Barbie Swan Lake
+ "assets", // Barbie Nail Designer
+ "fjpc", // Forestia Jr
+ "movies", // Mulle Meck (Gary Gadget) series
+ "demos", // Headbone samplers
+ "blender", // Blender CD-ROM magazines
+ "bilder",
+ "endsoung",
+ "gerhelp",
+ "gervideo",
+ "mausejagd mit ton", // Rename from Mäusejagd mit Ton
+ "music",
+ "solos",
+ "sounds",
+ "startsnd", // GGMD German
+ "duthelp",
+ "dutvideo",
+ "endsound",
+ "muizen in \'t hotel, geluid", // GGMD Dutch
+ "macos9",
+ "macosx", // Sethi 3
+ "kripos",
+ "strisser",
+ "polis",
+ "poliisi",
+ "cd_data", // Polis
+ "fusion macintosh folder", // Fusion
+ "oslo", // Oslo's Tools & Gadgets
+ "ojo2000",
+ "stuff", // Abrapalabra
+ "tooned", // Stay Tooned
+ "sam rupert", // Who Killed Sam Rupert?
+ "content",
+ "pcinst", // Gus and the CyberBuds series
+ "p2data",
+ "p2media",
+ "p3media",
+ "annat", // Pettson & Findus
+ "fctdata",
+ "fct", // Felix the Cat
+ "dayfiles",
+ "xmasfun", // Fisher-Price Xmas Fun
+ "95instal", // Fisher-Price Little People
+ "01", // Doing it in C++
+ "freading",
+ "fsetup", // My First Reading Words (Eureka)
+ "english",
+ "deutsch",
+ "francais", // Rename from Français
+ "italiano", // Virtual Tourism Paris
+ "please copy to hd. G3", // Rename from HDã«ï½ºï¾ï¾ï½°ãã¦ä¸ãããG3
+ "_files_", // The Gate
+ "popup", // Pop Up Computer
+ "alpha", // Interactive Alphabet
+ "technik", // Glasklar Technology Interactive
+ 0
+};
+
+} // End of namespace Director
+
+#endif
diff --git a/engines/director/director.cpp b/engines/director/director.cpp
index e99ee3b1c1..0ca7c3fa21 100644
--- a/engines/director/director.cpp
+++ b/engines/director/director.cpp
@@ -34,7 +34,8 @@
#include "director/sound.h"
#include "director/window.h"
#include "director/lingo/lingo.h"
-#include "director/detection.h"
+
+#include "director/detection_paths.h"
namespace Director {
@@ -78,7 +79,7 @@ DirectorEngine::DirectorEngine(OSystem *syst, const DirectorGameDescription *gam
// Meet Mediaband could have up to 5 levels of directories
SearchMan.addDirectory(_gameDataDir.getPath(), _gameDataDir, 0, 5);
- for (uint i = 0; Director::directoryGlobs[i]; i++) {
+ for (uint i = 0; directoryGlobs[i]; i++) {
Common::String directoryGlob = directoryGlobs[i];
SearchMan.addSubDirectoryMatching(_gameDataDir, directoryGlob);
}
Commit: 1d6b27d64b09beb10771510983c222e0d96b3865
https://github.com/scummvm/scummvm/commit/1d6b27d64b09beb10771510983c222e0d96b3865
Author: Le Philousophe (lephilousophe at users.noreply.github.com)
Date: 2021-06-13T14:17:06+02:00
Commit Message:
DIRECTOR: Avoid duplicated data when not necessary
Changed paths:
engines/director/detection.h
engines/director/detection_paths.h
engines/director/director.cpp
diff --git a/engines/director/detection.h b/engines/director/detection.h
index 39f4e72fe6..1565138af5 100644
--- a/engines/director/detection.h
+++ b/engines/director/detection.h
@@ -40,6 +40,8 @@ struct DirectorGameDescription {
uint16 version;
};
+extern const char *directoryGlobs[];
+
} // End of namespace Director
#endif // DIRECTOR_DETECTION_H
diff --git a/engines/director/detection_paths.h b/engines/director/detection_paths.h
index 6ea3ec7445..ab5a113059 100644
--- a/engines/director/detection_paths.h
+++ b/engines/director/detection_paths.h
@@ -25,7 +25,7 @@
namespace Director {
-static const char *directoryGlobs[] = {
+const char *directoryGlobs[] = {
"install",
"l_zone",
"win_data", // L-ZONE
diff --git a/engines/director/director.cpp b/engines/director/director.cpp
index 0ca7c3fa21..eb1a4ec016 100644
--- a/engines/director/director.cpp
+++ b/engines/director/director.cpp
@@ -34,8 +34,15 @@
#include "director/sound.h"
#include "director/window.h"
#include "director/lingo/lingo.h"
+#include "director/detection.h"
+/**
+ * When detection is compiled dynamically, directory globs end up in detection plugin and
+ * engine cannot link to them so duplicate them in the engine in this case
+ */
+#ifndef DETECTION_STATIC
#include "director/detection_paths.h"
+#endif
namespace Director {
@@ -79,7 +86,7 @@ DirectorEngine::DirectorEngine(OSystem *syst, const DirectorGameDescription *gam
// Meet Mediaband could have up to 5 levels of directories
SearchMan.addDirectory(_gameDataDir.getPath(), _gameDataDir, 0, 5);
- for (uint i = 0; directoryGlobs[i]; i++) {
+ for (uint i = 0; Director::directoryGlobs[i]; i++) {
Common::String directoryGlob = directoryGlobs[i];
SearchMan.addSubDirectoryMatching(_gameDataDir, directoryGlob);
}
More information about the Scummvm-git-logs
mailing list