aboutsummaryrefslogtreecommitdiff
path: root/engines/sword25/gfx
diff options
context:
space:
mode:
Diffstat (limited to 'engines/sword25/gfx')
-rw-r--r--engines/sword25/gfx/animation.cpp4
-rw-r--r--engines/sword25/gfx/animationresource.cpp4
-rw-r--r--engines/sword25/gfx/graphicengine.h4
-rw-r--r--engines/sword25/gfx/graphicengine_script.cpp8
-rw-r--r--engines/sword25/gfx/image/pngloader.cpp3
-rw-r--r--engines/sword25/gfx/image/vectorimage.cpp14
-rw-r--r--engines/sword25/gfx/renderobject.cpp2
7 files changed, 17 insertions, 22 deletions
diff --git a/engines/sword25/gfx/animation.cpp b/engines/sword25/gfx/animation.cpp
index 333bc986d6..1790e24c03 100644
--- a/engines/sword25/gfx/animation.cpp
+++ b/engines/sword25/gfx/animation.cpp
@@ -247,8 +247,6 @@ void BS_Animation::FrameNotification(int TimeElapsed) {
// Nur wenn die Animation läuft 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 @@ void BS_Animation::FrameNotification(int TimeElapsed) {
}
}
- if (m_CurrentFrame != TmpCurFrame) {
+ if ((int)m_CurrentFrame != TmpCurFrame) {
ForceRefresh();
if (animationDescriptionPtr->GetFrame(m_CurrentFrame).Action != "") {
diff --git a/engines/sword25/gfx/animationresource.cpp b/engines/sword25/gfx/animationresource.cpp
index 614bbc3e65..f492daa93c 100644
--- a/engines/sword25/gfx/animationresource.cpp
+++ b/engines/sword25/gfx/animationresource.cpp
@@ -169,7 +169,7 @@ BS_AnimationResource::BS_AnimationResource(const Common::String &FileName) :
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 @@ bool BS_AnimationResource::ParseAnimationTag(TiXmlElement &AnimationTag, int &FP
// 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)
diff --git a/engines/sword25/gfx/graphicengine.h b/engines/sword25/gfx/graphicengine.h
index 225abcadf4..aaa3db64b4 100644
--- a/engines/sword25/gfx/graphicengine.h
+++ b/engines/sword25/gfx/graphicengine.h
@@ -323,9 +323,9 @@ public:
case BS_GraphicEngine::CF_ARGB32:
return 4;
+ default:
+ return -1;
}
-
- return -1;
}
/**
diff --git a/engines/sword25/gfx/graphicengine_script.cpp b/engines/sword25/gfx/graphicengine_script.cpp
index d009916f32..af558e6578 100644
--- a/engines/sword25/gfx/graphicengine_script.cpp
+++ b/engines/sword25/gfx/graphicengine_script.cpp
@@ -754,14 +754,6 @@ static int RO_AddAnimation(lua_State *L) {
// -----------------------------------------------------------------------------
-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},
diff --git a/engines/sword25/gfx/image/pngloader.cpp b/engines/sword25/gfx/image/pngloader.cpp
index 605dca8635..8c323f9453 100644
--- a/engines/sword25/gfx/image/pngloader.cpp
+++ b/engines/sword25/gfx/image/pngloader.cpp
@@ -237,6 +237,9 @@ bool BS_PNGLoader::DoDecodeImage(const char *FileDataPtr, unsigned int FileSize,
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;
}
}
diff --git a/engines/sword25/gfx/image/vectorimage.cpp b/engines/sword25/gfx/image/vectorimage.cpp
index 549ef96d39..f55833eccb 100644
--- a/engines/sword25/gfx/image/vectorimage.cpp
+++ b/engines/sword25/gfx/image/vectorimage.cpp
@@ -267,8 +267,8 @@ BS_VectorImage::BS_VectorImage(const unsigned char *pFileData, unsigned int File
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ür das erste DefineShape-Tag interessieren
@@ -310,7 +310,7 @@ BS_VectorImage::BS_VectorImage(const unsigned char *pFileData, unsigned int File
// -----------------------------------------------------------------------------
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 @@ bool BS_VectorImage::ParseDefineShape(unsigned int ShapeType, SWFBitStream &bs)
// 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;
diff --git a/engines/sword25/gfx/renderobject.cpp b/engines/sword25/gfx/renderobject.cpp
index 4909569ca0..913aa9ef82 100644
--- a/engines/sword25/gfx/renderobject.cpp
+++ b/engines/sword25/gfx/renderobject.cpp
@@ -71,6 +71,8 @@ BS_RenderObject::BS_RenderObject(BS_RenderObjectPtr<BS_RenderObject> ParentPtr,
m_InitSuccess(false),
m_RefreshForced(true),
m_Handle(0) {
+ m_OldBBox = BS_Rect(0, 0);
+
// Renderobject registrieren, abhängig vom Handle-Parameter entweder mit beliebigem oder vorgegebenen Handle.
if (Handle == 0)
m_Handle = BS_RenderObjectRegistry::GetInstance().RegisterObject(this);