diff --git a/th01/formats/grp.h b/th01/formats/grp.h index 8cb90315..58c6a6bd 100644 --- a/th01/formats/grp.h +++ b/th01/formats/grp.h @@ -1,3 +1,21 @@ +/// .PI variant +/// ----------- +/// .PI is a common lossless PC-98 image format that features efficient +/// compression for the often dithered 16-color pixel art typically associated +/// with the platform. This .GRP format only differs from regular .PI files in +/// two minor aspects: +/// +/// • The two magic header bytes are "ZN" instead of "Pi". (Lol) +/// • The palette uses PC-98-native 4-bit color component values from 0x0 to +/// 0xF, leaving the top 4 bits empty. .PI loaders that expect 8-bit color +/// components will therefore interpret .GRP images as being very dark. +/// +/// These functions are just wrappers around the PiLoad library, which +/// implements the actual format by directly decoding an image to VRAM. +/// All .GRP images are assumed to be 640×400. +/// +/// More info on the original format: https://mooncore.eu/bunny/txt/pi-pic.htm + // Always updated by any of the .GRP loading or blitting functions. extern Palette4 grp_palette; @@ -37,3 +55,4 @@ int grp_put_colorkey(const char *fn); void pascal grp_palette_white_out(unsigned int frames); void pascal grp_palette_white_in(unsigned int frames); #endif +/// -----------