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:
2
hecl/extern/Athena
vendored
2
hecl/extern/Athena
vendored
Submodule hecl/extern/Athena updated: 9f0cb1327b...f49a6a6e82
2
hecl/extern/RetroCommon
vendored
2
hecl/extern/RetroCommon
vendored
Submodule hecl/extern/RetroCommon updated: 2d18e95a91...99bb5df7f3
@@ -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;}
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user