From 0dba551dd55c38d9049a8042d0649f0b1942aca0 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Wed, 2 Jun 2021 14:37:59 +0200 Subject: [PATCH] SAGA2: Further work on include dependency reduction --- engines/saga2/actor.cpp | 1 + engines/saga2/document.h | 1 - engines/saga2/gbevel.h | 3 --- engines/saga2/grabinfo.h | 5 ----- engines/saga2/keybored.cpp | 1 + engines/saga2/mapfeatr.h | 12 +++++------- engines/saga2/mouseimg.h | 2 -- engines/saga2/oncall.h | 2 -- engines/saga2/pool.cpp | 1 + engines/saga2/pool.h | 2 -- engines/saga2/sensor.cpp | 1 + engines/saga2/sensor.h | 2 -- engines/saga2/speldefs.h | 8 ++++---- engines/saga2/tileline.h | 2 -- engines/saga2/tilemode.cpp | 2 ++ engines/saga2/tilemode.h | 4 +++- 16 files changed, 18 insertions(+), 31 deletions(-) diff --git a/engines/saga2/actor.cpp b/engines/saga2/actor.cpp index ec22487a6c5..9b26cc06e9e 100644 --- a/engines/saga2/actor.cpp +++ b/engines/saga2/actor.cpp @@ -47,6 +47,7 @@ #include "saga2/localize.h" #include "saga2/intrface.h" #include "saga2/hresmgr.h" +#include "saga2/contain.h" // Include files needed for SAGA script dispatch #include "saga2/script.h" diff --git a/engines/saga2/document.h b/engines/saga2/document.h index 85f825a1b66..2813326d58c 100644 --- a/engines/saga2/document.h +++ b/engines/saga2/document.h @@ -27,7 +27,6 @@ #ifndef SAGA2_DOCUMENT_H #define SAGA2_DOCUMENT_H -#include "saga2/floating.h" #include "saga2/modal.h" namespace Saga2 { diff --git a/engines/saga2/gbevel.h b/engines/saga2/gbevel.h index 93e8cfb2dac..e0451e2947c 100644 --- a/engines/saga2/gbevel.h +++ b/engines/saga2/gbevel.h @@ -27,9 +27,6 @@ #ifndef SAGA2_GBEVEL_H #define SAGA2_GBEVEL_H -#include "saga2/gdraw.h" -#include "saga2/errors.h" - namespace Saga2 { /* ===================================================================== * diff --git a/engines/saga2/grabinfo.h b/engines/saga2/grabinfo.h index 9bf46551e51..66cf0aa0746 100644 --- a/engines/saga2/grabinfo.h +++ b/engines/saga2/grabinfo.h @@ -27,11 +27,6 @@ #ifndef SAGA2_GRABINFO_H #define SAGA2_GRABINFO_H -#include "saga2/objects.h" -#include "saga2/contain.h" -#include "saga2/uimetrcs.h" - - namespace Saga2 { /* ===================================================================== * class GrabInfo diff --git a/engines/saga2/keybored.cpp b/engines/saga2/keybored.cpp index 24e91b48056..ae16dec486a 100644 --- a/engines/saga2/keybored.cpp +++ b/engines/saga2/keybored.cpp @@ -30,6 +30,7 @@ #include "saga2/tilemode.h" #include "saga2/calender.h" +#include "saga2/objects.h" #include "saga2/tile.h" #include "saga2/setup.h" #include "saga2/grabinfo.h" diff --git a/engines/saga2/mapfeatr.h b/engines/saga2/mapfeatr.h index 506ae7409b8..94d5b973a10 100644 --- a/engines/saga2/mapfeatr.h +++ b/engines/saga2/mapfeatr.h @@ -27,17 +27,15 @@ #ifndef SAGA2_MAPFEATR_H #define SAGA2_MAPFEATR_H -#include "saga2/idtypes.h" -#include "saga2/contain.h" -#include "saga2/cmisc.h" -#include "saga2/button.h" -#include "saga2/intrface.h" -#include "saga2/floating.h" +#include "saga2/rect.h" +#include "saga2/tcoords.h" namespace Saga2 { -#define MAX_MAP_FEATURE_NAME_LENGTH 32 +class gPort; +class gPixelMap; +#define MAX_MAP_FEATURE_NAME_LENGTH 32 /* ===================================================================== * Types diff --git a/engines/saga2/mouseimg.h b/engines/saga2/mouseimg.h index b650cc008af..f9127d98e96 100644 --- a/engines/saga2/mouseimg.h +++ b/engines/saga2/mouseimg.h @@ -27,8 +27,6 @@ #ifndef SAGA2_MOUSEIMG_H #define SAGA2_MOUSEIMG_H -#include "saga2/gdraw.h" - namespace Saga2 { // Set a new image for the mouse pointer diff --git a/engines/saga2/oncall.h b/engines/saga2/oncall.h index da02ca432ed..e3863b54b7e 100644 --- a/engines/saga2/oncall.h +++ b/engines/saga2/oncall.h @@ -28,8 +28,6 @@ #define SAGA2_ONCALL_H #include "saga2/bitarray.h" -#include "saga2/rmem.h" -#include "saga2/localize.h" namespace Saga2 { diff --git a/engines/saga2/pool.cpp b/engines/saga2/pool.cpp index e3a90fbdc0a..f3941181868 100644 --- a/engines/saga2/pool.cpp +++ b/engines/saga2/pool.cpp @@ -27,6 +27,7 @@ #define FORBIDDEN_SYMBOL_ALLOW_ALL // FIXME: Remove #include "saga2/std.h" +#include "saga2/dlist.h" #include "saga2/pool.h" namespace Saga2 { diff --git a/engines/saga2/pool.h b/engines/saga2/pool.h index 6c174f2cdcb..fd48e86f692 100644 --- a/engines/saga2/pool.h +++ b/engines/saga2/pool.h @@ -27,8 +27,6 @@ #ifndef SAGA2_POOL_H #define SAGA2_POOL_H -#include "saga2/dlist.h" - namespace Saga2 { /* ===================================================================== * diff --git a/engines/saga2/sensor.cpp b/engines/saga2/sensor.cpp index c261154b62c..d7ee4e10153 100644 --- a/engines/saga2/sensor.cpp +++ b/engines/saga2/sensor.cpp @@ -27,6 +27,7 @@ #define FORBIDDEN_SYMBOL_ALLOW_ALL // FIXME: Remove #include "saga2/std.h" +#include "saga2/objects.h" #include "saga2/sensor.h" #include "saga2/pool.h" #include "saga2/player.h" diff --git a/engines/saga2/sensor.h b/engines/saga2/sensor.h index fca3722d477..e4a01572339 100644 --- a/engines/saga2/sensor.h +++ b/engines/saga2/sensor.h @@ -27,8 +27,6 @@ #ifndef SAGA2_SENSOR_H #define SAGA2_SENSOR_H -#include "saga2/objects.h" - namespace Saga2 { const uint32 nonActorSenseFlags = actorSeeInvis; diff --git a/engines/saga2/speldefs.h b/engines/saga2/speldefs.h index 5864363ee63..ae691728d7c 100644 --- a/engines/saga2/speldefs.h +++ b/engines/saga2/speldefs.h @@ -32,13 +32,13 @@ namespace Saga2 { -class StorageSpellTarget; +struct StorageSpellTarget; class SpellInstance; -class StorageEffectron; +struct StorageEffectron; class SpellDisplayPrototype; class EffectDisplayPrototype; -class ResourceSpellItem; -class StorageSpellInstance; +struct ResourceSpellItem; +struct StorageSpellInstance; /* ===================================================================== * Constants diff --git a/engines/saga2/tileline.h b/engines/saga2/tileline.h index 71fa158a670..41c3cf06a55 100644 --- a/engines/saga2/tileline.h +++ b/engines/saga2/tileline.h @@ -27,8 +27,6 @@ #ifndef SAGA2_TILELINE_H #define SAGA2_TILELINE_H -#include "saga2/tcoords.h" - namespace Saga2 { #if DEBUG diff --git a/engines/saga2/tilemode.cpp b/engines/saga2/tilemode.cpp index 507707791bc..6aeced3d769 100644 --- a/engines/saga2/tilemode.cpp +++ b/engines/saga2/tilemode.cpp @@ -30,6 +30,7 @@ #include "saga2/tilemode.h" #include "saga2/tile.h" #include "saga2/setup.h" +#include "saga2/objects.h" #include "saga2/grabinfo.h" #include "saga2/mouseimg.h" #include "saga2/motion.h" @@ -51,6 +52,7 @@ #include "saga2/automap.h" #include "saga2/images.h" #include "saga2/config.h" +#include "saga2/contain.h" namespace Saga2 { diff --git a/engines/saga2/tilemode.h b/engines/saga2/tilemode.h index f5c10e15338..e4179adedae 100644 --- a/engines/saga2/tilemode.h +++ b/engines/saga2/tilemode.h @@ -27,11 +27,13 @@ #ifndef SAGA2_TILEMODE_H #define SAGA2_TILEMODE_H -#include "saga2/fta.h" #include "saga2/idtypes.h" namespace Saga2 { +class SaveFileConstructor; +class SaveFileReader; + // Function to enable/disable user interface keys bool enableUIKeys(bool enabled);