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 authored and Ethan Lee committed 2020-04-03 23:28:47 -04:00
1 parent a67ab8e3a7
commit b1b1474b7b
12 files changed
+678 -726

No files matched your search

+1 -1
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;