Crusader_Decomp/rebuild/remorse/tests/combat_tactics_tests.cpp

23 lines
731 B
C++
Raw Normal View History

#include "remorse/combat_tactics.h"
#include "remorse/file_system.h"
#include <cassert>
#include <filesystem>
int main()
{
const auto root = remorse::findGameDataRoot(std::filesystem::current_path());
assert(root.has_value());
const auto combatPath = remorse::resolveGameDataPath(*root, std::filesystem::path("STATIC") / "COMBAT.DAT");
assert(combatPath.has_value());
const auto tactics = remorse::loadCombatTactics(*combatPath);
assert(tactics.has_value());
assert(tactics->size() == 14);
assert((*tactics)[0].name == "Dumb");
assert((*tactics)[0].blockOffsets[0] == 0x002c);
assert((*tactics)[0].blockOffsets[1] == 0x0031);
assert(!(*tactics)[0].bytecode.empty());
return 0;
}