Loading...
Searching...
No Matches
Minecraft.hpp
#pragma once
#include <EASTL/unique_ptr.h>
#include <EASTL/string.h>
#include "SFML/Window/Window.hpp"
#include "Graphics/GraphicsContext.hpp"
#include "Graphics/Renderer.hpp"
#include "Core/QEventBus.hpp"
namespace mce {
namespace gfx {
class GraphicsContext;
class Renderer;
}
using core::QEventBus;
using gfx::GraphicsContext;
using gfx::Renderer;
class Minecraft {
public:
Minecraft(const eastl::string_view& profileName);
~Minecraft();
int run();
private:
int initInstance();
void handleEvents();
inline void translateEventAndDispatch(const std::optional<sf::Event> event);
std::string getLogFileName();;
void setupLogging();
sf::Window window;
eastl::unique_ptr<GraphicsContext> graphicsContext;
eastl::unique_ptr<Renderer> renderer;
QEventBus qBus;
};
}
QEventBus.hpp
Thread-safe event bus.
mce::core::QEventBus
Thread-safe event bus.
Definition QEventBus.hpp:58
mce::gfx::GraphicsContext
Definition GraphicsContext.hpp:11
mce::gfx::Renderer
Definition Renderer.hpp:4