[Scummvm-git-logs] scummvm master -> dfec6b497d32455413fbd92b04fb147a69e027c1
dreammaster
noreply at scummvm.org
Sat Jun 10 02:55:21 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:
dfec6b497d CREATE_ENGINE: Remove duplicate files from new events style
Commit: dfec6b497d32455413fbd92b04fb147a69e027c1
https://github.com/scummvm/scummvm/commit/dfec6b497d32455413fbd92b04fb147a69e027c1
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2023-06-09T19:55:14-07:00
Commit Message:
CREATE_ENGINE: Remove duplicate files from new events style
Changed paths:
R devtools/create_engine/files_events/POTFILES
R devtools/create_engine/files_events/configure.engine
R devtools/create_engine/files_events/console.cpp
R devtools/create_engine/files_events/console.h
R devtools/create_engine/files_events/credits.pl
R devtools/create_engine/files_events/detection.cpp
R devtools/create_engine/files_events/detection.h
R devtools/create_engine/files_events/detection_tables.h
R devtools/create_engine/files_events/metaengine.cpp
R devtools/create_engine/files_events/metaengine.h
devtools/create_engine/create_engine.cpp
diff --git a/devtools/create_engine/create_engine.cpp b/devtools/create_engine/create_engine.cpp
index 18b8b018518..f31af277559 100644
--- a/devtools/create_engine/create_engine.cpp
+++ b/devtools/create_engine/create_engine.cpp
@@ -41,19 +41,24 @@ char engineLowercase[MAX_ENGINE_NAME_LENGTH];
// List of files to be copied to create engine
static const char *const FILENAMES[] = {
- "configure.engine", "console.cpp", "console.h",
- "credits.pl", "detection.cpp", "detection.h",
- "detection_tables.h", "metaengine.cpp",
- "metaengine.h", "module.mk", "xyzzy.cpp",
- "xyzzy.h", "POTFILES", nullptr
+ "files/configure.engine", "files/console.cpp", "files/console.h",
+ "files/credits.pl", "files/detection.cpp", "files/detection.h",
+ "files/detection_tables.h", "files/metaengine.cpp",
+ "files/metaengine.h", "files/module.mk", "files/xyzzy.cpp",
+ "files/xyzzy.h", "files/POTFILES", nullptr
};
+
static const char *const FILENAMES_EVENTS[] = {
- "configure.engine", "console.cpp", "console.h",
- "credits.pl", "detection.cpp", "detection.h",
- "detection_tables.h", "events.cpp", "events.h",
- "messages.cpp", "messages.h", "metaengine.cpp",
- "metaengine.h", "module.mk", "xyzzy.cpp", "xyzzy.h",
- "POTFILES", "views.h", "view1.cpp", "view1.h", nullptr
+ "files/configure.engine", "files/console.cpp", "files/console.h",
+ "files/credits.pl", "files/detection.cpp", "files/detection.h",
+ "files/detection_tables.h",
+ "files_events/events.cpp", "files_events/events.h",
+ "files_events/messages.cpp", "files_events/messages.h",
+ "files/metaengine.cpp", "files/metaengine.h",
+ "files_events/module.mk", "files_events/xyzzy.cpp",
+ "files_events/xyzzy.h", "files/POTFILES",
+ "files_events/views.h", "files_events/view1.cpp",
+ "files_events/view1.h", nullptr
};
const char *const ENGINES = "create_project ..\\.. --msvc\n";
@@ -117,11 +122,11 @@ void process_file(FILE *in, FILE *out) {
}
// Copies and processes the specified file
-void process_file(const char *filename, const char *prefix, const char *prefix2,
- bool isEvents) {
+void process_file(const char *filePath, const char *prefix, const char *prefix2) {
char srcFilename[MAX_LINE_LENGTH], destFilename[MAX_LINE_LENGTH];
- const char *srcFormat = isEvents ? "%s/files_events/%s" : "%s/files/%s";
- snprintf(srcFilename, MAX_LINE_LENGTH, srcFormat, prefix2, filename);
+ const char *filename = strchr(filePath, '/') + 1;
+
+ snprintf(srcFilename, MAX_LINE_LENGTH, "%s/%s", prefix2, filePath);
if (!strncmp(filename, "xyzzy.", 6))
snprintf(destFilename, MAX_LINE_LENGTH, "%s/engines/%s/%s.%s",
prefix, engineLowercase, engineLowercase, filename + 6);
@@ -241,7 +246,7 @@ int main(int argc, char *argv[]) {
// Process the files
const char *const *filenames = isEvents ? FILENAMES_EVENTS : FILENAMES;
for (const char *const *filename = filenames; *filename; ++filename)
- process_file(*filename, prefix, prefix2, isEvents);
+ process_file(*filename, prefix, prefix2);
create_batch_file(prefix);
diff --git a/devtools/create_engine/files_events/POTFILES b/devtools/create_engine/files_events/POTFILES
deleted file mode 100644
index 5fd15403ba1..00000000000
--- a/devtools/create_engine/files_events/POTFILES
+++ /dev/null
@@ -1 +0,0 @@
-engines/xyzzy/metaengine.cpp
diff --git a/devtools/create_engine/files_events/configure.engine b/devtools/create_engine/files_events/configure.engine
deleted file mode 100644
index ba672dd365e..00000000000
--- a/devtools/create_engine/files_events/configure.engine
+++ /dev/null
@@ -1,3 +0,0 @@
-# This file is included from the main "configure" script
-# add_engine [name] [desc] [build-by-default] [subengines] [base games] [deps]
-add_engine xyzzy "Xyzzy" no "" "" ""
diff --git a/devtools/create_engine/files_events/console.cpp b/devtools/create_engine/files_events/console.cpp
deleted file mode 100644
index f917a755791..00000000000
--- a/devtools/create_engine/files_events/console.cpp
+++ /dev/null
@@ -1,38 +0,0 @@
-/* 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 3 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, see <http://www.gnu.org/licenses/>.
- *
- */
-
-#include "xyzzy/console.h"
-
-namespace Xyzzy {
-
-Console::Console() : GUI::Debugger() {
- registerCmd("test", WRAP_METHOD(Console, Cmd_test));
-}
-
-Console::~Console() {
-}
-
-bool Console::Cmd_test(int argc, const char **argv) {
- debugPrintf("Test\n");
- return true;
-}
-
-} // End of namespace Xyzzy
diff --git a/devtools/create_engine/files_events/console.h b/devtools/create_engine/files_events/console.h
deleted file mode 100644
index c421e2589c2..00000000000
--- a/devtools/create_engine/files_events/console.h
+++ /dev/null
@@ -1,40 +0,0 @@
-
-/* 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 3 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, see <http://www.gnu.org/licenses/>.
- *
- */
-
-#ifndef XYZZY_CONSOLE_H
-#define XYZZY_CONSOLE_H
-
-#include "gui/debugger.h"
-
-namespace Xyzzy {
-
-class Console : public GUI::Debugger {
-private:
- bool Cmd_test(int argc, const char **argv);
-public:
- Console();
- ~Console() override;
-};
-
-} // End of namespace Xyzzy
-
-#endif // XYZZY_CONSOLE_H
diff --git a/devtools/create_engine/files_events/credits.pl b/devtools/create_engine/files_events/credits.pl
deleted file mode 100644
index c17abc17a0a..00000000000
--- a/devtools/create_engine/files_events/credits.pl
+++ /dev/null
@@ -1,3 +0,0 @@
-begin_section("Xyzzy");
- add_person("Name 1", "Handle 1", "");
-end_section();
diff --git a/devtools/create_engine/files_events/detection.cpp b/devtools/create_engine/files_events/detection.cpp
deleted file mode 100644
index fcd39c1dfad..00000000000
--- a/devtools/create_engine/files_events/detection.cpp
+++ /dev/null
@@ -1,45 +0,0 @@
-/* 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 3 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, see <http://www.gnu.org/licenses/>.
- *
- */
-
-#include "base/plugins.h"
-#include "common/config-manager.h"
-#include "common/file.h"
-#include "common/md5.h"
-#include "common/str-array.h"
-#include "common/translation.h"
-#include "common/util.h"
-#include "xyzzy/detection.h"
-#include "xyzzy/detection_tables.h"
-
-const DebugChannelDef XyzzyMetaEngineDetection::debugFlagList[] = {
- { Xyzzy::kDebugGraphics, "Graphics", "Graphics debug level" },
- { Xyzzy::kDebugPath, "Path", "Pathfinding debug level" },
- { Xyzzy::kDebugFilePath, "FilePath", "File path debug level" },
- { Xyzzy::kDebugScan, "Scan", "Scan for unrecognised games" },
- { Xyzzy::kDebugScript, "Script", "Enable debug script dump" },
- DEBUG_CHANNEL_END
-};
-
-XyzzyMetaEngineDetection::XyzzyMetaEngineDetection() : AdvancedMetaEngineDetection(Xyzzy::gameDescriptions,
- sizeof(ADGameDescription), Xyzzy::xyzzyGames) {
-}
-
-REGISTER_PLUGIN_STATIC(XYZZY_DETECTION, PLUGIN_TYPE_ENGINE_DETECTION, XyzzyMetaEngineDetection);
diff --git a/devtools/create_engine/files_events/detection.h b/devtools/create_engine/files_events/detection.h
deleted file mode 100644
index 83fbbcb6cd8..00000000000
--- a/devtools/create_engine/files_events/detection.h
+++ /dev/null
@@ -1,69 +0,0 @@
-/* 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 3 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, see <http://www.gnu.org/licenses/>.
- *
- */
-
-#ifndef XYZZY_DETECTION_H
-#define XYZZY_DETECTION_H
-
-#include "engines/advancedDetector.h"
-
-namespace Xyzzy {
-
-enum XyzzyDebugChannels {
- kDebugGraphics = 1 << 0,
- kDebugPath = 1 << 1,
- kDebugScan = 1 << 2,
- kDebugFilePath = 1 << 3,
- kDebugScript = 1 << 4,
-};
-
-extern const PlainGameDescriptor xyzzyGames[];
-
-extern const ADGameDescription gameDescriptions[];
-
-#define GAMEOPTION_ORIGINAL_SAVELOAD GUIO_GAMEOPTIONS1
-
-} // End of namespace Xyzzy
-
-class XyzzyMetaEngineDetection : public AdvancedMetaEngineDetection {
- static const DebugChannelDef debugFlagList[];
-
-public:
- XyzzyMetaEngineDetection();
- ~XyzzyMetaEngineDetection() override {}
-
- const char *getName() const override {
- return "xyzzy";
- }
-
- const char *getEngineName() const override {
- return "Xyzzy";
- }
-
- const char *getOriginalCopyright() const override {
- return "Xyzzy (C)";
- }
-
- const DebugChannelDef *getDebugChannels() const override {
- return debugFlagList;
- }
-};
-
-#endif // XYZZY_DETECTION_H
diff --git a/devtools/create_engine/files_events/detection_tables.h b/devtools/create_engine/files_events/detection_tables.h
deleted file mode 100644
index 8d1c5f41eed..00000000000
--- a/devtools/create_engine/files_events/detection_tables.h
+++ /dev/null
@@ -1,43 +0,0 @@
-/* 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 3 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, see <http://www.gnu.org/licenses/>.
- *
- */
-
-namespace Xyzzy {
-
-const PlainGameDescriptor xyzzyGames[] = {
- { "xyzzy", "Xyzzy" },
- { 0, 0 }
-};
-
-const ADGameDescription gameDescriptions[] = {
- {
- "xyzzy",
- nullptr,
- AD_ENTRY1s("file1.bin", "00000000000000000000000000000000", 11111),
- Common::EN_ANY,
- Common::kPlatformDOS,
- ADGF_UNSTABLE,
- GUIO1(GUIO_NONE)
- },
-
- AD_TABLE_END_MARKER
-};
-
-} // End of namespace Xyzzy
diff --git a/devtools/create_engine/files_events/metaengine.cpp b/devtools/create_engine/files_events/metaengine.cpp
deleted file mode 100644
index 5a7fdec53b8..00000000000
--- a/devtools/create_engine/files_events/metaengine.cpp
+++ /dev/null
@@ -1,69 +0,0 @@
-/* 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 3 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, see <http://www.gnu.org/licenses/>.
- *
- */
-
-#include "common/translation.h"
-
-#include "xyzzy/metaengine.h"
-#include "xyzzy/detection.h"
-#include "xyzzy/xyzzy.h"
-
-namespace Xyzzy {
-
-static const ADExtraGuiOptionsMap optionsList[] = {
- {
- GAMEOPTION_ORIGINAL_SAVELOAD,
- {
- _s("Use original save/load screens"),
- _s("Use the original save/load screens instead of the ScummVM ones"),
- "original_menus",
- false,
- 0,
- 0
- }
- },
- AD_EXTRA_GUI_OPTIONS_TERMINATOR
-};
-
-} // End of namespace Xyzzy
-
-const char *XyzzyMetaEngine::getName() const {
- return "xyzzy";
-}
-
-const ADExtraGuiOptionsMap *XyzzyMetaEngine::getAdvancedExtraGuiOptions() const {
- return Xyzzy::optionsList;
-}
-
-Common::Error XyzzyMetaEngine::createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const {
- *engine = new Xyzzy::XyzzyEngine(syst, desc);
- return Common::kNoError;
-}
-
-bool XyzzyMetaEngine::hasFeature(MetaEngineFeature f) const {
- return checkExtendedSaves(f) ||
- (f == kSupportsLoadingDuringStartup);
-}
-
-#if PLUGIN_ENABLED_DYNAMIC(XYZZY)
-REGISTER_PLUGIN_DYNAMIC(XYZZY, PLUGIN_TYPE_ENGINE, XyzzyMetaEngine);
-#else
-REGISTER_PLUGIN_STATIC(XYZZY, PLUGIN_TYPE_ENGINE, XyzzyMetaEngine);
-#endif
diff --git a/devtools/create_engine/files_events/metaengine.h b/devtools/create_engine/files_events/metaengine.h
deleted file mode 100644
index 9bd9ea23150..00000000000
--- a/devtools/create_engine/files_events/metaengine.h
+++ /dev/null
@@ -1,43 +0,0 @@
-/* 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 3 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, see <http://www.gnu.org/licenses/>.
- *
- */
-
-#ifndef XYZZY_METAENGINE_H
-#define XYZZY_METAENGINE_H
-
-#include "engines/advancedDetector.h"
-
-class XyzzyMetaEngine : public AdvancedMetaEngine {
-public:
- const char *getName() const override;
-
- Common::Error createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const override;
-
- /**
- * Determine whether the engine supports the specified MetaEngine feature.
- *
- * Used by e.g. the launcher to determine whether to enable the Load button.
- */
- bool hasFeature(MetaEngineFeature f) const override;
-
- const ADExtraGuiOptionsMap *getAdvancedExtraGuiOptions() const override;
-};
-
-#endif // XYZZY_METAENGINE_H
More information about the Scummvm-git-logs
mailing list