diff --git a/terrain.c b/terrain.c index a506772..b597db6 100644 --- a/terrain.c +++ b/terrain.c @@ -1,12 +1,32 @@ +#ifdef _EE +#define DIRECTBUILD +#define H3D_VOLATILE_FLOATS +#endif + +#ifdef DIRECTBUILD +// clang-format off +#define MATHC_USE_UNIONS +#define MATHC_NO_STRUCT_FUNCTIONS +#include "haloo3d/lib/mathc.c" +#define FNL_IMPL +#include "haloo3d/lib/FastNoiseLite.h" +#include "haloo3d/haloo3d.c" +#include "haloo3d/haloo3dex_easy.c" +#include "haloo3d/haloo3dex_gen.c" +#include "haloo3d/haloo3dex_obj.c" +#include "haloo3d/haloo3dex_print.c" +#include "unigi.platform.sdl2/main.c" +// clang-format on +#else #include "haloo3d/haloo3d.h" #include "haloo3d/haloo3dex_easy.h" #include "haloo3d/haloo3dex_gen.h" #include "haloo3d/haloo3dex_obj.h" - #include "haloo3d/haloo3dex_print.h" #include "haloo3d/lib/FastNoiseLite.h" #include "haloo3d/lib/mathc.h" #include "unigi/main.h" +#endif // #include "keys.h" // #define ECS_MAXENTITIES 30000 @@ -15,9 +35,15 @@ #include #include +#ifdef _EE +#define WIDTH 160 +#define HEIGHT 120 +#define SCREENSCALE 4 +#else #define WIDTH 480 #define HEIGHT 300 #define SCREENSCALE 2 +#endif #define SWIDTH (WIDTH * SCREENSCALE) #define SHEIGHT (HEIGHT * SCREENSCALE) #define AVGWEIGHT 0.85