Fixes in GameObserver serialization/deserialization code Fixes in JNetwork and JSocket on windows Various code cleanup (currentGamePhase access in particular) Updated GUI code to re-enable a basic network GUI Activated threaded tests on Windows. It uses 4 threads by default.
34 lines
730 B
C++
34 lines
730 B
C++
#ifndef NETWORKPLAYER_H
|
|
#define NETWORKPLAYER_H
|
|
|
|
#include "PrecompiledHeader.h"
|
|
#include "Player.h"
|
|
#include "JNetwork.h"
|
|
|
|
extern void RegisterNetworkPlayers();
|
|
|
|
class ProxyPlayer
|
|
{
|
|
protected:
|
|
Player* mpPlayer;
|
|
JNetwork* mpNetwork;
|
|
static ProxyPlayer* mInstance;
|
|
public:
|
|
ProxyPlayer(Player* pxPlayer, JNetwork* pxNetwork);
|
|
static void Serialize(void*, stringstream& in, stringstream& out);
|
|
};
|
|
|
|
|
|
class RemotePlayer : public Player
|
|
{
|
|
protected:
|
|
JNetwork* mpNetwork;
|
|
static RemotePlayer* mInstance;
|
|
public:
|
|
RemotePlayer(GameObserver* observer, JNetwork*);
|
|
static void Deserialize(void*, stringstream& in, stringstream& out);
|
|
bool isLoaded() {return game!=NULL;};
|
|
};
|
|
|
|
#endif // NETWORKPLAYER_H
|