summaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorrealtradam <[email protected]>2022-02-08 03:12:31 -0500
committerrealtradam <[email protected]>2022-02-08 03:12:31 -0500
commit864c710a510be8e318023e34565209f9a24a3ac7 (patch)
treef42c172c290df6ba587042f978747dc4f88ba352 /include
parent187cab9f77a6274ba4e5bb9c012fca5549c020fb (diff)
downloadmruby-raylib-864c710a510be8e318023e34565209f9a24a3ac7.tar.gz
mruby-raylib-864c710a510be8e318023e34565209f9a24a3ac7.zip
move stuff to types.h
Diffstat (limited to 'include')
-rw-r--r--include/mruby-raylib/core.h14
-rw-r--r--include/mruby-raylib/textures.h11
-rw-r--r--include/mruby-raylib/types.h (renamed from include/raylib/core.h)25
3 files changed, 36 insertions, 14 deletions
diff --git a/include/mruby-raylib/core.h b/include/mruby-raylib/core.h
new file mode 100644
index 0000000..c0e6815
--- /dev/null
+++ b/include/mruby-raylib/core.h
@@ -0,0 +1,14 @@
+#ifndef MRUBY_RAYLIB_CORE_H
+#define MRUBY_RAYLIB_CORE_H
+#include "mruby-raylib/types.h"
+#include <mruby/string.h>
+#include <mruby/numeric.h>
+#include <stdlib.h>
+#if defined(PLATFORM_WEB)
+#include <emscripten/emscripten.h>
+#endif
+
+void mrb_init_raylib_core(mrb_state*);
+
+#endif /* end of include guard MRUBY_RAYLIB_CORE_H */
+
diff --git a/include/mruby-raylib/textures.h b/include/mruby-raylib/textures.h
new file mode 100644
index 0000000..01bc0a6
--- /dev/null
+++ b/include/mruby-raylib/textures.h
@@ -0,0 +1,11 @@
+#ifndef MRUBY_RAYLIB_TEXTURES_H
+#define MRUBY_RAYLIB_TEXTURES_H
+#include <raylib.h>
+#include <mruby.h>
+#include <mruby/string.h>
+#include <mruby/data.h>
+#include <mruby/numeric.h>
+#include <stdlib.h>
+#include "mruby-raylib/core.h"
+
+#endif
diff --git a/include/raylib/core.h b/include/mruby-raylib/types.h
index 7985fa1..f6f5b67 100644
--- a/include/raylib/core.h
+++ b/include/mruby-raylib/types.h
@@ -1,15 +1,7 @@
-#ifndef MRUBY_RAYLIB_CORE_H
-#define MRUBY_RAYLIB_CORE_H
-#include <raylib.h>
+#ifndef MRUBY_RAYLIB_TYPES_H
+#define MRUBY_RAYLIB_TYPES_H
#include <mruby.h>
-#include <mruby/string.h>
#include <mruby/data.h>
-#include <mruby/numeric.h>
-#include <stdlib.h>
-#if defined(PLATFORM_WEB)
-#include <emscripten/emscripten.h>
-#endif
-
#define PREWRAPSTRUCT(var_name, type, target) var_name = (type *)DATA_PTR(target)
@@ -21,12 +13,17 @@
#define UNWRAPSTRUCT(type, mrb_type, target, var_name) var_name = DATA_GET_PTR(mrb, target, &mrb_type, type)
-
-
extern const struct mrb_data_type Color_type;
extern const struct mrb_data_type Rectangle_type;
+extern const struct mrb_data_type Texture_type;
+extern const struct mrb_data_type Sound_type;
+extern const struct mrb_data_type Music_type;
+extern const struct mrb_data_type Vector2_type;
+extern const struct mrb_data_type NPatchInfo_type;
-void mrb_init_raylib_core(mrb_state*);
+void helper_texture_free(mrb_state*, void*);
+void helper_sound_free(mrb_state*, void*);
+void helper_music_free(mrb_state*, void*);
-#endif /* end of include guard MRUBY_RAYLIB_CORE_H */
+#endif /* end of include guard MRUBY_RAYLIB_TYPES_H */