Use u32 for SMDH flags instead of a struct.

This commit is contained in:
Steven Smith 2015-01-25 13:14:56 -08:00
parent 65d12313e6
commit 1189cc0fbd

View file

@ -44,38 +44,37 @@ typedef struct {
u8 reserved6 = 0; u8 reserved6 = 0;
} SMDHGameRatings; } SMDHGameRatings;
typedef struct _region_lock { typedef enum {
_region_lock() : japan(true), northAmerica(true), europe(true), australia(true), china(true), korea(true), taiwan(true) {} JAPAN = 0x01,
NORTH_AMERICA = 0x02,
EUROPE = 0x04,
AUSTRALIA = 0x08,
CHINA = 0x10,
KOREA = 0x20,
TAIWAN = 0x40,
bool japan : 1; // Not a bitmask, but a value.
bool northAmerica : 1; REGION_FREE = 0x7FFFFFFF
bool europe : 1; } SMDHRegionFlag;
bool australia : 1;
bool china : 1;
bool korea : 1;
bool taiwan : 1;
} SMDHRegionLock;
typedef struct _flags { typedef enum {
_flags() : visible(true), autoBoot(false), allow3d(true), requireEula(false), autoSaveOnExit(false), useExtendedBanner(false), ratingRequired(false), useSaveData(false), recordUsage(true), disableSaveBackups(false) {} VISIBLE = 0x0001,
AUTO_BOOT = 0x0002,
bool visible : 1; ALLOW_3D = 0x0004,
bool autoBoot : 1; REQUIRE_EULA = 0x0008,
bool allow3d : 1; AUTO_SAVE_ON_EXIT = 0x0010,
bool requireEula : 1; USE_EXTENDED_BANNER = 0x0020,
bool autoSaveOnExit : 1; RATING_REQUIED = 0x0040,
bool useExtendedBanner : 1; USE_SAVE_DATA = 0x0080,
bool ratingRequired : 1; RECORD_USAGE = 0x0100,
bool useSaveData : 1; DISABLE_SAVE_BACKUPS = 0x0400
bool recordUsage : 1; } SMDHFlag;
bool disableSaveBackups : 1;
} SMDHFlags;
typedef struct { typedef struct {
SMDHGameRatings gameRatings; SMDHGameRatings gameRatings;
SMDHRegionLock regionLock; u32 regionLock = REGION_FREE;
u8 matchMakerId[0xC] = {0}; u8 matchMakerId[0xC] = {0};
SMDHFlags flags; u32 flags = VISIBLE | ALLOW_3D | RECORD_USAGE;
u16 eulaVersion = 0; u16 eulaVersion = 0;
u16 reserved1 = 0; u16 reserved1 = 0;
u32 optimalBannerFrame = 0; u32 optimalBannerFrame = 0;