[][src]Module openpol::image13h

image13h images

The original game uses Mode 13h and contains a module named image13h, so we'll mirror this naming here.

On-disk and in-memory format

Image13h images are self-contained chunks of bytes of the following form: [ width ] [ height ] [ unknown ] [ data ]

  • width and height are unsigned 2-byte little-endian integers
  • unknown is a 2-byte chunk containing 1 and 0 (unsigned). Its purpose is currently unknown.
  • data is width * height unsigned bytes containing color indices

Structs

Image13h
Rect

Constants

COLORS

Mode 13h number of colors.

HEADER_SIZE

The header size in bytes.

SCREEN_HEIGHT

Mode 13h screen height.

SCREEN_PIXELS

Total number of pixels on the screen.

SCREEN_WIDTH

Mode 13h screen width.

Functions

indices_to_rgb