summaryrefslogtreecommitdiff
path: root/src/game-server/testing.cpp
diff options
context:
space:
mode:
authorGuillaume Melquiond <guillaume.melquiond@gmail.com>2007-01-02 13:26:47 +0000
committerGuillaume Melquiond <guillaume.melquiond@gmail.com>2007-01-02 13:26:47 +0000
commit0a47b2fb30c83f8b021c2015891fe8c936ca6bf0 (patch)
tree21525442898ca4e41eb8ab51a16cf5384ffef40c /src/game-server/testing.cpp
parent5999cff421b0e0b5cd7a0da4d4b0a492f8cc303b (diff)
downloadmanaserv-0a47b2fb30c83f8b021c2015891fe8c936ca6bf0.tar.gz
manaserv-0a47b2fb30c83f8b021c2015891fe8c936ca6bf0.tar.bz2
manaserv-0a47b2fb30c83f8b021c2015891fe8c936ca6bf0.tar.xz
manaserv-0a47b2fb30c83f8b021c2015891fe8c936ca6bf0.zip
Removed obsolete files. Added a generic trigger system.
Diffstat (limited to 'src/game-server/testing.cpp')
-rw-r--r--src/game-server/testing.cpp37
1 files changed, 37 insertions, 0 deletions
diff --git a/src/game-server/testing.cpp b/src/game-server/testing.cpp
new file mode 100644
index 00000000..e580694d
--- /dev/null
+++ b/src/game-server/testing.cpp
@@ -0,0 +1,37 @@
+/* This file is for testing purpose only. It hardcodes some events related
+ to the game. It should be removed once all the related managers have been
+ implemented. There are no headers for this file on purpose. */
+
+#include "controller.h"
+#include "game-server/state.hpp"
+#include "game-server/trigger.hpp"
+
+static Rectangle rectA = { 56 * 32, 12 * 32, 5 * 32, 32 };
+static WarpAction warpA(3, 44 * 32 + 16, 80 * 32 + 16);
+static Rectangle rectB = { 42 * 32, 88 * 32, 5 * 32, 32 };
+static WarpAction warpB(1, 58 * 32 + 16, 17 * 32 + 16);
+
+void testingMap(int id)
+{
+ switch (id)
+ {
+ case 1:
+ {
+ gameState->insert(new TriggerArea(1, rectA, &warpA));
+ for (int i = 0; i < 10; i++)
+ {
+ Being *being = new Controlled(OBJECT_MONSTER);
+ being->setSpeed(150);
+ being->setMapId(1);
+ Point pos = { 720, 900 };
+ being->setPosition(pos);
+ gameState->insert(being);
+ }
+ } break;
+
+ case 3:
+ {
+ gameState->insert(new TriggerArea(3, rectB, &warpB));
+ } break;
+ }
+}