Danbias/Code/Game/DanBiasGame/GameClientState/GameClientState.h

87 lines
1.5 KiB
C
Raw Normal View History

#ifndef DANBIAS_CLIENT_GAMECLIENTSTATE_H
#define DANBIAS_CLIENT_GAMECLIENTSTATE_H
#define NOMINMAX
#include "L_inputClass.h"
#include "NetworkClient.h"
2014-02-11 14:47:57 +01:00
namespace DanBias { namespace Client
{
2014-02-11 14:47:57 +01:00
class GameClientState
2013-12-13 12:02:49 +01:00
{
2014-02-11 14:47:57 +01:00
public:
struct ProtocolStruct
{
2013-12-13 12:02:49 +01:00
2014-02-11 14:47:57 +01:00
};
struct ObjPos : public ProtocolStruct
{
int object_ID;
//float worldPos[16];
float position[3];
float rotation[4];
};
struct NewObj : public ProtocolStruct
{
int object_ID;
char* path;
float worldPos[16];
};
2014-02-11 14:47:57 +01:00
struct RemoveObj : public ProtocolStruct
{
int object_ID;
//particle effect
};
2013-12-13 12:02:49 +01:00
2014-02-11 14:47:57 +01:00
struct KeyInput : public ProtocolStruct
{
/*
* key[0] =
*
*
*/
2014-02-11 14:47:57 +01:00
bool key[6];
};
struct PlayerPos : public ProtocolStruct
{
float position[3];
float angularAxis[3];
// float playerPos[3];
};
struct PlayerMove : public ProtocolStruct
{
float playerPos[3];
};
struct PlayerName : public ProtocolStruct
{
char name[255];
};
enum ClientState
{
ClientState_Login,
ClientState_Lobby,
ClientState_Lan,
ClientState_LobbyCreated,
ClientState_Game,
ClientState_Same,
};
public:
GameClientState(void);
virtual ~GameClientState(void);
virtual bool Init(Oyster::Network::NetworkClient* nwClient) = 0;
virtual ClientState Update(float deltaTime, InputClass* KeyInput) = 0;
virtual bool Render() = 0;
virtual bool Release() = 0;
virtual void Protocol(ProtocolStruct* protocolStruct) = 0;
};
} }
#endif