Minecraft Community Edition 0.1.0
Loading...
Searching...
No Matches
Minecraft.hpp
1#pragma once
2
3#include <EASTL/unique_ptr.h>
4#include <EASTL/string.h>
5#include "SFML/Window/Window.hpp"
6#include "Graphics/GraphicsContext.hpp"
7#include "Graphics/Renderer.hpp"
8#include "Core/QEventBus.hpp"
9
10namespace mce {
11 namespace gfx {
12 class GraphicsContext;
13 class Renderer;
14 }
15
16 using core::QEventBus;
18 using gfx::Renderer;
19
20 class Minecraft {
21 public:
22 Minecraft(const eastl::string_view& profileName);
23 ~Minecraft();
24
25
26 int run();
27 private:
28 int initInstance();
29
30 void handleEvents();
31
32 inline void translateEventAndDispatch(const std::optional<sf::Event> event);
33
34 std::string getLogFileName();;
35
36 void setupLogging();
37
38 sf::Window window;
39
40 eastl::unique_ptr<GraphicsContext> graphicsContext;
41 eastl::unique_ptr<Renderer> renderer;
42 QEventBus qBus;
43 };
44}
Thread-safe event bus.
Thread-safe event bus.
Definition QEventBus.hpp:58
Definition GraphicsContext.hpp:11
Definition Renderer.hpp:4