Filetype:VGA

Most pictures in Pizza Tycoon are encoded in files with the .VGA extension. The images are run length encoded, and have the following layout (little endian):

Footer
The last byte of the file contains the offset (see below).

Data
If the value in the byte is zero it is seen as pixel data.

If the value in the byte is lower than or equal to the offset, it describes how many pixels after this byte should be seen as simpel pixel data. Value  (41 in decimal) means that the next 42 pixels are plain pixel data.

If the value in the byte is higher than the offset it is an indication of how often the next byte (pixel) should be repeated (minus the offset). For example the value  with the offset   would repeat for   so 127 times.

Pixel data
If a byte is seen as pixel data, the value is looked up in the palette.