From 378240a8cfca7bd93191c89429d624e962826ef2 Mon Sep 17 00:00:00 2001 From: Fierelier Date: Mon, 15 May 2023 11:26:22 +0200 Subject: [PATCH] Separate frontend/generic/textures.c correctly --- main.c | 1 + modules/engine/frontend/generic/textures.c | 3 +-- modules/engine/textures.c | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) create mode 100644 modules/engine/textures.c diff --git a/main.c b/main.c index e10c103..218725d 100644 --- a/main.c +++ b/main.c @@ -1,6 +1,7 @@ #include #include #include "modules/engine/main.c" +#include "modules/engine/textures.c" #include "modules/engine/frontend/sdl/main.c" #include "modules/engine/frontend/generic/textures.c" #include "modules/engine/lua.c" diff --git a/modules/engine/frontend/generic/textures.c b/modules/engine/frontend/generic/textures.c index 52bee94..f58321b 100644 --- a/modules/engine/frontend/generic/textures.c +++ b/modules/engine/frontend/generic/textures.c @@ -1,7 +1,6 @@ // Mostly for fun (but can very slightly increase performance for large textures). If set to 1, does not clear texture's affiliated and leaves garbage. -#define ENGINE_GENERIC_TEXTURE_NOCLEAR 1 +#define ENGINE_GENERIC_TEXTURE_NOCLEAR 0 -struct ENGINE_TEXTURE { int width; int height; void * fe_texture; }; struct ENGINE_GENERIC_TEXTURE { char * pixels; }; struct ENGINE_TEXTURE * engine_texture_create(int width,int height) { diff --git a/modules/engine/textures.c b/modules/engine/textures.c new file mode 100644 index 0000000..5a43c10 --- /dev/null +++ b/modules/engine/textures.c @@ -0,0 +1 @@ +struct ENGINE_TEXTURE { int width; int height; void * fe_texture; };