diff --git a/build/genie b/build/genie new file mode 100644 index 0000000..8985b67 Binary files /dev/null and b/build/genie differ diff --git a/build/genie.lua b/build/genie.lua new file mode 100644 index 0000000..7694c99 --- /dev/null +++ b/build/genie.lua @@ -0,0 +1,64 @@ +-- A solution contains projects, and defines the available configurations +solution "Symmetry" +configurations { "Debug", "Release" } +location(_ACTION) +defines {"USE_GLAD"} +includedirs {"../include/"} +buildoptions {"-Wall", "-std=c99"} +if os.is("linux") then + postbuildcommands {"ln -fs /mnt/Dev/Projects/symmetry/assets debug"} + postbuildcommands {"ln -fs /mnt/Dev/Projects/symmetry/assets release"} +end + +configuration "Debug" +if not _ACTION == nil then + os.mkdir(_ACTION .. "/debug") + targetdir (_ACTION .. "/debug") +end + +configuration "Release" +if not _ACTION == nil then + os.mkdir(_ACTION .. "/release") + targetdir (_ACTION .. "/release") +end + +------------------------- +-- Game +------------------------- +project "Game" +kind "WindowedApp" +targetname "Symmetry" +language "C" +files { "../src/common/**.c", "../src/game/**.c" } +defines {"GAME"} + +configuration "linux" +buildoptions {"`pkg-config --cflags-only-other sdl2 openal`"} +linkoptions {"`pkg-config --libs sdl2 openal`"} +links {"m"} + +configuration "Debug" +defines { "DEBUG" } +flags { "Symbols" } + +configuration "Release" +defines { "NDEBUG" } +flags { "OptimizeSpeed"} + +------------------------- +-- libSymmetry +------------------------- +project "Library" +kind "SharedLib" +targetname "Symmetry" +language "C" +defines {"GAME_LIB"} +files { "../src/common/**.c", "../src/libsymmetry/**.c" } + +configuration "Debug" +defines {"GL_DEBUG_CONTEXT", "AL_DEBUG"} +flags {"Symbols"} + +configuration "Release" +defines { "NDEBUG" } +flags { "OptimizeSpeed"} diff --git a/build/linux/makefile b/build/linux/makefile index df12703..f8c9d9c 100644 --- a/build/linux/makefile +++ b/build/linux/makefile @@ -9,7 +9,7 @@ CFLAGS_GAME = $(CFLAGS) -DGAME $(shell pkg-config --cflags-only-other sdl2 o CFLAGS_GAME_LIB = $(CFLAGS) -DGAME_LIB CFLAGS_DEBUG = -g -DGL_DEBUG_CONTEXT -DAL_DEBUG CFLAGS_RELEASE = -O3 -ffast-math -LFLAGS = $(shell pkg-config --libs sdl2 openal) -lm -ldl +LFLAGS = $(shell pkg-config --libs sdl2 openal) -lm ITCH_BUTLER = ~/.config/itch/bin/butler SRCS_GAME = main.c platform.c log.c array.c utils.c config_vars.c file_io.c glad.c hashmap.c sound.c string_utils.c variant.c linmath.c diff --git a/src/array.c b/src/common/array.c similarity index 100% rename from src/array.c rename to src/common/array.c diff --git a/src/array.h b/src/common/array.h similarity index 100% rename from src/array.h rename to src/common/array.h diff --git a/src/array_str.h b/src/common/array_str.h similarity index 100% rename from src/array_str.h rename to src/common/array_str.h diff --git a/src/common.h b/src/common/common.h similarity index 100% rename from src/common.h rename to src/common/common.h diff --git a/src/hashmap.c b/src/common/hashmap.c similarity index 100% rename from src/hashmap.c rename to src/common/hashmap.c diff --git a/src/hashmap.h b/src/common/hashmap.h similarity index 100% rename from src/hashmap.h rename to src/common/hashmap.h diff --git a/src/linmath.c b/src/common/linmath.c similarity index 100% rename from src/linmath.c rename to src/common/linmath.c diff --git a/src/linmath.h b/src/common/linmath.h similarity index 100% rename from src/linmath.h rename to src/common/linmath.h diff --git a/src/log.c b/src/common/log.c similarity index 100% rename from src/log.c rename to src/common/log.c diff --git a/src/log.h b/src/common/log.h similarity index 100% rename from src/log.h rename to src/common/log.h diff --git a/src/num_types.h b/src/common/num_types.h similarity index 86% rename from src/num_types.h rename to src/common/num_types.h index 2b4b47b..a4012be 100644 --- a/src/num_types.h +++ b/src/common/num_types.h @@ -1,5 +1,5 @@ -#ifndef num_types_H -#define num_types_H +#ifndef NUM_TYPES_H +#define NUM_TYPES_H #include #include diff --git a/src/string_utils.c b/src/common/string_utils.c similarity index 100% rename from src/string_utils.c rename to src/common/string_utils.c diff --git a/src/string_utils.h b/src/common/string_utils.h similarity index 100% rename from src/string_utils.h rename to src/common/string_utils.h diff --git a/src/utils.c b/src/common/utils.c similarity index 100% rename from src/utils.c rename to src/common/utils.c diff --git a/src/utils.h b/src/common/utils.h similarity index 100% rename from src/utils.h rename to src/common/utils.h diff --git a/src/variant.c b/src/common/variant.c similarity index 100% rename from src/variant.c rename to src/common/variant.c diff --git a/src/variant.h b/src/common/variant.h similarity index 100% rename from src/variant.h rename to src/common/variant.h diff --git a/src/config_vars.c b/src/game/config_vars.c similarity index 96% rename from src/config_vars.c rename to src/game/config_vars.c index 0b6153b..d48cb07 100644 --- a/src/config_vars.c +++ b/src/game/config_vars.c @@ -1,9 +1,9 @@ #include "config_vars.h" -#include "string_utils.h" -#include "variant.h" -#include "hashmap.h" +#include "../common/string_utils.h" +#include "../common/variant.h" +#include "../common/hashmap.h" #include "file_io.h" -#include "log.h" +#include "../common/log.h" #include "platform.h" #include diff --git a/src/config_vars.h b/src/game/config_vars.h similarity index 91% rename from src/config_vars.h rename to src/game/config_vars.h index 7b89c62..4fcb5d7 100644 --- a/src/config_vars.h +++ b/src/game/config_vars.h @@ -1,7 +1,7 @@ #ifndef CONFIG_VARS_H #define CONFIG_VARS_H -#include "num_types.h" +#include "../common/num_types.h" struct Hashmap; diff --git a/src/file_io.c b/src/game/file_io.c similarity index 96% rename from src/file_io.c rename to src/game/file_io.c index f7385f5..a6fd2f1 100644 --- a/src/file_io.c +++ b/src/game/file_io.c @@ -2,8 +2,8 @@ #include #include "file_io.h" -#include "log.h" -#include "string_utils.h" +#include "../common/log.h" +#include "../common/string_utils.h" static char* install_directory = NULL; static char* user_directory = NULL; diff --git a/src/file_io.h b/src/game/file_io.h similarity index 91% rename from src/file_io.h rename to src/game/file_io.h index b6f2b3a..e175a6b 100644 --- a/src/file_io.h +++ b/src/game/file_io.h @@ -1,7 +1,7 @@ #ifndef FILE_IO_H #define FILE_IO_H -#include "common.h" +#include "../common/common.h" void io_file_init(const char* install_dir, const char* user_dir); char* io_file_read(const int directory_type, const char* path, const char* mode, long* file_size); diff --git a/src/main.c b/src/game/main.c similarity index 98% rename from src/main.c rename to src/game/main.c index e30e041..da0d9fd 100644 --- a/src/main.c +++ b/src/game/main.c @@ -1,14 +1,13 @@ #include #include -#include "log.h" +#include "../common/log.h" #include "sound.h" #include "platform.h" -#include "gl_load.h" #include "file_io.h" #include "config_vars.h" -#include "hashmap.h" -#include "common.h" +#include "../common/hashmap.h" +#include "../common/common.h" static struct Window* window = NULL; static struct Platform_Api platform_api; diff --git a/src/platform.c b/src/game/platform.c similarity index 99% rename from src/platform.c rename to src/game/platform.c index 3f0b4ac..5ffe20f 100644 --- a/src/platform.c +++ b/src/game/platform.c @@ -1,8 +1,8 @@ #include "platform.h" -#include "log.h" +#include "../common/log.h" #include "config_vars.h" -#include "hashmap.h" -#include "string_utils.h" +#include "../common/hashmap.h" +#include "../common/string_utils.h" #include #include diff --git a/src/platform.h b/src/game/platform.h similarity index 98% rename from src/platform.h rename to src/game/platform.h index 1d562e7..d4ae149 100644 --- a/src/platform.h +++ b/src/game/platform.h @@ -1,7 +1,7 @@ #ifndef PLATFORM_H #define PLATFORM_H -#include "common.h" +#include "../common/common.h" enum Video_Drivers_Linux { diff --git a/src/sound.c b/src/game/sound.c similarity index 98% rename from src/sound.c rename to src/game/sound.c index b2ab199..7ce15ef 100644 --- a/src/sound.c +++ b/src/game/sound.c @@ -1,7 +1,7 @@ #include "sound.h" -#include "log.h" -#include "array.h" -#include "string_utils.h" +#include "../common/log.h" +#include "../common/array.h" +#include "../common/string_utils.h" #include "file_io.h" #include diff --git a/src/sound.h b/src/game/sound.h similarity index 97% rename from src/sound.h rename to src/game/sound.h index 3cd58a7..7170643 100644 --- a/src/sound.h +++ b/src/game/sound.h @@ -1,7 +1,7 @@ #ifndef SOUND_H #define SOUND_H -#include "num_types.h" +#include "../common/num_types.h" #ifdef AL_DEBUG #define al_check(expr) {expr; sound_error_check(__FILE__, __LINE__, #expr);} diff --git a/src/bounding_volumes.c b/src/libsymmetry/bounding_volumes.c similarity index 100% rename from src/bounding_volumes.c rename to src/libsymmetry/bounding_volumes.c diff --git a/src/bounding_volumes.h b/src/libsymmetry/bounding_volumes.h similarity index 90% rename from src/bounding_volumes.h rename to src/libsymmetry/bounding_volumes.h index 113dbca..ecae08d 100644 --- a/src/bounding_volumes.h +++ b/src/libsymmetry/bounding_volumes.h @@ -1,8 +1,8 @@ #ifndef BOUNDING_VOLUMES_H #define BOUNDING_VOLUMES_H -#include "linmath.h" -#include "num_types.h" +#include "../common/linmath.h" +#include "../common/num_types.h" struct Entity; diff --git a/src/camera.c b/src/libsymmetry/camera.c similarity index 98% rename from src/camera.c rename to src/libsymmetry/camera.c index b28f6ce..c88f9af 100644 --- a/src/camera.c +++ b/src/libsymmetry/camera.c @@ -2,13 +2,13 @@ #include "entity.h" #include "transform.h" #include "entity.h" -#include "array.h" +#include "../common/array.h" #include "framebuffer.h" #include "texture.h" #include "bounding_volumes.h" -#include "utils.h" -#include "log.h" +#include "../common/utils.h" +#include "../common/log.h" #include "gl_load.h" #include diff --git a/src/camera.h b/src/libsymmetry/camera.h similarity index 100% rename from src/camera.h rename to src/libsymmetry/camera.h diff --git a/src/editor.c b/src/libsymmetry/editor.c similarity index 98% rename from src/editor.c rename to src/libsymmetry/editor.c index a8752e8..f145c2c 100644 --- a/src/editor.c +++ b/src/libsymmetry/editor.c @@ -1,24 +1,24 @@ #include "editor.h" #include "renderer.h" #include "gl_load.h" -#include "log.h" +#include "../common/log.h" #include "camera.h" #include "model.h" #include "texture.h" #include "framebuffer.h" -#include "array.h" +#include "../common/array.h" #include "shader.h" -#include "num_types.h" +#include "../common/num_types.h" #include "light.h" #include "entity.h" #include "transform.h" #include "game.h" #include "gui.h" -#include "array.h" -#include "variant.h" -#include "num_types.h" -#include "string_utils.h" -#include "common.h" +#include "../common/array.h" +#include "../common/variant.h" +#include "../common/num_types.h" +#include "../common/string_utils.h" +#include "../common/common.h" #include #include diff --git a/src/editor.h b/src/libsymmetry/editor.h similarity index 95% rename from src/editor.h rename to src/libsymmetry/editor.h index 7822878..a6208d4 100644 --- a/src/editor.h +++ b/src/libsymmetry/editor.h @@ -1,7 +1,7 @@ #ifndef EDITOR_H #define EDITOR_H -#include "linmath.h" +#include "../common/linmath.h" void editor_init(void); void editor_update(float dt); diff --git a/src/entity.c b/src/libsymmetry/entity.c similarity index 99% rename from src/entity.c rename to src/libsymmetry/entity.c index 7f40c64..1510c4e 100644 --- a/src/entity.c +++ b/src/libsymmetry/entity.c @@ -1,15 +1,15 @@ #include "entity.h" -#include "array.h" -#include "log.h" -#include "string_utils.h" +#include "../common/array.h" +#include "../common/log.h" +#include "../common/string_utils.h" #include "transform.h" #include "camera.h" #include "light.h" #include "model.h" #include "material.h" #include "geometry.h" -#include "variant.h" -#include "common.h" +#include "../common/variant.h" +#include "../common/common.h" #include #include diff --git a/src/entity.h b/src/libsymmetry/entity.h similarity index 97% rename from src/entity.h rename to src/libsymmetry/entity.h index 82d4be1..2f896a7 100644 --- a/src/entity.h +++ b/src/libsymmetry/entity.h @@ -1,8 +1,8 @@ #ifndef ENTITY_H #define ENTITY_H -#include "linmath.h" -#include "num_types.h" +#include "../common/linmath.h" +#include "../common/num_types.h" #define MAX_ENTITY_NAME_LEN 128 #define MAX_SOUND_SOURCE_BUFFERS 5 diff --git a/src/event.h b/src/libsymmetry/event.h similarity index 100% rename from src/event.h rename to src/libsymmetry/event.h diff --git a/src/framebuffer.c b/src/libsymmetry/framebuffer.c similarity index 99% rename from src/framebuffer.c rename to src/libsymmetry/framebuffer.c index 28aaa56..e0becd8 100644 --- a/src/framebuffer.c +++ b/src/libsymmetry/framebuffer.c @@ -1,7 +1,7 @@ #include "framebuffer.h" -#include "array.h" +#include "../common/array.h" #include "renderer.h" -#include "log.h" +#include "../common/log.h" #include "texture.h" #include "gl_load.h" diff --git a/src/framebuffer.h b/src/libsymmetry/framebuffer.h similarity index 91% rename from src/framebuffer.h rename to src/libsymmetry/framebuffer.h index 63451c8..5a00e64 100644 --- a/src/framebuffer.h +++ b/src/libsymmetry/framebuffer.h @@ -1,7 +1,7 @@ -#ifndef framebuffer_H -#define framebuffer_H +#ifndef FRAMEBUFFER_H +#define FRAMEBUFFER_H -#include "num_types.h" +#include "../common/num_types.h" enum Framebuffer_Attachment { diff --git a/src/game.c b/src/libsymmetry/game.c similarity index 99% rename from src/game.c rename to src/libsymmetry/game.c index 06692fe..51f2848 100644 --- a/src/game.c +++ b/src/libsymmetry/game.c @@ -7,16 +7,16 @@ #include "game.h" #include "input.h" #include "renderer.h" -#include "log.h" +#include "../common/log.h" #include "shader.h" #include "entity.h" #include "geometry.h" -#include "array.h" +#include "../common/array.h" #include "transform.h" #include "camera.h" #include "model.h" #include "scene.h" -#include "utils.h" +#include "../common/utils.h" #include "texture.h" #include "material.h" #include "framebuffer.h" @@ -24,10 +24,9 @@ #include "gl_load.h" #include "gui.h" #include "editor.h" -#include "config_vars.h" -#include "hashmap.h" -#include "variant.h" -#include "common.h" +#include "../common/hashmap.h" +#include "../common/variant.h" +#include "../common/common.h" #define UNUSED(a) (void)a #define MIN(a,b) ((a) < (b) ? (a) : (b)) @@ -1592,10 +1591,10 @@ void game_cleanup(void) scene_cleanup(); entity_cleanup(); material_cleanup(); - geom_cleanup(); light_cleanup(); input_cleanup(); renderer_cleanup(); + geom_cleanup(); framebuffer_cleanup(); texture_cleanup(); shader_cleanup(); diff --git a/src/game.h b/src/libsymmetry/game.h similarity index 100% rename from src/game.h rename to src/libsymmetry/game.h diff --git a/src/geometry.c b/src/libsymmetry/geometry.c similarity index 98% rename from src/geometry.c rename to src/libsymmetry/geometry.c index 64fe85d..6842607 100644 --- a/src/geometry.c +++ b/src/libsymmetry/geometry.c @@ -1,10 +1,10 @@ #include "geometry.h" -#include "array.h" -#include "string_utils.h" -#include "log.h" +#include "../common/array.h" +#include "../common/string_utils.h" +#include "../common/log.h" #include "renderer.h" #include "transform.h" -#include "common.h" +#include "../common/common.h" #include "gl_load.h" #include diff --git a/src/geometry.h b/src/libsymmetry/geometry.h similarity index 95% rename from src/geometry.h rename to src/libsymmetry/geometry.h index 51a9f87..ce8f11a 100644 --- a/src/geometry.h +++ b/src/libsymmetry/geometry.h @@ -1,8 +1,8 @@ #ifndef GEOMETRY_H #define GEOMETRY_H -#include "num_types.h" -#include "linmath.h" +#include "../common/num_types.h" +#include "../common/linmath.h" #include "bounding_volumes.h" struct Entity; diff --git a/src/gl_load.c b/src/libsymmetry/gl_load.c similarity index 94% rename from src/gl_load.c rename to src/libsymmetry/gl_load.c index 66370eb..6cce5ac 100644 --- a/src/gl_load.c +++ b/src/libsymmetry/gl_load.c @@ -1,6 +1,6 @@ #include "gl_load.h" -#include "log.h" -#include "common.h" +#include "../common/log.h" +#include "../common/common.h" #ifndef USE_GLAD diff --git a/src/gl_load.h b/src/libsymmetry/gl_load.h similarity index 100% rename from src/gl_load.h rename to src/libsymmetry/gl_load.h diff --git a/src/glad.c b/src/libsymmetry/glad.c similarity index 100% rename from src/glad.c rename to src/libsymmetry/glad.c diff --git a/src/gui.c b/src/libsymmetry/gui.c similarity index 99% rename from src/gui.c rename to src/libsymmetry/gui.c index db8be8b..5c405e2 100644 --- a/src/gui.c +++ b/src/libsymmetry/gui.c @@ -1,14 +1,14 @@ #define NK_IMPLEMENTATION #include "gui.h" -#include "linmath.h" -#include "log.h" +#include "../common/linmath.h" +#include "../common/log.h" #include "shader.h" #include "texture.h" #include "game.h" #include "input.h" #include "renderer.h" -#include "string_utils.h" -#include "common.h" +#include "../common/string_utils.h" +#include "../common/common.h" #include #include diff --git a/src/gui.h b/src/libsymmetry/gui.h similarity index 97% rename from src/gui.h rename to src/libsymmetry/gui.h index 8d1f380..4e6607a 100644 --- a/src/gui.h +++ b/src/libsymmetry/gui.h @@ -12,7 +12,7 @@ #include #include "gl_load.h" -#include "num_types.h" +#include "../common/num_types.h" struct Gui_State { diff --git a/src/input.c b/src/libsymmetry/input.c similarity index 99% rename from src/input.c rename to src/libsymmetry/input.c index 2726994..af9faf0 100644 --- a/src/input.c +++ b/src/libsymmetry/input.c @@ -2,11 +2,11 @@ #include #include #include "input.h" -#include "array.h" -#include "log.h" +#include "../common/array.h" +#include "../common/log.h" #include "gui.h" -#include "string_utils.h" -#include "common.h" +#include "../common/string_utils.h" +#include "../common/common.h" struct Input_Map { diff --git a/src/input.h b/src/libsymmetry/input.h similarity index 99% rename from src/input.h rename to src/libsymmetry/input.h index 0f63e7f..ad3963c 100644 --- a/src/input.h +++ b/src/libsymmetry/input.h @@ -2,7 +2,7 @@ #define INPUT_H #include -#include "num_types.h" +#include "../common/num_types.h" #include #include #include diff --git a/src/light.c b/src/libsymmetry/light.c similarity index 98% rename from src/light.c rename to src/libsymmetry/light.c index d3508b9..87107f2 100644 --- a/src/light.c +++ b/src/libsymmetry/light.c @@ -1,5 +1,5 @@ #include "light.h" -#include "array.h" +#include "../common/array.h" #include "entity.h" #include diff --git a/src/light.h b/src/libsymmetry/light.h similarity index 100% rename from src/light.h rename to src/libsymmetry/light.h diff --git a/src/material.c b/src/libsymmetry/material.c similarity index 98% rename from src/material.c rename to src/libsymmetry/material.c index 93cb993..5dfef74 100644 --- a/src/material.c +++ b/src/libsymmetry/material.c @@ -1,9 +1,9 @@ #include "material.h" -#include "array.h" +#include "../common/array.h" #include "shader.h" #include "entity.h" -#include "string_utils.h" -#include "log.h" +#include "../common/string_utils.h" +#include "../common/log.h" #include "model.h" #include "texture.h" #include "light.h" @@ -183,6 +183,7 @@ void material_cleanup(void) for(int i = 0; i < array_len(material_list); i++) material_remove(i); array_free(empty_indices); + array_free(material_list); } bool material_register_model(struct Entity* entity, const char* material_name) diff --git a/src/material.h b/src/libsymmetry/material.h similarity index 94% rename from src/material.h rename to src/libsymmetry/material.h index 96bf9a9..1526f1c 100644 --- a/src/material.h +++ b/src/libsymmetry/material.h @@ -1,8 +1,8 @@ #ifndef MATERIAL_H #define MATERIAL_H -#include "linmath.h" -#include "num_types.h" +#include "../common/linmath.h" +#include "../common/num_types.h" struct Entity; diff --git a/src/model.c b/src/libsymmetry/model.c similarity index 98% rename from src/model.c rename to src/libsymmetry/model.c index a2cde6c..6ee7d3d 100644 --- a/src/model.c +++ b/src/libsymmetry/model.c @@ -1,6 +1,6 @@ #include "model.h" -#include "array.h" -#include "log.h" +#include "../common/array.h" +#include "../common/log.h" #include "entity.h" #include "texture.h" #include "material.h" diff --git a/src/model.h b/src/libsymmetry/model.h similarity index 92% rename from src/model.h rename to src/libsymmetry/model.h index cf03159..28a5821 100644 --- a/src/model.h +++ b/src/libsymmetry/model.h @@ -1,7 +1,7 @@ #ifndef MODEL_H #define MODEL_H -#include "linmath.h" +#include "../common/linmath.h" struct Entity; diff --git a/src/renderer.c b/src/libsymmetry/renderer.c similarity index 99% rename from src/renderer.c rename to src/libsymmetry/renderer.c index 9d4d042..afe7521 100644 --- a/src/renderer.c +++ b/src/libsymmetry/renderer.c @@ -1,25 +1,25 @@ #include "renderer.h" #include "gl_load.h" -#include "log.h" +#include "../common/log.h" #include "camera.h" #include "model.h" #include "texture.h" #include "framebuffer.h" -#include "array.h" +#include "../common/array.h" #include "shader.h" -#include "num_types.h" +#include "../common/num_types.h" #include "light.h" #include "entity.h" #include "transform.h" #include "game.h" #include "gui.h" -#include "hashmap.h" +#include "../common/hashmap.h" #include "geometry.h" #include "material.h" #include "editor.h" -#include "variant.h" -#include "common.h" +#include "../common/variant.h" +#include "../common/common.h" #include #include diff --git a/src/renderer.h b/src/libsymmetry/renderer.h similarity index 92% rename from src/renderer.h rename to src/libsymmetry/renderer.h index 48dea8b..791165e 100644 --- a/src/renderer.h +++ b/src/libsymmetry/renderer.h @@ -1,8 +1,8 @@ #ifndef RENDERER_H #define RENDERER_H -#include "linmath.h" -#include "num_types.h" +#include "../common/linmath.h" +#include "../common/num_types.h" enum Fog_Mode { diff --git a/src/scene.c b/src/libsymmetry/scene.c similarity index 97% rename from src/scene.c rename to src/libsymmetry/scene.c index 0adfeab..f1653fd 100644 --- a/src/scene.c +++ b/src/libsymmetry/scene.c @@ -1,9 +1,9 @@ #include "scene.h" -#include "array.h" +#include "../common/array.h" #include "entity.h" -#include "log.h" +#include "../common/log.h" #include "transform.h" -#include "common.h" +#include "../common/common.h" #include #include diff --git a/src/scene.h b/src/libsymmetry/scene.h similarity index 96% rename from src/scene.h rename to src/libsymmetry/scene.h index 8bb5f7e..965e486 100644 --- a/src/scene.h +++ b/src/libsymmetry/scene.h @@ -1,7 +1,7 @@ #ifndef SCENE_H #define SCENE_H -#include "num_types.h" +#include "../common/num_types.h" struct Entity; diff --git a/src/shader.c b/src/libsymmetry/shader.c similarity index 98% rename from src/shader.c rename to src/libsymmetry/shader.c index 52638f0..e901bb3 100644 --- a/src/shader.c +++ b/src/libsymmetry/shader.c @@ -1,12 +1,12 @@ #include "shader.h" -#include "array.h" -#include "num_types.h" -#include "string_utils.h" -#include "log.h" +#include "../common/array.h" +#include "../common/num_types.h" +#include "../common/string_utils.h" +#include "../common/log.h" #include "renderer.h" #include "texture.h" #include "gl_load.h" -#include "common.h" +#include "../common/common.h" #include #include diff --git a/src/shader.h b/src/libsymmetry/shader.h similarity index 94% rename from src/shader.h rename to src/libsymmetry/shader.h index 65a4509..e3bcb7f 100644 --- a/src/shader.h +++ b/src/libsymmetry/shader.h @@ -1,7 +1,7 @@ -#ifndef shader_H -#define shader_H +#ifndef SHADER_H +#define SHADER_H -#include "linmath.h" +#include "../common/linmath.h" enum Uniform_Type { diff --git a/src/texture.c b/src/libsymmetry/texture.c similarity index 98% rename from src/texture.c rename to src/libsymmetry/texture.c index 36fdd62..15c104c 100644 --- a/src/texture.c +++ b/src/libsymmetry/texture.c @@ -1,11 +1,11 @@ #include "texture.h" -#include "array.h" -#include "string_utils.h" -#include "log.h" -#include "num_types.h" +#include "../common/array.h" +#include "../common/string_utils.h" +#include "../common/log.h" +#include "../common/num_types.h" #include "renderer.h" #include "gl_load.h" -#include "common.h" +#include "../common/common.h" #include #include diff --git a/src/texture.h b/src/libsymmetry/texture.h similarity index 96% rename from src/texture.h rename to src/libsymmetry/texture.h index 92b5f7b..1b2bb56 100644 --- a/src/texture.h +++ b/src/libsymmetry/texture.h @@ -1,5 +1,5 @@ -#ifndef texture_H -#define texture_H +#ifndef TEXTURE_H +#define TEXTURE_H enum Texture_Unit { diff --git a/src/transform.c b/src/libsymmetry/transform.c similarity index 98% rename from src/transform.c rename to src/libsymmetry/transform.c index af5c088..2e1eca4 100644 --- a/src/transform.c +++ b/src/libsymmetry/transform.c @@ -1,8 +1,8 @@ #include "transform.h" -#include "log.h" -#include "array.h" +#include "../common/log.h" +#include "../common/array.h" #include "entity.h" -#include "utils.h" +#include "../common/utils.h" #include void transform_create(struct Entity* entity, int parent_entity) diff --git a/src/transform.h b/src/libsymmetry/transform.h similarity index 96% rename from src/transform.h rename to src/libsymmetry/transform.h index f0994be..08700a1 100644 --- a/src/transform.h +++ b/src/libsymmetry/transform.h @@ -1,8 +1,8 @@ #ifndef TRANSFORM_H #define TRANSFORM_H -#include "linmath.h" -#include "num_types.h" +#include "../common/linmath.h" +#include "../common/num_types.h" enum Transform_Space { TS_LOCAL, TS_PARENT, TS_WORLD};