mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-09-17 19:45:23 -04:00
Saturn: Try to fix chunk building insta crashing the game
This commit is contained in:
parent
3ee1b1e92a
commit
5bd2d6848a
@ -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
|
||||
|
@ -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
|
||||
|
||||
|
||||
/*########################################################################################################################*
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user