Refactor entities and linecrosskludge to not use the 'active' system

This removes the variables obj.nentity and obj.nlinecrosskludge, as well
as removing the 'active' attribute from the entity class object. Now
every entity you access is guaranteed to be real and you don't have to
check the 'active' variable.

The biggest part of this is changing createentity() to modify a
newly-created entity object and push it back instead of already
modifying an indice in obj.entities.

As well, removing an entity now uses the new obj.removeentity() function
and removeentity_iter() macro.
This commit is contained in:
Misa
2020-04-03 13:50:16 -07:00
committed by Ethan Lee
parent a67ab8e3a7
commit b1b1474b7b
12 changed files with 678 additions and 726 deletions

View File

@@ -20,7 +20,7 @@ public:
public:
//Fundamentals
bool active, invis;
bool invis;
int type, size, tile, rule;
int state, statedelay;
int behave, animate;