summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2006-08-01 21:10:13 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2006-08-01 21:10:13 +0000
commit2ae843719c2a7b2325309404a0e3cbb4aeb9c3df (patch)
tree4491254c4532f767585ed0001d5652994a7e9ae6
parentc2cde930ed189d70846bf86acfddf6fdd0c998f9 (diff)
downloadmana-client-2ae843719c2a7b2325309404a0e3cbb4aeb9c3df.tar.gz
mana-client-2ae843719c2a7b2325309404a0e3cbb4aeb9c3df.tar.bz2
mana-client-2ae843719c2a7b2325309404a0e3cbb4aeb9c3df.tar.xz
mana-client-2ae843719c2a7b2325309404a0e3cbb4aeb9c3df.zip
Fixed several compiler warnings and a linker error when compiling without
OpenGL support.
-rw-r--r--ChangeLog4
-rw-r--r--src/net/beinghandler.cpp18
-rw-r--r--src/net/maploginhandler.cpp6
-rw-r--r--src/net/protocol.h2
-rw-r--r--src/player.cpp4
-rw-r--r--src/resources/openglsdlimageloader.cpp4
6 files changed, 23 insertions, 15 deletions
diff --git a/ChangeLog b/ChangeLog
index 1a4b313c..d6049d68 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -3,6 +3,10 @@
* configure.ac: Moved some basic checks above the checks on the
libraries we depend on, in order to get rid of the confusing
rpl_realloc error.
+ * src/net/beinghandler.cpp, src/net/maploginhandler.cpp,
+ src/net/protocol.h, src/resources/openglsdlimageloader.cpp,
+ src/player.cpp: Fixed several compiler warnings and a linker error
+ when compiling without OpenGL support.
2006-08-01 Eugenio Favalli <elvenprogrammer@gmail.com>
diff --git a/src/net/beinghandler.cpp b/src/net/beinghandler.cpp
index 7730e9be..549797f9 100644
--- a/src/net/beinghandler.cpp
+++ b/src/net/beinghandler.cpp
@@ -129,12 +129,12 @@ void BeingHandler::handleMessage(MessageIn *msg)
if (msg->getId() == SMSG_BEING_MOVE)
{
- Uint16 srcX, srcY, dstX, dstY;
+ //Uint16 srcX, srcY, dstX, dstY;
//msg->readCoordinatePair(srcX, srcY, dstX, dstY);
- dstBeing->setAction(Being::STAND);
- dstBeing->mX = srcX;
- dstBeing->mY = srcY;
- dstBeing->setDestination(dstX, dstY);
+ //dstBeing->setAction(Being::STAND);
+ //dstBeing->mX = srcX;
+ //dstBeing->mY = srcY;
+ //dstBeing->setDestination(dstX, dstY);
}
else
{
@@ -333,11 +333,11 @@ void BeingHandler::handleMessage(MessageIn *msg)
if (msg->getId() == SMSG_PLAYER_MOVE)
{
- Uint16 srcX, srcY, dstX, dstY;
+ //Uint16 srcX, srcY, dstX, dstY;
//msg->readCoordinatePair(srcX, srcY, dstX, dstY);
- dstBeing->mX = srcX;
- dstBeing->mY = srcY;
- dstBeing->setDestination(dstX, dstY);
+ //dstBeing->mX = srcX;
+ //dstBeing->mY = srcY;
+ //dstBeing->setDestination(dstX, dstY);
}
else
{
diff --git a/src/net/maploginhandler.cpp b/src/net/maploginhandler.cpp
index 2a174c58..38ed2203 100644
--- a/src/net/maploginhandler.cpp
+++ b/src/net/maploginhandler.cpp
@@ -42,14 +42,14 @@ MapLoginHandler::MapLoginHandler()
void MapLoginHandler::handleMessage(MessageIn *msg)
{
- unsigned char direction;
+ //unsigned char direction;
switch (msg->getId())
{
case SMSG_LOGIN_SUCCESS:
msg->readLong(); // server tick
- logger->log("Protocol: Player start position: (%d, %d), Direction: %d",
- player_node->mX, player_node->mY, direction);
+ //logger->log("Protocol: Player start position: (%d, %d), Direction: %d",
+ // player_node->mX, player_node->mY, direction);
state = GAME_STATE;
break;
diff --git a/src/net/protocol.h b/src/net/protocol.h
index e1d403a2..6a13bbd9 100644
--- a/src/net/protocol.h
+++ b/src/net/protocol.h
@@ -191,7 +191,7 @@ enum {
ERRMSG_NO_LOGIN, // the user is not yet logged
ERRMSG_NO_CHARACTER_SELECTED, // the user needs a character
ERRMSG_INSUFFICIENT_RIGHTS, // the user is not privileged
- ERRMSG_INVALID_ARGUMENT, // part of the received message was invalid
+ ERRMSG_INVALID_ARGUMENT // part of the received message was invalid
};
// Login specific return values
diff --git a/src/player.cpp b/src/player.cpp
index 9b7536cf..05825f6e 100644
--- a/src/player.cpp
+++ b/src/player.cpp
@@ -110,7 +110,7 @@ Player::setHairColor(Uint16 color)
mSprites[HAIR_SPRITE] = new AnimatedSprite("graphics/sprites/hairstyle"+toString(mHairStyle)+".xml", color - 1);
}
Being::setHairColor(color);
-};
+}
void
Player::setHairStyle(Uint16 style)
@@ -121,7 +121,7 @@ Player::setHairStyle(Uint16 style)
mSprites[HAIR_SPRITE] = new AnimatedSprite("graphics/sprites/hairstyle"+toString(style)+".xml", mHairColor - 1);
}
Being::setHairStyle(style);
-};
+}
void
Player::setVisibleEquipment(Uint8 slot, Uint8 id)
diff --git a/src/resources/openglsdlimageloader.cpp b/src/resources/openglsdlimageloader.cpp
index f3ddbd84..c7ddec74 100644
--- a/src/resources/openglsdlimageloader.cpp
+++ b/src/resources/openglsdlimageloader.cpp
@@ -21,6 +21,8 @@
* $Id: sdlimageloader.cpp 2121 2006-01-31 02:55:26Z der_doener $
*/
+#ifdef USE_OPENGL
+
#include "openglsdlimageloader.h"
#include <string>
@@ -32,3 +34,5 @@ SDL_Surface* OpenGLSDLImageLoader::loadSDLSurface(const std::string& filename)
ResourceManager *resman = ResourceManager::getInstance();
return resman->loadSDLSurface(filename);
}
+
+#endif