[Scummvm-git-logs] scummvm branch-2-9 -> ab442ec76404856374b13f00afa7b644c9cff876

lephilousophe noreply at scummvm.org
Sun Dec 1 21:41:57 UTC 2024


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:
ab442ec764 CONFIGURE: Add a 3D feature


Commit: ab442ec76404856374b13f00afa7b644c9cff876
    https://github.com/scummvm/scummvm/commit/ab442ec76404856374b13f00afa7b644c9cff876
Author: Le Philousophe (lephilousophe at users.noreply.github.com)
Date: 2024-12-01T22:41:45+01:00

Commit Message:
CONFIGURE: Add a 3D feature

This allows to blacklist 3D engines on platforms not supporting 3D.
These platforms don't have OpenGL nor TinyGL enabled.

Changed paths:
    configure
    devtools/create_project/cmake.cpp
    devtools/create_project/create_project.cpp
    engines/freescape/configure.engine
    engines/grim/configure.engine
    engines/hpl1/configure.engine
    engines/myst3/configure.engine
    engines/playground3d/configure.engine
    engines/stark/configure.engine
    engines/tetraedge/configure.engine
    engines/twp/configure.engine
    engines/watchmaker/configure.engine
    engines/wintermute/configure.engine


diff --git a/configure b/configure
index 264b296728f..24702a05d6d 100755
--- a/configure
+++ b/configure
@@ -269,6 +269,7 @@ _detection_features_static=yes
 _detection_features_full=yes
 # The following variables are automatically detected, and should not
 # be modified otherwise. Consider them read-only.
+_3d=no
 _posix=no
 _has_posix_spawn=no
 _has_fseeko_offt_64=no
@@ -282,6 +283,7 @@ _imgui=yes
 
 # Add (virtual) features
 add_feature 16bit "16bit color" "_16bit"
+add_feature 3d "3D rendering" "_3d"
 add_feature bink "Bink" "_bink"
 add_feature cloud "cloud" "_cloud"
 add_feature faad "libfaad" "_faad"
@@ -6900,6 +6902,14 @@ fi
 define_in_config_if_yes $_tinygl 'USE_TINYGL'
 echo "$_tinygl"
 
+echo_n "Building any 3D game... "
+if (test "$_tinygl" = yes || test "$_opengl_game_classic" = yes || test "$_opengl_game_shaders" = yes); then
+	_3d=yes
+else
+	_3d=no
+fi
+echo "$_3d"
+
 #
 # Check whether to build Bink video support
 #
diff --git a/devtools/create_project/cmake.cpp b/devtools/create_project/cmake.cpp
index 6679b222c1c..25c2d2f3922 100644
--- a/devtools/create_project/cmake.cpp
+++ b/devtools/create_project/cmake.cpp
@@ -188,6 +188,8 @@ link_directories(/opt/local/lib)
 		if (!feature.enable || featureExcluded(feature.name)) continue;
 
 		writeFeatureLibSearch(setup, workspace, feature.name);
+
+		if (!feature.define || !feature.define[0]) continue;
 		workspace << "add_definitions(-D" << feature.define << ")\n";
 	}
 	workspace << "\n";
diff --git a/devtools/create_project/create_project.cpp b/devtools/create_project/create_project.cpp
index 77a15f876bb..7051c4157b3 100644
--- a/devtools/create_project/create_project.cpp
+++ b/devtools/create_project/create_project.cpp
@@ -374,6 +374,12 @@ int main(int argc, char *argv[]) {
 	}
 #endif
 
+	// Calculate 3D feature state
+	setFeatureBuildState("3d", setup.features,
+			getFeatureBuildState("tinygl", setup.features) ||
+			getFeatureBuildState("opengl_game_classic", setup.features) ||
+			getFeatureBuildState("opengl_game_shaders", setup.features));
+
 	// Disable engines for which we are missing dependencies
 	for (EngineDescList::const_iterator i = setup.engines.begin(); i != setup.engines.end(); ++i) {
 		if (i->enable) {
@@ -1138,6 +1144,7 @@ const Feature s_features[] = {
 	{        "edgescalers",              "USE_EDGE_SCALERS", false, true,  "Edge scalers" },
 	{             "aspect",                    "USE_ASPECT", false, true,  "Aspect ratio correction" },
 	{              "16bit",                 "USE_RGB_COLOR", false, true,  "16bit color support" },
+	{                 "3d",                              "", false, true,  "3D rendering" },
 	{            "highres",                   "USE_HIGHRES", false, true,  "high resolution" },
 	{              "imgui",                     "USE_IMGUI", false, true,  "Dear ImGui based debugger" },
 	{            "mt32emu",                   "USE_MT32EMU", false, true,  "integrated MT-32 emulator" },
diff --git a/engines/freescape/configure.engine b/engines/freescape/configure.engine
index 8457bb60369..6e2620258e9 100644
--- a/engines/freescape/configure.engine
+++ b/engines/freescape/configure.engine
@@ -1,3 +1,3 @@
 # This file is included from the main "configure" script
 # add_engine [name] [desc] [build-by-default] [subengines] [base games] [deps]
-add_engine freescape "Freescape" yes "" "" "highres 16bit"
+add_engine freescape "Freescape" yes "" "" "highres 16bit 3d"
diff --git a/engines/grim/configure.engine b/engines/grim/configure.engine
index 3379e8a4990..2a97d265524 100644
--- a/engines/grim/configure.engine
+++ b/engines/grim/configure.engine
@@ -1,4 +1,4 @@
 # This file is included from the main "configure" script
 # add_engine [name] [desc] [build-by-default] [subengines] [base games] [deps]
-add_engine grim "Grim" yes "monkey4" "Grim Fandango" "16bit highres"
+add_engine grim "Grim" yes "monkey4" "Grim Fandango" "16bit 3d highres"
 add_engine monkey4 "Escape from Monkey Island" no "" "" "bink"
diff --git a/engines/hpl1/configure.engine b/engines/hpl1/configure.engine
index 4c98651bedc..30451b0a462 100644
--- a/engines/hpl1/configure.engine
+++ b/engines/hpl1/configure.engine
@@ -1,3 +1,3 @@
 # This file is included from the main "configure" script
 # add_engine [name] [desc] [build-by-default] [subengines] [base games] [deps]
-add_engine hpl1 "Hpl1" no "" "" "16bit highres jpeg gif png opengl_game_shaders"
+add_engine hpl1 "Hpl1" no "" "" "16bit 3d highres jpeg gif png opengl_game_shaders"
diff --git a/engines/myst3/configure.engine b/engines/myst3/configure.engine
index a99a5dee48d..5feb3e3792a 100644
--- a/engines/myst3/configure.engine
+++ b/engines/myst3/configure.engine
@@ -1,3 +1,3 @@
 # This file is included from the main "configure" script
 # add_engine [name] [desc] [build-by-default] [subengines] [base games] [deps]
-add_engine myst3 "Myst 3" yes "" "" "16bit highres jpeg bink"
+add_engine myst3 "Myst 3" yes "" "" "16bit 3d highres jpeg bink"
diff --git a/engines/playground3d/configure.engine b/engines/playground3d/configure.engine
index d93fb9064f4..45489558f3e 100644
--- a/engines/playground3d/configure.engine
+++ b/engines/playground3d/configure.engine
@@ -1,3 +1,3 @@
 # This file is included from the main "configure" script
 # add_engine [name] [desc] [build-by-default] [subengines] [base games] [deps]
-add_engine playground3d "Playground 3d: the testing and playground environment for 3d renderers" no "" "" "16bit highres"
+add_engine playground3d "Playground 3d: the testing and playground environment for 3d renderers" no "" "" "16bit 3d highres"
diff --git a/engines/stark/configure.engine b/engines/stark/configure.engine
index 065cf5c2f57..eb279cabae1 100644
--- a/engines/stark/configure.engine
+++ b/engines/stark/configure.engine
@@ -1,3 +1,3 @@
 # This file is included from the main "configure" script
 # add_engine [name] [desc] [build-by-default] [subengines] [base games] [deps]
-add_engine stark "The Longest Journey" yes "" "" "16bit highres freetype2 vorbis bink"
+add_engine stark "The Longest Journey" yes "" "" "16bit 3d highres freetype2 vorbis bink"
diff --git a/engines/tetraedge/configure.engine b/engines/tetraedge/configure.engine
index b684cbb7641..38756bdbc04 100644
--- a/engines/tetraedge/configure.engine
+++ b/engines/tetraedge/configure.engine
@@ -1,3 +1,3 @@
 # This file is included from the main "configure" script
 # add_engine [name] [desc] [build-by-default] [subengines] [base games] [deps]
-add_engine tetraedge "Tetraedge" yes "" "" "highres freetype2 vorbis png jpeg lua theoradec"
+add_engine tetraedge "Tetraedge" yes "" "" "highres 3d freetype2 vorbis png jpeg lua theoradec"
diff --git a/engines/twp/configure.engine b/engines/twp/configure.engine
index 78d5384d468..6f79c934658 100644
--- a/engines/twp/configure.engine
+++ b/engines/twp/configure.engine
@@ -1,3 +1,3 @@
 # This file is included from the main "configure" script
 # add_engine [name] [desc] [build-by-default] [subengines] [base games] [deps]
-add_engine twp "Thimbleweed Park" yes "" "" "16bit highres vorbis png opengl_game_shaders"
+add_engine twp "Thimbleweed Park" yes "" "" "16bit 3d highres vorbis png opengl_game_shaders"
diff --git a/engines/watchmaker/configure.engine b/engines/watchmaker/configure.engine
index dd905a7b3c9..4c502f69285 100644
--- a/engines/watchmaker/configure.engine
+++ b/engines/watchmaker/configure.engine
@@ -1,3 +1,3 @@
 # This file is included from the main "configure" script
 # add_engine [name] [desc] [build-by-default] [subengines] [base games] [deps]
-add_engine watchmaker "The Watchmaker" no "" "" "highres 16bit opengl_game_classic"
+add_engine watchmaker "The Watchmaker" no "" "" "highres 16bit 3d opengl_game_classic"
diff --git a/engines/wintermute/configure.engine b/engines/wintermute/configure.engine
index 60a494d9b59..7083e2af18e 100644
--- a/engines/wintermute/configure.engine
+++ b/engines/wintermute/configure.engine
@@ -1,6 +1,6 @@
 # This file is included from the main "configure" script
 # add_engine [name] [desc] [build-by-default] [subengines] [base games] [deps]
 add_engine wintermute "Wintermute" yes "foxtail herocraft wme3d" "" "16bit highres jpeg png"
-add_engine wme3d "Wintermute3D" no
+add_engine wme3d "Wintermute3D" no "" "" "3d"
 add_engine foxtail "FoxTail" yes
 add_engine herocraft "HeroCraft" yes




More information about the Scummvm-git-logs mailing list