From 2c7b5fd5ef83799fb3bfbc37595f50d76081adfd Mon Sep 17 00:00:00 2001 From: Bastien Bouclet Date: Wed, 9 Sep 2015 16:47:27 +0200 Subject: [PATCH] MYST3: Fix some warnings when building with CLang --- engines/myst3/gfx_tinygl.cpp | 8 -------- engines/myst3/myst3.cpp | 4 ++-- engines/myst3/myst3.h | 4 ++-- engines/myst3/node.cpp | 4 ++-- engines/myst3/node.h | 11 +++++------ engines/myst3/nodecube.h | 4 ++-- engines/myst3/nodeframe.h | 2 +- 7 files changed, 14 insertions(+), 23 deletions(-) diff --git a/engines/myst3/gfx_tinygl.cpp b/engines/myst3/gfx_tinygl.cpp index e77359ca605..11a9e6e2e5d 100644 --- a/engines/myst3/gfx_tinygl.cpp +++ b/engines/myst3/gfx_tinygl.cpp @@ -43,14 +43,6 @@ namespace Myst3 { -static const TGLfloat faceTextureCoords[] = { - // S T - 0.0f, 1.0f, - 1.0f, 1.0f, - 0.0f, 0.0f, - 1.0f, 0.0f, -}; - Renderer *CreateGfxTinyGL(OSystem *system) { return new TinyGLRenderer(system); } diff --git a/engines/myst3/myst3.cpp b/engines/myst3/myst3.cpp index 6e1047d5c47..7ed3082199b 100644 --- a/engines/myst3/myst3.cpp +++ b/engines/myst3/myst3.cpp @@ -1208,13 +1208,13 @@ void Myst3Engine::setMovieLooping(uint16 id, bool loop) { } } -void Myst3Engine::addSpotItem(uint16 id, uint16 condition, bool fade) { +void Myst3Engine::addSpotItem(uint16 id, int16 condition, bool fade) { assert(_node); _node->loadSpotItem(id, condition, fade); } -SpotItemFace *Myst3Engine::addMenuSpotItem(uint16 id, uint16 condition, const Common::Rect &rect) { +SpotItemFace *Myst3Engine::addMenuSpotItem(uint16 id, int16 condition, const Common::Rect &rect) { assert(_node); SpotItemFace *face = _node->loadMenuSpotItem(condition, rect); diff --git a/engines/myst3/myst3.h b/engines/myst3/myst3.h index eae2c5e9119..73d3569559a 100644 --- a/engines/myst3/myst3.h +++ b/engines/myst3/myst3.h @@ -165,8 +165,8 @@ public: void removeMovie(uint16 id); void setMovieLooping(uint16 id, bool loop); - void addSpotItem(uint16 id, uint16 condition, bool fade); - SpotItemFace *addMenuSpotItem(uint16 id, uint16 condition, const Common::Rect &rect); + void addSpotItem(uint16 id, int16 condition, bool fade); + SpotItemFace *addMenuSpotItem(uint16 id, int16 condition, const Common::Rect &rect); void loadNodeSubtitles(uint32 id); void addSunSpot(uint16 pitch, uint16 heading, uint16 intensity, diff --git a/engines/myst3/node.cpp b/engines/myst3/node.cpp index ffcbad3d8f6..09576983be8 100644 --- a/engines/myst3/node.cpp +++ b/engines/myst3/node.cpp @@ -138,7 +138,7 @@ Node::~Node() { delete _subtitles; } -void Node::loadSpotItem(uint16 id, uint16 condition, bool fade) { +void Node::loadSpotItem(uint16 id, int16 condition, bool fade) { SpotItem *spotItem = new SpotItem(_vm); spotItem->setCondition(condition); @@ -173,7 +173,7 @@ void Node::loadSpotItem(uint16 id, uint16 condition, bool fade) { _spotItems.push_back(spotItem); } -SpotItemFace *Node::loadMenuSpotItem(uint16 condition, const Common::Rect &rect) { +SpotItemFace *Node::loadMenuSpotItem(int16 condition, const Common::Rect &rect) { SpotItem *spotItem = new SpotItem(_vm); spotItem->setCondition(condition); diff --git a/engines/myst3/node.h b/engines/myst3/node.h index 35df556c097..e29b4f8820c 100644 --- a/engines/myst3/node.h +++ b/engines/myst3/node.h @@ -100,7 +100,7 @@ public: SpotItem(Myst3Engine *vm); ~SpotItem(); - void setCondition(uint16 condition) { _condition = condition; } + void setCondition(int16 condition) { _condition = condition; } void setFade(bool fade) { _enableFade = fade; } void setFadeVar(uint16 var) { _fadeVar = var; } void addFace(SpotItemFace *face) { _faces.push_back(face); } @@ -110,7 +110,7 @@ public: private: Myst3Engine *_vm; - uint16 _condition; + int16 _condition; uint16 _fadeVar; bool _enableFade; @@ -128,17 +128,16 @@ public: float radius; }; -class Node : Drawable { +class Node : public Drawable { public: Node(Myst3Engine *vm, uint16 id); virtual ~Node(); void update(); - virtual void draw() = 0; void drawOverlay(); - void loadSpotItem(uint16 id, uint16 condition, bool fade); - SpotItemFace *loadMenuSpotItem(uint16 condition, const Common::Rect &rect); + void loadSpotItem(uint16 id, int16 condition, bool fade); + SpotItemFace *loadMenuSpotItem(int16 condition, const Common::Rect &rect); void loadSubtitles(uint32 id); bool hasSubtitlesToDraw(); diff --git a/engines/myst3/nodecube.h b/engines/myst3/nodecube.h index 74a8e786e69..af644cb7fad 100644 --- a/engines/myst3/nodecube.h +++ b/engines/myst3/nodecube.h @@ -27,12 +27,12 @@ namespace Myst3 { -class NodeCube: public Myst3::Node { +class NodeCube: public Node { public: NodeCube(Myst3Engine *vm, uint16 id); virtual ~NodeCube(); - void draw(); + void draw() override; protected: virtual bool isFaceVisible(uint faceId) override; diff --git a/engines/myst3/nodeframe.h b/engines/myst3/nodeframe.h index 32884f3d0e8..2c3a419b8c6 100644 --- a/engines/myst3/nodeframe.h +++ b/engines/myst3/nodeframe.h @@ -32,7 +32,7 @@ public: NodeFrame(Myst3Engine *vm, uint16 id); virtual ~NodeFrame(); - void draw(); + void draw() override; protected: virtual bool isFaceVisible(uint faceId) override { return true; }