From 96228c92004fefae3cb3392c20d90ec4ede753cd Mon Sep 17 00:00:00 2001 From: Frederico Linhares Date: Wed, 12 Mar 2025 20:40:25 -0300 Subject: refa Move initialization code to BluCat --- src/blu_cat/int/core.hpp | 28 +++++++++++++++++++++++----- 1 file changed, 23 insertions(+), 5 deletions(-) (limited to 'src/blu_cat/int/core.hpp') diff --git a/src/blu_cat/int/core.hpp b/src/blu_cat/int/core.hpp index 0900b81..a334dfa 100644 --- a/src/blu_cat/int/core.hpp +++ b/src/blu_cat/int/core.hpp @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 Frederico de Oliveira Linhares + * Copyright 2022-2025 Frederico de Oliveira Linhares * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -26,6 +26,19 @@ #include #include +#define SDL_MAIN_HANDLED + +#ifdef _WIN64 +#include +#endif + +#include +#include +#include + +#include +#include FT_FREETYPE_H + #include "../com/command.hpp" #include "../com/job_queue.hpp" #include "../com/worker.hpp" @@ -64,22 +77,27 @@ struct Core std::vector threads; /// Text displayed in the game window. - std::string game_name; + std::string game_name{"BluCat Game"}; /** * @{ * This is the ammount of pixel that the games uses when rendering to the * screen. */ - uint32_t display_width, display_height; + uint32_t display_width{800}; + uint32_t display_height{600}; /// @} - int game_version_major, game_version_minor, game_version_patch; + int game_version_major{0}; + int game_version_minor{1}; + int game_version_patch{0}; - uint32_t fps; + uint32_t fps{30}; std::chrono::duration max_frame_duration; float delta_time; + SDL_Window *window; + FT_Library font_library; VkSurfaceKHR window_surface; -- cgit v1.2.3