diff --git a/misc/saturn/Makefile b/misc/saturn/Makefile index f675089ed..9dcc22a36 100644 --- a/misc/saturn/Makefile +++ b/misc/saturn/Makefile @@ -16,7 +16,7 @@ SH_CFLAGS+= -Os -I. -DPLAT_SATURN SH_LDFLAGS+= IP_VERSION:= V1.000 -IP_RELEASE_DATE:= 20160101 +IP_RELEASE_DATE:= 20230101 IP_AREAS:= JTUBKAEL IP_PERIPHERALS:= JAMKST IP_TITLE:= ClassiCube diff --git a/src/Builder.c b/src/Builder.c index 672b47d2a..e58bca5d2 100644 --- a/src/Builder.c +++ b/src/Builder.c @@ -360,9 +360,16 @@ static void OutputChunkPartsMeta(int x, int y, int z, struct ChunkInfo* info) { } void Builder_MakeChunk(struct ChunkInfo* info) { +#ifdef CC_BUILD_SATURN + /* The Saturn build only has 16 kb stack, not large enough */ + static BlockID chunk[EXTCHUNK_SIZE_3]; + static cc_uint8 counts[CHUNK_SIZE_3 * FACE_COUNT]; + static int bitFlags[1]; +#else BlockID chunk[EXTCHUNK_SIZE_3]; cc_uint8 counts[CHUNK_SIZE_3 * FACE_COUNT]; int bitFlags[EXTCHUNK_SIZE_3]; +#endif cc_bool allAir, allSolid, onBorder; int xMax, yMax, zMax, totalVerts; @@ -761,6 +768,7 @@ static void NormalBuilder_SetActive(void) { /*########################################################################################################################* *-------------------------------------------------Advanced mesh builder---------------------------------------------------* *#########################################################################################################################*/ +#ifdef CC_BUILD_ADVLIGHTING static Vec3 adv_minBB, adv_maxBB; static int adv_initBitFlags, adv_baseOffset; static int* adv_bitFlags; @@ -1259,6 +1267,9 @@ static void AdvBuilder_SetActive(void) { Builder_RenderBlock = Adv_RenderBlock; Builder_PrePrepareChunk = Adv_PrePrepareChunk; } +#else +static void AdvBuilder_SetActive(void) { NormalBuilder_SetActive(); } +#endif /*########################################################################################################################* diff --git a/src/Core.h b/src/Core.h index 05c91f447..9843b4318 100644 --- a/src/Core.h +++ b/src/Core.h @@ -124,6 +124,7 @@ typedef cc_uint8 cc_bool; #define CC_BUILD_PLUGINS #define CC_BUILD_ANIMATIONS #define CC_BUILD_FILESYSTEM +#define CC_BUILD_ADVLIGHTING /*#define CC_BUILD_GL11*/ #ifndef CC_BUILD_MANUAL @@ -345,6 +346,7 @@ typedef cc_uint8 cc_bool; #define CC_BUILD_TOUCH #undef CC_BUILD_RESOURCES #undef CC_BUILD_ANIMATIONS /* Very costly in FPU less system */ + #undef CC_BUILD_ADVLIGHTING #elif defined __WIIU__ #define CC_BUILD_WIIU #define CC_BUILD_CONSOLE @@ -374,6 +376,7 @@ typedef cc_uint8 cc_bool; #undef CC_BUILD_RESOURCES #undef CC_BUILD_NETWORKING #undef CC_BUILD_ANIMATIONS /* Very costly in FPU less system */ + #undef CC_BUILD_ADVLIGHTING #undef CC_BUILD_FILESYSTEM #elif defined OS2 #define CC_BUILD_OS2 @@ -392,6 +395,7 @@ typedef cc_uint8 cc_bool; #undef CC_BUILD_RESOURCES #undef CC_BUILD_NETWORKING #undef CC_BUILD_ANIMATIONS /* Very costly in FPU less system */ + #undef CC_BUILD_ADVLIGHTING #undef CC_BUILD_FILESYSTEM #endif #endif