moved everything to old stuff

This commit is contained in:
georgemoralis 2023-03-28 09:40:22 +03:00
parent e420476829
commit 5f19daf3ba
53 changed files with 1 additions and 6 deletions

View file

@ -0,0 +1,27 @@
#include <iostream>
#include <sys/stat.h>
#include <direct.h>
#include "PKG.h"
int main()
{
PKG pkg;
if (!pkg.open("test.pkg"))
{
std::cout << "Error reading test.pkg\n";
return 0;
}
pkg.printPkgHeader();
std::string gamedir = "game/" + pkg.getTitleID();
struct stat sb;
if (stat(gamedir.c_str(), &sb) != 0)
{
_mkdir(gamedir.c_str());
}
std::string extractpath = "game/" + pkg.getTitleID() + "/";
std::string failreason;
if (!pkg.extract("test.pkg", extractpath, failreason))
{
std::cout << "Error extraction " << failreason;
}
}