2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-09 17:07:41 +00:00

Major scoped-enum refactor

This commit is contained in:
Jack Andersen
2015-11-20 15:16:07 -10:00
parent 4c09ded013
commit e423db32ee
83 changed files with 958 additions and 904 deletions

View File

@@ -11,11 +11,11 @@ namespace DNAMP1
struct DeafBabe : BigDNA
{
DECL_DNA
enum BspNodeType : atUint32
enum class BspNodeType : atUint32
{
BspNodeInvalid,
BspNodeBranch,
BspNodeLeaf
Invalid,
Branch,
Leaf
};
struct Material : BigDNA
@@ -25,7 +25,7 @@ struct DeafBabe : BigDNA
bool fireThrough() const {return material >> 18 & 0x1;}
void setFireThrough(bool v) {material &= ~0x40000; material |= v << 18;}
enum Type
enum class Type
{
Mat0,
MatGround,
@@ -39,7 +39,7 @@ struct DeafBabe : BigDNA
MatLeaves
};
Type type() const {return Type(material & 0xff);}
void setType(Type t) {material &= ~0xff; material |= t;}
void setType(Type t) {material &= ~0xff; material |= atUint32(t);}
};
struct Edge : BigDNA