This commit is contained in:
2025-08-06 13:29:28 +08:00
commit 957a372209
230 changed files with 43801 additions and 0 deletions

49
expkg/src/EXPKG/EXPKG.h Normal file
View File

@ -0,0 +1,49 @@
//
// Created by sfd on 25-8-4.
//
#ifndef EXPKG_H
#define EXPKG_H
#include <filesystem>
#include <memory>
#include "BinaryOPT/BinaryReader.h"
#include "Tex/Tex.h"
typedef struct CommandArgs
{
int argc;
char** argv;
} CommandArgs;
namespace PKG
{
enum class FILE_EXTENSION;
class PKG_API EXPKG
{
public:
EXPKG(const CommandArgs& commandArgs);
EXPKG(const std::filesystem::path& filePath, const std::filesystem::path& outDir = "out");
private:
static FILE_EXTENSION checkExtension(const std::filesystem::path& filePath);
void ExtractTex(const std::filesystem::path& path = "");
void ExtractPkg();
void Run();
private:
std::shared_ptr<BinaryReader> m_Reader;
std::shared_ptr<Tex> m_Tex;
std::filesystem::path m_OutDir;
std::vector<Entry> m_Entries;
};
}
#endif //EXPKG_H