[Scummvm-cvs-logs] SF.net SVN: scummvm:[53254] scummvm/trunk/engines/sword25
sev at users.sourceforge.net
sev at users.sourceforge.net
Wed Oct 13 00:50:28 CEST 2010
Revision: 53254
http://scummvm.svn.sourceforge.net/scummvm/?rev=53254&view=rev
Author: sev
Date: 2010-10-12 22:50:28 +0000 (Tue, 12 Oct 2010)
Log Message:
-----------
SWORD25: Fix warnings
Modified Paths:
--------------
scummvm/trunk/engines/sword25/gfx/animation.cpp
scummvm/trunk/engines/sword25/gfx/animationresource.cpp
scummvm/trunk/engines/sword25/gfx/graphicengine.h
scummvm/trunk/engines/sword25/gfx/graphicengine_script.cpp
scummvm/trunk/engines/sword25/gfx/image/pngloader.cpp
scummvm/trunk/engines/sword25/gfx/image/vectorimage.cpp
scummvm/trunk/engines/sword25/gfx/renderobject.cpp
scummvm/trunk/engines/sword25/input/inputengine_script.cpp
scummvm/trunk/engines/sword25/kernel/kernel.cpp
scummvm/trunk/engines/sword25/kernel/resmanager.cpp
scummvm/trunk/engines/sword25/math/polygon.cpp
scummvm/trunk/engines/sword25/package/packagemanager.h
scummvm/trunk/engines/sword25/package/scummvmpackagemanager.cpp
scummvm/trunk/engines/sword25/package/scummvmpackagemanager.h
scummvm/trunk/engines/sword25/script/luascript.cpp
scummvm/trunk/engines/sword25/script/luascript.h
Modified: scummvm/trunk/engines/sword25/gfx/animation.cpp
===================================================================
--- scummvm/trunk/engines/sword25/gfx/animation.cpp 2010-10-12 22:49:27 UTC (rev 53253)
+++ scummvm/trunk/engines/sword25/gfx/animation.cpp 2010-10-12 22:50:28 UTC (rev 53254)
@@ -247,8 +247,6 @@
// Nur wenn die Animation l\xE4uft wird sie auch weiterbewegt
if (m_Running) {
- int OldFrame = m_CurrentFrame;
-
// Gesamte vergangene Zeit bestimmen (inkl. Restzeit des aktuellen Frames)
m_CurrentFrameTime += TimeElapsed;
@@ -317,7 +315,7 @@
}
}
- if (m_CurrentFrame != TmpCurFrame) {
+ if ((int)m_CurrentFrame != TmpCurFrame) {
ForceRefresh();
if (animationDescriptionPtr->GetFrame(m_CurrentFrame).Action != "") {
Modified: scummvm/trunk/engines/sword25/gfx/animationresource.cpp
===================================================================
--- scummvm/trunk/engines/sword25/gfx/animationresource.cpp 2010-10-12 22:49:27 UTC (rev 53253)
+++ scummvm/trunk/engines/sword25/gfx/animationresource.cpp 2010-10-12 22:50:28 UTC (rev 53254)
@@ -169,7 +169,7 @@
bool BS_AnimationResource::ParseAnimationTag(TiXmlElement &AnimationTag, int &FPS, BS_Animation::ANIMATION_TYPES &AnimationType) {
// FPS einlesen
const char *FPSString;
- if (FPSString = AnimationTag.Attribute("fps")) {
+ if ((FPSString = AnimationTag.Attribute("fps"))) {
int TempFPS;
if (!BS_String::ToInt(Common::String(FPSString), TempFPS) || TempFPS < MIN_FPS || TempFPS > MAX_FPS) {
BS_LOG_WARNINGLN("Illegal fps value (\"%s\") in <animation> tag in \"%s\". Assuming default (\"%d\"). "
@@ -181,7 +181,7 @@
// Loop-Typ einlesen
const char *LoopTypeString;
- if (LoopTypeString = AnimationTag.Attribute("type")) {
+ if ((LoopTypeString = AnimationTag.Attribute("type"))) {
if (strcmp(LoopTypeString, "oneshot") == 0)
AnimationType = BS_Animation::AT_ONESHOT;
else if (strcmp(LoopTypeString, "loop") == 0)
Modified: scummvm/trunk/engines/sword25/gfx/graphicengine.h
===================================================================
--- scummvm/trunk/engines/sword25/gfx/graphicengine.h 2010-10-12 22:49:27 UTC (rev 53253)
+++ scummvm/trunk/engines/sword25/gfx/graphicengine.h 2010-10-12 22:50:28 UTC (rev 53254)
@@ -323,9 +323,9 @@
case BS_GraphicEngine::CF_ARGB32:
return 4;
+ default:
+ return -1;
}
-
- return -1;
}
/**
Modified: scummvm/trunk/engines/sword25/gfx/graphicengine_script.cpp
===================================================================
--- scummvm/trunk/engines/sword25/gfx/graphicengine_script.cpp 2010-10-12 22:49:27 UTC (rev 53253)
+++ scummvm/trunk/engines/sword25/gfx/graphicengine_script.cpp 2010-10-12 22:50:28 UTC (rev 53254)
@@ -754,14 +754,6 @@
// -----------------------------------------------------------------------------
-static int RO_Remove(lua_State *L) {
- BS_RenderObjectPtr<BS_RenderObject> ROPtr = CheckRenderObject(L);
- ROPtr.Erase();
- return 0;
-}
-
-// -----------------------------------------------------------------------------
-
static const luaL_reg RENDEROBJECT_METHODS[] = {
{"AddAnimation", RO_AddAnimation},
{"AddText", RO_AddText},
Modified: scummvm/trunk/engines/sword25/gfx/image/pngloader.cpp
===================================================================
--- scummvm/trunk/engines/sword25/gfx/image/pngloader.cpp 2010-10-12 22:49:27 UTC (rev 53253)
+++ scummvm/trunk/engines/sword25/gfx/image/pngloader.cpp 2010-10-12 22:50:28 UTC (rev 53254)
@@ -237,6 +237,9 @@
for (i = 0; i < Height; i++)
memcpy(&UncompressedDataPtr[i * Pitch], &RawDataBuffer[i * png_get_rowbytes(png_ptr, info_ptr)], Pitch);
break;
+ default:
+ error("Unhandled case in DoDecodeImage");
+ break;
}
}
Modified: scummvm/trunk/engines/sword25/gfx/image/vectorimage.cpp
===================================================================
--- scummvm/trunk/engines/sword25/gfx/image/vectorimage.cpp 2010-10-12 22:49:27 UTC (rev 53253)
+++ scummvm/trunk/engines/sword25/gfx/image/vectorimage.cpp 2010-10-12 22:50:28 UTC (rev 53254)
@@ -267,8 +267,8 @@
BS_Rect MovieRect = FlashRectToBSRect(bs);
// Framerate und Frameanzahl auslesen
- u32 FrameRate = bs.GetU16();
- u32 FrameCount = bs.GetU16();
+ /* u32 FrameRate = */bs.GetU16();
+ /* u32 FrameCount = */bs.GetU16();
// Tags parsen
// Da wir uns nur f\xFCr das erste DefineShape-Tag interessieren
@@ -310,7 +310,7 @@
// -----------------------------------------------------------------------------
bool BS_VectorImage::ParseDefineShape(unsigned int ShapeType, SWFBitStream &bs) {
- u32 ShapeID = bs.GetU16();
+ /*u32 ShapeID = */bs.GetU16();
// Bounding Box auslesen
m_BoundingBox = FlashRectToBSRect(bs);
@@ -411,10 +411,10 @@
// Curved edge
if (EdgeFlag == 0) {
- s32 ControlDeltaX = bs.GetSignedBits(NumBits);
- s32 ControlDeltaY = bs.GetSignedBits(NumBits);
- s32 AnchorDeltaX = bs.GetSignedBits(NumBits);
- s32 AnchorDeltaY = bs.GetSignedBits(NumBits);
+ /* s32 ControlDeltaX = */bs.GetSignedBits(NumBits);
+ /* s32 ControlDeltaY = */bs.GetSignedBits(NumBits);
+ /* s32 AnchorDeltaX = */bs.GetSignedBits(NumBits);
+ /* s32 AnchorDeltaY = */bs.GetSignedBits(NumBits);
#if 0 // TODO
double ControlX = m_Elements.back().m_Paths.last_x() + ControlDeltaX;
Modified: scummvm/trunk/engines/sword25/gfx/renderobject.cpp
===================================================================
--- scummvm/trunk/engines/sword25/gfx/renderobject.cpp 2010-10-12 22:49:27 UTC (rev 53253)
+++ scummvm/trunk/engines/sword25/gfx/renderobject.cpp 2010-10-12 22:50:28 UTC (rev 53254)
@@ -71,6 +71,8 @@
m_InitSuccess(false),
m_RefreshForced(true),
m_Handle(0) {
+ m_OldBBox = BS_Rect(0, 0);
+
// Renderobject registrieren, abh\xE4ngig vom Handle-Parameter entweder mit beliebigem oder vorgegebenen Handle.
if (Handle == 0)
m_Handle = BS_RenderObjectRegistry::GetInstance().RegisterObject(this);
Modified: scummvm/trunk/engines/sword25/input/inputengine_script.cpp
===================================================================
--- scummvm/trunk/engines/sword25/input/inputengine_script.cpp 2010-10-12 22:49:27 UTC (rev 53253)
+++ scummvm/trunk/engines/sword25/input/inputengine_script.cpp 2010-10-12 22:50:28 UTC (rev 53254)
@@ -328,7 +328,7 @@
X(ADD), X(SEPARATOR), X(SUBTRACT), X(DECIMAL), X(DIVIDE), X(F1), X(F2), X(F3), X(F4), X(F5), X(F6), X(F7), X(F8), X(F9), X(F10), X(F11),
X(F12), X(NUMLOCK), X(SCROLL), X(LSHIFT), X(RSHIFT), X(LCONTROL), X(RCONTROL),
Y(ENTER), Y(LEFT), Y(RIGHT), Y(HOME), Y(END), Y(BACKSPACE), Y(TAB), Y(INSERT), Y(DELETE),
- 0, 0,
+ {0, 0}
};
#undef X
#undef Y
Modified: scummvm/trunk/engines/sword25/kernel/kernel.cpp
===================================================================
--- scummvm/trunk/engines/sword25/kernel/kernel.cpp 2010-10-12 22:49:27 UTC (rev 53253)
+++ scummvm/trunk/engines/sword25/kernel/kernel.cpp 2010-10-12 22:50:28 UTC (rev 53254)
@@ -157,11 +157,12 @@
unsigned int CurServiceOrd = 0;
for (unsigned int i = 0; i < BS_SERVICE_COUNT; i++) {
- if (BS_SERVICE_TABLE[i].SuperclassIdentifier == _Identifier)
+ if (BS_SERVICE_TABLE[i].SuperclassIdentifier == _Identifier) {
if (Number == CurServiceOrd)
return BS_SERVICE_TABLE[i].ServiceIdentifier;
else
CurServiceOrd++;
+ }
}
return Common::String("");
Modified: scummvm/trunk/engines/sword25/kernel/resmanager.cpp
===================================================================
--- scummvm/trunk/engines/sword25/kernel/resmanager.cpp 2010-10-12 22:49:27 UTC (rev 53253)
+++ scummvm/trunk/engines/sword25/kernel/resmanager.cpp 2010-10-12 22:50:28 UTC (rev 53254)
@@ -162,7 +162,7 @@
if (m_LogCacheMiss) BS_LOG_WARNINGLN("\"%s\" was not precached.", UniqueFileName.c_str());
BS_Resource *pResource;
- if (pResource = LoadResource(UniqueFileName)) {
+ if ((pResource = LoadResource(UniqueFileName))) {
pResource->AddReference();
return pResource;
}
Modified: scummvm/trunk/engines/sword25/math/polygon.cpp
===================================================================
--- scummvm/trunk/engines/sword25/math/polygon.cpp 2010-10-12 22:49:27 UTC (rev 53253)
+++ scummvm/trunk/engines/sword25/math/polygon.cpp 2010-10-12 22:50:28 UTC (rev 53254)
@@ -50,8 +50,8 @@
BS_Polygon::BS_Polygon() : VertexCount(0), Vertecies(NULL) {
}
-BS_Polygon::BS_Polygon(int VertexCount, const BS_Vertex *Vertecies) : VertexCount(0), Vertecies(NULL) {
- Init(VertexCount, Vertecies);
+BS_Polygon::BS_Polygon(int VertexCount_, const BS_Vertex *Vertecies_) : VertexCount(0), Vertecies(NULL) {
+ Init(VertexCount_, Vertecies_);
}
BS_Polygon::BS_Polygon(const BS_Polygon &Other) : VertexCount(0), Vertecies(NULL) {
@@ -69,20 +69,20 @@
// Initialisation
// ---------------
-bool BS_Polygon::Init(int VertexCount, const BS_Vertex *Vertecies) {
+bool BS_Polygon::Init(int VertexCount_, const BS_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;
- this->VertexCount = VertexCount;
- this->Vertecies = new BS_Vertex[VertexCount + 1];
- memcpy(this->Vertecies, Vertecies, sizeof(BS_Vertex) * VertexCount);
+ this->VertexCount = VertexCount_;
+ this->Vertecies = new BS_Vertex[VertexCount_ + 1];
+ memcpy(this->Vertecies, Vertecies_, sizeof(BS_Vertex) * VertexCount_);
// TODO:
// Duplicate and remove redundant vertecies (Superflous = 3 co-linear verts)
// _WeedRepeatedVertecies();
// The first vertex is repeated at the end of the vertex array; this simplifies
// some algorithms, running through the edges and thus can save the overflow control.
- this->Vertecies[VertexCount] = this->Vertecies[0];
+ this->Vertecies[VertexCount_] = this->Vertecies[0];
// If the polygon is self-intersecting, the object state is restore, and an error signalled
if (CheckForSelfIntersection()) {
Modified: scummvm/trunk/engines/sword25/package/packagemanager.h
===================================================================
--- scummvm/trunk/engines/sword25/package/packagemanager.h 2010-10-12 22:49:27 UTC (rev 53253)
+++ scummvm/trunk/engines/sword25/package/packagemanager.h 2010-10-12 22:50:28 UTC (rev 53254)
@@ -100,7 +100,7 @@
* @return Specifies a pointer to the loaded data of the file
* @remark The client must not forget to release the data of the file using BE_DELETE_A.
*/
- virtual void *GetFile(const Common::String &FileName, unsigned int *pFileSize = NULL) = 0;
+ virtual byte *GetFile(const Common::String &FileName, unsigned int *pFileSize = NULL) = 0;
/**
* Returns the path to the current directory.
* @return Returns a string containing the path to the current directory.
Modified: scummvm/trunk/engines/sword25/package/scummvmpackagemanager.cpp
===================================================================
--- scummvm/trunk/engines/sword25/package/scummvmpackagemanager.cpp 2010-10-12 22:49:27 UTC (rev 53253)
+++ scummvm/trunk/engines/sword25/package/scummvmpackagemanager.cpp 2010-10-12 22:50:28 UTC (rev 53254)
@@ -130,7 +130,7 @@
}
}
-void *BS_ScummVMPackageManager::GetFile(const Common::String &fileName, unsigned int *fileSizePtr) {
+byte *BS_ScummVMPackageManager::GetFile(const Common::String &fileName, unsigned int *fileSizePtr) {
Common::SeekableReadStream *in;
Common::ArchiveMemberPtr fileNode = GetArchiveMember(normalizePath(fileName, _currentDirectory));
if (!fileNode)
Modified: scummvm/trunk/engines/sword25/package/scummvmpackagemanager.h
===================================================================
--- scummvm/trunk/engines/sword25/package/scummvmpackagemanager.h 2010-10-12 22:49:27 UTC (rev 53253)
+++ scummvm/trunk/engines/sword25/package/scummvmpackagemanager.h 2010-10-12 22:50:28 UTC (rev 53254)
@@ -72,7 +72,7 @@
virtual bool LoadPackage(const Common::String &fileName, const Common::String &mountPosition);
virtual bool LoadDirectoryAsPackage(const Common::String &directoryName, const Common::String &mountPosition);
- virtual void *GetFile(const Common::String &fileName, unsigned int *fileSizePtr = 0);
+ virtual byte *GetFile(const Common::String &fileName, unsigned int *fileSizePtr = 0);
virtual Common::String GetCurrentDirectory();
virtual bool ChangeDirectory(const Common::String &directory);
virtual Common::String GetAbsolutePath(const Common::String &fileName);
Modified: scummvm/trunk/engines/sword25/script/luascript.cpp
===================================================================
--- scummvm/trunk/engines/sword25/script/luascript.cpp 2010-10-12 22:49:27 UTC (rev 53253)
+++ scummvm/trunk/engines/sword25/script/luascript.cpp 2010-10-12 22:50:28 UTC (rev 53254)
@@ -158,7 +158,7 @@
// File read
unsigned int FileSize;
- char *FileData = static_cast<char *>(pPackage->GetFile(FileName, &FileSize));
+ byte *FileData = pPackage->GetFile(FileName, &FileSize);
if (!FileData) {
BS_LOG_ERRORLN("Couldn't read \"%s\".", FileName.c_str());
#ifdef DEBUG
@@ -190,7 +190,7 @@
// -----------------------------------------------------------------------------
bool BS_LuaScriptEngine::ExecuteString(const Common::String &Code) {
- return ExecuteBuffer(Code.c_str(), Code.size(), "???");
+ return ExecuteBuffer((byte *)Code.c_str(), Code.size(), "???");
}
// -----------------------------------------------------------------------------
@@ -220,9 +220,9 @@
// -----------------------------------------------------------------------------
-bool BS_LuaScriptEngine::ExecuteBuffer(const char *Data, unsigned int Size, const Common::String &Name) const {
+bool BS_LuaScriptEngine::ExecuteBuffer(const byte *Data, unsigned int Size, const Common::String &Name) const {
// Compile buffer
- if (luaL_loadbuffer(m_State, Data, Size, Name.c_str()) != 0) {
+ if (luaL_loadbuffer(m_State, (const char *)Data, Size, Name.c_str()) != 0) {
BS_LOG_ERRORLN("Couldn't compile \"%s\":\n%s", Name.c_str(), lua_tostring(m_State, -1));
lua_pop(m_State, 1);
Modified: scummvm/trunk/engines/sword25/script/luascript.h
===================================================================
--- scummvm/trunk/engines/sword25/script/luascript.h 2010-10-12 22:49:27 UTC (rev 53253)
+++ scummvm/trunk/engines/sword25/script/luascript.h 2010-10-12 22:50:28 UTC (rev 53254)
@@ -124,7 +124,7 @@
bool RegisterStandardLibs();
bool RegisterStandardLibExtensions();
- bool ExecuteBuffer(const char *Data, unsigned int Size, const Common::String &Name) const;
+ bool ExecuteBuffer(const byte *Data, unsigned int Size, const Common::String &Name) const;
};
} // End of namespace Sword25
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