- setup for Duke actor data transition to something more scripting friendly.

The main problem here is that there's two data arrays representing an actor - sprite and hittype and the engine only uses indices for reference.
By setting up hittype to contain a sprite reference, the function and iterator interface can be rewritten to use a single pointer instead to represent an actor.
The main objective is to reduce the number of accesses to the global arrays which constitute the biggest refactoring blocker.
This commit is contained in:
Christoph Oelckers 2020-10-17 09:06:09 +02:00
parent 05c095e448
commit 78afb67c7f
6 changed files with 30 additions and 49 deletions

View file

@ -903,7 +903,7 @@ static spriteext_t spriteext_s[MAXSPRITES+MAXUNIQHUDID];
static spritesmooth_t spritesmooth_s[MAXSPRITES+MAXUNIQHUDID];
static sectortype sector_s[MAXSECTORS];
static walltype wall_s[MAXWALLS];
static spritetype sprite_s[MAXSPRITES];
spritetype sprite_s[MAXSPRITES];
static tspritetype tsprite_s[MAXSPRITESONSCREEN];
int32_t enginePreInit(void)