Files
Gleb Mazovetskiy 9db80ef5d7 Assets: Load files directly for UNPACKED_MPQS
When using `UNPACKED_MPQS`, avoid all the SDL machinery for reading
files.

This is beneficial not only due to reduced indirection but also because
we can test for the file's existence and get the file size without
opening it, which is much faster.
2022-11-22 02:44:25 +01:00

32 lines
556 B
C++

#pragma once
#include <cstddef>
#include <cstdint>
namespace devilution {
struct PCXHeader {
uint8_t Manufacturer;
uint8_t Version;
uint8_t Encoding;
uint8_t BitsPerPixel;
uint16_t Xmin;
uint16_t Ymin;
uint16_t Xmax;
uint16_t Ymax;
uint16_t HDpi;
uint16_t VDpi;
uint8_t Colormap[48];
uint8_t Reserved;
uint8_t NPlanes;
uint16_t BytesPerLine;
uint16_t PaletteInfo;
uint16_t HscreenSize;
uint16_t VscreenSize;
uint8_t Filler[54];
};
static constexpr size_t PcxHeaderSize = 128;
} // namespace devilution