summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-10-08 20:52:00 +0300
committerAndrei Karas <akaras@inbox.ru>2012-10-08 20:52:00 +0300
commitb639270b2854e2d069bbff9b888dfeb159f9b400 (patch)
tree07cafe4ccf666a63ded20a0d314004bea4b40f3e /src
parent196cc38da19b867eaa9419343dd6ecd8212af354 (diff)
downloadmanaverse-b639270b2854e2d069bbff9b888dfeb159f9b400.tar.gz
manaverse-b639270b2854e2d069bbff9b888dfeb159f9b400.tar.bz2
manaverse-b639270b2854e2d069bbff9b888dfeb159f9b400.tar.xz
manaverse-b639270b2854e2d069bbff9b888dfeb159f9b400.zip
Fix code style.
Diffstat (limited to 'src')
-rw-r--r--src/being.cpp2
-rw-r--r--src/being.h3
-rw-r--r--src/configuration.cpp4
-rw-r--r--src/net/tmwa/npchandler.cpp5
-rw-r--r--src/normalopenglgraphics.h24
-rw-r--r--src/resources/monsterdb.cpp2
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"))
{