2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-09 02:27:43 +00:00

Initial CMDL cooking in place

This commit is contained in:
Jack Andersen
2015-10-18 17:28:47 -10:00
parent 58c0fd5ad2
commit bf8a007514
6 changed files with 280 additions and 22 deletions

View File

@@ -71,6 +71,15 @@ public:
snprintf(buf, 9, "%08X", m_id);
return std::string(buf);
}
UniqueID32() = default;
UniqueID32(const char* hexStr)
{
char copy[9];
strncpy(copy, hexStr, 8);
copy[8] = '\0';
m_id = strtoul(copy, nullptr, 16);
}
};
/* PAK 64-bit Unique ID */
@@ -100,6 +109,15 @@ public:
snprintf(buf, 17, "%016" PRIX64, m_id);
return std::string(buf);
}
UniqueID64() = default;
UniqueID64(const char* hexStr)
{
char copy[17];
strncpy(copy, hexStr, 16);
copy[16] = '\0';
m_id = strtouq(copy, nullptr, 16);
}
};
/* PAK 128-bit Unique ID */