Crusader_Decomp/rebuild/remorse/tests/map_renderer_tests.cpp

25 lines
651 B
C++
Raw Normal View History

#include "remorse/file_system.h"
#include "remorse/map_renderer.h"
#include <cassert>
#include <filesystem>
int main()
{
const auto root = remorse::findGameDataRoot(std::filesystem::current_path());
assert(root.has_value());
remorse::MapRenderOptions options;
options.mapIndex = 1;
options.maxWidth = 320;
options.maxHeight = 200;
const auto image = remorse::renderMapPreview(*root, options);
assert(image.has_value());
assert(image->width > 0);
assert(image->height > 0);
assert(!image->pixels.empty());
assert(image->decodedItemCount > 0);
assert(image->paintedItemCount > 0);
return 0;
}