♻️ Store CEL width with the sprite itself
Instead of passing the CEL sprite width when drawing, store the CEL width at load time in the new `CelSprite` struct. Implemented for most sprites except towners, missiles, or monsters.
This commit is contained in:
parent
f4ef9de2e6
commit
1b8b62a8c2
41 changed files with 746 additions and 713 deletions
|
|
@ -19,19 +19,19 @@ int seed_index;
|
|||
int level_seeds[NUMLEVELS + 1];
|
||||
int seed_table[DEBUGSEEDS];
|
||||
|
||||
BYTE *pSquareCel;
|
||||
std::optional<CelSprite> pSquareCel;
|
||||
char dMonsDbg[NUMLEVELS][MAXDUNX][MAXDUNY];
|
||||
char dFlagDbg[NUMLEVELS][MAXDUNX][MAXDUNY];
|
||||
|
||||
void LoadDebugGFX()
|
||||
{
|
||||
if (visiondebug)
|
||||
pSquareCel = LoadFileInMem("Data\\Square.CEL", nullptr);
|
||||
pSquareCel = LoadCel("Data\\Square.CEL", 64);
|
||||
}
|
||||
|
||||
void FreeDebugGFX()
|
||||
{
|
||||
MemFreeDbg(pSquareCel);
|
||||
pSquareCel = std::nullopt;
|
||||
}
|
||||
|
||||
void CheckDungeonClear()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue