aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugene Sandulenko2010-08-18 12:58:22 +0000
committerEugene Sandulenko2010-10-12 22:59:01 +0000
commitb01994a53bbc96da907a4c28934e644184291017 (patch)
tree7454011b38391985e9f7ce6bca101f1394d127be
parent4c4e821326a3772ad59fee836eabd5175bbb84ca (diff)
downloadscummvm-rg350-b01994a53bbc96da907a4c28934e644184291017.tar.gz
scummvm-rg350-b01994a53bbc96da907a4c28934e644184291017.tar.bz2
scummvm-rg350-b01994a53bbc96da907a4c28934e644184291017.zip
SWORD25: removed BS_ prefix from rest of the classes.
The things which are intentionally left with the prefix: BS_LOG, BS_ASSERT, BS_Rect, BS_String. svn-id: r53261
-rw-r--r--engines/sword25/fmv/movieplayer.cpp4
-rw-r--r--engines/sword25/fmv/movieplayer.h4
-rw-r--r--engines/sword25/fmv/movieplayer_script.cpp22
-rw-r--r--engines/sword25/gfx/animation.cpp38
-rw-r--r--engines/sword25/gfx/animation.h14
-rw-r--r--engines/sword25/gfx/animationdescription.cpp4
-rw-r--r--engines/sword25/gfx/animationdescription.h6
-rw-r--r--engines/sword25/gfx/animationresource.cpp8
-rw-r--r--engines/sword25/gfx/animationresource.h4
-rw-r--r--engines/sword25/gfx/animationtemplate.cpp14
-rw-r--r--engines/sword25/gfx/animationtemplate.h8
-rw-r--r--engines/sword25/gfx/animationtemplateregistry.cpp4
-rw-r--r--engines/sword25/gfx/animationtemplateregistry.h6
-rw-r--r--engines/sword25/gfx/bitmap.cpp4
-rw-r--r--engines/sword25/gfx/bitmap.h4
-rw-r--r--engines/sword25/gfx/bitmapresource.cpp2
-rw-r--r--engines/sword25/gfx/bitmapresource.h2
-rw-r--r--engines/sword25/gfx/dynamicbitmap.cpp8
-rw-r--r--engines/sword25/gfx/dynamicbitmap.h6
-rw-r--r--engines/sword25/gfx/fontresource.cpp4
-rw-r--r--engines/sword25/gfx/fontresource.h8
-rw-r--r--engines/sword25/gfx/graphicengine.cpp10
-rw-r--r--engines/sword25/gfx/graphicengine.h10
-rw-r--r--engines/sword25/gfx/graphicengine_script.cpp10
-rw-r--r--engines/sword25/gfx/opengl/glimage.cpp4
-rw-r--r--engines/sword25/gfx/opengl/openglgfx.cpp14
-rw-r--r--engines/sword25/gfx/opengl/openglgfx.h14
-rw-r--r--engines/sword25/gfx/opengl/swimage.cpp2
-rw-r--r--engines/sword25/gfx/panel.cpp8
-rw-r--r--engines/sword25/gfx/panel.h6
-rw-r--r--engines/sword25/gfx/renderobject.cpp10
-rw-r--r--engines/sword25/gfx/renderobject.h12
-rw-r--r--engines/sword25/gfx/renderobjectmanager.cpp6
-rw-r--r--engines/sword25/gfx/renderobjectmanager.h8
-rw-r--r--engines/sword25/gfx/renderobjectregistry.h2
-rw-r--r--engines/sword25/gfx/rootrenderobject.h2
-rw-r--r--engines/sword25/gfx/staticbitmap.cpp32
-rw-r--r--engines/sword25/gfx/staticbitmap.h6
-rw-r--r--engines/sword25/gfx/text.cpp24
-rw-r--r--engines/sword25/gfx/text.h12
-rw-r--r--engines/sword25/input/inputengine.cpp2
-rw-r--r--engines/sword25/input/inputengine.h4
-rw-r--r--engines/sword25/input/inputengine_script.cpp8
-rw-r--r--engines/sword25/input/scummvminput.cpp12
-rw-r--r--engines/sword25/input/scummvminput.h8
-rw-r--r--engines/sword25/kernel/filesystemutil.cpp4
-rw-r--r--engines/sword25/kernel/filesystemutil.h6
-rw-r--r--engines/sword25/kernel/inputpersistenceblock.cpp24
-rw-r--r--engines/sword25/kernel/inputpersistenceblock.h6
-rw-r--r--engines/sword25/kernel/kernel.cpp62
-rw-r--r--engines/sword25/kernel/kernel.h40
-rw-r--r--engines/sword25/kernel/kernel_script.cpp158
-rw-r--r--engines/sword25/kernel/objectregistry.h6
-rw-r--r--engines/sword25/kernel/outputpersistenceblock.cpp18
-rw-r--r--engines/sword25/kernel/outputpersistenceblock.h4
-rw-r--r--engines/sword25/kernel/persistable.h12
-rw-r--r--engines/sword25/kernel/persistenceblock.h2
-rw-r--r--engines/sword25/kernel/persistenceservice.cpp62
-rw-r--r--engines/sword25/kernel/persistenceservice.h8
-rw-r--r--engines/sword25/kernel/resmanager.cpp54
-rw-r--r--engines/sword25/kernel/resmanager.h36
-rw-r--r--engines/sword25/kernel/resource.cpp8
-rw-r--r--engines/sword25/kernel/resource.h14
-rw-r--r--engines/sword25/kernel/resservice.h12
-rw-r--r--engines/sword25/kernel/scummvmwindow.cpp44
-rw-r--r--engines/sword25/kernel/scummvmwindow.h6
-rw-r--r--engines/sword25/kernel/service.h12
-rw-r--r--engines/sword25/kernel/service_ids.h14
-rw-r--r--engines/sword25/kernel/window.cpp8
-rw-r--r--engines/sword25/kernel/window.h6
-rw-r--r--engines/sword25/math/geometry.cpp4
-rw-r--r--engines/sword25/math/geometry.h6
-rw-r--r--engines/sword25/math/geometry_script.cpp4
-rw-r--r--engines/sword25/math/polygon.cpp6
-rw-r--r--engines/sword25/math/polygon.h8
-rw-r--r--engines/sword25/math/region.cpp8
-rw-r--r--engines/sword25/math/region.h10
-rw-r--r--engines/sword25/math/regionregistry.cpp4
-rw-r--r--engines/sword25/math/regionregistry.h6
-rw-r--r--engines/sword25/math/walkregion.cpp6
-rw-r--r--engines/sword25/math/walkregion.h6
-rw-r--r--engines/sword25/package/packagemanager.cpp2
-rw-r--r--engines/sword25/package/packagemanager.h4
-rw-r--r--engines/sword25/package/packagemanager_script.cpp4
-rw-r--r--engines/sword25/package/scummvmpackagemanager.cpp4
-rw-r--r--engines/sword25/package/scummvmpackagemanager.h4
-rw-r--r--engines/sword25/script/luascript.cpp10
-rw-r--r--engines/sword25/script/luascript.h8
-rw-r--r--engines/sword25/script/script.h12
-rw-r--r--engines/sword25/sfx/fmodexsound.cpp10
-rw-r--r--engines/sword25/sfx/fmodexsound.h8
-rw-r--r--engines/sword25/sfx/soundengine.cpp2
-rw-r--r--engines/sword25/sfx/soundengine.h4
-rw-r--r--engines/sword25/sfx/soundengine_script.cpp78
-rw-r--r--engines/sword25/sword25.cpp14
95 files changed, 629 insertions, 629 deletions
diff --git a/engines/sword25/fmv/movieplayer.cpp b/engines/sword25/fmv/movieplayer.cpp
index 076226bf89..e4b33bdf8c 100644
--- a/engines/sword25/fmv/movieplayer.cpp
+++ b/engines/sword25/fmv/movieplayer.cpp
@@ -38,11 +38,11 @@ namespace Sword25 {
#define BS_LOG_PREFIX "MOVIEPLAYER"
-BS_Service *OggTheora_CreateObject(BS_Kernel *pKernel) {
+Service *OggTheora_CreateObject(Kernel *pKernel) {
return new MoviePlayer(pKernel);
}
-MoviePlayer::MoviePlayer(BS_Kernel *pKernel) : BS_Service(pKernel) {
+MoviePlayer::MoviePlayer(Kernel *pKernel) : Service(pKernel) {
if (!_RegisterScriptBindings())
BS_LOG_ERRORLN("Script bindings could not be registered.");
else
diff --git a/engines/sword25/fmv/movieplayer.h b/engines/sword25/fmv/movieplayer.h
index ceb7c6dad9..3404eaacd8 100644
--- a/engines/sword25/fmv/movieplayer.h
+++ b/engines/sword25/fmv/movieplayer.h
@@ -48,13 +48,13 @@ namespace Sword25 {
// Class definitions
// -----------------------------------------------------------------------------
-class MoviePlayer : public BS_Service {
+class MoviePlayer : public Service {
public:
// -----------------------------------------------------------------------------
// Constructor / Destructor
// -----------------------------------------------------------------------------
- MoviePlayer(BS_Kernel *pKernel);
+ MoviePlayer(Kernel *pKernel);
~MoviePlayer() {};
// -----------------------------------------------------------------------------
diff --git a/engines/sword25/fmv/movieplayer_script.cpp b/engines/sword25/fmv/movieplayer_script.cpp
index a89338f224..0b96d4dc34 100644
--- a/engines/sword25/fmv/movieplayer_script.cpp
+++ b/engines/sword25/fmv/movieplayer_script.cpp
@@ -46,7 +46,7 @@
namespace Sword25 {
int LoadMovie(lua_State *L) {
- MoviePlayer *FMVPtr = BS_Kernel::GetInstance()->GetFMV();
+ MoviePlayer *FMVPtr = Kernel::GetInstance()->GetFMV();
BS_ASSERT(FMVPtr);
lua_pushbooleancpp(L, FMVPtr->LoadMovie(luaL_checkstring(L, 1), lua_gettop(L) == 2 ? static_cast<unsigned int>(luaL_checknumber(L, 2)) : 10));
@@ -57,7 +57,7 @@ int LoadMovie(lua_State *L) {
// -------------------------------------------------------------------------
int UnloadMovie(lua_State *L) {
- MoviePlayer *FMVPtr = BS_Kernel::GetInstance()->GetFMV();
+ MoviePlayer *FMVPtr = Kernel::GetInstance()->GetFMV();
BS_ASSERT(FMVPtr);
lua_pushbooleancpp(L, FMVPtr->UnloadMovie());
@@ -68,7 +68,7 @@ int UnloadMovie(lua_State *L) {
// -------------------------------------------------------------------------
int Play(lua_State *L) {
- MoviePlayer *FMVPtr = BS_Kernel::GetInstance()->GetFMV();
+ MoviePlayer *FMVPtr = Kernel::GetInstance()->GetFMV();
BS_ASSERT(FMVPtr);
lua_pushbooleancpp(L, FMVPtr->Play());
@@ -79,7 +79,7 @@ int Play(lua_State *L) {
// -------------------------------------------------------------------------
int Pause(lua_State *L) {
- MoviePlayer *FMVPtr = BS_Kernel::GetInstance()->GetFMV();
+ MoviePlayer *FMVPtr = Kernel::GetInstance()->GetFMV();
BS_ASSERT(FMVPtr);
lua_pushbooleancpp(L, FMVPtr->Pause());
@@ -90,7 +90,7 @@ int Pause(lua_State *L) {
// -------------------------------------------------------------------------
int Update(lua_State *L) {
- MoviePlayer *FMVPtr = BS_Kernel::GetInstance()->GetFMV();
+ MoviePlayer *FMVPtr = Kernel::GetInstance()->GetFMV();
BS_ASSERT(FMVPtr);
FMVPtr->Update();
@@ -101,7 +101,7 @@ int Update(lua_State *L) {
// -------------------------------------------------------------------------
int IsMovieLoaded(lua_State *L) {
- MoviePlayer *FMVPtr = BS_Kernel::GetInstance()->GetFMV();
+ MoviePlayer *FMVPtr = Kernel::GetInstance()->GetFMV();
BS_ASSERT(FMVPtr);
lua_pushbooleancpp(L, FMVPtr->IsMovieLoaded());
@@ -112,7 +112,7 @@ int IsMovieLoaded(lua_State *L) {
// -------------------------------------------------------------------------
int IsPaused(lua_State *L) {
- MoviePlayer *FMVPtr = BS_Kernel::GetInstance()->GetFMV();
+ MoviePlayer *FMVPtr = Kernel::GetInstance()->GetFMV();
BS_ASSERT(FMVPtr);
lua_pushbooleancpp(L, FMVPtr->IsPaused());
@@ -123,7 +123,7 @@ int IsPaused(lua_State *L) {
// -------------------------------------------------------------------------
int GetScaleFactor(lua_State *L) {
- MoviePlayer *FMVPtr = BS_Kernel::GetInstance()->GetFMV();
+ MoviePlayer *FMVPtr = Kernel::GetInstance()->GetFMV();
BS_ASSERT(FMVPtr);
lua_pushnumber(L, FMVPtr->GetScaleFactor());
@@ -134,7 +134,7 @@ int GetScaleFactor(lua_State *L) {
// -------------------------------------------------------------------------
int SetScaleFactor(lua_State *L) {
- MoviePlayer *FMVPtr = BS_Kernel::GetInstance()->GetFMV();
+ MoviePlayer *FMVPtr = Kernel::GetInstance()->GetFMV();
BS_ASSERT(FMVPtr);
FMVPtr->SetScaleFactor(static_cast<float>(luaL_checknumber(L, 1)));
@@ -145,7 +145,7 @@ int SetScaleFactor(lua_State *L) {
// -------------------------------------------------------------------------
int GetTime(lua_State *L) {
- MoviePlayer *FMVPtr = BS_Kernel::GetInstance()->GetFMV();
+ MoviePlayer *FMVPtr = Kernel::GetInstance()->GetFMV();
BS_ASSERT(FMVPtr);
lua_pushnumber(L, FMVPtr->GetTime());
@@ -172,7 +172,7 @@ const luaL_reg LIBRARY_FUNCTIONS[] = {
};
bool MoviePlayer::_RegisterScriptBindings() {
- BS_Kernel *pKernel = BS_Kernel::GetInstance();
+ Kernel *pKernel = Kernel::GetInstance();
BS_ASSERT(pKernel);
ScriptEngine *pScript = static_cast<ScriptEngine *>(pKernel->GetService("script"));
BS_ASSERT(pScript);
diff --git a/engines/sword25/gfx/animation.cpp b/engines/sword25/gfx/animation.cpp
index 7c4d05da73..71670a59c5 100644
--- a/engines/sword25/gfx/animation.cpp
+++ b/engines/sword25/gfx/animation.cpp
@@ -92,7 +92,7 @@ Animation::Animation(RenderObjectPtr<RenderObject> ParentPtr, const AnimationTem
// -----------------------------------------------------------------------------
-Animation::Animation(BS_InputPersistenceBlock &Reader, RenderObjectPtr<RenderObject> ParentPtr, unsigned int Handle) :
+Animation::Animation(InputPersistenceBlock &Reader, RenderObjectPtr<RenderObject> ParentPtr, unsigned int Handle) :
TimedRenderObject(ParentPtr, RenderObject::TYPE_ANIMATION, Handle) {
// Das BS_RenderObject konnte nicht erzeugt werden, daher muss an dieser Stelle abgebrochen werden.
if (!m_InitSuccess) return;
@@ -107,8 +107,8 @@ Animation::Animation(BS_InputPersistenceBlock &Reader, RenderObjectPtr<RenderObj
void Animation::InitializeAnimationResource(const Common::String &FileName) {
// Die Resource wird für die gesamte Lebensdauer des Animations-Objektes gelockt.
- BS_Resource *ResourcePtr = BS_Kernel::GetInstance()->GetResourceManager()->RequestResource(FileName);
- if (ResourcePtr && ResourcePtr->GetType() == BS_Resource::TYPE_ANIMATION)
+ Resource *ResourcePtr = Kernel::GetInstance()->GetResourceManager()->RequestResource(FileName);
+ if (ResourcePtr && ResourcePtr->GetType() == Resource::TYPE_ANIMATION)
m_AnimationResourcePtr = static_cast<AnimationResource *>(ResourcePtr);
else {
BS_LOG_ERRORLN("The resource \"%s\" could not be requested. The Animation can't be created.", FileName.c_str());
@@ -207,13 +207,13 @@ bool Animation::DoRender() {
BS_ASSERT(m_CurrentFrame < animationDescriptionPtr->GetFrameCount());
// Bitmap des aktuellen Frames holen
- BS_Resource *pResource = BS_Kernel::GetInstance()->GetResourceManager()->RequestResource(animationDescriptionPtr->GetFrame(m_CurrentFrame).FileName);
+ Resource *pResource = Kernel::GetInstance()->GetResourceManager()->RequestResource(animationDescriptionPtr->GetFrame(m_CurrentFrame).FileName);
BS_ASSERT(pResource);
- BS_ASSERT(pResource->GetType() == BS_Resource::TYPE_BITMAP);
+ BS_ASSERT(pResource->GetType() == Resource::TYPE_BITMAP);
BitmapResource *pBitmapResource = static_cast<BitmapResource *>(pResource);
// Framebufferobjekt holen
- GraphicEngine *pGfx = static_cast<GraphicEngine *>(BS_Kernel::GetInstance()->GetService("gfx"));
+ GraphicEngine *pGfx = static_cast<GraphicEngine *>(Kernel::GetInstance()->GetService("gfx"));
BS_ASSERT(pGfx);
// Bitmap zeichnen
@@ -346,9 +346,9 @@ void Animation::ComputeCurrentCharacteristics() {
BS_ASSERT(animationDescriptionPtr);
const AnimationResource::Frame &CurFrame = animationDescriptionPtr->GetFrame(m_CurrentFrame);
- BS_Resource *pResource = BS_Kernel::GetInstance()->GetResourceManager()->RequestResource(CurFrame.FileName);
+ Resource *pResource = Kernel::GetInstance()->GetResourceManager()->RequestResource(CurFrame.FileName);
BS_ASSERT(pResource);
- BS_ASSERT(pResource->GetType() == BS_Resource::TYPE_BITMAP);
+ BS_ASSERT(pResource->GetType() == Resource::TYPE_BITMAP);
BitmapResource *pBitmap = static_cast<BitmapResource *>(pResource);
// Größe des Bitmaps auf die Animation übertragen
@@ -371,7 +371,7 @@ bool Animation::LockAllFrames() {
AnimationDescription *animationDescriptionPtr = GetAnimationDescription();
BS_ASSERT(animationDescriptionPtr);
for (unsigned int i = 0; i < animationDescriptionPtr->GetFrameCount(); ++i) {
- if (!BS_Kernel::GetInstance()->GetResourceManager()->RequestResource(animationDescriptionPtr->GetFrame(i).FileName)) {
+ if (!Kernel::GetInstance()->GetResourceManager()->RequestResource(animationDescriptionPtr->GetFrame(i).FileName)) {
BS_LOG_ERRORLN("Could not lock all animation frames.");
return false;
}
@@ -390,8 +390,8 @@ bool Animation::UnlockAllFrames() {
AnimationDescription *animationDescriptionPtr = GetAnimationDescription();
BS_ASSERT(animationDescriptionPtr);
for (unsigned int i = 0; i < animationDescriptionPtr->GetFrameCount(); ++i) {
- BS_Resource *pResource;
- if (!(pResource = BS_Kernel::GetInstance()->GetResourceManager()->RequestResource(animationDescriptionPtr->GetFrame(i).FileName))) {
+ Resource *pResource;
+ if (!(pResource = Kernel::GetInstance()->GetResourceManager()->RequestResource(animationDescriptionPtr->GetFrame(i).FileName))) {
BS_LOG_ERRORLN("Could not unlock all animation frames.");
return false;
}
@@ -602,9 +602,9 @@ int Animation::ComputeXModifier() const {
BS_ASSERT(animationDescriptionPtr);
const AnimationResource::Frame &CurFrame = animationDescriptionPtr->GetFrame(m_CurrentFrame);
- BS_Resource *pResource = BS_Kernel::GetInstance()->GetResourceManager()->RequestResource(CurFrame.FileName);
+ Resource *pResource = Kernel::GetInstance()->GetResourceManager()->RequestResource(CurFrame.FileName);
BS_ASSERT(pResource);
- BS_ASSERT(pResource->GetType() == BS_Resource::TYPE_BITMAP);
+ BS_ASSERT(pResource->GetType() == Resource::TYPE_BITMAP);
BitmapResource *pBitmap = static_cast<BitmapResource *>(pResource);
int Result = CurFrame.FlipV ? - static_cast<int>((pBitmap->GetWidth() - 1 - CurFrame.HotspotX) * m_ScaleFactorX) :
@@ -622,9 +622,9 @@ int Animation::ComputeYModifier() const {
BS_ASSERT(animationDescriptionPtr);
const AnimationResource::Frame &CurFrame = animationDescriptionPtr->GetFrame(m_CurrentFrame);
- BS_Resource *pResource = BS_Kernel::GetInstance()->GetResourceManager()->RequestResource(CurFrame.FileName);
+ Resource *pResource = Kernel::GetInstance()->GetResourceManager()->RequestResource(CurFrame.FileName);
BS_ASSERT(pResource);
- BS_ASSERT(pResource->GetType() == BS_Resource::TYPE_BITMAP);
+ BS_ASSERT(pResource->GetType() == Resource::TYPE_BITMAP);
BitmapResource *pBitmap = static_cast<BitmapResource *>(pResource);
int Result = CurFrame.FlipH ? - static_cast<int>((pBitmap->GetHeight() - 1 - CurFrame.HotspotY) * m_ScaleFactorY) :
@@ -666,7 +666,7 @@ void Animation::RegisterDeleteCallback(ANIMATION_CALLBACK Callback, unsigned int
// Persistenz
// -----------------------------------------------------------------------------
-void Animation::PersistCallbackVector(BS_OutputPersistenceBlock &Writer, const Common::Array<ANIMATION_CALLBACK_DATA> & Vector) {
+void Animation::PersistCallbackVector(OutputPersistenceBlock &Writer, const Common::Array<ANIMATION_CALLBACK_DATA> & Vector) {
// Anzahl an Callbacks persistieren.
Writer.Write(Vector.size());
@@ -682,7 +682,7 @@ void Animation::PersistCallbackVector(BS_OutputPersistenceBlock &Writer, const C
// -----------------------------------------------------------------------------
-void Animation::UnpersistCallbackVector(BS_InputPersistenceBlock &Reader, Common::Array<ANIMATION_CALLBACK_DATA> & Vector) {
+void Animation::UnpersistCallbackVector(InputPersistenceBlock &Reader, Common::Array<ANIMATION_CALLBACK_DATA> & Vector) {
// Callbackvector leeren.
Vector.resize(0);
@@ -706,7 +706,7 @@ void Animation::UnpersistCallbackVector(BS_InputPersistenceBlock &Reader, Common
// -----------------------------------------------------------------------------
-bool Animation::Persist(BS_OutputPersistenceBlock &Writer) {
+bool Animation::Persist(OutputPersistenceBlock &Writer) {
bool Result = true;
Result &= RenderObject::Persist(Writer);
@@ -749,7 +749,7 @@ bool Animation::Persist(BS_OutputPersistenceBlock &Writer) {
// -----------------------------------------------------------------------------
-bool Animation::Unpersist(BS_InputPersistenceBlock &Reader) {
+bool Animation::Unpersist(InputPersistenceBlock &Reader) {
bool Result = true;
Result &= RenderObject::Unpersist(Reader);
diff --git a/engines/sword25/gfx/animation.h b/engines/sword25/gfx/animation.h
index 978b1ae151..cc09246f96 100644
--- a/engines/sword25/gfx/animation.h
+++ b/engines/sword25/gfx/animation.h
@@ -46,12 +46,12 @@
namespace Sword25 {
// Forward declarations
-class BS_Kernel;
+class Kernel;
class BS_PackageManager;
class AnimationResource;
class AnimationTemplate;
class AnimationDescription;
-class BS_InputPersistenceBlock;
+class InputPersistenceBlock;
class Animation : public TimedRenderObject {
friend class RenderObject;
@@ -59,7 +59,7 @@ class Animation : public TimedRenderObject {
private:
Animation(RenderObjectPtr<RenderObject> ParentPtr, const Common::String &FileName);
Animation(RenderObjectPtr<RenderObject> ParentPtr, const AnimationTemplate &Template);
- Animation(BS_InputPersistenceBlock &Reader, RenderObjectPtr<RenderObject> ParentPtr, unsigned int Handle);
+ Animation(InputPersistenceBlock &Reader, RenderObjectPtr<RenderObject> ParentPtr, unsigned int Handle);
public:
enum ANIMATION_TYPES {
@@ -135,8 +135,8 @@ public:
return m_ScaleFactorY;
}
- virtual bool Persist(BS_OutputPersistenceBlock &Writer);
- virtual bool Unpersist(BS_InputPersistenceBlock &Reader);
+ virtual bool Persist(OutputPersistenceBlock &Writer);
+ virtual bool Unpersist(InputPersistenceBlock &Reader);
virtual void FrameNotification(int TimeElapsed);
@@ -221,8 +221,8 @@ private:
int ComputeYModifier() const;
void InitMembers();
- void PersistCallbackVector(BS_OutputPersistenceBlock &Writer, const Common::Array<ANIMATION_CALLBACK_DATA> & Vector);
- void UnpersistCallbackVector(BS_InputPersistenceBlock &Reader, Common::Array<ANIMATION_CALLBACK_DATA> & Vector);
+ void PersistCallbackVector(OutputPersistenceBlock &Writer, const Common::Array<ANIMATION_CALLBACK_DATA> & Vector);
+ void UnpersistCallbackVector(InputPersistenceBlock &Reader, Common::Array<ANIMATION_CALLBACK_DATA> & Vector);
AnimationDescription *GetAnimationDescription() const;
void InitializeAnimationResource(const Common::String &FileName);
};
diff --git a/engines/sword25/gfx/animationdescription.cpp b/engines/sword25/gfx/animationdescription.cpp
index 44a9d8de06..622940c3ec 100644
--- a/engines/sword25/gfx/animationdescription.cpp
+++ b/engines/sword25/gfx/animationdescription.cpp
@@ -46,7 +46,7 @@ namespace Sword25 {
// Persistenz
// -----------------------------------------------------------------------------
-bool AnimationDescription::Persist(BS_OutputPersistenceBlock &Writer) {
+bool AnimationDescription::Persist(OutputPersistenceBlock &Writer) {
Writer.Write(static_cast<unsigned int>(m_AnimationType));
Writer.Write(m_FPS);
Writer.Write(m_MillisPerFrame);
@@ -59,7 +59,7 @@ bool AnimationDescription::Persist(BS_OutputPersistenceBlock &Writer) {
// -----------------------------------------------------------------------------
-bool AnimationDescription::Unpersist(BS_InputPersistenceBlock &Reader) {
+bool AnimationDescription::Unpersist(InputPersistenceBlock &Reader) {
unsigned int AnimationType;
Reader.Read(AnimationType);
m_AnimationType = static_cast<Animation::ANIMATION_TYPES>(AnimationType);
diff --git a/engines/sword25/gfx/animationdescription.h b/engines/sword25/gfx/animationdescription.h
index 3ac441a767..2fab8287c7 100644
--- a/engines/sword25/gfx/animationdescription.h
+++ b/engines/sword25/gfx/animationdescription.h
@@ -49,7 +49,7 @@ namespace Sword25 {
// Klassendefinition
// -----------------------------------------------------------------------------
-class AnimationDescription : public BS_Persistable {
+class AnimationDescription : public Persistable {
protected:
AnimationDescription() :
m_AnimationType(Animation::AT_LOOP),
@@ -102,8 +102,8 @@ public:
return m_ColorModulationAllowed;
}
- virtual bool Persist(BS_OutputPersistenceBlock &Writer);
- virtual bool Unpersist(BS_InputPersistenceBlock &Reader);
+ virtual bool Persist(OutputPersistenceBlock &Writer);
+ virtual bool Unpersist(InputPersistenceBlock &Reader);
protected:
Animation::ANIMATION_TYPES m_AnimationType;
diff --git a/engines/sword25/gfx/animationresource.cpp b/engines/sword25/gfx/animationresource.cpp
index 770c60f7ce..1803171304 100644
--- a/engines/sword25/gfx/animationresource.cpp
+++ b/engines/sword25/gfx/animationresource.cpp
@@ -65,10 +65,10 @@ const int MAX_FPS = 200;
// -----------------------------------------------------------------------------
AnimationResource::AnimationResource(const Common::String &FileName) :
- BS_Resource(FileName, BS_Resource::TYPE_ANIMATION),
+ Resource(FileName, Resource::TYPE_ANIMATION),
m_Valid(false) {
// Pointer auf den Package-Manager bekommen
- PackageManager *PackagePtr = BS_Kernel::GetInstance()->GetPackage();
+ PackageManager *PackagePtr = Kernel::GetInstance()->GetPackage();
BS_ASSERT(PackagePtr);
// Animations-XML laden
@@ -266,7 +266,7 @@ AnimationResource::~AnimationResource() {
bool AnimationResource::PrecacheAllFrames() const {
Common::Array<Frame>::const_iterator Iter = m_Frames.begin();
for (; Iter != m_Frames.end(); ++Iter) {
- if (!BS_Kernel::GetInstance()->GetResourceManager()->PrecacheResource((*Iter).FileName)) {
+ if (!Kernel::GetInstance()->GetResourceManager()->PrecacheResource((*Iter).FileName)) {
BS_LOG_ERRORLN("Could not precache \"%s\".", (*Iter).FileName.c_str());
return false;
}
@@ -289,7 +289,7 @@ bool AnimationResource::ComputeFeatures() {
Common::Array<Frame>::const_iterator Iter = m_Frames.begin();
for (; Iter != m_Frames.end(); ++Iter) {
BitmapResource *pBitmap;
- if (!(pBitmap = static_cast<BitmapResource *>(BS_Kernel::GetInstance()->GetResourceManager()->RequestResource((*Iter).FileName)))) {
+ if (!(pBitmap = static_cast<BitmapResource *>(Kernel::GetInstance()->GetResourceManager()->RequestResource((*Iter).FileName)))) {
BS_LOG_ERRORLN("Could not request \"%s\".", (*Iter).FileName.c_str());
return false;
}
diff --git a/engines/sword25/gfx/animationresource.h b/engines/sword25/gfx/animationresource.h
index 806861f07e..8e1c36ef0f 100644
--- a/engines/sword25/gfx/animationresource.h
+++ b/engines/sword25/gfx/animationresource.h
@@ -56,14 +56,14 @@ namespace Sword25 {
// Forward Declarations
// -----------------------------------------------------------------------------
-class BS_Kernel;
+class Kernel;
class PackageManager;
// -----------------------------------------------------------------------------
// Class Definition
// -----------------------------------------------------------------------------
-class AnimationResource : public BS_Resource, public AnimationDescription {
+class AnimationResource : public Resource, public AnimationDescription {
public:
AnimationResource(const Common::String &FileName);
virtual ~AnimationResource();
diff --git a/engines/sword25/gfx/animationtemplate.cpp b/engines/sword25/gfx/animationtemplate.cpp
index c573d06b1e..426cbabfea 100644
--- a/engines/sword25/gfx/animationtemplate.cpp
+++ b/engines/sword25/gfx/animationtemplate.cpp
@@ -79,7 +79,7 @@ unsigned int AnimationTemplate::Create(const AnimationTemplate &Other) {
// -----------------------------------------------------------------------------
-unsigned int AnimationTemplate::Create(BS_InputPersistenceBlock &Reader, unsigned int Handle) {
+unsigned int AnimationTemplate::Create(InputPersistenceBlock &Reader, unsigned int Handle) {
AnimationTemplate *AnimationTemplatePtr = new AnimationTemplate(Reader, Handle);
if (AnimationTemplatePtr->IsValid()) {
@@ -133,7 +133,7 @@ AnimationTemplate::AnimationTemplate(const AnimationTemplate &Other) {
// -----------------------------------------------------------------------------
-AnimationTemplate::AnimationTemplate(BS_InputPersistenceBlock &Reader, unsigned int Handle) {
+AnimationTemplate::AnimationTemplate(InputPersistenceBlock &Reader, unsigned int Handle) {
// Objekt registrieren.
AnimationTemplateRegistry::GetInstance().RegisterObject(this, Handle);
@@ -144,9 +144,9 @@ AnimationTemplate::AnimationTemplate(BS_InputPersistenceBlock &Reader, unsigned
// -----------------------------------------------------------------------------
AnimationResource *AnimationTemplate::RequestSourceAnimation(const Common::String &SourceAnimation) const {
- BS_ResourceManager *RMPtr = BS_Kernel::GetInstance()->GetResourceManager();
- BS_Resource *ResourcePtr;
- if (NULL == (ResourcePtr = RMPtr->RequestResource(SourceAnimation)) || ResourcePtr->GetType() != BS_Resource::TYPE_ANIMATION) {
+ ResourceManager *RMPtr = Kernel::GetInstance()->GetResourceManager();
+ Resource *ResourcePtr;
+ if (NULL == (ResourcePtr = RMPtr->RequestResource(SourceAnimation)) || ResourcePtr->GetType() != Resource::TYPE_ANIMATION) {
BS_LOG_ERRORLN("The resource \"%s\" could not be requested or is has an invalid type. The animation template can't be created.", SourceAnimation.c_str());
return 0;
}
@@ -212,7 +212,7 @@ void AnimationTemplate::SetFPS(int FPS) {
// -----------------------------------------------------------------------------
-bool AnimationTemplate::Persist(BS_OutputPersistenceBlock &Writer) {
+bool AnimationTemplate::Persist(OutputPersistenceBlock &Writer) {
bool Result = true;
// Parent persistieren.
@@ -242,7 +242,7 @@ bool AnimationTemplate::Persist(BS_OutputPersistenceBlock &Writer) {
// -----------------------------------------------------------------------------
-bool AnimationTemplate::Unpersist(BS_InputPersistenceBlock &Reader) {
+bool AnimationTemplate::Unpersist(InputPersistenceBlock &Reader) {
bool Result = true;
// Parent wieder herstellen.
diff --git a/engines/sword25/gfx/animationtemplate.h b/engines/sword25/gfx/animationtemplate.h
index 63e09bc20a..1a5e8813a9 100644
--- a/engines/sword25/gfx/animationtemplate.h
+++ b/engines/sword25/gfx/animationtemplate.h
@@ -63,13 +63,13 @@ class AnimationTemplate : public AnimationDescription {
public:
static unsigned int Create(const Common::String &SourceAnimation);
static unsigned int Create(const AnimationTemplate &Other);
- static unsigned int Create(BS_InputPersistenceBlock &Reader, unsigned int Handle);
+ static unsigned int Create(InputPersistenceBlock &Reader, unsigned int Handle);
AnimationTemplate *ResolveHandle(unsigned int Handle) const;
private:
AnimationTemplate(const Common::String &SourceAnimation);
AnimationTemplate(const AnimationTemplate &Other);
- AnimationTemplate(BS_InputPersistenceBlock &Reader, unsigned int Handle);
+ AnimationTemplate(InputPersistenceBlock &Reader, unsigned int Handle);
public:
~AnimationTemplate();
@@ -119,8 +119,8 @@ public:
*/
void SetFPS(int FPS);
- virtual bool Persist(BS_OutputPersistenceBlock &Writer);
- virtual bool Unpersist(BS_InputPersistenceBlock &Reader);
+ virtual bool Persist(OutputPersistenceBlock &Writer);
+ virtual bool Unpersist(InputPersistenceBlock &Reader);
private:
Common::Array<Frame> m_Frames;
diff --git a/engines/sword25/gfx/animationtemplateregistry.cpp b/engines/sword25/gfx/animationtemplateregistry.cpp
index d15a1947e8..ee0713d13a 100644
--- a/engines/sword25/gfx/animationtemplateregistry.cpp
+++ b/engines/sword25/gfx/animationtemplateregistry.cpp
@@ -69,7 +69,7 @@ void AnimationTemplateRegistry::LogWarningLn(const char *Message) const {
// -----------------------------------------------------------------------------
-bool AnimationTemplateRegistry::Persist(BS_OutputPersistenceBlock &Writer) {
+bool AnimationTemplateRegistry::Persist(OutputPersistenceBlock &Writer) {
bool Result = true;
// Das nächste zu vergebene Handle schreiben.
@@ -95,7 +95,7 @@ bool AnimationTemplateRegistry::Persist(BS_OutputPersistenceBlock &Writer) {
// -----------------------------------------------------------------------------
-bool AnimationTemplateRegistry::Unpersist(BS_InputPersistenceBlock &Reader) {
+bool AnimationTemplateRegistry::Unpersist(InputPersistenceBlock &Reader) {
bool Result = true;
// Das nächste zu vergebene Handle wieder herstellen.
diff --git a/engines/sword25/gfx/animationtemplateregistry.h b/engines/sword25/gfx/animationtemplateregistry.h
index b5947a8841..0aaa0d3728 100644
--- a/engines/sword25/gfx/animationtemplateregistry.h
+++ b/engines/sword25/gfx/animationtemplateregistry.h
@@ -59,15 +59,15 @@ class AnimationTemplate;
// Klassendeklaration
// -----------------------------------------------------------------------------
-class AnimationTemplateRegistry : public BS_ObjectRegistry<AnimationTemplate>, public BS_Persistable {
+class AnimationTemplateRegistry : public ObjectRegistry<AnimationTemplate>, public Persistable {
public:
static AnimationTemplateRegistry &GetInstance() {
if (!m_InstancePtr.get()) m_InstancePtr.reset(new AnimationTemplateRegistry);
return *m_InstancePtr.get();
}
- virtual bool Persist(BS_OutputPersistenceBlock &Writer);
- virtual bool Unpersist(BS_InputPersistenceBlock &Reader);
+ virtual bool Persist(OutputPersistenceBlock &Writer);
+ virtual bool Unpersist(InputPersistenceBlock &Reader);
private:
virtual void LogErrorLn(const char *Message) const;
diff --git a/engines/sword25/gfx/bitmap.cpp b/engines/sword25/gfx/bitmap.cpp
index d5354d534d..07bfbd11a9 100644
--- a/engines/sword25/gfx/bitmap.cpp
+++ b/engines/sword25/gfx/bitmap.cpp
@@ -174,7 +174,7 @@ void Bitmap::SetFlipV(bool FlipV) {
// Persistenz
// -----------------------------------------------------------------------------
-bool Bitmap::Persist(BS_OutputPersistenceBlock &Writer) {
+bool Bitmap::Persist(OutputPersistenceBlock &Writer) {
bool Result = true;
Result &= RenderObject::Persist(Writer);
@@ -191,7 +191,7 @@ bool Bitmap::Persist(BS_OutputPersistenceBlock &Writer) {
// -----------------------------------------------------------------------------
-bool Bitmap::Unpersist(BS_InputPersistenceBlock &Reader) {
+bool Bitmap::Unpersist(InputPersistenceBlock &Reader) {
bool Result = true;
Result &= RenderObject::Unpersist(Reader);
diff --git a/engines/sword25/gfx/bitmap.h b/engines/sword25/gfx/bitmap.h
index 01d1b288da..77fe08342b 100644
--- a/engines/sword25/gfx/bitmap.h
+++ b/engines/sword25/gfx/bitmap.h
@@ -179,8 +179,8 @@ public:
virtual bool IsColorModulationAllowed() const = 0;
virtual bool IsSetContentAllowed() const = 0;
- virtual bool Persist(BS_OutputPersistenceBlock &Writer);
- virtual bool Unpersist(BS_InputPersistenceBlock &Reader);
+ virtual bool Persist(OutputPersistenceBlock &Writer);
+ virtual bool Unpersist(InputPersistenceBlock &Reader);
protected:
bool m_FlipH;
diff --git a/engines/sword25/gfx/bitmapresource.cpp b/engines/sword25/gfx/bitmapresource.cpp
index 4470cccb9f..0db6110fad 100644
--- a/engines/sword25/gfx/bitmapresource.cpp
+++ b/engines/sword25/gfx/bitmapresource.cpp
@@ -50,7 +50,7 @@ namespace Sword25 {
BitmapResource::BitmapResource(const Common::String &Filename, Image *pImage) :
m_Valid(false),
m_pImage(pImage),
- BS_Resource(Filename, BS_Resource::TYPE_BITMAP) {
+ Resource(Filename, Resource::TYPE_BITMAP) {
m_Valid = m_pImage != 0;
}
diff --git a/engines/sword25/gfx/bitmapresource.h b/engines/sword25/gfx/bitmapresource.h
index 75bdf161f5..11d854ea08 100644
--- a/engines/sword25/gfx/bitmapresource.h
+++ b/engines/sword25/gfx/bitmapresource.h
@@ -48,7 +48,7 @@ namespace Sword25 {
class BS_Rect;
-class BitmapResource : public BS_Resource {
+class BitmapResource : public Resource {
public:
/**
@brief Die möglichen Flippingparameter für die Blit-Methode.
diff --git a/engines/sword25/gfx/dynamicbitmap.cpp b/engines/sword25/gfx/dynamicbitmap.cpp
index c0d307bca4..ad35b34962 100644
--- a/engines/sword25/gfx/dynamicbitmap.cpp
+++ b/engines/sword25/gfx/dynamicbitmap.cpp
@@ -65,7 +65,7 @@ DynamicBitmap::DynamicBitmap(RenderObjectPtr<RenderObject> ParentPtr, unsigned i
// -----------------------------------------------------------------------------
-DynamicBitmap::DynamicBitmap(BS_InputPersistenceBlock &Reader, RenderObjectPtr<RenderObject> ParentPtr, unsigned int Handle) :
+DynamicBitmap::DynamicBitmap(InputPersistenceBlock &Reader, RenderObjectPtr<RenderObject> ParentPtr, unsigned int Handle) :
Bitmap(ParentPtr, TYPE_DYNAMICBITMAP, Handle) {
m_InitSuccess = Unpersist(Reader);
}
@@ -101,7 +101,7 @@ unsigned int DynamicBitmap::GetPixel(int X, int Y) const {
bool DynamicBitmap::DoRender() {
// Framebufferobjekt holen
- GraphicEngine *pGfx = static_cast<GraphicEngine *>(BS_Kernel::GetInstance()->GetService("gfx"));
+ GraphicEngine *pGfx = static_cast<GraphicEngine *>(Kernel::GetInstance()->GetService("gfx"));
BS_ASSERT(pGfx);
// Bitmap zeichnen
@@ -157,7 +157,7 @@ bool DynamicBitmap::IsSetContentAllowed() const {
// Persistenz
// -----------------------------------------------------------------------------
-bool DynamicBitmap::Persist(BS_OutputPersistenceBlock &Writer) {
+bool DynamicBitmap::Persist(OutputPersistenceBlock &Writer) {
bool Result = true;
Result &= Bitmap::Persist(Writer);
@@ -171,7 +171,7 @@ bool DynamicBitmap::Persist(BS_OutputPersistenceBlock &Writer) {
return Result;
}
-bool DynamicBitmap::Unpersist(BS_InputPersistenceBlock &Reader) {
+bool DynamicBitmap::Unpersist(InputPersistenceBlock &Reader) {
bool Result = true;
Result &= Bitmap::Unpersist(Reader);
diff --git a/engines/sword25/gfx/dynamicbitmap.h b/engines/sword25/gfx/dynamicbitmap.h
index 4cc47b14a5..76fa585c8a 100644
--- a/engines/sword25/gfx/dynamicbitmap.h
+++ b/engines/sword25/gfx/dynamicbitmap.h
@@ -69,15 +69,15 @@ public:
virtual bool IsColorModulationAllowed() const;
virtual bool IsSetContentAllowed() const;
- virtual bool Persist(BS_OutputPersistenceBlock &Writer);
- virtual bool Unpersist(BS_InputPersistenceBlock &Reader);
+ virtual bool Persist(OutputPersistenceBlock &Writer);
+ virtual bool Unpersist(InputPersistenceBlock &Reader);
protected:
virtual bool DoRender();
private:
DynamicBitmap(RenderObjectPtr<RenderObject> ParentPtr, unsigned int Width, unsigned int Height);
- DynamicBitmap(BS_InputPersistenceBlock &Reader, RenderObjectPtr<RenderObject> ParentPtr, unsigned int Handle);
+ DynamicBitmap(InputPersistenceBlock &Reader, RenderObjectPtr<RenderObject> ParentPtr, unsigned int Handle);
bool CreateGLImage(unsigned int Width, unsigned int Height);
diff --git a/engines/sword25/gfx/fontresource.cpp b/engines/sword25/gfx/fontresource.cpp
index 6d2a7a99a5..a398c0a6d6 100644
--- a/engines/sword25/gfx/fontresource.cpp
+++ b/engines/sword25/gfx/fontresource.cpp
@@ -60,10 +60,10 @@ static const unsigned int DEFAULT_GAPWIDTH = 1;
// Konstruktion / Destruktion
// -----------------------------------------------------------------------------
-FontResource::FontResource(BS_Kernel *pKernel, const Common::String &FileName) :
+FontResource::FontResource(Kernel *pKernel, const Common::String &FileName) :
_pKernel(pKernel),
_Valid(false),
- BS_Resource(FileName, BS_Resource::TYPE_FONT) {
+ Resource(FileName, Resource::TYPE_FONT) {
// XML Fontdatei parsen
TiXmlDocument Doc;
if (!_ParseXMLDocument(FileName, Doc)) {
diff --git a/engines/sword25/gfx/fontresource.h b/engines/sword25/gfx/fontresource.h
index 8c45219b37..3888927f9c 100644
--- a/engines/sword25/gfx/fontresource.h
+++ b/engines/sword25/gfx/fontresource.h
@@ -52,13 +52,13 @@ namespace Sword25 {
// Forward declarations
// -----------------------------------------------------------------------------
-class BS_Kernel;
+class Kernel;
// -----------------------------------------------------------------------------
// Klassendefinition
// -----------------------------------------------------------------------------
-class FontResource : public BS_Resource {
+class FontResource : public Resource {
public:
/**
@brief Erzeugt eine neues Exemplar von BS_FontResource
@@ -66,7 +66,7 @@ public:
@param FileName der Dateiname der zu ladenen Resource
@remark Wenn der Konstruktor erfolgreich ausgeführt werden konnte gibt die Methode IsValid true zurück.
*/
- FontResource(BS_Kernel *pKernel, const Common::String &FileName);
+ FontResource(Kernel *pKernel, const Common::String &FileName);
/**
@brief Gibt true zurück, wenn das Objekt korrekt initialisiert wurde.
@@ -113,7 +113,7 @@ public:
}
private:
- BS_Kernel *_pKernel;
+ Kernel *_pKernel;
bool _Valid;
Common::String _BitmapFileName;
int _LineHeight;
diff --git a/engines/sword25/gfx/graphicengine.cpp b/engines/sword25/gfx/graphicengine.cpp
index 1f7f253a53..d51157e4ac 100644
--- a/engines/sword25/gfx/graphicengine.cpp
+++ b/engines/sword25/gfx/graphicengine.cpp
@@ -60,7 +60,7 @@ using namespace Lua;
static const unsigned int FRAMETIME_SAMPLE_COUNT = 5; // Anzahl der Framezeiten über die, die Framezeit gemittelt wird
-GraphicEngine::GraphicEngine(BS_Kernel *pKernel) :
+GraphicEngine::GraphicEngine(Kernel *pKernel) :
m_Width(0),
m_Height(0),
m_BitDepth(0),
@@ -70,7 +70,7 @@ GraphicEngine::GraphicEngine(BS_Kernel *pKernel) :
m_TimerActive(true),
m_FrameTimeSampleSlot(0),
m_RepaintedPixels(0),
- BS_ResourceService(pKernel) {
+ ResourceService(pKernel) {
m_FrameTimeSamples.resize(FRAMETIME_SAMPLE_COUNT);
if (!RegisterScriptBindings())
@@ -83,7 +83,7 @@ GraphicEngine::GraphicEngine(BS_Kernel *pKernel) :
void GraphicEngine::UpdateLastFrameDuration() {
// Aktuelle Zeit holen
- uint64_t CurrentTime = BS_Kernel::GetInstance()->GetMicroTicks();
+ uint64_t CurrentTime = Kernel::GetInstance()->GetMicroTicks();
// Verstrichene Zeit seit letztem Frame berechnen und zu große Zeitsprünge ( > 250 msek.) unterbinden
// (kann vorkommen bei geladenen Spielständen, während des Debuggings oder Hardwareungenauigkeiten)
@@ -201,14 +201,14 @@ unsigned int GraphicEngine::LuaColorToARGBColor(lua_State *L, int StackIndex) {
// -----------------------------------------------------------------------------
-bool GraphicEngine::Persist(BS_OutputPersistenceBlock &Writer) {
+bool GraphicEngine::Persist(OutputPersistenceBlock &Writer) {
Writer.Write(m_TimerActive);
return true;
}
// -----------------------------------------------------------------------------
-bool GraphicEngine::Unpersist(BS_InputPersistenceBlock &Reader) {
+bool GraphicEngine::Unpersist(InputPersistenceBlock &Reader) {
Reader.Read(m_TimerActive);
return Reader.IsGood();
}
diff --git a/engines/sword25/gfx/graphicengine.h b/engines/sword25/gfx/graphicengine.h
index e68969e128..8968cc898e 100644
--- a/engines/sword25/gfx/graphicengine.h
+++ b/engines/sword25/gfx/graphicengine.h
@@ -57,7 +57,7 @@
namespace Sword25 {
-class BS_Kernel;
+class Kernel;
class Image;
class Panel;
class Screenshot;
@@ -77,7 +77,7 @@ typedef unsigned int BS_COLOR;
Die bisher einzige Implementation ist BS_DDrawGfx.
*/
-class GraphicEngine : public BS_ResourceService, public BS_Persistable {
+class GraphicEngine : public ResourceService, public Persistable {
public:
// Enums
// -----
@@ -358,8 +358,8 @@ public:
// Persistence Methods
// -------------------
- virtual bool Persist(BS_OutputPersistenceBlock &Writer);
- virtual bool Unpersist(BS_InputPersistenceBlock &Reader);
+ virtual bool Persist(OutputPersistenceBlock &Writer);
+ virtual bool Unpersist(InputPersistenceBlock &Reader);
static void ARGBColorToLuaColor(lua_State *L, unsigned int Color);
static unsigned int LuaColorToARGBColor(lua_State *L, int StackIndex);
@@ -367,7 +367,7 @@ public:
protected:
// Constructor
// -----------
- GraphicEngine(BS_Kernel *pKernel);
+ GraphicEngine(Kernel *pKernel);
// Display Variables
// -----------------
diff --git a/engines/sword25/gfx/graphicengine_script.cpp b/engines/sword25/gfx/graphicengine_script.cpp
index 92f5750d25..67cbf31889 100644
--- a/engines/sword25/gfx/graphicengine_script.cpp
+++ b/engines/sword25/gfx/graphicengine_script.cpp
@@ -252,7 +252,7 @@ static const luaL_reg ANIMATION_TEMPLATE_METHODS[] = {
// -----------------------------------------------------------------------------
static GraphicEngine *GetGE() {
- BS_Kernel *pKernel = BS_Kernel::GetInstance();
+ Kernel *pKernel = Kernel::GetInstance();
BS_ASSERT(pKernel);
GraphicEngine *pGE = static_cast<GraphicEngine *>(pKernel->GetService("gfx"));
BS_ASSERT(pGE);
@@ -1249,7 +1249,7 @@ static int A_IsPlaying(lua_State *L) {
// -----------------------------------------------------------------------------
static bool AnimationLoopPointCallback(unsigned int Handle) {
- lua_State *L = static_cast<lua_State *>(BS_Kernel::GetInstance()->GetScript()->GetScriptObject());
+ lua_State *L = static_cast<lua_State *>(Kernel::GetInstance()->GetScript()->GetScriptObject());
LoopPointCallbackPtr->InvokeCallbackFunctions(L, Handle);
return true;
@@ -1287,7 +1287,7 @@ static bool AnimationActionCallback(unsigned int Handle) {
RenderObjectPtr<Animation> AnimationPtr(Handle);
if (AnimationPtr.IsValid()) {
ActionCallbackPtr->Action = AnimationPtr->GetCurrentAction();
- lua_State *L = static_cast<lua_State *>(BS_Kernel::GetInstance()->GetScript()->GetScriptObject());
+ lua_State *L = static_cast<lua_State *>(Kernel::GetInstance()->GetScript()->GetScriptObject());
ActionCallbackPtr->InvokeCallbackFunctions(L, AnimationPtr->GetHandle());
}
@@ -1323,7 +1323,7 @@ static int A_UnregisterActionCallback(lua_State *L) {
// -----------------------------------------------------------------------------
static bool AnimationDeleteCallback(unsigned int Handle) {
- lua_State *L = static_cast<lua_State *>(BS_Kernel::GetInstance()->GetScript()->GetScriptObject());
+ lua_State *L = static_cast<lua_State *>(Kernel::GetInstance()->GetScript()->GetScriptObject());
LoopPointCallbackPtr->RemoveAllObjectCallbacks(L, Handle);
return true;
@@ -1526,7 +1526,7 @@ static const luaL_reg TEXT_METHODS[] = {
// -----------------------------------------------------------------------------
bool GraphicEngine::RegisterScriptBindings() {
- BS_Kernel *pKernel = BS_Kernel::GetInstance();
+ Kernel *pKernel = Kernel::GetInstance();
BS_ASSERT(pKernel);
ScriptEngine *pScript = static_cast<ScriptEngine *>(pKernel->GetService("script"));
BS_ASSERT(pScript);
diff --git a/engines/sword25/gfx/opengl/glimage.cpp b/engines/sword25/gfx/opengl/glimage.cpp
index 0d17eb1758..a690cc19ee 100644
--- a/engines/sword25/gfx/opengl/glimage.cpp
+++ b/engines/sword25/gfx/opengl/glimage.cpp
@@ -57,10 +57,10 @@ GLImage::GLImage(const Common::String &Filename, bool &Result) :
m_Height(0) {
Result = false;
- PackageManager *pPackage = static_cast<PackageManager *>(BS_Kernel::GetInstance()->GetService("package"));
+ PackageManager *pPackage = static_cast<PackageManager *>(Kernel::GetInstance()->GetService("package"));
BS_ASSERT(pPackage);
- _backSurface = (static_cast<GraphicEngine *>(BS_Kernel::GetInstance()->GetService("gfx")))->getSurface();
+ _backSurface = (static_cast<GraphicEngine *>(Kernel::GetInstance()->GetService("gfx")))->getSurface();
// Datei laden
char *pFileData;
diff --git a/engines/sword25/gfx/opengl/openglgfx.cpp b/engines/sword25/gfx/opengl/openglgfx.cpp
index c30fc8ed0d..e73654ce95 100644
--- a/engines/sword25/gfx/opengl/openglgfx.cpp
+++ b/engines/sword25/gfx/opengl/openglgfx.cpp
@@ -73,7 +73,7 @@ const Common::String B25S_EXTENSION(".b25s");
// CONSTRUCTION / DESTRUCTION
// -----------------------------------------------------------------------------
-OpenGLGfx::OpenGLGfx(BS_Kernel *pKernel) :
+OpenGLGfx::OpenGLGfx(Kernel *pKernel) :
GraphicEngine(pKernel),
m_GLspritesInitialized(false) {
}
@@ -86,7 +86,7 @@ OpenGLGfx::~OpenGLGfx() {
// -----------------------------------------------------------------------------
-BS_Service *OpenGLGfx_CreateObject(BS_Kernel *pKernel) {
+Service *OpenGLGfx_CreateObject(Kernel *pKernel) {
return new OpenGLGfx(pKernel);
}
@@ -285,7 +285,7 @@ void OpenGLGfx::FlipImagedataVertical(unsigned int Width, unsigned int Height, b
// RESOURCE MANAGING
// -----------------------------------------------------------------------------
-BS_Resource *OpenGLGfx::LoadResource(const Common::String &FileName) {
+Resource *OpenGLGfx::LoadResource(const Common::String &FileName) {
BS_ASSERT(CanLoadResource(FileName));
// Bild für den Softwarebuffer laden
@@ -328,7 +328,7 @@ BS_Resource *OpenGLGfx::LoadResource(const Common::String &FileName) {
// Vectorgraphik laden
if (FileName.hasSuffix(SWF_EXTENSION)) {
// Pointer auf Package-Manager holen
- PackageManager *pPackage = BS_Kernel::GetInstance()->GetPackage();
+ PackageManager *pPackage = Kernel::GetInstance()->GetPackage();
BS_ASSERT(pPackage);
// Datei laden
@@ -371,7 +371,7 @@ BS_Resource *OpenGLGfx::LoadResource(const Common::String &FileName) {
// Font laden
if (FileName.hasSuffix(FNT_EXTENSION)) {
- FontResource *pResource = new FontResource(BS_Kernel::GetInstance(), FileName);
+ FontResource *pResource = new FontResource(Kernel::GetInstance(), FileName);
if (pResource->IsValid())
return pResource;
else {
@@ -407,7 +407,7 @@ void OpenGLGfx::DrawDebugLine(const Vertex &Start, const Vertex &End, unsigned i
// PERSISTENZ
// -----------------------------------------------------------------------------
-bool OpenGLGfx::Persist(BS_OutputPersistenceBlock &Writer) {
+bool OpenGLGfx::Persist(OutputPersistenceBlock &Writer) {
bool result = true;
result &= GraphicEngine::Persist(Writer);
@@ -418,7 +418,7 @@ bool OpenGLGfx::Persist(BS_OutputPersistenceBlock &Writer) {
// -----------------------------------------------------------------------------
-bool OpenGLGfx::Unpersist(BS_InputPersistenceBlock &Reader) {
+bool OpenGLGfx::Unpersist(InputPersistenceBlock &Reader) {
bool result = true;
result &= GraphicEngine::Unpersist(Reader);
diff --git a/engines/sword25/gfx/opengl/openglgfx.h b/engines/sword25/gfx/opengl/openglgfx.h
index c96fa381d6..5b480491c5 100644
--- a/engines/sword25/gfx/opengl/openglgfx.h
+++ b/engines/sword25/gfx/opengl/openglgfx.h
@@ -49,9 +49,9 @@ namespace Sword25 {
// FORWARD DECLARATIONS
// -----------------------------------------------------------------------------
-class BS_Kernel;
-class BS_Service;
-class BS_Resource;
+class Kernel;
+class Service;
+class Resource;
class Panel;
class BS_Image;
class RenderObjectManager;
@@ -63,7 +63,7 @@ class RenderObjectManager;
class OpenGLGfx : public GraphicEngine {
public:
- OpenGLGfx(BS_Kernel *pKernel);
+ OpenGLGfx(Kernel *pKernel);
virtual ~OpenGLGfx();
// Interface
@@ -82,7 +82,7 @@ public:
// Resource-Managing Methoden
// --------------------------
- virtual BS_Resource *LoadResource(const Common::String &FileName);
+ virtual Resource *LoadResource(const Common::String &FileName);
virtual bool CanLoadResource(const Common::String &FileName);
// Debugging Methoden
@@ -91,8 +91,8 @@ public:
// Persistenz Methoden
// -------------------
- virtual bool Persist(BS_OutputPersistenceBlock &Writer);
- virtual bool Unpersist(BS_InputPersistenceBlock &Reader);
+ virtual bool Persist(OutputPersistenceBlock &Writer);
+ virtual bool Unpersist(InputPersistenceBlock &Reader);
private:
bool m_GLspritesInitialized;
diff --git a/engines/sword25/gfx/opengl/swimage.cpp b/engines/sword25/gfx/opengl/swimage.cpp
index 1244cc3879..5fa579365b 100644
--- a/engines/sword25/gfx/opengl/swimage.cpp
+++ b/engines/sword25/gfx/opengl/swimage.cpp
@@ -56,7 +56,7 @@ SWImage::SWImage(const Common::String &Filename, bool &Result) :
m_Height(0) {
Result = false;
- PackageManager *pPackage = static_cast<PackageManager *>(BS_Kernel::GetInstance()->GetService("package"));
+ PackageManager *pPackage = static_cast<PackageManager *>(Kernel::GetInstance()->GetService("package"));
BS_ASSERT(pPackage);
// Datei laden
diff --git a/engines/sword25/gfx/panel.cpp b/engines/sword25/gfx/panel.cpp
index c7c7f0b817..4f1d6ea546 100644
--- a/engines/sword25/gfx/panel.cpp
+++ b/engines/sword25/gfx/panel.cpp
@@ -76,7 +76,7 @@ Panel::Panel(RenderObjectPtr<RenderObject> ParentPtr, int Width, int Height, uns
// -----------------------------------------------------------------------------
-Panel::Panel(BS_InputPersistenceBlock &Reader, RenderObjectPtr<RenderObject> ParentPtr, unsigned int Handle) :
+Panel::Panel(InputPersistenceBlock &Reader, RenderObjectPtr<RenderObject> ParentPtr, unsigned int Handle) :
RenderObject(ParentPtr, RenderObject::TYPE_PANEL, Handle) {
m_InitSuccess = Unpersist(Reader);
}
@@ -94,7 +94,7 @@ bool Panel::DoRender() {
// Falls der Alphawert 0 ist, ist das Panel komplett durchsichtig und es muss nichts gezeichnet werden.
if (m_Color >> 24 == 0) return true;
- GraphicEngine *GfxPtr = static_cast<GraphicEngine *>(BS_Kernel::GetInstance()->GetService("gfx"));
+ GraphicEngine *GfxPtr = static_cast<GraphicEngine *>(Kernel::GetInstance()->GetService("gfx"));
BS_ASSERT(GfxPtr);
return GfxPtr->Fill(&m_BBox, m_Color);
@@ -104,7 +104,7 @@ bool Panel::DoRender() {
// Persistenz
// -----------------------------------------------------------------------------
-bool Panel::Persist(BS_OutputPersistenceBlock &Writer) {
+bool Panel::Persist(OutputPersistenceBlock &Writer) {
bool Result = true;
Result &= RenderObject::Persist(Writer);
@@ -117,7 +117,7 @@ bool Panel::Persist(BS_OutputPersistenceBlock &Writer) {
// -----------------------------------------------------------------------------
-bool Panel::Unpersist(BS_InputPersistenceBlock &Reader) {
+bool Panel::Unpersist(InputPersistenceBlock &Reader) {
bool Result = true;
Result &= RenderObject::Unpersist(Reader);
diff --git a/engines/sword25/gfx/panel.h b/engines/sword25/gfx/panel.h
index 4e318dd7b1..c9da50d72a 100644
--- a/engines/sword25/gfx/panel.h
+++ b/engines/sword25/gfx/panel.h
@@ -53,7 +53,7 @@ class Panel : public RenderObject {
private:
Panel(RenderObjectPtr<RenderObject> ParentPtr, int Width, int Height, unsigned int Color);
- Panel(BS_InputPersistenceBlock &Reader, RenderObjectPtr<RenderObject> ParentPtr, unsigned int Handle);
+ Panel(InputPersistenceBlock &Reader, RenderObjectPtr<RenderObject> ParentPtr, unsigned int Handle);
public:
virtual ~Panel();
@@ -66,8 +66,8 @@ public:
ForceRefresh();
}
- virtual bool Persist(BS_OutputPersistenceBlock &Writer);
- virtual bool Unpersist(BS_InputPersistenceBlock &Reader);
+ virtual bool Persist(OutputPersistenceBlock &Writer);
+ virtual bool Unpersist(InputPersistenceBlock &Reader);
protected:
virtual bool DoRender();
diff --git a/engines/sword25/gfx/renderobject.cpp b/engines/sword25/gfx/renderobject.cpp
index af44117e70..e6b7e2eee9 100644
--- a/engines/sword25/gfx/renderobject.cpp
+++ b/engines/sword25/gfx/renderobject.cpp
@@ -383,7 +383,7 @@ RenderObjectPtr<Text> RenderObject::AddText(const Common::String &Font, const Co
// Persistenz-Methoden
// -------------------
-bool RenderObject::Persist(BS_OutputPersistenceBlock &Writer) {
+bool RenderObject::Persist(OutputPersistenceBlock &Writer) {
// Typ und Handle werden als erstes gespeichert, damit beim Laden ein Objekt vom richtigen Typ mit dem richtigen Handle erzeugt werden kann.
Writer.Write(static_cast<unsigned int>(m_Type));
Writer.Write(m_Handle);
@@ -419,7 +419,7 @@ bool RenderObject::Persist(BS_OutputPersistenceBlock &Writer) {
// -----------------------------------------------------------------------------
-bool RenderObject::Unpersist(BS_InputPersistenceBlock &Reader) {
+bool RenderObject::Unpersist(InputPersistenceBlock &Reader) {
// Typ und Handle wurden schon von RecreatePersistedRenderObject() ausgelesen. Jetzt werden die restlichen Objekteigenschaften ausgelesen.
Reader.Read(m_X);
Reader.Read(m_Y);
@@ -456,7 +456,7 @@ bool RenderObject::Unpersist(BS_InputPersistenceBlock &Reader) {
// -----------------------------------------------------------------------------
-bool RenderObject::PersistChildren(BS_OutputPersistenceBlock &Writer) {
+bool RenderObject::PersistChildren(OutputPersistenceBlock &Writer) {
bool Result = true;
// Kinderanzahl speichern.
@@ -474,7 +474,7 @@ bool RenderObject::PersistChildren(BS_OutputPersistenceBlock &Writer) {
// -----------------------------------------------------------------------------
-bool RenderObject::UnpersistChildren(BS_InputPersistenceBlock &Reader) {
+bool RenderObject::UnpersistChildren(InputPersistenceBlock &Reader) {
bool Result = true;
// Kinderanzahl einlesen.
@@ -492,7 +492,7 @@ bool RenderObject::UnpersistChildren(BS_InputPersistenceBlock &Reader) {
// -----------------------------------------------------------------------------
-RenderObjectPtr<RenderObject> RenderObject::RecreatePersistedRenderObject(BS_InputPersistenceBlock &Reader) {
+RenderObjectPtr<RenderObject> RenderObject::RecreatePersistedRenderObject(InputPersistenceBlock &Reader) {
RenderObjectPtr<RenderObject> Result;
// Typ und Handle auslesen.
diff --git a/engines/sword25/gfx/renderobject.h b/engines/sword25/gfx/renderobject.h
index 0007e157a0..3a824d9012 100644
--- a/engines/sword25/gfx/renderobject.h
+++ b/engines/sword25/gfx/renderobject.h
@@ -59,7 +59,7 @@ namespace Sword25 {
// Forward Declarations
// -----------------------------------------------------------------------------
-class BS_Kernel;
+class Kernel;
class RenderObjectManager;
class Bitmap;
class Animation;
@@ -354,13 +354,13 @@ public:
// Persistenz-Methoden
// -------------------
- virtual bool Persist(BS_OutputPersistenceBlock &Writer);
- virtual bool Unpersist(BS_InputPersistenceBlock &Reader);
+ virtual bool Persist(OutputPersistenceBlock &Writer);
+ virtual bool Unpersist(InputPersistenceBlock &Reader);
// TODO: Evtl. protected
- bool PersistChildren(BS_OutputPersistenceBlock &Writer);
- bool UnpersistChildren(BS_InputPersistenceBlock &Reader);
+ bool PersistChildren(OutputPersistenceBlock &Writer);
+ bool UnpersistChildren(InputPersistenceBlock &Reader);
// TODO: Evtl. private
- RenderObjectPtr<RenderObject> RecreatePersistedRenderObject(BS_InputPersistenceBlock &Reader);
+ RenderObjectPtr<RenderObject> RecreatePersistedRenderObject(InputPersistenceBlock &Reader);
protected:
// Typen
diff --git a/engines/sword25/gfx/renderobjectmanager.cpp b/engines/sword25/gfx/renderobjectmanager.cpp
index 5d1147ea88..72afd856c3 100644
--- a/engines/sword25/gfx/renderobjectmanager.cpp
+++ b/engines/sword25/gfx/renderobjectmanager.cpp
@@ -77,7 +77,7 @@ void RenderObjectManager::StartFrame() {
m_FrameStarted = true;
// Verstrichene Zeit bestimmen
- int TimeElapsed = BS_Kernel::GetInstance()->GetGfx()->GetLastFrameDurationMicro();
+ int TimeElapsed = Kernel::GetInstance()->GetGfx()->GetLastFrameDurationMicro();
// Alle BS_TimedRenderObject Objekte über den Framestart und die verstrichene Zeit in Kenntnis setzen
RenderObjectList::iterator Iter = m_TimedRenderObjects.begin();
@@ -119,7 +119,7 @@ void RenderObjectManager::DetatchTimedRenderObject(RenderObjectPtr<TimedRenderOb
// Persistenz
// -----------------------------------------------------------------------------
-bool RenderObjectManager::Persist(BS_OutputPersistenceBlock &Writer) {
+bool RenderObjectManager::Persist(OutputPersistenceBlock &Writer) {
bool Result = true;
// Alle Kinder des Wurzelknotens speichern. Dadurch werden alle BS_RenderObjects gespeichert rekursiv gespeichert.
@@ -143,7 +143,7 @@ bool RenderObjectManager::Persist(BS_OutputPersistenceBlock &Writer) {
// -----------------------------------------------------------------------------
-bool RenderObjectManager::Unpersist(BS_InputPersistenceBlock &Reader) {
+bool RenderObjectManager::Unpersist(InputPersistenceBlock &Reader) {
bool Result = true;
// Alle Kinder des Wurzelknotens löschen. Damit werden alle BS_RenderObjects gelöscht.
diff --git a/engines/sword25/gfx/renderobjectmanager.h b/engines/sword25/gfx/renderobjectmanager.h
index 71aa75a1a9..76bb4639ec 100644
--- a/engines/sword25/gfx/renderobjectmanager.h
+++ b/engines/sword25/gfx/renderobjectmanager.h
@@ -57,7 +57,7 @@
namespace Sword25 {
// Klassendefinition
-class BS_Kernel;
+class Kernel;
class BS_Rect;
class RenderObject;
class TimedRenderObject;
@@ -68,7 +68,7 @@ class TimedRenderObject;
Sie sorgt dafür, dass die BS_RenderObjects in der richtigen Reihenfolge gerendert werden und ermöglicht den Zugriff auf die
BS_RenderObjects über einen String.
*/
-class RenderObjectManager : public BS_Persistable {
+class RenderObjectManager : public Persistable {
public:
/**
@brief Erzeugt ein neues BS_RenderObjectManager-Objekt.
@@ -115,8 +115,8 @@ public:
*/
void DetatchTimedRenderObject(RenderObjectPtr<TimedRenderObject> pRenderObject);
- virtual bool Persist(BS_OutputPersistenceBlock &Writer);
- virtual bool Unpersist(BS_InputPersistenceBlock &Reader);
+ virtual bool Persist(OutputPersistenceBlock &Writer);
+ virtual bool Unpersist(InputPersistenceBlock &Reader);
private:
bool m_FrameStarted;
diff --git a/engines/sword25/gfx/renderobjectregistry.h b/engines/sword25/gfx/renderobjectregistry.h
index c3a8ab3f29..ff2ba57316 100644
--- a/engines/sword25/gfx/renderobjectregistry.h
+++ b/engines/sword25/gfx/renderobjectregistry.h
@@ -58,7 +58,7 @@ class RenderObject;
// Klassendeklaration
// -----------------------------------------------------------------------------
-class RenderObjectRegistry : public BS_ObjectRegistry<RenderObject> {
+class RenderObjectRegistry : public ObjectRegistry<RenderObject> {
public:
static RenderObjectRegistry &GetInstance() {
if (!m_InstancePtr.get()) m_InstancePtr.reset(new RenderObjectRegistry);
diff --git a/engines/sword25/gfx/rootrenderobject.h b/engines/sword25/gfx/rootrenderobject.h
index a4a78f24d9..76665c9444 100644
--- a/engines/sword25/gfx/rootrenderobject.h
+++ b/engines/sword25/gfx/rootrenderobject.h
@@ -45,7 +45,7 @@ namespace Sword25 {
// Forward Declarations
// -----------------------------------------------------------------------------
-class BS_Kernel;
+class Kernel;
// Klassendefinition
class RenderObjectManager;
diff --git a/engines/sword25/gfx/staticbitmap.cpp b/engines/sword25/gfx/staticbitmap.cpp
index 575adcd03b..b2d3678f57 100644
--- a/engines/sword25/gfx/staticbitmap.cpp
+++ b/engines/sword25/gfx/staticbitmap.cpp
@@ -64,7 +64,7 @@ StaticBitmap::StaticBitmap(RenderObjectPtr<RenderObject> ParentPtr, const Common
// -----------------------------------------------------------------------------
-StaticBitmap::StaticBitmap(BS_InputPersistenceBlock &Reader, RenderObjectPtr<RenderObject> ParentPtr, unsigned int Handle) :
+StaticBitmap::StaticBitmap(InputPersistenceBlock &Reader, RenderObjectPtr<RenderObject> ParentPtr, unsigned int Handle) :
Bitmap(ParentPtr, TYPE_STATICBITMAP, Handle) {
m_InitSuccess = Unpersist(Reader);
}
@@ -73,12 +73,12 @@ StaticBitmap::StaticBitmap(BS_InputPersistenceBlock &Reader, RenderObjectPtr<Ren
bool StaticBitmap::InitBitmapResource(const Common::String &Filename) {
// Bild-Resource laden
- BS_Resource *ResourcePtr = BS_Kernel::GetInstance()->GetResourceManager()->RequestResource(Filename);
+ Resource *ResourcePtr = Kernel::GetInstance()->GetResourceManager()->RequestResource(Filename);
if (!ResourcePtr) {
BS_LOG_ERRORLN("Could not request resource \"%s\".", Filename.c_str());
return false;
}
- if (ResourcePtr->GetType() != BS_Resource::TYPE_BITMAP) {
+ if (ResourcePtr->GetType() != Resource::TYPE_BITMAP) {
BS_LOG_ERRORLN("Requested resource \"%s\" is not a bitmap.", Filename.c_str());
return false;
}
@@ -107,13 +107,13 @@ StaticBitmap::~StaticBitmap() {
bool StaticBitmap::DoRender() {
// Bitmap holen
- BS_Resource *ResourcePtr = BS_Kernel::GetInstance()->GetResourceManager()->RequestResource(m_ResourceFilename);
+ Resource *ResourcePtr = Kernel::GetInstance()->GetResourceManager()->RequestResource(m_ResourceFilename);
BS_ASSERT(ResourcePtr);
- BS_ASSERT(ResourcePtr->GetType() == BS_Resource::TYPE_BITMAP);
+ BS_ASSERT(ResourcePtr->GetType() == Resource::TYPE_BITMAP);
BitmapResource *BitmapResourcePtr = static_cast<BitmapResource *>(ResourcePtr);
// Framebufferobjekt holen
- GraphicEngine *GfxPtr = static_cast<GraphicEngine *>(BS_Kernel::GetInstance()->GetService("gfx"));
+ GraphicEngine *GfxPtr = static_cast<GraphicEngine *>(Kernel::GetInstance()->GetService("gfx"));
BS_ASSERT(GfxPtr);
// Bitmap zeichnen
@@ -142,8 +142,8 @@ unsigned int StaticBitmap::GetPixel(int X, int Y) const {
BS_ASSERT(X >= 0 && X < m_Width);
BS_ASSERT(Y >= 0 && Y < m_Height);
- BS_Resource *pResource = BS_Kernel::GetInstance()->GetResourceManager()->RequestResource(m_ResourceFilename);
- BS_ASSERT(pResource->GetType() == BS_Resource::TYPE_BITMAP);
+ Resource *pResource = Kernel::GetInstance()->GetResourceManager()->RequestResource(m_ResourceFilename);
+ BS_ASSERT(pResource->GetType() == Resource::TYPE_BITMAP);
BitmapResource *pBitmapResource = static_cast<BitmapResource *>(pResource);
unsigned int Result = pBitmapResource->GetPixel(X, Y);
pResource->Release();
@@ -162,8 +162,8 @@ bool StaticBitmap::SetContent(const byte *Pixeldata, uint size, unsigned int Off
// -----------------------------------------------------------------------------
bool StaticBitmap::IsAlphaAllowed() const {
- BS_Resource *pResource = BS_Kernel::GetInstance()->GetResourceManager()->RequestResource(m_ResourceFilename);
- BS_ASSERT(pResource->GetType() == BS_Resource::TYPE_BITMAP);
+ Resource *pResource = Kernel::GetInstance()->GetResourceManager()->RequestResource(m_ResourceFilename);
+ BS_ASSERT(pResource->GetType() == Resource::TYPE_BITMAP);
bool Result = static_cast<BitmapResource *>(pResource)->IsAlphaAllowed();
pResource->Release();
return Result;
@@ -172,8 +172,8 @@ bool StaticBitmap::IsAlphaAllowed() const {
// -----------------------------------------------------------------------------
bool StaticBitmap::IsColorModulationAllowed() const {
- BS_Resource *pResource = BS_Kernel::GetInstance()->GetResourceManager()->RequestResource(m_ResourceFilename);
- BS_ASSERT(pResource->GetType() == BS_Resource::TYPE_BITMAP);
+ Resource *pResource = Kernel::GetInstance()->GetResourceManager()->RequestResource(m_ResourceFilename);
+ BS_ASSERT(pResource->GetType() == Resource::TYPE_BITMAP);
bool Result = static_cast<BitmapResource *>(pResource)->IsColorModulationAllowed();
pResource->Release();
return Result;
@@ -182,8 +182,8 @@ bool StaticBitmap::IsColorModulationAllowed() const {
// -----------------------------------------------------------------------------
bool StaticBitmap::IsScalingAllowed() const {
- BS_Resource *pResource = BS_Kernel::GetInstance()->GetResourceManager()->RequestResource(m_ResourceFilename);
- BS_ASSERT(pResource->GetType() == BS_Resource::TYPE_BITMAP);
+ Resource *pResource = Kernel::GetInstance()->GetResourceManager()->RequestResource(m_ResourceFilename);
+ BS_ASSERT(pResource->GetType() == Resource::TYPE_BITMAP);
bool Result = static_cast<BitmapResource *>(pResource)->IsScalingAllowed();
pResource->Release();
return Result;
@@ -193,7 +193,7 @@ bool StaticBitmap::IsScalingAllowed() const {
// Persistenz
// -----------------------------------------------------------------------------
-bool StaticBitmap::Persist(BS_OutputPersistenceBlock &Writer) {
+bool StaticBitmap::Persist(OutputPersistenceBlock &Writer) {
bool Result = true;
Result &= Bitmap::Persist(Writer);
@@ -204,7 +204,7 @@ bool StaticBitmap::Persist(BS_OutputPersistenceBlock &Writer) {
return Result;
}
-bool StaticBitmap::Unpersist(BS_InputPersistenceBlock &Reader) {
+bool StaticBitmap::Unpersist(InputPersistenceBlock &Reader) {
bool Result = true;
Result &= Bitmap::Unpersist(Reader);
diff --git a/engines/sword25/gfx/staticbitmap.h b/engines/sword25/gfx/staticbitmap.h
index 77b29be9bf..d4f3f800c8 100644
--- a/engines/sword25/gfx/staticbitmap.h
+++ b/engines/sword25/gfx/staticbitmap.h
@@ -56,7 +56,7 @@ private:
@remark Filename muss absoluter Pfad sein
*/
StaticBitmap(RenderObjectPtr<RenderObject> ParentPtr, const Common::String &Filename);
- StaticBitmap(BS_InputPersistenceBlock &Reader, RenderObjectPtr<RenderObject> ParentPtr, unsigned int Handle);
+ StaticBitmap(InputPersistenceBlock &Reader, RenderObjectPtr<RenderObject> ParentPtr, unsigned int Handle);
public:
virtual ~StaticBitmap();
@@ -72,8 +72,8 @@ public:
return false;
}
- virtual bool Persist(BS_OutputPersistenceBlock &Writer);
- virtual bool Unpersist(BS_InputPersistenceBlock &Reader);
+ virtual bool Persist(OutputPersistenceBlock &Writer);
+ virtual bool Unpersist(InputPersistenceBlock &Reader);
protected:
virtual bool DoRender();
diff --git a/engines/sword25/gfx/text.cpp b/engines/sword25/gfx/text.cpp
index d3e846abc5..6d568f1b43 100644
--- a/engines/sword25/gfx/text.cpp
+++ b/engines/sword25/gfx/text.cpp
@@ -74,7 +74,7 @@ Text::Text(RenderObjectPtr<RenderObject> ParentPtr) :
// -----------------------------------------------------------------------------
-Text::Text(BS_InputPersistenceBlock &Reader, RenderObjectPtr<RenderObject> ParentPtr, unsigned int Handle) :
+Text::Text(InputPersistenceBlock &Reader, RenderObjectPtr<RenderObject> ParentPtr, unsigned int Handle) :
RenderObject(ParentPtr, TYPE_TEXT, Handle) {
m_InitSuccess = Unpersist(Reader);
}
@@ -152,15 +152,15 @@ bool Text::DoRender() {
if (!FontPtr) return false;
// Charactermap-Resource locken.
- BS_ResourceManager *RMPtr = GetResourceManager();
+ ResourceManager *RMPtr = GetResourceManager();
BitmapResource *CharMapPtr;
{
- BS_Resource *pResource = RMPtr->RequestResource(FontPtr->GetCharactermapFileName());
+ Resource *pResource = RMPtr->RequestResource(FontPtr->GetCharactermapFileName());
if (!pResource) {
BS_LOG_ERRORLN("Could not request resource \"%s\".", FontPtr->GetCharactermapFileName().c_str());
return false;
}
- if (pResource->GetType() != BS_Resource::TYPE_BITMAP) {
+ if (pResource->GetType() != Resource::TYPE_BITMAP) {
BS_LOG_ERRORLN("Requested resource \"%s\" is not a bitmap.", FontPtr->GetCharactermapFileName().c_str());
return false;
}
@@ -169,7 +169,7 @@ bool Text::DoRender() {
}
// Framebufferobjekt holen.
- GraphicEngine *GfxPtr = static_cast<GraphicEngine *>(BS_Kernel::GetInstance()->GetService("gfx"));
+ GraphicEngine *GfxPtr = static_cast<GraphicEngine *>(Kernel::GetInstance()->GetService("gfx"));
BS_ASSERT(GfxPtr);
bool Result = true;
@@ -207,25 +207,25 @@ bool Text::DoRender() {
// -----------------------------------------------------------------------------
-BS_ResourceManager *Text::GetResourceManager() {
+ResourceManager *Text::GetResourceManager() {
// Pointer auf den Resource-Manager holen.
- return BS_Kernel::GetInstance()->GetResourceManager();
+ return Kernel::GetInstance()->GetResourceManager();
}
// -----------------------------------------------------------------------------
FontResource *Text::LockFontResource() {
- BS_ResourceManager *RMPtr = GetResourceManager();
+ ResourceManager *RMPtr = GetResourceManager();
// Font-Resource locken.
FontResource *FontPtr;
{
- BS_Resource *ResourcePtr = RMPtr->RequestResource(m_Font);
+ Resource *ResourcePtr = RMPtr->RequestResource(m_Font);
if (!ResourcePtr) {
BS_LOG_ERRORLN("Could not request resource \"%s\".", m_Font.c_str());
return NULL;
}
- if (ResourcePtr->GetType() != BS_Resource::TYPE_FONT) {
+ if (ResourcePtr->GetType() != Resource::TYPE_FONT) {
BS_LOG_ERRORLN("Requested resource \"%s\" is not a font.", m_Font.c_str());
return NULL;
}
@@ -333,7 +333,7 @@ void Text::UpdateMetrics(FontResource &FontResource) {
// Persistenz
// -----------------------------------------------------------------------------
-bool Text::Persist(BS_OutputPersistenceBlock &Writer) {
+bool Text::Persist(OutputPersistenceBlock &Writer) {
bool Result = true;
Result &= RenderObject::Persist(Writer);
@@ -349,7 +349,7 @@ bool Text::Persist(BS_OutputPersistenceBlock &Writer) {
return Result;
}
-bool Text::Unpersist(BS_InputPersistenceBlock &Reader) {
+bool Text::Unpersist(InputPersistenceBlock &Reader) {
bool Result = true;
Result &= RenderObject::Unpersist(Reader);
diff --git a/engines/sword25/gfx/text.h b/engines/sword25/gfx/text.h
index 399472571d..5e9d8d887f 100644
--- a/engines/sword25/gfx/text.h
+++ b/engines/sword25/gfx/text.h
@@ -53,9 +53,9 @@ namespace Sword25 {
// Forward Declarations
// -----------------------------------------------------------------------------
-class BS_Kernel;
+class Kernel;
class FontResource;
-class BS_ResourceManager;
+class ResourceManager;
// -----------------------------------------------------------------------------
// Klassendefinition
@@ -151,15 +151,15 @@ public:
return m_AutoWrapThreshold;
}
- virtual bool Persist(BS_OutputPersistenceBlock &Writer);
- virtual bool Unpersist(BS_InputPersistenceBlock &Reader);
+ virtual bool Persist(OutputPersistenceBlock &Writer);
+ virtual bool Unpersist(InputPersistenceBlock &Reader);
protected:
virtual bool DoRender();
private:
Text(RenderObjectPtr<RenderObject> ParentPtr);
- Text(BS_InputPersistenceBlock &Reader, RenderObjectPtr<RenderObject> ParentPtr, unsigned int Handle);
+ Text(InputPersistenceBlock &Reader, RenderObjectPtr<RenderObject> ParentPtr, unsigned int Handle);
unsigned int m_ModulationColor;
Common::String m_Font;
@@ -176,7 +176,7 @@ private:
void UpdateFormat();
void UpdateMetrics(FontResource &FontResource);
- BS_ResourceManager *GetResourceManager();
+ ResourceManager *GetResourceManager();
FontResource *LockFontResource();
};
diff --git a/engines/sword25/input/inputengine.cpp b/engines/sword25/input/inputengine.cpp
index cd678d2d38..a893152934 100644
--- a/engines/sword25/input/inputengine.cpp
+++ b/engines/sword25/input/inputengine.cpp
@@ -44,7 +44,7 @@
namespace Sword25 {
-InputEngine::InputEngine(BS_Kernel *pKernel) : BS_Service(pKernel) {
+InputEngine::InputEngine(Kernel *pKernel) : Service(pKernel) {
if (!_RegisterScriptBindings())
BS_LOG_ERRORLN("Script bindings could not be registered.");
else
diff --git a/engines/sword25/input/inputengine.h b/engines/sword25/input/inputengine.h
index c3113e0319..a951f93f40 100644
--- a/engines/sword25/input/inputengine.h
+++ b/engines/sword25/input/inputengine.h
@@ -55,9 +55,9 @@ namespace Sword25 {
/// Class definitions
-class InputEngine : public BS_Service, public BS_Persistable {
+class InputEngine : public Service, public Persistable {
public:
- InputEngine(BS_Kernel *pKernel);
+ InputEngine(Kernel *pKernel);
virtual ~InputEngine() {};
// NOTE: These codes are registered in inputengine_script.cpp
diff --git a/engines/sword25/input/inputengine_script.cpp b/engines/sword25/input/inputengine_script.cpp
index 440955b7c0..d80cc93698 100644
--- a/engines/sword25/input/inputengine_script.cpp
+++ b/engines/sword25/input/inputengine_script.cpp
@@ -107,7 +107,7 @@ static CallbackfunctionRegisterer Instance;
// -----------------------------------------------------------------------------
static InputEngine *GetIE() {
- BS_Kernel *pKernel = BS_Kernel::GetInstance();
+ Kernel *pKernel = Kernel::GetInstance();
BS_ASSERT(pKernel);
InputEngine *pIE = static_cast<InputEngine *>(pKernel->GetService("input"));
BS_ASSERT(pIE);
@@ -245,7 +245,7 @@ static int SetMouseY(lua_State *L) {
static void TheCharacterCallback(int Character) {
CharacterCallbackPtr->Character = static_cast<unsigned char>(Character);
- lua_State *L = static_cast<lua_State *>(BS_Kernel::GetInstance()->GetScript()->GetScriptObject());
+ lua_State *L = static_cast<lua_State *>(Kernel::GetInstance()->GetScript()->GetScriptObject());
CharacterCallbackPtr->InvokeCallbackFunctions(L, 1);
}
@@ -271,7 +271,7 @@ static int UnregisterCharacterCallback(lua_State *L) {
static void TheCommandCallback(int Command) {
CommandCallbackPtr->Command = static_cast<InputEngine::KEY_COMMANDS>(Command);
- lua_State *L = static_cast<lua_State *>(BS_Kernel::GetInstance()->GetScript()->GetScriptObject());
+ lua_State *L = static_cast<lua_State *>(Kernel::GetInstance()->GetScript()->GetScriptObject());
CommandCallbackPtr->InvokeCallbackFunctions(L, 1);
}
@@ -336,7 +336,7 @@ static const lua_constant_reg PACKAGE_CONSTANTS[] = {
// -----------------------------------------------------------------------------
bool InputEngine::_RegisterScriptBindings() {
- BS_Kernel *pKernel = BS_Kernel::GetInstance();
+ Kernel *pKernel = Kernel::GetInstance();
BS_ASSERT(pKernel);
ScriptEngine *pScript = static_cast<ScriptEngine *>(pKernel->GetService("script"));
BS_ASSERT(pScript);
diff --git a/engines/sword25/input/scummvminput.cpp b/engines/sword25/input/scummvminput.cpp
index 295b1bbf40..0492b010d4 100644
--- a/engines/sword25/input/scummvminput.cpp
+++ b/engines/sword25/input/scummvminput.cpp
@@ -53,7 +53,7 @@ namespace Sword25 {
// Constructor / Destructor
// -----------------------------------------------------------------------------
-ScummVMInput::ScummVMInput(BS_Kernel *pKernel) :
+ScummVMInput::ScummVMInput(Kernel *pKernel) :
m_CurrentState(0),
m_LeftMouseDown(false),
m_RightMouseDown(false),
@@ -80,7 +80,7 @@ ScummVMInput::~ScummVMInput() {
// -----------------------------------------------------------------------------
-BS_Service *ScummVMInput_CreateObject(BS_Kernel *pKernel) {
+Service *ScummVMInput_CreateObject(Kernel *pKernel) {
return new ScummVMInput(pKernel);
}
@@ -127,7 +127,7 @@ void ScummVMInput::Update() {
break;
case Common::EVENT_QUIT:
- BS_Kernel::GetInstance()->GetWindow()->SetWindowAlive(false);
+ Kernel::GetInstance()->GetWindow()->SetWindowAlive(false);
break;
default:
@@ -161,7 +161,7 @@ void ScummVMInput::TestForLeftDoubleClick() {
// Only bother checking for a double click if the left mouse button was clicked
if (WasLeftMouseDown()) {
// Get the time now
- unsigned int Now = BS_Kernel::GetInstance()->GetMilliTicks();
+ unsigned int Now = Kernel::GetInstance()->GetMilliTicks();
// A double click is signalled if
// 1. The two clicks are close enough together
@@ -335,7 +335,7 @@ void ScummVMInput::ReportCommand(KEY_COMMANDS Command) {
// Persistenz
// -----------------------------------------------------------------------------
-bool ScummVMInput::Persist(BS_OutputPersistenceBlock &Writer) {
+bool ScummVMInput::Persist(OutputPersistenceBlock &Writer) {
// Anzahl an Command-Callbacks persistieren.
Writer.Write(m_CommandCallbacks.size());
@@ -365,7 +365,7 @@ bool ScummVMInput::Persist(BS_OutputPersistenceBlock &Writer) {
// -----------------------------------------------------------------------------
-bool ScummVMInput::Unpersist(BS_InputPersistenceBlock &Reader) {
+bool ScummVMInput::Unpersist(InputPersistenceBlock &Reader) {
// Command-Callbackliste leeren.
m_CommandCallbacks.clear();
diff --git a/engines/sword25/input/scummvminput.h b/engines/sword25/input/scummvminput.h
index d89248f7fb..c336dbf515 100644
--- a/engines/sword25/input/scummvminput.h
+++ b/engines/sword25/input/scummvminput.h
@@ -44,12 +44,12 @@
namespace Sword25 {
/// Forward class definitions
-class BS_Kernel;
+class Kernel;
/// Class definitions
class ScummVMInput : public InputEngine {
public:
- ScummVMInput(BS_Kernel *pKernel);
+ ScummVMInput(Kernel *pKernel);
virtual ~ScummVMInput();
virtual bool Init();
@@ -72,8 +72,8 @@ public:
virtual void ReportCharacter(unsigned char Character);
virtual void ReportCommand(KEY_COMMANDS Command);
- bool Persist(BS_OutputPersistenceBlock &Writer);
- bool Unpersist(BS_InputPersistenceBlock &Reader);
+ bool Persist(OutputPersistenceBlock &Writer);
+ bool Unpersist(InputPersistenceBlock &Reader);
private:
void TestForLeftDoubleClick();
diff --git a/engines/sword25/kernel/filesystemutil.cpp b/engines/sword25/kernel/filesystemutil.cpp
index 5eddc06bd0..937c2d6abe 100644
--- a/engines/sword25/kernel/filesystemutil.cpp
+++ b/engines/sword25/kernel/filesystemutil.cpp
@@ -68,7 +68,7 @@ Common::String GetAbsolutePath(const Common::String &Path) {
// Class definitions
// -----------------------------------------------------------------------------
-class BS_FileSystemUtilScummVM : public BS_FileSystemUtil {
+class BS_FileSystemUtilScummVM : public FileSystemUtil {
public:
virtual Common::String GetUserdataDirectory() {
Common::String path = ConfMan.get("savepath");
@@ -134,7 +134,7 @@ public:
// Singleton method of parent class
// -----------------------------------------------------------------------------
-BS_FileSystemUtil &BS_FileSystemUtil::GetInstance() {
+FileSystemUtil &FileSystemUtil::GetInstance() {
static BS_FileSystemUtilScummVM Instance;
return Instance;
}
diff --git a/engines/sword25/kernel/filesystemutil.h b/engines/sword25/kernel/filesystemutil.h
index 0fffa72d9f..469c0b509a 100644
--- a/engines/sword25/kernel/filesystemutil.h
+++ b/engines/sword25/kernel/filesystemutil.h
@@ -60,10 +60,10 @@ namespace Sword25 {
// Class definitions
// -----------------------------------------------------------------------------
-class BS_FileSystemUtil {
+class FileSystemUtil {
public:
- static BS_FileSystemUtil &GetInstance();
- virtual ~BS_FileSystemUtil() {};
+ static FileSystemUtil &GetInstance();
+ virtual ~FileSystemUtil() {};
/**
* This function returns the name of the directory in which all user data is to be stored.
diff --git a/engines/sword25/kernel/inputpersistenceblock.cpp b/engines/sword25/kernel/inputpersistenceblock.cpp
index 764cadd373..787eb78e6b 100644
--- a/engines/sword25/kernel/inputpersistenceblock.cpp
+++ b/engines/sword25/kernel/inputpersistenceblock.cpp
@@ -46,7 +46,7 @@ namespace Sword25 {
// Constructor / Destructor
// -----------------------------------------------------------------------------
-BS_InputPersistenceBlock::BS_InputPersistenceBlock(const void *Data, unsigned int DataLength) :
+InputPersistenceBlock::InputPersistenceBlock(const void *Data, unsigned int DataLength) :
m_Data(static_cast<const unsigned char *>(Data), DataLength),
m_ErrorState(NONE) {
m_Iter = m_Data.begin();
@@ -54,7 +54,7 @@ BS_InputPersistenceBlock::BS_InputPersistenceBlock(const void *Data, unsigned in
// -----------------------------------------------------------------------------
-BS_InputPersistenceBlock::~BS_InputPersistenceBlock() {
+InputPersistenceBlock::~InputPersistenceBlock() {
if (m_Iter != m_Data.end()) BS_LOG_WARNINGLN("Persistence block was not read to the end.");
}
@@ -62,7 +62,7 @@ BS_InputPersistenceBlock::~BS_InputPersistenceBlock() {
// Reading
// -----------------------------------------------------------------------------
-void BS_InputPersistenceBlock::Read(int16 &Value) {
+void InputPersistenceBlock::Read(int16 &Value) {
signed int v;
Read(v);
Value = static_cast<int16>(v);
@@ -70,7 +70,7 @@ void BS_InputPersistenceBlock::Read(int16 &Value) {
// -----------------------------------------------------------------------------
-void BS_InputPersistenceBlock::Read(signed int &Value) {
+void InputPersistenceBlock::Read(signed int &Value) {
if (CheckMarker(SINT_MARKER)) {
RawRead(&Value, sizeof(signed int));
Value = ConvertEndianessFromStorageToSystem(Value);
@@ -81,7 +81,7 @@ void BS_InputPersistenceBlock::Read(signed int &Value) {
// -----------------------------------------------------------------------------
-void BS_InputPersistenceBlock::Read(unsigned int &Value) {
+void InputPersistenceBlock::Read(unsigned int &Value) {
if (CheckMarker(UINT_MARKER)) {
RawRead(&Value, sizeof(unsigned int));
Value = ConvertEndianessFromStorageToSystem(Value);
@@ -92,7 +92,7 @@ void BS_InputPersistenceBlock::Read(unsigned int &Value) {
// -----------------------------------------------------------------------------
-void BS_InputPersistenceBlock::Read(float &Value) {
+void InputPersistenceBlock::Read(float &Value) {
if (CheckMarker(FLOAT_MARKER)) {
RawRead(&Value, sizeof(float));
Value = ConvertEndianessFromStorageToSystem(Value);
@@ -103,7 +103,7 @@ void BS_InputPersistenceBlock::Read(float &Value) {
// -----------------------------------------------------------------------------
-void BS_InputPersistenceBlock::Read(bool &Value) {
+void InputPersistenceBlock::Read(bool &Value) {
if (CheckMarker(BOOL_MARKER)) {
unsigned int UIntBool;
RawRead(&UIntBool, sizeof(float));
@@ -116,7 +116,7 @@ void BS_InputPersistenceBlock::Read(bool &Value) {
// -----------------------------------------------------------------------------
-void BS_InputPersistenceBlock::Read(Common::String &Value) {
+void InputPersistenceBlock::Read(Common::String &Value) {
Value = "";
if (CheckMarker(STRING_MARKER)) {
@@ -132,7 +132,7 @@ void BS_InputPersistenceBlock::Read(Common::String &Value) {
// -----------------------------------------------------------------------------
-void BS_InputPersistenceBlock::Read(Common::Array<unsigned char> &Value) {
+void InputPersistenceBlock::Read(Common::Array<unsigned char> &Value) {
if (CheckMarker(BLOCK_MARKER)) {
unsigned int Size;
Read(Size);
@@ -146,7 +146,7 @@ void BS_InputPersistenceBlock::Read(Common::Array<unsigned char> &Value) {
// -----------------------------------------------------------------------------
-void BS_InputPersistenceBlock::RawRead(void *DestPtr, size_t Size) {
+void InputPersistenceBlock::RawRead(void *DestPtr, size_t Size) {
if (CheckBlockSize(Size)) {
memcpy(DestPtr, &*m_Iter, Size);
m_Iter += Size;
@@ -155,7 +155,7 @@ void BS_InputPersistenceBlock::RawRead(void *DestPtr, size_t Size) {
// -----------------------------------------------------------------------------
-bool BS_InputPersistenceBlock::CheckBlockSize(int Size) {
+bool InputPersistenceBlock::CheckBlockSize(int Size) {
if (m_Data.end() - m_Iter >= Size) {
return true;
} else {
@@ -167,7 +167,7 @@ bool BS_InputPersistenceBlock::CheckBlockSize(int Size) {
// -----------------------------------------------------------------------------
-bool BS_InputPersistenceBlock::CheckMarker(unsigned char Marker) {
+bool InputPersistenceBlock::CheckMarker(unsigned char Marker) {
if (!IsGood() || !CheckBlockSize(1)) return false;
if (*m_Iter++ == Marker) {
diff --git a/engines/sword25/kernel/inputpersistenceblock.h b/engines/sword25/kernel/inputpersistenceblock.h
index 0bd50bbeb1..2013747b92 100644
--- a/engines/sword25/kernel/inputpersistenceblock.h
+++ b/engines/sword25/kernel/inputpersistenceblock.h
@@ -49,7 +49,7 @@ namespace Sword25 {
// Class declaration
// -----------------------------------------------------------------------------
-class BS_InputPersistenceBlock : public BS_PersistenceBlock {
+class InputPersistenceBlock : public PersistenceBlock {
public:
enum ErrorState {
NONE,
@@ -57,8 +57,8 @@ public:
OUT_OF_SYNC
};
- BS_InputPersistenceBlock(const void *Data, unsigned int DataLength);
- virtual ~BS_InputPersistenceBlock();
+ InputPersistenceBlock(const void *Data, unsigned int DataLength);
+ virtual ~InputPersistenceBlock();
void Read(int16 &Value);
void Read(signed int &Value);
diff --git a/engines/sword25/kernel/kernel.cpp b/engines/sword25/kernel/kernel.cpp
index 40833fed04..8c08e18e81 100644
--- a/engines/sword25/kernel/kernel.cpp
+++ b/engines/sword25/kernel/kernel.cpp
@@ -47,9 +47,9 @@ namespace Sword25 {
#define BS_LOG_PREFIX "KERNEL"
-BS_Kernel *BS_Kernel::_Instance = 0;
+Kernel *Kernel::_Instance = 0;
-BS_Kernel::BS_Kernel() :
+Kernel::Kernel() :
_pWindow(NULL),
_Running(false),
_pResourceManager(NULL),
@@ -75,14 +75,14 @@ BS_Kernel::BS_Kernel() :
}
// Create window object
- _pWindow = BS_Window::CreateBSWindow(0, 0, 0, 0, false);
+ _pWindow = Window::CreateBSWindow(0, 0, 0, 0, false);
if (!_pWindow) {
BS_LOG_ERRORLN("Failed to create the window.");
} else
BS_LOGLN("Window created.");
// Create the resource manager
- _pResourceManager = new BS_ResourceManager(this);
+ _pResourceManager = new ResourceManager(this);
// Initialise the script engine
ScriptEngine *pScript = static_cast<ScriptEngine *>(NewService("script", "lua"));
@@ -102,7 +102,7 @@ BS_Kernel::BS_Kernel() :
_InitSuccess = true;
}
-BS_Kernel::~BS_Kernel() {
+Kernel::~Kernel() {
// Services are de-registered in reverse order of creation
while (!_ServiceCreationOrder.empty()) {
Superclass *superclass = GetSuperclassByIdentifier(_ServiceCreationOrder.top());
@@ -129,7 +129,7 @@ BS_Kernel::~BS_Kernel() {
// Service Methoden
// ----------------
-BS_Kernel::Superclass::Superclass(BS_Kernel *pKernel, const Common::String &Identifier) :
+Kernel::Superclass::Superclass(Kernel *pKernel, const Common::String &Identifier) :
_pKernel(pKernel),
_Identifier(Identifier),
_ServiceCount(0),
@@ -139,7 +139,7 @@ BS_Kernel::Superclass::Superclass(BS_Kernel *pKernel, const Common::String &Iden
_ServiceCount++;
}
-BS_Kernel::Superclass::~Superclass() {
+Kernel::Superclass::~Superclass() {
DisconnectService();
}
@@ -152,7 +152,7 @@ BS_Kernel::Superclass::~Superclass() {
* Hierbei ist zu beachten, dass der erste Service die Nummer 0 erhält. Number muss also eine Zahl zwischen
* 0 und GetServiceCount() - 1 sein.
*/
-Common::String BS_Kernel::Superclass::GetServiceIdentifier(unsigned int Number) {
+Common::String Kernel::Superclass::GetServiceIdentifier(unsigned int Number) {
if (Number > _ServiceCount) return NULL;
unsigned int CurServiceOrd = 0;
@@ -177,11 +177,11 @@ Common::String BS_Kernel::Superclass::GetServiceIdentifier(unsigned int Number)
* @param ServiceIdentifier The name of the service
* For the superclass "sfx" an example could be "Fmod" or "directsound"
*/
-BS_Service *BS_Kernel::Superclass::NewService(const Common::String &ServiceIdentifier) {
+Service *Kernel::Superclass::NewService(const Common::String &ServiceIdentifier) {
for (unsigned int i = 0; i < BS_SERVICE_COUNT; i++)
if (BS_SERVICE_TABLE[i].SuperclassIdentifier == _Identifier &&
BS_SERVICE_TABLE[i].ServiceIdentifier == ServiceIdentifier) {
- BS_Service *NewService_ = BS_SERVICE_TABLE[i].CreateMethod(_pKernel);
+ Service *NewService_ = BS_SERVICE_TABLE[i].CreateMethod(_pKernel);
if (NewService_) {
DisconnectService();
@@ -205,7 +205,7 @@ BS_Service *BS_Kernel::Superclass::NewService(const Common::String &ServiceIdent
* @param SuperclassIdentfier The name of the superclass which is to be disconnected
* z.B: "sfx", "gfx", "package" ...
*/
-bool BS_Kernel::Superclass::DisconnectService() {
+bool Kernel::Superclass::DisconnectService() {
if (_ActiveService) {
delete _ActiveService;
_ActiveService = 0;
@@ -216,7 +216,7 @@ bool BS_Kernel::Superclass::DisconnectService() {
return false;
}
-BS_Kernel::Superclass *BS_Kernel::GetSuperclassByIdentifier(const Common::String &Identifier) {
+Kernel::Superclass *Kernel::GetSuperclassByIdentifier(const Common::String &Identifier) {
Common::Array<Superclass *>::iterator Iter;
for (Iter = _SuperclassList.begin(); Iter != _SuperclassList.end(); ++Iter) {
if ((*Iter)->GetIdentifier() == Identifier)
@@ -230,7 +230,7 @@ BS_Kernel::Superclass *BS_Kernel::GetSuperclassByIdentifier(const Common::String
/**
* Returns the number of register superclasses
*/
-unsigned int BS_Kernel::GetSuperclassCount() {
+unsigned int Kernel::GetSuperclassCount() {
return _SuperclassList.size();
}
@@ -240,7 +240,7 @@ unsigned int BS_Kernel::GetSuperclassCount() {
* @param Number The number of the superclass to return the identifier for.
* It should be noted that the number should be between 0 und GetSuperclassCount() - 1.
*/
-Common::String BS_Kernel::GetSuperclassIdentifier(unsigned int Number) {
+Common::String Kernel::GetSuperclassIdentifier(unsigned int Number) {
if (Number > _SuperclassList.size()) return NULL;
unsigned int CurSuperclassOrd = 0;
@@ -260,7 +260,7 @@ Common::String BS_Kernel::GetSuperclassIdentifier(unsigned int Number) {
* @param SuperclassIdentifier The name of the superclass
* z.B: "sfx", "gfx", "package" ...
*/
-unsigned int BS_Kernel::GetServiceCount(const Common::String &SuperclassIdentifier) {
+unsigned int Kernel::GetServiceCount(const Common::String &SuperclassIdentifier) {
Superclass *pSuperclass;
if (!(pSuperclass = GetSuperclassByIdentifier(SuperclassIdentifier)))
return 0;
@@ -278,7 +278,7 @@ unsigned int BS_Kernel::GetServiceCount(const Common::String &SuperclassIdentifi
* Hierbei ist zu beachten, dass der erste Service die Nummer 0 erhält. Number muss also eine Zahl zwischen
* 0 und GetServiceCount() - 1 sein.
*/
-Common::String BS_Kernel::GetServiceIdentifier(const Common::String &SuperclassIdentifier, unsigned int Number) {
+Common::String Kernel::GetServiceIdentifier(const Common::String &SuperclassIdentifier, unsigned int Number) {
Superclass *pSuperclass;
if (!(pSuperclass = GetSuperclassByIdentifier(SuperclassIdentifier))) return NULL;
@@ -294,7 +294,7 @@ Common::String BS_Kernel::GetServiceIdentifier(const Common::String &SuperclassI
* @param ServiceIdentifier The name of the service
* For the superclass "sfx" an example could be "Fmod" or "directsound"
*/
-BS_Service *BS_Kernel::NewService(const Common::String &SuperclassIdentifier, const Common::String &ServiceIdentifier) {
+Service *Kernel::NewService(const Common::String &SuperclassIdentifier, const Common::String &ServiceIdentifier) {
Superclass *pSuperclass;
if (!(pSuperclass = GetSuperclassByIdentifier(SuperclassIdentifier))) return NULL;
@@ -310,7 +310,7 @@ BS_Service *BS_Kernel::NewService(const Common::String &SuperclassIdentifier, co
* @param SuperclassIdentfier The name of the superclass which is to be disconnected
* z.B: "sfx", "gfx", "package" ...
*/
-bool BS_Kernel::DisconnectService(const Common::String &SuperclassIdentifier) {
+bool Kernel::DisconnectService(const Common::String &SuperclassIdentifier) {
Superclass *pSuperclass;
if (!(pSuperclass = GetSuperclassByIdentifier(SuperclassIdentifier))) return false;
@@ -322,7 +322,7 @@ bool BS_Kernel::DisconnectService(const Common::String &SuperclassIdentifier) {
* @param SuperclassIdentfier The name of the superclass
* z.B: "sfx", "gfx", "package" ...
*/
-BS_Service *BS_Kernel::GetService(const Common::String &SuperclassIdentifier) {
+Service *Kernel::GetService(const Common::String &SuperclassIdentifier) {
Superclass *pSuperclass;
if (!(pSuperclass = GetSuperclassByIdentifier(SuperclassIdentifier))) return NULL;
@@ -335,7 +335,7 @@ BS_Service *BS_Kernel::GetService(const Common::String &SuperclassIdentifier) {
* @param SuperclassIdentfier The name of the superclass
* z.B: "sfx", "gfx", "package" ...
*/
-Common::String BS_Kernel::GetActiveServiceIdentifier(const Common::String &SuperclassIdentifier) {
+Common::String Kernel::GetActiveServiceIdentifier(const Common::String &SuperclassIdentifier) {
Superclass *pSuperclass = GetSuperclassByIdentifier(SuperclassIdentifier);
if (!pSuperclass) return Common::String("");
@@ -349,7 +349,7 @@ Common::String BS_Kernel::GetActiveServiceIdentifier(const Common::String &Super
* @param Min The minimum allowed value
* @param Max The maximum allowed value
*/
-int BS_Kernel::GetRandomNumber(int Min, int Max) {
+int Kernel::GetRandomNumber(int Min, int Max) {
BS_ASSERT(Min <= Max);
return Min + _rnd.getRandomNumber(Max - Min + 1);
@@ -358,7 +358,7 @@ int BS_Kernel::GetRandomNumber(int Min, int Max) {
/**
* Returns the elapsed time since startup in milliseconds
*/
-unsigned int BS_Kernel::GetMilliTicks() {
+unsigned int Kernel::GetMilliTicks() {
return g_system->getMillis();
}
@@ -366,7 +366,7 @@ unsigned int BS_Kernel::GetMilliTicks() {
* Returns the elapsed time since the system start in microseconds.
* This method should be used only if GetMilliTick() for the desired application is inaccurate.
*/
-uint64 BS_Kernel::GetMicroTicks() {
+uint64 Kernel::GetMicroTicks() {
return g_system->getMillis() * 1000;
}
@@ -376,7 +376,7 @@ uint64 BS_Kernel::GetMicroTicks() {
/**
* Returns how much memory is being used
*/
-size_t BS_Kernel::GetUsedMemory() {
+size_t Kernel::GetUsedMemory() {
return 0;
#ifdef SCUMMVM_DISABLED_CODE
@@ -396,7 +396,7 @@ size_t BS_Kernel::GetUsedMemory() {
/**
* Returns a pointer to the active Gfx Service, or NULL if no Gfx service is active
*/
-GraphicEngine *BS_Kernel::GetGfx() {
+GraphicEngine *Kernel::GetGfx() {
return static_cast<GraphicEngine *>(GetService("gfx"));
}
@@ -405,7 +405,7 @@ GraphicEngine *BS_Kernel::GetGfx() {
/**
* Returns a pointer to the active Sfx Service, or NULL if no Sfx service is active
*/
-SoundEngine *BS_Kernel::GetSfx() {
+SoundEngine *Kernel::GetSfx() {
return static_cast<SoundEngine *>(GetService("sfx"));
}
@@ -414,7 +414,7 @@ SoundEngine *BS_Kernel::GetSfx() {
/**
* Returns a pointer to the active input service, or NULL if no input service is active
*/
-InputEngine *BS_Kernel::GetInput() {
+InputEngine *Kernel::GetInput() {
return static_cast<InputEngine *>(GetService("input"));
}
@@ -423,7 +423,7 @@ InputEngine *BS_Kernel::GetInput() {
/**
* Returns a pointer to the active package manager, or NULL if no manager is active
*/
-PackageManager *BS_Kernel::GetPackage() {
+PackageManager *Kernel::GetPackage() {
return static_cast<PackageManager *>(GetService("package"));
}
@@ -432,7 +432,7 @@ PackageManager *BS_Kernel::GetPackage() {
/**
* Returns a pointer to the script engine, or NULL if it is not active
*/
-ScriptEngine *BS_Kernel::GetScript() {
+ScriptEngine *Kernel::GetScript() {
return static_cast<ScriptEngine *>(GetService("script"));
}
@@ -441,13 +441,13 @@ ScriptEngine *BS_Kernel::GetScript() {
/**
* Returns a pointer to the movie player, or NULL if it is not active
*/
-MoviePlayer *BS_Kernel::GetFMV() {
+MoviePlayer *Kernel::GetFMV() {
return static_cast<MoviePlayer *>(GetService("fmv"));
}
// -----------------------------------------------------------------------------
-void BS_Kernel::Sleep(unsigned int Msecs) const {
+void Kernel::Sleep(unsigned int Msecs) const {
g_system->delayMillis(Msecs);
}
diff --git a/engines/sword25/kernel/kernel.h b/engines/sword25/kernel/kernel.h
index e7861db32b..76b092383d 100644
--- a/engines/sword25/kernel/kernel.h
+++ b/engines/sword25/kernel/kernel.h
@@ -60,7 +60,7 @@
namespace Sword25 {
// Class definitions
-class BS_Service;
+class Service;
class GraphicEngine;
class ScriptEngine;
class SoundEngine;
@@ -74,7 +74,7 @@ class MoviePlayer;
* This class creates and manages all other engine components such as sound engine, graphics engine ...
* It is not necessary to release all the items individually, this is performed by the Kernel class.
*/
-class BS_Kernel {
+class Kernel {
public:
// Window methods
// ----------------
@@ -82,7 +82,7 @@ public:
/**
* Returns a pointer to the window object
*/
- BS_Window *GetWindow() {
+ Window *GetWindow() {
return _pWindow;
}
@@ -98,7 +98,7 @@ public:
* @param ServiceIdentifier The name of the service
* For the superclass "sfx" an example could be "Fmod" or "directsound"
*/
- BS_Service *NewService(const Common::String &SuperclassIdentifier, const Common::String &ServiceIdentifier);
+ Service *NewService(const Common::String &SuperclassIdentifier, const Common::String &ServiceIdentifier);
/**
* Ends the current service of a superclass. Returns true on success, and false if the superclass
@@ -113,7 +113,7 @@ public:
* @param SuperclassIdentfier The name of the superclass
* z.B: "sfx", "gfx", "package" ...
*/
- BS_Service *GetService(const Common::String &SuperclassIdentifier);
+ Service *GetService(const Common::String &SuperclassIdentifier);
/**
* Returns the name of the currentl active service object of a superclass.
@@ -174,7 +174,7 @@ public:
/**
* Returns a pointer to the BS_ResourceManager
*/
- BS_ResourceManager *GetResourceManager() {
+ ResourceManager *GetResourceManager() {
return _pResourceManager;
}
/**
@@ -221,8 +221,8 @@ public:
/**
* Returns the singleton instance for the kernel
*/
- static BS_Kernel *GetInstance() {
- if (!_Instance) _Instance = new BS_Kernel();
+ static Kernel *GetInstance() {
+ if (!_Instance) _Instance = new Kernel();
return _Instance;
}
@@ -251,26 +251,26 @@ private:
// Private singleton methods
// -----------------------------------------------------------------------------
- BS_Kernel();
- virtual ~BS_Kernel();
+ Kernel();
+ virtual ~Kernel();
// -----------------------------------------------------------------------------
// Singleton instance
// -----------------------------------------------------------------------------
- static BS_Kernel *_Instance;
+ static Kernel *_Instance;
// Superclass class
// ----------------
class Superclass {
private:
- BS_Kernel *_pKernel;
+ Kernel *_pKernel;
unsigned int _ServiceCount;
Common::String _Identifier;
- BS_Service *_ActiveService;
+ Service *_ActiveService;
Common::String _ActiveServiceName;
public:
- Superclass(BS_Kernel *pKernel, const Common::String &Identifier);
+ Superclass(Kernel *pKernel, const Common::String &Identifier);
~Superclass();
unsigned int GetServiceCount() const {
@@ -279,14 +279,14 @@ private:
Common::String GetIdentifier() const {
return _Identifier;
}
- BS_Service *GetActiveService() const {
+ Service *GetActiveService() const {
return _ActiveService;
}
Common::String GetActiveServiceName() const {
return _ActiveServiceName;
}
Common::String GetServiceIdentifier(unsigned int Number);
- BS_Service *NewService(const Common::String &ServiceIdentifier);
+ Service *NewService(const Common::String &ServiceIdentifier);
bool DisconnectService();
};
@@ -299,7 +299,7 @@ private:
// Active window
// -------------
- BS_Window *_pWindow;
+ Window *_pWindow;
// Random number generator
// -----------------------
@@ -330,7 +330,7 @@ private:
// Resourcemanager
// ---------------
- BS_ResourceManager *_pResourceManager;
+ ResourceManager *_pResourceManager;
bool _RegisterScriptBindings();
};
@@ -342,7 +342,7 @@ private:
class BS_ServiceInfo {
public:
BS_ServiceInfo(const Common::String &SuperclassIdentifier_, const Common::String &ServiceIdentifier_,
- BS_Service*(*CreateMethod_)(BS_Kernel *)) {
+ Service*(*CreateMethod_)(Kernel *)) {
this->SuperclassIdentifier = SuperclassIdentifier_;
this->ServiceIdentifier = ServiceIdentifier_;
this->CreateMethod = CreateMethod_;
@@ -350,7 +350,7 @@ public:
Common::String SuperclassIdentifier;
Common::String ServiceIdentifier;
- BS_Service*(*CreateMethod)(BS_Kernel *);
+ Service*(*CreateMethod)(Kernel *);
};
template<class T>
diff --git a/engines/sword25/kernel/kernel_script.cpp b/engines/sword25/kernel/kernel_script.cpp
index 9ae78d1e95..f1c75bd691 100644
--- a/engines/sword25/kernel/kernel_script.cpp
+++ b/engines/sword25/kernel/kernel_script.cpp
@@ -50,7 +50,7 @@ namespace Sword25 {
// -----------------------------------------------------------------------------
static int DisconnectService(lua_State *L) {
- BS_Kernel *pKernel = BS_Kernel::GetInstance();
+ Kernel *pKernel = Kernel::GetInstance();
BS_ASSERT(pKernel);
lua_pushboolean(L, pKernel->DisconnectService(luaL_checkstring(L, 1)));
@@ -61,7 +61,7 @@ static int DisconnectService(lua_State *L) {
// -----------------------------------------------------------------------------
static int GetActiveServiceIdentifier(lua_State *L) {
- BS_Kernel *pKernel = BS_Kernel::GetInstance();
+ Kernel *pKernel = Kernel::GetInstance();
BS_ASSERT(pKernel);
lua_pushstring(L, pKernel->GetActiveServiceIdentifier(luaL_checkstring(L, 1)).c_str());
@@ -72,7 +72,7 @@ static int GetActiveServiceIdentifier(lua_State *L) {
// -----------------------------------------------------------------------------
static int GetSuperclassCount(lua_State *L) {
- BS_Kernel *pKernel = BS_Kernel::GetInstance();
+ Kernel *pKernel = Kernel::GetInstance();
BS_ASSERT(pKernel);
lua_pushnumber(L, pKernel->GetSuperclassCount());
@@ -83,7 +83,7 @@ static int GetSuperclassCount(lua_State *L) {
// -----------------------------------------------------------------------------
static int GetSuperclassIdentifier(lua_State *L) {
- BS_Kernel *pKernel = BS_Kernel::GetInstance();
+ Kernel *pKernel = Kernel::GetInstance();
BS_ASSERT(pKernel);
lua_pushstring(L, pKernel->GetSuperclassIdentifier(
@@ -95,7 +95,7 @@ static int GetSuperclassIdentifier(lua_State *L) {
// -----------------------------------------------------------------------------
static int GetServiceCount(lua_State *L) {
- BS_Kernel *pKernel = BS_Kernel::GetInstance();
+ Kernel *pKernel = Kernel::GetInstance();
BS_ASSERT(pKernel);
lua_pushnumber(L, pKernel->GetServiceCount(luaL_checkstring(L, 1)));
@@ -106,7 +106,7 @@ static int GetServiceCount(lua_State *L) {
// -----------------------------------------------------------------------------
static int GetServiceIdentifier(lua_State *L) {
- BS_Kernel *pKernel = BS_Kernel::GetInstance();
+ Kernel *pKernel = Kernel::GetInstance();
BS_ASSERT(pKernel);
lua_pushstring(L, pKernel->GetServiceIdentifier(luaL_checkstring(L, 1),
@@ -118,7 +118,7 @@ static int GetServiceIdentifier(lua_State *L) {
// -----------------------------------------------------------------------------
static int GetMilliTicks(lua_State *L) {
- BS_Kernel *pKernel = BS_Kernel::GetInstance();
+ Kernel *pKernel = Kernel::GetInstance();
BS_ASSERT(pKernel);
lua_pushnumber(L, pKernel->GetMilliTicks());
@@ -129,7 +129,7 @@ static int GetMilliTicks(lua_State *L) {
// -----------------------------------------------------------------------------
static int GetTimer(lua_State *L) {
- BS_Kernel *pKernel = BS_Kernel::GetInstance();
+ Kernel *pKernel = Kernel::GetInstance();
BS_ASSERT(pKernel);
lua_pushnumber(L, static_cast<lua_Number>(pKernel->GetMicroTicks()) / 1000000.0);
@@ -140,7 +140,7 @@ static int GetTimer(lua_State *L) {
// -----------------------------------------------------------------------------
static int StartService(lua_State *L) {
- BS_Kernel *pKernel = BS_Kernel::GetInstance();
+ Kernel *pKernel = Kernel::GetInstance();
BS_ASSERT(pKernel);
lua_pushbooleancpp(L, pKernel->NewService(luaL_checkstring(L, 1), luaL_checkstring(L, 2)) != NULL);
@@ -151,7 +151,7 @@ static int StartService(lua_State *L) {
// -----------------------------------------------------------------------------
static int Sleep(lua_State *L) {
- BS_Kernel *pKernel = BS_Kernel::GetInstance();
+ Kernel *pKernel = Kernel::GetInstance();
BS_ASSERT(pKernel);
pKernel->Sleep(static_cast<unsigned int>(luaL_checknumber(L, 1) * 1000));
return 0;
@@ -160,7 +160,7 @@ static int Sleep(lua_State *L) {
// -----------------------------------------------------------------------------
static int Crash(lua_State *L) {
- BS_Kernel *pKernel = BS_Kernel::GetInstance();
+ Kernel *pKernel = Kernel::GetInstance();
BS_ASSERT(pKernel);
pKernel->Crash();
return 0;
@@ -169,7 +169,7 @@ static int Crash(lua_State *L) {
// -----------------------------------------------------------------------------
static int ExecuteFile(lua_State *L) {
- BS_Kernel *pKernel = BS_Kernel::GetInstance();
+ Kernel *pKernel = Kernel::GetInstance();
BS_ASSERT(pKernel);
ScriptEngine *pSE = static_cast<ScriptEngine *>(pKernel->GetService("script"));
BS_ASSERT(pSE);
@@ -182,28 +182,28 @@ static int ExecuteFile(lua_State *L) {
// -----------------------------------------------------------------------------
static int GetUserdataDirectory(lua_State *L) {
- lua_pushstring(L, BS_FileSystemUtil::GetInstance().GetUserdataDirectory().c_str());
+ lua_pushstring(L, FileSystemUtil::GetInstance().GetUserdataDirectory().c_str());
return 1;
}
// -----------------------------------------------------------------------------
static int GetPathSeparator(lua_State *L) {
- lua_pushstring(L, BS_FileSystemUtil::GetInstance().GetPathSeparator().c_str());
+ lua_pushstring(L, FileSystemUtil::GetInstance().GetPathSeparator().c_str());
return 1;
}
// -----------------------------------------------------------------------------
static int FileExists(lua_State *L) {
- lua_pushbooleancpp(L, BS_FileSystemUtil::GetInstance().FileExists(luaL_checkstring(L, 1)));
+ lua_pushbooleancpp(L, FileSystemUtil::GetInstance().FileExists(luaL_checkstring(L, 1)));
return 1;
}
// -----------------------------------------------------------------------------
static int CreateDirectory(lua_State *L) {
- lua_pushbooleancpp(L, BS_FileSystemUtil::GetInstance().CreateDirectory(luaL_checkstring(L, 1)));
+ lua_pushbooleancpp(L, FileSystemUtil::GetInstance().CreateDirectory(luaL_checkstring(L, 1)));
return 1;
}
@@ -225,7 +225,7 @@ static int GetSubversionRevision(lua_State *L) {
// -----------------------------------------------------------------------------
static int GetUsedMemory(lua_State *L) {
- lua_pushnumber(L, BS_Kernel::GetInstance()->GetUsedMemory());
+ lua_pushnumber(L, Kernel::GetInstance()->GetUsedMemory());
return 1;
}
@@ -259,9 +259,9 @@ static const luaL_reg KERNEL_FUNCTIONS[] = {
// -----------------------------------------------------------------------------
static int IsVisible(lua_State *L) {
- BS_Kernel *pKernel = BS_Kernel::GetInstance();
+ Kernel *pKernel = Kernel::GetInstance();
BS_ASSERT(pKernel);
- BS_Window *pWindow = pKernel->GetWindow();
+ Window *pWindow = pKernel->GetWindow();
BS_ASSERT(pWindow);
lua_pushbooleancpp(L, pWindow->IsVisible());
@@ -272,9 +272,9 @@ static int IsVisible(lua_State *L) {
// -----------------------------------------------------------------------------
static int SetVisible(lua_State *L) {
- BS_Kernel *pKernel = BS_Kernel::GetInstance();
+ Kernel *pKernel = Kernel::GetInstance();
BS_ASSERT(pKernel);
- BS_Window *pWindow = pKernel->GetWindow();
+ Window *pWindow = pKernel->GetWindow();
BS_ASSERT(pWindow);
pWindow->SetVisible(lua_tobooleancpp(L, 1));
@@ -285,9 +285,9 @@ static int SetVisible(lua_State *L) {
// -----------------------------------------------------------------------------
static int GetX(lua_State *L) {
- BS_Kernel *pKernel = BS_Kernel::GetInstance();
+ Kernel *pKernel = Kernel::GetInstance();
BS_ASSERT(pKernel);
- BS_Window *pWindow = pKernel->GetWindow();
+ Window *pWindow = pKernel->GetWindow();
BS_ASSERT(pWindow);
lua_pushnumber(L, pWindow->GetX());
@@ -298,9 +298,9 @@ static int GetX(lua_State *L) {
// -----------------------------------------------------------------------------
static int GetY(lua_State *L) {
- BS_Kernel *pKernel = BS_Kernel::GetInstance();
+ Kernel *pKernel = Kernel::GetInstance();
BS_ASSERT(pKernel);
- BS_Window *pWindow = pKernel->GetWindow();
+ Window *pWindow = pKernel->GetWindow();
BS_ASSERT(pWindow);
lua_pushnumber(L, pWindow->GetY());
@@ -311,9 +311,9 @@ static int GetY(lua_State *L) {
// -----------------------------------------------------------------------------
static int SetX(lua_State *L) {
- BS_Kernel *pKernel = BS_Kernel::GetInstance();
+ Kernel *pKernel = Kernel::GetInstance();
BS_ASSERT(pKernel);
- BS_Window *pWindow = pKernel->GetWindow();
+ Window *pWindow = pKernel->GetWindow();
BS_ASSERT(pWindow);
pWindow->SetX(static_cast<int>(luaL_checknumber(L, 1)));
@@ -324,9 +324,9 @@ static int SetX(lua_State *L) {
// -----------------------------------------------------------------------------
static int SetY(lua_State *L) {
- BS_Kernel *pKernel = BS_Kernel::GetInstance();
+ Kernel *pKernel = Kernel::GetInstance();
BS_ASSERT(pKernel);
- BS_Window *pWindow = pKernel->GetWindow();
+ Window *pWindow = pKernel->GetWindow();
BS_ASSERT(pWindow);
pWindow->SetY(static_cast<int>(luaL_checknumber(L, 1)));
@@ -337,9 +337,9 @@ static int SetY(lua_State *L) {
// -----------------------------------------------------------------------------
static int GetClientX(lua_State *L) {
- BS_Kernel *pKernel = BS_Kernel::GetInstance();
+ Kernel *pKernel = Kernel::GetInstance();
BS_ASSERT(pKernel);
- BS_Window *pWindow = pKernel->GetWindow();
+ Window *pWindow = pKernel->GetWindow();
BS_ASSERT(pWindow);
lua_pushnumber(L, pWindow->GetClientX());
@@ -350,9 +350,9 @@ static int GetClientX(lua_State *L) {
// -----------------------------------------------------------------------------
static int GetClientY(lua_State *L) {
- BS_Kernel *pKernel = BS_Kernel::GetInstance();
+ Kernel *pKernel = Kernel::GetInstance();
BS_ASSERT(pKernel);
- BS_Window *pWindow = pKernel->GetWindow();
+ Window *pWindow = pKernel->GetWindow();
BS_ASSERT(pWindow);
lua_pushnumber(L, pWindow->GetClientY());
@@ -363,9 +363,9 @@ static int GetClientY(lua_State *L) {
// -----------------------------------------------------------------------------
static int GetWidth(lua_State *L) {
- BS_Kernel *pKernel = BS_Kernel::GetInstance();
+ Kernel *pKernel = Kernel::GetInstance();
BS_ASSERT(pKernel);
- BS_Window *pWindow = pKernel->GetWindow();
+ Window *pWindow = pKernel->GetWindow();
BS_ASSERT(pWindow);
lua_pushnumber(L, pWindow->GetWidth());
@@ -376,9 +376,9 @@ static int GetWidth(lua_State *L) {
// -----------------------------------------------------------------------------
static int GetHeight(lua_State *L) {
- BS_Kernel *pKernel = BS_Kernel::GetInstance();
+ Kernel *pKernel = Kernel::GetInstance();
BS_ASSERT(pKernel);
- BS_Window *pWindow = pKernel->GetWindow();
+ Window *pWindow = pKernel->GetWindow();
BS_ASSERT(pWindow);
lua_pushnumber(L, pWindow->GetHeight());
@@ -389,9 +389,9 @@ static int GetHeight(lua_State *L) {
// -----------------------------------------------------------------------------
static int SetWidth(lua_State *L) {
- BS_Kernel *pKernel = BS_Kernel::GetInstance();
+ Kernel *pKernel = Kernel::GetInstance();
BS_ASSERT(pKernel);
- BS_Window *pWindow = pKernel->GetWindow();
+ Window *pWindow = pKernel->GetWindow();
BS_ASSERT(pWindow);
pWindow->SetWidth(static_cast<int>(luaL_checknumber(L, 1)));
@@ -402,9 +402,9 @@ static int SetWidth(lua_State *L) {
// -----------------------------------------------------------------------------
static int SetHeight(lua_State *L) {
- BS_Kernel *pKernel = BS_Kernel::GetInstance();
+ Kernel *pKernel = Kernel::GetInstance();
BS_ASSERT(pKernel);
- BS_Window *pWindow = pKernel->GetWindow();
+ Window *pWindow = pKernel->GetWindow();
BS_ASSERT(pWindow);
pWindow->SetHeight(static_cast<int>(luaL_checknumber(L, 1)));
@@ -415,9 +415,9 @@ static int SetHeight(lua_State *L) {
// -----------------------------------------------------------------------------
static int GetTitle(lua_State *L) {
- BS_Kernel *pKernel = BS_Kernel::GetInstance();
+ Kernel *pKernel = Kernel::GetInstance();
BS_ASSERT(pKernel);
- BS_Window *pWindow = pKernel->GetWindow();
+ Window *pWindow = pKernel->GetWindow();
BS_ASSERT(pWindow);
lua_pushstring(L, pWindow->GetTitle().c_str());
@@ -428,9 +428,9 @@ static int GetTitle(lua_State *L) {
// -----------------------------------------------------------------------------
static int SetTitle(lua_State *L) {
- BS_Kernel *pKernel = BS_Kernel::GetInstance();
+ Kernel *pKernel = Kernel::GetInstance();
BS_ASSERT(pKernel);
- BS_Window *pWindow = pKernel->GetWindow();
+ Window *pWindow = pKernel->GetWindow();
BS_ASSERT(pWindow);
pWindow->SetTitle(luaL_checkstring(L, 1));
@@ -441,9 +441,9 @@ static int SetTitle(lua_State *L) {
// -----------------------------------------------------------------------------
static int ProcessMessages(lua_State *L) {
- BS_Kernel *pKernel = BS_Kernel::GetInstance();
+ Kernel *pKernel = Kernel::GetInstance();
BS_ASSERT(pKernel);
- BS_Window *pWindow = pKernel->GetWindow();
+ Window *pWindow = pKernel->GetWindow();
BS_ASSERT(pWindow);
lua_pushbooleancpp(L, pWindow->ProcessMessages());
@@ -454,9 +454,9 @@ static int ProcessMessages(lua_State *L) {
// -----------------------------------------------------------------------------
static int CloseWanted(lua_State *L) {
- BS_Kernel *pKernel = BS_Kernel::GetInstance();
+ Kernel *pKernel = Kernel::GetInstance();
BS_ASSERT(pKernel);
- BS_Window *pWindow = pKernel->GetWindow();
+ Window *pWindow = pKernel->GetWindow();
BS_ASSERT(pWindow);
lua_pushbooleancpp(L, pWindow->CloseWanted());
@@ -467,9 +467,9 @@ static int CloseWanted(lua_State *L) {
// -----------------------------------------------------------------------------
static int WaitForFocus(lua_State *L) {
- BS_Kernel *pKernel = BS_Kernel::GetInstance();
+ Kernel *pKernel = Kernel::GetInstance();
BS_ASSERT(pKernel);
- BS_Window *pWindow = pKernel->GetWindow();
+ Window *pWindow = pKernel->GetWindow();
BS_ASSERT(pWindow);
lua_pushbooleancpp(L, pWindow->WaitForFocus());
@@ -480,9 +480,9 @@ static int WaitForFocus(lua_State *L) {
// -----------------------------------------------------------------------------
static int HasFocus(lua_State *L) {
- BS_Kernel *pKernel = BS_Kernel::GetInstance();
+ Kernel *pKernel = Kernel::GetInstance();
BS_ASSERT(pKernel);
- BS_Window *pWindow = pKernel->GetWindow();
+ Window *pWindow = pKernel->GetWindow();
BS_ASSERT(pWindow);
lua_pushbooleancpp(L, pWindow->HasFocus());
@@ -519,9 +519,9 @@ static const luaL_reg WINDOW_FUNCTIONS[] = {
// -----------------------------------------------------------------------------
static int PrecacheResource(lua_State *L) {
- BS_Kernel *pKernel = BS_Kernel::GetInstance();
+ Kernel *pKernel = Kernel::GetInstance();
BS_ASSERT(pKernel);
- BS_ResourceManager *pResource = pKernel->GetResourceManager();
+ ResourceManager *pResource = pKernel->GetResourceManager();
BS_ASSERT(pResource);
lua_pushbooleancpp(L, pResource->PrecacheResource(luaL_checkstring(L, 1)));
@@ -532,9 +532,9 @@ static int PrecacheResource(lua_State *L) {
// -----------------------------------------------------------------------------
static int ForcePrecacheResource(lua_State *L) {
- BS_Kernel *pKernel = BS_Kernel::GetInstance();
+ Kernel *pKernel = Kernel::GetInstance();
BS_ASSERT(pKernel);
- BS_ResourceManager *pResource = pKernel->GetResourceManager();
+ ResourceManager *pResource = pKernel->GetResourceManager();
BS_ASSERT(pResource);
lua_pushbooleancpp(L, pResource->PrecacheResource(luaL_checkstring(L, 1), true));
@@ -545,9 +545,9 @@ static int ForcePrecacheResource(lua_State *L) {
// -----------------------------------------------------------------------------
static int GetMaxMemoryUsage(lua_State *L) {
- BS_Kernel *pKernel = BS_Kernel::GetInstance();
+ Kernel *pKernel = Kernel::GetInstance();
BS_ASSERT(pKernel);
- BS_ResourceManager *pResource = pKernel->GetResourceManager();
+ ResourceManager *pResource = pKernel->GetResourceManager();
BS_ASSERT(pResource);
lua_pushnumber(L, pResource->GetMaxMemoryUsage());
@@ -558,9 +558,9 @@ static int GetMaxMemoryUsage(lua_State *L) {
// -----------------------------------------------------------------------------
static int SetMaxMemoryUsage(lua_State *L) {
- BS_Kernel *pKernel = BS_Kernel::GetInstance();
+ Kernel *pKernel = Kernel::GetInstance();
BS_ASSERT(pKernel);
- BS_ResourceManager *pResource = pKernel->GetResourceManager();
+ ResourceManager *pResource = pKernel->GetResourceManager();
BS_ASSERT(pResource);
pResource->SetMaxMemoryUsage(static_cast<unsigned int>(lua_tonumber(L, 1)));
@@ -571,9 +571,9 @@ static int SetMaxMemoryUsage(lua_State *L) {
// -----------------------------------------------------------------------------
static int EmptyCache(lua_State *L) {
- BS_Kernel *pKernel = BS_Kernel::GetInstance();
+ Kernel *pKernel = Kernel::GetInstance();
BS_ASSERT(pKernel);
- BS_ResourceManager *pResource = pKernel->GetResourceManager();
+ ResourceManager *pResource = pKernel->GetResourceManager();
BS_ASSERT(pResource);
pResource->EmptyCache();
@@ -584,9 +584,9 @@ static int EmptyCache(lua_State *L) {
// -----------------------------------------------------------------------------
static int IsLogCacheMiss(lua_State *L) {
- BS_Kernel *pKernel = BS_Kernel::GetInstance();
+ Kernel *pKernel = Kernel::GetInstance();
BS_ASSERT(pKernel);
- BS_ResourceManager *pResource = pKernel->GetResourceManager();
+ ResourceManager *pResource = pKernel->GetResourceManager();
BS_ASSERT(pResource);
lua_pushbooleancpp(L, pResource->IsLogCacheMiss());
@@ -597,9 +597,9 @@ static int IsLogCacheMiss(lua_State *L) {
// -----------------------------------------------------------------------------
static int SetLogCacheMiss(lua_State *L) {
- BS_Kernel *pKernel = BS_Kernel::GetInstance();
+ Kernel *pKernel = Kernel::GetInstance();
BS_ASSERT(pKernel);
- BS_ResourceManager *pResource = pKernel->GetResourceManager();
+ ResourceManager *pResource = pKernel->GetResourceManager();
BS_ASSERT(pResource);
pResource->SetLogCacheMiss(lua_tobooleancpp(L, 1));
@@ -610,9 +610,9 @@ static int SetLogCacheMiss(lua_State *L) {
// -----------------------------------------------------------------------------
static int DumpLockedResources(lua_State *L) {
- BS_Kernel *pKernel = BS_Kernel::GetInstance();
+ Kernel *pKernel = Kernel::GetInstance();
BS_ASSERT(pKernel);
- BS_ResourceManager *pResource = pKernel->GetResourceManager();
+ ResourceManager *pResource = pKernel->GetResourceManager();
BS_ASSERT(pResource);
pResource->DumpLockedResources();
@@ -639,7 +639,7 @@ static const luaL_reg RESOURCE_FUNCTIONS[] = {
// -----------------------------------------------------------------------------
static int ReloadSlots(lua_State *L) {
- BS_PersistenceService::GetInstance().ReloadSlots();
+ PersistenceService::GetInstance().ReloadSlots();
lua_pushnil(L);
return 1;
}
@@ -647,14 +647,14 @@ static int ReloadSlots(lua_State *L) {
// -----------------------------------------------------------------------------
static int GetSlotCount(lua_State *L) {
- lua_pushnumber(L, BS_PersistenceService::GetInstance().GetSlotCount());
+ lua_pushnumber(L, PersistenceService::GetInstance().GetSlotCount());
return 1;
}
// -----------------------------------------------------------------------------
static int IsSlotOccupied(lua_State *L) {
- lua_pushbooleancpp(L, BS_PersistenceService::GetInstance().IsSlotOccupied(
+ lua_pushbooleancpp(L, PersistenceService::GetInstance().IsSlotOccupied(
static_cast<unsigned int>(luaL_checknumber(L, 1)) - 1));
return 1;
}
@@ -662,14 +662,14 @@ static int IsSlotOccupied(lua_State *L) {
// -----------------------------------------------------------------------------
static int GetSavegameDirectory(lua_State *L) {
- lua_pushstring(L, BS_PersistenceService::GetInstance().GetSavegameDirectory().c_str());
+ lua_pushstring(L, PersistenceService::GetInstance().GetSavegameDirectory().c_str());
return 1;
}
// -----------------------------------------------------------------------------
static int IsSavegameCompatible(lua_State *L) {
- lua_pushbooleancpp(L, BS_PersistenceService::GetInstance().IsSavegameCompatible(
+ lua_pushbooleancpp(L, PersistenceService::GetInstance().IsSavegameCompatible(
static_cast<unsigned int>(luaL_checknumber(L, 1)) - 1));
return 1;
}
@@ -677,7 +677,7 @@ static int IsSavegameCompatible(lua_State *L) {
// -----------------------------------------------------------------------------
static int GetSavegameDescription(lua_State *L) {
- lua_pushstring(L, BS_PersistenceService::GetInstance().GetSavegameDescription(
+ lua_pushstring(L, PersistenceService::GetInstance().GetSavegameDescription(
static_cast<unsigned int>(luaL_checknumber(L, 1)) - 1).c_str());
return 1;
}
@@ -685,21 +685,21 @@ static int GetSavegameDescription(lua_State *L) {
// -----------------------------------------------------------------------------
static int GetSavegameFilename(lua_State *L) {
- lua_pushstring(L, BS_PersistenceService::GetInstance().GetSavegameFilename(static_cast<unsigned int>(luaL_checknumber(L, 1)) - 1).c_str());
+ lua_pushstring(L, PersistenceService::GetInstance().GetSavegameFilename(static_cast<unsigned int>(luaL_checknumber(L, 1)) - 1).c_str());
return 1;
}
// -----------------------------------------------------------------------------
static int LoadGame(lua_State *L) {
- lua_pushbooleancpp(L, BS_PersistenceService::GetInstance().LoadGame(static_cast<unsigned int>(luaL_checknumber(L, 1)) - 1));
+ lua_pushbooleancpp(L, PersistenceService::GetInstance().LoadGame(static_cast<unsigned int>(luaL_checknumber(L, 1)) - 1));
return 1;
}
// -----------------------------------------------------------------------------
static int SaveGame(lua_State *L) {
- lua_pushbooleancpp(L, BS_PersistenceService::GetInstance().SaveGame(static_cast<unsigned int>(luaL_checknumber(L, 1)) - 1, luaL_checkstring(L, 2)));
+ lua_pushbooleancpp(L, PersistenceService::GetInstance().SaveGame(static_cast<unsigned int>(luaL_checknumber(L, 1)) - 1, luaL_checkstring(L, 2)));
return 1;
}
@@ -722,7 +722,7 @@ static const luaL_reg PERSISTENCE_FUNCTIONS[] = {
// -----------------------------------------------------------------------------
-bool BS_Kernel::_RegisterScriptBindings() {
+bool Kernel::_RegisterScriptBindings() {
ScriptEngine *pScript = static_cast<ScriptEngine *>(GetService("script"));
BS_ASSERT(pScript);
lua_State *L = static_cast<lua_State *>(pScript->GetScriptObject());
diff --git a/engines/sword25/kernel/objectregistry.h b/engines/sword25/kernel/objectregistry.h
index befebfaedf..d6a53baf4d 100644
--- a/engines/sword25/kernel/objectregistry.h
+++ b/engines/sword25/kernel/objectregistry.h
@@ -51,10 +51,10 @@ namespace Sword25 {
// -----------------------------------------------------------------------------
template<typename T>
-class BS_ObjectRegistry {
+class ObjectRegistry {
public:
- BS_ObjectRegistry() : m_NextHandle(1) {}
- virtual ~BS_ObjectRegistry() {}
+ ObjectRegistry() : m_NextHandle(1) {}
+ virtual ~ObjectRegistry() {}
// -------------------------------------------------------------------------
diff --git a/engines/sword25/kernel/outputpersistenceblock.cpp b/engines/sword25/kernel/outputpersistenceblock.cpp
index 589e498408..3bf2b0ae20 100644
--- a/engines/sword25/kernel/outputpersistenceblock.cpp
+++ b/engines/sword25/kernel/outputpersistenceblock.cpp
@@ -54,7 +54,7 @@ namespace Sword25 {
// Construction / Destruction
// -----------------------------------------------------------------------------
-BS_OutputPersistenceBlock::BS_OutputPersistenceBlock() {
+OutputPersistenceBlock::OutputPersistenceBlock() {
m_Data.reserve(INITIAL_BUFFER_SIZE);
}
@@ -62,7 +62,7 @@ BS_OutputPersistenceBlock::BS_OutputPersistenceBlock() {
// Writing
// -----------------------------------------------------------------------------
-void BS_OutputPersistenceBlock::Write(signed int Value) {
+void OutputPersistenceBlock::Write(signed int Value) {
WriteMarker(SINT_MARKER);
Value = ConvertEndianessFromSystemToStorage(Value);
RawWrite(&Value, sizeof(Value));
@@ -70,7 +70,7 @@ void BS_OutputPersistenceBlock::Write(signed int Value) {
// -----------------------------------------------------------------------------
-void BS_OutputPersistenceBlock::Write(unsigned int Value) {
+void OutputPersistenceBlock::Write(unsigned int Value) {
WriteMarker(UINT_MARKER);
Value = ConvertEndianessFromSystemToStorage(Value);
RawWrite(&Value, sizeof(Value));
@@ -78,7 +78,7 @@ void BS_OutputPersistenceBlock::Write(unsigned int Value) {
// -----------------------------------------------------------------------------
-void BS_OutputPersistenceBlock::Write(float Value) {
+void OutputPersistenceBlock::Write(float Value) {
WriteMarker(FLOAT_MARKER);
Value = ConvertEndianessFromSystemToStorage(Value);
RawWrite(&Value, sizeof(Value));
@@ -86,7 +86,7 @@ void BS_OutputPersistenceBlock::Write(float Value) {
// -----------------------------------------------------------------------------
-void BS_OutputPersistenceBlock::Write(bool Value) {
+void OutputPersistenceBlock::Write(bool Value) {
WriteMarker(BOOL_MARKER);
unsigned int UIntBool = Value ? 1 : 0;
@@ -96,7 +96,7 @@ void BS_OutputPersistenceBlock::Write(bool Value) {
// -----------------------------------------------------------------------------
-void BS_OutputPersistenceBlock::Write(const Common::String &String) {
+void OutputPersistenceBlock::Write(const Common::String &String) {
WriteMarker(STRING_MARKER);
Write(String.size());
@@ -105,7 +105,7 @@ void BS_OutputPersistenceBlock::Write(const Common::String &String) {
// -----------------------------------------------------------------------------
-void BS_OutputPersistenceBlock::Write(const void *BufferPtr, size_t Size) {
+void OutputPersistenceBlock::Write(const void *BufferPtr, size_t Size) {
WriteMarker(BLOCK_MARKER);
Write(Size);
@@ -114,13 +114,13 @@ void BS_OutputPersistenceBlock::Write(const void *BufferPtr, size_t Size) {
// -----------------------------------------------------------------------------
-void BS_OutputPersistenceBlock::WriteMarker(unsigned char Marker) {
+void OutputPersistenceBlock::WriteMarker(unsigned char Marker) {
m_Data.push_back(Marker);
}
// -----------------------------------------------------------------------------
-void BS_OutputPersistenceBlock::RawWrite(const void *DataPtr, size_t Size) {
+void OutputPersistenceBlock::RawWrite(const void *DataPtr, size_t Size) {
if (Size > 0) {
unsigned int OldSize = m_Data.size();
m_Data.resize(OldSize + Size);
diff --git a/engines/sword25/kernel/outputpersistenceblock.h b/engines/sword25/kernel/outputpersistenceblock.h
index c13f86215d..3f93e28440 100644
--- a/engines/sword25/kernel/outputpersistenceblock.h
+++ b/engines/sword25/kernel/outputpersistenceblock.h
@@ -48,9 +48,9 @@ namespace Sword25 {
// Class declaration
// -----------------------------------------------------------------------------
-class BS_OutputPersistenceBlock : public BS_PersistenceBlock {
+class OutputPersistenceBlock : public PersistenceBlock {
public:
- BS_OutputPersistenceBlock();
+ OutputPersistenceBlock();
void Write(signed int Value);
void Write(unsigned int Value);
diff --git a/engines/sword25/kernel/persistable.h b/engines/sword25/kernel/persistable.h
index ff3bd9c098..020bd2477c 100644
--- a/engines/sword25/kernel/persistable.h
+++ b/engines/sword25/kernel/persistable.h
@@ -37,15 +37,15 @@
namespace Sword25 {
-class BS_OutputPersistenceBlock;
-class BS_InputPersistenceBlock;
+class OutputPersistenceBlock;
+class InputPersistenceBlock;
-class BS_Persistable {
+class Persistable {
public:
- virtual ~BS_Persistable() {};
+ virtual ~Persistable() {};
- virtual bool Persist(BS_OutputPersistenceBlock &Writer) = 0;
- virtual bool Unpersist(BS_InputPersistenceBlock &Reader) = 0;
+ virtual bool Persist(OutputPersistenceBlock &Writer) = 0;
+ virtual bool Unpersist(InputPersistenceBlock &Reader) = 0;
};
} // End of namespace Sword25
diff --git a/engines/sword25/kernel/persistenceblock.h b/engines/sword25/kernel/persistenceblock.h
index 71cf2135da..b12c86104a 100644
--- a/engines/sword25/kernel/persistenceblock.h
+++ b/engines/sword25/kernel/persistenceblock.h
@@ -47,7 +47,7 @@ namespace Sword25 {
// Class definition
// -----------------------------------------------------------------------------
-class BS_PersistenceBlock {
+class PersistenceBlock {
public:
static unsigned int GetSInt32Size() {
return sizeof(signed int) + sizeof(unsigned char);
diff --git a/engines/sword25/kernel/persistenceservice.cpp b/engines/sword25/kernel/persistenceservice.cpp
index dda570b1d2..9f37c3e963 100644
--- a/engines/sword25/kernel/persistenceservice.cpp
+++ b/engines/sword25/kernel/persistenceservice.cpp
@@ -78,8 +78,8 @@ Common::String GenerateSavegameFilename(unsigned int SlotID) {
Common::String GenerateSavegamePath(unsigned int SlotID) {
Common::String oss;
- oss = BS_PersistenceService::GetSavegameDirectory();
- oss += BS_FileSystemUtil::GetInstance().GetPathSeparator();
+ oss = PersistenceService::GetSavegameDirectory();
+ oss += FileSystemUtil::GetInstance().GetPathSeparator();
oss += GenerateSavegameFilename(SlotID);
return oss;
}
@@ -145,7 +145,7 @@ struct SavegameInformation {
}
};
-struct BS_PersistenceService::Impl {
+struct PersistenceService::Impl {
SavegameInformation m_SavegameInformations[SLOT_COUNT];
// -----------------------------------------------------------------------------
@@ -172,7 +172,7 @@ struct BS_PersistenceService::Impl {
Common::String Filename = GenerateSavegamePath(SlotID);
// Feststellen, ob eine Spielstanddatei dieses Namens existiert.
- if (BS_FileSystemUtil::GetInstance().FileExists(Filename)) {
+ if (FileSystemUtil::GetInstance().FileExists(Filename)) {
// Read in the game
Common::SaveFileManager *sfm = g_system->getSavefileManager();
Common::InSaveFile *File = sfm->openForLoading(Filename);
@@ -193,7 +193,7 @@ struct BS_PersistenceService::Impl {
// Dateinamen des Spielstandes speichern.
CurSavegameInfo.Filename = GenerateSavegameFilename(SlotID);
// Die Beschreibung des Spielstandes besteht aus einer textuellen Darstellung des Änderungsdatums der Spielstanddatei.
- CurSavegameInfo.Description = FormatTimestamp(BS_FileSystemUtil::GetInstance().GetFileTime(Filename));
+ CurSavegameInfo.Description = FormatTimestamp(FileSystemUtil::GetInstance().GetFileTime(Filename));
// Den Offset zu den gespeicherten Spieldaten innerhalb der Datei speichern.
// Dieses entspricht der aktuellen Position + 1, da nach der letzten Headerinformation noch ein Leerzeichen als trenner folgt.
CurSavegameInfo.GamedataOffset = static_cast<unsigned int>(File->pos()) + 1;
@@ -209,19 +209,19 @@ struct BS_PersistenceService::Impl {
// Construction / Destruction
// -----------------------------------------------------------------------------
-BS_PersistenceService &BS_PersistenceService::GetInstance() {
- static BS_PersistenceService Instance;
+PersistenceService &PersistenceService::GetInstance() {
+ static PersistenceService Instance;
return Instance;
}
// -----------------------------------------------------------------------------
-BS_PersistenceService::BS_PersistenceService() : m_impl(new Impl) {
+PersistenceService::PersistenceService() : m_impl(new Impl) {
}
// -----------------------------------------------------------------------------
-BS_PersistenceService::~BS_PersistenceService() {
+PersistenceService::~PersistenceService() {
delete m_impl;
}
@@ -229,20 +229,20 @@ BS_PersistenceService::~BS_PersistenceService() {
// Implementation
// -----------------------------------------------------------------------------
-void BS_PersistenceService::ReloadSlots() {
+void PersistenceService::ReloadSlots() {
m_impl->ReloadSlots();
}
// -----------------------------------------------------------------------------
-unsigned int BS_PersistenceService::GetSlotCount() {
+unsigned int PersistenceService::GetSlotCount() {
return SLOT_COUNT;
}
// -----------------------------------------------------------------------------
-Common::String BS_PersistenceService::GetSavegameDirectory() {
- return BS_FileSystemUtil::GetInstance().GetUserdataDirectory() + BS_FileSystemUtil::GetInstance().GetPathSeparator() + SAVEGAME_DIRECTORY;
+Common::String PersistenceService::GetSavegameDirectory() {
+ return FileSystemUtil::GetInstance().GetUserdataDirectory() + FileSystemUtil::GetInstance().GetPathSeparator() + SAVEGAME_DIRECTORY;
}
// -----------------------------------------------------------------------------
@@ -261,21 +261,21 @@ bool CheckSlotID(unsigned int SlotID) {
// -----------------------------------------------------------------------------
-bool BS_PersistenceService::IsSlotOccupied(unsigned int SlotID) {
+bool PersistenceService::IsSlotOccupied(unsigned int SlotID) {
if (!CheckSlotID(SlotID)) return false;
return m_impl->m_SavegameInformations[SlotID].IsOccupied;
}
// -----------------------------------------------------------------------------
-bool BS_PersistenceService::IsSavegameCompatible(unsigned int SlotID) {
+bool PersistenceService::IsSavegameCompatible(unsigned int SlotID) {
if (!CheckSlotID(SlotID)) return false;
return m_impl->m_SavegameInformations[SlotID].IsCompatible;
}
// -----------------------------------------------------------------------------
-Common::String &BS_PersistenceService::GetSavegameDescription(unsigned int SlotID) {
+Common::String &PersistenceService::GetSavegameDescription(unsigned int SlotID) {
static Common::String EmptyString;
if (!CheckSlotID(SlotID)) return EmptyString;
return m_impl->m_SavegameInformations[SlotID].Description;
@@ -283,7 +283,7 @@ Common::String &BS_PersistenceService::GetSavegameDescription(unsigned int SlotI
// -----------------------------------------------------------------------------
-Common::String &BS_PersistenceService::GetSavegameFilename(unsigned int SlotID) {
+Common::String &PersistenceService::GetSavegameFilename(unsigned int SlotID) {
static Common::String EmptyString;
if (!CheckSlotID(SlotID)) return EmptyString;
return m_impl->m_SavegameInformations[SlotID].Filename;
@@ -291,7 +291,7 @@ Common::String &BS_PersistenceService::GetSavegameFilename(unsigned int SlotID)
// -----------------------------------------------------------------------------
-bool BS_PersistenceService::SaveGame(unsigned int SlotID, const Common::String &ScreenshotFilename) {
+bool PersistenceService::SaveGame(unsigned int SlotID, const Common::String &ScreenshotFilename) {
// Überprüfen, ob die Slot-ID zulässig ist.
if (SlotID >= SLOT_COUNT) {
BS_LOG_ERRORLN("Tried to save to an invalid slot (%d). Only slot ids form 0 to %d are allowed.", SlotID, SLOT_COUNT - 1);
@@ -302,7 +302,7 @@ bool BS_PersistenceService::SaveGame(unsigned int SlotID, const Common::String &
Common::String Filename = GenerateSavegamePath(SlotID).c_str();
// Sicherstellen, dass das Verzeichnis für die Spielstanddateien existiert.
- BS_FileSystemUtil::GetInstance().CreateDirectory(GetSavegameDirectory());
+ FileSystemUtil::GetInstance().CreateDirectory(GetSavegameDirectory());
// Spielstanddatei öffnen und die Headerdaten schreiben.
Common::SaveFileManager *sfm = g_system->getSavefileManager();
@@ -318,13 +318,13 @@ bool BS_PersistenceService::SaveGame(unsigned int SlotID, const Common::String &
}
// Alle notwendigen Module persistieren.
- BS_OutputPersistenceBlock Writer;
+ OutputPersistenceBlock Writer;
bool Success = true;
- Success &= BS_Kernel::GetInstance()->GetScript()->Persist(Writer);
+ Success &= Kernel::GetInstance()->GetScript()->Persist(Writer);
Success &= RegionRegistry::GetInstance().Persist(Writer);
- Success &= BS_Kernel::GetInstance()->GetGfx()->Persist(Writer);
- Success &= BS_Kernel::GetInstance()->GetSfx()->Persist(Writer);
- Success &= BS_Kernel::GetInstance()->GetInput()->Persist(Writer);
+ Success &= Kernel::GetInstance()->GetGfx()->Persist(Writer);
+ Success &= Kernel::GetInstance()->GetSfx()->Persist(Writer);
+ Success &= Kernel::GetInstance()->GetInput()->Persist(Writer);
if (!Success) {
error("Unable to persist modules for savegame file \"%s\".", Filename.c_str());
}
@@ -353,7 +353,7 @@ bool BS_PersistenceService::SaveGame(unsigned int SlotID, const Common::String &
}
// Screenshotdatei an die Datei anfügen.
- if (BS_FileSystemUtil::GetInstance().FileExists(ScreenshotFilename)) {
+ if (FileSystemUtil::GetInstance().FileExists(ScreenshotFilename)) {
Common::File ScreenshotFile;
if (!ScreenshotFile.open(ScreenshotFilename.c_str()))
error("Unable to load screenshot file");
@@ -378,7 +378,7 @@ bool BS_PersistenceService::SaveGame(unsigned int SlotID, const Common::String &
// -----------------------------------------------------------------------------
-bool BS_PersistenceService::LoadGame(unsigned int SlotID) {
+bool PersistenceService::LoadGame(unsigned int SlotID) {
Common::SaveFileManager *sfm = g_system->getSavefileManager();
Common::InSaveFile *File;
@@ -431,16 +431,16 @@ bool BS_PersistenceService::LoadGame(unsigned int SlotID) {
return false;
}
- BS_InputPersistenceBlock Reader(&UncompressedDataBuffer[0], CurSavegameInfo.GamedataUncompressedLength);
+ InputPersistenceBlock Reader(&UncompressedDataBuffer[0], CurSavegameInfo.GamedataUncompressedLength);
// Einzelne Engine-Module depersistieren.
bool Success = true;
- Success &= BS_Kernel::GetInstance()->GetScript()->Unpersist(Reader);
+ Success &= Kernel::GetInstance()->GetScript()->Unpersist(Reader);
// Muss unbedingt nach Script passieren. Da sonst die bereits wiederhergestellten Regions per Garbage-Collection gekillt werden.
Success &= RegionRegistry::GetInstance().Unpersist(Reader);
- Success &= BS_Kernel::GetInstance()->GetGfx()->Unpersist(Reader);
- Success &= BS_Kernel::GetInstance()->GetSfx()->Unpersist(Reader);
- Success &= BS_Kernel::GetInstance()->GetInput()->Unpersist(Reader);
+ Success &= Kernel::GetInstance()->GetGfx()->Unpersist(Reader);
+ Success &= Kernel::GetInstance()->GetSfx()->Unpersist(Reader);
+ Success &= Kernel::GetInstance()->GetInput()->Unpersist(Reader);
delete[] CompressedDataBuffer;
delete[] UncompressedDataBuffer;
diff --git a/engines/sword25/kernel/persistenceservice.h b/engines/sword25/kernel/persistenceservice.h
index 15fb15c7ec..06d5422d46 100644
--- a/engines/sword25/kernel/persistenceservice.h
+++ b/engines/sword25/kernel/persistenceservice.h
@@ -47,16 +47,16 @@ namespace Sword25 {
// Class declaration
// -----------------------------------------------------------------------------
-class BS_PersistenceService {
+class PersistenceService {
public:
- BS_PersistenceService();
- virtual ~BS_PersistenceService();
+ PersistenceService();
+ virtual ~PersistenceService();
// -----------------------------------------------------------------------------
// Singleton Method
// -----------------------------------------------------------------------------
- static BS_PersistenceService &GetInstance();
+ static PersistenceService &GetInstance();
// -----------------------------------------------------------------------------
// Interface
diff --git a/engines/sword25/kernel/resmanager.cpp b/engines/sword25/kernel/resmanager.cpp
index 1f9fb69230..b6c70cd0ad 100644
--- a/engines/sword25/kernel/resmanager.cpp
+++ b/engines/sword25/kernel/resmanager.cpp
@@ -43,12 +43,12 @@ namespace Sword25 {
#define BS_LOG_PREFIX "RESOURCEMANAGER"
-BS_ResourceManager::~BS_ResourceManager() {
+ResourceManager::~ResourceManager() {
// Clear all unlocked resources
EmptyCache();
// All remaining resources are not released, so print warnings and release
- Common::List<BS_Resource *>::iterator Iter = m_Resources.begin();
+ Common::List<Resource *>::iterator Iter = m_Resources.begin();
for (; Iter != m_Resources.end(); ++Iter) {
BS_LOG_WARNINGLN("Resource \"%s\" was not released.", (*Iter)->GetFileName().c_str());
@@ -67,7 +67,7 @@ BS_ResourceManager::~BS_ResourceManager() {
* Note: This method is not optimised for speed and should be used only for debugging purposes
* @param Ord Ordinal number of the resource. Must be between 0 and GetResourceCount() - 1.
*/
-BS_Resource *BS_ResourceManager::GetResourceByOrdinal(int Ord) const {
+Resource *ResourceManager::GetResourceByOrdinal(int Ord) const {
// Überprüfen ob der Index Ord innerhald der Listengrenzen liegt.
if (Ord < 0 || Ord >= GetResourceCount()) {
BS_LOG_ERRORLN("Resource ordinal (%d) out of bounds (0 - %d).", Ord, GetResourceCount() - 1);
@@ -76,7 +76,7 @@ BS_Resource *BS_ResourceManager::GetResourceByOrdinal(int Ord) const {
// Liste durchlaufen und die Resource mit dem gewünschten Index zurückgeben.
int CurOrd = 0;
- Common::List<BS_Resource *>::const_iterator Iter = m_Resources.begin();
+ Common::List<Resource *>::const_iterator Iter = m_Resources.begin();
for (; Iter != m_Resources.end(); ++Iter, ++CurOrd) {
if (CurOrd == Ord)
return (*Iter);
@@ -92,7 +92,7 @@ BS_Resource *BS_ResourceManager::GetResourceByOrdinal(int Ord) const {
* BS_ResourceService, and thus helps all resource services in the ResourceManager list
* @param pService Which service
*/
-bool BS_ResourceManager::RegisterResourceService(BS_ResourceService *pService) {
+bool ResourceManager::RegisterResourceService(ResourceService *pService) {
if (!pService) {
BS_LOG_ERRORLN("Can't register NULL resource service.");
return false;
@@ -106,14 +106,14 @@ bool BS_ResourceManager::RegisterResourceService(BS_ResourceService *pService) {
/**
* Deletes resources as necessary until the specified memory limit is not being exceeded.
*/
-void BS_ResourceManager::DeleteResourcesIfNecessary() {
+void ResourceManager::DeleteResourcesIfNecessary() {
// If enough memory is available, or no resources are loaded, then the function can immediately end
if (m_KernelPtr->GetUsedMemory() < m_MaxMemoryUsage || m_Resources.empty()) return;
// Keep deleting resources until the memory usage of the process falls below the set maximum limit.
// The list is processed backwards in order to first release those resources who have been
// not been accessed for the longest
- Common::List<BS_Resource *>::iterator Iter = m_Resources.end();
+ Common::List<Resource *>::iterator Iter = m_Resources.end();
do {
--Iter;
@@ -125,9 +125,9 @@ void BS_ResourceManager::DeleteResourcesIfNecessary() {
/**
* Releases all resources that are not locked.
**/
-void BS_ResourceManager::EmptyCache() {
+void ResourceManager::EmptyCache() {
// Scan through the resource list
- Common::List<BS_Resource *>::iterator Iter = m_Resources.begin();
+ Common::List<Resource *>::iterator Iter = m_Resources.begin();
while (Iter != m_Resources.end()) {
if ((*Iter)->GetLockCount() == 0) {
// Delete the resource
@@ -141,7 +141,7 @@ void BS_ResourceManager::EmptyCache() {
* Returns a requested resource. If any error occurs, returns NULL
* @param FileName Filename of resource
*/
-BS_Resource *BS_ResourceManager::RequestResource(const Common::String &FileName) {
+Resource *ResourceManager::RequestResource(const Common::String &FileName) {
// Get the absolute path to the file
Common::String UniqueFileName = GetUniqueFileName(FileName);
if (UniqueFileName == "")
@@ -150,7 +150,7 @@ BS_Resource *BS_ResourceManager::RequestResource(const Common::String &FileName)
// Determine whether the resource is already loaded
// If the resource is found, it will be placed at the head of the resource list and returned
{
- BS_Resource *pResource = GetResource(UniqueFileName);
+ Resource *pResource = GetResource(UniqueFileName);
if (pResource) {
MoveToFront(pResource);
(pResource)->AddReference();
@@ -161,7 +161,7 @@ BS_Resource *BS_ResourceManager::RequestResource(const Common::String &FileName)
// The resource was not found, therefore, must not be loaded yet
if (m_LogCacheMiss) BS_LOG_WARNINGLN("\"%s\" was not precached.", UniqueFileName.c_str());
- BS_Resource *pResource;
+ Resource *pResource;
if ((pResource = LoadResource(UniqueFileName))) {
pResource->AddReference();
return pResource;
@@ -176,13 +176,13 @@ BS_Resource *BS_ResourceManager::RequestResource(const Common::String &FileName)
* @param ForceReload Indicates whether the file should be reloaded if it's already in the cache.
* This is useful for files that may have changed in the interim
*/
-bool BS_ResourceManager::PrecacheResource(const Common::String &FileName, bool ForceReload) {
+bool ResourceManager::PrecacheResource(const Common::String &FileName, bool ForceReload) {
// Get the absolute path to the file
Common::String UniqueFileName = GetUniqueFileName(FileName);
if (UniqueFileName == "")
return false;
- BS_Resource *ResourcePtr = GetResource(UniqueFileName);
+ Resource *ResourcePtr = GetResource(UniqueFileName);
if (ForceReload && ResourcePtr) {
if (ResourcePtr->GetLockCount()) {
@@ -206,7 +206,7 @@ bool BS_ResourceManager::PrecacheResource(const Common::String &FileName, bool F
* Moves a resource to the top of the resource list
* @param pResource The resource
*/
-void BS_ResourceManager::MoveToFront(BS_Resource *pResource) {
+void ResourceManager::MoveToFront(Resource *pResource) {
// Erase the resource from it's current position
m_Resources.erase(pResource->_Iterator);
// Re-add the resource at the front of the list
@@ -221,7 +221,7 @@ void BS_ResourceManager::MoveToFront(BS_Resource *pResource) {
* The resource must not already be loaded
* @param FileName The unique filename of the resource to be loaded
*/
-BS_Resource *BS_ResourceManager::LoadResource(const Common::String &FileName) {
+Resource *ResourceManager::LoadResource(const Common::String &FileName) {
// ResourceService finden, der die Resource laden kann.
for (unsigned int i = 0; i < m_ResourceServices.size(); ++i) {
if (m_ResourceServices[i]->CanLoadResource(FileName)) {
@@ -229,7 +229,7 @@ BS_Resource *BS_ResourceManager::LoadResource(const Common::String &FileName) {
DeleteResourcesIfNecessary();
// Load the resource
- BS_Resource *pResource;
+ Resource *pResource;
if (!(pResource = m_ResourceServices[i]->LoadResource(FileName))) {
BS_LOG_ERRORLN("Responsible service could not load resource \"%s\".", FileName.c_str());
return NULL;
@@ -254,7 +254,7 @@ BS_Resource *BS_ResourceManager::LoadResource(const Common::String &FileName) {
* Returns the full path of a given resource filename.
* It will return an empty string if a path could not be created.
*/
-Common::String BS_ResourceManager::GetUniqueFileName(const Common::String &FileName) const {
+Common::String ResourceManager::GetUniqueFileName(const Common::String &FileName) const {
// Get a pointer to the package manager
PackageManager *pPackage = (PackageManager *)m_KernelPtr->GetService("package");
if (!pPackage) {
@@ -273,14 +273,14 @@ Common::String BS_ResourceManager::GetUniqueFileName(const Common::String &FileN
/**
* Deletes a resource, removes it from the lists, and updates m_UsedMemory
*/
-Common::List<BS_Resource *>::iterator BS_ResourceManager::DeleteResource(BS_Resource *pResource) {
+Common::List<Resource *>::iterator ResourceManager::DeleteResource(Resource *pResource) {
// Remove the resource from the hash table
m_ResourceHashTable[pResource->GetFileNameHash() % HASH_TABLE_BUCKETS].remove(pResource);
- BS_Resource *pDummy = pResource;
+ Resource *pDummy = pResource;
// Delete the resource from the resource list
- Common::List<BS_Resource *>::iterator Result = m_Resources.erase(pResource->_Iterator);
+ Common::List<Resource *>::iterator Result = m_Resources.erase(pResource->_Iterator);
// Delete the resource
delete(pDummy);
@@ -294,12 +294,12 @@ Common::List<BS_Resource *>::iterator BS_ResourceManager::DeleteResource(BS_Reso
* @param UniqueFileName The absolute path and filename
* Gibt einen Pointer auf die angeforderte Resource zurück, oder NULL, wenn die Resourcen nicht geladen ist.
*/
-BS_Resource *BS_ResourceManager::GetResource(const Common::String &UniqueFileName) const {
+Resource *ResourceManager::GetResource(const Common::String &UniqueFileName) const {
// Determine whether the resource is already loaded
- const Common::List<BS_Resource *>& HashBucket = m_ResourceHashTable[
+ const Common::List<Resource *>& HashBucket = m_ResourceHashTable[
BS_String::GetHash(UniqueFileName) % HASH_TABLE_BUCKETS];
{
- Common::List<BS_Resource *>::const_iterator Iter = HashBucket.begin();
+ Common::List<Resource *>::const_iterator Iter = HashBucket.begin();
for (; Iter != HashBucket.end(); ++Iter) {
// Wenn die Resource gefunden wurde wird sie zurückgegeben.
if ((*Iter)->GetFileName() == UniqueFileName)
@@ -314,8 +314,8 @@ BS_Resource *BS_ResourceManager::GetResource(const Common::String &UniqueFileNam
/**
* Writes the names of all currently locked resources to the log file
*/
-void BS_ResourceManager::DumpLockedResources() {
- for (Common::List<BS_Resource *>::iterator Iter = m_Resources.begin(); Iter != m_Resources.end(); ++Iter) {
+void ResourceManager::DumpLockedResources() {
+ for (Common::List<Resource *>::iterator Iter = m_Resources.begin(); Iter != m_Resources.end(); ++Iter) {
if ((*Iter)->GetLockCount() > 0) {
BS_LOGLN("%s", (*Iter)->GetFileName().c_str());
}
@@ -328,7 +328,7 @@ void BS_ResourceManager::DumpLockedResources() {
* as a guideline, and not as a fixed boundary. It is not guaranteed not to be exceeded;
* the whole game engine may still use more memory than any amount specified.
*/
-void BS_ResourceManager::SetMaxMemoryUsage(unsigned int MaxMemoryUsage) {
+void ResourceManager::SetMaxMemoryUsage(unsigned int MaxMemoryUsage) {
m_MaxMemoryUsage = MaxMemoryUsage;
DeleteResourcesIfNecessary();
}
diff --git a/engines/sword25/kernel/resmanager.h b/engines/sword25/kernel/resmanager.h
index e642e54055..47c920ce6b 100644
--- a/engines/sword25/kernel/resmanager.h
+++ b/engines/sword25/kernel/resmanager.h
@@ -43,19 +43,19 @@
namespace Sword25 {
// Class definitions
-class BS_ResourceService;
-class BS_Resource;
-class BS_Kernel;
+class ResourceService;
+class Resource;
+class Kernel;
-class BS_ResourceManager {
- friend class BS_Kernel;
+class ResourceManager {
+ friend class Kernel;
public:
/**
* Returns a requested resource. If any error occurs, returns NULL
* @param FileName Filename of resource
*/
- BS_Resource *RequestResource(const Common::String &FileName);
+ Resource *RequestResource(const Common::String &FileName);
/**
* Loads a resource into the cache
@@ -77,14 +77,14 @@ public:
* Note: This method is not optimised for speed and should be used only for debugging purposes
* @param Ord Ordinal number of the resource. Must be between 0 and GetResourceCount() - 1.
*/
- BS_Resource *GetResourceByOrdinal(int Ord) const;
+ Resource *GetResourceByOrdinal(int Ord) const;
/**
* Registers a RegisterResourceService. This method is the constructor of
* BS_ResourceService, and thus helps all resource services in the ResourceManager list
* @param pService Which service
*/
- bool RegisterResourceService(BS_ResourceService *pService);
+ bool RegisterResourceService(ResourceService *pService);
/**
* Releases all resources that are not locked.
@@ -132,12 +132,12 @@ private:
* Creates a new resource manager
* Only the BS_Kernel class can generate copies this class. Thus, the constructor is private
*/
- BS_ResourceManager(BS_Kernel *pKernel) :
+ ResourceManager(Kernel *pKernel) :
m_KernelPtr(pKernel),
m_MaxMemoryUsage(100000000),
m_LogCacheMiss(false)
{};
- virtual ~BS_ResourceManager();
+ virtual ~ResourceManager();
enum {
HASH_TABLE_BUCKETS = 256
@@ -147,7 +147,7 @@ private:
* Moves a resource to the top of the resource list
* @param pResource The resource
*/
- void MoveToFront(BS_Resource *pResource);
+ void MoveToFront(Resource *pResource);
/**
* Loads a resource and updates the m_UsedMemory total
@@ -155,7 +155,7 @@ private:
* The resource must not already be loaded
* @param FileName The unique filename of the resource to be loaded
*/
- BS_Resource *LoadResource(const Common::String &FileName);
+ Resource *LoadResource(const Common::String &FileName);
/**
* Returns the full path of a given resource filename.
@@ -166,25 +166,25 @@ private:
/**
* Deletes a resource, removes it from the lists, and updates m_UsedMemory
*/
- Common::List<BS_Resource *>::iterator DeleteResource(BS_Resource *pResource);
+ Common::List<Resource *>::iterator DeleteResource(Resource *pResource);
/**
* Returns a pointer to a loaded resource. If any error occurs, NULL will be returned.
* @param UniqueFileName The absolute path and filename
* Gibt einen Pointer auf die angeforderte Resource zurück, oder NULL, wenn die Resourcen nicht geladen ist.
*/
- BS_Resource *GetResource(const Common::String &UniqueFileName) const;
+ Resource *GetResource(const Common::String &UniqueFileName) const;
/**
* Deletes resources as necessary until the specified memory limit is not being exceeded.
*/
void DeleteResourcesIfNecessary();
- BS_Kernel *m_KernelPtr;
+ Kernel *m_KernelPtr;
unsigned int m_MaxMemoryUsage;
- Common::Array<BS_ResourceService *> m_ResourceServices;
- Common::List<BS_Resource *> m_Resources;
- Common::List<BS_Resource *> m_ResourceHashTable[HASH_TABLE_BUCKETS];
+ Common::Array<ResourceService *> m_ResourceServices;
+ Common::List<Resource *> m_Resources;
+ Common::List<Resource *> m_ResourceHashTable[HASH_TABLE_BUCKETS];
bool m_LogCacheMiss;
};
diff --git a/engines/sword25/kernel/resource.cpp b/engines/sword25/kernel/resource.cpp
index 2223d1b965..9456270034 100644
--- a/engines/sword25/kernel/resource.cpp
+++ b/engines/sword25/kernel/resource.cpp
@@ -41,16 +41,16 @@ namespace Sword25 {
#define BS_LOG_PREFIX "RESOURCE"
-BS_Resource::BS_Resource(const Common::String &FileName, RESOURCE_TYPES Type) :
+Resource::Resource(const Common::String &FileName, RESOURCE_TYPES Type) :
_Type(Type),
_RefCount(0) {
- BS_ASSERT(BS_Kernel::GetInstance()->GetService("package"));
+ BS_ASSERT(Kernel::GetInstance()->GetService("package"));
- _FileName = static_cast<PackageManager *>(BS_Kernel::GetInstance()->GetService("package"))->GetAbsolutePath(FileName);
+ _FileName = static_cast<PackageManager *>(Kernel::GetInstance()->GetService("package"))->GetAbsolutePath(FileName);
_FileNameHash = BS_String::GetHash(FileName);
}
-void BS_Resource::Release() {
+void Resource::Release() {
if (_RefCount) {
--_RefCount;
} else
diff --git a/engines/sword25/kernel/resource.h b/engines/sword25/kernel/resource.h
index 4653eab149..7d696ec198 100644
--- a/engines/sword25/kernel/resource.h
+++ b/engines/sword25/kernel/resource.h
@@ -41,11 +41,11 @@
namespace Sword25 {
-class BS_Kernel;
-class BS_ResourceManager;
+class Kernel;
+class ResourceManager;
-class BS_Resource {
- friend class BS_ResourceManager;
+class Resource {
+ friend class ResourceManager;
public:
enum RESOURCE_TYPES {
@@ -56,7 +56,7 @@ public:
TYPE_FONT
};
- BS_Resource(const Common::String &UniqueFileName, RESOURCE_TYPES Type);
+ Resource(const Common::String &UniqueFileName, RESOURCE_TYPES Type);
/**
* Prevents the resource from being released.
@@ -103,14 +103,14 @@ public:
}
protected:
- virtual ~BS_Resource() {};
+ virtual ~Resource() {};
private:
Common::String _FileName; ///< The absolute filename
unsigned int _FileNameHash; ///< The hash value of the filename
unsigned int _RefCount; ///< The number of locks
unsigned int _Type; ///< The type of the resource
- Common::List<BS_Resource *>::iterator _Iterator; ///< Points to the resource position in the LRU list
+ Common::List<Resource *>::iterator _Iterator; ///< Points to the resource position in the LRU list
};
} // End of namespace Sword25
diff --git a/engines/sword25/kernel/resservice.h b/engines/sword25/kernel/resservice.h
index 2197d283bf..2fbadda054 100644
--- a/engines/sword25/kernel/resservice.h
+++ b/engines/sword25/kernel/resservice.h
@@ -43,23 +43,23 @@
namespace Sword25 {
-class BS_Resource;
+class Resource;
-class BS_ResourceService : public BS_Service {
+class ResourceService : public Service {
public:
- BS_ResourceService(BS_Kernel *pKernel) : BS_Service(pKernel) {
- BS_ResourceManager *pResource = pKernel->GetResourceManager();
+ ResourceService(Kernel *pKernel) : Service(pKernel) {
+ ResourceManager *pResource = pKernel->GetResourceManager();
pResource->RegisterResourceService(this);
}
- virtual ~BS_ResourceService() {}
+ virtual ~ResourceService() {}
/**
* Loads a resource
* @return Returns the resource if successful, otherwise NULL
*/
- virtual BS_Resource *LoadResource(const Common::String &FileName) = 0;
+ virtual Resource *LoadResource(const Common::String &FileName) = 0;
/**
* Checks whether the given name can be loaded by the resource service
diff --git a/engines/sword25/kernel/scummvmwindow.cpp b/engines/sword25/kernel/scummvmwindow.cpp
index 2b4e820160..e4102945b2 100644
--- a/engines/sword25/kernel/scummvmwindow.cpp
+++ b/engines/sword25/kernel/scummvmwindow.cpp
@@ -43,11 +43,11 @@
namespace Sword25 {
-bool BS_ScummVMWindow::_ClassRegistered = false;
+bool ScummVMWindow::_ClassRegistered = false;
// Constructor / Destructor
// ------------------------
-BS_ScummVMWindow::BS_ScummVMWindow(int X, int Y, int Width, int Height, bool Visible) {
+ScummVMWindow::ScummVMWindow(int X, int Y, int Width, int Height, bool Visible) {
// Presume that init will fail
_InitSuccess = false;
@@ -70,53 +70,53 @@ BS_ScummVMWindow::BS_ScummVMWindow(int X, int Y, int Width, int Height, bool Vis
_CloseWanted = false;
}
-BS_ScummVMWindow::~BS_ScummVMWindow() {
+ScummVMWindow::~ScummVMWindow() {
}
// Get Methods
// ------------
-int BS_ScummVMWindow::GetX() {
+int ScummVMWindow::GetX() {
return 0;
}
-int BS_ScummVMWindow::GetY() {
+int ScummVMWindow::GetY() {
return 0;
}
-int BS_ScummVMWindow::GetClientX() {
+int ScummVMWindow::GetClientX() {
return 0;
}
-int BS_ScummVMWindow::GetClientY() {
+int ScummVMWindow::GetClientY() {
return 0;
}
-int BS_ScummVMWindow::GetWidth() {
+int ScummVMWindow::GetWidth() {
return g_system->getWidth();
}
-int BS_ScummVMWindow::GetHeight() {
+int ScummVMWindow::GetHeight() {
return g_system->getHeight();
}
-Common::String BS_ScummVMWindow::GetTitle() {
+Common::String ScummVMWindow::GetTitle() {
return Common::String("");
}
-bool BS_ScummVMWindow::IsVisible() {
+bool ScummVMWindow::IsVisible() {
return true;
}
-bool BS_ScummVMWindow::HasFocus() {
+bool ScummVMWindow::HasFocus() {
// FIXME: Is there a way to tell if ScummVM has the focus in Windowed mode?
return true;
}
-uint BS_ScummVMWindow::GetWindowHandle() {
+uint ScummVMWindow::GetWindowHandle() {
return 0;
}
-void BS_ScummVMWindow::SetWindowAlive(bool v) {
+void ScummVMWindow::SetWindowAlive(bool v) {
_WindowAlive = v;
}
@@ -124,36 +124,36 @@ void BS_ScummVMWindow::SetWindowAlive(bool v) {
// Set Methods
// ------------
-void BS_ScummVMWindow::SetX(int X) {
+void ScummVMWindow::SetX(int X) {
// No implementation
}
-void BS_ScummVMWindow::SetY(int Y) {
+void ScummVMWindow::SetY(int Y) {
// No implementation
}
-void BS_ScummVMWindow::SetWidth(int Width) {
+void ScummVMWindow::SetWidth(int Width) {
// No implementation
}
-void BS_ScummVMWindow::SetHeight(int Height) {
+void ScummVMWindow::SetHeight(int Height) {
// No implementation
}
-void BS_ScummVMWindow::SetVisible(bool Visible) {
+void ScummVMWindow::SetVisible(bool Visible) {
// No implementation
}
-void BS_ScummVMWindow::SetTitle(const Common::String &Title) {
+void ScummVMWindow::SetTitle(const Common::String &Title) {
// No implementation
}
-bool BS_ScummVMWindow::ProcessMessages() {
+bool ScummVMWindow::ProcessMessages() {
// No implementation
return false;
}
-bool BS_ScummVMWindow::WaitForFocus() {
+bool ScummVMWindow::WaitForFocus() {
// No implementation
return true;
}
diff --git a/engines/sword25/kernel/scummvmwindow.h b/engines/sword25/kernel/scummvmwindow.h
index 57d9a7e2f9..2b5f514b7d 100644
--- a/engines/sword25/kernel/scummvmwindow.h
+++ b/engines/sword25/kernel/scummvmwindow.h
@@ -48,10 +48,10 @@
namespace Sword25 {
// Class definition
-class BS_ScummVMWindow : public BS_Window {
+class ScummVMWindow : public Window {
public:
- BS_ScummVMWindow(int X, int Y, int Width, int Height, bool Visible);
- virtual ~BS_ScummVMWindow();
+ ScummVMWindow(int X, int Y, int Width, int Height, bool Visible);
+ virtual ~ScummVMWindow();
bool IsVisible();
void SetVisible(bool Visible);
diff --git a/engines/sword25/kernel/service.h b/engines/sword25/kernel/service.h
index 0afcb05f11..addcf50a08 100644
--- a/engines/sword25/kernel/service.h
+++ b/engines/sword25/kernel/service.h
@@ -53,21 +53,21 @@
namespace Sword25 {
// Klassendefinition
-class BS_Kernel;
+class Kernel;
-class BS_Service {
+class Service {
private:
- BS_Kernel *_pKernel;
+ Kernel *_pKernel;
protected:
- BS_Service(BS_Kernel *pKernel) : _pKernel(pKernel) {};
+ Service(Kernel *pKernel) : _pKernel(pKernel) {};
- BS_Kernel *GetKernel() const {
+ Kernel *GetKernel() const {
return _pKernel;
}
public:
- virtual ~BS_Service() {};
+ virtual ~Service() {};
};
} // End of namespace Sword25
diff --git a/engines/sword25/kernel/service_ids.h b/engines/sword25/kernel/service_ids.h
index 1135317cb2..ee8221b69a 100644
--- a/engines/sword25/kernel/service_ids.h
+++ b/engines/sword25/kernel/service_ids.h
@@ -49,13 +49,13 @@
namespace Sword25 {
-BS_Service *OpenGLGfx_CreateObject(BS_Kernel *pKernel);
-BS_Service *ScummVMPackageManager_CreateObject(BS_Kernel *pKernel);
-BS_Service *ScummVMInput_CreateObject(BS_Kernel *pKernel);
-BS_Service *FMODExSound_CreateObject(BS_Kernel *pKernel);
-BS_Service *LuaScriptEngine_CreateObject(BS_Kernel *pKernel);
-BS_Service *Geometry_CreateObject(BS_Kernel *pKernel);
-BS_Service *OggTheora_CreateObject(BS_Kernel *pKernel);
+Service *OpenGLGfx_CreateObject(Kernel *pKernel);
+Service *ScummVMPackageManager_CreateObject(Kernel *pKernel);
+Service *ScummVMInput_CreateObject(Kernel *pKernel);
+Service *FMODExSound_CreateObject(Kernel *pKernel);
+Service *LuaScriptEngine_CreateObject(Kernel *pKernel);
+Service *Geometry_CreateObject(Kernel *pKernel);
+Service *OggTheora_CreateObject(Kernel *pKernel);
// Services are recorded in this table
const BS_ServiceInfo BS_SERVICE_TABLE[] = {
diff --git a/engines/sword25/kernel/window.cpp b/engines/sword25/kernel/window.cpp
index b4936e8afc..8d2dc309e7 100644
--- a/engines/sword25/kernel/window.cpp
+++ b/engines/sword25/kernel/window.cpp
@@ -40,9 +40,9 @@
namespace Sword25 {
// Erstellt ein Fenster des GUI des aktuellen Betriebssystems
-BS_Window *BS_Window::CreateBSWindow(int X, int Y, int Width, int Height, bool Visible) {
+Window *Window::CreateBSWindow(int X, int Y, int Width, int Height, bool Visible) {
// Fenster erstellen
- BS_Window *pWindow = (BS_Window *) new BS_ScummVMWindow(X, Y, Width, Height, Visible);
+ Window *pWindow = (Window *) new ScummVMWindow(X, Y, Width, Height, Visible);
// Falls das Fenster erfolgreich initialisiert wurde, wird ein Pointer auf das Fensterobjekt
// zurückgegeben
@@ -56,13 +56,13 @@ BS_Window *BS_Window::CreateBSWindow(int X, int Y, int Width, int Height, bool V
// Gibt True zurück wenn das Fenster WM_CLOSE empfangen hat -
// solange, bis RejectClose() aufgerufen wurde.
-bool BS_Window::CloseWanted() {
+bool Window::CloseWanted() {
bool result = _CloseWanted;
_CloseWanted = false;
return result;
}
-void BS_Window::SetCloseWanted(bool Wanted) {
+void Window::SetCloseWanted(bool Wanted) {
_CloseWanted = Wanted;
}
diff --git a/engines/sword25/kernel/window.h b/engines/sword25/kernel/window.h
index ae8709f157..aee23087cb 100644
--- a/engines/sword25/kernel/window.h
+++ b/engines/sword25/kernel/window.h
@@ -57,13 +57,13 @@ namespace Sword25 {
* Windows are exclusively created by BS_Window::CreateBSWindow().
* BS_Windows selects the correct class for the environment.
*/
-class BS_Window {
+class Window {
protected:
bool _InitSuccess;
bool _CloseWanted;
public:
- virtual ~BS_Window() {};
+ virtual ~Window() {};
/**
* Returns the visibility of the window.
@@ -169,7 +169,7 @@ public:
* @param Height The height of the window without the frame
* @param Visible Specifies whether window should be visible
*/
- static BS_Window *CreateBSWindow(int X, int Y, int Width, int Height, bool Visible);
+ static Window *CreateBSWindow(int X, int Y, int Width, int Height, bool Visible);
};
} // End of namespace Sword25
diff --git a/engines/sword25/math/geometry.cpp b/engines/sword25/math/geometry.cpp
index e2816e8a52..c85d9ff2db 100644
--- a/engines/sword25/math/geometry.cpp
+++ b/engines/sword25/math/geometry.cpp
@@ -38,7 +38,7 @@ namespace Sword25 {
#define BS_LOG_PREFIX "GEOMETRY"
-Geometry::Geometry(BS_Kernel *pKernel) : BS_Service(pKernel) {
+Geometry::Geometry(Kernel *pKernel) : Service(pKernel) {
if (!_RegisterScriptBindings())
BS_LOG_ERRORLN("Script bindings could not be registered.");
else
@@ -46,7 +46,7 @@ Geometry::Geometry(BS_Kernel *pKernel) : BS_Service(pKernel) {
}
-BS_Service *Geometry_CreateObject(BS_Kernel *pKernel) {
+Service *Geometry_CreateObject(Kernel *pKernel) {
return new Geometry(pKernel);
}
diff --git a/engines/sword25/math/geometry.h b/engines/sword25/math/geometry.h
index bab8183e35..6a815c6ae6 100644
--- a/engines/sword25/math/geometry.h
+++ b/engines/sword25/math/geometry.h
@@ -40,11 +40,11 @@
namespace Sword25 {
-class BS_Kernel;
+class Kernel;
-class Geometry : public BS_Service {
+class Geometry : public Service {
public:
- Geometry(BS_Kernel *pKernel);
+ Geometry(Kernel *pKernel);
virtual ~Geometry() {}
private:
diff --git a/engines/sword25/math/geometry_script.cpp b/engines/sword25/math/geometry_script.cpp
index 2e24c6e446..ecc437b6b3 100644
--- a/engines/sword25/math/geometry_script.cpp
+++ b/engines/sword25/math/geometry_script.cpp
@@ -408,7 +408,7 @@ static int R_SetY(lua_State *L) {
// -----------------------------------------------------------------------------
static void DrawPolygon(const Polygon &Polygon, unsigned int Color, const Vertex &Offset) {
- GraphicEngine *pGE = static_cast<GraphicEngine *>(BS_Kernel::GetInstance()->GetService("gfx"));
+ GraphicEngine *pGE = static_cast<GraphicEngine *>(Kernel::GetInstance()->GetService("gfx"));
BS_ASSERT(pGE);
for (int i = 0; i < Polygon.VertexCount - 1; i++)
@@ -536,7 +536,7 @@ static const luaL_reg WALKREGION_METHODS[] = {
// -----------------------------------------------------------------------------
bool Geometry::_RegisterScriptBindings() {
- BS_Kernel *pKernel = BS_Kernel::GetInstance();
+ Kernel *pKernel = Kernel::GetInstance();
BS_ASSERT(pKernel);
ScriptEngine *pScript = static_cast<ScriptEngine *>(pKernel->GetService("script"));
BS_ASSERT(pScript);
diff --git a/engines/sword25/math/polygon.cpp b/engines/sword25/math/polygon.cpp
index fb5af91816..a775c75b16 100644
--- a/engines/sword25/math/polygon.cpp
+++ b/engines/sword25/math/polygon.cpp
@@ -58,7 +58,7 @@ Polygon::Polygon(const Polygon &Other) : VertexCount(0), Vertecies(NULL) {
Init(Other.VertexCount, Other.Vertecies);
}
-Polygon::Polygon(BS_InputPersistenceBlock &Reader) : VertexCount(0), Vertecies(NULL) {
+Polygon::Polygon(InputPersistenceBlock &Reader) : VertexCount(0), Vertecies(NULL) {
Unpersist(Reader);
}
@@ -414,7 +414,7 @@ bool Polygon::IsPointInPolygon(const Vertex &Point, bool EdgesBelongToPolygon) c
else return false;
}
-bool Polygon::Persist(BS_OutputPersistenceBlock &Writer) {
+bool Polygon::Persist(OutputPersistenceBlock &Writer) {
Writer.Write(VertexCount);
for (int i = 0; i < VertexCount; ++i) {
Writer.Write(Vertecies[i].X);
@@ -424,7 +424,7 @@ bool Polygon::Persist(BS_OutputPersistenceBlock &Writer) {
return true;
}
-bool Polygon::Unpersist(BS_InputPersistenceBlock &Reader) {
+bool Polygon::Unpersist(InputPersistenceBlock &Reader) {
int StoredVertexCount;
Reader.Read(StoredVertexCount);
diff --git a/engines/sword25/math/polygon.h b/engines/sword25/math/polygon.h
index bb0f2d774f..24592c3376 100644
--- a/engines/sword25/math/polygon.h
+++ b/engines/sword25/math/polygon.h
@@ -51,7 +51,7 @@ class Vertex;
/**
@brief Eine Polygonklasse.
*/
-class Polygon : public BS_Persistable {
+class Polygon : public Persistable {
public:
/**
* Creates an object of type #BS_Polygon, containing 0 Vertecies.
@@ -68,7 +68,7 @@ public:
/**
* Creates a polygon using persisted data
*/
- Polygon(BS_InputPersistenceBlock &Reader);
+ Polygon(InputPersistenceBlock &Reader);
/**
* Creaes an object of type #BS_Polygon, and assigns Vertices to it
@@ -194,8 +194,8 @@ public:
/// COntains the Vertecies of the polygon
Vertex *Vertecies;
- virtual bool Persist(BS_OutputPersistenceBlock &Writer);
- virtual bool Unpersist(BS_InputPersistenceBlock &Reader);
+ virtual bool Persist(OutputPersistenceBlock &Writer);
+ virtual bool Unpersist(InputPersistenceBlock &Reader);
private:
bool m_IsCW;
diff --git a/engines/sword25/math/region.cpp b/engines/sword25/math/region.cpp
index 0fd9af861d..64115634de 100644
--- a/engines/sword25/math/region.cpp
+++ b/engines/sword25/math/region.cpp
@@ -52,7 +52,7 @@ Region::Region() : m_Valid(false), m_Type(RT_REGION) {
// -----------------------------------------------------------------------------
-Region::Region(BS_InputPersistenceBlock &Reader, unsigned int Handle) : m_Valid(false), m_Type(RT_REGION) {
+Region::Region(InputPersistenceBlock &Reader, unsigned int Handle) : m_Valid(false), m_Type(RT_REGION) {
RegionRegistry::GetInstance().RegisterObject(this, Handle);
Unpersist(Reader);
}
@@ -79,7 +79,7 @@ unsigned int Region::Create(REGION_TYPE Type) {
// -----------------------------------------------------------------------------
-unsigned int Region::Create(BS_InputPersistenceBlock &Reader, unsigned int Handle) {
+unsigned int Region::Create(InputPersistenceBlock &Reader, unsigned int Handle) {
// Read type
unsigned int Type;
Reader.Read(Type);
@@ -334,7 +334,7 @@ bool Region::IsLineOfSight(const Vertex &a, const Vertex &b) const {
// Persistence
// -----------------------------------------------------------------------------
-bool Region::Persist(BS_OutputPersistenceBlock &Writer) {
+bool Region::Persist(OutputPersistenceBlock &Writer) {
bool Result = true;
Writer.Write(static_cast<unsigned int>(m_Type));
@@ -359,7 +359,7 @@ bool Region::Persist(BS_OutputPersistenceBlock &Writer) {
// -----------------------------------------------------------------------------
-bool Region::Unpersist(BS_InputPersistenceBlock &Reader) {
+bool Region::Unpersist(InputPersistenceBlock &Reader) {
Reader.Read(m_Valid);
Reader.Read(m_Position.X);
Reader.Read(m_Position.Y);
diff --git a/engines/sword25/math/region.h b/engines/sword25/math/region.h
index 2afc9e9a45..2e89403efc 100644
--- a/engines/sword25/math/region.h
+++ b/engines/sword25/math/region.h
@@ -52,7 +52,7 @@ namespace Sword25 {
* arranged in a clockwise direction, so that the polygon working algorithms will
* work properly.
*/
-class Region : public BS_Persistable {
+class Region : public Persistable {
protected:
/**
* Creates a new BS_Region object
@@ -62,7 +62,7 @@ protected:
*/
Region();
- Region(BS_InputPersistenceBlock &Reader, unsigned int Handle);
+ Region(InputPersistenceBlock &Reader, unsigned int Handle);
public:
enum REGION_TYPE {
@@ -71,7 +71,7 @@ public:
};
static unsigned int Create(REGION_TYPE Type);
- static unsigned int Create(BS_InputPersistenceBlock &Reader, unsigned int Handle = 0);
+ static unsigned int Create(InputPersistenceBlock &Reader, unsigned int Handle = 0);
virtual ~Region();
@@ -200,8 +200,8 @@ public:
// Manipulation Methods
//
- virtual bool Persist(BS_OutputPersistenceBlock &Writer);
- virtual bool Unpersist(BS_InputPersistenceBlock &Reader);
+ virtual bool Persist(OutputPersistenceBlock &Writer);
+ virtual bool Unpersist(InputPersistenceBlock &Reader);
protected:
/// This specifies the type of object
diff --git a/engines/sword25/math/regionregistry.cpp b/engines/sword25/math/regionregistry.cpp
index 55ace78ab2..ca09ec32ac 100644
--- a/engines/sword25/math/regionregistry.cpp
+++ b/engines/sword25/math/regionregistry.cpp
@@ -69,7 +69,7 @@ void RegionRegistry::LogWarningLn(const char *Message) const {
// -----------------------------------------------------------------------------
-bool RegionRegistry::Persist(BS_OutputPersistenceBlock &Writer) {
+bool RegionRegistry::Persist(OutputPersistenceBlock &Writer) {
bool Result = true;
// Write out the next handle
@@ -95,7 +95,7 @@ bool RegionRegistry::Persist(BS_OutputPersistenceBlock &Writer) {
// -----------------------------------------------------------------------------
-bool RegionRegistry::Unpersist(BS_InputPersistenceBlock &Reader) {
+bool RegionRegistry::Unpersist(InputPersistenceBlock &Reader) {
bool Result = true;
// Read in the next handle
diff --git a/engines/sword25/math/regionregistry.h b/engines/sword25/math/regionregistry.h
index 13642c965c..f3befe8439 100644
--- a/engines/sword25/math/regionregistry.h
+++ b/engines/sword25/math/regionregistry.h
@@ -56,15 +56,15 @@ class Region;
// Class definitions
// -----------------------------------------------------------------------------
-class RegionRegistry : public BS_ObjectRegistry<Region>, public BS_Persistable {
+class RegionRegistry : public ObjectRegistry<Region>, public Persistable {
public:
static RegionRegistry &GetInstance() {
if (!m_InstancePtr.get()) m_InstancePtr = Common::SharedPtr<RegionRegistry>(new RegionRegistry());
return *m_InstancePtr.get();
}
- virtual bool Persist(BS_OutputPersistenceBlock &Writer);
- virtual bool Unpersist(BS_InputPersistenceBlock &Reader);
+ virtual bool Persist(OutputPersistenceBlock &Writer);
+ virtual bool Unpersist(InputPersistenceBlock &Reader);
private:
virtual void LogErrorLn(const char *Message) const;
diff --git a/engines/sword25/math/walkregion.cpp b/engines/sword25/math/walkregion.cpp
index 01db9c385b..729e32e8dd 100644
--- a/engines/sword25/math/walkregion.cpp
+++ b/engines/sword25/math/walkregion.cpp
@@ -58,7 +58,7 @@ WalkRegion::WalkRegion() {
// -----------------------------------------------------------------------------
-WalkRegion::WalkRegion(BS_InputPersistenceBlock &Reader, unsigned int Handle) :
+WalkRegion::WalkRegion(InputPersistenceBlock &Reader, unsigned int Handle) :
Region(Reader, Handle) {
m_Type = RT_WALKREGION;
Unpersist(Reader);
@@ -340,7 +340,7 @@ void WalkRegion::SetPos(int X, int Y) {
// -----------------------------------------------------------------------------
-bool WalkRegion::Persist(BS_OutputPersistenceBlock &Writer) {
+bool WalkRegion::Persist(OutputPersistenceBlock &Writer) {
bool Result = true;
// Persist the parent region
@@ -374,7 +374,7 @@ bool WalkRegion::Persist(BS_OutputPersistenceBlock &Writer) {
// -----------------------------------------------------------------------------
-bool WalkRegion::Unpersist(BS_InputPersistenceBlock &Reader) {
+bool WalkRegion::Unpersist(InputPersistenceBlock &Reader) {
bool Result = true;
// The parent object was already loaded in the constructor of BS_Region, so at
diff --git a/engines/sword25/math/walkregion.h b/engines/sword25/math/walkregion.h
index fd71ade981..a99f9a42fd 100644
--- a/engines/sword25/math/walkregion.h
+++ b/engines/sword25/math/walkregion.h
@@ -59,7 +59,7 @@ class WalkRegion : public Region {
protected:
WalkRegion();
- WalkRegion(BS_InputPersistenceBlock &Reader, unsigned int Handle);
+ WalkRegion(InputPersistenceBlock &Reader, unsigned int Handle);
public:
virtual ~WalkRegion();
@@ -103,8 +103,8 @@ public:
return m_VisibilityMatrix;
}
- virtual bool Persist(BS_OutputPersistenceBlock &Writer);
- virtual bool Unpersist(BS_InputPersistenceBlock &Reader);
+ virtual bool Persist(OutputPersistenceBlock &Writer);
+ virtual bool Unpersist(InputPersistenceBlock &Reader);
private:
Common::Array<Vertex> m_Nodes;
diff --git a/engines/sword25/package/packagemanager.cpp b/engines/sword25/package/packagemanager.cpp
index 4bf25936bb..92ba307b96 100644
--- a/engines/sword25/package/packagemanager.cpp
+++ b/engines/sword25/package/packagemanager.cpp
@@ -44,7 +44,7 @@
namespace Sword25 {
-PackageManager::PackageManager(BS_Kernel *pKernel) : BS_Service(pKernel) {
+PackageManager::PackageManager(Kernel *pKernel) : Service(pKernel) {
if (!_RegisterScriptBindings())
BS_LOG_ERRORLN("Script bindings could not be registered.");
else
diff --git a/engines/sword25/package/packagemanager.h b/engines/sword25/package/packagemanager.h
index 739ed9e644..04f863bef8 100644
--- a/engines/sword25/package/packagemanager.h
+++ b/engines/sword25/package/packagemanager.h
@@ -69,9 +69,9 @@ namespace Sword25 {
* 3. LoadDirectoryAsPackage should only be used for testing. The final release will be
* have all files in packages.
*/
-class PackageManager : public BS_Service {
+class PackageManager : public Service {
public:
- PackageManager(BS_Kernel *pKernel);
+ PackageManager(Kernel *pKernel);
virtual ~PackageManager() {};
enum FILE_TYPES {
diff --git a/engines/sword25/package/packagemanager_script.cpp b/engines/sword25/package/packagemanager_script.cpp
index 943770f074..dd4a32e2c7 100644
--- a/engines/sword25/package/packagemanager_script.cpp
+++ b/engines/sword25/package/packagemanager_script.cpp
@@ -50,7 +50,7 @@ using namespace Lua;
// -----------------------------------------------------------------------------
static PackageManager *GetPM() {
- BS_Kernel *pKernel = BS_Kernel::GetInstance();
+ Kernel *pKernel = Kernel::GetInstance();
BS_ASSERT(pKernel);
PackageManager *pPM = static_cast<PackageManager *>(pKernel->GetService("package"));
BS_ASSERT(pPM);
@@ -235,7 +235,7 @@ static const luaL_reg PACKAGE_FUNCTIONS[] = {
// -----------------------------------------------------------------------------
bool PackageManager::_RegisterScriptBindings() {
- BS_Kernel *pKernel = BS_Kernel::GetInstance();
+ Kernel *pKernel = Kernel::GetInstance();
BS_ASSERT(pKernel);
ScriptEngine *pScript = static_cast<ScriptEngine *>(pKernel->GetService("script"));
BS_ASSERT(pScript);
diff --git a/engines/sword25/package/scummvmpackagemanager.cpp b/engines/sword25/package/scummvmpackagemanager.cpp
index 0962bc407a..7a38e8d22a 100644
--- a/engines/sword25/package/scummvmpackagemanager.cpp
+++ b/engines/sword25/package/scummvmpackagemanager.cpp
@@ -52,7 +52,7 @@ static Common::String normalizePath(const Common::String &path, const Common::St
return Common::normalizePath(wholePath, PATH_SEPARATOR);
}
-ScummVMPackageManager::ScummVMPackageManager(BS_Kernel *kernelPtr) :
+ScummVMPackageManager::ScummVMPackageManager(Kernel *kernelPtr) :
PackageManager(kernelPtr),
_currentDirectory(PATH_SEPARATOR),
_rootFolder(ConfMan.get("path")) {
@@ -61,7 +61,7 @@ ScummVMPackageManager::ScummVMPackageManager(BS_Kernel *kernelPtr) :
ScummVMPackageManager::~ScummVMPackageManager() {
}
-BS_Service *ScummVMPackageManager_CreateObject(BS_Kernel *kernelPtr) {
+Service *ScummVMPackageManager_CreateObject(Kernel *kernelPtr) {
return new ScummVMPackageManager(kernelPtr);
}
diff --git a/engines/sword25/package/scummvmpackagemanager.h b/engines/sword25/package/scummvmpackagemanager.h
index b70df2528a..140347000b 100644
--- a/engines/sword25/package/scummvmpackagemanager.h
+++ b/engines/sword25/package/scummvmpackagemanager.h
@@ -43,7 +43,7 @@ namespace Sword25 {
// Forward declarations
// -----------------------------------------------------------------------------
-class BS_Kernel;
+class Kernel;
class ScummVMPackageManager : public PackageManager {
private:
@@ -67,7 +67,7 @@ private:
Common::ArchiveMemberPtr GetArchiveMember(const Common::String &fileName);
public:
- ScummVMPackageManager(BS_Kernel *kernelPtr);
+ ScummVMPackageManager(Kernel *kernelPtr);
virtual ~ScummVMPackageManager();
virtual bool LoadPackage(const Common::String &fileName, const Common::String &mountPosition);
diff --git a/engines/sword25/script/luascript.cpp b/engines/sword25/script/luascript.cpp
index 2ba528ed18..f3b98a5c16 100644
--- a/engines/sword25/script/luascript.cpp
+++ b/engines/sword25/script/luascript.cpp
@@ -65,7 +65,7 @@ using namespace Lua;
// Constructor / Destructor
// -----------------------------------------------------------------------------
-LuaScriptEngine::LuaScriptEngine(BS_Kernel *KernelPtr) :
+LuaScriptEngine::LuaScriptEngine(Kernel *KernelPtr) :
ScriptEngine(KernelPtr),
m_State(0),
m_PcallErrorhandlerRegistryIndex(0) {
@@ -81,7 +81,7 @@ LuaScriptEngine::~LuaScriptEngine() {
// -----------------------------------------------------------------------------
-BS_Service *LuaScriptEngine_CreateObject(BS_Kernel *KernelPtr) {
+Service *LuaScriptEngine_CreateObject(Kernel *KernelPtr) {
return new LuaScriptEngine(KernelPtr);
}
@@ -153,7 +153,7 @@ bool LuaScriptEngine::ExecuteFile(const Common::String &FileName) {
debug(2, "ExecuteFile(%s)", FileName.c_str());
// Get a pointer to the package manager
- PackageManager *pPackage = static_cast<PackageManager *>(BS_Kernel::GetInstance()->GetService("package"));
+ PackageManager *pPackage = static_cast<PackageManager *>(Kernel::GetInstance()->GetService("package"));
BS_ASSERT(pPackage);
// File read
@@ -424,7 +424,7 @@ int Chunkwriter(lua_State *L, const void *p, size_t sz, void *ud) {
}
}
-bool LuaScriptEngine::Persist(BS_OutputPersistenceBlock &Writer) {
+bool LuaScriptEngine::Persist(OutputPersistenceBlock &Writer) {
// Empty the Lua stack. pluto_persist() xepects that the stack is empty except for its parameters
lua_settop(m_State, 0);
@@ -516,7 +516,7 @@ void ClearGlobalTable(lua_State *L, const char **Exceptions) {
// -----------------------------------------------------------------------------
-bool LuaScriptEngine::Unpersist(BS_InputPersistenceBlock &Reader) {
+bool LuaScriptEngine::Unpersist(InputPersistenceBlock &Reader) {
// Empty the Lua stack. pluto_persist() xepects that the stack is empty except for its parameters
lua_settop(m_State, 0);
diff --git a/engines/sword25/script/luascript.h b/engines/sword25/script/luascript.h
index f7cc152f3f..31038b97e9 100644
--- a/engines/sword25/script/luascript.h
+++ b/engines/sword25/script/luascript.h
@@ -58,7 +58,7 @@ using namespace Lua;
namespace Sword25 {
-class BS_Kernel;
+class Kernel;
// -----------------------------------------------------------------------------
// Class declaration
@@ -70,7 +70,7 @@ public:
// Constructor / Destructor
// -----------------------------------------------------------------------------
- LuaScriptEngine(BS_Kernel *KernelPtr);
+ LuaScriptEngine(Kernel *KernelPtr);
virtual ~LuaScriptEngine();
/**
@@ -112,11 +112,11 @@ public:
/**
* @remark The Lua stack is cleared by this method
*/
- virtual bool Persist(BS_OutputPersistenceBlock &Writer);
+ virtual bool Persist(OutputPersistenceBlock &Writer);
/**
* @remark The Lua stack is cleared by this method
*/
- virtual bool Unpersist(BS_InputPersistenceBlock &Reader);
+ virtual bool Unpersist(InputPersistenceBlock &Reader);
private:
lua_State *m_State;
diff --git a/engines/sword25/script/script.h b/engines/sword25/script/script.h
index b7d550a163..e2750dbd5d 100644
--- a/engines/sword25/script/script.h
+++ b/engines/sword25/script/script.h
@@ -51,21 +51,21 @@ namespace Sword25 {
// Forward declarations
// -----------------------------------------------------------------------------
-class BS_Kernel;
-class BS_OutputPersistenceBlock;
+class Kernel;
+class OutputPersistenceBlock;
class BS_InputPersistenceBlock;
// -----------------------------------------------------------------------------
// Class declaration
// -----------------------------------------------------------------------------
-class ScriptEngine : public BS_Service, public BS_Persistable {
+class ScriptEngine : public Service, public Persistable {
public:
// -----------------------------------------------------------------------------
// Constructor / destructor
// -----------------------------------------------------------------------------
- ScriptEngine(BS_Kernel *KernelPtr) : BS_Service(KernelPtr) {};
+ ScriptEngine(Kernel *KernelPtr) : Service(KernelPtr) {};
virtual ~ScriptEngine() {};
// -----------------------------------------------------------------------------
@@ -103,8 +103,8 @@ public:
*/
virtual void SetCommandLine(const Common::Array<Common::String> &CommandLineParameters) = 0;
- virtual bool Persist(BS_OutputPersistenceBlock &Writer) = 0;
- virtual bool Unpersist(BS_InputPersistenceBlock &Reader) = 0;
+ virtual bool Persist(OutputPersistenceBlock &Writer) = 0;
+ virtual bool Unpersist(InputPersistenceBlock &Reader) = 0;
};
} // End of namespace Sword25
diff --git a/engines/sword25/sfx/fmodexsound.cpp b/engines/sword25/sfx/fmodexsound.cpp
index da0f0f932e..e71711577c 100644
--- a/engines/sword25/sfx/fmodexsound.cpp
+++ b/engines/sword25/sfx/fmodexsound.cpp
@@ -120,7 +120,7 @@ inline FMOD_SOUND_FORMAT BitsPerSampleToFMODExSoundFormat(unsigned int BitsPerSa
#endif
-FMODExSound::FMODExSound(BS_Kernel *pKernel) :
+FMODExSound::FMODExSound(Kernel *pKernel) :
SoundEngine(pKernel)
/* m_FMOD(0),
m_NextHandle(1) */ {
@@ -149,7 +149,7 @@ FMODExSound::~FMODExSound() {
// -----------------------------------------------------------------------------
-BS_Service *FMODExSound_CreateObject(BS_Kernel *pKernel) {
+Service *FMODExSound_CreateObject(Kernel *pKernel) {
return new FMODExSound(pKernel);
}
@@ -727,7 +727,7 @@ unsigned int BS_FMODExSound::CountPlayingDynamicSounds() {
// Ressourcen-Verwaltung
// -----------------------------------------------------------------------------
-BS_Resource *FMODExSound::LoadResource(const Common::String &FileName) {
+Resource *FMODExSound::LoadResource(const Common::String &FileName) {
#if 0
BS_ASSERT(m_FMOD);
BS_ASSERT(CanLoadResource(FileName));
@@ -764,7 +764,7 @@ bool FMODExSound::CanLoadResource(const Common::String &FileName) {
// Persistenz
// -----------------------------------------------------------------------------
-bool FMODExSound::Persist(BS_OutputPersistenceBlock &Writer) {
+bool FMODExSound::Persist(OutputPersistenceBlock &Writer) {
#if 0
BS_ASSERT(m_FMOD);
@@ -815,7 +815,7 @@ bool FMODExSound::Persist(BS_OutputPersistenceBlock &Writer) {
// -----------------------------------------------------------------------------
-bool FMODExSound::Unpersist(BS_InputPersistenceBlock &Reader) {
+bool FMODExSound::Unpersist(InputPersistenceBlock &Reader) {
#if 0
BS_ASSERT(m_FMOD);
diff --git a/engines/sword25/sfx/fmodexsound.h b/engines/sword25/sfx/fmodexsound.h
index 988d388a99..7a313d7025 100644
--- a/engines/sword25/sfx/fmodexsound.h
+++ b/engines/sword25/sfx/fmodexsound.h
@@ -45,7 +45,7 @@ public:
// Konstruktion / Destruktion
// -----------------------------------------------------------------------------
- FMODExSound(BS_Kernel *pKernel);
+ FMODExSound(Kernel *pKernel);
virtual ~FMODExSound();
bool Init(unsigned int SampleRate, unsigned int Channels = 32);
@@ -71,15 +71,15 @@ public:
float GetSoundPanning(unsigned int Handle);
float GetSoundTime(unsigned int Handle);
- BS_Resource *LoadResource(const Common::String &FileName);
+ Resource *LoadResource(const Common::String &FileName);
bool CanLoadResource(const Common::String &FileName);
// -----------------------------------------------------------------------------
// Persistenz
// -----------------------------------------------------------------------------
- bool Persist(BS_OutputPersistenceBlock &Writer);
- bool Unpersist(BS_InputPersistenceBlock &Reader);
+ bool Persist(OutputPersistenceBlock &Writer);
+ bool Unpersist(InputPersistenceBlock &Reader);
#if 0
private:
diff --git a/engines/sword25/sfx/soundengine.cpp b/engines/sword25/sfx/soundengine.cpp
index 34a6d70cea..022d58b4b4 100644
--- a/engines/sword25/sfx/soundengine.cpp
+++ b/engines/sword25/sfx/soundengine.cpp
@@ -38,7 +38,7 @@
namespace Sword25 {
-SoundEngine::SoundEngine(BS_Kernel *pKernel) : BS_ResourceService(pKernel) {
+SoundEngine::SoundEngine(Kernel *pKernel) : ResourceService(pKernel) {
if (!_RegisterScriptBindings())
BS_LOG_ERRORLN("Script bindings could not be registered.");
else
diff --git a/engines/sword25/sfx/soundengine.h b/engines/sword25/sfx/soundengine.h
index ac26acbff4..da60f9d736 100644
--- a/engines/sword25/sfx/soundengine.h
+++ b/engines/sword25/sfx/soundengine.h
@@ -62,7 +62,7 @@ namespace Sword25 {
// Class definitions
// -----------------------------------------------------------------------------
-class SoundEngine : public BS_ResourceService, public BS_Persistable {
+class SoundEngine : public ResourceService, public Persistable {
public:
// -----------------------------------------------------------------------------
// Enums and Types
@@ -86,7 +86,7 @@ public:
// Constructor / destructor
// -----------------------------------------------------------------------------
- SoundEngine(BS_Kernel *pKernel);
+ SoundEngine(Kernel *pKernel);
virtual ~SoundEngine() {};
// --------------------------------------------------------------
diff --git a/engines/sword25/sfx/soundengine_script.cpp b/engines/sword25/sfx/soundengine_script.cpp
index 8e9c0f029f..4e8d6cd8c4 100644
--- a/engines/sword25/sfx/soundengine_script.cpp
+++ b/engines/sword25/sfx/soundengine_script.cpp
@@ -47,9 +47,9 @@ namespace Sword25 {
// -----------------------------------------------------------------------------
static int Init(lua_State *L) {
- BS_Kernel *pKernel = BS_Kernel::GetInstance();
+ Kernel *pKernel = Kernel::GetInstance();
BS_ASSERT(pKernel);
- SoundEngine *pSfx = static_cast<SoundEngine *>(BS_Kernel::GetInstance()->GetService("sfx"));
+ SoundEngine *pSfx = static_cast<SoundEngine *>(Kernel::GetInstance()->GetService("sfx"));
BS_ASSERT(pSfx);
if (lua_gettop(L) == 0)
@@ -65,9 +65,9 @@ static int Init(lua_State *L) {
// -----------------------------------------------------------------------------
static int Update(lua_State *L) {
- BS_Kernel *pKernel = BS_Kernel::GetInstance();
+ Kernel *pKernel = Kernel::GetInstance();
BS_ASSERT(pKernel);
- SoundEngine *pSfx = static_cast<SoundEngine *>(BS_Kernel::GetInstance()->GetService("sfx"));
+ SoundEngine *pSfx = static_cast<SoundEngine *>(Kernel::GetInstance()->GetService("sfx"));
BS_ASSERT(pSfx);
pSfx->Update();
@@ -78,9 +78,9 @@ static int Update(lua_State *L) {
// -----------------------------------------------------------------------------
static int SetVolume(lua_State *L) {
- BS_Kernel *pKernel = BS_Kernel::GetInstance();
+ Kernel *pKernel = Kernel::GetInstance();
BS_ASSERT(pKernel);
- SoundEngine *pSfx = static_cast<SoundEngine *>(BS_Kernel::GetInstance()->GetService("sfx"));
+ SoundEngine *pSfx = static_cast<SoundEngine *>(Kernel::GetInstance()->GetService("sfx"));
BS_ASSERT(pSfx);
pSfx->SetVolume(static_cast<float>(luaL_checknumber(L, 1)),
@@ -92,9 +92,9 @@ static int SetVolume(lua_State *L) {
// -----------------------------------------------------------------------------
static int GetVolume(lua_State *L) {
- BS_Kernel *pKernel = BS_Kernel::GetInstance();
+ Kernel *pKernel = Kernel::GetInstance();
BS_ASSERT(pKernel);
- SoundEngine *pSfx = static_cast<SoundEngine *>(BS_Kernel::GetInstance()->GetService("sfx"));
+ SoundEngine *pSfx = static_cast<SoundEngine *>(Kernel::GetInstance()->GetService("sfx"));
BS_ASSERT(pSfx);
lua_pushnumber(L, pSfx->GetVolume(static_cast<SoundEngine::SOUND_TYPES>(static_cast<unsigned int>(luaL_checknumber(L, 1)))));
@@ -105,9 +105,9 @@ static int GetVolume(lua_State *L) {
// -----------------------------------------------------------------------------
static int PauseAll(lua_State *L) {
- BS_Kernel *pKernel = BS_Kernel::GetInstance();
+ Kernel *pKernel = Kernel::GetInstance();
BS_ASSERT(pKernel);
- SoundEngine *pSfx = static_cast<SoundEngine *>(BS_Kernel::GetInstance()->GetService("sfx"));
+ SoundEngine *pSfx = static_cast<SoundEngine *>(Kernel::GetInstance()->GetService("sfx"));
BS_ASSERT(pSfx);
pSfx->PauseAll();
@@ -118,9 +118,9 @@ static int PauseAll(lua_State *L) {
// -----------------------------------------------------------------------------
static int ResumeAll(lua_State *L) {
- BS_Kernel *pKernel = BS_Kernel::GetInstance();
+ Kernel *pKernel = Kernel::GetInstance();
BS_ASSERT(pKernel);
- SoundEngine *pSfx = static_cast<SoundEngine *>(BS_Kernel::GetInstance()->GetService("sfx"));
+ SoundEngine *pSfx = static_cast<SoundEngine *>(Kernel::GetInstance()->GetService("sfx"));
BS_ASSERT(pSfx);
pSfx->ResumeAll();
@@ -131,9 +131,9 @@ static int ResumeAll(lua_State *L) {
// -----------------------------------------------------------------------------
static int PauseLayer(lua_State *L) {
- BS_Kernel *pKernel = BS_Kernel::GetInstance();
+ Kernel *pKernel = Kernel::GetInstance();
BS_ASSERT(pKernel);
- SoundEngine *pSfx = static_cast<SoundEngine *>(BS_Kernel::GetInstance()->GetService("sfx"));
+ SoundEngine *pSfx = static_cast<SoundEngine *>(Kernel::GetInstance()->GetService("sfx"));
BS_ASSERT(pSfx);
pSfx->PauseLayer(static_cast<int>(luaL_checknumber(L, 1)));
@@ -144,9 +144,9 @@ static int PauseLayer(lua_State *L) {
// -----------------------------------------------------------------------------
static int ResumeLayer(lua_State *L) {
- BS_Kernel *pKernel = BS_Kernel::GetInstance();
+ Kernel *pKernel = Kernel::GetInstance();
BS_ASSERT(pKernel);
- SoundEngine *pSfx = static_cast<SoundEngine *>(BS_Kernel::GetInstance()->GetService("sfx"));
+ SoundEngine *pSfx = static_cast<SoundEngine *>(Kernel::GetInstance()->GetService("sfx"));
BS_ASSERT(pSfx);
pSfx->ResumeLayer(static_cast<int>(luaL_checknumber(L, 1)));
@@ -181,9 +181,9 @@ static void ProcessPlayParams(lua_State *L, Common::String &FileName, SoundEngin
}
static int PlaySound(lua_State *L) {
- BS_Kernel *pKernel = BS_Kernel::GetInstance();
+ Kernel *pKernel = Kernel::GetInstance();
BS_ASSERT(pKernel);
- SoundEngine *pSfx = static_cast<SoundEngine *>(BS_Kernel::GetInstance()->GetService("sfx"));
+ SoundEngine *pSfx = static_cast<SoundEngine *>(Kernel::GetInstance()->GetService("sfx"));
BS_ASSERT(pSfx);
Common::String FileName;
@@ -202,9 +202,9 @@ static int PlaySound(lua_State *L) {
}
static int PlaySoundEx(lua_State *L) {
- BS_Kernel *pKernel = BS_Kernel::GetInstance();
+ Kernel *pKernel = Kernel::GetInstance();
BS_ASSERT(pKernel);
- SoundEngine *pSfx = static_cast<SoundEngine *>(BS_Kernel::GetInstance()->GetService("sfx"));
+ SoundEngine *pSfx = static_cast<SoundEngine *>(Kernel::GetInstance()->GetService("sfx"));
BS_ASSERT(pSfx);
Common::String FileName;
@@ -225,9 +225,9 @@ static int PlaySoundEx(lua_State *L) {
// -----------------------------------------------------------------------------
static int SetSoundVolume(lua_State *L) {
- BS_Kernel *pKernel = BS_Kernel::GetInstance();
+ Kernel *pKernel = Kernel::GetInstance();
BS_ASSERT(pKernel);
- SoundEngine *pSfx = static_cast<SoundEngine *>(BS_Kernel::GetInstance()->GetService("sfx"));
+ SoundEngine *pSfx = static_cast<SoundEngine *>(Kernel::GetInstance()->GetService("sfx"));
BS_ASSERT(pSfx);
pSfx->SetSoundVolume(static_cast<unsigned int>(luaL_checknumber(L, 1)), static_cast<float>(luaL_checknumber(L, 2)));
@@ -238,9 +238,9 @@ static int SetSoundVolume(lua_State *L) {
// -----------------------------------------------------------------------------
static int SetSoundPanning(lua_State *L) {
- BS_Kernel *pKernel = BS_Kernel::GetInstance();
+ Kernel *pKernel = Kernel::GetInstance();
BS_ASSERT(pKernel);
- SoundEngine *pSfx = static_cast<SoundEngine *>(BS_Kernel::GetInstance()->GetService("sfx"));
+ SoundEngine *pSfx = static_cast<SoundEngine *>(Kernel::GetInstance()->GetService("sfx"));
BS_ASSERT(pSfx);
pSfx->SetSoundPanning(static_cast<unsigned int>(luaL_checknumber(L, 1)), static_cast<float>(luaL_checknumber(L, 2)));
@@ -251,9 +251,9 @@ static int SetSoundPanning(lua_State *L) {
// -----------------------------------------------------------------------------
static int PauseSound(lua_State *L) {
- BS_Kernel *pKernel = BS_Kernel::GetInstance();
+ Kernel *pKernel = Kernel::GetInstance();
BS_ASSERT(pKernel);
- SoundEngine *pSfx = static_cast<SoundEngine *>(BS_Kernel::GetInstance()->GetService("sfx"));
+ SoundEngine *pSfx = static_cast<SoundEngine *>(Kernel::GetInstance()->GetService("sfx"));
BS_ASSERT(pSfx);
pSfx->PauseSound(static_cast<unsigned int>(luaL_checknumber(L, 1)));
@@ -264,9 +264,9 @@ static int PauseSound(lua_State *L) {
// -----------------------------------------------------------------------------
static int ResumeSound(lua_State *L) {
- BS_Kernel *pKernel = BS_Kernel::GetInstance();
+ Kernel *pKernel = Kernel::GetInstance();
BS_ASSERT(pKernel);
- SoundEngine *pSfx = static_cast<SoundEngine *>(BS_Kernel::GetInstance()->GetService("sfx"));
+ SoundEngine *pSfx = static_cast<SoundEngine *>(Kernel::GetInstance()->GetService("sfx"));
BS_ASSERT(pSfx);
pSfx->ResumeSound(static_cast<unsigned int>(luaL_checknumber(L, 1)));
@@ -277,9 +277,9 @@ static int ResumeSound(lua_State *L) {
// -----------------------------------------------------------------------------
static int StopSound(lua_State *L) {
- BS_Kernel *pKernel = BS_Kernel::GetInstance();
+ Kernel *pKernel = Kernel::GetInstance();
BS_ASSERT(pKernel);
- SoundEngine *pSfx = static_cast<SoundEngine *>(BS_Kernel::GetInstance()->GetService("sfx"));
+ SoundEngine *pSfx = static_cast<SoundEngine *>(Kernel::GetInstance()->GetService("sfx"));
BS_ASSERT(pSfx);
pSfx->StopSound(static_cast<unsigned int>(luaL_checknumber(L, 1)));
@@ -290,9 +290,9 @@ static int StopSound(lua_State *L) {
// -----------------------------------------------------------------------------
static int IsSoundPaused(lua_State *L) {
- BS_Kernel *pKernel = BS_Kernel::GetInstance();
+ Kernel *pKernel = Kernel::GetInstance();
BS_ASSERT(pKernel);
- SoundEngine *pSfx = static_cast<SoundEngine *>(BS_Kernel::GetInstance()->GetService("sfx"));
+ SoundEngine *pSfx = static_cast<SoundEngine *>(Kernel::GetInstance()->GetService("sfx"));
BS_ASSERT(pSfx);
lua_pushbooleancpp(L, pSfx->IsSoundPaused(static_cast<unsigned int>(luaL_checknumber(L, 1))));
@@ -303,9 +303,9 @@ static int IsSoundPaused(lua_State *L) {
// -----------------------------------------------------------------------------
static int IsSoundPlaying(lua_State *L) {
- BS_Kernel *pKernel = BS_Kernel::GetInstance();
+ Kernel *pKernel = Kernel::GetInstance();
BS_ASSERT(pKernel);
- SoundEngine *pSfx = static_cast<SoundEngine *>(BS_Kernel::GetInstance()->GetService("sfx"));
+ SoundEngine *pSfx = static_cast<SoundEngine *>(Kernel::GetInstance()->GetService("sfx"));
BS_ASSERT(pSfx);
lua_pushbooleancpp(L, pSfx->IsSoundPlaying(static_cast<unsigned int>(luaL_checknumber(L, 1))));
@@ -316,9 +316,9 @@ static int IsSoundPlaying(lua_State *L) {
// -----------------------------------------------------------------------------
static int GetSoundVolume(lua_State *L) {
- BS_Kernel *pKernel = BS_Kernel::GetInstance();
+ Kernel *pKernel = Kernel::GetInstance();
BS_ASSERT(pKernel);
- SoundEngine *pSfx = static_cast<SoundEngine *>(BS_Kernel::GetInstance()->GetService("sfx"));
+ SoundEngine *pSfx = static_cast<SoundEngine *>(Kernel::GetInstance()->GetService("sfx"));
BS_ASSERT(pSfx);
lua_pushnumber(L, pSfx->GetSoundVolume(static_cast<unsigned int>(luaL_checknumber(L, 1))));
@@ -329,9 +329,9 @@ static int GetSoundVolume(lua_State *L) {
// -----------------------------------------------------------------------------
static int GetSoundPanning(lua_State *L) {
- BS_Kernel *pKernel = BS_Kernel::GetInstance();
+ Kernel *pKernel = Kernel::GetInstance();
BS_ASSERT(pKernel);
- SoundEngine *pSfx = static_cast<SoundEngine *>(BS_Kernel::GetInstance()->GetService("sfx"));
+ SoundEngine *pSfx = static_cast<SoundEngine *>(Kernel::GetInstance()->GetService("sfx"));
BS_ASSERT(pSfx);
lua_pushnumber(L, pSfx->GetSoundPanning(static_cast<unsigned int>(luaL_checknumber(L, 1))));
@@ -376,7 +376,7 @@ static const lua_constant_reg SFX_CONSTANTS[] = {
// -----------------------------------------------------------------------------
bool SoundEngine::_RegisterScriptBindings() {
- BS_Kernel *pKernel = BS_Kernel::GetInstance();
+ Kernel *pKernel = Kernel::GetInstance();
BS_ASSERT(pKernel);
ScriptEngine *pScript = static_cast<ScriptEngine *>(pKernel->GetService("script"));
BS_ASSERT(pScript);
diff --git a/engines/sword25/sword25.cpp b/engines/sword25/sword25.cpp
index c4a3c3667e..c018c1b00e 100644
--- a/engines/sword25/sword25.cpp
+++ b/engines/sword25/sword25.cpp
@@ -89,13 +89,13 @@ Common::Error Sword25Engine::AppStart(const Common::StringArray &CommandParamete
return Common::kUnsupportedColorMode;
// Kernel initialization
- if (!BS_Kernel::GetInstance()->GetInitSuccess()) {
+ if (!Kernel::GetInstance()->GetInitSuccess()) {
BS_LOG_ERRORLN("Kernel initialization failed.");
return Common::kUnknownError;
}
// Package-Manager starten, damit die Packfiles geladen werden können.
- PackageManager *PackageManagerPtr = static_cast<PackageManager *>(BS_Kernel::GetInstance()->NewService("package", PACKAGE_MANAGER));
+ PackageManager *PackageManagerPtr = static_cast<PackageManager *>(Kernel::GetInstance()->NewService("package", PACKAGE_MANAGER));
if (!PackageManagerPtr) {
BS_LOG_ERRORLN("Packagemanager initialization failed.");
return Common::kUnknownError;
@@ -111,7 +111,7 @@ Common::Error Sword25Engine::AppStart(const Common::StringArray &CommandParamete
}
// Einen Pointer auf den Skript-Engine holen.
- ScriptEngine *ScriptPtr = static_cast<ScriptEngine *>(BS_Kernel::GetInstance()->GetService("script"));
+ ScriptEngine *ScriptPtr = static_cast<ScriptEngine *>(Kernel::GetInstance()->GetService("script"));
if (!ScriptPtr) {
BS_LOG_ERRORLN("Script intialization failed.");
return Common::kUnknownError;
@@ -125,7 +125,7 @@ Common::Error Sword25Engine::AppStart(const Common::StringArray &CommandParamete
bool Sword25Engine::AppMain() {
// The main script start. This script loads all the other scripts and starts the actual game.
- ScriptEngine *ScriptPtr = static_cast<ScriptEngine *>(BS_Kernel::GetInstance()->GetService("script"));
+ ScriptEngine *ScriptPtr = static_cast<ScriptEngine *>(Kernel::GetInstance()->GetService("script"));
BS_ASSERT(ScriptPtr);
ScriptPtr->ExecuteFile(DEFAULT_SCRIPT_FILE);
@@ -134,7 +134,7 @@ bool Sword25Engine::AppMain() {
bool Sword25Engine::AppEnd() {
// The kernel is shutdown, and un-initialises all subsystems
- BS_Kernel::DeleteInstance();
+ Kernel::DeleteInstance();
// Free the log file if it was used
BS_Log::_CloseLog();
@@ -143,14 +143,14 @@ bool Sword25Engine::AppEnd() {
}
bool Sword25Engine::LoadPackages() {
- PackageManager *PackageManagerPtr = reinterpret_cast<PackageManager *>(BS_Kernel::GetInstance()->GetService("package"));
+ PackageManager *PackageManagerPtr = reinterpret_cast<PackageManager *>(Kernel::GetInstance()->GetService("package"));
BS_ASSERT(PackageManagerPtr);
// Load the main package
if (!PackageManagerPtr->LoadPackage("data.b25c", "/")) return false;
// Get the contents of the main program directory and sort them alphabetically
- Common::StringArray Filenames = BS_FileSystemUtil::GetInstance().GetFilesInDirectory(".");
+ Common::StringArray Filenames = FileSystemUtil::GetInstance().GetFilesInDirectory(".");
Common::sort(Filenames.begin(), Filenames.end());
// Identity all patch packages