From 965015fa6d231273fef2b6b5de00435d06ebb40c Mon Sep 17 00:00:00 2001 From: Ulysse Cura Date: Mon, 4 May 2026 21:38:39 +0200 Subject: [PATCH] Fixed some typos and quick non-fix for project to build. --- README.md | 2 +- src/Makefile | 5 +++-- src/headers/memory_alloc.h | 6 +++--- src/texture_manager.c | 1 + 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 04a7e17..da47e20 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ [![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0) -# 2D_Engine_C SDL2 Core +# 2D_Engine_C_SDL2_Core ## Description The core made on SDL2 for the multi-platform 2D_Engine_C. diff --git a/src/Makefile b/src/Makefile index eb2dd43..625307c 100644 --- a/src/Makefile +++ b/src/Makefile @@ -1,5 +1,6 @@ # Source files CORE_SOURCES := \ + asset_manager.c \ texture_manager.c \ event.c \ vector2d.c \ @@ -8,7 +9,7 @@ CORE_SOURCES := \ # Compiler and flags CORE_CC = gcc -CORE_CFLAGS = -Wall -Wextra -std=c17 -fPIC -g +CORE_CFLAGS = -Wall -Wextra -std=c17 -fPIC -g -DASSET_FILE=$(ASSET_OUTPUT) CORE_INCLUDE_DIRS = $(CORE_DIR)/headers CORE_LDFLAGS = $(shell sdl2-config --cflags --libs) @@ -26,7 +27,7 @@ core_setup: @echo "Building libCore.so (1/3)" $(Q)mkdir -p $(dir $(CORE_OBJECTS)) -# Count files to build +# Count nb of files to build count_core_build: $(eval export TOTAL_CORE_FILES := $(shell echo $$(($$(make -n $(CORE_OBJECTS) 2>/dev/null | grep -c "Building") + 1)))) diff --git a/src/headers/memory_alloc.h b/src/headers/memory_alloc.h index 9a0a8b5..ef8e8b6 100644 --- a/src/headers/memory_alloc.h +++ b/src/headers/memory_alloc.h @@ -1,6 +1,6 @@ -#ifndef MALLOC_H -#define MALLOC_H +#ifndef MEMORY_ALLOC_H +#define MEMORY_ALLOC_H #include -#endif // MALLOC_H \ No newline at end of file +#endif // MEMORY_ALLOC_H \ No newline at end of file diff --git a/src/texture_manager.c b/src/texture_manager.c index 07a3da6..e0255b8 100644 --- a/src/texture_manager.c +++ b/src/texture_manager.c @@ -37,6 +37,7 @@ inline void texture_manager_init(texture_manager_t *texture_manager) inline void texture_manager_load_texture(texture_manager_t *texture_manager, const char *name) { + texture_t *texture; linked_list_push_back(&texture_manager->textures, texture); }