summaryrefslogtreecommitdiff
path: root/sources/texture.h
diff options
context:
space:
mode:
authorHenrique Alves <henrique.alves@itsjungle.xyz>2024-04-29 10:23:52 +0300
committerHenrique Alves <henrique.alves@itsjungle.xyz>2024-04-29 10:23:52 +0300
commitaeddacb8d88f41ba7bdf37d39de17d8cf3b6a258 (patch)
tree2daee509556bb1e7a9b74dc610b2ef4831392fdb /sources/texture.h
parent94e1881676e39bd8b8e6a8ee98e541102b380549 (diff)
downloadgamejam-slgj-2024-aeddacb8d88f41ba7bdf37d39de17d8cf3b6a258.tar.gz
gamejam-slgj-2024-aeddacb8d88f41ba7bdf37d39de17d8cf3b6a258.tar.bz2
gamejam-slgj-2024-aeddacb8d88f41ba7bdf37d39de17d8cf3b6a258.zip
Creating small evaluation prompt
Diffstat (limited to 'sources/texture.h')
-rw-r--r--sources/texture.h29
1 files changed, 0 insertions, 29 deletions
diff --git a/sources/texture.h b/sources/texture.h
deleted file mode 100644
index 8dfb996..0000000
--- a/sources/texture.h
+++ /dev/null
@@ -1,29 +0,0 @@
-int texture_2d_tag;
-
-static s7_pointer free_texture_2d(s7_scheme *s7, s7_pointer obj) {
- Texture2D *texture = (Texture2D *) s7_c_object_value(obj);
- UnloadTexture(*texture);
- free(texture);
- return(NULL);
-}
-
-static s7_pointer rl_draw_texture(s7_scheme *s7, s7_pointer args) {
- Texture2D *texture = (Texture2D *) s7_c_object_value(s7_car(args));
- DrawTexture(*texture, 100, 100, WHITE);
- return(NULL);
-}
-
-static s7_pointer rl_load_texture(s7_scheme *s7, s7_pointer args) {
- Texture2D texture = LoadTexture("./assets/test.png");
- Texture2D *texture_ptr = (Texture2D *) malloc(sizeof(Texture2D));
- *texture_ptr = texture;
- return (s7_make_c_object(s7, texture_2d_tag, (void *) texture_ptr));
-}
-
-static void rl_texture_define_methods(s7_scheme *s7) {
- s7_define_function(s7, "rl-load-texture", rl_load_texture, 0, 0, false, "test");
- s7_define_function(s7, "rl-draw-texture", rl_draw_texture, 1, 0, false, "test");
-
- texture_2d_tag = s7_make_c_type(s7, "texture-2d");
- s7_c_type_set_gc_free(s7, texture_2d_tag, free_texture_2d);
-}