add CLI option to decode quest files

This commit is contained in:
Martin Michelsen
2022-05-18 01:03:54 -07:00
parent e87c73c1b7
commit 9b0c294054
2 changed files with 46 additions and 10 deletions
+9 -9
View File
@@ -35,11 +35,6 @@ const char* name_for_category(QuestCategory category);
class Quest {
private:
static std::string decode_gci(const std::string& filename);
static std::string decode_dlq(const std::string& filename);
static std::pair<std::string, std::string> decode_qst(const std::string& filename);
public:
enum class FileFormat {
BIN_DAT = 0,
@@ -60,10 +55,6 @@ public:
std::u16string short_description;
std::u16string long_description;
// these are populated when requested
mutable std::shared_ptr<std::string> bin_contents_ptr;
mutable std::shared_ptr<std::string> dat_contents_ptr;
Quest(const std::string& file_basename);
Quest(const Quest&) = default;
Quest(Quest&&) = default;
@@ -77,6 +68,15 @@ public:
std::shared_ptr<const std::string> dat_contents() const;
std::shared_ptr<Quest> create_download_quest() const;
static std::string decode_gci(const std::string& filename);
static std::string decode_dlq(const std::string& filename);
static std::pair<std::string, std::string> decode_qst(const std::string& filename);
private:
// these are populated when requested
mutable std::shared_ptr<std::string> bin_contents_ptr;
mutable std::shared_ptr<std::string> dat_contents_ptr;
};
struct QuestIndex {