NWC24Config: Provide name for unk_04 config member

According to WiiBrew this is a version number (thanks to Awesomebing1
for documenting this!)
This commit is contained in:
Lioncash 2021-08-24 08:23:02 -04:00
parent a60af199d8
commit 6268ee44a1
2 changed files with 10 additions and 10 deletions

View File

@ -59,7 +59,7 @@ void NWC24Config::ResetConfig()
memset(&m_data, 0, sizeof(m_data)); memset(&m_data, 0, sizeof(m_data));
SetMagic(0x57634366); SetMagic(0x57634366);
SetUnk(8); SetVersion(8);
SetCreationStage(NWC24CreationStage::Initial); SetCreationStage(NWC24CreationStage::Initial);
SetEnableBooting(0); SetEnableBooting(0);
SetEmail("@wii.com"); SetEmail("@wii.com");
@ -110,7 +110,7 @@ s32 NWC24Config::CheckNwc24Config() const
return -14; return -14;
} }
if (Unk() != 8) if (Version() != 8)
return -27; return -27;
return 0; return 0;
@ -126,14 +126,14 @@ void NWC24Config::SetMagic(u32 magic)
m_data.magic = Common::swap32(magic); m_data.magic = Common::swap32(magic);
} }
u32 NWC24Config::Unk() const u32 NWC24Config::Version() const
{ {
return Common::swap32(m_data.unk_04); return Common::swap32(m_data.version);
} }
void NWC24Config::SetUnk(u32 unk_04) void NWC24Config::SetVersion(u32 version)
{ {
m_data.unk_04 = Common::swap32(unk_04); m_data.version = Common::swap32(version);
} }
u32 NWC24Config::IdGen() const u32 NWC24Config::IdGen() const

View File

@ -47,8 +47,8 @@ public:
u32 Magic() const; u32 Magic() const;
void SetMagic(u32 magic); void SetMagic(u32 magic);
u32 Unk() const; u32 Version() const;
void SetUnk(u32 unk_04); void SetVersion(u32 version);
u32 IdGen() const; u32 IdGen() const;
void SetIdGen(u32 id_generation); void SetIdGen(u32 id_generation);
@ -85,8 +85,8 @@ private:
#pragma pack(push, 1) #pragma pack(push, 1)
struct ConfigData final struct ConfigData final
{ {
u32 magic; // 'WcCf' 0x57634366 u32 magic; // 'WcCf' 0x57634366
u32 unk_04; // must be 8 u32 version; // must be 8
u64 nwc24_id; u64 nwc24_id;
u32 id_generation; u32 id_generation;
NWC24CreationStage creation_stage; NWC24CreationStage creation_stage;