From 93d91134513de6ca3a2f6d71cbc11e7b4d7c7738 Mon Sep 17 00:00:00 2001 From: Carlos Sanchez Date: Thu, 12 Sep 2024 03:50:38 -0400 Subject: [PATCH] Setting up more ps2 (but it doesn't work) --- Makefile | 3 ++- maze.c | 10 ++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index d69d00b..2c58111 100644 --- a/Makefile +++ b/Makefile @@ -47,11 +47,12 @@ $(BUILDD)/%.o: %.c %.h # Rule to build any sample. We ALWAYS need math so... link it %.exe: %.o $(UNIGILIB) $(HALOOLIB) - $(CC) $(CFLAGS) $^ -o $@ -lm -lSDL + $(CC) $(CFLAGS) $^ -o $@ -lm -lSDL2 # Rule to clean the build files clean: rm -rf $(BUILDD) + rm -f *.o *.elf find . -name "*.exe" -type f -delete cd haloo3d && $(MAKE) clean diff --git a/maze.c b/maze.c index 457c718..1dc728c 100644 --- a/maze.c +++ b/maze.c @@ -1,14 +1,20 @@ #ifdef PS2 #define DIRECTBUILD +#define H3D_VOLATILE_FLOATS #endif #ifdef DIRECTBUILD +#define MATHC_USE_UNIONS +#define MATHC_NO_STRUCT_FUNCTIONS +#include "haloo3d/lib/mathc.c" +#define FNL_IMPL #include "haloo3d/haloo3d.c" #include "haloo3d/haloo3dex_console.c" #include "haloo3d/haloo3dex_easy.c" #include "haloo3d/haloo3dex_gen.c" #include "haloo3d/haloo3dex_obj.c" #include "haloo3d/haloo3dex_print.c" +#include "haloo3d/lib/FastNoiseLite.h" #include "unigi.platform.sdl2/main.c" #else #include "haloo3d/haloo3d.h" @@ -989,7 +995,11 @@ void create_paintingobj(haloo3d_obj *obj) { } } +#ifdef PS2 +int main(int argc, char *argv[]) { +#else int main() { // int argc, char **argv) { +#endif srand(clock());