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());