aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorEugene Sandulenko2010-08-05 12:48:19 +0000
committerEugene Sandulenko2010-10-12 22:27:03 +0000
commitde0fe1db4939bbb787de60231dd30a7b5391f269 (patch)
tree96c1872068e9847500e4cf3b63242998bcb0c517 /engines
parenteb30ebde2a4e3181bc2ef2daccedfe852aa891e1 (diff)
downloadscummvm-rg350-de0fe1db4939bbb787de60231dd30a7b5391f269.tar.gz
scummvm-rg350-de0fe1db4939bbb787de60231dd30a7b5391f269.tar.bz2
scummvm-rg350-de0fe1db4939bbb787de60231dd30a7b5391f269.zip
SWORD25: Mass-putting of all files in gfx/ into Sword25 namespace
svn-id: r53214
Diffstat (limited to 'engines')
-rw-r--r--engines/sword25/gfx/animation.cpp4
-rw-r--r--engines/sword25/gfx/animation.h4
-rw-r--r--engines/sword25/gfx/animationdescription.cpp4
-rw-r--r--engines/sword25/gfx/animationdescription.h4
-rw-r--r--engines/sword25/gfx/animationresource.cpp4
-rw-r--r--engines/sword25/gfx/animationresource.h4
-rw-r--r--engines/sword25/gfx/animationtemplate.cpp4
-rw-r--r--engines/sword25/gfx/animationtemplate.h4
-rw-r--r--engines/sword25/gfx/animationtemplateregistry.cpp4
-rw-r--r--engines/sword25/gfx/animationtemplateregistry.h4
-rw-r--r--engines/sword25/gfx/bitmap.cpp4
-rw-r--r--engines/sword25/gfx/bitmap.h4
-rw-r--r--engines/sword25/gfx/bitmapresource.cpp4
-rw-r--r--engines/sword25/gfx/bitmapresource.h4
-rw-r--r--engines/sword25/gfx/dynamicbitmap.cpp4
-rw-r--r--engines/sword25/gfx/dynamicbitmap.h4
-rw-r--r--engines/sword25/gfx/fontresource.cpp4
-rw-r--r--engines/sword25/gfx/fontresource.h4
-rw-r--r--engines/sword25/gfx/framecounter.cpp4
-rw-r--r--engines/sword25/gfx/graphicengine.cpp4
-rw-r--r--engines/sword25/gfx/graphicengine_script.cpp4
-rw-r--r--engines/sword25/gfx/image/b25sloader.cpp4
-rw-r--r--engines/sword25/gfx/image/b25sloader.h4
-rw-r--r--engines/sword25/gfx/image/image.h4
-rw-r--r--engines/sword25/gfx/image/imageloader.cpp4
-rw-r--r--engines/sword25/gfx/image/imageloader.h4
-rw-r--r--engines/sword25/gfx/image/imageloader_ids.h4
-rw-r--r--engines/sword25/gfx/image/pngloader.cpp4
-rw-r--r--engines/sword25/gfx/image/pngloader.h4
-rw-r--r--engines/sword25/gfx/image/vectorimage.cpp4
-rw-r--r--engines/sword25/gfx/image/vectorimage.h4
-rw-r--r--engines/sword25/gfx/image/vectorimagerenderer.cpp4
-rw-r--r--engines/sword25/gfx/image/vectorimagerenderer.h4
-rw-r--r--engines/sword25/gfx/opengl/glimage.cpp4
-rw-r--r--engines/sword25/gfx/opengl/glimage.h4
-rw-r--r--engines/sword25/gfx/opengl/glvectorimageblit.cpp5
-rw-r--r--engines/sword25/gfx/opengl/openglgfx.cpp4
-rw-r--r--engines/sword25/gfx/opengl/openglgfx.h4
-rw-r--r--engines/sword25/gfx/opengl/swimage.cpp4
-rw-r--r--engines/sword25/gfx/opengl/swimage.h4
-rw-r--r--engines/sword25/gfx/panel.cpp4
-rw-r--r--engines/sword25/gfx/panel.h4
-rw-r--r--engines/sword25/gfx/renderobject.cpp4
-rw-r--r--engines/sword25/gfx/renderobjectmanager.cpp4
-rw-r--r--engines/sword25/gfx/renderobjectmanager.h4
-rw-r--r--engines/sword25/gfx/renderobjectptr.h4
-rw-r--r--engines/sword25/gfx/renderobjectregistry.cpp12
-rw-r--r--engines/sword25/gfx/renderobjectregistry.h2
-rw-r--r--engines/sword25/gfx/rootrenderobject.h4
-rw-r--r--engines/sword25/gfx/screenshot.cpp4
-rw-r--r--engines/sword25/gfx/screenshot.h4
-rw-r--r--engines/sword25/gfx/staticbitmap.cpp4
-rw-r--r--engines/sword25/gfx/staticbitmap.h4
-rw-r--r--engines/sword25/gfx/text.cpp7
-rw-r--r--engines/sword25/gfx/text.h4
-rw-r--r--engines/sword25/gfx/timedrenderobject.cpp4
-rw-r--r--engines/sword25/gfx/timedrenderobject.h4
57 files changed, 232 insertions, 6 deletions
diff --git a/engines/sword25/gfx/animation.cpp b/engines/sword25/gfx/animation.cpp
index 6bad9d8168..30b8bd76db 100644
--- a/engines/sword25/gfx/animation.cpp
+++ b/engines/sword25/gfx/animation.cpp
@@ -50,6 +50,8 @@
#include "sword25/gfx/bitmapresource.h"
#include "sword25/gfx/graphicengine.h"
+namespace Sword25 {
+
#define BS_LOG_PREFIX "ANIMATION"
// Konstruktion / Destruktion
@@ -891,3 +893,5 @@ BS_AnimationDescription * BS_Animation::GetAnimationDescription() const
if (m_AnimationResourcePtr) return m_AnimationResourcePtr;
else return BS_AnimationTemplateRegistry::GetInstance().ResolveHandle(m_AnimationTemplateHandle);
}
+
+} // End of namespace Sword25
diff --git a/engines/sword25/gfx/animation.h b/engines/sword25/gfx/animation.h
index 7181f0061d..2221501bfa 100644
--- a/engines/sword25/gfx/animation.h
+++ b/engines/sword25/gfx/animation.h
@@ -43,6 +43,8 @@
#include <vector>
#include "sword25/kernel/memlog_on.h"
+namespace Sword25 {
+
// Forward declarations
class BS_Kernel;
class BS_PackageManager;
@@ -221,4 +223,6 @@ private:
void InitializeAnimationResource(const std::string &FileName);
};
+} // End of namespace Sword25
+
#endif
diff --git a/engines/sword25/gfx/animationdescription.cpp b/engines/sword25/gfx/animationdescription.cpp
index 34dd41832b..405a5c2938 100644
--- a/engines/sword25/gfx/animationdescription.cpp
+++ b/engines/sword25/gfx/animationdescription.cpp
@@ -40,6 +40,8 @@
#include "sword25/kernel/inputpersistenceblock.h"
#include "sword25/gfx/animationdescription.h"
+namespace Sword25 {
+
// -----------------------------------------------------------------------------
// Persistenz
// -----------------------------------------------------------------------------
@@ -71,3 +73,5 @@ bool BS_AnimationDescription::Unpersist(BS_InputPersistenceBlock & Reader)
return Reader.IsGood();
}
+
+} // End of namespace Sword25
diff --git a/engines/sword25/gfx/animationdescription.h b/engines/sword25/gfx/animationdescription.h
index e32be9670f..db30b54149 100644
--- a/engines/sword25/gfx/animationdescription.h
+++ b/engines/sword25/gfx/animationdescription.h
@@ -43,6 +43,8 @@
#include "sword25/kernel/persistable.h"
#include "sword25/gfx/animation.h"
+namespace Sword25 {
+
// -----------------------------------------------------------------------------
// Klassendefinition
// -----------------------------------------------------------------------------
@@ -102,4 +104,6 @@ protected:
bool m_ColorModulationAllowed;
};
+} // End of namespace Sword25
+
#endif
diff --git a/engines/sword25/gfx/animationresource.cpp b/engines/sword25/gfx/animationresource.cpp
index 8bec248aa6..912867e604 100644
--- a/engines/sword25/gfx/animationresource.cpp
+++ b/engines/sword25/gfx/animationresource.cpp
@@ -44,6 +44,8 @@
#include <tinyxml.h>
#include "sword25/gfx/bitmapresource.h"
+namespace Sword25 {
+
// -----------------------------------------------------------------------------
#define BS_LOG_PREFIX "ANIMATIONRESOURCE"
@@ -336,3 +338,5 @@ bool BS_AnimationResource::ComputeFeatures()
return true;
}
+
+} // End of namespace Sword25
diff --git a/engines/sword25/gfx/animationresource.h b/engines/sword25/gfx/animationresource.h
index d3253e584c..3d6e3e49f3 100644
--- a/engines/sword25/gfx/animationresource.h
+++ b/engines/sword25/gfx/animationresource.h
@@ -48,6 +48,8 @@
#include <vector>
#include "sword25/kernel/memlog_on.h"
+namespace Sword25 {
+
// -----------------------------------------------------------------------------
// Forward Declarations
// -----------------------------------------------------------------------------
@@ -95,4 +97,6 @@ private:
bool PrecacheAllFrames() const;
};
+} // End of namespace Sword25
+
#endif
diff --git a/engines/sword25/gfx/animationtemplate.cpp b/engines/sword25/gfx/animationtemplate.cpp
index e958cba91f..1594ed61f1 100644
--- a/engines/sword25/gfx/animationtemplate.cpp
+++ b/engines/sword25/gfx/animationtemplate.cpp
@@ -47,6 +47,8 @@
#include "sword25/gfx/animationtemplate.h"
#include "sword25/gfx/animationtemplateregistry.h"
+namespace Sword25 {
+
// -----------------------------------------------------------------------------
// Konstruktion / Destruktion
// -----------------------------------------------------------------------------
@@ -306,3 +308,5 @@ bool BS_AnimationTemplate::Unpersist(BS_InputPersistenceBlock & Reader)
return m_SourceAnimationPtr && Reader.IsGood() && Result;
}
+
+} // End of namespace Sword25
diff --git a/engines/sword25/gfx/animationtemplate.h b/engines/sword25/gfx/animationtemplate.h
index a11d315ffd..2b3e078085 100644
--- a/engines/sword25/gfx/animationtemplate.h
+++ b/engines/sword25/gfx/animationtemplate.h
@@ -47,6 +47,8 @@
#include <vector>
#include "sword25/kernel/memlog_on.h"
+namespace Sword25 {
+
// -----------------------------------------------------------------------------
// Forward declarations
// -----------------------------------------------------------------------------
@@ -120,4 +122,6 @@ private:
bool ValidateDestIndex(unsigned int Index) const;
};
+} // End of namespace Sword25
+
#endif
diff --git a/engines/sword25/gfx/animationtemplateregistry.cpp b/engines/sword25/gfx/animationtemplateregistry.cpp
index b8f9174d37..fa8257aaf2 100644
--- a/engines/sword25/gfx/animationtemplateregistry.cpp
+++ b/engines/sword25/gfx/animationtemplateregistry.cpp
@@ -32,6 +32,8 @@
*
*/
+namespace Sword25 {
+
// -----------------------------------------------------------------------------
// Logging
// -----------------------------------------------------------------------------
@@ -124,3 +126,5 @@ bool BS_AnimationTemplateRegistry::Unpersist(BS_InputPersistenceBlock & Reader)
return Reader.IsGood() && Result;
}
+
+} // End of namespace Sword25
diff --git a/engines/sword25/gfx/animationtemplateregistry.h b/engines/sword25/gfx/animationtemplateregistry.h
index bf366f1173..efa26326ed 100644
--- a/engines/sword25/gfx/animationtemplateregistry.h
+++ b/engines/sword25/gfx/animationtemplateregistry.h
@@ -47,6 +47,8 @@
#include <memory>
#include "sword25/kernel/memlog_on.h"
+namespace Sword25 {
+
// -----------------------------------------------------------------------------
// Forward Deklarationen
// -----------------------------------------------------------------------------
@@ -76,4 +78,6 @@ private:
static std::auto_ptr<BS_AnimationTemplateRegistry> m_InstancePtr;
};
+} // End of namespace Sword25
+
#endif
diff --git a/engines/sword25/gfx/bitmap.cpp b/engines/sword25/gfx/bitmap.cpp
index 6cda6375cf..5dd553ef8c 100644
--- a/engines/sword25/gfx/bitmap.cpp
+++ b/engines/sword25/gfx/bitmap.cpp
@@ -40,6 +40,8 @@
#include "sword25/kernel/outputpersistenceblock.h"
#include "sword25/kernel/inputpersistenceblock.h"
+namespace Sword25 {
+
// -----------------------------------------------------------------------------
// Logging
// -----------------------------------------------------------------------------
@@ -227,3 +229,5 @@ bool BS_Bitmap::Unpersist(BS_InputPersistenceBlock & Reader)
return Reader.IsGood() && Result;
}
+
+} // End of namespace Sword25
diff --git a/engines/sword25/gfx/bitmap.h b/engines/sword25/gfx/bitmap.h
index 9b9771e1a6..82d223e080 100644
--- a/engines/sword25/gfx/bitmap.h
+++ b/engines/sword25/gfx/bitmap.h
@@ -42,6 +42,8 @@
#include "sword25/kernel/common.h"
#include "sword25/gfx/renderobject.h"
+namespace Sword25 {
+
// -----------------------------------------------------------------------------
// Klassendeklaration
// -----------------------------------------------------------------------------
@@ -179,4 +181,6 @@ protected:
int m_OriginalHeight;
};
+} // End of namespace Sword25
+
#endif
diff --git a/engines/sword25/gfx/bitmapresource.cpp b/engines/sword25/gfx/bitmapresource.cpp
index 0f100cb31f..ead5d79633 100644
--- a/engines/sword25/gfx/bitmapresource.cpp
+++ b/engines/sword25/gfx/bitmapresource.cpp
@@ -40,6 +40,8 @@
#include "sword25/gfx/image/imageloader.h"
#include "sword25/package/packagemanager.h"
+namespace Sword25 {
+
#define BS_LOG_PREFIX "BITMAP"
// Konstruktion / Destruktion
@@ -67,3 +69,5 @@ unsigned int BS_BitmapResource::GetPixel(int X, int Y) const
return m_pImage->GetPixel(X, Y);
}
+
+} // End of namespace Sword25
diff --git a/engines/sword25/gfx/bitmapresource.h b/engines/sword25/gfx/bitmapresource.h
index e1b01a6b16..4f9fb2be83 100644
--- a/engines/sword25/gfx/bitmapresource.h
+++ b/engines/sword25/gfx/bitmapresource.h
@@ -40,6 +40,8 @@
#include "sword25/kernel/resource.h"
#include "sword25/gfx/image/image.h"
+namespace Sword25 {
+
// -----------------------------------------------------------------------------
// Forward Declarations
// -----------------------------------------------------------------------------
@@ -189,4 +191,6 @@ private:
bool m_Valid;
};
+} // End of namespace Sword25
+
#endif
diff --git a/engines/sword25/gfx/dynamicbitmap.cpp b/engines/sword25/gfx/dynamicbitmap.cpp
index de078abb59..1797f742f8 100644
--- a/engines/sword25/gfx/dynamicbitmap.cpp
+++ b/engines/sword25/gfx/dynamicbitmap.cpp
@@ -43,6 +43,8 @@
#include <vector>
+namespace Sword25 {
+
// -----------------------------------------------------------------------------
// Logging
// -----------------------------------------------------------------------------
@@ -204,3 +206,5 @@ bool BS_DynamicBitmap::Unpersist(BS_InputPersistenceBlock & Reader)
return Reader.IsGood() && Result;
}
+
+} // End of namespace Sword25
diff --git a/engines/sword25/gfx/dynamicbitmap.h b/engines/sword25/gfx/dynamicbitmap.h
index 41f8818503..565ddf3e6f 100644
--- a/engines/sword25/gfx/dynamicbitmap.h
+++ b/engines/sword25/gfx/dynamicbitmap.h
@@ -48,6 +48,8 @@
#include "sword25/gfx/bitmap.h"
#include "sword25/gfx/opengl/glimage.h"
+namespace Sword25 {
+
// -----------------------------------------------------------------------------
// Klassendeklaration
// -----------------------------------------------------------------------------
@@ -83,4 +85,6 @@ private:
std::auto_ptr<BS_GLImage> m_Image;
};
+} // End of namespace Sword25
+
#endif
diff --git a/engines/sword25/gfx/fontresource.cpp b/engines/sword25/gfx/fontresource.cpp
index e2212d9a58..0252becc21 100644
--- a/engines/sword25/gfx/fontresource.cpp
+++ b/engines/sword25/gfx/fontresource.cpp
@@ -47,6 +47,8 @@
#include "sword25/gfx/fontresource.h"
+namespace Sword25 {
+
// -----------------------------------------------------------------------------
// Konstanten
// -----------------------------------------------------------------------------
@@ -256,3 +258,5 @@ bool BS_FontResource::_ParseCharacterTag(TiXmlElement & Tag, int & Code, BS_Rect
return true;
}
+
+} // End of namespace Sword25
diff --git a/engines/sword25/gfx/fontresource.h b/engines/sword25/gfx/fontresource.h
index 2ac21ee15d..826a14522f 100644
--- a/engines/sword25/gfx/fontresource.h
+++ b/engines/sword25/gfx/fontresource.h
@@ -43,6 +43,8 @@
#include "sword25/kernel/resource.h"
#include "sword25/math/rect.h"
+namespace Sword25 {
+
// -----------------------------------------------------------------------------
// Forward declarations
// -----------------------------------------------------------------------------
@@ -116,4 +118,6 @@ private:
bool _ParseCharacterTag(TiXmlElement & Tag, int & Code, BS_Rect & Rect) const;
};
+} // End of namespace Sword25
+
#endif
diff --git a/engines/sword25/gfx/framecounter.cpp b/engines/sword25/gfx/framecounter.cpp
index 9f2190f301..65a0c9f053 100644
--- a/engines/sword25/gfx/framecounter.cpp
+++ b/engines/sword25/gfx/framecounter.cpp
@@ -35,6 +35,8 @@
#include "sword25/gfx/framecounter.h"
#include "sword25/kernel/timer.h"
+namespace Sword25 {
+
BS_Framecounter::BS_Framecounter(int UpdateFrequency) :
m_FPS(0),
m_FPSCount(0),
@@ -66,3 +68,5 @@ void BS_Framecounter::Update()
}
}
}
+
+} // End of namespace Sword25
diff --git a/engines/sword25/gfx/graphicengine.cpp b/engines/sword25/gfx/graphicengine.cpp
index be379ecf68..cd35718d5e 100644
--- a/engines/sword25/gfx/graphicengine.cpp
+++ b/engines/sword25/gfx/graphicengine.cpp
@@ -49,6 +49,8 @@ extern "C"
#include "sword25/util/lua/lauxlib.h"
}
+namespace Sword25 {
+
using namespace std;
// -----------------------------------------------------------------------------
@@ -231,3 +233,5 @@ bool BS_GraphicEngine::Unpersist(BS_InputPersistenceBlock & Reader)
Reader.Read(m_TimerActive);
return Reader.IsGood();
}
+
+} // End of namespace Sword25
diff --git a/engines/sword25/gfx/graphicengine_script.cpp b/engines/sword25/gfx/graphicengine_script.cpp
index 78100e94c7..34a464169e 100644
--- a/engines/sword25/gfx/graphicengine_script.cpp
+++ b/engines/sword25/gfx/graphicengine_script.cpp
@@ -56,6 +56,8 @@
#include "sword25/gfx/animationtemplate.h"
#include "sword25/gfx/animationtemplateregistry.h"
+namespace Sword25 {
+
#define BS_LOG_PREFIX "GRAPHICENGINE"
// -----------------------------------------------------------------------------
@@ -1735,3 +1737,5 @@ bool BS_GraphicEngine::RegisterScriptBindings()
return true;
}
+
+} // End of namespace Sword25
diff --git a/engines/sword25/gfx/image/b25sloader.cpp b/engines/sword25/gfx/image/b25sloader.cpp
index 3a5db7c6bc..ea1e933edd 100644
--- a/engines/sword25/gfx/image/b25sloader.cpp
+++ b/engines/sword25/gfx/image/b25sloader.cpp
@@ -44,6 +44,8 @@ using namespace std;
#include "sword25/gfx/image/b25sloader.h"
#include "sword25/gfx/image/pngloader.h"
+namespace Sword25 {
+
#define BS_LOG_PREFIX "B25SLOADER"
// -----------------------------------------------------------------------------
@@ -114,3 +116,5 @@ bool BS_B25SLoader::ImageProperties(const char * FileDataPtr, unsigned int FileS
return false;
}
+
+} // End of namespace Sword25
diff --git a/engines/sword25/gfx/image/b25sloader.h b/engines/sword25/gfx/image/b25sloader.h
index 4d7b61a6ef..be28b646c8 100644
--- a/engines/sword25/gfx/image/b25sloader.h
+++ b/engines/sword25/gfx/image/b25sloader.h
@@ -42,6 +42,8 @@
#include "sword25/kernel/common.h"
#include "sword25/gfx/image/imageloader.h"
+namespace Sword25 {
+
// -----------------------------------------------------------------------------
// Klassendeklaration
// -----------------------------------------------------------------------------
@@ -64,4 +66,6 @@ protected:
};
+} // End of namespace Sword25
+
#endif
diff --git a/engines/sword25/gfx/image/image.h b/engines/sword25/gfx/image/image.h
index 23073d71b8..8c5d750b6a 100644
--- a/engines/sword25/gfx/image/image.h
+++ b/engines/sword25/gfx/image/image.h
@@ -50,6 +50,8 @@
#include "sword25/math/rect.h"
#include "sword25/gfx/graphicengine.h"
+namespace Sword25 {
+
class BS_Image
{
public:
@@ -220,4 +222,6 @@ public:
//@}
};
+} // End of namespace Sword25
+
#endif
diff --git a/engines/sword25/gfx/image/imageloader.cpp b/engines/sword25/gfx/image/imageloader.cpp
index 998c784c33..1bf7508ee5 100644
--- a/engines/sword25/gfx/image/imageloader.cpp
+++ b/engines/sword25/gfx/image/imageloader.cpp
@@ -35,6 +35,8 @@
#include "sword25/gfx/image/imageloader.h"
#include "sword25/gfx/image/imageloader_ids.h"
+namespace Sword25 {
+
#define BS_LOG_PREFIX "IMAGELOADER"
// Statische Elemente der Klasse BS_ImageLoader intialisieren.
@@ -133,3 +135,5 @@ BS_ImageLoader* BS_ImageLoader::_FindSuitableImageLoader(const char* pFileData,
BS_LOG_ERRORLN("Could not find suitable image loader for image data.");
return NULL;
}
+
+} // End of namespace Sword25
diff --git a/engines/sword25/gfx/image/imageloader.h b/engines/sword25/gfx/image/imageloader.h
index 7529bbb916..15c4e20606 100644
--- a/engines/sword25/gfx/image/imageloader.h
+++ b/engines/sword25/gfx/image/imageloader.h
@@ -52,6 +52,8 @@
#include <list>
#include "sword25/kernel/memlog_on.h"
+namespace Sword25 {
+
/**
@brief Über die statischen Methoden dieser Klasse werden alle unterstützten Bildformate geladen.
@@ -370,4 +372,6 @@ private:
static bool _ImageLoaderListInitialized; // Gibt an, ob die Liste schon intialisiert wurde
};
+} // End of namespace Sword25
+
#endif
diff --git a/engines/sword25/gfx/image/imageloader_ids.h b/engines/sword25/gfx/image/imageloader_ids.h
index a9de1378a4..74c5c3429a 100644
--- a/engines/sword25/gfx/image/imageloader_ids.h
+++ b/engines/sword25/gfx/image/imageloader_ids.h
@@ -47,6 +47,8 @@
#include "sword25/gfx/image/pngloader.h"
#include "sword25/gfx/image/b25sloader.h"
+namespace Sword25 {
+
// Die Tabelle enthält Pointer auf statische Member-Funktionen innerhalb der Klassen, die eine Instanz der Klasse
// erzeugen
typedef BS_ImageLoader* (*BS_IMAGELOADER_NEW)();
@@ -57,3 +59,5 @@ const BS_IMAGELOADER_NEW BS_IMAGELOADER_IDS[] =
};
const int BS_IMAGELOADER_COUNT = sizeof(BS_IMAGELOADER_IDS) / sizeof(BS_IMAGELOADER_NEW);
+
+} // End of namespace Sword25
diff --git a/engines/sword25/gfx/image/pngloader.cpp b/engines/sword25/gfx/image/pngloader.cpp
index 80008c3e4d..693874314f 100644
--- a/engines/sword25/gfx/image/pngloader.cpp
+++ b/engines/sword25/gfx/image/pngloader.cpp
@@ -40,6 +40,8 @@
#include "sword25/gfx/image/pngloader.h"
#include <png.h>
+namespace Sword25 {
+
#define BS_LOG_PREFIX "PNGLOADER"
// -----------------------------------------------------------------------------
@@ -402,3 +404,5 @@ bool BS_PNGLoader::IsCorrectImageFormat(const char* FileDataPtr, unsigned int Fi
{
return DoIsCorrectImageFormat(FileDataPtr, FileSize);
}
+
+} // End of namespace Sword25
diff --git a/engines/sword25/gfx/image/pngloader.h b/engines/sword25/gfx/image/pngloader.h
index 0be88ca8e1..a4ce28fbe5 100644
--- a/engines/sword25/gfx/image/pngloader.h
+++ b/engines/sword25/gfx/image/pngloader.h
@@ -47,6 +47,8 @@
#include "sword25/kernel/common.h"
#include "sword25/gfx/image/imageloader.h"
+namespace Sword25 {
+
// Klassendefinition
class BS_PNGLoader : public BS_ImageLoader
{
@@ -76,4 +78,6 @@ protected:
bool ImageProperties(const char * FileDatePtr, unsigned int FileSize, BS_GraphicEngine::COLOR_FORMATS & ColorFormat, int & Width, int & Height);
};
+} // End of namespace Sword25
+
#endif
diff --git a/engines/sword25/gfx/image/vectorimage.cpp b/engines/sword25/gfx/image/vectorimage.cpp
index 27c2c6adac..6d0c046fcd 100644
--- a/engines/sword25/gfx/image/vectorimage.cpp
+++ b/engines/sword25/gfx/image/vectorimage.cpp
@@ -45,6 +45,8 @@
using namespace std;
+namespace Sword25 {
+
#define BS_LOG_PREFIX "VECTORIMAGE"
@@ -584,3 +586,5 @@ bool BS_VectorImage::SetContent(const std::vector<unsigned char> & Pixeldata, un
BS_LOG_ERRORLN("SetContent() is not supported.");
return 0;
}
+
+} // End of namespace Sword25
diff --git a/engines/sword25/gfx/image/vectorimage.h b/engines/sword25/gfx/image/vectorimage.h
index 30a2d289de..778422f295 100644
--- a/engines/sword25/gfx/image/vectorimage.h
+++ b/engines/sword25/gfx/image/vectorimage.h
@@ -48,6 +48,8 @@
#include "agg_color_rgba.h"
+namespace Sword25 {
+
class BS_VectorImage;
/**
@@ -179,4 +181,6 @@ private:
BS_Rect m_BoundingBox;
};
+} // End of namespace Sword25
+
#endif
diff --git a/engines/sword25/gfx/image/vectorimagerenderer.cpp b/engines/sword25/gfx/image/vectorimagerenderer.cpp
index b5047141c1..7206551586 100644
--- a/engines/sword25/gfx/image/vectorimagerenderer.cpp
+++ b/engines/sword25/gfx/image/vectorimagerenderer.cpp
@@ -43,6 +43,8 @@
#include "agg_conv_stroke.h"
+namespace Sword25 {
+
// -----------------------------------------------------------------------------
// CompoundShape
// -----------------------------------------------------------------------------
@@ -211,3 +213,5 @@ bool BS_VectorImageRenderer::Render(const BS_VectorImage & VectorImage,
return true;
}
+
+} // End of namespace Sword25
diff --git a/engines/sword25/gfx/image/vectorimagerenderer.h b/engines/sword25/gfx/image/vectorimagerenderer.h
index e26b0fc302..b104374054 100644
--- a/engines/sword25/gfx/image/vectorimagerenderer.h
+++ b/engines/sword25/gfx/image/vectorimagerenderer.h
@@ -52,6 +52,8 @@
#include "agg_trans_affine.h"
#include "agg_span_allocator.h"
+namespace Sword25 {
+
class BS_VectorImage;
@@ -88,4 +90,6 @@ private:
agg::span_allocator<agg::rgba8> Alloc;
};
+} // End of namespace Sword25
+
#endif
diff --git a/engines/sword25/gfx/opengl/glimage.cpp b/engines/sword25/gfx/opengl/glimage.cpp
index e04ea7010c..80a822adcc 100644
--- a/engines/sword25/gfx/opengl/glimage.cpp
+++ b/engines/sword25/gfx/opengl/glimage.cpp
@@ -42,6 +42,8 @@
#include "sword25/gfx/opengl/openglgfx.h"
#include "sword25/gfx/opengl/glimage.h"
+namespace Sword25 {
+
#define BS_LOG_PREFIX "GLIMAGE"
// -----------------------------------------------------------------------------
@@ -221,3 +223,5 @@ bool BS_GLImage::Blit(int PosX, int PosY,
return Result == GLS_OK;
}
+
+} // End of namespace Sword25
diff --git a/engines/sword25/gfx/opengl/glimage.h b/engines/sword25/gfx/opengl/glimage.h
index e8af2cd18b..62f84ef3cf 100644
--- a/engines/sword25/gfx/opengl/glimage.h
+++ b/engines/sword25/gfx/opengl/glimage.h
@@ -45,6 +45,8 @@
#include <vector>
+namespace Sword25 {
+
// -----------------------------------------------------------------------------
// FORWARD DECLARATION
// -----------------------------------------------------------------------------
@@ -97,4 +99,6 @@ private:
int m_Height;
};
+} // End of namespace Sword25
+
#endif
diff --git a/engines/sword25/gfx/opengl/glvectorimageblit.cpp b/engines/sword25/gfx/opengl/glvectorimageblit.cpp
index c0966fa39f..262153f59e 100644
--- a/engines/sword25/gfx/opengl/glvectorimageblit.cpp
+++ b/engines/sword25/gfx/opengl/glvectorimageblit.cpp
@@ -41,6 +41,9 @@
#include "sword25/util/glsprites/glsprites.h"
#include <vector>
+
+namespace Sword25 {
+
using namespace std;
#define BS_LOG_PREFIX "GLVECTORIMAGEBLIT"
@@ -146,3 +149,5 @@ bool BS_VectorImage::Blit(int PosX, int PosY,
return Result == GLS_OK;
}
+
+} // End of namespace Sword25
diff --git a/engines/sword25/gfx/opengl/openglgfx.cpp b/engines/sword25/gfx/opengl/openglgfx.cpp
index 13f457508a..fc8ecad261 100644
--- a/engines/sword25/gfx/opengl/openglgfx.cpp
+++ b/engines/sword25/gfx/opengl/openglgfx.cpp
@@ -57,6 +57,8 @@
#include <algorithm>
+namespace Sword25 {
+
using namespace std;
#define BS_LOG_PREFIX "OPENGLGFX"
@@ -518,3 +520,5 @@ bool BS_OpenGLGfx::Unpersist(BS_InputPersistenceBlock & Reader)
return result && Reader.IsGood();
}
+
+} // End of namespace Sword25
diff --git a/engines/sword25/gfx/opengl/openglgfx.h b/engines/sword25/gfx/opengl/openglgfx.h
index 15dad2203b..c1b6143827 100644
--- a/engines/sword25/gfx/opengl/openglgfx.h
+++ b/engines/sword25/gfx/opengl/openglgfx.h
@@ -49,6 +49,8 @@
#include "sword25/gfx/renderobjectptr.h"
#include "sword25/util/glsprites/glsprites.h"
+namespace Sword25 {
+
// -----------------------------------------------------------------------------
// FORWARD DECLARATIONS
// -----------------------------------------------------------------------------
@@ -126,4 +128,6 @@ private:
static void FlipImagedataVertical(unsigned int Width, unsigned int Height, std::vector<unsigned int> & Data);
};
+} // End of namespace Sword25
+
#endif
diff --git a/engines/sword25/gfx/opengl/swimage.cpp b/engines/sword25/gfx/opengl/swimage.cpp
index bce01c5a5a..c8efd357a4 100644
--- a/engines/sword25/gfx/opengl/swimage.cpp
+++ b/engines/sword25/gfx/opengl/swimage.cpp
@@ -41,6 +41,8 @@
#include "sword25/gfx/opengl/swimage.h"
+namespace Sword25 {
+
#define BS_LOG_PREFIX "SWIMAGE"
@@ -138,3 +140,5 @@ unsigned int BS_SWImage::GetPixel(int X, int Y)
return _ImageDataPtr[m_Width * Y + X];
}
+
+} // End of namespace Sword25
diff --git a/engines/sword25/gfx/opengl/swimage.h b/engines/sword25/gfx/opengl/swimage.h
index c1fd793b1f..cb27a089a1 100644
--- a/engines/sword25/gfx/opengl/swimage.h
+++ b/engines/sword25/gfx/opengl/swimage.h
@@ -44,6 +44,8 @@
#include "sword25/gfx/graphicengine.h"
+namespace Sword25 {
+
// -----------------------------------------------------------------------------
// CLASS DEFINITION
// -----------------------------------------------------------------------------
@@ -81,4 +83,6 @@ private:
int m_Height;
};
+} // End of namespace Sword25
+
#endif
diff --git a/engines/sword25/gfx/panel.cpp b/engines/sword25/gfx/panel.cpp
index 8f4f6c5786..335c853bd1 100644
--- a/engines/sword25/gfx/panel.cpp
+++ b/engines/sword25/gfx/panel.cpp
@@ -43,6 +43,8 @@
#include "sword25/gfx/graphicengine.h"
#include "sword25/gfx/image/image.h"
+namespace Sword25 {
+
// -----------------------------------------------------------------------------
#define BS_LOG_PREFIX "PANEL"
@@ -136,3 +138,5 @@ bool BS_Panel::Unpersist(BS_InputPersistenceBlock & Reader)
return Reader.IsGood() && Result;
}
+
+} // End of namespace Sword25
diff --git a/engines/sword25/gfx/panel.h b/engines/sword25/gfx/panel.h
index 483799844e..930e5bd0c6 100644
--- a/engines/sword25/gfx/panel.h
+++ b/engines/sword25/gfx/panel.h
@@ -42,6 +42,8 @@
#include "sword25/kernel/common.h"
#include "sword25/gfx/renderobject.h"
+namespace Sword25 {
+
// -----------------------------------------------------------------------------
// Class Definition
// -----------------------------------------------------------------------------
@@ -70,4 +72,6 @@ private:
unsigned int m_Color;
};
+} // End of namespace Sword25
+
#endif
diff --git a/engines/sword25/gfx/renderobject.cpp b/engines/sword25/gfx/renderobject.cpp
index 61460882da..a3ef8a90a2 100644
--- a/engines/sword25/gfx/renderobject.cpp
+++ b/engines/sword25/gfx/renderobject.cpp
@@ -51,6 +51,8 @@
#include "sword25/gfx/text.h"
#include "sword25/gfx/animationtemplate.h"
+namespace Sword25 {
+
#define BS_LOG_PREFIX "RENDEROBJECT"
// Konstruktion / Destruktion
@@ -584,3 +586,5 @@ bool BS_RenderObject::Greater(const BS_RenderObjectPtr<BS_RenderObject> lhs, con
// Falls der Z-Wert gleich ist, wird das weiter oben gelegenen Objekte zuerst gezeichnet.
return lhs->m_Y < rhs->m_Y;
}
+
+} // End of namespace Sword25
diff --git a/engines/sword25/gfx/renderobjectmanager.cpp b/engines/sword25/gfx/renderobjectmanager.cpp
index 683385d64c..a77e71b110 100644
--- a/engines/sword25/gfx/renderobjectmanager.cpp
+++ b/engines/sword25/gfx/renderobjectmanager.cpp
@@ -48,6 +48,8 @@
#include "sword25/gfx/timedrenderobject.h"
#include "sword25/gfx/rootrenderobject.h"
+namespace Sword25 {
+
#define BS_LOG_PREFIX "RENDEROBJECTMANAGER"
// -----------------------------------------------------------------------------
@@ -176,3 +178,5 @@ bool BS_RenderObjectManager::Unpersist(BS_InputPersistenceBlock & Reader)
return Result;
}
+
+} // End of namespace Sword25
diff --git a/engines/sword25/gfx/renderobjectmanager.h b/engines/sword25/gfx/renderobjectmanager.h
index a24eb63d33..31b5a56d28 100644
--- a/engines/sword25/gfx/renderobjectmanager.h
+++ b/engines/sword25/gfx/renderobjectmanager.h
@@ -54,6 +54,8 @@
#include "sword25/gfx/renderobjectptr.h"
#include "sword25/kernel/persistable.h"
+namespace Sword25 {
+
// Klassendefinition
class BS_Kernel;
class BS_Rect;
@@ -127,4 +129,6 @@ private:
BS_RenderObjectPtr<BS_RenderObject> m_RootPtr; // Die Wurzel der Baumes
};
+} // End of namespace Sword25
+
#endif
diff --git a/engines/sword25/gfx/renderobjectptr.h b/engines/sword25/gfx/renderobjectptr.h
index 685f08eb4e..52443c5535 100644
--- a/engines/sword25/gfx/renderobjectptr.h
+++ b/engines/sword25/gfx/renderobjectptr.h
@@ -42,6 +42,8 @@
#include "sword25/kernel/common.h"
#include "sword25/gfx/renderobjectregistry.h"
+namespace Sword25 {
+
// -----------------------------------------------------------------------------
// Forward Declarations
// -----------------------------------------------------------------------------
@@ -92,4 +94,6 @@ private:
unsigned int m_Handle;
};
+} // End of namespace Sword25
+
#endif
diff --git a/engines/sword25/gfx/renderobjectregistry.cpp b/engines/sword25/gfx/renderobjectregistry.cpp
index 220d482288..ccfffc7999 100644
--- a/engines/sword25/gfx/renderobjectregistry.cpp
+++ b/engines/sword25/gfx/renderobjectregistry.cpp
@@ -33,16 +33,18 @@
*/
// -----------------------------------------------------------------------------
-// Logging
+// Includes
// -----------------------------------------------------------------------------
-#define BS_LOG_PREFIX "RENDEROBJECTREGISTRY"
+#include "sword25/gfx/renderobjectregistry.h"
+
+namespace Sword25 {
// -----------------------------------------------------------------------------
-// Includes
+// Logging
// -----------------------------------------------------------------------------
-#include "sword25/gfx/renderobjectregistry.h"
+#define BS_LOG_PREFIX "RENDEROBJECTREGISTRY"
// -----------------------------------------------------------------------------
// Implementation
@@ -63,3 +65,5 @@ void BS_RenderObjectRegistry::LogWarningLn(const char * Message) const
{
BS_LOG_WARNINGLN(Message);
}
+
+} // End of namespace Sword25
diff --git a/engines/sword25/gfx/renderobjectregistry.h b/engines/sword25/gfx/renderobjectregistry.h
index abae86def7..48a230df7e 100644
--- a/engines/sword25/gfx/renderobjectregistry.h
+++ b/engines/sword25/gfx/renderobjectregistry.h
@@ -46,6 +46,8 @@
#include <memory>
#include "sword25/kernel/memlog_on.h"
+namespace Sword25 {
+
// -----------------------------------------------------------------------------
// Forward Deklarationen
// -----------------------------------------------------------------------------
diff --git a/engines/sword25/gfx/rootrenderobject.h b/engines/sword25/gfx/rootrenderobject.h
index 528cac0dad..6f5c1daaa4 100644
--- a/engines/sword25/gfx/rootrenderobject.h
+++ b/engines/sword25/gfx/rootrenderobject.h
@@ -39,6 +39,8 @@
#include "sword25/kernel/common.h"
#include "sword25/gfx/renderobject.h"
+namespace Sword25 {
+
// -----------------------------------------------------------------------------
// Forward Declarations
// -----------------------------------------------------------------------------
@@ -65,4 +67,6 @@ protected:
virtual bool DoRender() { return true; }
};
+} // End of namespace Sword25
+
#endif
diff --git a/engines/sword25/gfx/screenshot.cpp b/engines/sword25/gfx/screenshot.cpp
index 563835ad11..3e2f0f27b2 100644
--- a/engines/sword25/gfx/screenshot.cpp
+++ b/engines/sword25/gfx/screenshot.cpp
@@ -41,6 +41,8 @@
#include "sword25/gfx/screenshot.h"
#include <png.h>
+namespace Sword25 {
+
using namespace std;
// -----------------------------------------------------------------------------
@@ -215,3 +217,5 @@ bool BS_Screenshot::SaveThumbnailToFile(unsigned int Width, unsigned int Height,
// Bild als PNG Speichern.
return SaveToFile(200, 125, ThumbnailData, Filename);
}
+
+} // End of namespace Sword25
diff --git a/engines/sword25/gfx/screenshot.h b/engines/sword25/gfx/screenshot.h
index ca37c0ee04..08280a2ce3 100644
--- a/engines/sword25/gfx/screenshot.h
+++ b/engines/sword25/gfx/screenshot.h
@@ -45,6 +45,8 @@
#include <vector>
#include "sword25/kernel/memlog_on.h"
+namespace Sword25 {
+
// -----------------------------------------------------------------------------
// Class declaration
// -----------------------------------------------------------------------------
@@ -56,4 +58,6 @@ public:
static bool SaveThumbnailToFile(unsigned int Width, unsigned int Height, const std::vector<unsigned int> & Data, const std::string & Filename);
};
+} // End of namespace Sword25
+
#endif
diff --git a/engines/sword25/gfx/staticbitmap.cpp b/engines/sword25/gfx/staticbitmap.cpp
index be166a16ad..6257e016f7 100644
--- a/engines/sword25/gfx/staticbitmap.cpp
+++ b/engines/sword25/gfx/staticbitmap.cpp
@@ -42,6 +42,8 @@
#include "sword25/kernel/outputpersistenceblock.h"
#include "sword25/kernel/inputpersistenceblock.h"
+namespace Sword25 {
+
// -----------------------------------------------------------------------------
// Logging
// -----------------------------------------------------------------------------
@@ -231,3 +233,5 @@ bool BS_StaticBitmap::Unpersist(BS_InputPersistenceBlock & Reader)
return Reader.IsGood() && Result;
}
+
+} // End of namespace Sword25
diff --git a/engines/sword25/gfx/staticbitmap.h b/engines/sword25/gfx/staticbitmap.h
index 47f2491f85..c6c67ff2c0 100644
--- a/engines/sword25/gfx/staticbitmap.h
+++ b/engines/sword25/gfx/staticbitmap.h
@@ -42,6 +42,8 @@
#include "sword25/kernel/common.h"
#include "sword25/gfx/bitmap.h"
+namespace Sword25 {
+
// -----------------------------------------------------------------------------
// Klassendeklaration
// -----------------------------------------------------------------------------
@@ -81,4 +83,6 @@ private:
bool InitBitmapResource(const std::string & Filename);
};
+} // End of namespace Sword25
+
#endif
diff --git a/engines/sword25/gfx/text.cpp b/engines/sword25/gfx/text.cpp
index 739d64e276..e91976366e 100644
--- a/engines/sword25/gfx/text.cpp
+++ b/engines/sword25/gfx/text.cpp
@@ -36,8 +36,6 @@
// Entweder Fontfile absolut abspeichern, oder Verzeichniswechseln verbieten
// Eine relative Fontfile-Angabe könnte verwandt werden nachdem das Verzeichnis bereits gewechselt wurde und die Datei würde nicht mehr gefunden
-#define BS_LOG_PREFIX "TEXT"
-
// -----------------------------------------------------------------------------
// Includes
// -----------------------------------------------------------------------------
@@ -50,6 +48,9 @@
#include "sword25/gfx/text.h"
+namespace Sword25 {
+
+#define BS_LOG_PREFIX "TEXT"
// -----------------------------------------------------------------------------
// Konstanten
@@ -417,3 +418,5 @@ bool BS_Text::Unpersist(BS_InputPersistenceBlock & Reader)
return Reader.IsGood() && Result;
}
+
+} // End of namespace Sword25
diff --git a/engines/sword25/gfx/text.h b/engines/sword25/gfx/text.h
index d15234bd5b..e311209858 100644
--- a/engines/sword25/gfx/text.h
+++ b/engines/sword25/gfx/text.h
@@ -47,6 +47,8 @@
#include <vector>
#include "sword25/kernel/memlog_on.h"
+namespace Sword25 {
+
// -----------------------------------------------------------------------------
// Forward Declarations
// -----------------------------------------------------------------------------
@@ -168,4 +170,6 @@ private:
BS_FontResource * LockFontResource();
};
+} // End of namespace Sword25
+
#endif
diff --git a/engines/sword25/gfx/timedrenderobject.cpp b/engines/sword25/gfx/timedrenderobject.cpp
index c403fe88ed..7adb3c5b7c 100644
--- a/engines/sword25/gfx/timedrenderobject.cpp
+++ b/engines/sword25/gfx/timedrenderobject.cpp
@@ -36,6 +36,8 @@
#include "sword25/gfx/renderobjectmanager.h"
+namespace Sword25 {
+
// -----------------------------------------------------------------------------
// Konstruktion / Destruktion
// -----------------------------------------------------------------------------
@@ -52,3 +54,5 @@ BS_TimedRenderObject::~BS_TimedRenderObject()
BS_ASSERT(GetManager());
GetManager()->DetatchTimedRenderObject(this);
}
+
+} // End of namespace Sword25
diff --git a/engines/sword25/gfx/timedrenderobject.h b/engines/sword25/gfx/timedrenderobject.h
index 5802951e64..f2aa4a638d 100644
--- a/engines/sword25/gfx/timedrenderobject.h
+++ b/engines/sword25/gfx/timedrenderobject.h
@@ -43,6 +43,8 @@
#include "sword25/kernel/common.h"
#include "sword25/gfx/renderobject.h"
+namespace Sword25 {
+
// -----------------------------------------------------------------------------
// Forward Declarations
// -----------------------------------------------------------------------------
@@ -70,3 +72,5 @@ public:
*/
virtual void FrameNotification(int TimeElapsed) = 0;
};
+
+} // End of namespace Sword25