[Maintenance] [th01] .GRP: Describe the format

Part of P0229, funded by Ember2528.
This commit is contained in:
nmlgc 2023-02-16 23:46:47 +01:00
parent fde7152cde
commit 41156c0e76
1 changed files with 19 additions and 0 deletions

View File

@ -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
/// -----------