summaryrefslogtreecommitdiff
path: root/src/core.hpp
diff options
context:
space:
mode:
authorFrederico Linhares <fred@linhares.blue>2024-05-16 14:22:35 -0300
committerFrederico Linhares <fred@linhares.blue>2024-05-16 14:22:35 -0300
commitd5a2b6bca9f9cc57dcca19962d5ba9b83d26da3e (patch)
treefa4decb441b0cc5cd189183166a324079f37c45a /src/core.hpp
parent43821b0cffc5aa419c0218992f06f8962ae54a13 (diff)
refa Move BluCan initialization to BluCat folderHEADmaster
Diffstat (limited to 'src/core.hpp')
-rw-r--r--src/core.hpp82
1 files changed, 2 insertions, 80 deletions
diff --git a/src/core.hpp b/src/core.hpp
index c351917..e7caf8b 100644
--- a/src/core.hpp
+++ b/src/core.hpp
@@ -21,9 +21,6 @@
#define CANDY_GEAR_VERSION_MINOR 1
#define CANDY_GEAR_VERSION_PATCH 0
-#include <chrono>
-#include <random>
-
#include <mruby.h>
#include <mruby/class.h>
#include <mruby/compile.h>
@@ -44,29 +41,7 @@
#include <ft2build.h>
#include FT_FREETYPE_H
-#include "command.hpp"
-#include "job_queue.hpp"
-#include "log.hpp"
-#include "worker.hpp"
-
-#include "blucat/device.hpp"
-#include "blucat/descriptor_set_layout.hpp"
-#include "blucat/render_pass.hpp"
-#include "blucat/framebuffer.hpp"
-#include "blucat/graphics_pipeline_2d_solid_layout.hpp"
-#include "blucat/graphics_pipeline_2d_wired_layout.hpp"
-#include "blucat/light.hpp"
-#include "blucat/graphics_pipeline_2d_solid.hpp"
-#include "blucat/graphics_pipeline_2d_wired.hpp"
-#include "blucat/graphics_pipeline_3d_layout.hpp"
-#include "blucat/graphics_pipeline_3d.hpp"
-#include "blucat/graphics_pipeline_3d_skeletal.hpp"
-#include "blucat/graphics_pipeline_sprite_3d.hpp"
-#include "blucat/renderer.hpp"
-#include "blucat/swapchain.hpp"
-
-extern std::random_device random_seed;
-extern std::mt19937 random_number_generator;
+#include "blucat/core.hpp"
/**
* The Core class stores all global states that the engine needs to work.
@@ -76,12 +51,6 @@ struct cg_sCore
{
static const CommandChain loader;
- Log::Logger log;
-
- JobQueue job_queue;
- std::vector<Worker> workers;
- std::vector<std::thread> threads;
-
mrb_state *mrb;
std::string game_file;
@@ -91,56 +60,9 @@ struct cg_sCore
sym_init, sym_key_down, sym_key_up, sym_quit, sym_tick, sym_trace,
sym_warning;
- /// Text displayed in the game window.
- std::string game_name;
-
- /**
- * @{
- * This is the ammount of pixel that the games uses when rendering to the
- * screen.
- */
- uint32_t display_width, display_height;
- /// @}
-
- int game_version_major, game_version_minor, game_version_patch;
-
- Uint32 fps;
- std::chrono::duration<long long, std::milli> max_frame_duration;
- float delta_time;
+ bool quit_game;
SDL_Window *window;
-
- FT_Library font_library;
-
- VkSurfaceKHR window_surface;
- VkInstance vk_instance;
-
-#ifdef DEBUG
- VkDebugUtilsMessengerEXT vk_callback;
-#endif
-
- // Vulkan devices.
- std::vector<BluCat::Device> vk_devices;
- BluCat::Device *vk_device_with_swapchain;
- BluCat::Swapchain *vk_swapchain;
-
- BluCat::Framebuffer *vk_framebuffer;
- BluCat::RenderPass *vk_render_pass;
- BluCat::DescriptorSetLayout *vk_descriptor_set_layout;
- BluCat::GraphicsPipeline3DLayout *vk_graphics_pipeline_3d_layout;
- BluCat::GraphicsPipeline2DSolidLayout *vk_graphics_pipeline_2d_solid_layout;
- BluCat::GraphicsPipeline2DWiredLayout *vk_graphics_pipeline_2d_wired_layout;
- BluCat::Light *vk_light;
- std::unique_ptr<BluCat::GraphicsPipeline3D> vk_graphics_pipeline_3d;
- std::unique_ptr<BluCat::GraphicsPipeline3DSkeletal>
- vk_graphics_pipeline_3d_skeletal;
- std::unique_ptr<BluCat::GraphicsPipelineSprite3D> vk_graphics_pipeline_sprite_3d;
- std::unique_ptr<BluCat::GraphicsPipeline2DSolid> vk_graphics_pipeline_2d_solid;
- std::unique_ptr<BluCat::GraphicsPipeline2DWired> vk_graphics_pipeline_2d_wired;
-
- BluCat::Renderer *vk_renderer;
-
- bool quit_game;
};
extern cg_sCore cg_core;