minecraftvulkan/src/minecraft.hpp

46 lines
878 B
C++
Raw Normal View History

2022-09-19 01:20:51 +00:00
#pragma once
2022-09-19 11:08:42 +00:00
#include "xe_engine.hpp"
2022-09-19 01:20:51 +00:00
2022-10-01 18:35:16 +00:00
#include "player_controller.hpp"
#include "chunk_renderer.hpp"
2022-09-27 21:03:43 +00:00
#include "chunk.hpp"
#define GLM_FORCE_RADIANS
#define GLM_FORCE_DEPTH_ZERO_TO_ONE
#include <glm/glm.hpp>
#include <glm/gtc/constants.hpp>
#include <array>
#include <string>
2022-09-19 01:20:51 +00:00
#include <memory>
#include <vector>
2022-09-26 15:03:27 +00:00
#include <iostream>
2022-09-19 01:20:51 +00:00
2022-09-20 01:28:41 +00:00
namespace app {
2022-10-01 18:35:16 +00:00
class Minecraft {
2022-09-19 01:20:51 +00:00
public:
2022-10-01 18:35:16 +00:00
Minecraft();
~Minecraft();
2022-09-19 01:20:51 +00:00
2022-10-01 18:35:16 +00:00
Minecraft(const Minecraft &) = delete;
Minecraft operator=(const Minecraft &) = delete;
2022-09-19 01:20:51 +00:00
void run();
private:
2022-09-20 01:28:41 +00:00
static constexpr int WIDTH = 800;
static constexpr int HEIGHT = 600;
2022-09-30 19:40:42 +00:00
static constexpr int RENDER_DISTANCE = 10;
2022-09-20 01:28:41 +00:00
2022-09-27 21:03:43 +00:00
void createGameObjects(xe::GameObject& viewer);
void reloadLoadedChunks(xe::GameObject& viewer);
int viewX, viewZ;
2022-09-19 01:20:51 +00:00
2022-09-27 21:03:43 +00:00
xe::Engine xeEngine;
std::vector<xe::GameObject> loadedChunks;
2022-09-19 01:20:51 +00:00
};
}