From c8cec767d5ecaf99bb31e477092783eee1ec3b9a Mon Sep 17 00:00:00 2001 From: Ashnal Date: Sun, 5 Sep 2021 19:23:24 -0400 Subject: [PATCH 1/2] Upgrades P_PatchInfoTables to use 4 digit tempnames, suppoing up to 9999 freeslots --- src/info.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/info.c b/src/info.c index d639b617e..3dcfbf5f0 100644 --- a/src/info.c +++ b/src/info.c @@ -20097,7 +20097,7 @@ void P_PatchInfoTables(void) INT32 i; char *tempname; -#if NUMSPRITEFREESLOTS > 1000 +#if NUMSPRITEFREESLOTS > 9999 //tempname numbering actually starts at SPR_FIRSTFREESLOT, so the limit is actually 9999 + SPR_FIRSTFREESLOT-1, but the preprocessor doesn't understand enums, so its left at 9999 for safety #error "Update P_PatchInfoTables, you big dumb head" #endif @@ -20105,8 +20105,8 @@ void P_PatchInfoTables(void) for (i = SPR_FIRSTFREESLOT; i <= SPR_LASTFREESLOT; i++) { tempname = sprnames[i]; - tempname[0] = 'F'; - tempname[1] = (char)('0' + (char)((i-SPR_FIRSTFREESLOT+1)/100)); + tempname[0] = (char)('0' + (char)((i-SPR_FIRSTFREESLOT+1)/1000)); + tempname[1] = (char)('0' + (char)(((i-SPR_FIRSTFREESLOT+1)/100)%10)); tempname[2] = (char)('0' + (char)(((i-SPR_FIRSTFREESLOT+1)/10)%10)); tempname[3] = (char)('0' + (char)((i-SPR_FIRSTFREESLOT+1)%10)); tempname[4] = '\0'; From d303f1b203ef4441fceec37e6799ce9292321748 Mon Sep 17 00:00:00 2001 From: Ashnal Date: Sat, 4 Sep 2021 23:00:55 -0400 Subject: [PATCH 2/2] Increase Mobj Freeslot limit to 1024 from 512 --- src/info.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/info.h b/src/info.h index a00b53d08..14563fb08 100644 --- a/src/info.h +++ b/src/info.h @@ -226,7 +226,7 @@ void A_NapalmScatter(); void A_SpawnFreshCopy(); // ratio of states to sprites to mobj types is roughly 6 : 1 : 1 -#define NUMMOBJFREESLOTS 512 +#define NUMMOBJFREESLOTS 1024 #define NUMSPRITEFREESLOTS NUMMOBJFREESLOTS #define NUMSTATEFREESLOTS (NUMMOBJFREESLOTS*8)