[Scummvm-git-logs] scummvm master -> c6b164a0aa75ae18aa42a639c5591bef4cf316ec

bluegr bluegr at gmail.com
Fri Jan 8 22:59:14 UTC 2021


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:
c6b164a0aa MADS: Split V2 games into a new subengine


Commit: c6b164a0aa75ae18aa42a639c5591bef4cf316ec
    https://github.com/scummvm/scummvm/commit/c6b164a0aa75ae18aa42a639c5591bef4cf316ec
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2021-01-09T00:58:36+02:00

Commit Message:
MADS: Split V2 games into a new subengine

Fixes bug #11759

Changed paths:
    engines/mads/action.cpp
    engines/mads/action.h
    engines/mads/animation.h
    engines/mads/assets.cpp
    engines/mads/assets.h
    engines/mads/compression.h
    engines/mads/configure.engine
    engines/mads/detection_tables.h
    engines/mads/dragonsphere/dragonsphere_scenes.cpp
    engines/mads/dragonsphere/dragonsphere_scenes.h
    engines/mads/dragonsphere/dragonsphere_scenes1.cpp
    engines/mads/dragonsphere/dragonsphere_scenes1.h
    engines/mads/dragonsphere/game_dragonsphere.cpp
    engines/mads/dragonsphere/game_dragonsphere.h
    engines/mads/dragonsphere/globals_dragonsphere.cpp
    engines/mads/dragonsphere/globals_dragonsphere.h
    engines/mads/game.cpp
    engines/mads/phantom/game_phantom.cpp
    engines/mads/phantom/game_phantom.h
    engines/mads/phantom/globals_phantom.cpp
    engines/mads/phantom/globals_phantom.h
    engines/mads/phantom/phantom_scenes.cpp
    engines/mads/phantom/phantom_scenes.h
    engines/mads/phantom/phantom_scenes1.cpp
    engines/mads/phantom/phantom_scenes1.h
    engines/mads/phantom/phantom_scenes2.cpp
    engines/mads/phantom/phantom_scenes2.h
    engines/mads/phantom/phantom_scenes3.cpp
    engines/mads/phantom/phantom_scenes3.h
    engines/mads/phantom/phantom_scenes4.cpp
    engines/mads/phantom/phantom_scenes4.h
    engines/mads/phantom/phantom_scenes5.cpp
    engines/mads/phantom/phantom_scenes5.h
    engines/mads/scene.cpp
    engines/mads/scene_data.cpp


diff --git a/engines/mads/action.cpp b/engines/mads/action.cpp
index f1c562675f..cda8523992 100644
--- a/engines/mads/action.cpp
+++ b/engines/mads/action.cpp
@@ -20,7 +20,6 @@
  *
  */
 
-#include "common/scummsys.h"
 #include "mads/mads.h"
 #include "mads/action.h"
 #include "mads/inventory.h"
diff --git a/engines/mads/action.h b/engines/mads/action.h
index 042fd971c9..cce4112345 100644
--- a/engines/mads/action.h
+++ b/engines/mads/action.h
@@ -23,7 +23,6 @@
 #ifndef MADS_ACTION_H
 #define MADS_ACTION_H
 
-#include "common/scummsys.h"
 #include "common/serializer.h"
 #include "common/str.h"
 
diff --git a/engines/mads/animation.h b/engines/mads/animation.h
index a6a4cfbc8b..1458dfa5a6 100644
--- a/engines/mads/animation.h
+++ b/engines/mads/animation.h
@@ -23,13 +23,11 @@
 #ifndef MADS_ANIMATION_H
 #define MADS_ANIMATION_H
 
-#include "common/scummsys.h"
 #include "common/array.h"
 #include "common/rect.h"
 #include "mads/msurface.h"
 #include "mads/scene_data.h"
 #include "mads/font.h"
-#include "mads/user_interface.h"
 
 namespace MADS {
 
diff --git a/engines/mads/assets.cpp b/engines/mads/assets.cpp
index 1d4634e383..a79770edaa 100644
--- a/engines/mads/assets.cpp
+++ b/engines/mads/assets.cpp
@@ -20,11 +20,9 @@
  *
  */
 
-#include "common/scummsys.h"
 #include "mads/mads.h"
 #include "mads/assets.h"
 #include "mads/compression.h"
-#include "mads/events.h"
 #include "mads/palette.h"
 
 namespace MADS {
diff --git a/engines/mads/assets.h b/engines/mads/assets.h
index 0aae534498..26f0c818f8 100644
--- a/engines/mads/assets.h
+++ b/engines/mads/assets.h
@@ -23,7 +23,6 @@
 #ifndef MADS_ASSETS_H
 #define MADS_ASSETS_H
 
-#include "common/scummsys.h"
 #include "common/array.h"
 #include "mads/palette.h"
 
@@ -77,10 +76,11 @@ private:
 	 * Load the data for the asset
 	 */
 	void load(Common::SeekableReadStream *stream, int flags);
+
 public:
 	SpriteSetCharInfo *_charInfo;
 	int _usageIndex;
-public:
+
 	/**
 	 * Constructor
 	 */
diff --git a/engines/mads/compression.h b/engines/mads/compression.h
index b560ed33c1..d04e89b9f9 100644
--- a/engines/mads/compression.h
+++ b/engines/mads/compression.h
@@ -23,8 +23,6 @@
 #ifndef MADS_COMPRESSION_H
 #define MADS_COMPRESSION_H
 
-#include "common/scummsys.h"
-#include "common/endian.h"
 #include "common/memstream.h"
 #include "common/stream.h"
 
diff --git a/engines/mads/configure.engine b/engines/mads/configure.engine
index 21f2642c3f..a264e25acf 100644
--- a/engines/mads/configure.engine
+++ b/engines/mads/configure.engine
@@ -1,3 +1,4 @@
 # This file is included from the main "configure" script
 # add_engine [name] [desc] [build-by-default] [subengines] [base games] [deps]
-add_engine mads "MADS" yes
+add_engine mads "MADS" yes "madsv2" "Rex Nebular"
+add_engine madsv2 "MADS V2" no "" "Return of the Phantom, Dragonsphere"
diff --git a/engines/mads/detection_tables.h b/engines/mads/detection_tables.h
index 9ea83d51e0..faba9baaca 100644
--- a/engines/mads/detection_tables.h
+++ b/engines/mads/detection_tables.h
@@ -75,6 +75,8 @@ static const MADSGameDescription gameDescriptions[] = {
 		0
 	},
 
+#ifdef ENABLE_MADSV2
+
 	{
 		// Return of the Phantom DOS English
 		{
@@ -120,6 +122,8 @@ static const MADSGameDescription gameDescriptions[] = {
 		0
 	},
 
+#endif
+
 	{ AD_TABLE_END_MARKER, 0, 0 }
 };
 
diff --git a/engines/mads/dragonsphere/dragonsphere_scenes.cpp b/engines/mads/dragonsphere/dragonsphere_scenes.cpp
index c20eeb72fa..936336f548 100644
--- a/engines/mads/dragonsphere/dragonsphere_scenes.cpp
+++ b/engines/mads/dragonsphere/dragonsphere_scenes.cpp
@@ -20,7 +20,8 @@
  *
  */
 
-#include "common/scummsys.h"
+#ifdef ENABLE_MADSV2
+
 #include "common/config-manager.h"
 #include "mads/mads.h"
 #include "mads/compression.h"
@@ -238,3 +239,5 @@ void SceneInfoDragonsphere::loadCodes(BaseSurface &depthSurface, Common::Seekabl
 } // End of namespace Dragonsphere
 
 } // End of namespace MADS
+
+#endif
diff --git a/engines/mads/dragonsphere/dragonsphere_scenes.h b/engines/mads/dragonsphere/dragonsphere_scenes.h
index 93c3773069..52a673fe69 100644
--- a/engines/mads/dragonsphere/dragonsphere_scenes.h
+++ b/engines/mads/dragonsphere/dragonsphere_scenes.h
@@ -20,11 +20,11 @@
  *
  */
 
+#ifdef ENABLE_MADSV2
+
 #ifndef MADS_DRAGONSPHERE_SCENES_H
 #define MADS_DRAGONSPHERE_SCENES_H
 
-#include "common/scummsys.h"
-#include "mads/game.h"
 #include "mads/scene.h"
 #include "mads/dragonsphere/game_dragonsphere.h"
 //#include "mads/dragonsphere/globals_dragonsphere.h"
@@ -674,3 +674,5 @@ public:
 } // End of namespace MADS
 
 #endif /* MADS_DRAGONSPHERE_SCENES_H */
+
+#endif
diff --git a/engines/mads/dragonsphere/dragonsphere_scenes1.cpp b/engines/mads/dragonsphere/dragonsphere_scenes1.cpp
index 2c5b07b08b..594ad494b5 100644
--- a/engines/mads/dragonsphere/dragonsphere_scenes1.cpp
+++ b/engines/mads/dragonsphere/dragonsphere_scenes1.cpp
@@ -20,7 +20,8 @@
  *
  */
 
-#include "common/scummsys.h"
+#ifdef ENABLE_MADSV2
+
 #include "mads/mads.h"
 #include "mads/conversations.h"
 #include "mads/scene.h"
@@ -3691,3 +3692,5 @@ void Scene105::handleConversation() {
 
 } // End of namespace Dragonsphere
 } // End of namespace MADS
+
+#endif
diff --git a/engines/mads/dragonsphere/dragonsphere_scenes1.h b/engines/mads/dragonsphere/dragonsphere_scenes1.h
index 4c3983311b..7ec33f49dc 100644
--- a/engines/mads/dragonsphere/dragonsphere_scenes1.h
+++ b/engines/mads/dragonsphere/dragonsphere_scenes1.h
@@ -20,13 +20,12 @@
  *
  */
 
+#ifdef ENABLE_MADSV2
+
 #ifndef MADS_DRAGON_SCENES1_H
 #define MADS_DRAGON_SCENES1_H
 
-#include "common/scummsys.h"
 #include "common/serializer.h"
-#include "mads/game.h"
-#include "mads/scene.h"
 #include "mads/dragonsphere/dragonsphere_scenes.h"
 
 namespace MADS {
@@ -186,3 +185,5 @@ public:
 } // End of namespace MADS
 
 #endif /* MADS_DRAGON_SCENES1_H */
+
+#endif
diff --git a/engines/mads/dragonsphere/game_dragonsphere.cpp b/engines/mads/dragonsphere/game_dragonsphere.cpp
index f528056a54..92d79bee94 100644
--- a/engines/mads/dragonsphere/game_dragonsphere.cpp
+++ b/engines/mads/dragonsphere/game_dragonsphere.cpp
@@ -20,7 +20,8 @@
  *
  */
 
-#include "common/scummsys.h"
+#ifdef ENABLE_MADSV2
+
 #include "common/config-manager.h"
 #include "mads/mads.h"
 #include "mads/game.h"
@@ -161,3 +162,5 @@ void GameDragonsphere::synchronize(Common::Serializer &s, bool phase1) {
 } // End of namespace Dragonsphere
 
 } // End of namespace MADS
+
+#endif
diff --git a/engines/mads/dragonsphere/game_dragonsphere.h b/engines/mads/dragonsphere/game_dragonsphere.h
index 6bd6d5d941..bb570a1aa2 100644
--- a/engines/mads/dragonsphere/game_dragonsphere.h
+++ b/engines/mads/dragonsphere/game_dragonsphere.h
@@ -20,10 +20,11 @@
  *
  */
 
+#ifdef ENABLE_MADSV2
+
 #ifndef MADS_GAME_DRAGONSPHERE_H
 #define MADS_GAME_DRAGONSPHERE_H
 
-#include "common/scummsys.h"
 #include "mads/game.h"
 #include "mads/globals.h"
 #include "mads/dragonsphere/globals_dragonsphere.h"
@@ -140,3 +141,5 @@ typedef Section1Handler Section8Handler;
 } // End of namespace MADS
 
 #endif /* MADS_GAME_DRAGONSPHERE_H */
+
+#endif
diff --git a/engines/mads/dragonsphere/globals_dragonsphere.cpp b/engines/mads/dragonsphere/globals_dragonsphere.cpp
index 63319d7223..248ec30716 100644
--- a/engines/mads/dragonsphere/globals_dragonsphere.cpp
+++ b/engines/mads/dragonsphere/globals_dragonsphere.cpp
@@ -20,8 +20,8 @@
  *
  */
 
-#include "common/scummsys.h"
-#include "common/config-manager.h"
+#ifdef ENABLE_MADSV2
+
 #include "mads/dragonsphere/globals_dragonsphere.h"
 
 namespace MADS {
@@ -49,3 +49,5 @@ void DragonsphereGlobals::synchronize(Common::Serializer &s) {
 } // End of namespace Dragonsphere
 
 } // End of namespace MADS
+
+#endif
diff --git a/engines/mads/dragonsphere/globals_dragonsphere.h b/engines/mads/dragonsphere/globals_dragonsphere.h
index 03ab24065e..14825935bc 100644
--- a/engines/mads/dragonsphere/globals_dragonsphere.h
+++ b/engines/mads/dragonsphere/globals_dragonsphere.h
@@ -20,11 +20,11 @@
  *
  */
 
+#ifdef ENABLE_MADSV2
+
 #ifndef MADS_GLOBALS_DRAGONSPHERE_H
 #define MADS_GLOBALS_DRAGONSPHERE_H
 
-#include "common/scummsys.h"
-#include "common/array.h"
 #include "mads/game.h"
 #include "mads/resources.h"
 
@@ -182,3 +182,5 @@ public:
 } // End of namespace MADS
 
 #endif /* MADS_GLOBALS_DRAGONSPHERE_H */
+
+#endif
diff --git a/engines/mads/game.cpp b/engines/mads/game.cpp
index 47ccd05dba..b9faabbe86 100644
--- a/engines/mads/game.cpp
+++ b/engines/mads/game.cpp
@@ -45,10 +45,12 @@ Game *Game::init(MADSEngine *vm) {
 	switch (vm->getGameID()) {
 	case GType_RexNebular:
 		return new Nebular::GameNebular(vm);
+#ifdef ENABLE_MADSV2
 	case GType_Dragonsphere:
 		return new Dragonsphere::GameDragonsphere(vm);
 	case GType_Phantom:
 		return new Phantom::GamePhantom(vm);
+#endif
 	default:
 		error("Game: Unknown game");
 	}
diff --git a/engines/mads/phantom/game_phantom.cpp b/engines/mads/phantom/game_phantom.cpp
index 8063ef9062..682ad00347 100644
--- a/engines/mads/phantom/game_phantom.cpp
+++ b/engines/mads/phantom/game_phantom.cpp
@@ -20,8 +20,8 @@
  *
  */
 
-#include "common/scummsys.h"
-#include "common/config-manager.h"
+#ifdef ENABLE_MADSV2
+
 #include "mads/mads.h"
 #include "mads/game.h"
 #include "mads/screen.h"
@@ -946,3 +946,5 @@ void GamePhantom::newCatacombRoom(int toRoom, int fromExit) {
 } // End of namespace Phantom
 
 } // End of namespace MADS
+
+#endif
diff --git a/engines/mads/phantom/game_phantom.h b/engines/mads/phantom/game_phantom.h
index b3c446f11c..b5f5130bac 100644
--- a/engines/mads/phantom/game_phantom.h
+++ b/engines/mads/phantom/game_phantom.h
@@ -20,10 +20,11 @@
  *
  */
 
+#ifdef ENABLE_MADSV2
+
 #ifndef MADS_GAME_PHANTOM_H
 #define MADS_GAME_PHANTOM_H
 
-#include "common/scummsys.h"
 #include "mads/game.h"
 #include "mads/globals.h"
 #include "mads/phantom/globals_phantom.h"
@@ -152,3 +153,5 @@ typedef Section1Handler Section5Handler;
 } // End of namespace MADS
 
 #endif /* MADS_GAME_PHANTOM_H */
+
+#endif
diff --git a/engines/mads/phantom/globals_phantom.cpp b/engines/mads/phantom/globals_phantom.cpp
index feb3dfff0c..5d9f8822dd 100644
--- a/engines/mads/phantom/globals_phantom.cpp
+++ b/engines/mads/phantom/globals_phantom.cpp
@@ -20,8 +20,8 @@
  *
  */
 
-#include "common/scummsys.h"
-#include "common/config-manager.h"
+#ifdef ENABLE_MADSV2
+
 #include "mads/phantom/globals_phantom.h"
 
 namespace MADS {
@@ -48,3 +48,5 @@ void PhantomGlobals::synchronize(Common::Serializer &s) {
 } // End of namespace Phantom
 
 } // End of namespace MADS
+
+#endif
diff --git a/engines/mads/phantom/globals_phantom.h b/engines/mads/phantom/globals_phantom.h
index 2ce2cd4024..74e50a6f1f 100644
--- a/engines/mads/phantom/globals_phantom.h
+++ b/engines/mads/phantom/globals_phantom.h
@@ -20,11 +20,11 @@
  *
  */
 
+#ifdef ENABLE_MADSV2
+
 #ifndef MADS_GLOBALS_PHANTOM_H
 #define MADS_GLOBALS_PHANTOM_H
 
-#include "common/scummsys.h"
-#include "common/array.h"
 #include "mads/game.h"
 #include "mads/resources.h"
 
@@ -153,3 +153,5 @@ public:
 } // End of namespace MADS
 
 #endif /* MADS_GLOBALS_PHANTOM_H */
+
+#endif
diff --git a/engines/mads/phantom/phantom_scenes.cpp b/engines/mads/phantom/phantom_scenes.cpp
index bfb521e369..cfe1d76da1 100644
--- a/engines/mads/phantom/phantom_scenes.cpp
+++ b/engines/mads/phantom/phantom_scenes.cpp
@@ -20,7 +20,8 @@
  *
  */
 
-#include "common/scummsys.h"
+#ifdef ENABLE_MADSV2
+
 #include "common/config-manager.h"
 #include "mads/mads.h"
 #include "mads/compression.h"
@@ -211,3 +212,5 @@ void SceneInfoPhantom::loadCodes(BaseSurface &depthSurface, Common::SeekableRead
 } // End of namespace Phantom
 
 } // End of namespace MADS
+
+#endif
diff --git a/engines/mads/phantom/phantom_scenes.h b/engines/mads/phantom/phantom_scenes.h
index 8d0555cac1..27bec85c15 100644
--- a/engines/mads/phantom/phantom_scenes.h
+++ b/engines/mads/phantom/phantom_scenes.h
@@ -20,11 +20,11 @@
  *
  */
 
+#ifdef ENABLE_MADSV2
+
 #ifndef MADS_PHANTOM_SCENES_H
 #define MADS_PHANTOM_SCENES_H
 
-#include "common/scummsys.h"
-#include "mads/game.h"
 #include "mads/scene.h"
 #include "mads/phantom/game_phantom.h"
 //#include "mads/phantom/globals_phantom.h"
@@ -488,3 +488,5 @@ protected:
 } // End of namespace MADS
 
 #endif /* MADS_PHANTOM_SCENES_H */
+
+#endif
diff --git a/engines/mads/phantom/phantom_scenes1.cpp b/engines/mads/phantom/phantom_scenes1.cpp
index 0397f17a7c..5e5803fc01 100644
--- a/engines/mads/phantom/phantom_scenes1.cpp
+++ b/engines/mads/phantom/phantom_scenes1.cpp
@@ -20,7 +20,8 @@
  *
  */
 
-#include "common/scummsys.h"
+#ifdef ENABLE_MADSV2
+
 #include "mads/mads.h"
 #include "mads/conversations.h"
 #include "mads/scene.h"
@@ -9575,3 +9576,5 @@ void Scene150::preActions() {
 
 } // End of namespace Phantom
 } // End of namespace MADS
+
+#endif
diff --git a/engines/mads/phantom/phantom_scenes1.h b/engines/mads/phantom/phantom_scenes1.h
index d8f24d49b7..afcb75033c 100644
--- a/engines/mads/phantom/phantom_scenes1.h
+++ b/engines/mads/phantom/phantom_scenes1.h
@@ -20,13 +20,12 @@
  *
  */
 
+#ifdef ENABLE_MADSV2
+
 #ifndef MADS_PHANTOM_SCENES1_H
 #define MADS_PHANTOM_SCENES1_H
 
-#include "common/scummsys.h"
 #include "common/serializer.h"
-#include "mads/game.h"
-#include "mads/scene.h"
 #include "mads/phantom/phantom_scenes.h"
 
 namespace MADS {
@@ -419,3 +418,5 @@ public:
 } // End of namespace MADS
 
 #endif /* MADS_PHANTOM_SCENES1_H */
+
+#endif
diff --git a/engines/mads/phantom/phantom_scenes2.cpp b/engines/mads/phantom/phantom_scenes2.cpp
index 12200523db..2a806e6580 100644
--- a/engines/mads/phantom/phantom_scenes2.cpp
+++ b/engines/mads/phantom/phantom_scenes2.cpp
@@ -20,7 +20,8 @@
  *
  */
 
-#include "common/scummsys.h"
+#ifdef ENABLE_MADSV2
+
 #include "mads/mads.h"
 #include "mads/conversations.h"
 #include "mads/scene.h"
@@ -7074,3 +7075,5 @@ void Scene250::preActions() {
 
 } // End of namespace Phantom
 } // End of namespace MADS
+
+#endif
diff --git a/engines/mads/phantom/phantom_scenes2.h b/engines/mads/phantom/phantom_scenes2.h
index 8d05dfaf4e..1cb0b211f1 100644
--- a/engines/mads/phantom/phantom_scenes2.h
+++ b/engines/mads/phantom/phantom_scenes2.h
@@ -20,13 +20,12 @@
  *
  */
 
+#ifdef ENABLE_MADSV2
+
 #ifndef MADS_PHANTOM_SCENES2_H
 #define MADS_PHANTOM_SCENES2_H
 
-#include "common/scummsys.h"
 #include "common/serializer.h"
-#include "mads/game.h"
-#include "mads/scene.h"
 #include "mads/phantom/phantom_scenes.h"
 
 namespace MADS {
@@ -305,3 +304,5 @@ public:
 } // End of namespace MADS
 
 #endif /* MADS_PHANTOM_SCENES2_H */
+
+#endif
diff --git a/engines/mads/phantom/phantom_scenes3.cpp b/engines/mads/phantom/phantom_scenes3.cpp
index 44fa96859c..71d007fca5 100644
--- a/engines/mads/phantom/phantom_scenes3.cpp
+++ b/engines/mads/phantom/phantom_scenes3.cpp
@@ -20,10 +20,10 @@
  *
  */
 
-#include "common/scummsys.h"
+#ifdef ENABLE_MADSV2
+
 #include "mads/mads.h"
 #include "mads/conversations.h"
-#include "mads/scene.h"
 #include "mads/phantom/phantom_scenes.h"
 #include "mads/phantom/phantom_scenes3.h"
 
@@ -2777,3 +2777,5 @@ void Scene310::handleLakeAnimation() {
 
 } // End of namespace Phantom
 } // End of namespace MADS
+
+#endif
diff --git a/engines/mads/phantom/phantom_scenes3.h b/engines/mads/phantom/phantom_scenes3.h
index 1b573d0daa..b371a47f07 100644
--- a/engines/mads/phantom/phantom_scenes3.h
+++ b/engines/mads/phantom/phantom_scenes3.h
@@ -20,13 +20,12 @@
  *
  */
 
+#ifdef ENABLE_MADSV2
+
 #ifndef MADS_PHANTOM_SCENES3_H
 #define MADS_PHANTOM_SCENES3_H
 
-#include "common/scummsys.h"
 #include "common/serializer.h"
-#include "mads/game.h"
-#include "mads/scene.h"
 #include "mads/phantom/phantom_scenes.h"
 
 namespace MADS {
@@ -246,3 +245,5 @@ public:
 } // End of namespace MADS
 
 #endif /* MADS_PHANTOM_SCENES3_H */
+
+#endif
diff --git a/engines/mads/phantom/phantom_scenes4.cpp b/engines/mads/phantom/phantom_scenes4.cpp
index 56764ac379..5b05c5e161 100644
--- a/engines/mads/phantom/phantom_scenes4.cpp
+++ b/engines/mads/phantom/phantom_scenes4.cpp
@@ -20,10 +20,10 @@
  *
  */
 
-#include "common/scummsys.h"
+#ifdef ENABLE_MADSV2
+
 #include "mads/mads.h"
 #include "mads/conversations.h"
-#include "mads/scene.h"
 #include "mads/phantom/phantom_scenes.h"
 #include "mads/phantom/phantom_scenes4.h"
 
@@ -4975,3 +4975,5 @@ void Scene456::preActions() {
 
 } // End of namespace Phantom
 } // End of namespace MADS
+
+#endif
diff --git a/engines/mads/phantom/phantom_scenes4.h b/engines/mads/phantom/phantom_scenes4.h
index 665d791ad3..d80ad9a0bf 100644
--- a/engines/mads/phantom/phantom_scenes4.h
+++ b/engines/mads/phantom/phantom_scenes4.h
@@ -20,13 +20,12 @@
  *
  */
 
+#ifdef ENABLE_MADSV2
+
 #ifndef MADS_PHANTOM_SCENES4_H
 #define MADS_PHANTOM_SCENES4_H
 
-#include "common/scummsys.h"
 #include "common/serializer.h"
-#include "mads/game.h"
-#include "mads/scene.h"
 #include "mads/phantom/phantom_scenes.h"
 
 namespace MADS {
@@ -263,3 +262,5 @@ public:
 } // End of namespace MADS
 
 #endif /* MADS_PHANTOM_SCENES4_H */
+
+#endif
diff --git a/engines/mads/phantom/phantom_scenes5.cpp b/engines/mads/phantom/phantom_scenes5.cpp
index 36cc4fceb2..91cd8bd1ce 100644
--- a/engines/mads/phantom/phantom_scenes5.cpp
+++ b/engines/mads/phantom/phantom_scenes5.cpp
@@ -20,10 +20,10 @@
  *
  */
 
-#include "common/scummsys.h"
+#ifdef ENABLE_MADSV2
+
 #include "mads/mads.h"
 #include "mads/conversations.h"
-#include "mads/scene.h"
 #include "mads/phantom/phantom_scenes.h"
 #include "mads/phantom/phantom_scenes5.h"
 
@@ -4318,3 +4318,5 @@ void Scene506::preActions() {
 
 } // End of namespace Phantom
 } // End of namespace MADS
+
+#endif
diff --git a/engines/mads/phantom/phantom_scenes5.h b/engines/mads/phantom/phantom_scenes5.h
index b4023f738a..60d93be3b4 100644
--- a/engines/mads/phantom/phantom_scenes5.h
+++ b/engines/mads/phantom/phantom_scenes5.h
@@ -20,13 +20,12 @@
  *
  */
 
+#ifdef ENABLE_MADSV2
+
 #ifndef MADS_PHANTOM_SCENES5_H
 #define MADS_PHANTOM_SCENES5_H
 
-#include "common/scummsys.h"
 #include "common/serializer.h"
-#include "mads/game.h"
-#include "mads/scene.h"
 #include "mads/phantom/phantom_scenes.h"
 
 namespace MADS {
@@ -217,3 +216,5 @@ public:
 } // End of namespace MADS
 
 #endif /* MADS_PHANTOM_SCENES5_H */
+
+#endif
diff --git a/engines/mads/scene.cpp b/engines/mads/scene.cpp
index 66f56f9407..fbbd3b6152 100644
--- a/engines/mads/scene.cpp
+++ b/engines/mads/scene.cpp
@@ -129,12 +129,14 @@ void Scene::loadSceneLogic() {
 	case GType_RexNebular:
 		_sceneLogic = Nebular::SceneFactory::createScene(_vm);
 		break;
+#ifdef ENABLE_MADSV2
 	case GType_Dragonsphere:
 		_sceneLogic = Dragonsphere::SceneFactory::createScene(_vm);
 		break;
 	case GType_Phantom:
 		_sceneLogic = Phantom::SceneFactory::createScene(_vm);
 		break;
+#endif
 	default:
 		error("Scene logic: Unknown game");
 	}
diff --git a/engines/mads/scene_data.cpp b/engines/mads/scene_data.cpp
index d6de28e93d..9f11fa80fd 100644
--- a/engines/mads/scene_data.cpp
+++ b/engines/mads/scene_data.cpp
@@ -116,10 +116,12 @@ SceneInfo *SceneInfo::init(MADSEngine *vm) {
 	switch (vm->getGameID()) {
 	case GType_RexNebular:
 		return new Nebular::SceneInfoNebular(vm);
+#ifdef ENABLE_MADSV2
 	case GType_Dragonsphere:
 		return new Dragonsphere::SceneInfoDragonsphere(vm);
 	case GType_Phantom:
 		return new Phantom::SceneInfoPhantom(vm);
+#endif
 	default:
 		error("SceneInfo: Unknown game");
 	}




More information about the Scummvm-git-logs mailing list