From 5e35d629f23b612d3510ae9e3643673747916b0a Mon Sep 17 00:00:00 2001 From: toasterbabe Date: Sat, 6 Aug 2016 21:22:38 +0100 Subject: [PATCH] A clearer understanding of freeslots and their relation to FF_FRAMEMASK, explained via comment. --- src/info.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/info.h b/src/info.h index beb08a55c..7a99d8b07 100644 --- a/src/info.h +++ b/src/info.h @@ -579,6 +579,9 @@ typedef enum sprite NUMSPRITES } spritenum_t; +// Make sure to be conscious of FF_FRAMEMASK whenever you change this table. +// Currently, FF_FRAMEMASK is 0x1ff, or 511 - and NUMSPRITEFREESLOTS is 256. +// Since this is zero-based, there can be at most 256 different SPR2_'s without changing that. enum playersprite { SPR2_STND = 0, @@ -632,7 +635,7 @@ enum playersprite SPR2_SFLT, SPR2_FIRSTFREESLOT, - SPR2_LASTFREESLOT = 0x1ff, // FF_FRAMEMASK (cannot use #define'd constants as enum value...) - previously set to SPR2_FIRSTFREESLOT + NUMSPRITEFREESLOTS - 1, + SPR2_LASTFREESLOT = SPR2_FIRSTFREESLOT + NUMSPRITEFREESLOTS - 1, NUMPLAYERSPRITES };