MIP FILES ***************************************************************************** DESCRIPTION ***************************************************************************** The MIP File Format is used by Papyrus' racing simulators to hold multiple images. I refer to these files as Multi-Image Picture files, although I am do not know if that is where M.I.P. came from. These files hold multiple versions of the same image in different sizes. If the first image is 64x1000, the second image is 32x500 and the third is 16x250 etc. The strange part is, in reality, the first image is 64x1002, the second image is 32x502, and the third 16x252 etc. I do know that these multiple images are used for scaling the bitmaps within the game. It seems that the images are reduced by 1/2 until the width equals two. I am unsure of whether or not the width has to be a power of two or not. I am also unsure of whether the image can exceed 256 pixels in width. ***************************************************************************** STRUCTURE ***************************************************************************** SECTION ONE: The Header ----------------------- BYTE PURPOSE ---- ------- 000-003 File Size: Size of MIP file minus first 4 bytes 004-007 Always has a value of zero 008-011 Width: Width of the first image 012-015 Height: Height of the first image - 2 016-019 Number Of Images: Number of images in the file 020-023 Default or Average Color Value SECTION TWO: Image Attributes ----------------------------- BYTE PURPOSE ---- ------- 00-03 Image Value: Number of images following and including this one. This is stored in a bit-wise fashion where: 00000001 = 1 00000011 = 2 00000111 = 3 etc... 04-07 Not Image Value: This is: (the negation of the Image Value) - (ImageValue+1) 08-11 Image Start: Starting position of the image + (Image Value-3) SECTION THREE: The Images ------------------------- The actual image data is stored according to the positions given in section two and its length is its width * height. The largest image is first, followed immediately by the second etc... ------------------------- -Corey Rueckheim -rueck_cw@cslab.uwlax.edu