2020-09-20 01:21:28 +01:00
|
|
|
#pragma once
|
|
|
|
|
2021-02-10 16:28:47 +00:00
|
|
|
#include "constants.hpp"
|
2020-09-20 01:21:28 +01:00
|
|
|
#include <switch.h>
|
|
|
|
#include <set>
|
2021-02-10 16:28:47 +00:00
|
|
|
#include <string>
|
|
|
|
#include <vector>
|
2020-09-20 01:21:28 +01:00
|
|
|
|
|
|
|
static constexpr u32 MaxTitleCount = 64000;
|
|
|
|
|
|
|
|
typedef struct Title {
|
|
|
|
std::string id;
|
|
|
|
std::string name;
|
|
|
|
bool operator ==(const Title&x) const {
|
|
|
|
return id == x.id;
|
|
|
|
}
|
|
|
|
|
|
|
|
bool operator <(const Title&x) const {
|
|
|
|
return id < x.id;
|
|
|
|
}
|
|
|
|
} Title;
|
|
|
|
|
2020-09-20 23:11:34 +01:00
|
|
|
void extract(const char* filename, const char* workingPath = ROOT_PATH, int overwriteInis = 1);
|
2020-09-21 19:36:46 +01:00
|
|
|
void extract(const char * filename, const char* workingPath, const char* toExclude);
|
2020-09-20 01:21:28 +01:00
|
|
|
std::string formatApplicationId(u64 ApplicationId);
|
2021-02-22 19:51:29 +00:00
|
|
|
std::vector<std::string> getInstalledTitlesNs();
|
|
|
|
std::vector<std::string> excludeTitles(const char* path, std::vector<std::string> listedTitles);
|
2020-09-26 15:55:24 +01:00
|
|
|
void writeTitlesToFile(std::set<std::string> titles, const char* path);
|
2021-02-22 19:51:29 +00:00
|
|
|
void extractCheats(const char * zipPath, std::vector<std::string> titles, CFW cfw, bool credits = false);
|
2020-09-20 01:21:28 +01:00
|
|
|
void removeCheats(CFW cfw);
|