diff --git a/assets-cg/ega64/tileset/tileset_inEGA64_CG.png b/assets-cg/ega64/tileset/tileset_inEGA64_CG.png index 4d391b2..e45156f 100644 Binary files a/assets-cg/ega64/tileset/tileset_inEGA64_CG.png and b/assets-cg/ega64/tileset/tileset_inEGA64_CG.png differ diff --git a/src/config.h b/src/config.h index 33e1b0f..87598ae 100644 --- a/src/config.h +++ b/src/config.h @@ -24,6 +24,9 @@ /* The size of the player */ #define P_WIDTH 16 #define P_HEIGHT 16 +/*Max number of dynamic NPCs.*/ +#define NPC_STACK_SIZE 256 + #else /* The tile size */ #define T_HEIGHT 8 @@ -34,6 +37,9 @@ /* The player size */ #define P_WIDTH 8 #define P_HEIGHT 8 +/*Max number of "dynamic" NPCs. We are starved for static ram on fx !*/ +#define NPC_STACK_SIZE 32 + #endif /* SPEED should NOT be 8 or bigger: it may cause bugs when handling diff --git a/src/npc.c b/src/npc.c index f308b3e..b9cf88e 100644 --- a/src/npc.c +++ b/src/npc.c @@ -16,13 +16,11 @@ extern bopti_image_t tiny_npc_female; extern bopti_image_t tiny_npc_milkman; extern bopti_image_t tiny_npc_police; -#define NPC_STACK_SIZE 256 - NPC npc_stack[NPC_STACK_SIZE]; uint32_t npc_count; NPC *npc_create() { - if(npc_count == 256) + if(npc_count == NPC_STACK_SIZE) return NULL; return &npc_stack[npc_count++];