Compare commits
2 commits
4771e0562f
...
a0453ade4c
Author | SHA1 | Date | |
---|---|---|---|
a0453ade4c | |||
46ba6bbab5 |
2 changed files with 2 additions and 4 deletions
|
@ -124,12 +124,11 @@ void BitmapX16::write_x16(const char *filename) {
|
||||||
buf[9] = h >> 8;
|
buf[9] = h >> 8;
|
||||||
buf[10] = palette_entries.size();
|
buf[10] = palette_entries.size();
|
||||||
buf[11] = significant_start;
|
buf[11] = significant_start;
|
||||||
uint16_t image_start = 32+(2*palette_entries.size())+1;
|
uint16_t image_start = 32+(2*palette_entries.size());
|
||||||
buf[12] = image_start;
|
buf[12] = image_start;
|
||||||
buf[13] = image_start>>8;
|
buf[13] = image_start>>8;
|
||||||
buf[14] = compress ? 255 : 0;
|
buf[14] = compress ? 255 : 0;
|
||||||
buf[15] = extra_to_real_palette(border);
|
buf[15] = extra_to_real_palette(border);
|
||||||
--image_start;
|
|
||||||
for (size_t i = 16; i < 32; i++) {
|
for (size_t i = 16; i < 32; i++) {
|
||||||
buf[i] = 0; // Reserved bytes.
|
buf[i] = 0; // Reserved bytes.
|
||||||
}
|
}
|
||||||
|
@ -218,7 +217,6 @@ void BitmapX16::load_x16(const char *filename) {
|
||||||
if ((int8_t)buf[14] == -1) {
|
if ((int8_t)buf[14] == -1) {
|
||||||
compressed = true;
|
compressed = true;
|
||||||
}
|
}
|
||||||
--image_start;
|
|
||||||
border = buf[15];
|
border = buf[15];
|
||||||
bufsize = std::filesystem::file_size(filename);
|
bufsize = std::filesystem::file_size(filename);
|
||||||
buf.resize(bufsize);
|
buf.resize(bufsize);
|
||||||
|
|
|
@ -35,7 +35,7 @@ incdirs = [
|
||||||
'lzsa/src',
|
'lzsa/src',
|
||||||
'lzsa/src/libdivsufsort/include'
|
'lzsa/src/libdivsufsort/include'
|
||||||
]
|
]
|
||||||
exe = executable('b16converter', srcs,
|
exe = executable('bmxconverter', srcs,
|
||||||
install : true,
|
install : true,
|
||||||
include_directories: incdirs,
|
include_directories: incdirs,
|
||||||
c_args: ['-DHAVE_CONFIG_H=1','-D__STDC_LIMIT_MACROS','-D__STDC_CONSTANT_MACROS','-D__STDC_FORMAT_MACROS'],
|
c_args: ['-DHAVE_CONFIG_H=1','-D__STDC_LIMIT_MACROS','-D__STDC_CONSTANT_MACROS','-D__STDC_FORMAT_MACROS'],
|
||||||
|
|
Loading…
Reference in a new issue