Merge branch 'serial' into server (read more)

Conflicts:
	server/server_application.cpp (resolved)

After completing the serialization code, I'm merging it into the server's
development branch. This means that although the connection and
disconnection functionality work, I still need to test the player systems
from the new server with the new serialization code.

Immediately following this commit, I'll be merging the minor tweaks to the
editor from the master branch into this one.
This commit is contained in:
Kayne Ruse
2014-03-07 20:58:37 +11:00
9 changed files with 311 additions and 124 deletions
+16 -17
View File
@@ -28,16 +28,18 @@
#include "serial.hpp"
//APIs
#include "lua/lua.hpp"
#include "sqlite3/sqlite3.h"
#include "SDL/SDL.h"
//misc
#include "client_manager.hpp"
#include "player_manager.hpp"
//common
#include "config_utility.hpp"
#include "vector2.hpp"
#include "client.hpp"
#include "player.hpp"
//STL
#include <map>
#include <string>
@@ -46,8 +48,8 @@
class ServerApplication {
public:
//standard functions
ServerApplication();
~ServerApplication();
ServerApplication() = default;
~ServerApplication() = default;
void Init(int argc, char** argv);
void Loop();
@@ -60,13 +62,11 @@ private:
void HandleBroadcastRequest(NetworkPacket);
void HandleJoinRequest(NetworkPacket);
void HandleDisconnect(NetworkPacket);
void HandleSynchronize(NetworkPacket);
// void HandleSynchronize(NetworkPacket);
void HandleShutdown(NetworkPacket);
void HandlePlayerNew(NetworkPacket);
void HandlePlayerDelete(NetworkPacket);
void HandlePlayerUpdate(NetworkPacket);
void PumpPacket(NetworkPacket);
// void HandlePlayerNew(NetworkPacket);
// void HandlePlayerDelete(NetworkPacket);
// void HandlePlayerUpdate(NetworkPacket);
//networking
UDPNetworkUtility network;
@@ -74,16 +74,15 @@ private:
//database
sqlite3* database = nullptr;
//lua
lua_State* luaState = nullptr;
//misc
bool running = true;
ConfigUtility config;
//global lists
ClientMap clientMap;
PlayerMap playerMap;
int clientCounter = 0;
int playerCounter = 0;
ClientManager clientMgr;
PlayerManager playerMgr;
};
#endif