summaryrefslogtreecommitdiff
path: root/src/mumblemanager.h
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-01-02 01:48:38 +0200
committerAndrei Karas <akaras@inbox.ru>2011-01-02 02:41:24 +0200
commit3eeae12c498d1a4dbe969462d2ba841f77ee3ccb (patch)
treeff8eab35e732bc0749fc11677c8873a7b3a58704 /src/mumblemanager.h
downloadmanaverse-3eeae12c498d1a4dbe969462d2ba841f77ee3ccb.tar.gz
manaverse-3eeae12c498d1a4dbe969462d2ba841f77ee3ccb.tar.bz2
manaverse-3eeae12c498d1a4dbe969462d2ba841f77ee3ccb.tar.xz
manaverse-3eeae12c498d1a4dbe969462d2ba841f77ee3ccb.zip
Initial commit.
This code based on mana client http://www.gitorious.org/mana/mana and my private repository.
Diffstat (limited to 'src/mumblemanager.h')
-rw-r--r--src/mumblemanager.h57
1 files changed, 57 insertions, 0 deletions
diff --git a/src/mumblemanager.h b/src/mumblemanager.h
new file mode 100644
index 000000000..a3eddee02
--- /dev/null
+++ b/src/mumblemanager.h
@@ -0,0 +1,57 @@
+/* Code taken from: http://mumble.sourceforge.net/Link */
+
+#ifndef MUMBLEMANAGER_H
+#define MUMBLEMANAGER_H
+
+#include <string>
+#include <stdint.h>
+
+struct LinkedMem
+{
+ uint32_t uiVersion;
+ uint32_t uiTick;
+ float fAvatarPosition[3];
+ float fAvatarFront[3];
+ float fAvatarTop[3];
+ wchar_t name[256];
+ float fCameraPosition[3];
+ float fCameraFront[3];
+ float fCameraTop[3];
+ wchar_t identity[256];
+ uint32_t context_len;
+ char context[256];
+ wchar_t description[2048];
+};
+
+class MumbleManager
+{
+ public:
+ MumbleManager();
+
+ ~MumbleManager();
+
+ void init();
+
+ void setPlayer(const std::string &userName);
+
+ void setAction(int action);
+
+ void setPos(int tileX, int tileY, int direction);
+
+ void setMap(const std::string &mapName);
+
+ void setServer(const std::string &serverName);
+
+ private:
+ uint16_t getMapId(std::string mapName);
+
+ void setMapBase(uint16_t mapid);
+
+ LinkedMem *mLinkedMem;
+ LinkedMem mLinkedMemCache;
+ float mMapBase[3];
+};
+
+extern MumbleManager *mumbleManager;
+
+#endif