mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2024-11-10 11:35:19 -05:00
d24c8453db
subrepo: subdir: "libultraship" merged: "a484cda98" upstream: origin: "https://github.com/HarbourMasters/libultraship.git" branch: "main" commit: "a484cda98" git-subrepo: version: "0.4.1" origin: "???" commit: "???"
29 lines
435 B
C++
29 lines
435 B
C++
#include "OTRArchive.h"
|
|
|
|
void SaveTest()
|
|
{
|
|
auto archPtr = OtrLib::OTRArchive::CreateArchive("myarch.mpq");
|
|
auto arch = archPtr.get();
|
|
|
|
char data[] = "ABCDEFG!";
|
|
|
|
arch->AddFile("test.txt", (uintptr_t)data, sizeof(data));
|
|
}
|
|
|
|
void LoadTest()
|
|
{
|
|
std::shared_ptr<OtrLib::OTRArchive> archPtr(new OtrLib::OTRArchive("myarch.mpq"));
|
|
|
|
archPtr->LoadFile("(crcfile)");
|
|
|
|
int bp = 0;
|
|
|
|
}
|
|
|
|
int main()
|
|
{
|
|
LoadTest();
|
|
//SaveTest();
|
|
|
|
return 0;
|
|
} |