[Scummvm-git-logs] scummvm master -> c823f9ba7c0bc8591bb454d841895090258dbd66
grisenti
noreply at scummvm.org
Tue Jun 20 14:10:02 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:
c823f9ba7c HPL1: Remove Hpl1::Std::map
Commit: c823f9ba7c0bc8591bb454d841895090258dbd66
https://github.com/scummvm/scummvm/commit/c823f9ba7c0bc8591bb454d841895090258dbd66
Author: grisenti (emanuele at grisenti.net)
Date: 2023-06-20T16:09:50+02:00
Commit Message:
HPL1: Remove Hpl1::Std::map
Changed paths:
R engines/hpl1/std/map.h
engines/hpl1/engine/ai/AINodeContainer.h
engines/hpl1/engine/ai/StateMachine.h
engines/hpl1/engine/game/Game.cpp
engines/hpl1/engine/game/Game.h
engines/hpl1/engine/game/GameTypes.h
engines/hpl1/engine/game/SaveGame.h
engines/hpl1/engine/game/Updater.h
engines/hpl1/engine/graphics/BackgroundImage.h
engines/hpl1/engine/graphics/Bone.h
engines/hpl1/engine/graphics/ImageEntityData.h
engines/hpl1/engine/graphics/Mesh.h
engines/hpl1/engine/graphics/ParticleEmitter.h
engines/hpl1/engine/graphics/Skeleton.h
engines/hpl1/engine/gui/Gui.h
engines/hpl1/engine/gui/GuiSkin.h
engines/hpl1/engine/input/Input.h
engines/hpl1/engine/libraries/angelscript/add-ons/scriptstdstring.cpp
engines/hpl1/engine/math/Math.cpp
engines/hpl1/engine/physics/Body2D.h
engines/hpl1/engine/physics/Physics.h
engines/hpl1/engine/physics/PhysicsJoint.h
engines/hpl1/engine/physics/PhysicsWorld.h
engines/hpl1/engine/resources/FileSearcher.h
engines/hpl1/engine/resources/ImageManager.h
engines/hpl1/engine/resources/LanguageFile.h
engines/hpl1/engine/resources/ParticleManager.h
engines/hpl1/engine/resources/ResourceManager.h
engines/hpl1/engine/resources/Resources.h
engines/hpl1/engine/resources/TextureManager.h
engines/hpl1/engine/scene/GridMap2D.h
engines/hpl1/engine/scene/MeshEntity.h
engines/hpl1/engine/scene/MultiImageEntity.h
engines/hpl1/engine/scene/PortalContainer.h
engines/hpl1/engine/scene/SectorVisibility.h
engines/hpl1/engine/scene/SubMeshEntity.h
engines/hpl1/engine/scene/World2D.h
engines/hpl1/engine/scene/World3D.h
engines/hpl1/engine/sound/SoundHandler.h
engines/hpl1/engine/system/Container.h
engines/hpl1/engine/system/MemoryManager.h
engines/hpl1/engine/system/SerializeClass.h
engines/hpl1/penumbra-overture/GameEntity.h
engines/hpl1/penumbra-overture/GameTypes.h
engines/hpl1/penumbra-overture/PlayerHands.h
diff --git a/engines/hpl1/engine/ai/AINodeContainer.h b/engines/hpl1/engine/ai/AINodeContainer.h
index 1148a96d432..3eef34974e4 100644
--- a/engines/hpl1/engine/ai/AINodeContainer.h
+++ b/engines/hpl1/engine/ai/AINodeContainer.h
@@ -92,7 +92,7 @@ typedef tAINodeVec::iterator tAINodeVecIt;
typedef Common::List<cAINode *> tAINodeList;
typedef tAINodeList::iterator tAINodeListIt;
-typedef Hpl1::Std::map<tString, cAINode *> tAINodeMap;
+typedef Common::StableMap<tString, cAINode *> tAINodeMap;
typedef tAINodeMap::iterator tAINodeMapIt;
//--------------------------------
diff --git a/engines/hpl1/engine/ai/StateMachine.h b/engines/hpl1/engine/ai/StateMachine.h
index f5e8105aec4..62810d32384 100644
--- a/engines/hpl1/engine/ai/StateMachine.h
+++ b/engines/hpl1/engine/ai/StateMachine.h
@@ -31,7 +31,7 @@
#include "hpl1/engine/game/GameTypes.h"
#include "hpl1/engine/system/SystemTypes.h"
-#include "hpl1/std/map.h"
+#include "common/stablemap.h"
namespace hpl {
@@ -69,7 +69,7 @@ private:
float mfTimeCount;
};
-typedef Hpl1::Std::map<int, iAIState *> tAIStateMap;
+typedef Common::StableMap<int, iAIState *> tAIStateMap;
typedef tAIStateMap::iterator tAIStateMapIt;
//-----------------------------------------
diff --git a/engines/hpl1/engine/game/Game.cpp b/engines/hpl1/engine/game/Game.cpp
index 0fee2273aa9..efa977e1832 100644
--- a/engines/hpl1/engine/game/Game.cpp
+++ b/engines/hpl1/engine/game/Game.cpp
@@ -93,7 +93,7 @@ cSetupVarContainer::cSetupVarContainer() {
//-----------------------------------------------------------------------
void cSetupVarContainer::AddString(const tString &asName, const tString &asValue) {
- Hpl1::Std::map<tString, tString>::value_type val(asName, asValue);
+ Common::StableMap<tString, tString>::value_type val(asName, asValue);
m_mapVars.insert(val);
}
@@ -110,7 +110,7 @@ void cSetupVarContainer::AddBool(const tString &asName, bool abValue) {
//-----------------------------------------------------------------------
const tString &cSetupVarContainer::GetString(const tString &asName) {
- Hpl1::Std::map<tString, tString>::iterator it = m_mapVars.find(asName);
+ Common::StableMap<tString, tString>::iterator it = m_mapVars.find(asName);
if (it == m_mapVars.end())
return msBlank;
else
diff --git a/engines/hpl1/engine/game/Game.h b/engines/hpl1/engine/game/Game.h
index 4b65f7da95e..a98b6704862 100644
--- a/engines/hpl1/engine/game/Game.h
+++ b/engines/hpl1/engine/game/Game.h
@@ -82,7 +82,7 @@ public:
bool GetBool(const tString &asName, bool abDefault);
private:
- Hpl1::Std::map<tString, tString> m_mapVars;
+ Common::StableMap<tString, tString> m_mapVars;
tString msBlank;
};
diff --git a/engines/hpl1/engine/game/GameTypes.h b/engines/hpl1/engine/game/GameTypes.h
index d58fec19850..4d050fd78aa 100644
--- a/engines/hpl1/engine/game/GameTypes.h
+++ b/engines/hpl1/engine/game/GameTypes.h
@@ -29,7 +29,7 @@
#define HPL_GAME_TYPES_H
#include "hpl1/engine/system/SerializeClass.h"
-#include "hpl1/std/map.h"
+#include "common/stablemap.h"
namespace hpl {
@@ -40,7 +40,7 @@ class cScriptVar : public iSerializable {
int mlVal;
};
-typedef Hpl1::Std::map<tString, cScriptVar> tScriptVarMap;
+typedef Common::StableMap<tString, cScriptVar> tScriptVarMap;
typedef tScriptVarMap::iterator tScriptVarMapIt;
} // namespace hpl
diff --git a/engines/hpl1/engine/game/SaveGame.h b/engines/hpl1/engine/game/SaveGame.h
index 2e5b78a7703..3b08eff2284 100644
--- a/engines/hpl1/engine/game/SaveGame.h
+++ b/engines/hpl1/engine/game/SaveGame.h
@@ -30,7 +30,7 @@
#include "hpl1/engine/system/SerializeClass.h"
#include "hpl1/engine/system/SystemTypes.h"
-#include "hpl1/std/map.h"
+#include "common/stablemap.h"
#include "common/multimap.h"
class TiXmlElement;
diff --git a/engines/hpl1/engine/game/Updater.h b/engines/hpl1/engine/game/Updater.h
index e1676b622f9..52be1aeb743 100644
--- a/engines/hpl1/engine/game/Updater.h
+++ b/engines/hpl1/engine/game/Updater.h
@@ -30,7 +30,7 @@
#include "common/list.h"
#include "hpl1/engine/system/SystemTypes.h"
-#include "hpl1/std/map.h"
+#include "common/stablemap.h"
namespace hpl {
@@ -40,7 +40,7 @@ class LowLevelSystem;
typedef Common::List<iUpdateable *> tUpdateableList;
typedef tUpdateableList::iterator tUpdateableListIt;
-typedef Hpl1::Std::map<tString, tUpdateableList> tUpdateContainerMap;
+typedef Common::StableMap<tString, tUpdateableList> tUpdateContainerMap;
typedef tUpdateContainerMap::iterator tUpdateContainerMapIt;
class cUpdater {
diff --git a/engines/hpl1/engine/graphics/BackgroundImage.h b/engines/hpl1/engine/graphics/BackgroundImage.h
index 04a0d9ef18d..1972ac4d40a 100644
--- a/engines/hpl1/engine/graphics/BackgroundImage.h
+++ b/engines/hpl1/engine/graphics/BackgroundImage.h
@@ -31,7 +31,7 @@
#include "hpl1/engine/graphics/GraphicsTypes.h"
#include "hpl1/engine/graphics/Material.h"
#include "hpl1/engine/math/MathTypes.h"
-#include "hpl1/std/map.h"
+#include "common/stablemap.h"
namespace hpl {
@@ -57,7 +57,7 @@ private:
cVector2f mvVel;
};
-typedef Hpl1::Std::map<float, cBackgroundImage *> tBackgroundImageMap;
+typedef Common::StableMap<float, cBackgroundImage *> tBackgroundImageMap;
typedef tBackgroundImageMap::iterator tBackgroundImageMapIt;
} // namespace hpl
diff --git a/engines/hpl1/engine/graphics/Bone.h b/engines/hpl1/engine/graphics/Bone.h
index 310a61fb730..f948eec809d 100644
--- a/engines/hpl1/engine/graphics/Bone.h
+++ b/engines/hpl1/engine/graphics/Bone.h
@@ -32,7 +32,7 @@
#include "hpl1/engine/graphics/GraphicsTypes.h"
#include "hpl1/engine/math/MathTypes.h"
#include "hpl1/engine/system/SystemTypes.h"
-#include "hpl1/std/map.h"
+#include "common/stablemap.h"
namespace hpl {
diff --git a/engines/hpl1/engine/graphics/ImageEntityData.h b/engines/hpl1/engine/graphics/ImageEntityData.h
index d36c0828ea6..b0550682b5e 100644
--- a/engines/hpl1/engine/graphics/ImageEntityData.h
+++ b/engines/hpl1/engine/graphics/ImageEntityData.h
@@ -32,7 +32,7 @@
#include "hpl1/engine/math/MathTypes.h"
#include "hpl1/engine/resources/ResourceBase.h"
#include "hpl1/engine/system/SystemTypes.h"
-#include "hpl1/std/map.h"
+#include "common/stablemap.h"
class TiXmlElement;
@@ -64,7 +64,7 @@ public:
tString msSound;
};
-typedef Hpl1::Std::map<tString, cImageAnimation> tImageAnimationMap;
+typedef Common::StableMap<tString, cImageAnimation> tImageAnimationMap;
typedef tImageAnimationMap::iterator tImageAnimationMapIt;
class cImageEntityData : public iResourceBase {
diff --git a/engines/hpl1/engine/graphics/Mesh.h b/engines/hpl1/engine/graphics/Mesh.h
index bfff11d4634..d3b9f66da35 100644
--- a/engines/hpl1/engine/graphics/Mesh.h
+++ b/engines/hpl1/engine/graphics/Mesh.h
@@ -38,7 +38,7 @@
#include "common/array.h"
#include "hpl1/engine/scene/Light3D.h"
-#include "hpl1/std/map.h"
+#include "common/stablemap.h"
#include "common/multimap.h"
namespace hpl {
@@ -65,7 +65,7 @@ class cWorld3D;
typedef Common::Array<cAnimation *> tAnimationVec;
typedef tAnimationVec::iterator tAnimationVecIt;
-typedef Hpl1::Std::map<tString, int> tAnimationIndexMap;
+typedef Common::StableMap<tString, int> tAnimationIndexMap;
typedef tAnimationIndexMap::iterator tAnimationIndexMapIt;
typedef Common::Array<cSubMesh *> tSubMeshVec;
diff --git a/engines/hpl1/engine/graphics/ParticleEmitter.h b/engines/hpl1/engine/graphics/ParticleEmitter.h
index c91f5bfd061..14a4e567bda 100644
--- a/engines/hpl1/engine/graphics/ParticleEmitter.h
+++ b/engines/hpl1/engine/graphics/ParticleEmitter.h
@@ -34,7 +34,7 @@
#include "hpl1/engine/graphics/Material.h"
#include "hpl1/engine/math/MathTypes.h"
#include "hpl1/engine/system/SystemTypes.h"
-#include "hpl1/std/map.h"
+#include "common/stablemap.h"
namespace hpl {
@@ -233,7 +233,7 @@ protected:
float mfWarmUpStepsPerSec;
};
-typedef Hpl1::Std::map<tString, iParticleEmitterData *> tParticleEmitterDataMap;
+typedef Common::StableMap<tString, iParticleEmitterData *> tParticleEmitterDataMap;
typedef tParticleEmitterDataMap::iterator tParticleEmitterDataMapIt;
} // namespace hpl
diff --git a/engines/hpl1/engine/graphics/Skeleton.h b/engines/hpl1/engine/graphics/Skeleton.h
index e950ab481cd..9634a01d7c6 100644
--- a/engines/hpl1/engine/graphics/Skeleton.h
+++ b/engines/hpl1/engine/graphics/Skeleton.h
@@ -31,7 +31,7 @@
#include "hpl1/engine/graphics/GraphicsTypes.h"
#include "hpl1/engine/math/MathTypes.h"
#include "hpl1/engine/system/SystemTypes.h"
-#include "hpl1/std/map.h"
+#include "common/stablemap.h"
namespace hpl {
@@ -40,7 +40,7 @@ class cBone;
typedef Common::Array<cBone *> tBoneVec;
typedef tBoneVec::iterator tBoneVecIt;
-typedef Hpl1::Std::map<tString, int> tBoneIdxNameMap;
+typedef Common::StableMap<tString, int> tBoneIdxNameMap;
typedef tBoneIdxNameMap::iterator tBoneIdxNameMapIt;
class cSkeleton {
diff --git a/engines/hpl1/engine/gui/Gui.h b/engines/hpl1/engine/gui/Gui.h
index 8fa2e31fddf..3207e08aad1 100644
--- a/engines/hpl1/engine/gui/Gui.h
+++ b/engines/hpl1/engine/gui/Gui.h
@@ -32,7 +32,7 @@
#include "hpl1/engine/gui/GuiTypes.h"
#include "hpl1/engine/system/SystemTypes.h"
-#include "hpl1/std/map.h"
+#include "common/stablemap.h"
namespace hpl {
@@ -49,23 +49,23 @@ class iGuiMaterial;
//------------------------------------------------
-typedef Hpl1::Std::map<tString, cGuiSet *> tGuiSetMap;
+typedef Common::StableMap<tString, cGuiSet *> tGuiSetMap;
typedef tGuiSetMap::iterator tGuiSetMapIt;
//-------------------------------------
-typedef Hpl1::Std::map<tString, cGuiSkin *> tGuiSkinMap;
+typedef Common::StableMap<tString, cGuiSkin *> tGuiSkinMap;
typedef tGuiSkinMap::iterator tGuiSkinMapIt;
//-------------------------------------
-typedef Hpl1::Std::map<tString, eGuiSkinGfx> tGuiSkinGfxMap;
+typedef Common::StableMap<tString, eGuiSkinGfx> tGuiSkinGfxMap;
typedef tGuiSkinGfxMap::iterator tGuiSkinGfxMapIt;
-typedef Hpl1::Std::map<tString, eGuiSkinFont> tGuiSkinFontMap;
+typedef Common::StableMap<tString, eGuiSkinFont> tGuiSkinFontMap;
typedef tGuiSkinFontMap::iterator tGuiSkinFontMapIt;
-typedef Hpl1::Std::map<tString, eGuiSkinAttribute> tGuiSkinAttributeMap;
+typedef Common::StableMap<tString, eGuiSkinAttribute> tGuiSkinAttributeMap;
typedef tGuiSkinAttributeMap::iterator tGuiSkinAttributeMapIt;
//------------------------------------------------
diff --git a/engines/hpl1/engine/gui/GuiSkin.h b/engines/hpl1/engine/gui/GuiSkin.h
index f5c658c8e77..94f486c81af 100644
--- a/engines/hpl1/engine/gui/GuiSkin.h
+++ b/engines/hpl1/engine/gui/GuiSkin.h
@@ -29,7 +29,7 @@
#define HPL_GUI_SKIN_H
#include "hpl1/engine/gui/GuiTypes.h"
-#include "hpl1/std/map.h"
+#include "common/stablemap.h"
namespace hpl {
diff --git a/engines/hpl1/engine/input/Input.h b/engines/hpl1/engine/input/Input.h
index a42b8f60566..48f5640d5a5 100644
--- a/engines/hpl1/engine/input/Input.h
+++ b/engines/hpl1/engine/input/Input.h
@@ -32,7 +32,7 @@
#include "hpl1/engine/game/Updateable.h"
#include "hpl1/engine/input/InputTypes.h"
#include "hpl1/engine/system/SystemTypes.h"
-#include "hpl1/std/map.h"
+#include "common/stablemap.h"
#include "common/multimap.h"
namespace hpl {
@@ -43,7 +43,7 @@ class LowLevelInput;
class iInputDevice;
class iAction;
-typedef Hpl1::Std::map<tString, iAction *> tActionMap;
+typedef Common::StableMap<tString, iAction *> tActionMap;
typedef tActionMap::iterator tActionMapIt;
typedef Common::MultiMap<tString, iAction *> tActionMultiMap;
diff --git a/engines/hpl1/engine/libraries/angelscript/add-ons/scriptstdstring.cpp b/engines/hpl1/engine/libraries/angelscript/add-ons/scriptstdstring.cpp
index c3b550fffb7..040249c1d70 100644
--- a/engines/hpl1/engine/libraries/angelscript/add-ons/scriptstdstring.cpp
+++ b/engines/hpl1/engine/libraries/angelscript/add-ons/scriptstdstring.cpp
@@ -4,7 +4,7 @@
#endif
#include "common/str.h"
-#include "hpl1/std/map.h"
+#include "common/stablemap.h"
#include "hpl1/debug.h"
// This macro is used to avoid warnings about unused variables.
@@ -12,12 +12,12 @@
#define UNUSED_VAR(x) (void)(x)
struct StrComp {
- bool operator()(const Common::String *a, const Common::String *b) {
+ bool operator()(const Common::String *a, const Common::String *b) const {
return *a < *b;
}
};
-using map_t = Hpl1::Std::map<const Common::String *, int, StrComp>;
+using map_t = Common::StableMap<const Common::String *, int, StrComp>;
BEGIN_AS_NAMESPACE
class CStdStringFactory : public asIStringFactory {
diff --git a/engines/hpl1/engine/math/Math.cpp b/engines/hpl1/engine/math/Math.cpp
index 96598d7c4b6..a6577ad3196 100644
--- a/engines/hpl1/engine/math/Math.cpp
+++ b/engines/hpl1/engine/math/Math.cpp
@@ -1389,7 +1389,7 @@ public:
tUIntList mlstIndices;
};
-typedef Hpl1::Std::map<cVector3f, cVertexIndices> tVtxIdxMap;
+typedef Common::StableMap<cVector3f, cVertexIndices> tVtxIdxMap;
typedef tVtxIdxMap::iterator tVtxIdxMapIt;
//////////////////////////////////////////////////////
diff --git a/engines/hpl1/engine/physics/Body2D.h b/engines/hpl1/engine/physics/Body2D.h
index 4b4aab2afc8..82fe5ca5e8d 100644
--- a/engines/hpl1/engine/physics/Body2D.h
+++ b/engines/hpl1/engine/physics/Body2D.h
@@ -32,7 +32,7 @@
#include "common/list.h"
#include "hpl1/engine/scene/Entity2D.h"
-#include "hpl1/std/map.h"
+#include "common/stablemap.h"
namespace hpl {
diff --git a/engines/hpl1/engine/physics/Physics.h b/engines/hpl1/engine/physics/Physics.h
index 67ad7656537..dc5eb2ad1b1 100644
--- a/engines/hpl1/engine/physics/Physics.h
+++ b/engines/hpl1/engine/physics/Physics.h
@@ -32,7 +32,7 @@
#include "hpl1/engine/game/Updateable.h"
#include "hpl1/engine/physics/PhysicsMaterial.h"
#include "hpl1/engine/system/SystemTypes.h"
-#include "hpl1/std/map.h"
+#include "common/stablemap.h"
namespace hpl {
@@ -47,7 +47,7 @@ class cResources;
typedef Common::List<iPhysicsWorld *> tPhysicsWorldList;
typedef tPhysicsWorldList::iterator tPhysicsWorldListIt;
-typedef Hpl1::Std::map<tString, cSurfaceData *> tSurfaceDataMap;
+typedef Common::StableMap<tString, cSurfaceData *> tSurfaceDataMap;
typedef tSurfaceDataMap::iterator tSurfaceDataMapIt;
//------------------------------------------------
diff --git a/engines/hpl1/engine/physics/PhysicsJoint.h b/engines/hpl1/engine/physics/PhysicsJoint.h
index 9e509a001a9..351a2a519b0 100644
--- a/engines/hpl1/engine/physics/PhysicsJoint.h
+++ b/engines/hpl1/engine/physics/PhysicsJoint.h
@@ -30,7 +30,7 @@
#include "hpl1/engine/math/MathTypes.h"
#include "hpl1/engine/system/SystemTypes.h"
-#include "hpl1/std/map.h"
+#include "common/stablemap.h"
#include "hpl1/engine/game/SaveGame.h"
@@ -44,7 +44,7 @@ class cSoundEntity;
class iPhysicsJoint;
class iPhysicsController;
-typedef Hpl1::Std::map<tString, iPhysicsController *> tPhysicsControllerMap;
+typedef Common::StableMap<tString, iPhysicsController *> tPhysicsControllerMap;
typedef tPhysicsControllerMap::iterator tPhysicsControllerMapIt;
typedef cSTLMapIterator<iPhysicsController *, tPhysicsControllerMap, tPhysicsControllerMapIt> cPhysicsControllerIterator;
diff --git a/engines/hpl1/engine/physics/PhysicsWorld.h b/engines/hpl1/engine/physics/PhysicsWorld.h
index 5b702a1859f..7347e9a5874 100644
--- a/engines/hpl1/engine/physics/PhysicsWorld.h
+++ b/engines/hpl1/engine/physics/PhysicsWorld.h
@@ -31,7 +31,7 @@
#include "hpl1/engine/graphics/GraphicsTypes.h"
#include "hpl1/engine/math/MathTypes.h"
#include "hpl1/engine/system/SystemTypes.h"
-#include "hpl1/std/map.h"
+#include "common/stablemap.h"
#include "hpl1/engine/physics/CollideData.h"
@@ -72,7 +72,7 @@ typedef tPhysicsControllerList::iterator tPhysicsControllerListIt;
typedef Common::List<iCharacterBody *> tCharacterBodyList;
typedef tCharacterBodyList::iterator tCharacterBodyListIt;
-typedef Hpl1::Std::map<tString, iPhysicsMaterial *> tPhysicsMaterialMap;
+typedef Common::StableMap<tString, iPhysicsMaterial *> tPhysicsMaterialMap;
typedef tPhysicsMaterialMap::iterator tPhysicsMaterialMapIt;
typedef cSTLMapIterator<iPhysicsMaterial *, tPhysicsMaterialMap, tPhysicsMaterialMapIt> cPhysicsMaterialIterator;
diff --git a/engines/hpl1/engine/resources/FileSearcher.h b/engines/hpl1/engine/resources/FileSearcher.h
index 981dbe67831..09164f10b09 100644
--- a/engines/hpl1/engine/resources/FileSearcher.h
+++ b/engines/hpl1/engine/resources/FileSearcher.h
@@ -30,7 +30,7 @@
#include "hpl1/engine/resources/ResourcesTypes.h"
#include "hpl1/engine/system/SystemTypes.h"
-#include "hpl1/std/map.h"
+#include "common/stablemap.h"
#include "common/multimap.h"
namespace hpl {
diff --git a/engines/hpl1/engine/resources/ImageManager.h b/engines/hpl1/engine/resources/ImageManager.h
index 86aa3c2e5e3..ee786c5beb7 100644
--- a/engines/hpl1/engine/resources/ImageManager.h
+++ b/engines/hpl1/engine/resources/ImageManager.h
@@ -42,7 +42,7 @@ class Bitmap2D;
typedef Common::List<cFrameBitmap *> tFrameBitmapList;
typedef tFrameBitmapList::iterator tFrameBitmapListIt;
-typedef Hpl1::Std::map<int, cFrameTexture *> tFrameTextureMap;
+typedef Common::StableMap<int, cFrameTexture *> tFrameTextureMap;
typedef tFrameTextureMap::iterator tFrameTextureMapIt;
class cImageManager : public iResourceManager {
diff --git a/engines/hpl1/engine/resources/LanguageFile.h b/engines/hpl1/engine/resources/LanguageFile.h
index 6b166eb8d4f..5031600a57d 100644
--- a/engines/hpl1/engine/resources/LanguageFile.h
+++ b/engines/hpl1/engine/resources/LanguageFile.h
@@ -29,7 +29,7 @@
#define HPL_LANGUAGE_FILE_H
#include "hpl1/engine/system/SystemTypes.h"
-#include "hpl1/std/map.h"
+#include "common/stablemap.h"
namespace hpl {
@@ -42,7 +42,7 @@ public:
tWString mwsText;
};
-typedef Hpl1::Std::map<tString, cLanguageEntry *> tLanguageEntryMap;
+typedef Common::StableMap<tString, cLanguageEntry *> tLanguageEntryMap;
typedef tLanguageEntryMap::iterator tLanguageEntryMapIt;
//--------------------------------
@@ -56,7 +56,7 @@ public:
tLanguageEntryMap m_mapEntries;
};
-typedef Hpl1::Std::map<tString, cLanguageCategory *> tLanguageCategoryMap;
+typedef Common::StableMap<tString, cLanguageCategory *> tLanguageCategoryMap;
typedef tLanguageCategoryMap::iterator tLanguageCategoryMapIt;
//--------------------------------
diff --git a/engines/hpl1/engine/resources/ParticleManager.h b/engines/hpl1/engine/resources/ParticleManager.h
index b4e5c0d9a0b..134a4373220 100644
--- a/engines/hpl1/engine/resources/ParticleManager.h
+++ b/engines/hpl1/engine/resources/ParticleManager.h
@@ -42,7 +42,7 @@ class cParticleSystemData3D;
//----------------------------------------------------
-typedef Hpl1::Std::map<tString, cParticleSystemData3D *> tParticleSystemData3DMap;
+typedef Common::StableMap<tString, cParticleSystemData3D *> tParticleSystemData3DMap;
typedef tParticleSystemData3DMap::iterator tParticleSystemData3DMapIt;
//----------------------------------------------------
diff --git a/engines/hpl1/engine/resources/ResourceManager.h b/engines/hpl1/engine/resources/ResourceManager.h
index 2d329de2f73..505d1179978 100644
--- a/engines/hpl1/engine/resources/ResourceManager.h
+++ b/engines/hpl1/engine/resources/ResourceManager.h
@@ -29,7 +29,7 @@
#define HPL_RESOURCEMANAGER_H
#include "hpl1/engine/system/SystemTypes.h"
-#include "hpl1/std/map.h"
+#include "common/stablemap.h"
namespace hpl {
@@ -38,10 +38,10 @@ class LowLevelSystem;
class cFileSearcher;
class iResourceBase;
-typedef Hpl1::Std::map<unsigned long, iResourceBase *> tResourceHandleMap;
+typedef Common::StableMap<unsigned long, iResourceBase *> tResourceHandleMap;
typedef tResourceHandleMap::iterator tResourceHandleMapIt;
-typedef Hpl1::Std::map<tString, iResourceBase *> tResourceNameMap;
+typedef Common::StableMap<tString, iResourceBase *> tResourceNameMap;
typedef tResourceNameMap::iterator tResourceNameMapIt;
typedef Common::List<iResourceBase *> tResourceBaseList;
diff --git a/engines/hpl1/engine/resources/Resources.h b/engines/hpl1/engine/resources/Resources.h
index f32aa0105d6..c4f17452270 100644
--- a/engines/hpl1/engine/resources/Resources.h
+++ b/engines/hpl1/engine/resources/Resources.h
@@ -29,7 +29,7 @@
#define HPL_RESOURCES_H
#include "hpl1/engine/system/SystemTypes.h"
-#include "hpl1/std/map.h"
+#include "common/stablemap.h"
#include "hpl1/engine/graphics/GPUProgram.h"
@@ -88,7 +88,7 @@ protected:
tString msName;
};
-typedef Hpl1::Std::map<tString, iEntity2DLoader *> tEntity2DLoaderMap;
+typedef Common::StableMap<tString, iEntity2DLoader *> tEntity2DLoaderMap;
typedef tEntity2DLoaderMap::iterator tEntity2DLoaderMapIt;
//-------------------------------------------------------
@@ -106,7 +106,7 @@ protected:
tString msName;
};
-typedef Hpl1::Std::map<tString, iArea2DLoader *> tArea2DLoaderMap;
+typedef Common::StableMap<tString, iArea2DLoader *> tArea2DLoaderMap;
typedef tArea2DLoaderMap::iterator tArea2DLoaderMapIt;
//-------------------------------------------------------
@@ -125,7 +125,7 @@ protected:
tString msName;
};
-typedef Hpl1::Std::map<tString, iEntity3DLoader *> tEntity3DLoaderMap;
+typedef Common::StableMap<tString, iEntity3DLoader *> tEntity3DLoaderMap;
typedef tEntity3DLoaderMap::iterator tEntity3DLoaderMapIt;
//-------------------------------------------------------
@@ -143,7 +143,7 @@ protected:
tString msName;
};
-typedef Hpl1::Std::map<tString, iArea3DLoader *> tArea3DLoaderMap;
+typedef Common::StableMap<tString, iArea3DLoader *> tArea3DLoaderMap;
typedef tArea3DLoaderMap::iterator tArea3DLoaderMapIt;
//-------------------------------------------------------
diff --git a/engines/hpl1/engine/resources/TextureManager.h b/engines/hpl1/engine/resources/TextureManager.h
index a9e3fd73b09..a1b8c9c3e34 100644
--- a/engines/hpl1/engine/resources/TextureManager.h
+++ b/engines/hpl1/engine/resources/TextureManager.h
@@ -39,8 +39,8 @@ class iTexture;
//------------------------------------------------------
-typedef Hpl1::Std::map<tString, iTexture *> tTextureAttenuationMap;
-typedef Hpl1::Std::map<tString, iTexture *>::iterator tTextureAttenuationMapIt;
+typedef Common::StableMap<tString, iTexture *> tTextureAttenuationMap;
+typedef Common::StableMap<tString, iTexture *>::iterator tTextureAttenuationMapIt;
//------------------------------------------------------
diff --git a/engines/hpl1/engine/scene/GridMap2D.h b/engines/hpl1/engine/scene/GridMap2D.h
index 326440816d9..d1ee7c3e413 100644
--- a/engines/hpl1/engine/scene/GridMap2D.h
+++ b/engines/hpl1/engine/scene/GridMap2D.h
@@ -31,7 +31,7 @@
#include "common/array.h"
#include "hpl1/engine/graphics/GraphicsTypes.h"
#include "hpl1/engine/math/MathTypes.h"
-#include "hpl1/std/map.h"
+#include "common/stablemap.h"
namespace hpl {
@@ -80,7 +80,7 @@ private:
/////////// GRID ////////////
-typedef Hpl1::Std::map<int, cGrid2DObject *> tGrid2DObjectMap;
+typedef Common::StableMap<int, cGrid2DObject *> tGrid2DObjectMap;
typedef tGrid2DObjectMap::iterator tGrid2DObjectMapIt;
class cGrid2D {
diff --git a/engines/hpl1/engine/scene/MeshEntity.h b/engines/hpl1/engine/scene/MeshEntity.h
index 904b76e434f..34b321bcfbc 100644
--- a/engines/hpl1/engine/scene/MeshEntity.h
+++ b/engines/hpl1/engine/scene/MeshEntity.h
@@ -39,7 +39,7 @@
#include "common/array.h"
#include "hpl1/engine/scene/AnimationState.h"
-#include "hpl1/std/map.h"
+#include "common/stablemap.h"
namespace hpl {
diff --git a/engines/hpl1/engine/scene/MultiImageEntity.h b/engines/hpl1/engine/scene/MultiImageEntity.h
index e1f9a347a24..f2b78fa9176 100644
--- a/engines/hpl1/engine/scene/MultiImageEntity.h
+++ b/engines/hpl1/engine/scene/MultiImageEntity.h
@@ -29,7 +29,7 @@
#define HPL_MULTI_IMAGE_ENTITY_H
#include "hpl1/engine/scene/ImageEntity.h"
-#include "hpl1/std/map.h"
+#include "common/stablemap.h"
namespace hpl {
@@ -48,7 +48,7 @@ public:
bool mbSyncFrame;
};
-typedef Hpl1::Std::map<unsigned int, cMultiImagePart> tMultiImagePartMap;
+typedef Common::StableMap<unsigned int, cMultiImagePart> tMultiImagePartMap;
typedef tMultiImagePartMap::iterator tMultiImagePartMapIt;
class cMultiImageEntity {
diff --git a/engines/hpl1/engine/scene/PortalContainer.h b/engines/hpl1/engine/scene/PortalContainer.h
index 765ad64393c..a12a799a9f8 100644
--- a/engines/hpl1/engine/scene/PortalContainer.h
+++ b/engines/hpl1/engine/scene/PortalContainer.h
@@ -32,7 +32,7 @@
#include "hpl1/engine/graphics/Renderable.h"
#include "hpl1/engine/math/BoundingVolume.h"
#include "hpl1/engine/scene/RenderableContainer.h"
-#include "hpl1/std/map.h"
+#include "common/stablemap.h"
#include "hpl1/std/set.h"
namespace hpl {
@@ -56,8 +56,8 @@ class cSector;
//----------------------------------------------------
-typedef Hpl1::Std::map<tString, cSector *> tSectorMap;
-typedef Hpl1::Std::map<tString, cSector *>::iterator tSectorMapIt;
+typedef Common::StableMap<tString, cSector *> tSectorMap;
+typedef Common::StableMap<tString, cSector *>::iterator tSectorMapIt;
//----------------------------------------------------
@@ -116,8 +116,8 @@ private:
class cSector;
class cPortal;
-typedef Hpl1::Std::map<int, cPortal *> tPortalMap;
-typedef Hpl1::Std::map<int, cPortal *>::iterator tPortalMapIt;
+typedef Common::StableMap<int, cPortal *> tPortalMap;
+typedef Common::StableMap<int, cPortal *>::iterator tPortalMapIt;
typedef Common::List<cPortal *> tPortalList;
typedef Common::List<cPortal *>::iterator tPortalListIt;
diff --git a/engines/hpl1/engine/scene/SectorVisibility.h b/engines/hpl1/engine/scene/SectorVisibility.h
index 01a5e1372b1..0ee39a01e9f 100644
--- a/engines/hpl1/engine/scene/SectorVisibility.h
+++ b/engines/hpl1/engine/scene/SectorVisibility.h
@@ -117,7 +117,7 @@ private:
cSectorVisibilityContainer *mpContainer;
};
-typedef Hpl1::Std::map<cSector *, cSectorVisibility *> tSectorVisibilityMap;
+typedef Common::StableMap<cSector *, cSectorVisibility *> tSectorVisibilityMap;
typedef tSectorVisibilityMap::iterator tSectorVisibilityMapIt;
//----------------------------------------------------
diff --git a/engines/hpl1/engine/scene/SubMeshEntity.h b/engines/hpl1/engine/scene/SubMeshEntity.h
index 6edd05bb023..e135288c839 100644
--- a/engines/hpl1/engine/scene/SubMeshEntity.h
+++ b/engines/hpl1/engine/scene/SubMeshEntity.h
@@ -36,7 +36,7 @@
#include "hpl1/engine/scene/Entity3D.h"
#include "hpl1/engine/scene/SectorVisibility.h"
#include "hpl1/engine/system/SystemTypes.h"
-#include "hpl1/std/map.h"
+#include "common/stablemap.h"
#include "common/multimap.h"
namespace hpl {
@@ -59,13 +59,13 @@ class cBoneState;
typedef Common::Array<cAnimationState *> tAnimationStateVec;
typedef tAnimationStateVec::iterator tAnimationStateVecIt;
-typedef Hpl1::Std::map<tString, int> tAnimationStateIndexMap;
+typedef Common::StableMap<tString, int> tAnimationStateIndexMap;
typedef tAnimationStateIndexMap::iterator tAnimationStateIndexMapIt;
typedef Common::Array<cBoneState *> tNodeStateVec;
typedef tNodeStateVec::iterator tNodeStateVecIt;
-typedef Hpl1::Std::map<tString, int> tNodeStateIndexMap;
+typedef Common::StableMap<tString, int> tNodeStateIndexMap;
typedef tNodeStateIndexMap::iterator tNodeStateIndexMapIt;
//-----------------------------------------------------------------------
diff --git a/engines/hpl1/engine/scene/World2D.h b/engines/hpl1/engine/scene/World2D.h
index ab52ab2a524..a834fe64b8e 100644
--- a/engines/hpl1/engine/scene/World2D.h
+++ b/engines/hpl1/engine/scene/World2D.h
@@ -34,7 +34,7 @@
#include "hpl1/engine/system/SystemTypes.h"
#include "hpl1/engine/scene/SoundSource.h"
-#include "hpl1/std/map.h"
+#include "common/stablemap.h"
class TiXmlElement;
diff --git a/engines/hpl1/engine/scene/World3D.h b/engines/hpl1/engine/scene/World3D.h
index 9ebdefc68a1..1472299af94 100644
--- a/engines/hpl1/engine/scene/World3D.h
+++ b/engines/hpl1/engine/scene/World3D.h
@@ -129,8 +129,8 @@ public:
tTempAiNodeList mlstNodes;
};
-typedef Hpl1::Std::map<tString, cTempNodeContainer *> tTempNodeContainerMap;
-typedef Hpl1::Std::map<tString, cTempNodeContainer *>::iterator tTempNodeContainerMapIt;
+typedef Common::StableMap<tString, cTempNodeContainer *> tTempNodeContainerMap;
+typedef Common::StableMap<tString, cTempNodeContainer *>::iterator tTempNodeContainerMapIt;
//-------------------------------------------------------------------
@@ -141,7 +141,7 @@ class cAreaEntity : public iSerializable {
cVector3f mvSize;
};
-typedef Hpl1::Std::map<tString, cAreaEntity *> tAreaEntityMap;
+typedef Common::StableMap<tString, cAreaEntity *> tAreaEntityMap;
typedef tAreaEntityMap::iterator tAreaEntityMapIt;
//-------------------------------------------------------------------
diff --git a/engines/hpl1/engine/sound/SoundHandler.h b/engines/hpl1/engine/sound/SoundHandler.h
index 4d5a89b151d..bbf06d59a58 100644
--- a/engines/hpl1/engine/sound/SoundHandler.h
+++ b/engines/hpl1/engine/sound/SoundHandler.h
@@ -110,7 +110,7 @@ typedef cSTLIterator<cSoundEntry, tSoundEntryList, tSoundEntryListIt> tSoundEntr
//----------------------------------------
-typedef Hpl1::Std::map<tString, int> tPlayedSoundNumMap;
+typedef Common::StableMap<tString, int> tPlayedSoundNumMap;
typedef tPlayedSoundNumMap::iterator tPlayedSoundNumMapIt;
//----------------------------------------
diff --git a/engines/hpl1/engine/system/Container.h b/engines/hpl1/engine/system/Container.h
index e9e19e78b17..54f4acfa10c 100644
--- a/engines/hpl1/engine/system/Container.h
+++ b/engines/hpl1/engine/system/Container.h
@@ -31,7 +31,7 @@
#include "common/array.h"
#include "common/list.h"
#include "hpl1/engine/system/MemoryManager.h"
-#include "hpl1/std/map.h"
+#include "common/stablemap.h"
namespace hpl {
diff --git a/engines/hpl1/engine/system/MemoryManager.h b/engines/hpl1/engine/system/MemoryManager.h
index f2984a1ce65..28c5e16c8b7 100644
--- a/engines/hpl1/engine/system/MemoryManager.h
+++ b/engines/hpl1/engine/system/MemoryManager.h
@@ -29,7 +29,7 @@
#define HPL_MEMORY_MANAGER_H
#include "common/str.h"
-#include "hpl1/std/map.h"
+#include "common/stablemap.h"
#define hplNew(classType, constructor) \
new classType constructor
diff --git a/engines/hpl1/engine/system/SerializeClass.h b/engines/hpl1/engine/system/SerializeClass.h
index b69ed4de741..8d89e28c820 100644
--- a/engines/hpl1/engine/system/SerializeClass.h
+++ b/engines/hpl1/engine/system/SerializeClass.h
@@ -31,7 +31,7 @@
#include "hpl1/engine/system/MemoryManager.h"
#include "hpl1/engine/system/SystemTypes.h"
#include "hpl1/static_string.h"
-#include "hpl1/std/map.h"
+#include "common/stablemap.h"
class TiXmlElement;
@@ -275,7 +275,7 @@ private:
//-------------------------------------------------
-typedef Hpl1::Std::map<Hpl1::StaticString, cSerializeSavedClass> tSerializeSavedClassMap;
+typedef Common::StableMap<Hpl1::StaticString, cSerializeSavedClass> tSerializeSavedClassMap;
typedef tSerializeSavedClassMap::iterator tSerializeSavedClassMapIt;
typedef Common::List<cSerializeSavedClass *> tSerializeSavedClassList;
diff --git a/engines/hpl1/penumbra-overture/GameEntity.h b/engines/hpl1/penumbra-overture/GameEntity.h
index 4cbdbc79389..c7d23844c81 100644
--- a/engines/hpl1/penumbra-overture/GameEntity.h
+++ b/engines/hpl1/penumbra-overture/GameEntity.h
@@ -48,12 +48,12 @@ class cGameEntityScript : public iSerializable {
tString msScriptFunc;
};
-typedef Hpl1::Std::map<tString, cGameEntityScript *> tGameEntityScriptMap;
+typedef Common::StableMap<tString, cGameEntityScript *> tGameEntityScriptMap;
typedef tGameEntityScriptMap::iterator tGameEntityScriptMapIt;
//-----------------------------------------
-typedef Hpl1::Std::map<tString, int> tGameEntityVarMap;
+typedef Common::StableMap<tString, int> tGameEntityVarMap;
typedef tGameEntityVarMap::iterator tGameEntityVarMapIt;
//------------------------------------------
diff --git a/engines/hpl1/penumbra-overture/GameTypes.h b/engines/hpl1/penumbra-overture/GameTypes.h
index ce8e352d825..67d5208fb34 100644
--- a/engines/hpl1/penumbra-overture/GameTypes.h
+++ b/engines/hpl1/penumbra-overture/GameTypes.h
@@ -281,7 +281,7 @@ public:
bool mbDeleteMe;
};
-typedef Hpl1::Std::map<tString, cGameCollideScript *> tGameCollideScriptMap;
+typedef Common::StableMap<tString, cGameCollideScript *> tGameCollideScriptMap;
typedef tGameCollideScriptMap::iterator tGameCollideScriptMapIt;
//---------------------------------
diff --git a/engines/hpl1/penumbra-overture/PlayerHands.h b/engines/hpl1/penumbra-overture/PlayerHands.h
index ef4fcff5eea..73ada72f815 100644
--- a/engines/hpl1/penumbra-overture/PlayerHands.h
+++ b/engines/hpl1/penumbra-overture/PlayerHands.h
@@ -151,7 +151,7 @@ public:
//------------------------------------------------
-typedef Hpl1::Std::map<tString, iHudModel *> tHudModelMap;
+typedef Common::StableMap<tString, iHudModel *> tHudModelMap;
typedef tHudModelMap::iterator tHudModelMapIt;
//------------------------------------------------
diff --git a/engines/hpl1/std/map.h b/engines/hpl1/std/map.h
deleted file mode 100644
index 0afcbd2ab1d..00000000000
--- a/engines/hpl1/std/map.h
+++ /dev/null
@@ -1,179 +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 HPL1_STD_MAP_H
-#define HPL1_STD_MAP_H
-
-#include "hpl1/std/pair.h"
-#include "hpl1/std/tree.h"
-
-namespace Hpl1 {
-namespace Std {
-
-template<class Key, class Val, class CompFunc = Common::Less<Key> >
-class map {
- using TreeT = Tree<pair<Key, Val>, Key, PairKey<Key, Val>, CompFunc>;
-
-public:
- using value_type = pair<Key, Val>;
- using iterator = typename TreeT::BasicIterator;
- using const_iterator = typename TreeT::ConstIterator;
-
- /**
- * Clears the map
- */
- void clear() {
- _items.clear();
- }
-
- /**
- * Gets the iterator start
- */
- iterator begin() {
- return _items.begin();
- }
-
- /**
- * Get the iterator end
- */
- iterator end() {
- return _items.end();
- }
-
- /**
- * Get the const iterator start
- */
- const_iterator begin() const {
- return _items.begin();
- }
-
- /**
- * Get the const iterator end
- */
- const_iterator end() const {
- return _items.end();
- }
-
- /**
- * Returns an iterator for the first element of the map that is
- * not less than the given key
- */
- const_iterator lower_bound(const Key &key) const {
- return _items.lowerBound(key);
- }
-
- iterator lower_bound(const Key &key) {
- return _items.lowerBound(key);
- }
-
- iterator upper_bound(const Key &key) {
- return _items.upperBound(key);
- }
-
- /**
- * Find the entry with the given key
- */
- iterator find(const Key &theKey) {
- iterator it = _items.lowerBound(theKey);
- if (it != this->end() && compareEqual(it->first, theKey))
- return it;
- return this->end();
- }
-
- const_iterator find(const Key &theKey) const {
- const_iterator it = _items.lowerBound(theKey);
- if (it != this->end() && compareEqual(it->first, theKey))
- return it;
- return this->end();
- }
-
- /**
- * Square brackets operator accesses items by key, creating if necessary
- */
- Val &operator[](const Key &theKey) {
- iterator it = _items.lowerBound(theKey);
- if (it == this->end() || !compareEqual(it->first, theKey)) {
- return _items.insert(theKey).second;
- }
- return *it->second;
- }
-
- /**
- * Erases an entry in the map
- */
- iterator erase(iterator it) {
- return _items.erase(it);
- }
-
- iterator erase(iterator first, iterator last) {
- return _items.erase(first, last);
- }
-
- iterator erase(const Key &theKey) {
- iterator it = find(theKey);
- if (it != this->end())
- return erase(it);
- return it;
- }
-
- pair<iterator, bool> insert(const value_type &val) {
- iterator it = _items.lowerBound(val.first);
- if (it == this->end() || !compareEqual(it->first, val.first))
- return {_items.insert(val), true};
- return {it, false};
- }
-
- /**
- * Returns the size of the map
- */
- size_t size() const {
- return _items.size();
- }
-
- bool empty() const {
- return _items.isEmpty();
- }
-
- /**
- * Returns the number of elements with a matching key
- */
- size_t count(const Key &theKey) {
- int count_ = 0;
- for (iterator it = this->begin(); it != this->end(); ++it) {
- if (compareEqual(it->first, theKey))
- ++count_;
- }
- return count_;
- }
-
-private:
- bool compareEqual(const Key &a, const Key &b) {
- return !_comp(a, b) && !_comp(b, a);
- }
-
- TreeT _items;
- CompFunc _comp;
-};
-
-} // namespace Std
-} // namespace Hpl1
-
-#endif
More information about the Scummvm-git-logs
mailing list