tuxanci2-engine
Game engine for tuxanci2
Log | Files | Refs | README | LICENSE
commit 1f891a42553e0c09773030fde3e084b958c49510
parent 50a8ddd0c1a47b2db27b909ae9a8ca583e2e5eb8
Author: Connor Thomson <connor@gnufault.org>
Date:   Sun, 18 Oct 2026 16:57:45 -0700

Remove the exit() I used for testing and fix it not using FLAGS

Diffstat:
MMakefile | 4++--
Minclude/ta_api.h | 1+
Mplatforms/aalib/aalib.c | 4++++
Mplatforms/dos/dos.c | 4++++
Mplatforms/sdl2/sdl2.c | 4++++
Mplatforms/sdl3/sdl3.c | 4++++
Mplatforms/wayland/wayland.c | 4++++
Mplatforms/win32/win32.c | 4++++
Mplatforms/x11/x11.c | 7+++++--
Mplatforms/xbox/xbox.c | 4++++
Msrc/ta_main.c | 3+--
11 files changed, 37 insertions(+), 6 deletions(-)

diff --git a/Makefile b/Makefile @@ -17,7 +17,7 @@ OUT := $(BUILD_DIR)/tuxanci2.a CONFIG_HEADER := $(BUILD_DIR)/ta_config.h -FLAGS := -nostdlib -Wall -Wextra -Werror -pedantic -pedantic-errors +FLAGS := -ffreestanding -nostdlib -nostdlib -nostdinc -fno-builtin -fno-pie -fno-pic -fno-stack-protector -Wall -Wextra -Werror -pedantic -pedantic-errors # Needed for ta_types.h ifeq ($(BITS),64) @@ -26,7 +26,7 @@ else ARCH_DEFINE := -DTA_32BIT endif -CFLAGS := -march=$(MARCH) -mtune=$(MARCH) -m$(BITS) $(ARCH_DEFINE) -I$(INCLUDE_DIR) -I$(BUILD_DIR) -std=$(CSTD) +CFLAGS := -march=$(MARCH) -mtune=$(MARCH) -m$(BITS) $(ARCH_DEFINE) -I$(INCLUDE_DIR) -I$(BUILD_DIR) -std=$(CSTD) $(FLAGS) ARFLAGS := rcs diff --git a/include/ta_api.h b/include/ta_api.h @@ -20,6 +20,7 @@ void ta_main_update(void); // Misc stuff that you need to implement/wrap void *ta_malloc(ta_size size); void ta_free(void *ptr); +void ta_exit(int status); #ifdef __cplusplus } diff --git a/platforms/aalib/aalib.c b/platforms/aalib/aalib.c @@ -181,3 +181,7 @@ void *ta_malloc(ta_size size) { void ta_free(void *ptr) { free(ptr); } + +void ta_exit(int status) { + exit(status); +} diff --git a/platforms/dos/dos.c b/platforms/dos/dos.c @@ -199,3 +199,7 @@ void *ta_malloc(ta_size size) { void ta_free(void *ptr) { free(ptr); } + +void ta_exit(int status) { + exit(status); +} diff --git a/platforms/sdl2/sdl2.c b/platforms/sdl2/sdl2.c @@ -130,3 +130,7 @@ void *ta_malloc(ta_size size) { void ta_free(void *ptr) { free(ptr); } + +void ta_exit(int status) { + exit(status); +} diff --git a/platforms/sdl3/sdl3.c b/platforms/sdl3/sdl3.c @@ -138,3 +138,7 @@ void *ta_malloc(ta_size size) { void ta_free(void *ptr) { free(ptr); } + +void ta_exit(int status) { + exit(status); +} diff --git a/platforms/wayland/wayland.c b/platforms/wayland/wayland.c @@ -559,3 +559,7 @@ void *ta_malloc(ta_size size) { void ta_free(void *ptr) { free(ptr); } + +void ta_exit(int status) { + exit(status); +} diff --git a/platforms/win32/win32.c b/platforms/win32/win32.c @@ -200,3 +200,7 @@ void *ta_malloc(ta_size size) { void ta_free(void *ptr) { free(ptr); } + +void ta_exit(int status) { + exit(status); +} diff --git a/platforms/x11/x11.c b/platforms/x11/x11.c @@ -192,4 +192,8 @@ void *ta_malloc(ta_size size) { void ta_free(void *ptr) { free(ptr); -} -\ No newline at end of file +} + +void ta_exit(int status) { + exit(status); +} diff --git a/platforms/xbox/xbox.c b/platforms/xbox/xbox.c @@ -47,3 +47,7 @@ void *ta_malloc(ta_size size) { void ta_free(void *ptr) { free(ptr); } + +void ta_exit(int status) { + exit(status); +} diff --git a/src/ta_main.c b/src/ta_main.c @@ -1,7 +1,6 @@ #include "ta_api.h" #include "ta_files.h" #include "ta_screen.h" -#include <stdlib.h> void ta_main_init(void) { ta_fb_init(&ta_fb); @@ -16,5 +15,5 @@ void ta_main_update(void) { void ta_main_destroy(void) { ta_screen_destroy(); - exit(0); + }