Small fixes.

This commit is contained in:
Quentin Bazin 2019-02-21 09:44:16 +01:00
parent 2a4fa9641d
commit 23be33492e
6 changed files with 18 additions and 13 deletions

View File

@ -23,7 +23,7 @@
#include "Network.hpp"
#include "Recipe.hpp"
struct Client;
class Client;
class Registry : public ISerializable {
public:

View File

@ -18,6 +18,8 @@ namespace sf { class Packet; }
class ISerializable {
public:
virtual ~ISerializable() = default;
virtual void serialize(sf::Packet &packet) = 0;
virtual void deserialize(sf::Packet &packet) = 0;
};

View File

@ -20,6 +20,8 @@
class World {
public:
virtual ~World() = default;
virtual BlockData *getBlockData(int x, int y, int z) const = 0;
virtual u16 getBlock(int x, int y, int z) const = 0;

View File

@ -24,7 +24,8 @@
#include "NetworkInputHandler.hpp"
struct Client {
class Client {
public:
Client(u16 _id, sf::IpAddress _address, u16 _port, const std::shared_ptr<sf::TcpSocket> &socket)
: id(_id), address(_address), port(_port), tcpSocket(socket) {}

View File

@ -16,7 +16,7 @@
#include "Block.hpp"
struct Client;
class Client;
class Server;
class ServerBlock : public Block {

View File

@ -20,7 +20,7 @@
#include "ServerChunk.hpp"
#include "World.hpp"
struct Client;
class Client;
class Server;
class ServerPlayer;