MYST3: Fix some warnings when building with CLang

This commit is contained in:
Bastien Bouclet 2015-09-09 16:47:27 +02:00
parent 4589e37504
commit 2c7b5fd5ef
7 changed files with 14 additions and 23 deletions

View File

@ -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);
}

View File

@ -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);

View File

@ -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,

View File

@ -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);

View File

@ -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();

View File

@ -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;

View File

@ -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; }