summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrederico Linhares <fred@linhares.blue>2022-10-04 17:55:15 -0300
committerFrederico Linhares <fred@linhares.blue>2022-10-04 17:55:15 -0300
commit2032daa62db8c2c70ab36ee14f0f4e87c2a68278 (patch)
tree9f079b75662ead17553d329cf2129884f3d8d15b
parent30c8d2b144bae1e5f95936c5af1b4432bcfdc7b4 (diff)
buil Use SDL_MAIN_HANDLED to compile engine on Windows
-rw-r--r--src/core.hpp2
-rw-r--r--src/pgm_image.hpp8
-rw-r--r--src/sprite_implementation.cpp1
-rw-r--r--src/sprite_implementation.hpp2
-rw-r--r--src/vk/texture.cpp3
5 files changed, 8 insertions, 8 deletions
diff --git a/src/core.hpp b/src/core.hpp
index c4e9a6c..7d1d62f 100644
--- a/src/core.hpp
+++ b/src/core.hpp
@@ -33,6 +33,8 @@
#include <mruby/dump.h>
#include <mruby/variable.h>
+#define SDL_MAIN_HANDLED
+
#include <SDL2/SDL.h>
#include <SDL2/SDL_vulkan.h>
#include <SDL2/SDL_image.h>
diff --git a/src/pgm_image.hpp b/src/pgm_image.hpp
index ef9607d..bda73ca 100644
--- a/src/pgm_image.hpp
+++ b/src/pgm_image.hpp
@@ -17,8 +17,6 @@
#ifndef CANDY_GEAR_PGM_IMAGE_H
#define CANDY_GEAR_PGM_IMAGE_H 1
-#include <SDL2/SDL.h>
-
struct PGMImage_s
{
int width, height, max_value, data_size;
@@ -28,7 +26,9 @@ struct PGMImage_s
typedef struct PGMImage_s PGMImage;
-bool PGMImage_constructor(PGMImage *self, const char *file_path);
-void PGMImage_destructor(PGMImage *self);
+bool
+PGMImage_constructor(PGMImage *self, const char *file_path);
+void
+PGMImage_destructor(PGMImage *self);
#endif /* CANDY_GEAR_PGM_IMAGE_H */
diff --git a/src/sprite_implementation.cpp b/src/sprite_implementation.cpp
index 099fa35..caa56a2 100644
--- a/src/sprite_implementation.cpp
+++ b/src/sprite_implementation.cpp
@@ -16,6 +16,7 @@
#include "sprite_implementation.hpp"
+#include <cstring>
#include <fstream>
#include <yaml-cpp/yaml.h>
diff --git a/src/sprite_implementation.hpp b/src/sprite_implementation.hpp
index bd3e954..d679272 100644
--- a/src/sprite_implementation.hpp
+++ b/src/sprite_implementation.hpp
@@ -17,7 +17,7 @@
#ifndef CANDY_GEAR_SPRITE_IMPLEMENTATION_H
#define CANDY_GEAR_SPRITE_IMPLEMENTATION_H 1
-#include <SDL2/SDL.h>
+#include <cstdint>
struct cg_Sprite_s
{
diff --git a/src/vk/texture.cpp b/src/vk/texture.cpp
index ae35035..54cf801 100644
--- a/src/vk/texture.cpp
+++ b/src/vk/texture.cpp
@@ -16,9 +16,6 @@
#include "texture.hpp"
-#include <SDL2/SDL.h>
-#include <SDL2/SDL_image.h>
-
#include "../command.hpp"
#include "../core.hpp"
#include "image.hpp"