move bits functions to separate file + fix missing defaults with disabled program_options on windows
This commit is contained in:
15
src/bits.cpp
Normal file
15
src/bits.cpp
Normal 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, '='));
|
||||
}
|
||||
Reference in New Issue
Block a user