28#define UNLV_EXT ".uzn"
48 BLOCK_IT block_it = blocks;
51 if ((pdfp = fopen(name.c_str(),
"rb")) ==
nullptr) {
54 while (
tfscanf(pdfp,
"%d %d %d %d %*s", &
x, &
y, &width, &height) >= 4) {
56 block =
new BLOCK(name.c_str(),
true, 0, 0,
static_cast<int16_t
>(
x),
57 static_cast<int16_t
>(ysize -
y - height),
static_cast<int16_t
>(
x + width),
58 static_cast<int16_t
>(ysize -
y));
60 block_it.add_to_end(block);
64 tprintf(
"UZN file %s loaded.\n", name.c_str());
69 BLOCK_IT block_it(blocks);
70 auto *block =
new BLOCK(
"",
true, 0, 0, 0, 0, width, height);
71 block_it.add_to_end(block);
int tfscanf(FILE *stream, const char *format,...)
bool read_unlv_file(std::string &name, int32_t xsize, int32_t ysize, BLOCK_LIST *blocks)
void tprintf(const char *format,...)
void FullPageBlock(int width, int height, BLOCK_LIST *blocks)