max.res Header: Offset Length Description 0 4 `RES0` - File ID 4 4 Directory offset 8 4 Directory length Directory consists of a sequence of file elements: Offset Length Description 0 8 ASCII File name trimmed by 0's 8 4 File start offset 12 4 File size -------------------------- Simple palette graphics file (max.res:\a_*; max.res:\p_*; max.res:\e_*; max.res:\endgame*; etc) Header: Offset Length Description 0 4 Undefined, commonly 0 4 2 Image width in pixels 6 2 Image height in pixels 8 768 Image pallette Followed by compressed data in form: SWORD - byte count If negative, repeat next byte WORD times If positive, copy next WORD of bytes