From 0eff35ebaca03f0fcea273497340bd7eaa11c6b4 Mon Sep 17 00:00:00 2001 From: Ulysse Cura Date: Fri, 12 Jun 2026 17:20:05 +0200 Subject: [PATCH] Removed libtar and changed default background color to black. --- src/Makefile | 13 +++++++++++-- src/asset_manager.c | 13 ++++++------- src/display.c | 2 +- src/headers/asset_manager.h | 3 +++ src/headers/display.h | 2 +- 5 files changed, 22 insertions(+), 11 deletions(-) diff --git a/src/Makefile b/src/Makefile index f551b97..97551c4 100644 --- a/src/Makefile +++ b/src/Makefile @@ -9,9 +9,18 @@ CORE_SOURCES := \ # Compiler and flags CORE_CC = gcc -CORE_CFLAGS = -Wall -Wextra -std=c17 -fPIC -g -DASSET_FILENAME=$(ASSET_OUTPUT) +#CORE_CFLAGS = -std=c17 -pedantic -O3 -fPIC -DASSET_FILENAME=$(ASSET_OUTPUT) # RELEASE +CORE_CFLAGS = -std=c17 --pedantic -O0 -g -fPIC -DASSET_FILENAME=$(BUILD_DIR)/$(ASSET_OUTPUT) \ + -Wall -Wno-missing-braces -Wextra -Wno-missing-field-initializers \ + -Wformat=2 -Wswitch-default -Wswitch-enum -Wcast-align \ + -Wpointer-arith -Wbad-function-cast -Wstrict-overflow=5 \ + -Wstrict-prototypes -Winline -Wundef -Wnested-externs \ + -Wcast-qual -Wshadow -Wunreachable-code -Wlogical-op \ + -Wfloat-equal -Wstrict-aliasing=2 -Wredundant-decls \ + -Wold-style-definition # DEVELOPEMENT + CORE_INCLUDE_DIRS = $(CORE_DIR)/headers -CORE_LDFLAGS = $(shell sdl2-config --cflags --libs) -lSDL2_image +CORE_LDFLAGS = $(shell sdl2-config --cflags --libs) -lSDL2_image $(shell pkg-config --libs liblz4) -ltar # Deduce objects CORE_OBJECTS = $(CORE_SOURCES:%.c=$(BUILD_DIR)/$(CORE_DIR)/%.o) diff --git a/src/asset_manager.c b/src/asset_manager.c index c683475..f62bbd6 100644 --- a/src/asset_manager.c +++ b/src/asset_manager.c @@ -1,10 +1,9 @@ #include "asset_manager.h" -#include -#include -#include "display.h" - -#ifndef ASSET_FILENAME - #define ASSET_FILENAME "game.data" -#endif +void asset_manager_init(void) +{ +} +void asset_manager_exit(void) +{ +} diff --git a/src/display.c b/src/display.c index 3add8f6..4f0f2fd 100644 --- a/src/display.c +++ b/src/display.c @@ -22,7 +22,7 @@ void display_update(void) void display_clear(void) { - SDL_SetRenderDrawColor(renderer, COLOR_WHITE); + SDL_SetRenderDrawColor(renderer, C_BLACK); SDL_RenderClear(renderer); } diff --git a/src/headers/asset_manager.h b/src/headers/asset_manager.h index 90b0dd9..948f129 100644 --- a/src/headers/asset_manager.h +++ b/src/headers/asset_manager.h @@ -3,6 +3,9 @@ #include +void asset_manager_init(void); +void asset_manager_exit(void); + SDL_Texture load_image(const char *path); #endif // ASSET_MANAGER_H \ No newline at end of file diff --git a/src/headers/display.h b/src/headers/display.h index 25ed7f2..dc3a67b 100644 --- a/src/headers/display.h +++ b/src/headers/display.h @@ -5,7 +5,7 @@ #include "image.h" #include "vector2d.h" -#define COLOR_WHITE 255, 255, 255, 255 +#define C_BLACK 0, 0, 0, 255 #define DISPLAY_WIDTH 396 #define DISPLAY_HEIGHT 224