memset(outsideWallHeightMap, 0, sizeof(outsideWallHeightMap[0][0]) * CHUNK_SIZE_MULT * ITEM_CHUNK_SIZE_MULT);


quint8 outsideWallHeightMap[INSIDE_ITEM_CHUNK_SIZE_MULT][CHUNK_SIZE_MULT];

#define ITEM_MAP_SIZE 128
#define CHUNK_SIZE 8
#define CHUNK_SIZE_MULT (CHUNK_SIZE*CHUNK_SIZE)

#define INSIDE_ITEM_CHUNK_SIZE (INSIDE_ITEM_MAP_SIZE/CHUNK_SIZE)

#define INSIDE_ITEM_CHUNK_SIZE_MULT (INSIDE_ITEM_CHUNK_SIZE*INSIDE_ITEM_CHUNK_SIZE)

我不知道为什么这会完全破坏我的记忆!我之前在Quint8上遇到过麻烦,但愿不是那样。

任何见识都会很棒!

最佳答案

不是吗
memset(outsideWallHeightMap, 0, sizeof(outsideWallHeightMap[0][0]) * CHUNK_SIZE_MULT * INSIDE_ITEM_CHUNK_SIZE_MULT ));
或更容易

memset(outsideWallHeightMap, 0, sizeof(outsideWallHeightMap));

09-27 23:19