fix: change renderer to class

This commit is contained in:
2021-09-18 18:58:32 +02:00
parent 519c6e33e7
commit a8b6a646af
10 changed files with 150 additions and 121 deletions

View File

@@ -1,9 +1,13 @@
#pragma once
#include "game/BaseGame.h"
#include "protocol/PacketHandler.h"
#include "WorldClient.h"
#include "render/WorldRenderer.h"
#include "render/Renderer.h"
namespace td {
namespace client {
@@ -13,10 +17,11 @@ private:
std::uint8_t m_ConnexionID;
std::uint32_t m_LobbyTime = 0;
game::Player* m_Player = nullptr;
client::WorldClient m_WorldClient{this};
render::WorldRenderer m_WorldRenderer{&m_WorldClient};
render::Renderer* m_Renderer;
client::WorldClient m_WorldClient;
render::WorldRenderer m_WorldRenderer;
public:
ClientGame(protocol::PacketDispatcher* dispatcher);
ClientGame(protocol::PacketDispatcher* dispatcher, render::Renderer* renderer);
virtual ~ClientGame();
virtual void tick(std::uint64_t delta);