diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-10-08 20:52:00 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-10-08 20:52:00 +0300 |
commit | b639270b2854e2d069bbff9b888dfeb159f9b400 (patch) | |
tree | 07cafe4ccf666a63ded20a0d314004bea4b40f3e | |
parent | 196cc38da19b867eaa9419343dd6ecd8212af354 (diff) | |
download | manaplus-b639270b2854e2d069bbff9b888dfeb159f9b400.tar.gz manaplus-b639270b2854e2d069bbff9b888dfeb159f9b400.tar.bz2 manaplus-b639270b2854e2d069bbff9b888dfeb159f9b400.tar.xz manaplus-b639270b2854e2d069bbff9b888dfeb159f9b400.zip |
Fix code style.
-rw-r--r-- | src/being.cpp | 2 | ||||
-rw-r--r-- | src/being.h | 3 | ||||
-rw-r--r-- | src/configuration.cpp | 4 | ||||
-rw-r--r-- | src/net/tmwa/npchandler.cpp | 5 | ||||
-rw-r--r-- | src/normalopenglgraphics.h | 24 | ||||
-rw-r--r-- | src/resources/monsterdb.cpp | 2 |
6 files changed, 23 insertions, 17 deletions
diff --git a/src/being.cpp b/src/being.cpp index ad867ffbc..c55fba9dd 100644 --- a/src/being.cpp +++ b/src/being.cpp @@ -1363,7 +1363,7 @@ void Being::logic() case ATTACK: { - std::string particleEffect(""); +// std::string particleEffect(""); if (!mActionTime) break; diff --git a/src/being.h b/src/being.h index 58d3ea21c..d16670dbb 100644 --- a/src/being.h +++ b/src/being.h @@ -594,7 +594,8 @@ class Being : public ActorSprite, public ConfigListener int getEmotion() const { return mEmotion; } - virtual void drawSprites(Graphics* graphics, int posX, int posY) const override; + virtual void drawSprites(Graphics* graphics, + int posX, int posY) const override; virtual void drawSpritesSDL(Graphics* graphics, int posX, int posY) const override; diff --git a/src/configuration.cpp b/src/configuration.cpp index a9c4037e9..2ba53cca4 100644 --- a/src/configuration.cpp +++ b/src/configuration.cpp @@ -757,8 +757,8 @@ void ConfigurationObject::writeToXML(const XmlTextWriterPtr writer) } #endif XmlTextWriterStartElement(writer, "option"); - XmlTextWriterWriteAttribute(writer,"name", i->first.c_str()); - XmlTextWriterWriteAttribute(writer,"value", i->second.c_str()); + XmlTextWriterWriteAttribute(writer, "name", i->first.c_str()); + XmlTextWriterWriteAttribute(writer, "value", i->second.c_str()); xmlTextWriterEndElement(writer); } diff --git a/src/net/tmwa/npchandler.cpp b/src/net/tmwa/npchandler.cpp index 856b67828..3e9fe3822 100644 --- a/src/net/tmwa/npchandler.cpp +++ b/src/net/tmwa/npchandler.cpp @@ -294,7 +294,10 @@ void NpcHandler::processNpcCommand(Net::MessageIn &msg, int npcId) break; case 6: // show avatar if (mDialog) - mDialog->showAvatar(msg.readInt32()); // avatar id + { + mDialog->showAvatar(static_cast<uint16_t>( + msg.readInt32())); // avatar id + } break; case 7: // set avatar direction if (mDialog) diff --git a/src/normalopenglgraphics.h b/src/normalopenglgraphics.h index 57815af38..9101fdaf4 100644 --- a/src/normalopenglgraphics.h +++ b/src/normalopenglgraphics.h @@ -100,9 +100,11 @@ class NormalOpenGLGraphics final : public Graphics void updateScreen() override; void _beginDraw(); + void _endDraw(); bool pushClipArea(gcn::Rectangle area); + void popClipArea(); void setColor(const gcn::Color &color); @@ -119,23 +121,23 @@ class NormalOpenGLGraphics final : public Graphics void setTargetPlane(int width, int height); - void drawQuadArrayfi(int size); + inline void drawQuadArrayfi(int size); - void drawQuadArrayfi(GLint *intVertArray, - GLfloat *floatTexArray, - const int size); + inline void drawQuadArrayfi(GLint *intVertArray, + GLfloat *floatTexArray, + const int size); - void drawQuadArrayii(int size); + inline void drawQuadArrayii(int size); - void drawQuadArrayii(GLint *intVertArray, - GLint *intTexArray, - const int size); + inline void drawQuadArrayii(GLint *intVertArray, + GLint *intTexArray, + const int size); - void drawLineArrayi(int size); + inline void drawLineArrayi(int size); - void drawLineArrayf(int size); + inline void drawLineArrayf(int size); - void drawVertexes(NormalOpenGLGraphicsVertexes &ogl); + inline void drawVertexes(NormalOpenGLGraphicsVertexes &ogl); void initArrays() override; diff --git a/src/resources/monsterdb.cpp b/src/resources/monsterdb.cpp index 22441c34e..ae0d6c3ba 100644 --- a/src/resources/monsterdb.cpp +++ b/src/resources/monsterdb.cpp @@ -51,7 +51,7 @@ void MonsterDB::load() logger->log1("Initializing monster database..."); XML::Document doc("monsters.xml"); - XmlNodePtr rootNode = doc.rootNode(); + const XmlNodePtr rootNode = doc.rootNode(); if (!rootNode || !xmlNameEqual(rootNode, "monsters")) { |