summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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"