2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-08 15:44:56 +00:00

FourCC type addition

This commit is contained in:
Jack Andersen
2015-08-09 16:04:56 -10:00
parent 44a804e2c4
commit bd5825954f
3 changed files with 7 additions and 2 deletions

2
hecl/extern/Athena vendored

Submodule hecl/extern/Athena updated: 9f0cb1327b...f49a6a6e82

Submodule hecl/extern/RetroCommon updated: 2d18e95a91...99bb5df7f3

View File

@@ -317,12 +317,17 @@ public:
{num = other.num;}
FourCC(const char* name)
: num(*(uint32_t*)name) {}
FourCC(uint32_t n)
: num(n) {}
inline bool operator==(const FourCC& other) const {return num == other.num;}
inline bool operator!=(const FourCC& other) const {return num != other.num;}
inline bool operator==(const char* other) const {return num == *(uint32_t*)other;}
inline bool operator!=(const char* other) const {return num != *(uint32_t*)other;}
inline bool operator==(uint32_t other) const {return num == other;}
inline bool operator!=(uint32_t other) const {return num != other;}
inline std::string toString() const {return std::string(fcc, 4);}
inline uint32_t toUint32() const {return num;}
inline operator uint32_t() const {return num;}
};
/**