summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2009-03-25 22:56:11 +0100
committerBjørn Lindeijer <bjorn@lindeijer.nl>2009-03-25 22:56:11 +0100
commit76cfbe09ef909c0eebf558dec3f5f4917dd14de2 (patch)
tree8a5f39783b0f41e194a78c2b4fed152dddacdb2d
parentd2bec790d7a1d5a0adc9f97ec24f085cf86e3238 (diff)
parent0e0affb76f7930994dcb972aead2df555288bad2 (diff)
downloadmana-client-76cfbe09ef909c0eebf558dec3f5f4917dd14de2.tar.gz
mana-client-76cfbe09ef909c0eebf558dec3f5f4917dd14de2.tar.bz2
mana-client-76cfbe09ef909c0eebf558dec3f5f4917dd14de2.tar.xz
mana-client-76cfbe09ef909c0eebf558dec3f5f4917dd14de2.zip
Merge branch 'origin/master'
Conflicts: .mailmap
-rw-r--r--.mailmap1
-rw-r--r--CMakeLists.txt2
-rw-r--r--README2
-rw-r--r--src/main.h2
-rw-r--r--src/net/ea/itemhandler.cpp67
-rw-r--r--src/net/ea/itemhandler.h35
-rw-r--r--src/resources/spritedef.cpp2
-rw-r--r--src/resources/spritedef.h2
-rw-r--r--src/winver.h6
9 files changed, 109 insertions, 10 deletions
diff --git a/.mailmap b/.mailmap
index 97af9690..53b50072 100644
--- a/.mailmap
+++ b/.mailmap
@@ -1,3 +1,4 @@
Bjørn Lindeijer <bjorn@lindeijer.nl>
+Bjørn Lindeijer <thorbjorn.lindeijer@nokia.com>
Majin Sniper <sniper@livecd.janhome.net>
Victor Fury <frictor@unknown>
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0d123870..71d85b12 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,6 +1,6 @@
PROJECT(TMW)
-SET(VERSION 0.1.0)
+SET(VERSION 0.0.29)
# where to look for cmake modules
SET(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/CMake/Modules)
diff --git a/README b/README
index 9427f18e..2034f807 100644
--- a/README
+++ b/README
@@ -1,7 +1,7 @@
THE MANA WORLD
==============
- Version: 0.1.0 Date: XX/XX/2009
+ Version: 0.0.29 Date: XX/XX/2009
Development team:
- See AUTHORS file for a list
diff --git a/src/main.h b/src/main.h
index 11ea1f70..7f13740c 100644
--- a/src/main.h
+++ b/src/main.h
@@ -58,7 +58,7 @@
#elif defined WIN32
#include "winver.h"
#elif defined __APPLE__
-#define PACKAGE_VERSION "0.1.0"
+#define PACKAGE_VERSION "0.0.29"
#endif
#ifndef PKG_DATADIR
diff --git a/src/net/ea/itemhandler.cpp b/src/net/ea/itemhandler.cpp
new file mode 100644
index 00000000..73268554
--- /dev/null
+++ b/src/net/ea/itemhandler.cpp
@@ -0,0 +1,67 @@
+/*
+ * The Mana World
+ * Copyright (C) 2004 The Mana World Development Team
+ *
+ * This file is part of The Mana World.
+ *
+ * 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.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#include "itemhandler.h"
+#include "../messagein.h"
+#include "protocol.h"
+
+#include "../../engine.h"
+#include "../../flooritemmanager.h"
+
+ItemHandler::ItemHandler()
+{
+ static const Uint16 _messages[] = {
+ SMSG_ITEM_VISIBLE,
+ SMSG_ITEM_DROPPED,
+ SMSG_ITEM_REMOVE,
+ 0
+ };
+ handledMessages = _messages;
+}
+
+void ItemHandler::handleMessage(MessageIn &msg)
+{
+ Uint32 id;
+ Uint16 x, y;
+ int itemId;
+
+ switch (msg.getId())
+ {
+ case SMSG_ITEM_VISIBLE:
+ case SMSG_ITEM_DROPPED:
+ id = msg.readInt32();
+ itemId = msg.readInt16();
+ msg.readInt8(); // identify flag
+ x = msg.readInt16();
+ y = msg.readInt16();
+ msg.skip(4); // amount,subX,subY / subX,subY,amount
+
+ floorItemManager->create(id, itemId, x, y, engine->getCurrentMap());
+ break;
+
+ case SMSG_ITEM_REMOVE:
+ FloorItem *item;
+ item = floorItemManager->findById(msg.readInt32());
+ if (item)
+ floorItemManager->destroy(item);
+ break;
+ }
+}
diff --git a/src/net/ea/itemhandler.h b/src/net/ea/itemhandler.h
new file mode 100644
index 00000000..da93f6b4
--- /dev/null
+++ b/src/net/ea/itemhandler.h
@@ -0,0 +1,35 @@
+/*
+ * The Mana World
+ * Copyright (C) 2004 The Mana World Development Team
+ *
+ * This file is part of The Mana World.
+ *
+ * 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.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#ifndef NET_ITEMHANDLER_H
+#define NET_ITEMHANDLER_H
+
+#include "../messagehandler.h"
+
+class ItemHandler : public MessageHandler
+{
+ public:
+ ItemHandler();
+
+ void handleMessage(MessageIn &msg);
+};
+
+#endif
diff --git a/src/resources/spritedef.cpp b/src/resources/spritedef.cpp
index 390bd3d0..125edbea 100644
--- a/src/resources/spritedef.cpp
+++ b/src/resources/spritedef.cpp
@@ -348,7 +348,6 @@ SpriteAction SpriteDef::makeSpriteAction(const std::string &action)
else if (action == "attack_throw") {
return ACTION_ATTACK_THROW;
}
-#ifdef TMWSERV_SUPPORT
else if (action == "special0") {
return ACTION_SPECIAL_0;
}
@@ -379,7 +378,6 @@ SpriteAction SpriteDef::makeSpriteAction(const std::string &action)
else if (action == "special9") {
return ACTION_SPECIAL_9;
}
-#endif
else if (action == "cast_magic") {
return ACTION_CAST_MAGIC;
}
diff --git a/src/resources/spritedef.h b/src/resources/spritedef.h
index c3db8d64..cd7bd7f0 100644
--- a/src/resources/spritedef.h
+++ b/src/resources/spritedef.h
@@ -43,7 +43,6 @@ enum SpriteAction
ACTION_ATTACK_STAB,
ACTION_ATTACK_BOW,
ACTION_ATTACK_THROW,
-#ifdef TMWSERV_SUPPORT
ACTION_SPECIAL_0,
ACTION_SPECIAL_1,
ACTION_SPECIAL_2,
@@ -54,7 +53,6 @@ enum SpriteAction
ACTION_SPECIAL_7,
ACTION_SPECIAL_8,
ACTION_SPECIAL_9,
-#endif
ACTION_CAST_MAGIC,
ACTION_USE_ITEM,
ACTION_SIT,
diff --git a/src/winver.h b/src/winver.h
index abf91e9f..4996bdfb 100644
--- a/src/winver.h
+++ b/src/winver.h
@@ -1,6 +1,6 @@
/* VERSION DEFINITIONS */
#define VER_MAJOR 0
-#define VER_MINOR 1
-#define VER_RELEASE 0
+#define VER_MINOR 0
+#define VER_RELEASE 29
#define VER_BUILD 0
-#define PACKAGE_VERSION "0.1.0"
+#define PACKAGE_VERSION "0.0.29"