[Scummvm-cvs-logs] SF.net SVN: scummvm:[53259] scummvm/trunk/engines/sword25

sev at users.sourceforge.net sev at users.sourceforge.net
Wed Oct 13 00:55:59 CEST 2010


Revision: 53259
          http://scummvm.svn.sourceforge.net/scummvm/?rev=53259&view=rev
Author:   sev
Date:     2010-10-12 22:55:59 +0000 (Tue, 12 Oct 2010)

Log Message:
-----------
SWORD25: eliminated BS_ prefix in all but kernel/

Modified Paths:
--------------
    scummvm/trunk/engines/sword25/fmv/movieplayer.cpp
    scummvm/trunk/engines/sword25/fmv/movieplayer_script.cpp
    scummvm/trunk/engines/sword25/gfx/animationresource.cpp
    scummvm/trunk/engines/sword25/gfx/animationresource.h
    scummvm/trunk/engines/sword25/gfx/fontresource.cpp
    scummvm/trunk/engines/sword25/gfx/graphicengine.h
    scummvm/trunk/engines/sword25/gfx/graphicengine_script.cpp
    scummvm/trunk/engines/sword25/gfx/opengl/glimage.cpp
    scummvm/trunk/engines/sword25/gfx/opengl/openglgfx.cpp
    scummvm/trunk/engines/sword25/gfx/opengl/openglgfx.h
    scummvm/trunk/engines/sword25/gfx/opengl/swimage.cpp
    scummvm/trunk/engines/sword25/input/inputengine.cpp
    scummvm/trunk/engines/sword25/input/inputengine.h
    scummvm/trunk/engines/sword25/input/inputengine_script.cpp
    scummvm/trunk/engines/sword25/input/scummvminput.cpp
    scummvm/trunk/engines/sword25/input/scummvminput.h
    scummvm/trunk/engines/sword25/kernel/kernel.cpp
    scummvm/trunk/engines/sword25/kernel/kernel.h
    scummvm/trunk/engines/sword25/kernel/kernel_script.cpp
    scummvm/trunk/engines/sword25/kernel/persistenceservice.cpp
    scummvm/trunk/engines/sword25/kernel/resmanager.cpp
    scummvm/trunk/engines/sword25/kernel/resource.cpp
    scummvm/trunk/engines/sword25/kernel/service_ids.h
    scummvm/trunk/engines/sword25/math/geometry.cpp
    scummvm/trunk/engines/sword25/math/geometry.h
    scummvm/trunk/engines/sword25/math/geometry_script.cpp
    scummvm/trunk/engines/sword25/math/line.h
    scummvm/trunk/engines/sword25/math/polygon.cpp
    scummvm/trunk/engines/sword25/math/polygon.h
    scummvm/trunk/engines/sword25/math/rect.h
    scummvm/trunk/engines/sword25/math/region.cpp
    scummvm/trunk/engines/sword25/math/region.h
    scummvm/trunk/engines/sword25/math/regionregistry.cpp
    scummvm/trunk/engines/sword25/math/regionregistry.h
    scummvm/trunk/engines/sword25/math/vertex.cpp
    scummvm/trunk/engines/sword25/math/vertex.h
    scummvm/trunk/engines/sword25/math/walkregion.cpp
    scummvm/trunk/engines/sword25/math/walkregion.h
    scummvm/trunk/engines/sword25/package/packagemanager.cpp
    scummvm/trunk/engines/sword25/package/packagemanager.h
    scummvm/trunk/engines/sword25/package/packagemanager_script.cpp
    scummvm/trunk/engines/sword25/package/scummvmpackagemanager.cpp
    scummvm/trunk/engines/sword25/package/scummvmpackagemanager.h
    scummvm/trunk/engines/sword25/script/lua_extensions.cpp
    scummvm/trunk/engines/sword25/script/luabindhelper.cpp
    scummvm/trunk/engines/sword25/script/luabindhelper.h
    scummvm/trunk/engines/sword25/script/luacallback.cpp
    scummvm/trunk/engines/sword25/script/luacallback.h
    scummvm/trunk/engines/sword25/script/luascript.cpp
    scummvm/trunk/engines/sword25/script/luascript.h
    scummvm/trunk/engines/sword25/script/script.h
    scummvm/trunk/engines/sword25/sfx/fmodexsound.cpp
    scummvm/trunk/engines/sword25/sfx/fmodexsound.h
    scummvm/trunk/engines/sword25/sfx/soundengine.cpp
    scummvm/trunk/engines/sword25/sfx/soundengine.h
    scummvm/trunk/engines/sword25/sfx/soundengine_script.cpp
    scummvm/trunk/engines/sword25/sword25.cpp

Modified: scummvm/trunk/engines/sword25/fmv/movieplayer.cpp
===================================================================
--- scummvm/trunk/engines/sword25/fmv/movieplayer.cpp	2010-10-12 22:53:49 UTC (rev 53258)
+++ scummvm/trunk/engines/sword25/fmv/movieplayer.cpp	2010-10-12 22:55:59 UTC (rev 53259)
@@ -38,7 +38,7 @@
 
 #define BS_LOG_PREFIX "MOVIEPLAYER"
 
-BS_Service *BS_OggTheora_CreateObject(BS_Kernel *pKernel) {
+BS_Service *OggTheora_CreateObject(BS_Kernel *pKernel) {
 	return new MoviePlayer(pKernel);
 }
 

Modified: scummvm/trunk/engines/sword25/fmv/movieplayer_script.cpp
===================================================================
--- scummvm/trunk/engines/sword25/fmv/movieplayer_script.cpp	2010-10-12 22:53:49 UTC (rev 53258)
+++ scummvm/trunk/engines/sword25/fmv/movieplayer_script.cpp	2010-10-12 22:55:59 UTC (rev 53259)
@@ -174,12 +174,12 @@
 bool MoviePlayer::_RegisterScriptBindings() {
 	BS_Kernel *pKernel = BS_Kernel::GetInstance();
 	BS_ASSERT(pKernel);
-	BS_ScriptEngine *pScript = static_cast<BS_ScriptEngine *>(pKernel->GetService("script"));
+	ScriptEngine *pScript = static_cast<ScriptEngine *>(pKernel->GetService("script"));
 	BS_ASSERT(pScript);
 	lua_State *L = static_cast<lua_State *>(pScript->GetScriptObject());
 	BS_ASSERT(L);
 
-	if (!BS_LuaBindhelper::AddFunctionsToLib(L, LIBRARY_NAME, LIBRARY_FUNCTIONS)) return false;
+	if (!LuaBindhelper::AddFunctionsToLib(L, LIBRARY_NAME, LIBRARY_FUNCTIONS)) return false;
 
 	return true;
 }

Modified: scummvm/trunk/engines/sword25/gfx/animationresource.cpp
===================================================================
--- scummvm/trunk/engines/sword25/gfx/animationresource.cpp	2010-10-12 22:53:49 UTC (rev 53258)
+++ scummvm/trunk/engines/sword25/gfx/animationresource.cpp	2010-10-12 22:55:59 UTC (rev 53259)
@@ -68,7 +68,7 @@
 	BS_Resource(FileName, BS_Resource::TYPE_ANIMATION),
 	m_Valid(false) {
 	// Pointer auf den Package-Manager bekommen
-	BS_PackageManager *PackagePtr = BS_Kernel::GetInstance()->GetPackage();
+	PackageManager *PackagePtr = BS_Kernel::GetInstance()->GetPackage();
 	BS_ASSERT(PackagePtr);
 
 	// Animations-XML laden
@@ -198,13 +198,13 @@
 
 // -----------------------------------------------------------------------------
 
-bool AnimationResource::ParseFrameTag(TiXmlElement &FrameTag, Frame &Frame_, BS_PackageManager &PackageManager) {
+bool AnimationResource::ParseFrameTag(TiXmlElement &FrameTag, Frame &Frame_, PackageManager &packageManager) {
 	const char *FileString = FrameTag.Attribute("file");
 	if (!FileString) {
 		BS_LOG_ERRORLN("<frame> tag without file attribute occurred in \"%s\".", GetFileName().c_str());
 		return false;
 	}
-	Frame_.FileName = PackageManager.GetAbsolutePath(FileString);
+	Frame_.FileName = packageManager.GetAbsolutePath(FileString);
 	if (Frame_.FileName == "") {
 		BS_LOG_ERRORLN("Could not create absolute path for file specified in <frame> tag in \"%s\": \"%s\".", GetFileName().c_str(), FileString);
 		return false;

Modified: scummvm/trunk/engines/sword25/gfx/animationresource.h
===================================================================
--- scummvm/trunk/engines/sword25/gfx/animationresource.h	2010-10-12 22:53:49 UTC (rev 53258)
+++ scummvm/trunk/engines/sword25/gfx/animationresource.h	2010-10-12 22:55:59 UTC (rev 53259)
@@ -57,7 +57,7 @@
 // -----------------------------------------------------------------------------
 
 class BS_Kernel;
-class BS_PackageManager;
+class PackageManager;
 
 // -----------------------------------------------------------------------------
 // Class Definition
@@ -110,7 +110,7 @@
 	/** @name Dokument-Parser Methoden */
 
 	bool ParseAnimationTag(TiXmlElement &AnimationTag, int &FPS, Animation::ANIMATION_TYPES &AnimationType);
-	bool ParseFrameTag(TiXmlElement &FrameTag, Frame &Frame, BS_PackageManager &PackageManager);
+	bool ParseFrameTag(TiXmlElement &FrameTag, Frame &Frame, PackageManager &PackageManager);
 
 	//@}
 

Modified: scummvm/trunk/engines/sword25/gfx/fontresource.cpp
===================================================================
--- scummvm/trunk/engines/sword25/gfx/fontresource.cpp	2010-10-12 22:53:49 UTC (rev 53258)
+++ scummvm/trunk/engines/sword25/gfx/fontresource.cpp	2010-10-12 22:55:59 UTC (rev 53259)
@@ -89,7 +89,7 @@
 	{
 		// Pointer auf den Package-Manager bekommen
 		BS_ASSERT(_pKernel);
-		BS_PackageManager *pPackage = static_cast<BS_PackageManager *>(_pKernel->GetService("package"));
+		PackageManager *pPackage = static_cast<PackageManager *>(_pKernel->GetService("package"));
 		BS_ASSERT(pPackage);
 
 		// Absoluten, eindeutigen Pfad bestimmen
@@ -142,7 +142,7 @@
 bool FontResource::_ParseXMLDocument(const Common::String &FileName, TiXmlDocument &Doc) const {
 	// Pointer auf den Package-Manager bekommen
 	BS_ASSERT(_pKernel);
-	BS_PackageManager *pPackage = static_cast<BS_PackageManager *>(_pKernel->GetService("package"));
+	PackageManager *pPackage = static_cast<PackageManager *>(_pKernel->GetService("package"));
 	BS_ASSERT(pPackage);
 
 	// Die Daten werden zun\xE4chst \xFCber den Package-Manager gelesen und dann in einen um ein Byte gr\xF6\xDFeren Buffer kopiert

Modified: scummvm/trunk/engines/sword25/gfx/graphicengine.h
===================================================================
--- scummvm/trunk/engines/sword25/gfx/graphicengine.h	2010-10-12 22:53:49 UTC (rev 53258)
+++ scummvm/trunk/engines/sword25/gfx/graphicengine.h	2010-10-12 22:55:59 UTC (rev 53259)
@@ -173,7 +173,7 @@
 	* @param End        The ending point of the line
 	* @param Color      The colour of the line. The default is BS_RGB (255,255,255) (White)
 	*/
-	virtual void        DrawDebugLine(const BS_Vertex &Start, const BS_Vertex &End, unsigned int Color = BS_RGB(255, 255, 255)) = 0;
+	virtual void        DrawDebugLine(const Vertex &Start, const Vertex &End, unsigned int Color = BS_RGB(255, 255, 255)) = 0;
 
 	/**
 	 * Creates a screenshot of the current frame buffer and writes it to a graphic file in PNG format.

Modified: scummvm/trunk/engines/sword25/gfx/graphicengine_script.cpp
===================================================================
--- scummvm/trunk/engines/sword25/gfx/graphicengine_script.cpp	2010-10-12 22:53:49 UTC (rev 53258)
+++ scummvm/trunk/engines/sword25/gfx/graphicengine_script.cpp	2010-10-12 22:55:59 UTC (rev 53259)
@@ -71,9 +71,9 @@
 namespace {
 // -------------------------------------------------------------------------
 
-class ActionCallback : public BS_LuaCallback {
+class ActionCallback : public LuaCallback {
 public:
-	ActionCallback(lua_State *L) : BS_LuaCallback(L) {};
+	ActionCallback(lua_State *L) : LuaCallback(L) {};
 
 	Common::String Action;
 
@@ -84,7 +84,7 @@
 	}
 };
 
-std::auto_ptr<BS_LuaCallback> LoopPointCallbackPtr;
+std::auto_ptr<LuaCallback> LoopPointCallbackPtr;
 std::auto_ptr<ActionCallback> ActionCallbackPtr;
 
 // -------------------------------------------------------------------------
@@ -122,7 +122,7 @@
 	if (p != NULL) { /* value is a userdata? */
 		if (lua_getmetatable(L, ud)) { /* does it have a metatable? */
 			// lua_getfield(L, LUA_REGISTRYINDEX, tname);  /* get correct metatable */
-			BS_LuaBindhelper::GetMetatable(L, tname);
+			LuaBindhelper::GetMetatable(L, tname);
 			if (lua_rawequal(L, -1, -2)) { /* does it have the correct mt? */
 				lua_settop(L, top);
 				return p;
@@ -166,7 +166,7 @@
 	if (AnimationTemplatePtr && AnimationTemplatePtr->IsValid()) {
 		NewUintUserData(L, AnimationTemplateHandle);
 		//luaL_getmetatable(L, ANIMATION_TEMPLATE_CLASS_NAME);
-		BS_LuaBindhelper::GetMetatable(L, ANIMATION_TEMPLATE_CLASS_NAME);
+		LuaBindhelper::GetMetatable(L, ANIMATION_TEMPLATE_CLASS_NAME);
 		BS_ASSERT(!lua_isnil(L, -1));
 		lua_setmetatable(L, -2);
 	} else {
@@ -304,7 +304,7 @@
 	NewUintUserData(L, MainPanelPtr->GetHandle());
 	BS_ASSERT(!lua_isnil(L, -1));
 	// luaL_getmetatable(L, PANEL_CLASS_NAME);
-	BS_LuaBindhelper::GetMetatable(L, PANEL_CLASS_NAME);
+	LuaBindhelper::GetMetatable(L, PANEL_CLASS_NAME);
 	BS_ASSERT(!lua_isnil(L, -1));
 	lua_setmetatable(L, -2);
 
@@ -349,10 +349,10 @@
 static int DrawDebugLine(lua_State *L) {
 	GraphicEngine *pGE = GetGE();
 
-	BS_Vertex Start;
-	BS_Vertex End;
-	BS_Vertex::LuaVertexToVertex(L, 1, Start);
-	BS_Vertex::LuaVertexToVertex(L, 2, End);
+	Vertex Start;
+	Vertex End;
+	Vertex::LuaVertexToVertex(L, 1, Start);
+	Vertex::LuaVertexToVertex(L, 2, End);
 	pGE->DrawDebugLine(Start, End, GraphicEngine::LuaColorToARGBColor(L, 3));
 
 	return 0;
@@ -541,8 +541,8 @@
 static int RO_SetPos(lua_State *L) {
 	RenderObjectPtr<RenderObject> ROPtr = CheckRenderObject(L);
 	BS_ASSERT(ROPtr.IsValid());
-	BS_Vertex Pos;
-	BS_Vertex::LuaVertexToVertex(L, 2, Pos);
+	Vertex Pos;
+	Vertex::LuaVertexToVertex(L, 2, Pos);
 	ROPtr->SetPos(Pos.X, Pos.Y);
 	return 0;
 }
@@ -674,7 +674,7 @@
 	if (PanelPtr.IsValid()) {
 		NewUintUserData(L, PanelPtr->GetHandle());
 		// luaL_getmetatable(L, PANEL_CLASS_NAME);
-		BS_LuaBindhelper::GetMetatable(L, PANEL_CLASS_NAME);
+		LuaBindhelper::GetMetatable(L, PANEL_CLASS_NAME);
 		BS_ASSERT(!lua_isnil(L, -1));
 		lua_setmetatable(L, -2);
 	} else
@@ -692,7 +692,7 @@
 	if (BitmaPtr.IsValid()) {
 		NewUintUserData(L, BitmaPtr->GetHandle());
 		// luaL_getmetatable(L, BITMAP_CLASS_NAME);
-		BS_LuaBindhelper::GetMetatable(L, BITMAP_CLASS_NAME);
+		LuaBindhelper::GetMetatable(L, BITMAP_CLASS_NAME);
 		BS_ASSERT(!lua_isnil(L, -1));
 		lua_setmetatable(L, -2);
 	} else
@@ -714,7 +714,7 @@
 	if (TextPtr.IsValid()) {
 		NewUintUserData(L, TextPtr->GetHandle());
 		// luaL_getmetatable(L, TEXT_CLASS_NAME);
-		BS_LuaBindhelper::GetMetatable(L, TEXT_CLASS_NAME);
+		LuaBindhelper::GetMetatable(L, TEXT_CLASS_NAME);
 		BS_ASSERT(!lua_isnil(L, -1));
 		lua_setmetatable(L, -2);
 	} else
@@ -738,7 +738,7 @@
 	if (AnimationPtr.IsValid()) {
 		NewUintUserData(L, AnimationPtr->GetHandle());
 		// luaL_getmetatable(L, ANIMATION_CLASS_NAME);
-		BS_LuaBindhelper::GetMetatable(L, ANIMATION_CLASS_NAME);
+		LuaBindhelper::GetMetatable(L, ANIMATION_CLASS_NAME);
 		BS_ASSERT(!lua_isnil(L, -1));
 		lua_setmetatable(L, -2);
 
@@ -970,8 +970,8 @@
 static int B_GetPixel(lua_State *L) {
 	RenderObjectPtr<Bitmap> BitmapPtr = CheckBitmap(L);
 	BS_ASSERT(BitmapPtr.IsValid());
-	BS_Vertex Pos;
-	BS_Vertex::LuaVertexToVertex(L, 2, Pos);
+	Vertex Pos;
+	Vertex::LuaVertexToVertex(L, 2, Pos);
 	GraphicEngine::ARGBColorToLuaColor(L, BitmapPtr->GetPixel(Pos.X, Pos.Y));
 	return 1;
 }
@@ -1528,26 +1528,26 @@
 bool GraphicEngine::RegisterScriptBindings() {
 	BS_Kernel *pKernel = BS_Kernel::GetInstance();
 	BS_ASSERT(pKernel);
-	BS_ScriptEngine *pScript = static_cast<BS_ScriptEngine *>(pKernel->GetService("script"));
+	ScriptEngine *pScript = static_cast<ScriptEngine *>(pKernel->GetService("script"));
 	BS_ASSERT(pScript);
 	lua_State *L = static_cast<lua_State *>(pScript->GetScriptObject());
 	BS_ASSERT(L);
 
-	if (!BS_LuaBindhelper::AddMethodsToClass(L, BITMAP_CLASS_NAME, RENDEROBJECT_METHODS)) return false;
-	if (!BS_LuaBindhelper::AddMethodsToClass(L, ANIMATION_CLASS_NAME, RENDEROBJECT_METHODS)) return false;
-	if (!BS_LuaBindhelper::AddMethodsToClass(L, PANEL_CLASS_NAME, RENDEROBJECT_METHODS)) return false;
-	if (!BS_LuaBindhelper::AddMethodsToClass(L, TEXT_CLASS_NAME, RENDEROBJECT_METHODS)) return false;
+	if (!LuaBindhelper::AddMethodsToClass(L, BITMAP_CLASS_NAME, RENDEROBJECT_METHODS)) return false;
+	if (!LuaBindhelper::AddMethodsToClass(L, ANIMATION_CLASS_NAME, RENDEROBJECT_METHODS)) return false;
+	if (!LuaBindhelper::AddMethodsToClass(L, PANEL_CLASS_NAME, RENDEROBJECT_METHODS)) return false;
+	if (!LuaBindhelper::AddMethodsToClass(L, TEXT_CLASS_NAME, RENDEROBJECT_METHODS)) return false;
 
-	if (!BS_LuaBindhelper::AddMethodsToClass(L, PANEL_CLASS_NAME, PANEL_METHODS)) return false;
-	if (!BS_LuaBindhelper::AddMethodsToClass(L, BITMAP_CLASS_NAME, BITMAP_METHODS)) return false;
-	if (!BS_LuaBindhelper::AddMethodsToClass(L, TEXT_CLASS_NAME, TEXT_METHODS)) return false;
-	if (!BS_LuaBindhelper::AddMethodsToClass(L, ANIMATION_CLASS_NAME, ANIMATION_METHODS)) return false;
+	if (!LuaBindhelper::AddMethodsToClass(L, PANEL_CLASS_NAME, PANEL_METHODS)) return false;
+	if (!LuaBindhelper::AddMethodsToClass(L, BITMAP_CLASS_NAME, BITMAP_METHODS)) return false;
+	if (!LuaBindhelper::AddMethodsToClass(L, TEXT_CLASS_NAME, TEXT_METHODS)) return false;
+	if (!LuaBindhelper::AddMethodsToClass(L, ANIMATION_CLASS_NAME, ANIMATION_METHODS)) return false;
 
-	if (!BS_LuaBindhelper::AddMethodsToClass(L, ANIMATION_TEMPLATE_CLASS_NAME, ANIMATION_TEMPLATE_METHODS)) return false;
+	if (!LuaBindhelper::AddMethodsToClass(L, ANIMATION_TEMPLATE_CLASS_NAME, ANIMATION_TEMPLATE_METHODS)) return false;
 
-	if (!BS_LuaBindhelper::AddFunctionsToLib(L, GFX_LIBRARY_NAME, GFX_FUNCTIONS)) return false;
+	if (!LuaBindhelper::AddFunctionsToLib(L, GFX_LIBRARY_NAME, GFX_FUNCTIONS)) return false;
 
-	LoopPointCallbackPtr.reset(new BS_LuaCallback(L));
+	LoopPointCallbackPtr.reset(new LuaCallback(L));
 	ActionCallbackPtr.reset(new ActionCallback(L));
 
 	return true;

Modified: scummvm/trunk/engines/sword25/gfx/opengl/glimage.cpp
===================================================================
--- scummvm/trunk/engines/sword25/gfx/opengl/glimage.cpp	2010-10-12 22:53:49 UTC (rev 53258)
+++ scummvm/trunk/engines/sword25/gfx/opengl/glimage.cpp	2010-10-12 22:55:59 UTC (rev 53259)
@@ -57,7 +57,7 @@
 	m_Height(0) {
 	Result = false;
 
-	BS_PackageManager *pPackage = static_cast<BS_PackageManager *>(BS_Kernel::GetInstance()->GetService("package"));
+	PackageManager *pPackage = static_cast<PackageManager *>(BS_Kernel::GetInstance()->GetService("package"));
 	BS_ASSERT(pPackage);
 
 	_backSurface = (static_cast<GraphicEngine *>(BS_Kernel::GetInstance()->GetService("gfx")))->getSurface();

Modified: scummvm/trunk/engines/sword25/gfx/opengl/openglgfx.cpp
===================================================================
--- scummvm/trunk/engines/sword25/gfx/opengl/openglgfx.cpp	2010-10-12 22:53:49 UTC (rev 53258)
+++ scummvm/trunk/engines/sword25/gfx/opengl/openglgfx.cpp	2010-10-12 22:55:59 UTC (rev 53259)
@@ -86,7 +86,7 @@
 
 // -----------------------------------------------------------------------------
 
-BS_Service *BS_OpenGLGfx_CreateObject(BS_Kernel *pKernel) {
+BS_Service *OpenGLGfx_CreateObject(BS_Kernel *pKernel) {
 	return new OpenGLGfx(pKernel);
 }
 
@@ -328,7 +328,7 @@
 	// Vectorgraphik laden
 	if (FileName.hasSuffix(SWF_EXTENSION)) {
 		// Pointer auf Package-Manager holen
-		BS_PackageManager *pPackage = BS_Kernel::GetInstance()->GetPackage();
+		PackageManager *pPackage = BS_Kernel::GetInstance()->GetPackage();
 		BS_ASSERT(pPackage);
 
 		// Datei laden
@@ -399,7 +399,7 @@
 // DEBUGGING
 // -----------------------------------------------------------------------------
 
-void OpenGLGfx::DrawDebugLine(const BS_Vertex &Start, const BS_Vertex &End, unsigned int Color) {
+void OpenGLGfx::DrawDebugLine(const Vertex &Start, const Vertex &End, unsigned int Color) {
 	m_DebugLines.push_back(DebugLine(Start, End, Color));
 }
 

Modified: scummvm/trunk/engines/sword25/gfx/opengl/openglgfx.h
===================================================================
--- scummvm/trunk/engines/sword25/gfx/opengl/openglgfx.h	2010-10-12 22:53:49 UTC (rev 53258)
+++ scummvm/trunk/engines/sword25/gfx/opengl/openglgfx.h	2010-10-12 22:55:59 UTC (rev 53259)
@@ -87,7 +87,7 @@
 
 	// Debugging Methoden
 	// ------------------
-	virtual void DrawDebugLine(const BS_Vertex &Start, const BS_Vertex &End, unsigned int Color);
+	virtual void DrawDebugLine(const Vertex &Start, const Vertex &End, unsigned int Color);
 
 	// Persistenz Methoden
 	// -------------------
@@ -103,14 +103,14 @@
 	std::auto_ptr<RenderObjectManager>   m_RenderObjectManagerPtr;
 
 	struct DebugLine {
-		DebugLine(const BS_Vertex &_Start, const BS_Vertex &_End, unsigned int _Color) :
+		DebugLine(const Vertex &_Start, const Vertex &_End, unsigned int _Color) :
 			Start(_Start),
 			End(_End),
 			Color(_Color) {}
 		DebugLine() {}
 
-		BS_Vertex       Start;
-		BS_Vertex       End;
+		Vertex       Start;
+		Vertex       End;
 		unsigned int    Color;
 	};
 

Modified: scummvm/trunk/engines/sword25/gfx/opengl/swimage.cpp
===================================================================
--- scummvm/trunk/engines/sword25/gfx/opengl/swimage.cpp	2010-10-12 22:53:49 UTC (rev 53258)
+++ scummvm/trunk/engines/sword25/gfx/opengl/swimage.cpp	2010-10-12 22:55:59 UTC (rev 53259)
@@ -56,7 +56,7 @@
 	m_Height(0) {
 	Result = false;
 
-	BS_PackageManager *pPackage = static_cast<BS_PackageManager *>(BS_Kernel::GetInstance()->GetService("package"));
+	PackageManager *pPackage = static_cast<PackageManager *>(BS_Kernel::GetInstance()->GetService("package"));
 	BS_ASSERT(pPackage);
 
 	// Datei laden

Modified: scummvm/trunk/engines/sword25/input/inputengine.cpp
===================================================================
--- scummvm/trunk/engines/sword25/input/inputengine.cpp	2010-10-12 22:53:49 UTC (rev 53258)
+++ scummvm/trunk/engines/sword25/input/inputengine.cpp	2010-10-12 22:55:59 UTC (rev 53259)
@@ -44,7 +44,7 @@
 
 namespace Sword25 {
 
-BS_InputEngine::BS_InputEngine(BS_Kernel *pKernel) : BS_Service(pKernel) {
+InputEngine::InputEngine(BS_Kernel *pKernel) : BS_Service(pKernel) {
 	if (!_RegisterScriptBindings())
 		BS_LOG_ERRORLN("Script bindings could not be registered.");
 	else

Modified: scummvm/trunk/engines/sword25/input/inputengine.h
===================================================================
--- scummvm/trunk/engines/sword25/input/inputengine.h	2010-10-12 22:53:49 UTC (rev 53258)
+++ scummvm/trunk/engines/sword25/input/inputengine.h	2010-10-12 22:55:59 UTC (rev 53259)
@@ -55,10 +55,10 @@
 
 /// Class definitions
 
-class BS_InputEngine : public BS_Service, public BS_Persistable {
+class InputEngine : public BS_Service, public BS_Persistable {
 public:
-	BS_InputEngine(BS_Kernel *pKernel);
-	virtual ~BS_InputEngine() {};
+	InputEngine(BS_Kernel *pKernel);
+	virtual ~InputEngine() {};
 
 	// NOTE: These codes are registered in inputengine_script.cpp
 	// Any changes to these enums must also adjust the above file.

Modified: scummvm/trunk/engines/sword25/input/inputengine_script.cpp
===================================================================
--- scummvm/trunk/engines/sword25/input/inputengine_script.cpp	2010-10-12 22:53:49 UTC (rev 53258)
+++ scummvm/trunk/engines/sword25/input/inputengine_script.cpp	2010-10-12 22:55:59 UTC (rev 53259)
@@ -61,9 +61,9 @@
 static void TheCommandCallback(int Command);
 
 namespace {
-class CharacterCallbackClass : public BS_LuaCallback {
+class CharacterCallbackClass : public LuaCallback {
 public:
-	CharacterCallbackClass(lua_State *L) : BS_LuaCallback(L) {};
+	CharacterCallbackClass(lua_State *L) : LuaCallback(L) {};
 
 	Common::String Character;
 
@@ -77,13 +77,13 @@
 
 // -----------------------------------------------------------------------------
 
-class CommandCallbackClass : public BS_LuaCallback {
+class CommandCallbackClass : public LuaCallback {
 public:
-	CommandCallbackClass(lua_State *L) : BS_LuaCallback(L) {
-		Command = BS_InputEngine::KEY_COMMAND_BACKSPACE;
+	CommandCallbackClass(lua_State *L) : LuaCallback(L) {
+		Command = InputEngine::KEY_COMMAND_BACKSPACE;
 	}
 
-	BS_InputEngine::KEY_COMMANDS Command;
+	InputEngine::KEY_COMMANDS Command;
 
 protected:
 	int PreFunctionInvokation(lua_State *L) {
@@ -106,10 +106,10 @@
 
 // -----------------------------------------------------------------------------
 
-static BS_InputEngine *GetIE() {
+static InputEngine *GetIE() {
 	BS_Kernel *pKernel = BS_Kernel::GetInstance();
 	BS_ASSERT(pKernel);
-	BS_InputEngine *pIE = static_cast<BS_InputEngine *>(pKernel->GetService("input"));
+	InputEngine *pIE = static_cast<InputEngine *>(pKernel->GetService("input"));
 	BS_ASSERT(pIE);
 	return pIE;
 }
@@ -117,7 +117,7 @@
 // -----------------------------------------------------------------------------
 
 static int Init(lua_State *L) {
-	BS_InputEngine *pIE = GetIE();
+	InputEngine *pIE = GetIE();
 
 	lua_pushbooleancpp(L, pIE->Init());
 	return 1;
@@ -126,7 +126,7 @@
 // -----------------------------------------------------------------------------
 
 static int Update(lua_State *L) {
-	BS_InputEngine *pIE = GetIE();
+	InputEngine *pIE = GetIE();
 
 	// Beim ersten Aufruf der Update()-Methode werden die beiden Callbacks am Input-Objekt registriert.
 	// Dieses kann nicht in _RegisterScriptBindings() passieren, da diese Funktion vom Konstruktor der abstrakten Basisklasse aufgerufen wird und die
@@ -145,7 +145,7 @@
 // -----------------------------------------------------------------------------
 
 static int IsLeftMouseDown(lua_State *L) {
-	BS_InputEngine *pIE = GetIE();
+	InputEngine *pIE = GetIE();
 
 	lua_pushbooleancpp(L, pIE->IsLeftMouseDown());
 	return 1;
@@ -154,7 +154,7 @@
 // -----------------------------------------------------------------------------
 
 static int IsRightMouseDown(lua_State *L) {
-	BS_InputEngine *pIE = GetIE();
+	InputEngine *pIE = GetIE();
 
 	lua_pushbooleancpp(L, pIE->IsRightMouseDown());
 	return 1;
@@ -163,7 +163,7 @@
 // -----------------------------------------------------------------------------
 
 static int WasLeftMouseDown(lua_State *L) {
-	BS_InputEngine *pIE = GetIE();
+	InputEngine *pIE = GetIE();
 
 	lua_pushbooleancpp(L, pIE->WasLeftMouseDown());
 	return 1;
@@ -172,7 +172,7 @@
 // -----------------------------------------------------------------------------
 
 static int WasRightMouseDown(lua_State *L) {
-	BS_InputEngine *pIE = GetIE();
+	InputEngine *pIE = GetIE();
 
 	lua_pushbooleancpp(L, pIE->WasRightMouseDown());
 	return 1;
@@ -181,7 +181,7 @@
 // -----------------------------------------------------------------------------
 
 static int IsLeftDoubleClick(lua_State *L) {
-	BS_InputEngine *pIE = GetIE();
+	InputEngine *pIE = GetIE();
 
 	lua_pushbooleancpp(L, pIE->IsLeftDoubleClick());
 	return 1;
@@ -190,7 +190,7 @@
 // -----------------------------------------------------------------------------
 
 static int GetMouseX(lua_State *L) {
-	BS_InputEngine *pIE = GetIE();
+	InputEngine *pIE = GetIE();
 
 	lua_pushnumber(L, pIE->GetMouseX());
 	return 1;
@@ -199,7 +199,7 @@
 // -----------------------------------------------------------------------------
 
 static int GetMouseY(lua_State *L) {
-	BS_InputEngine *pIE = GetIE();
+	InputEngine *pIE = GetIE();
 
 	lua_pushnumber(L, pIE->GetMouseY());
 	return 1;
@@ -208,7 +208,7 @@
 // -----------------------------------------------------------------------------
 
 static int IsKeyDown(lua_State *L) {
-	BS_InputEngine *pIE = GetIE();
+	InputEngine *pIE = GetIE();
 
 	lua_pushbooleancpp(L, pIE->IsKeyDown((unsigned int) luaL_checknumber(L, 1)));
 	return 1;
@@ -217,7 +217,7 @@
 // -----------------------------------------------------------------------------
 
 static int WasKeyDown(lua_State *L) {
-	BS_InputEngine *pIE = GetIE();
+	InputEngine *pIE = GetIE();
 
 	lua_pushbooleancpp(L, pIE->WasKeyDown((unsigned int) luaL_checknumber(L, 1)));
 	return 1;
@@ -226,7 +226,7 @@
 // -----------------------------------------------------------------------------
 
 static int SetMouseX(lua_State *L) {
-	BS_InputEngine *pIE = GetIE();
+	InputEngine *pIE = GetIE();
 
 	pIE->SetMouseX((int) luaL_checknumber(L, 1));
 	return 0;
@@ -235,7 +235,7 @@
 // -----------------------------------------------------------------------------
 
 static int SetMouseY(lua_State *L) {
-	BS_InputEngine *pIE = GetIE();
+	InputEngine *pIE = GetIE();
 
 	pIE->SetMouseY((int) luaL_checknumber(L, 1));
 	return 0;
@@ -270,7 +270,7 @@
 // -----------------------------------------------------------------------------
 
 static void TheCommandCallback(int Command) {
-	CommandCallbackPtr->Command = static_cast<BS_InputEngine::KEY_COMMANDS>(Command);
+	CommandCallbackPtr->Command = static_cast<InputEngine::KEY_COMMANDS>(Command);
 	lua_State *L = static_cast<lua_State *>(BS_Kernel::GetInstance()->GetScript()->GetScriptObject());
 	CommandCallbackPtr->InvokeCallbackFunctions(L, 1);
 }
@@ -318,8 +318,8 @@
 	{0, 0}
 };
 
-#define X(k) {"KEY_" #k, BS_InputEngine::KEY_##k}
-#define Y(k) {"KEY_COMMAND_" #k, BS_InputEngine::KEY_COMMAND_##k}
+#define X(k) {"KEY_" #k, InputEngine::KEY_##k}
+#define Y(k) {"KEY_COMMAND_" #k, InputEngine::KEY_COMMAND_##k}
 static const lua_constant_reg PACKAGE_CONSTANTS[] = {
 	X(BACKSPACE), X(TAB), X(CLEAR), X(RETURN), X(PAUSE), X(CAPSLOCK), X(ESCAPE), X(SPACE), X(PAGEUP), X(PAGEDOWN), X(END), X(HOME), X(LEFT),
 	X(UP), X(RIGHT), X(DOWN), X(PRINTSCREEN), X(INSERT), X(DELETE), X(0), X(1), X(2), X(3), X(4), X(5), X(6), X(7), X(8), X(9), X(A), X(B),
@@ -335,16 +335,16 @@
 
 // -----------------------------------------------------------------------------
 
-bool BS_InputEngine::_RegisterScriptBindings() {
+bool InputEngine::_RegisterScriptBindings() {
 	BS_Kernel *pKernel = BS_Kernel::GetInstance();
 	BS_ASSERT(pKernel);
-	BS_ScriptEngine *pScript = static_cast<BS_ScriptEngine *>(pKernel->GetService("script"));
+	ScriptEngine *pScript = static_cast<ScriptEngine *>(pKernel->GetService("script"));
 	BS_ASSERT(pScript);
 	lua_State *L = static_cast<lua_State *>(pScript->GetScriptObject());
 	BS_ASSERT(L);
 
-	if (!BS_LuaBindhelper::AddFunctionsToLib(L, PACKAGE_LIBRARY_NAME, PACKAGE_FUNCTIONS)) return false;
-	if (!BS_LuaBindhelper::AddConstantsToLib(L, PACKAGE_LIBRARY_NAME, PACKAGE_CONSTANTS)) return false;
+	if (!LuaBindhelper::AddFunctionsToLib(L, PACKAGE_LIBRARY_NAME, PACKAGE_FUNCTIONS)) return false;
+	if (!LuaBindhelper::AddConstantsToLib(L, PACKAGE_LIBRARY_NAME, PACKAGE_CONSTANTS)) return false;
 
 	CharacterCallbackPtr = Common::SharedPtr<CharacterCallbackClass>(new CharacterCallbackClass(L));
 	CommandCallbackPtr = Common::SharedPtr<CommandCallbackClass>(new CommandCallbackClass(L));

Modified: scummvm/trunk/engines/sword25/input/scummvminput.cpp
===================================================================
--- scummvm/trunk/engines/sword25/input/scummvminput.cpp	2010-10-12 22:53:49 UTC (rev 53258)
+++ scummvm/trunk/engines/sword25/input/scummvminput.cpp	2010-10-12 22:55:59 UTC (rev 53259)
@@ -66,7 +66,7 @@
 	m_LastLeftClickTime(0),
 	m_LastLeftClickMouseX(0),
 	m_LastLeftClickMouseY(0),
-	BS_InputEngine(pKernel) {
+	InputEngine(pKernel) {
 	memset(m_KeyboardState[0], 0, sizeof(m_KeyboardState[0]));
 	memset(m_KeyboardState[1], 0, sizeof(m_KeyboardState[1]));
 	m_LeftMouseState[0] = false;

Modified: scummvm/trunk/engines/sword25/input/scummvminput.h
===================================================================
--- scummvm/trunk/engines/sword25/input/scummvminput.h	2010-10-12 22:53:49 UTC (rev 53258)
+++ scummvm/trunk/engines/sword25/input/scummvminput.h	2010-10-12 22:55:59 UTC (rev 53259)
@@ -47,7 +47,7 @@
 class BS_Kernel;
 
 /// Class definitions
-class ScummVMInput : public BS_InputEngine {
+class ScummVMInput : public InputEngine {
 public:
 	ScummVMInput(BS_Kernel *pKernel);
 	virtual ~ScummVMInput();

Modified: scummvm/trunk/engines/sword25/kernel/kernel.cpp
===================================================================
--- scummvm/trunk/engines/sword25/kernel/kernel.cpp	2010-10-12 22:53:49 UTC (rev 53258)
+++ scummvm/trunk/engines/sword25/kernel/kernel.cpp	2010-10-12 22:55:59 UTC (rev 53259)
@@ -85,7 +85,7 @@
 	_pResourceManager = new BS_ResourceManager(this);
 
 	// Initialise the script engine
-	BS_ScriptEngine *pScript = static_cast<BS_ScriptEngine *>(NewService("script", "lua"));
+	ScriptEngine *pScript = static_cast<ScriptEngine *>(NewService("script", "lua"));
 	if (!pScript || !pScript->Init()) {
 		_InitSuccess = false;
 		return;
@@ -405,8 +405,8 @@
 /**
  * Returns a pointer to the active Sfx Service, or NULL if no Sfx service is active
  */
-BS_SoundEngine *BS_Kernel::GetSfx() {
-	return static_cast<BS_SoundEngine *>(GetService("sfx"));
+SoundEngine *BS_Kernel::GetSfx() {
+	return static_cast<SoundEngine *>(GetService("sfx"));
 }
 
 // -----------------------------------------------------------------------------
@@ -414,8 +414,8 @@
 /**
  * Returns a pointer to the active input service, or NULL if no input service is active
  */
-BS_InputEngine *BS_Kernel::GetInput() {
-	return static_cast<BS_InputEngine *>(GetService("input"));
+InputEngine *BS_Kernel::GetInput() {
+	return static_cast<InputEngine *>(GetService("input"));
 }
 
 // -----------------------------------------------------------------------------
@@ -423,8 +423,8 @@
 /**
  * Returns a pointer to the active package manager, or NULL if no manager is active
  */
-BS_PackageManager *BS_Kernel::GetPackage() {
-	return static_cast<BS_PackageManager *>(GetService("package"));
+PackageManager *BS_Kernel::GetPackage() {
+	return static_cast<PackageManager *>(GetService("package"));
 }
 
 // -----------------------------------------------------------------------------
@@ -432,8 +432,8 @@
 /**
  * Returns a pointer to the script engine, or NULL if it is not active
  */
-BS_ScriptEngine *BS_Kernel::GetScript() {
-	return static_cast<BS_ScriptEngine *>(GetService("script"));
+ScriptEngine *BS_Kernel::GetScript() {
+	return static_cast<ScriptEngine *>(GetService("script"));
 }
 
 // -----------------------------------------------------------------------------

Modified: scummvm/trunk/engines/sword25/kernel/kernel.h
===================================================================
--- scummvm/trunk/engines/sword25/kernel/kernel.h	2010-10-12 22:53:49 UTC (rev 53258)
+++ scummvm/trunk/engines/sword25/kernel/kernel.h	2010-10-12 22:55:59 UTC (rev 53259)
@@ -62,10 +62,10 @@
 // Class definitions
 class BS_Service;
 class GraphicEngine;
-class BS_ScriptEngine;
-class BS_SoundEngine;
-class BS_InputEngine;
-class BS_PackageManager;
+class ScriptEngine;
+class SoundEngine;
+class InputEngine;
+class PackageManager;
 class MoviePlayer;
 
 /**
@@ -194,19 +194,19 @@
 	/**
 	 * Returns a pointer to the active Sfx Service, or NULL if no Sfx service is active
 	 */
-	BS_SoundEngine *GetSfx();
+	SoundEngine *GetSfx();
 	/**
 	 * Returns a pointer to the active input service, or NULL if no input service is active
 	 */
-	BS_InputEngine *GetInput();
+	InputEngine *GetInput();
 	/**
 	 * Returns a pointer to the active package manager, or NULL if no manager is active
 	 */
-	BS_PackageManager *GetPackage();
+	PackageManager *GetPackage();
 	/**
 	 * Returns a pointer to the script engine, or NULL if it is not active
 	 */
-	BS_ScriptEngine *GetScript();
+	ScriptEngine *GetScript();
 	/**
 	 * Returns a pointer to the movie player, or NULL if it is not active
 	 */

Modified: scummvm/trunk/engines/sword25/kernel/kernel_script.cpp
===================================================================
--- scummvm/trunk/engines/sword25/kernel/kernel_script.cpp	2010-10-12 22:53:49 UTC (rev 53258)
+++ scummvm/trunk/engines/sword25/kernel/kernel_script.cpp	2010-10-12 22:55:59 UTC (rev 53259)
@@ -171,7 +171,7 @@
 static int ExecuteFile(lua_State *L) {
 	BS_Kernel *pKernel = BS_Kernel::GetInstance();
 	BS_ASSERT(pKernel);
-	BS_ScriptEngine *pSE = static_cast<BS_ScriptEngine *>(pKernel->GetService("script"));
+	ScriptEngine *pSE = static_cast<ScriptEngine *>(pKernel->GetService("script"));
 	BS_ASSERT(pSE);
 
 	lua_pushbooleancpp(L, pSE->ExecuteFile(luaL_checkstring(L, 1)));
@@ -723,15 +723,15 @@
 // -----------------------------------------------------------------------------
 
 bool BS_Kernel::_RegisterScriptBindings() {
-	BS_ScriptEngine *pScript = static_cast<BS_ScriptEngine *>(GetService("script"));
+	ScriptEngine *pScript = static_cast<ScriptEngine *>(GetService("script"));
 	BS_ASSERT(pScript);
 	lua_State *L = static_cast<lua_State *>(pScript->GetScriptObject());
 	BS_ASSERT(L);
 
-	if (!BS_LuaBindhelper::AddFunctionsToLib(L, KERNEL_LIBRARY_NAME, KERNEL_FUNCTIONS)) return false;
-	if (!BS_LuaBindhelper::AddFunctionsToLib(L, WINDOW_LIBRARY_NAME, WINDOW_FUNCTIONS)) return false;
-	if (!BS_LuaBindhelper::AddFunctionsToLib(L, RESOURCE_LIBRARY_NAME, RESOURCE_FUNCTIONS)) return false;
-	if (!BS_LuaBindhelper::AddFunctionsToLib(L, PERSISTENCE_LIBRARY_NAME, PERSISTENCE_FUNCTIONS)) return false;
+	if (!LuaBindhelper::AddFunctionsToLib(L, KERNEL_LIBRARY_NAME, KERNEL_FUNCTIONS)) return false;
+	if (!LuaBindhelper::AddFunctionsToLib(L, WINDOW_LIBRARY_NAME, WINDOW_FUNCTIONS)) return false;
+	if (!LuaBindhelper::AddFunctionsToLib(L, RESOURCE_LIBRARY_NAME, RESOURCE_FUNCTIONS)) return false;
+	if (!LuaBindhelper::AddFunctionsToLib(L, PERSISTENCE_LIBRARY_NAME, PERSISTENCE_FUNCTIONS)) return false;
 
 	return true;
 }

Modified: scummvm/trunk/engines/sword25/kernel/persistenceservice.cpp
===================================================================
--- scummvm/trunk/engines/sword25/kernel/persistenceservice.cpp	2010-10-12 22:53:49 UTC (rev 53258)
+++ scummvm/trunk/engines/sword25/kernel/persistenceservice.cpp	2010-10-12 22:55:59 UTC (rev 53259)
@@ -321,7 +321,7 @@
 	BS_OutputPersistenceBlock Writer;
 	bool Success = true;
 	Success &= BS_Kernel::GetInstance()->GetScript()->Persist(Writer);
-	Success &= BS_RegionRegistry::GetInstance().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);
@@ -437,7 +437,7 @@
 	bool Success = true;
 	Success &= BS_Kernel::GetInstance()->GetScript()->Unpersist(Reader);
 	// Muss unbedingt nach Script passieren. Da sonst die bereits wiederhergestellten Regions per Garbage-Collection gekillt werden.
-	Success &= BS_RegionRegistry::GetInstance().Unpersist(Reader);
+	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);

Modified: scummvm/trunk/engines/sword25/kernel/resmanager.cpp
===================================================================
--- scummvm/trunk/engines/sword25/kernel/resmanager.cpp	2010-10-12 22:53:49 UTC (rev 53258)
+++ scummvm/trunk/engines/sword25/kernel/resmanager.cpp	2010-10-12 22:55:59 UTC (rev 53259)
@@ -256,7 +256,7 @@
 */
 Common::String BS_ResourceManager::GetUniqueFileName(const Common::String &FileName) const {
 	// Get a pointer to the package manager
-	BS_PackageManager *pPackage = (BS_PackageManager *)m_KernelPtr->GetService("package");
+	PackageManager *pPackage = (PackageManager *)m_KernelPtr->GetService("package");
 	if (!pPackage) {
 		BS_LOG_ERRORLN("Could not get package manager.");
 		return Common::String("");

Modified: scummvm/trunk/engines/sword25/kernel/resource.cpp
===================================================================
--- scummvm/trunk/engines/sword25/kernel/resource.cpp	2010-10-12 22:53:49 UTC (rev 53258)
+++ scummvm/trunk/engines/sword25/kernel/resource.cpp	2010-10-12 22:55:59 UTC (rev 53259)
@@ -46,7 +46,7 @@
 	_RefCount(0) {
 	BS_ASSERT(BS_Kernel::GetInstance()->GetService("package"));
 
-	_FileName = static_cast<BS_PackageManager *>(BS_Kernel::GetInstance()->GetService("package"))->GetAbsolutePath(FileName);
+	_FileName = static_cast<PackageManager *>(BS_Kernel::GetInstance()->GetService("package"))->GetAbsolutePath(FileName);
 	_FileNameHash = BS_String::GetHash(FileName);
 }
 

Modified: scummvm/trunk/engines/sword25/kernel/service_ids.h
===================================================================
--- scummvm/trunk/engines/sword25/kernel/service_ids.h	2010-10-12 22:53:49 UTC (rev 53258)
+++ scummvm/trunk/engines/sword25/kernel/service_ids.h	2010-10-12 22:55:59 UTC (rev 53259)
@@ -49,13 +49,13 @@
 
 namespace Sword25 {
 
-BS_Service *BS_OpenGLGfx_CreateObject(BS_Kernel *pKernel);
-BS_Service *BS_ScummVMPackageManager_CreateObject(BS_Kernel *pKernel);
+BS_Service *OpenGLGfx_CreateObject(BS_Kernel *pKernel);
+BS_Service *ScummVMPackageManager_CreateObject(BS_Kernel *pKernel);
 BS_Service *ScummVMInput_CreateObject(BS_Kernel *pKernel);
-BS_Service *BS_FMODExSound_CreateObject(BS_Kernel *pKernel);
-BS_Service *BS_LuaScriptEngine_CreateObject(BS_Kernel *pKernel);
-BS_Service *BS_Geometry_CreateObject(BS_Kernel *pKernel);
-BS_Service *BS_OggTheora_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);
 
 // Services are recorded in this table
 const BS_ServiceInfo BS_SERVICE_TABLE[] = {
@@ -64,13 +64,13 @@
 	// of the class and returns it
 	// Example:
 	// BS_ServiceInfo("Superclass", "Service", CreateMethod)
-	BS_ServiceInfo("gfx", "opengl", BS_OpenGLGfx_CreateObject),
-	BS_ServiceInfo("package", "archiveFS", BS_ScummVMPackageManager_CreateObject),
+	BS_ServiceInfo("gfx", "opengl", OpenGLGfx_CreateObject),
+	BS_ServiceInfo("package", "archiveFS", ScummVMPackageManager_CreateObject),
 	BS_ServiceInfo("input", "winapi", ScummVMInput_CreateObject),
-	BS_ServiceInfo("sfx", "fmodex", BS_FMODExSound_CreateObject),
-	BS_ServiceInfo("script", "lua", BS_LuaScriptEngine_CreateObject),
-	BS_ServiceInfo("geometry", "std", BS_Geometry_CreateObject),
-	BS_ServiceInfo("fmv", "oggtheora", BS_OggTheora_CreateObject),
+	BS_ServiceInfo("sfx", "fmodex", FMODExSound_CreateObject),
+	BS_ServiceInfo("script", "lua", LuaScriptEngine_CreateObject),
+	BS_ServiceInfo("geometry", "std", Geometry_CreateObject),
+	BS_ServiceInfo("fmv", "oggtheora", OggTheora_CreateObject),
 };
 
 const unsigned int BS_SERVICE_COUNT = sizeof(BS_SERVICE_TABLE) / sizeof(BS_ServiceInfo);

Modified: scummvm/trunk/engines/sword25/math/geometry.cpp
===================================================================
--- scummvm/trunk/engines/sword25/math/geometry.cpp	2010-10-12 22:53:49 UTC (rev 53258)
+++ scummvm/trunk/engines/sword25/math/geometry.cpp	2010-10-12 22:55:59 UTC (rev 53259)
@@ -38,7 +38,7 @@
 
 #define BS_LOG_PREFIX "GEOMETRY"
 
-BS_Geometry::BS_Geometry(BS_Kernel *pKernel) : BS_Service(pKernel) {
+Geometry::Geometry(BS_Kernel *pKernel) : BS_Service(pKernel) {
 	if (!_RegisterScriptBindings())
 		BS_LOG_ERRORLN("Script bindings could not be registered.");
 	else
@@ -46,8 +46,8 @@
 }
 
 
-BS_Service *BS_Geometry_CreateObject(BS_Kernel *pKernel) {
-	return new BS_Geometry(pKernel);
+BS_Service *Geometry_CreateObject(BS_Kernel *pKernel) {
+	return new Geometry(pKernel);
 }
 
 } // End of namespace Sword25

Modified: scummvm/trunk/engines/sword25/math/geometry.h
===================================================================
--- scummvm/trunk/engines/sword25/math/geometry.h	2010-10-12 22:53:49 UTC (rev 53258)
+++ scummvm/trunk/engines/sword25/math/geometry.h	2010-10-12 22:55:59 UTC (rev 53259)
@@ -42,10 +42,10 @@
 
 class BS_Kernel;
 
-class BS_Geometry : public BS_Service {
+class Geometry : public BS_Service {
 public:
-	BS_Geometry(BS_Kernel *pKernel);
-	virtual ~BS_Geometry() {}
+	Geometry(BS_Kernel *pKernel);
+	virtual ~Geometry() {}
 
 private:
 	bool _RegisterScriptBindings();

Modified: scummvm/trunk/engines/sword25/math/geometry_script.cpp
===================================================================
--- scummvm/trunk/engines/sword25/math/geometry_script.cpp	2010-10-12 22:53:49 UTC (rev 53258)
+++ scummvm/trunk/engines/sword25/math/geometry_script.cpp	2010-10-12 22:55:59 UTC (rev 53259)
@@ -71,7 +71,7 @@
 	if (p != NULL) { /* value is a userdata? */
 		if (lua_getmetatable(L, ud)) { /* does it have a metatable? */
 			// lua_getfield(L, LUA_REGISTRYINDEX, tname);  /* get correct metatable */
-			BS_LuaBindhelper::GetMetatable(L, tname);
+			LuaBindhelper::GetMetatable(L, tname);
 			/* does it have the correct mt? */
 			if (lua_rawequal(L, -1, -2)) {
 				lua_settop(L, top);
@@ -138,7 +138,7 @@
 
 // -----------------------------------------------------------------------------
 
-static void TablePolygonToPolygon(lua_State *L, BS_Polygon &Polygon) {
+static void TablePolygonToPolygon(lua_State *L, Polygon &Polygon) {
 #ifdef DEBUG
 	int __startStackDepth = lua_gettop(L);
 #endif
@@ -151,7 +151,7 @@
 	int VertexCount = luaL_getn(L, -1) / 2;
 
 	// Memory is reserved for Vertecies
-	Common::Array<BS_Vertex> Vertecies;
+	Common::Array<Vertex> Vertecies;
 	Vertecies.reserve(VertexCount);
 
 	// Create Vertecies
@@ -167,7 +167,7 @@
 		lua_pop(L, 1);
 
 		// Vertex
-		Vertecies.push_back(BS_Vertex(X, Y));
+		Vertecies.push_back(Vertex(X, Y));
 	}
 	BS_ASSERT((int)Vertecies.size() == VertexCount);
 
@@ -201,9 +201,9 @@
 
 	unsigned int RegionHandle = 0;
 	if (!strcmp(ClassName, REGION_CLASS_NAME)) {
-		RegionHandle = BS_Region::Create(BS_Region::RT_REGION);
+		RegionHandle = Region::Create(Region::RT_REGION);
 	} else if (!strcmp(ClassName, WALKREGION_CLASS_NAME)) {
-		RegionHandle = BS_WalkRegion::Create(BS_Region::RT_WALKREGION);
+		RegionHandle = WalkRegion::Create(Region::RT_WALKREGION);
 	} else {
 		BS_ASSERT(false);
 	}
@@ -219,23 +219,23 @@
 
 	switch (FirstElementType) {
 	case LUA_TNUMBER: {
-		BS_Polygon Polygon;
-		TablePolygonToPolygon(L, Polygon);
-		BS_RegionRegistry::GetInstance().ResolveHandle(RegionHandle)->Init(Polygon);
+		Polygon polygon;
+		TablePolygonToPolygon(L, polygon);
+		RegionRegistry::GetInstance().ResolveHandle(RegionHandle)->Init(polygon);
 	}
 	break;
 
 	case LUA_TTABLE: {
 		lua_rawgeti(L, -1, 1);
-		BS_Polygon Polygon;
-		TablePolygonToPolygon(L, Polygon);
+		Polygon polygon;
+		TablePolygonToPolygon(L, polygon);
 		lua_pop(L, 1);
 
 		int PolygonCount = luaL_getn(L, -1);
 		if (PolygonCount == 1)
-			BS_RegionRegistry::GetInstance().ResolveHandle(RegionHandle)->Init(Polygon);
+			RegionRegistry::GetInstance().ResolveHandle(RegionHandle)->Init(polygon);
 		else {
-			Common::Array<BS_Polygon> Holes;
+			Common::Array<Polygon> Holes;
 			Holes.reserve(PolygonCount - 1);
 
 			for (int i = 2; i <= PolygonCount; i++) {
@@ -246,7 +246,7 @@
 			}
 			BS_ASSERT((int)Holes.size() == PolygonCount - 1);
 
-			BS_RegionRegistry::GetInstance().ResolveHandle(RegionHandle)->Init(Polygon, &Holes);
+			RegionRegistry::GetInstance().ResolveHandle(RegionHandle)->Init(polygon, &Holes);
 		}
 	}
 	break;
@@ -273,7 +273,7 @@
 
 	NewUintUserData(L, RegionHandle);
 	// luaL_getmetatable(L, ClassName);
-	BS_LuaBindhelper::GetMetatable(L, ClassName);
+	LuaBindhelper::GetMetatable(L, ClassName);
 	BS_ASSERT(!lua_isnil(L, -1));
 	lua_setmetatable(L, -2);
 }
@@ -304,12 +304,12 @@
 
 // -----------------------------------------------------------------------------
 
-static BS_Region *CheckRegion(lua_State *L) {
+static Region *CheckRegion(lua_State *L) {
 	// The first parameter must be of type 'userdata', and the Metatable class Geo.Region or Geo.WalkRegion
 	unsigned int *RegionHandlePtr;
 	if ((RegionHandlePtr = reinterpret_cast<unsigned int *>(my_checkudata(L, 1, REGION_CLASS_NAME))) != 0 ||
 	        (RegionHandlePtr = reinterpret_cast<unsigned int *>(my_checkudata(L, 1, WALKREGION_CLASS_NAME))) != 0) {
-		return BS_RegionRegistry::GetInstance().ResolveHandle(*RegionHandlePtr);
+		return RegionRegistry::GetInstance().ResolveHandle(*RegionHandlePtr);
 	} else {
 		luaL_argcheck(L, 0, 1, "'" REGION_CLASS_NAME "' expected");
 	}
@@ -321,7 +321,7 @@
 // -----------------------------------------------------------------------------
 
 static int R_IsValid(lua_State *L) {
-	BS_Region *pR = CheckRegion(L);
+	Region *pR = CheckRegion(L);
 	BS_ASSERT(pR);
 
 	lua_pushbooleancpp(L, pR->IsValid());
@@ -331,7 +331,7 @@
 // -----------------------------------------------------------------------------
 
 static int R_GetX(lua_State *L) {
-	BS_Region *pR = CheckRegion(L);
+	Region *pR = CheckRegion(L);
 	BS_ASSERT(pR);
 
 	lua_pushnumber(L, pR->GetPosX());
@@ -341,7 +341,7 @@
 // -----------------------------------------------------------------------------
 
 static int R_GetY(lua_State *L) {
-	BS_Region *pR = CheckRegion(L);
+	Region *pR = CheckRegion(L);
 	BS_ASSERT(pR);
 
 	lua_pushnumber(L, pR->GetPosY());
@@ -351,21 +351,21 @@
 // -----------------------------------------------------------------------------
 
 static int R_GetPos(lua_State *L) {
-	BS_Region *pR = CheckRegion(L);
+	Region *pR = CheckRegion(L);
 	BS_ASSERT(pR);
 
-	BS_Vertex::VertexToLuaVertex(L, pR->GetPosition());
+	Vertex::VertexToLuaVertex(L, pR->GetPosition());
 	return 1;
 }
 
 // -----------------------------------------------------------------------------
 
 static int R_IsPointInRegion(lua_State *L) {
-	BS_Region *pR = CheckRegion(L);
+	Region *pR = CheckRegion(L);
 	BS_ASSERT(pR);
 
-	BS_Vertex Vertex;
-	BS_Vertex::LuaVertexToVertex(L, 2, Vertex);
+	Vertex Vertex;
+	Vertex::LuaVertexToVertex(L, 2, Vertex);
 	lua_pushbooleancpp(L, pR->IsPointInRegion(Vertex));
 	return 1;
 }
@@ -373,11 +373,11 @@
 // -----------------------------------------------------------------------------
 
 static int R_SetPos(lua_State *L) {
-	BS_Region *pR = CheckRegion(L);
+	Region *pR = CheckRegion(L);
 	BS_ASSERT(pR);
 
-	BS_Vertex Vertex;
-	BS_Vertex::LuaVertexToVertex(L, 2, Vertex);
+	Vertex Vertex;
+	Vertex::LuaVertexToVertex(L, 2, Vertex);
 	pR->SetPos(Vertex.X, Vertex.Y);
 
 	return 0;
@@ -386,7 +386,7 @@
 // -----------------------------------------------------------------------------
 
 static int R_SetX(lua_State *L) {
-	BS_Region *pR = CheckRegion(L);
+	Region *pR = CheckRegion(L);
 	BS_ASSERT(pR);
 
 	pR->SetPosX(static_cast<int>(luaL_checknumber(L, 2)));
@@ -397,7 +397,7 @@
 // -----------------------------------------------------------------------------
 
 static int R_SetY(lua_State *L) {
-	BS_Region *pR = CheckRegion(L);
+	Region *pR = CheckRegion(L);
 	BS_ASSERT(pR);
 
 	pR->SetPosY(static_cast<int>(luaL_checknumber(L, 2)));
@@ -407,7 +407,7 @@
 
 // -----------------------------------------------------------------------------
 
-static void DrawPolygon(const BS_Polygon &Polygon, unsigned int Color, const BS_Vertex &Offset) {
+static void DrawPolygon(const Polygon &Polygon, unsigned int Color, const Vertex &Offset) {
 	GraphicEngine *pGE = static_cast<GraphicEngine *>(BS_Kernel::GetInstance()->GetService("gfx"));
 	BS_ASSERT(pGE);
 
@@ -419,7 +419,7 @@
 
 // -----------------------------------------------------------------------------
 
-static void DrawRegion(const BS_Region &Region, unsigned int Color, const BS_Vertex &Offset) {
+static void DrawRegion(const Region &Region, unsigned int Color, const Vertex &Offset) {
 	DrawPolygon(Region.GetContour(), Color, Offset);
 	for (int i = 0; i < Region.GetHoleCount(); i++)
 		DrawPolygon(Region.GetHole(i), Color, Offset);
@@ -428,23 +428,23 @@
 // -----------------------------------------------------------------------------
 
 static int R_Draw(lua_State *L) {
-	BS_Region *pR = CheckRegion(L);
+	Region *pR = CheckRegion(L);
 	BS_ASSERT(pR);
 
 	switch (lua_gettop(L)) {
 	case 3: {
-		BS_Vertex Offset;
-		BS_Vertex::LuaVertexToVertex(L, 3, Offset);
+		Vertex Offset;
+		Vertex::LuaVertexToVertex(L, 3, Offset);
 		DrawRegion(*pR, GraphicEngine::LuaColorToARGBColor(L, 2), Offset);
 	}
 	break;
 
 	case 2:
-		DrawRegion(*pR, GraphicEngine::LuaColorToARGBColor(L, 2), BS_Vertex(0, 0));
+		DrawRegion(*pR, GraphicEngine::LuaColorToARGBColor(L, 2), Vertex(0, 0));
 		break;
 
 	default:
-		DrawRegion(*pR, BS_RGB(255, 255, 255), BS_Vertex(0, 0));
+		DrawRegion(*pR, BS_RGB(255, 255, 255), Vertex(0, 0));
 	}
 
 	return 0;
@@ -453,10 +453,10 @@
 // -----------------------------------------------------------------------------
 
 static int R_GetCentroid(lua_State *L) {
-	BS_Region *RPtr = CheckRegion(L);
+	Region *RPtr = CheckRegion(L);
 	BS_ASSERT(RPtr);
 
-	BS_Vertex::VertexToLuaVertex(L, RPtr->GetCentroid());
+	Vertex::VertexToLuaVertex(L, RPtr->GetCentroid());
 
 	return 1;
 }
@@ -464,7 +464,7 @@
 // -----------------------------------------------------------------------------
 
 static int R_Delete(lua_State *L) {
-	BS_Region *pR = CheckRegion(L);
+	Region *pR = CheckRegion(L);
 	BS_ASSERT(pR);
 	delete pR;
 	return 0;
@@ -488,11 +488,11 @@
 
 // -----------------------------------------------------------------------------
 
-static BS_WalkRegion *CheckWalkRegion(lua_State *L) {
+static WalkRegion *CheckWalkRegion(lua_State *L) {
 	// The first parameter must be of type 'userdate', and the Metatable class Geo.WalkRegion
 	unsigned int RegionHandle;
 	if ((RegionHandle = *reinterpret_cast<unsigned int *>(my_checkudata(L, 1, WALKREGION_CLASS_NAME))) != 0) {
-		return reinterpret_cast<BS_WalkRegion *>(BS_RegionRegistry::GetInstance().ResolveHandle(RegionHandle));
+		return reinterpret_cast<WalkRegion *>(RegionRegistry::GetInstance().ResolveHandle(RegionHandle));
 	} else {
 		luaL_argcheck(L, 0, 1, "'" WALKREGION_CLASS_NAME "' expected");
 	}
@@ -504,20 +504,20 @@
 // -----------------------------------------------------------------------------
 
 static int WR_GetPath(lua_State *L) {
-	BS_WalkRegion *pWR = CheckWalkRegion(L);
+	WalkRegion *pWR = CheckWalkRegion(L);
 	BS_ASSERT(pWR);
 
-	BS_Vertex Start;
-	BS_Vertex::LuaVertexToVertex(L, 2, Start);
-	BS_Vertex End;
-	BS_Vertex::LuaVertexToVertex(L, 3, End);
+	Vertex Start;
+	Vertex::LuaVertexToVertex(L, 2, Start);
+	Vertex End;
+	Vertex::LuaVertexToVertex(L, 3, End);
 	BS_Path Path;
 	if (pWR->QueryPath(Start, End, Path)) {
 		lua_newtable(L);
 		BS_Path::const_iterator it = Path.begin();
 		for (; it != Path.end(); it++) {
 			lua_pushnumber(L, (it - Path.begin()) + 1);
-			BS_Vertex::VertexToLuaVertex(L, *it);
+			Vertex::VertexToLuaVertex(L, *it);
 			lua_settable(L, -3);
 		}
 	} else
@@ -535,22 +535,22 @@
 
 // -----------------------------------------------------------------------------
 
-bool BS_Geometry::_RegisterScriptBindings() {
+bool Geometry::_RegisterScriptBindings() {
 	BS_Kernel *pKernel = BS_Kernel::GetInstance();
 	BS_ASSERT(pKernel);
-	BS_ScriptEngine *pScript = static_cast<BS_ScriptEngine *>(pKernel->GetService("script"));
+	ScriptEngine *pScript = static_cast<ScriptEngine *>(pKernel->GetService("script"));
 	BS_ASSERT(pScript);
 	lua_State *L = static_cast< lua_State *>(pScript->GetScriptObject());
 	BS_ASSERT(L);
 
-	if (!BS_LuaBindhelper::AddMethodsToClass(L, REGION_CLASS_NAME, REGION_METHODS)) return false;
-	if (!BS_LuaBindhelper::AddMethodsToClass(L, WALKREGION_CLASS_NAME, REGION_METHODS)) return false;
-	if (!BS_LuaBindhelper::AddMethodsToClass(L, WALKREGION_CLASS_NAME, WALKREGION_METHODS)) return false;
+	if (!LuaBindhelper::AddMethodsToClass(L, REGION_CLASS_NAME, REGION_METHODS)) return false;
+	if (!LuaBindhelper::AddMethodsToClass(L, WALKREGION_CLASS_NAME, REGION_METHODS)) return false;
+	if (!LuaBindhelper::AddMethodsToClass(L, WALKREGION_CLASS_NAME, WALKREGION_METHODS)) return false;
 
-	if (!BS_LuaBindhelper::SetClassGCHandler(L, REGION_CLASS_NAME, R_Delete)) return false;
-	if (!BS_LuaBindhelper::SetClassGCHandler(L, WALKREGION_CLASS_NAME, R_Delete)) return false;
+	if (!LuaBindhelper::SetClassGCHandler(L, REGION_CLASS_NAME, R_Delete)) return false;
+	if (!LuaBindhelper::SetClassGCHandler(L, WALKREGION_CLASS_NAME, R_Delete)) return false;
 
-	if (!BS_LuaBindhelper::AddFunctionsToLib(L, GEO_LIBRARY_NAME, GEO_FUNCTIONS)) return false;
+	if (!LuaBindhelper::AddFunctionsToLib(L, GEO_LIBRARY_NAME, GEO_FUNCTIONS)) return false;
 
 	return true;
 }

Modified: scummvm/trunk/engines/sword25/math/line.h
===================================================================
--- scummvm/trunk/engines/sword25/math/line.h	2010-10-12 22:53:49 UTC (rev 53258)
+++ scummvm/trunk/engines/sword25/math/line.h	2010-10-12 22:55:59 UTC (rev 53259)
@@ -57,7 +57,7 @@
 
 namespace Sword25 {
 
-class BS_Line {
+class Line {
 public:
 	/**
 	 * Determines whether a piont is left of a line
@@ -67,11 +67,11 @@
 	 * @return          Returns true if the point is to the left of the line.
 	 * If the point is to the right of the line or on the line, false is returned.
 	 */
-	static bool IsVertexLeft(const BS_Vertex &a, const BS_Vertex &b, const BS_Vertex &c) {
+	static bool IsVertexLeft(const Vertex &a, const Vertex &b, const Vertex &c) {
 		return _TriangleArea2(a, b, c) > 0;
 	}
 
-	static bool IsVertexLeftOn(const BS_Vertex &a, const BS_Vertex &b, const BS_Vertex &c) {
+	static bool IsVertexLeftOn(const Vertex &a, const Vertex &b, const Vertex &c) {
 		return _TriangleArea2(a, b, c) >= 0;
 	}
 
@@ -83,11 +83,11 @@
 	 * @return          Returns true if the point is to the right of the line.
 	 * If the point is to the right of the line or on the line, false is returned.
 	 */
-	static bool IsVertexRight(const BS_Vertex &a, const BS_Vertex &b, const BS_Vertex &c) {
+	static bool IsVertexRight(const Vertex &a, const Vertex &b, const Vertex &c) {
 		return _TriangleArea2(a, b, c) < 0;
 	}
 
-	static bool IsVertexRightOn(const BS_Vertex &a, const BS_Vertex &b, const BS_Vertex &c) {
+	static bool IsVertexRightOn(const Vertex &a, const Vertex &b, const Vertex &c) {
 		return _TriangleArea2(a, b, c) <= 0;
 	}
 
@@ -98,7 +98,7 @@
 	 * @param c         The test point
 	 * @return          Returns true if the point is on the line, false otherwise.
 	 */
-	static bool IsVertexOn(const BS_Vertex &a, const BS_Vertex &b, const BS_Vertex &c) {
+	static bool IsVertexOn(const Vertex &a, const Vertex &b, const Vertex &c) {
 		return _TriangleArea2(a, b, c) == 0;
 	}
 
@@ -117,7 +117,7 @@
 	 * RIGHT is returned if the point is to the right of the line.
 	 * ON is returned if the point is on the line.
 	 */
-	static VERTEX_CLASSIFICATION ClassifyVertexToLine(const BS_Vertex &a, const BS_Vertex &b, const BS_Vertex &c) {
+	static VERTEX_CLASSIFICATION ClassifyVertexToLine(const Vertex &a, const Vertex &b, const Vertex &c) {
 		int Area = _TriangleArea2(a, b, c);
 		if (Area > 0) return LEFT;
 		if (Area < 0) return RIGHT;
@@ -132,7 +132,7 @@
 	 * @param d         The end point of the second line
 	 * @remark          In cases where a line only touches the other, false is returned (improper intersection)
 	 */
-	static bool DoesIntersectProperly(const BS_Vertex &a, const BS_Vertex &b, const BS_Vertex &c, const BS_Vertex &d) {
+	static bool DoesIntersectProperly(const Vertex &a, const Vertex &b, const Vertex &c, const Vertex &d) {
 		VERTEX_CLASSIFICATION Class1 = ClassifyVertexToLine(a, b, c);
 		VERTEX_CLASSIFICATION Class2 = ClassifyVertexToLine(a, b, d);
 		VERTEX_CLASSIFICATION Class3 = ClassifyVertexToLine(c, d, a);
@@ -149,7 +149,7 @@
 	 * @param b         The end point of a line
 	 * @param c         The test point
 	 */
-	static bool IsOnLine(const BS_Vertex &a, const BS_Vertex &b, const BS_Vertex &c) {
+	static bool IsOnLine(const Vertex &a, const Vertex &b, const Vertex &c) {
 		// The items must all be Collinear, otherwise don't bothering testing the point
 		if (_TriangleArea2(a, b, c) != 0) return false;
 
@@ -167,7 +167,7 @@
 		}
 	}
 
-	static bool IsOnLineStrict(const BS_Vertex &a, const BS_Vertex &b, const BS_Vertex &c) {
+	static bool IsOnLineStrict(const Vertex &a, const Vertex &b, const Vertex &c) {
 		// The items must all be Collinear, otherwise don't bothering testing the point
 		if (_TriangleArea2(a, b, c) != 0) return false;
 
@@ -192,7 +192,7 @@
 	 * The result is positive if the points are arrange counterclockwise,
 	 * and negative if they are arranged counter-clockwise.
 	 */
-	static int _TriangleArea2(const BS_Vertex &a, const BS_Vertex &b, const BS_Vertex &c) {
+	static int _TriangleArea2(const Vertex &a, const Vertex &b, const Vertex &c) {
 		return a.X * b.Y - a.Y * b.X +
 		       a.Y * c.X - a.X * c.Y +
 		       b.X * c.Y - c.X * b.Y;

Modified: scummvm/trunk/engines/sword25/math/polygon.cpp
===================================================================
--- scummvm/trunk/engines/sword25/math/polygon.cpp	2010-10-12 22:53:49 UTC (rev 53258)
+++ scummvm/trunk/engines/sword25/math/polygon.cpp	2010-10-12 22:55:59 UTC (rev 53259)
@@ -47,36 +47,36 @@
 // Constructor / Destructor
 // --------------------------
 
-BS_Polygon::BS_Polygon() : VertexCount(0), Vertecies(NULL) {
+Polygon::Polygon() : VertexCount(0), Vertecies(NULL) {
 }
 
-BS_Polygon::BS_Polygon(int VertexCount_, const BS_Vertex *Vertecies_) : VertexCount(0), Vertecies(NULL) {
+Polygon::Polygon(int VertexCount_, const Vertex *Vertecies_) : VertexCount(0), Vertecies(NULL) {
 	Init(VertexCount_, Vertecies_);
 }
 
-BS_Polygon::BS_Polygon(const BS_Polygon &Other) : VertexCount(0), Vertecies(NULL) {
+Polygon::Polygon(const Polygon &Other) : VertexCount(0), Vertecies(NULL) {
 	Init(Other.VertexCount, Other.Vertecies);
 }
 
-BS_Polygon::BS_Polygon(BS_InputPersistenceBlock &Reader) : VertexCount(0), Vertecies(NULL) {
+Polygon::Polygon(BS_InputPersistenceBlock &Reader) : VertexCount(0), Vertecies(NULL) {
 	Unpersist(Reader);
 }
 
-BS_Polygon::~BS_Polygon() {
+Polygon::~Polygon() {
 	delete[] Vertecies;
 }
 
 // Initialisation
 // ---------------
 
-bool BS_Polygon::Init(int VertexCount_, const BS_Vertex *Vertecies_) {
+bool Polygon::Init(int VertexCount_, const Vertex *Vertecies_) {
 	// Rember the old obstate to restore it if an error occurs whilst initialising it with the new data
 	int OldVertexCount = this->VertexCount;
-	BS_Vertex *OldVertecies = this->Vertecies;
+	Vertex *OldVertecies = this->Vertecies;
 
 	this->VertexCount = VertexCount_;
-	this->Vertecies = new BS_Vertex[VertexCount_ + 1];
-	memcpy(this->Vertecies, Vertecies_, sizeof(BS_Vertex) * VertexCount_);
+	this->Vertecies = new Vertex[VertexCount_ + 1];
+	memcpy(this->Vertecies, Vertecies_, sizeof(Vertex) * VertexCount_);
 	// TODO:
 	// Duplicate and remove redundant vertecies (Superflous = 3 co-linear verts)
 	// _WeedRepeatedVertecies();
@@ -108,15 +108,15 @@
 // Review the order of the Vertecies
 // ---------------------------------
 
-bool BS_Polygon::IsCW() const {
+bool Polygon::IsCW() const {
 	return m_IsCW;
 }
 
-bool BS_Polygon::IsCCW() const {
+bool Polygon::IsCCW() const {
 	return !IsCW();
 }
 
-bool BS_Polygon::ComputeIsCW() const {
+bool Polygon::ComputeIsCW() const {
 	if (VertexCount) {
 		// Find the vertex on extreme bottom right
 		int V2Index = FindLRVertexIndex();
@@ -134,7 +134,7 @@
 	return false;
 }
 
-int BS_Polygon::FindLRVertexIndex() const {
+int Polygon::FindLRVertexIndex() const {
 	if (VertexCount) {
 		int CurIndex = 0;
 		int MaxX = Vertecies[0].X;
@@ -158,15 +158,15 @@
 // Testing for Convex / Concave
 // ------------------------
 
-bool BS_Polygon::IsConvex() const {
+bool Polygon::IsConvex() const {
 	return m_IsConvex;
 }
 
-bool BS_Polygon::IsConcave() const {
+bool Polygon::IsConcave() const {
 	return !IsConvex();
 }
 
-bool BS_Polygon::ComputeIsConvex() const {
+bool Polygon::ComputeIsConvex() const {
 	// Polygons with three or less Vertecies can only be convex
 	if (VertexCount <= 3) return true;
 
@@ -201,12 +201,12 @@
 // Make a determine vertex order
 // -----------------------------
 
-void BS_Polygon::EnsureCWOrder() {
+void Polygon::EnsureCWOrder() {
 	if (!IsCW())
 		ReverseVertexOrder();
 }
 
-void BS_Polygon::EnsureCCWOrder() {
+void Polygon::EnsureCCWOrder() {
 	if (!IsCCW())
 		ReverseVertexOrder();
 }
@@ -214,10 +214,10 @@
 // Reverse the order of vertecies
 // ------------------------------
 
-void BS_Polygon::ReverseVertexOrder() {
+void Polygon::ReverseVertexOrder() {
 	// Vertecies are exchanged in pairs, until the list has been completely reversed
 	for (int i = 0; i < VertexCount / 2; i++) {
-		BS_Vertex tempVertex = Vertecies[i];
+		Vertex tempVertex = Vertecies[i];
 		Vertecies[i] = Vertecies[VertexCount - i - 1];
 		Vertecies[VertexCount - i - 1] = tempVertex;
 	}
@@ -229,7 +229,7 @@
 // Cross Product
 // -------------
 
-int BS_Polygon::CrossProduct(const BS_Vertex &V1, const BS_Vertex &V2, const BS_Vertex &V3) const {
+int Polygon::CrossProduct(const Vertex &V1, const Vertex &V2, const Vertex &V3) const {
 	return (V2.X - V1.X) * (V3.Y - V2.Y) -
 	       (V2.Y - V1.Y) * (V3.X - V2.X);
 }
@@ -237,7 +237,7 @@
 // Scalar Product
 // --------------
 
-int BS_Polygon::DotProduct(const BS_Vertex &V1, const BS_Vertex &V2, const BS_Vertex &V3) const {
+int Polygon::DotProduct(const Vertex &V1, const Vertex &V2, const Vertex &V3) const {
 	return (V1.X - V2.X) * (V3.X - V2.X) +
 	       (V1.Y - V2.Y) * (V3.X - V2.Y);
 }
@@ -245,7 +245,7 @@
 // Check for self-intersections
 // ----------------------------
 
-bool BS_Polygon::CheckForSelfIntersection() const {
+bool Polygon::CheckForSelfIntersection() const {
 	// TODO: Finish this
 	/*
 	float AngleSum = 0.0f;
@@ -275,7 +275,7 @@
 // Move
 // ----
 
-void BS_Polygon::operator+=(const BS_Vertex &Delta) {
+void Polygon::operator+=(const Vertex &Delta) {
 	// Move all vertecies
 	for (int i = 0; i < VertexCount; i++)
 		Vertecies[i] += Delta;
@@ -287,7 +287,7 @@
 // Line of Sight
 // -------------
 
-bool BS_Polygon::IsLineInterior(const BS_Vertex &a, const BS_Vertex &b) const {
+bool Polygon::IsLineInterior(const Vertex &a, const Vertex &b) const {
 	// Both points have to be in the polygon
 	if (!IsPointInPolygon(a, true) || !IsPointInPolygon(b, true)) return false;
 
@@ -297,16 +297,16 @@
 	// Test whether the line intersects a line segment strictly (proper intersection)
 	for (int i = 0; i < VertexCount; i++) {
 		int j = (i + 1) % VertexCount;
-		const BS_Vertex &VS = Vertecies[i];
-		const BS_Vertex &VE = Vertecies[j];
+		const Vertex &VS = Vertecies[i];
+		const Vertex &VE = Vertecies[j];
 
 		// If the line intersects a line segment strictly (proper cross section) the line is not in the polygon
-		if (BS_Line::DoesIntersectProperly(a, b, VS, VE)) return false;
+		if (Line::DoesIntersectProperly(a, b, VS, VE)) return false;
 
 		// If one of the two line items is on the edge and the other is to the right of the edge,
 		// then the line is not completely within the polygon
-		if (BS_Line::IsOnLineStrict(VS, VE, a) && BS_Line::IsVertexRight(VS, VE, b)) return false;
-		if (BS_Line::IsOnLineStrict(VS, VE, b) && BS_Line::IsVertexRight(VS, VE, a)) return false;
+		if (Line::IsOnLineStrict(VS, VE, a) && Line::IsVertexRight(VS, VE, b)) return false;
+		if (Line::IsOnLineStrict(VS, VE, b) && Line::IsVertexRight(VS, VE, a)) return false;
 
 		// If one of the two line items is on a vertex, the line traces into the polygon
 		if ((a == VS) && !IsLineInCone(i, b, true)) return false;
@@ -316,7 +316,7 @@
 	return true;
 }
 
-bool BS_Polygon::IsLineExterior(const BS_Vertex &a, const BS_Vertex &b) const {
+bool Polygon::IsLineExterior(const Vertex &a, const Vertex &b) const {
 	// Neither of the two points must be strictly in the polygon (on the edge is allowed)
 	if (IsPointInPolygon(a, false) || IsPointInPolygon(b, false)) return false;
 
@@ -326,24 +326,24 @@
 	// Test whether the line intersects a line segment strictly (proper intersection)
 	for (int i = 0; i < VertexCount; i++) {
 		int j = (i + 1) % VertexCount;
-		const BS_Vertex &VS = Vertecies[i];
-		const BS_Vertex &VE = Vertecies[j];
+		const Vertex &VS = Vertecies[i];
+		const Vertex &VE = Vertecies[j];
 
 		// If the line intersects a line segment strictly (proper intersection), then
 		// the line is partially inside the polygon
-		if (BS_Line::DoesIntersectProperly(a, b, VS, VE)) return false;
+		if (Line::DoesIntersectProperly(a, b, VS, VE)) return false;
 
 		// If one of the two line items is on the edge and the other is to the right of the edge,
 		// the line is not completely outside the polygon
-		if (BS_Line::IsOnLineStrict(VS, VE, a) && BS_Line::IsVertexLeft(VS, VE, b)) return false;
-		if (BS_Line::IsOnLineStrict(VS, VE, b) && BS_Line::IsVertexLeft(VS, VE, a)) return false;
+		if (Line::IsOnLineStrict(VS, VE, a) && Line::IsVertexLeft(VS, VE, b)) return false;
+		if (Line::IsOnLineStrict(VS, VE, b) && Line::IsVertexLeft(VS, VE, a)) return false;
 
 		// If one of the lwo line items is on a vertex, the line must not run into the polygon
 		if ((a == VS) && IsLineInCone(i, b, false)) return false;
 		if ((b == VS) && IsLineInCone(i, a, false)) return false;
 
 		// If the vertex with start and end point is collinear, (a VS) and (b, VS) is not in the polygon
-		if (BS_Line::IsOnLine(a, b, VS)) {
+		if (Line::IsOnLine(a, b, VS)) {
 			if (IsLineInCone(i, a, false)) return false;
 			if (IsLineInCone(i, b, false)) return false;
 		}
@@ -352,43 +352,43 @@
 	return true;
 }
 
-bool BS_Polygon::IsLineInCone(int StartVertexIndex, const BS_Vertex &EndVertex, bool IncludeEdges) const {
-	const BS_Vertex &StartVertex = Vertecies[StartVertexIndex];
-	const BS_Vertex &NextVertex = Vertecies[(StartVertexIndex + 1) % VertexCount];
-	const BS_Vertex &PrevVertex = Vertecies[(StartVertexIndex + VertexCount - 1) % VertexCount];
+bool Polygon::IsLineInCone(int StartVertexIndex, const Vertex &EndVertex, bool IncludeEdges) const {
+	const Vertex &StartVertex = Vertecies[StartVertexIndex];
+	const Vertex &NextVertex = Vertecies[(StartVertexIndex + 1) % VertexCount];
+	const Vertex &PrevVertex = Vertecies[(StartVertexIndex + VertexCount - 1) % VertexCount];
 
-	if (BS_Line::IsVertexLeftOn(PrevVertex, StartVertex, NextVertex)) {
+	if (Line::IsVertexLeftOn(PrevVertex, StartVertex, NextVertex)) {
 		if (IncludeEdges)
-			return BS_Line::IsVertexLeftOn(EndVertex, StartVertex, NextVertex) &&
-			       BS_Line::IsVertexLeftOn(StartVertex, EndVertex, PrevVertex);
+			return Line::IsVertexLeftOn(EndVertex, StartVertex, NextVertex) &&
+			       Line::IsVertexLeftOn(StartVertex, EndVertex, PrevVertex);
 		else
-			return BS_Line::IsVertexLeft(EndVertex, StartVertex, NextVertex) &&
-			       BS_Line::IsVertexLeft(StartVertex, EndVertex, PrevVertex);
+			return Line::IsVertexLeft(EndVertex, StartVertex, NextVertex) &&
+			       Line::IsVertexLeft(StartVertex, EndVertex, PrevVertex);
 	} else {
 		if (IncludeEdges)
-			return !(BS_Line::IsVertexLeft(EndVertex, StartVertex, PrevVertex) &&
-			         BS_Line::IsVertexLeft(StartVertex, EndVertex, NextVertex));
+			return !(Line::IsVertexLeft(EndVertex, StartVertex, PrevVertex) &&
+			         Line::IsVertexLeft(StartVertex, EndVertex, NextVertex));
 		else
-			return !(BS_Line::IsVertexLeftOn(EndVertex, StartVertex, PrevVertex) &&
-			         BS_Line::IsVertexLeftOn(StartVertex, EndVertex, NextVertex));
+			return !(Line::IsVertexLeftOn(EndVertex, StartVertex, PrevVertex) &&
+			         Line::IsVertexLeftOn(StartVertex, EndVertex, NextVertex));
 	}
 }
 
 // Point-Polygon Tests
 // -------------------
 
-bool BS_Polygon::IsPointInPolygon(int X, int Y, bool BorderBelongsToPolygon) const {
-	return IsPointInPolygon(BS_Vertex(X, Y), BorderBelongsToPolygon);
+bool Polygon::IsPointInPolygon(int X, int Y, bool BorderBelongsToPolygon) const {
+	return IsPointInPolygon(Vertex(X, Y), BorderBelongsToPolygon);
 }
 
-bool BS_Polygon::IsPointInPolygon(const BS_Vertex &Point, bool EdgesBelongToPolygon) const {
+bool Polygon::IsPointInPolygon(const Vertex &Point, bool EdgesBelongToPolygon) const {
 	int Rcross = 0; // Number of right-side overlaps
 	int Lcross = 0; // Number of left-side overlaps
 
 	// Each edge is checked whether it cuts the outgoing stream from the point
 	for (int i = 0; i < VertexCount; i++) {
-		const BS_Vertex &EdgeStart = Vertecies[i];
-		const BS_Vertex &EdgeEnd = Vertecies[(i + 1) % VertexCount];
+		const Vertex &EdgeStart = Vertecies[i];
+		const Vertex &EdgeEnd = Vertecies[(i + 1) % VertexCount];
 
 		// A vertex is a point? Then it lies on one edge of the polygon
 		if (Point == EdgeStart) return EdgesBelongToPolygon;
@@ -414,7 +414,7 @@
 	else return false;
 }
 
-bool BS_Polygon::Persist(BS_OutputPersistenceBlock &Writer) {
+bool Polygon::Persist(BS_OutputPersistenceBlock &Writer) {
 	Writer.Write(VertexCount);
 	for (int i = 0; i < VertexCount; ++i) {
 		Writer.Write(Vertecies[i].X);
@@ -424,16 +424,16 @@
 	return true;
 }
 
-bool BS_Polygon::Unpersist(BS_InputPersistenceBlock &Reader) {
+bool Polygon::Unpersist(BS_InputPersistenceBlock &Reader) {
 	int StoredVertexCount;
 	Reader.Read(StoredVertexCount);
 
-	Common::Array<BS_Vertex> StoredVertecies;
+	Common::Array<Vertex> StoredVertecies;
 	for (int i = 0; i < StoredVertexCount; ++i) {
 		int x, y;
 		Reader.Read(x);
 		Reader.Read(y);
-		StoredVertecies.push_back(BS_Vertex(x, y));
+		StoredVertecies.push_back(Vertex(x, y));
 	}
 
 	Init(StoredVertexCount, &StoredVertecies[0]);
@@ -444,11 +444,11 @@
 // Main Focus
 // ----------
 
-BS_Vertex BS_Polygon::GetCentroid() const {
+Vertex Polygon::GetCentroid() const {
 	return m_Centroid;
 }
 
-BS_Vertex BS_Polygon::ComputeCentroid() const {
+Vertex Polygon::ComputeCentroid() const {
 	// Area of the polygon is calculated
 	int DoubleArea = 0;
 	for (int i = 0; i < VertexCount; ++i) {
@@ -456,10 +456,10 @@
 	}
 
 	// Avoid division by zero in the next step
-	if (DoubleArea == 0) return BS_Vertex();
+	if (DoubleArea == 0) return Vertex();
 
 	// Calculate centroid
-	BS_Vertex Centroid;
+	Vertex Centroid;
 	for (int i = 0; i < VertexCount; ++i) {
 		int Area = Vertecies[i].X * Vertecies[i + 1].Y - Vertecies[i + 1].X * Vertecies[i].Y;
 		Centroid.X += (Vertecies[i].X + Vertecies[i + 1].X) * Area;

Modified: scummvm/trunk/engines/sword25/math/polygon.h
===================================================================
--- scummvm/trunk/engines/sword25/math/polygon.h	2010-10-12 22:53:49 UTC (rev 53258)
+++ scummvm/trunk/engines/sword25/math/polygon.h	2010-10-12 22:55:59 UTC (rev 53259)
@@ -46,29 +46,29 @@
 // Forward Declarations
 // -----------------------------------------------------------------------------
 
-class BS_Vertex;
+class Vertex;
 
 /**
     @brief Eine Polygonklasse.
 */
-class BS_Polygon : public BS_Persistable {
+class Polygon : public BS_Persistable {
 public:
 	/**
 	 * Creates an object of type #BS_Polygon, containing 0 Vertecies.
 	 *
 	 * With the method Init(), Vertices can be added in later
 	 */
-	BS_Polygon();
+	Polygon();
 
 	/**
 	 * Copy constructor
 	 */
-	BS_Polygon(const BS_Polygon &Other);
+	Polygon(const Polygon &Other);
 
 	/**
 	 * Creates a polygon using persisted data
 	 */
-	BS_Polygon(BS_InputPersistenceBlock &Reader);
+	Polygon(BS_InputPersistenceBlock &Reader);
 
 	/**
 	 * Creaes an object of type #BS_Polygon, and assigns Vertices to it
@@ -77,12 +77,12 @@
 	 * @remark                  The Vertecies that define a polygon must not have any self-intersections.
 	 * If the polygon does have self-intersections, then an empty polygon object is created.
 	 */
-	BS_Polygon(int VertexCount, const BS_Vertex *Vertecies);
+	Polygon(int VertexCount, const Vertex *Vertecies);
 
 	/**
 	 * Deletes the BS_Polygon object
 	 */
-	virtual ~BS_Polygon();
+	virtual ~Polygon();
 
 	/**
 	 * Initialises the BS_Polygon with a list of Vertecies.
@@ -95,7 +95,7 @@
 	 * @return                  Returns false if the Vertecies have self-intersections. In this case,
 	 * the object is not initialised.
 	 */
-	bool Init(int VertexCount, const BS_Vertex *Vertecies);
+	bool Init(int VertexCount, const Vertex *Vertecies);
 
 	//
 	// ** Exploratory methods **
@@ -137,7 +137,7 @@
 	 * @param BorderBelongsToPolygon    Specifies whether the edge of the polygon should be considered
 	 * @return                  Returns true if the point is inside the polygon, false if it is outside.
 	 */
-	bool IsPointInPolygon(const BS_Vertex &Vertex, bool BorderBelongsToPolygon = true) const;
+	bool IsPointInPolygon(const Vertex &Vertex, bool BorderBelongsToPolygon = true) const;
 
 	/**
 	 * Checks whether a point is inside the polygon
@@ -151,14 +151,14 @@
 	/**
 	 * Returns the focus/centroid of the polygon
 	 */
-	BS_Vertex GetCentroid() const;
+	Vertex GetCentroid() const;
 
 	// Edge belongs to the polygon
 	// Polygon must be CW
-	bool IsLineInterior(const BS_Vertex &a, const BS_Vertex &b) const;
+	bool IsLineInterior(const Vertex &a, const Vertex &b) const;
 	// Edge does not belong to the polygon
 	// Polygon must be CW
-	bool IsLineExterior(const BS_Vertex &a, const BS_Vertex &b) const;
+	bool IsLineExterior(const Vertex &a, const Vertex &b) const;
 
 	//
 	// Manipulation methods
@@ -183,7 +183,7 @@
 	 * Moves the polygon.
 	 * @param Delta             The vertex around the polygon to be moved.
 	 */
-	void operator+=(const BS_Vertex &Delta);
+	void operator+=(const Vertex &Delta);
 
 	//
 	//------------------
@@ -192,7 +192,7 @@
 	/// Specifies the number of Vertecies in the Vertecies array.
 	int VertexCount;
 	/// COntains the Vertecies of the polygon
-	BS_Vertex *Vertecies;
+	Vertex *Vertecies;
 
 	virtual bool Persist(BS_OutputPersistenceBlock &Writer);
 	virtual bool Unpersist(BS_InputPersistenceBlock &Reader);
@@ -200,12 +200,12 @@
 private:
 	bool m_IsCW;
 	bool m_IsConvex;
-	BS_Vertex m_Centroid;
+	Vertex m_Centroid;
 
 	/**
 	 * Computes the centroid of the polygon.
 	 */
-	BS_Vertex ComputeCentroid() const;
+	Vertex ComputeCentroid() const;
 
 	/**
 	 * Determines how the Vertecies of the polygon are arranged.
@@ -228,7 +228,7 @@
 	 * @return                  Returns the cross-product of the three vertecies
 	 * @todo                    This method would be better as a method of the BS_Vertex class
 	 */
-	int CrossProduct(const BS_Vertex &V1, const BS_Vertex &V2, const BS_Vertex &V3) const;
+	int CrossProduct(const Vertex &V1, const Vertex &V2, const Vertex &V3) const;
 
 	/**
 	 * Computes the scalar product of two vectors spanning three vertecies
@@ -241,7 +241,7 @@
 	 * @return                  Returns the dot product of the three Vertecies.
 	 * @todo                    This method would be better as a method of the BS_Vertex class
 	 */
-	int DotProduct(const BS_Vertex &V1, const BS_Vertex &V2, const BS_Vertex &V3) const;
+	int DotProduct(const Vertex &V1, const Vertex &V2, const Vertex &V3) const;
 
 	/**
 	 * Checks whether the polygon is self-intersecting
@@ -258,7 +258,7 @@
 	 */
 	int FindLRVertexIndex() const;
 
-	bool IsLineInCone(int StartVertexIndex, const BS_Vertex &EndVertex, bool IncludeEdges) const;
+	bool IsLineInCone(int StartVertexIndex, const Vertex &EndVertex, bool IncludeEdges) const;
 };
 
 } // End of namespace Sword25

Modified: scummvm/trunk/engines/sword25/math/rect.h
===================================================================
--- scummvm/trunk/engines/sword25/math/rect.h	2010-10-12 22:53:49 UTC (rev 53258)
+++ scummvm/trunk/engines/sword25/math/rect.h	2010-10-12 22:55:59 UTC (rev 53259)
@@ -98,7 +98,7 @@
 		return isValidRect();
 	}
 
-	bool IsPointInRect(const BS_Vertex &Vertex) const {
+	bool IsPointInRect(const Vertex &Vertex) const {
 		return contains(Vertex.X, Vertex.Y);
 	}
 

Modified: scummvm/trunk/engines/sword25/math/region.cpp
===================================================================
--- scummvm/trunk/engines/sword25/math/region.cpp	2010-10-12 22:53:49 UTC (rev 53258)
+++ scummvm/trunk/engines/sword25/math/region.cpp	2010-10-12 22:55:59 UTC (rev 53259)
@@ -46,69 +46,69 @@
 // Constructor / Destructor
 // ------------------------
 
-BS_Region::BS_Region() : m_Valid(false), m_Type(RT_REGION) {
-	BS_RegionRegistry::GetInstance().RegisterObject(this);
+Region::Region() : m_Valid(false), m_Type(RT_REGION) {
+	RegionRegistry::GetInstance().RegisterObject(this);
 }
 
 // -----------------------------------------------------------------------------
 
-BS_Region::BS_Region(BS_InputPersistenceBlock &Reader, unsigned int Handle) : m_Valid(false), m_Type(RT_REGION) {
-	BS_RegionRegistry::GetInstance().RegisterObject(this, Handle);
+Region::Region(BS_InputPersistenceBlock &Reader, unsigned int Handle) : m_Valid(false), m_Type(RT_REGION) {
+	RegionRegistry::GetInstance().RegisterObject(this, Handle);
 	Unpersist(Reader);
 }
 
 // -----------------------------------------------------------------------------
 
-unsigned int BS_Region::Create(REGION_TYPE Type) {
-	BS_Region *RegionPtr = NULL;
+unsigned int Region::Create(REGION_TYPE Type) {
+	Region *RegionPtr = NULL;
 	switch (Type) {
 	case RT_REGION:
-		RegionPtr = new BS_Region();
+		RegionPtr = new Region();
 		break;
 
 	case RT_WALKREGION:
-		RegionPtr = new BS_WalkRegion();
+		RegionPtr = new WalkRegion();
 		break;
 
 	default:
 		BS_ASSERT(true);
 	}
 
-	return BS_RegionRegistry::GetInstance().ResolvePtr(RegionPtr);
+	return RegionRegistry::GetInstance().ResolvePtr(RegionPtr);
 }
 
 // -----------------------------------------------------------------------------
 
-unsigned int BS_Region::Create(BS_InputPersistenceBlock &Reader, unsigned int Handle) {
+unsigned int Region::Create(BS_InputPersistenceBlock &Reader, unsigned int Handle) {
 	// Read type
 	unsigned int Type;
 	Reader.Read(Type);
 
 	// Depending on the type, create a new BS_Region or BS_WalkRegion object
-	BS_Region *RegionPtr = NULL;
+	Region *RegionPtr = NULL;
 	if (Type == RT_REGION) {
-		RegionPtr = new BS_Region(Reader, Handle);
+		RegionPtr = new Region(Reader, Handle);
 	} else if (Type == RT_WALKREGION) {
-		RegionPtr = new BS_WalkRegion(Reader, Handle);
+		RegionPtr = new WalkRegion(Reader, Handle);
 	} else {
 		BS_ASSERT(false);
 	}
 
-	return BS_RegionRegistry::GetInstance().ResolvePtr(RegionPtr);
+	return RegionRegistry::GetInstance().ResolvePtr(RegionPtr);
 }
 
 // -----------------------------------------------------------------------------
 
-BS_Region::~BS_Region() {
-	BS_RegionRegistry::GetInstance().DeregisterObject(this);
+Region::~Region() {
+	RegionRegistry::GetInstance().DeregisterObject(this);
 }
 
 // -----------------------------------------------------------------------------
 
-bool BS_Region::Init(const BS_Polygon &Contour, const Common::Array<BS_Polygon> *pHoles) {
+bool Region::Init(const Polygon &Contour, const Common::Array<Polygon> *pHoles) {
 	// Reset object state
 	m_Valid = false;
-	m_Position = BS_Vertex(0, 0);
+	m_Position = Vertex(0, 0);
 	m_Polygons.clear();
 
 	// Reserve sufficient  space for countour and holes in the polygon list
@@ -118,7 +118,7 @@
 		m_Polygons.reserve(1);
 
 	// The first polygon will be the contour
-	m_Polygons.push_back(BS_Polygon());
+	m_Polygons.push_back(Polygon());
 	m_Polygons[0].Init(Contour.VertexCount, Contour.Vertecies);
 	// Make sure that the Vertecies in the Contour are arranged in a clockwise direction
 	m_Polygons[0].EnsureCWOrder();
@@ -126,7 +126,7 @@
 	// Place the hole polygons in the following positions
 	if (pHoles) {
 		for (unsigned int i = 0; i < pHoles->size(); ++i) {
-			m_Polygons.push_back(BS_Polygon());
+			m_Polygons.push_back(Polygon());
 			m_Polygons[i + 1].Init((*pHoles)[i].VertexCount, (*pHoles)[i].Vertecies);
 			m_Polygons[i + 1].EnsureCWOrder();
 		}
@@ -142,7 +142,7 @@
 
 // -----------------------------------------------------------------------------
 
-void BS_Region::UpdateBoundingBox() {
+void Region::UpdateBoundingBox() {
 	if (m_Polygons[0].VertexCount) {
 		int MinX = m_Polygons[0].Vertecies[0].X;
 		int MaxX = m_Polygons[0].Vertecies[0].X;
@@ -163,12 +163,12 @@
 // Position Changes
 // ----------------
 
-void BS_Region::SetPos(int X, int Y) {
+void Region::SetPos(int X, int Y) {
 	// Calculate the difference between the old and new position
-	BS_Vertex Delta(X - m_Position.X, Y - m_Position.Y);
+	Vertex Delta(X - m_Position.X, Y - m_Position.Y);
 
 	// Save the new position
-	m_Position = BS_Vertex(X, Y);
+	m_Position = Vertex(X, Y);
 
 	// Move all the vertecies
 	for (unsigned int i = 0; i < m_Polygons.size(); ++i) {
@@ -181,20 +181,20 @@
 
 // -----------------------------------------------------------------------------
 
-void BS_Region::SetPosX(int X) {
+void Region::SetPosX(int X) {
 	SetPos(X, m_Position.Y);
 }
 
 // -----------------------------------------------------------------------------
 
-void BS_Region::SetPosY(int Y) {
+void Region::SetPosY(int Y) {
 	SetPos(m_Position.X, Y);
 }
 
 // Point-Region Tests
 // ------------------
 
-bool BS_Region::IsPointInRegion(int X, int Y) const {
+bool Region::IsPointInRegion(int X, int Y) const {
 	// Test whether the point is in the bounding box
 	if (m_BoundingBox.IsPointInRect(X, Y)) {
 		// Test whether the point is in the contour
@@ -214,13 +214,13 @@
 
 // -----------------------------------------------------------------------------
 
-bool BS_Region::IsPointInRegion(const BS_Vertex &Vertex) const {
+bool Region::IsPointInRegion(const Vertex &Vertex) const {
 	return IsPointInRegion(Vertex.X, Vertex.Y);
 }
 
 // -----------------------------------------------------------------------------
 
-BS_Vertex BS_Region::FindClosestRegionPoint(const BS_Vertex &Point) const {
+Vertex Region::FindClosestRegionPoint(const Vertex &Point) const {
 	// Determine whether the point is inside a hole. If that is the case, the closest
 	// point on the edge of the hole is determined
 	int PolygonIdx = 0;
@@ -233,18 +233,18 @@
 		}
 	}
 
-	const BS_Polygon &Polygon = m_Polygons[PolygonIdx];
+	const Polygon &Polygon = m_Polygons[PolygonIdx];
 
 	BS_ASSERT(Polygon.VertexCount > 1);
 
 	// For each line of the polygon, calculate the point that is cloest to the given point
 	// The point of this set with the smallest distance to the given point is the result.
-	BS_Vertex ClosestVertex = FindClosestPointOnLine(Polygon.Vertecies[0], Polygon.Vertecies[1], Point);
+	Vertex ClosestVertex = FindClosestPointOnLine(Polygon.Vertecies[0], Polygon.Vertecies[1], Point);
 	int ClosestVertexDistance2 = ClosestVertex.Distance(Point);
 	for (int i = 1; i < Polygon.VertexCount; ++i) {
 		int j = (i + 1) % Polygon.VertexCount;
 
-		BS_Vertex CurVertex = FindClosestPointOnLine(Polygon.Vertecies[i], Polygon.Vertecies[j], Point);
+		Vertex CurVertex = FindClosestPointOnLine(Polygon.Vertecies[i], Polygon.Vertecies[j], Point);
 		if (CurVertex.Distance(Point) < ClosestVertexDistance2) {
 			ClosestVertex = CurVertex;
 			ClosestVertexDistance2 = CurVertex.Distance(Point);
@@ -258,22 +258,22 @@
 	else {
 		// Try to construct a point within the region - 8 points are tested in the immediate vacinity
 		// of the point
-		if (IsPointInRegion(ClosestVertex + BS_Vertex(-2, -2)))
-			return ClosestVertex + BS_Vertex(-2, -2);
-		else if (IsPointInRegion(ClosestVertex + BS_Vertex(0, -2)))
-			return ClosestVertex + BS_Vertex(0, -2);
-		else if (IsPointInRegion(ClosestVertex + BS_Vertex(2, -2)))
-			return ClosestVertex + BS_Vertex(2, -2);
-		else if (IsPointInRegion(ClosestVertex + BS_Vertex(-2, 0)))
-			return ClosestVertex + BS_Vertex(-2, 0);
-		else if (IsPointInRegion(ClosestVertex + BS_Vertex(0, 2)))
-			return ClosestVertex + BS_Vertex(0, 2);
-		else if (IsPointInRegion(ClosestVertex + BS_Vertex(-2, 2)))
-			return ClosestVertex + BS_Vertex(-2, 2);
-		else if (IsPointInRegion(ClosestVertex + BS_Vertex(-2, 0)))
-			return ClosestVertex + BS_Vertex(2, 2);
-		else if (IsPointInRegion(ClosestVertex + BS_Vertex(2, 2)))
-			return ClosestVertex + BS_Vertex(2, 2);
+		if (IsPointInRegion(ClosestVertex + Vertex(-2, -2)))
+			return ClosestVertex + Vertex(-2, -2);
+		else if (IsPointInRegion(ClosestVertex + Vertex(0, -2)))
+			return ClosestVertex + Vertex(0, -2);
+		else if (IsPointInRegion(ClosestVertex + Vertex(2, -2)))
+			return ClosestVertex + Vertex(2, -2);
+		else if (IsPointInRegion(ClosestVertex + Vertex(-2, 0)))
+			return ClosestVertex + Vertex(-2, 0);
+		else if (IsPointInRegion(ClosestVertex + Vertex(0, 2)))
+			return ClosestVertex + Vertex(0, 2);
+		else if (IsPointInRegion(ClosestVertex + Vertex(-2, 2)))
+			return ClosestVertex + Vertex(-2, 2);
+		else if (IsPointInRegion(ClosestVertex + Vertex(-2, 0)))
+			return ClosestVertex + Vertex(2, 2);
+		else if (IsPointInRegion(ClosestVertex + Vertex(2, 2)))
+			return ClosestVertex + Vertex(2, 2);
 
 		// If no point could be found that way that lies within the region, find the next point
 		ClosestVertex = Polygon.Vertecies[0];
@@ -295,7 +295,7 @@
 
 // -----------------------------------------------------------------------------
 
-BS_Vertex BS_Region::FindClosestPointOnLine(const BS_Vertex &LineStart, const BS_Vertex &LineEnd, const BS_Vertex Point) const {
+Vertex Region::FindClosestPointOnLine(const Vertex &LineStart, const Vertex &LineEnd, const Vertex Point) const {
 	float Vector1X = static_cast<float>(Point.X - LineStart.X);
 	float Vector1Y = static_cast<float>(Point.Y - LineStart.Y);
 	float Vector2X = static_cast<float>(LineEnd.X - LineStart.X);
@@ -310,7 +310,7 @@
 	if (Dot <= 0) return LineStart;
 	if (Dot >= Distance) return LineEnd;
 
-	BS_Vertex Vector3(static_cast<int>(Vector2X * Dot + 0.5f), static_cast<int>(Vector2Y * Dot + 0.5f));
+	Vertex Vector3(static_cast<int>(Vector2X * Dot + 0.5f), static_cast<int>(Vector2Y * Dot + 0.5f));
 	return LineStart + Vector3;
 }
 
@@ -318,11 +318,11 @@
 // Line of Sight
 // -----------------------------------------------------------------------------
 
-bool BS_Region::IsLineOfSight(const BS_Vertex &a, const BS_Vertex &b) const {
+bool Region::IsLineOfSight(const Vertex &a, const Vertex &b) const {
 	BS_ASSERT(m_Polygons.size());
 
 	// The line must be within the contour polygon, and outside of any hole polygons
-	Common::Array<BS_Polygon>::const_iterator iter = m_Polygons.begin();
+	Common::Array<Polygon>::const_iterator iter = m_Polygons.begin();
 	if (!(*iter).IsLineInterior(a, b)) return false;
 	for (iter++; iter != m_Polygons.end(); iter++)
 		if (!(*iter).IsLineExterior(a, b)) return false;
@@ -334,7 +334,7 @@
 // Persistence
 // -----------------------------------------------------------------------------
 
-bool BS_Region::Persist(BS_OutputPersistenceBlock &Writer) {
+bool Region::Persist(BS_OutputPersistenceBlock &Writer) {
 	bool Result = true;
 
 	Writer.Write(static_cast<unsigned int>(m_Type));
@@ -343,7 +343,7 @@
 	Writer.Write(m_Position.Y);
 
 	Writer.Write(m_Polygons.size());
-	Common::Array<BS_Polygon>::iterator It = m_Polygons.begin();
+	Common::Array<Polygon>::iterator It = m_Polygons.begin();
 	while (It != m_Polygons.end()) {
 		Result &= It->Persist(Writer);
 		++It;
@@ -359,7 +359,7 @@
 
 // -----------------------------------------------------------------------------
 
-bool BS_Region::Unpersist(BS_InputPersistenceBlock &Reader) {
+bool Region::Unpersist(BS_InputPersistenceBlock &Reader) {
 	Reader.Read(m_Valid);
 	Reader.Read(m_Position.X);
 	Reader.Read(m_Position.Y);
@@ -368,7 +368,7 @@
 	unsigned int PolygonCount;
 	Reader.Read(PolygonCount);
 	for (unsigned int i = 0; i < PolygonCount; ++i) {
-		m_Polygons.push_back(BS_Polygon(Reader));
+		m_Polygons.push_back(Polygon(Reader));
 	}
 
 	Reader.Read(m_BoundingBox.left);
@@ -381,11 +381,11 @@
 
 // -----------------------------------------------------------------------------
 
-BS_Vertex BS_Region::GetCentroid() const {
+Vertex Region::GetCentroid() const {
 	if (m_Polygons.size() > 0)
 		return m_Polygons[0].GetCentroid();
 	return
-	    BS_Vertex();
+	    Vertex();
 }
 
 } // End of namespace Sword25

Modified: scummvm/trunk/engines/sword25/math/region.h
===================================================================
--- scummvm/trunk/engines/sword25/math/region.h	2010-10-12 22:53:49 UTC (rev 53258)
+++ scummvm/trunk/engines/sword25/math/region.h	2010-10-12 22:55:59 UTC (rev 53259)
@@ -52,7 +52,7 @@
  * arranged in a clockwise direction, so that the polygon working algorithms will
  * work properly.
  */
-class BS_Region : public BS_Persistable {
+class Region : public BS_Persistable {
 protected:
 	/**
 	 * Creates a new BS_Region object
@@ -60,9 +60,9 @@
 	 * After creation the object is invaild (IsValid() return false), but a call can
 	 * be made later on to Init() to set up the region into a valid state.
 	 */
-	BS_Region();
+	Region();
 
-	BS_Region(BS_InputPersistenceBlock &Reader, unsigned int Handle);
+	Region(BS_InputPersistenceBlock &Reader, unsigned int Handle);
 
 public:
 	enum REGION_TYPE {
@@ -73,7 +73,7 @@
 	static unsigned int Create(REGION_TYPE Type);
 	static unsigned int Create(BS_InputPersistenceBlock &Reader, unsigned int Handle = 0);
 
-	virtual ~BS_Region();
+	virtual ~Region();
 
 	/**
 	 * Initialises a BS_Region object
@@ -83,7 +83,7 @@
 	 * @return              Returns true if the initialisation was successful, otherwise false.
 	 * @remark              If the region was already initialised, the old state will be deleted.
 	 */
-	virtual bool Init(const BS_Polygon &Contour, const Common::Array<BS_Polygon> *pHoles = NULL);
+	virtual bool Init(const Polygon &Contour, const Common::Array<Polygon> *pHoles = NULL);
 
 	//
 	// Exploratory Methods
@@ -101,7 +101,7 @@
 	/**
 	 * Returns the position of the region
 	 */
-	const BS_Vertex &GetPosition() const {
+	const Vertex &GetPosition() const {
 		return m_Position;
 	}
 
@@ -124,7 +124,7 @@
 	 * @param Vertex        A verex with the co-ordinates of the test point
 	 * @return              Returns true if the point is within the region, otherwise false.
 	 */
-	bool IsPointInRegion(const BS_Vertex &Vertex) const;
+	bool IsPointInRegion(const Vertex &Vertex) const;
 
 	/**
 	 * Indicates whether a point is inside the region
@@ -137,7 +137,7 @@
 	/**
 	 * Returns the countour of the region
 	 */
-	const BS_Polygon &GetContour() const {
+	const Polygon &GetContour() const {
 		return m_Polygons[0];
 	}
 
@@ -154,7 +154,7 @@
 	 * The index must be between 0 and GetHoleCount() - 1.
 	 * @return              Returns the desired hole polygon
 	 */
-	inline const BS_Polygon &GetHole(unsigned int i) const;
+	inline const Polygon &GetHole(unsigned int i) const;
 
 	/**
 	 * For a point outside the region, finds the closest point inside the region
@@ -164,14 +164,14 @@
 	 * One should not therefore rely on the fact that there is really no point in
 	 * the region which is closer to the given point.
 	 */
-	BS_Vertex FindClosestRegionPoint(const BS_Vertex &Point) const;
+	Vertex FindClosestRegionPoint(const Vertex &Point) const;
 
 	/**
 	 * Returns the centroid for the region
 	 */
-	BS_Vertex GetCentroid() const;
+	Vertex GetCentroid() const;
 
-	bool IsLineOfSight(const BS_Vertex &a, const BS_Vertex &b) const;
+	bool IsLineOfSight(const Vertex &a, const Vertex &b) const;
 
 	//
 	// Manipulation Methods
@@ -209,10 +209,10 @@
 	/// This variable indicates whether the current object state is valid
 	bool m_Valid;
 	/// This vertex is the position of the region
-	BS_Vertex m_Position;
+	Vertex m_Position;
 	/// This array contains all the polygons that define the region. The first element of
 	// the array is the contour, all others are the holes
-	Common::Array<BS_Polygon> m_Polygons;
+	Common::Array<Polygon> m_Polygons;
 	/// The bounding box for the region
 	BS_Rect m_BoundingBox;
 
@@ -228,7 +228,7 @@
 	 * @param Point         The point to be compared against
 	 * @return              Returns the point on the line which is cloest to the passed point.
 	 */
-	BS_Vertex FindClosestPointOnLine(const BS_Vertex &LineStart, const BS_Vertex &LineEnd, const BS_Vertex Point) const;
+	Vertex FindClosestPointOnLine(const Vertex &LineStart, const Vertex &LineEnd, const Vertex Point) const;
 };
 
 
@@ -236,7 +236,7 @@
 // Inlines
 // -----------------------------------------------------------------------------
 
-inline const BS_Polygon &BS_Region::GetHole(unsigned int i) const {
+inline const Polygon &Region::GetHole(unsigned int i) const {
 	BS_ASSERT(i < m_Polygons.size() - 1);
 	return m_Polygons[i + 1];
 }

Modified: scummvm/trunk/engines/sword25/math/regionregistry.cpp
===================================================================
--- scummvm/trunk/engines/sword25/math/regionregistry.cpp	2010-10-12 22:53:49 UTC (rev 53258)
+++ scummvm/trunk/engines/sword25/math/regionregistry.cpp	2010-10-12 22:55:59 UTC (rev 53259)
@@ -53,23 +53,23 @@
 // Implementation
 // -----------------------------------------------------------------------------
 
-Common::SharedPtr<BS_RegionRegistry> BS_RegionRegistry::m_InstancePtr;
+Common::SharedPtr<RegionRegistry> RegionRegistry::m_InstancePtr;
 
 // -----------------------------------------------------------------------------
 
-void BS_RegionRegistry::LogErrorLn(const char *Message) const {
+void RegionRegistry::LogErrorLn(const char *Message) const {
 	BS_LOG_ERRORLN(Message);
 }
 
 // -----------------------------------------------------------------------------
 
-void BS_RegionRegistry::LogWarningLn(const char *Message) const {
+void RegionRegistry::LogWarningLn(const char *Message) const {
 	BS_LOG_WARNINGLN(Message);
 }
 
 // -----------------------------------------------------------------------------
 
-bool BS_RegionRegistry::Persist(BS_OutputPersistenceBlock &Writer) {
+bool RegionRegistry::Persist(BS_OutputPersistenceBlock &Writer) {
 	bool Result = true;
 
 	// Write out the next handle
@@ -95,7 +95,7 @@
 
 // -----------------------------------------------------------------------------
 
-bool BS_RegionRegistry::Unpersist(BS_InputPersistenceBlock &Reader) {
+bool RegionRegistry::Unpersist(BS_InputPersistenceBlock &Reader) {
 	bool Result = true;
 
 	// Read in the next handle
@@ -116,7 +116,7 @@
 		Reader.Read(Handle);
 
 		// BS_Region restore
-		Result &= BS_Region::Create(Reader, Handle) != 0;
+		Result &= Region::Create(Reader, Handle) != 0;
 	}
 
 	return Reader.IsGood() && Result;

Modified: scummvm/trunk/engines/sword25/math/regionregistry.h
===================================================================
--- scummvm/trunk/engines/sword25/math/regionregistry.h	2010-10-12 22:53:49 UTC (rev 53258)
+++ scummvm/trunk/engines/sword25/math/regionregistry.h	2010-10-12 22:55:59 UTC (rev 53259)
@@ -50,16 +50,16 @@
 // Forward Declarations
 // -----------------------------------------------------------------------------
 
-class BS_Region;
+class Region;
 
 // -----------------------------------------------------------------------------
 // Class definitions
 // -----------------------------------------------------------------------------
 
-class BS_RegionRegistry : public BS_ObjectRegistry<BS_Region>, public BS_Persistable {
+class RegionRegistry : public BS_ObjectRegistry<Region>, public BS_Persistable {
 public:
-	static BS_RegionRegistry &GetInstance() {
-		if (!m_InstancePtr.get()) m_InstancePtr = Common::SharedPtr<BS_RegionRegistry>(new BS_RegionRegistry());
+	static RegionRegistry &GetInstance() {
+		if (!m_InstancePtr.get()) m_InstancePtr = Common::SharedPtr<RegionRegistry>(new RegionRegistry());
 		return *m_InstancePtr.get();
 	}
 
@@ -70,7 +70,7 @@
 	virtual void LogErrorLn(const char *Message) const;
 	virtual void LogWarningLn(const char *Message) const;
 
-	static Common::SharedPtr<BS_RegionRegistry> m_InstancePtr;
+	static Common::SharedPtr<RegionRegistry> m_InstancePtr;
 };
 
 } // End of namespace Sword25

Modified: scummvm/trunk/engines/sword25/math/vertex.cpp
===================================================================
--- scummvm/trunk/engines/sword25/math/vertex.cpp	2010-10-12 22:53:49 UTC (rev 53258)
+++ scummvm/trunk/engines/sword25/math/vertex.cpp	2010-10-12 22:55:59 UTC (rev 53259)
@@ -48,7 +48,7 @@
 
 namespace Sword25 {
 
-BS_Vertex &BS_Vertex::LuaVertexToVertex(lua_State *L, int StackIndex, BS_Vertex &Vertex) {
+Vertex &Vertex::LuaVertexToVertex(lua_State *L, int StackIndex, Vertex &vertex) {
 #ifdef DEBUG
 	int __startStackDepth = lua_gettop(L);
 #endif
@@ -60,37 +60,37 @@
 	lua_pushstring(L, "X");
 	lua_gettable(L, StackIndex);
 	if (!lua_isnumber(L, -1)) luaL_argcheck(L, 0, StackIndex, "the X component has to be a number");
-	Vertex.X = static_cast<int>(lua_tonumber(L, -1));
+	vertex.X = static_cast<int>(lua_tonumber(L, -1));
 	lua_pop(L, 1);
 
 	// Read Y Component
 	lua_pushstring(L, "Y");
 	lua_gettable(L, StackIndex);
 	if (!lua_isnumber(L, -1)) luaL_argcheck(L, 0, StackIndex, "the Y component has to be a number");
-	Vertex.Y = static_cast<int>(lua_tonumber(L, -1));
+	vertex.Y = static_cast<int>(lua_tonumber(L, -1));
 	lua_pop(L, 1);
 
 #ifdef DEBUG
 	BS_ASSERT(__startStackDepth == lua_gettop(L));
 #endif
 
-	return Vertex;
+	return vertex;
 }
 
 // -----------------------------------------------------------------------------
 
-void BS_Vertex::VertexToLuaVertex(lua_State *L, const BS_Vertex &Vertex) {
+void Vertex::VertexToLuaVertex(lua_State *L, const Vertex &vertex) {
 	// Create New Table
 	lua_newtable(L);
 
 	// X value is written to table
 	lua_pushstring(L, "X");
-	lua_pushnumber(L, Vertex.X);
+	lua_pushnumber(L, vertex.X);
 	lua_settable(L, -3);
 
 	// Y value is written to table
 	lua_pushstring(L, "Y");
-	lua_pushnumber(L, Vertex.Y);
+	lua_pushnumber(L, vertex.Y);
 	lua_settable(L, -3);
 }
 

Modified: scummvm/trunk/engines/sword25/math/vertex.h
===================================================================
--- scummvm/trunk/engines/sword25/math/vertex.h	2010-10-12 22:53:49 UTC (rev 53258)
+++ scummvm/trunk/engines/sword25/math/vertex.h	2010-10-12 22:55:59 UTC (rev 53259)
@@ -60,10 +60,10 @@
 /**
  * Defines a 2-D Vertex
  */
-class BS_Vertex {
+class Vertex {
 public:
-	BS_Vertex() : X(0), Y(0) {};
-	BS_Vertex(int X_, int Y_) {
+	Vertex() : X(0), Y(0) {};
+	Vertex(int X_, int Y_) {
 		this->X = X_;
 		this->Y = Y_;
 	}
@@ -74,21 +74,21 @@
 	/**
 	 * Compares two Vertecies.
 	 */
-	inline bool operator==(const BS_Vertex &rhs) const {
+	inline bool operator==(const Vertex &rhs) const {
 		if (X == rhs.X && Y == rhs.Y) return true;
 		return false;
 	}
 	/**
 	 * Compares two Vertecies.
 	 */
-	inline bool operator!=(const BS_Vertex &rhs) const {
+	inline bool operator!=(const Vertex &rhs) const {
 		if (X != rhs.X || Y != rhs.Y) return true;
 		return false;
 	}
 	/**
 	 * Adds a vertex to vertex
 	 */
-	inline void operator+=(const BS_Vertex &Delta) {
+	inline void operator+=(const Vertex &Delta) {
 		X += Delta.X;
 		Y += Delta.Y;
 	}
@@ -96,7 +96,7 @@
 	/**
 	 * Subtracts a vertex from a vertex
 	 */
-	inline void operator-=(const BS_Vertex &Delta) {
+	inline void operator-=(const Vertex &Delta) {
 		X -= Delta.X;
 		Y -= Delta.Y;
 	}
@@ -104,15 +104,15 @@
 	/**
 	 * Adds two vertecies
 	 */
-	inline BS_Vertex operator+(const BS_Vertex &Delta) const {
-		return BS_Vertex(X + Delta.X, Y + Delta.Y);
+	inline Vertex operator+(const Vertex &Delta) const {
+		return Vertex(X + Delta.X, Y + Delta.Y);
 	}
 
 	/**
 	 * Subtracts two vertecies
 	 */
-	inline BS_Vertex operator-(const BS_Vertex &Delta) const {
-		return BS_Vertex(X - Delta.X, Y - Delta.Y);
+	inline Vertex operator-(const Vertex &Delta) const {
+		return Vertex(X - Delta.X, Y - Delta.Y);
 	}
 
 	/**
@@ -122,8 +122,8 @@
 	 * @remark              If only distances should be compared, this method should be used because
 	 * it is faster than Distance()
 	 */
-	inline int Distance2(const BS_Vertex &Vertex) const {
-		return (X - Vertex.X) * (X - Vertex.X) + (Y - Vertex.Y) * (Y - Vertex.Y);
+	inline int Distance2(const Vertex &vertex) const {
+		return (X - vertex.X) * (X - vertex.X) + (Y - vertex.Y) * (Y - vertex.Y);
 	}
 
 	/**
@@ -132,8 +132,8 @@
 	 * @return              Returns the square of the distance between itself and the passed vertex
 	 * @remark              If only distances should be compared, Distance2() should be used, since it is faster.
 	 */
-	inline int Distance(const BS_Vertex &Vertex) const {
-		return (int)(sqrtf(static_cast<float>(Distance2(Vertex))) + 0.5);
+	inline int Distance(const Vertex &vertex) const {
+		return (int)(sqrtf(static_cast<float>(Distance2(vertex))) + 0.5);
 	}
 
 	/**
@@ -142,8 +142,8 @@
 	 * @param Vertex        The second vertex
 	 * @return              Returns the cross product of this vertex and the passed vertex.
 	 */
-	inline int ComputeCrossProduct(const BS_Vertex &Vertex) const {
-		return X * Vertex.Y - Vertex.X * Y;
+	inline int ComputeCrossProduct(const Vertex &vertex) const {
+		return X * vertex.Y - vertex.X * Y;
 	}
 
 	/**
@@ -151,8 +151,8 @@
 	 * @param Vertex        The second vertex
 	 * @return              Returns the dot product of this vertex and the passed vertex.
 	 */
-	inline int ComputeDotProduct(const BS_Vertex &Vertex) const {
-		return X * Vertex.X + Y * Vertex.Y;
+	inline int ComputeDotProduct(const Vertex &vertex) const {
+		return X * vertex.X + Y * vertex.Y;
 	}
 
 	/**
@@ -160,8 +160,8 @@
 	 * @param Vertex        The second vertex
 	 * @return              Returns the angle between this vertex and the passed vertex in radians.
 	 */
-	inline float ComputeAngle(const BS_Vertex &Vertex) const {
-		return atan2f(static_cast<float>(ComputeCrossProduct(Vertex)), static_cast<float>(ComputeDotProduct(Vertex)));
+	inline float ComputeAngle(const Vertex &vertex) const {
+		return atan2f(static_cast<float>(ComputeCrossProduct(vertex)), static_cast<float>(ComputeDotProduct(vertex)));
 	}
 
 	/**
@@ -171,8 +171,8 @@
 		return sqrtf(static_cast<float>(X * X + Y * Y));
 	}
 
-	static BS_Vertex &LuaVertexToVertex(lua_State *L, int StackIndex, BS_Vertex &Vertex);
-	static void VertexToLuaVertex(lua_State *L, const BS_Vertex &Vertex);
+	static Vertex &LuaVertexToVertex(lua_State *L, int StackIndex, Vertex &vertex);
+	static void VertexToLuaVertex(lua_State *L, const Vertex &vertex);
 };
 
 } // End of namespace Sword25

Modified: scummvm/trunk/engines/sword25/math/walkregion.cpp
===================================================================
--- scummvm/trunk/engines/sword25/math/walkregion.cpp	2010-10-12 22:53:49 UTC (rev 53258)
+++ scummvm/trunk/engines/sword25/math/walkregion.cpp	2010-10-12 22:55:59 UTC (rev 53259)
@@ -52,28 +52,28 @@
 // Constructor / Destructor
 // -----------------------------------------------------------------------------
 
-BS_WalkRegion::BS_WalkRegion() {
+WalkRegion::WalkRegion() {
 	m_Type = RT_WALKREGION;
 }
 
 // -----------------------------------------------------------------------------
 
-BS_WalkRegion::BS_WalkRegion(BS_InputPersistenceBlock &Reader, unsigned int Handle) :
-	BS_Region(Reader, Handle) {
+WalkRegion::WalkRegion(BS_InputPersistenceBlock &Reader, unsigned int Handle) :
+	Region(Reader, Handle) {
 	m_Type = RT_WALKREGION;
 	Unpersist(Reader);
 }
 
 // -----------------------------------------------------------------------------
 
-BS_WalkRegion::~BS_WalkRegion() {
+WalkRegion::~WalkRegion() {
 }
 
 // -----------------------------------------------------------------------------
 
-bool BS_WalkRegion::Init(const BS_Polygon &Contour, const Common::Array<BS_Polygon> *pHoles) {
+bool WalkRegion::Init(const Polygon &Contour, const Common::Array<Polygon> *pHoles) {
 	// Default initialisation of the region
-	if (!BS_Region::Init(Contour, pHoles)) return false;
+	if (!Region::Init(Contour, pHoles)) return false;
 
 	// Prepare structures for pathfinding
 	InitNodeVector();
@@ -85,7 +85,7 @@
 
 // -----------------------------------------------------------------------------
 
-bool BS_WalkRegion::QueryPath(BS_Vertex StartPoint, BS_Vertex EndPoint, BS_Path &Path) {
+bool WalkRegion::QueryPath(Vertex StartPoint, Vertex EndPoint, BS_Path &Path) {

@@ Diff output truncated at 100000 characters. @@

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list