move bits functions to separate file + fix missing defaults with disabled program_options on windows

This commit is contained in:
2026-03-05 19:13:44 +01:00
parent d4f83e11db
commit 025cbfdf3b
9 changed files with 166 additions and 155 deletions

15
src/bits.cpp Normal file
View File

@ -0,0 +1,15 @@
#include "bits.hpp"
auto print_bitmap(const uint64_t bitmap, const uint8_t w, const uint8_t h, const std::string& title) -> void {
traceln("{}:", title);
traceln("{}", std::string(2 * w - 1, '='));
for (size_t y = 0; y < w; ++y) {
std::cout << " ";
for (size_t x = 0; x < h; ++x) {
std::cout << static_cast<int>(get_bits(bitmap, y * w + x, y * h + x)) << " ";
}
std::cout << "\n";
}
std::cout << std::flush;
traceln("{}", std::string(2 * w - 1, '='));
}