2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-09 23:07:43 +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

@@ -86,19 +86,19 @@ struct MREA
{
DECL_DNA
Value<atUint32> flags;
enum ThermalLevel
enum class ThermalLevel
{
ThermalCool,
ThermalHot,
ThermalWarm
Cool,
Hot,
Warm
};
static const char* GetThermalLevelStr(ThermalLevel t)
{
switch (t)
{
case ThermalCool: return "COOL";
case ThermalHot: return "HOT";
case ThermalWarm: return "WARM";
case ThermalLevel::Cool: return "COOL";
case ThermalLevel::Hot: return "HOT";
case ThermalLevel::Warm: return "WARM";
default: break;
}
return nullptr;
@@ -110,7 +110,7 @@ struct MREA
bool disableXray() const {return flags >> 3 & 0x1;}
void setDisableXray(bool v) {flags &= ~0x8; flags |= v << 3;}
ThermalLevel thermalLevel() const {return ThermalLevel(flags >> 4 & 0x3);}
void setThermalLevel(ThermalLevel v) {flags &= ~0x30; flags |= v << 4;}
void setThermalLevel(ThermalLevel v) {flags &= ~0x30; flags |= atUint32(v) << 4;}
const char* thermalLevelStr() const {return GetThermalLevelStr(thermalLevel());}
} visorFlags;
Value<atVec4f> xfMtx[3];