summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThorbjørn Lindeijer <thorbjorn@lindeijer.nl>2011-02-01 21:12:41 +0100
committerThorbjørn Lindeijer <thorbjorn@lindeijer.nl>2011-02-01 21:12:41 +0100
commit852de0424f7226dfd61d2779c1ea6413ac85d584 (patch)
treee902d1e91d760273cb1b1fba4c51cf3232ed6194 /src
parentf19b3786f3f000a84c8080594e398686e0298ca4 (diff)
parentbcd1d9aff41b5c152cafade7532242c94ac1f710 (diff)
downloadmana-client-852de0424f7226dfd61d2779c1ea6413ac85d584.tar.gz
mana-client-852de0424f7226dfd61d2779c1ea6413ac85d584.tar.bz2
mana-client-852de0424f7226dfd61d2779c1ea6413ac85d584.tar.xz
mana-client-852de0424f7226dfd61d2779c1ea6413ac85d584.zip
Merge branch '0.5'
Conflicts: po/de.po src/game.cpp src/resources/wallpaper.cpp
Diffstat (limited to 'src')
-rw-r--r--src/CMakeLists.txt21
-rw-r--r--src/game.cpp6
-rw-r--r--src/net/net.cpp3
-rw-r--r--src/utils/sha256.cpp5
4 files changed, 23 insertions, 12 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index f3b5a644..f0c988dd 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -22,11 +22,14 @@ IF (CMAKE_COMPILER_IS_GNUCXX)
ENDIF()
IF (POLICY CMP0015)
- CMAKE_POLICY(SET CMP0015 OLD)
+ CMAKE_POLICY(SET CMP0015 OLD)
+ENDIF()
+
+IF (ENABLE_MANASERV)
+ INCLUDE_DIRECTORIES("../libs/enet/include")
+ LINK_DIRECTORIES("../libs/enet")
+ SET(INTERNAL_LIBRARIES enet)
ENDIF()
-INCLUDE_DIRECTORIES("../libs/enet/include")
-LINK_DIRECTORIES("../libs/enet")
-SET(INTERNAL_LIBRARIES enet)
SET(FLAGS "-DPACKAGE_VERSION=\\\"${VERSION}\\\"")
SET(FLAGS "${FLAGS} -DPKG_DATADIR=\\\"${PKG_DATADIR}/\\\"")
@@ -36,6 +39,10 @@ IF (ENABLE_NLS)
SET(FLAGS "${FLAGS} -DENABLE_NLS=1")
ENDIF()
+IF (ENABLE_MANASERV)
+ SET(FLAGS "${FLAGS} -DMANASERV_SUPPORT=1")
+ENDIF()
+
IF (CMAKE_BUILD_TYPE)
STRING(TOLOWER ${CMAKE_BUILD_TYPE} CMAKE_BUILD_TYPE_TOLOWER)
IF(CMAKE_BUILD_TYPE_TOLOWER MATCHES debug OR
@@ -636,7 +643,11 @@ ENDIF ()
SET (PROGRAMS mana)
-ADD_EXECUTABLE(mana WIN32 ${SRCS} ${SRCS_MANA} ${SRCS_TMWA})
+IF (ENABLE_MANASERV)
+ ADD_EXECUTABLE(mana WIN32 ${SRCS} ${SRCS_MANA} ${SRCS_TMWA})
+ELSE(ENABLE_MANASERV)
+ ADD_EXECUTABLE(mana WIN32 ${SRCS} ${SRCS_TMWA})
+ENDIF(ENABLE_MANASERV)
TARGET_LINK_LIBRARIES(mana
${INTERNAL_LIBRARIES}
diff --git a/src/game.cpp b/src/game.cpp
index 4da19bf8..fd453434 100644
--- a/src/game.cpp
+++ b/src/game.cpp
@@ -795,9 +795,6 @@ void Game::handleInput()
return;
}
- const Vector &pos = player_node->getPosition();
- const Uint16 x = (int) pos.x / 32;
- const Uint16 y = (int) pos.y / 32;
unsigned char direction = 0;
// Translate pressed keys to movement and direction
@@ -915,6 +912,9 @@ void Game::handleInput()
{
if (joystick->buttonPressed(1))
{
+ const int x = player_node->getTileX();
+ const int y = player_node->getTileY();
+
FloorItem *item = actorSpriteManager->findItem(x, y);
if (item)
diff --git a/src/net/net.cpp b/src/net/net.cpp
index 09f245b0..090ecd78 100644
--- a/src/net/net.cpp
+++ b/src/net/net.cpp
@@ -154,10 +154,11 @@ void connectToServer(ServerInfo &server)
switch (server.type)
{
+#ifdef MANASERV_SUPPORT
case ServerInfo::MANASERV:
new ManaServ::GeneralHandler;
break;
-
+#endif
case ServerInfo::TMWATHENA:
new TmwAthena::GeneralHandler;
break;
diff --git a/src/utils/sha256.cpp b/src/utils/sha256.cpp
index 57809c8b..9175352f 100644
--- a/src/utils/sha256.cpp
+++ b/src/utils/sha256.cpp
@@ -6,9 +6,8 @@
* This file has been slighly modified as part of The Mana Client.
*
* This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * any later version.
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of