24 lines
765 B
C++
24 lines
765 B
C++
|
|
#include "remorse/file_system.h"
|
||
|
|
|
||
|
|
#include <cassert>
|
||
|
|
#include <filesystem>
|
||
|
|
|
||
|
|
int main()
|
||
|
|
{
|
||
|
|
const auto root = remorse::findGameDataRoot(std::filesystem::current_path());
|
||
|
|
assert(root.has_value());
|
||
|
|
assert(root->hasExecutable);
|
||
|
|
assert(root->hasStaticData);
|
||
|
|
assert(root->hasUsecode);
|
||
|
|
|
||
|
|
const auto palettePath = remorse::resolveGameDataPath(*root, std::filesystem::path("static") / "gamepal.pal");
|
||
|
|
assert(palettePath.has_value());
|
||
|
|
|
||
|
|
const auto paletteBytes = remorse::readBinaryFile(*palettePath);
|
||
|
|
assert(paletteBytes.has_value());
|
||
|
|
assert(!paletteBytes->empty());
|
||
|
|
|
||
|
|
const auto blockedParent = remorse::resolveGameDataPath(*root, std::filesystem::path("..") / "CRUSADER.EXE");
|
||
|
|
assert(!blockedParent.has_value());
|
||
|
|
return 0;
|
||
|
|
}
|