Move data structures into their own directory

This commit is contained in:
Rickey Fehr
2026-05-23 11:53:35 -07:00
parent 92cb9f9883
commit 625185aa94
12 changed files with 17 additions and 13 deletions

View File

@@ -17,4 +17,4 @@ jobs:
uses: actions/checkout@v6
- name: Run clang-format
run: clang-format --dry-run -Werror include/*.h source/*.c include/game/*.h source/game/*.c
run: for file in $(find include source -name '*.[c,h]'); do clang-format --dry-run --Werror $file done

View File

@@ -92,10 +92,14 @@ If installed locally and you'd prefer to use it in your shell. You can do the fo
```sh
# List warnings
clang-format --dry-run -Werror include/*.h include/game/*.h source/*.c source/game/*.c
for file in $(find include source -name '*.[c,h]'); do
clang-format --dry-run --Werror $file
done
# Modify all files inplace
clang-format -i include/*.h include/game/*.h source/*.c source/game/*.c
for file in $(find include source -name '*.[c,h]'); do
clang-format -i $file
done
# Or just one
clang-format -i include/blind.h

View File

@@ -27,8 +27,8 @@ LIBTONC := $(DEVKITPRO)/libtonc
#---------------------------------------------------------------------------------
TARGET := $(notdir $(CURDIR))
BUILD := build
SOURCES := source source/game
INCLUDES := include include/game
SOURCES := source source/game source/data_structures
INCLUDES := include include/game include/data_structures
DATA :=
MUSIC := audio
GRAPHICS := graphics

View File

@@ -1,9 +1,9 @@
CC := gcc
CFLAGS := -I../../include -I. \
CFLAGS := -I../../include -I. -I../../include/data_structures \
-g -O3 -std=gnu23 -Wall -Werror
SRC := bitset_test.c \
../../source/bitset.c
../../source/data_structures/bitset.c
OUT := build/bitset_test
$(OUT): $(SRC) | build

View File

@@ -1,12 +1,12 @@
CC := gcc
CFLAGS := -I../../include -I. \
CFLAGS := -I../../include -I../../include/data_structures -I. \
-g -O3 -std=gnu23 -Wall -Werror -DPOOLS_TEST_ENV=yes
SRC := list_test.c \
../../source/list.c \
../../source/pool.c \
../../source/bitset.c
../../source/data_structures/list.c \
../../source/data_structures/pool.c \
../../source/data_structures/bitset.c
OUT := build/list_test
$(OUT): $(SRC) | build

View File

@@ -1,9 +1,9 @@
CC := gcc
CFLAGS := -I../../include -I. \
CFLAGS := -I../../include -I../../include/data_structures -I. \
-g -O3 -std=gnu23 -Wall -Werror -DPOOLS_TEST_ENV=yes
SRC := pool_test.c ../../source/pool.c ../../source/bitset.c
SRC := pool_test.c ../../source/data_structures/pool.c ../../source/data_structures/bitset.c
OUT := build/pool_test
$(OUT): $(SRC) | build