[Kernel] Added Extracting Properties and Contexts out of SPA file

+ Did a bit of a cleanup in achievement earning code
This commit is contained in:
Gliniak
2023-12-21 20:43:19 +01:00
parent 2de1b8ad4b
commit d6dc4dc556
5 changed files with 204 additions and 30 deletions

View File

@@ -1042,6 +1042,26 @@ X_STATUS Emulator::CompleteLaunch(const std::filesystem::path& path,
}
XELOGI("----------------- END OF ACHIEVEMENTS ----------------");
XELOGI("-------------------- PROPERTIES --------------------");
const std::vector<kernel::util::XdbfPropertyTableEntry> properties_list =
db.GetProperties();
for (const kernel::util::XdbfPropertyTableEntry& entry :
properties_list) {
std::string label = db.GetStringTableEntry(language, entry.string_id);
XELOGI("{:08X} - {} - {}", entry.id, label, entry.data_size);
}
XELOGI("----------------- END OF PROPERTIES ----------------");
XELOGI("-------------------- CONTEXTS --------------------");
const std::vector<kernel::util::XdbfContextTableEntry> contexts_list =
db.GetContexts();
for (const kernel::util::XdbfContextTableEntry& entry : contexts_list) {
std::string label = db.GetStringTableEntry(language, entry.string_id);
XELOGI("{:08X} - {} - {}", entry.id, label, entry.unk2);
}
XELOGI("----------------- END OF CONTEXTS ----------------");
auto icon_block = db.icon();
if (icon_block) {
display_window_->SetIcon(icon_block.buffer, icon_block.size);