ScummVM logo Main website - Forums - BuildBot - Doxygen - Planet
Contact us - Buy Supported Games: GOG.com
Log in curved edge

AGI/Specifications/Fan Made ExtensionsAGI/Specifications/Fan Made Extensions

Fan-Made Extensions

AGIPAL

AGIPAL uses the shake.screen command to call an external file which changes the palette. The range of palette files is 100-109.

<syntax type="C++"> shake.screen(101) </syntax>

That command would use the palette in pal.101, instead of shaking the screen 101 times under the AGIPAL interpreter.

pal.* Format

There are always eight 24-byte chunks, so the file is always 192 bytes.

Chunk0			Holds RGB palette data for the first 8 colors (R0, G0, B0, R1, G1, B1, R2, G2, B2, ...)
Chunk1			Same as Chunk0
Chunk2			Holds RGB palette data for the second 8 colors (R8, G8, B8, R9, G9, B9, R10, G10, B10, ...)
Chunk3			Same as Chunk2
Chunk4-Chunk7		Same as Chunk0-Chunk3

Because VGA used 18-bit colors (i.e. 6 bits per color component) only the lowest 6 bits of each color component are actually used (i.e. the topmost two bits of each color component byte are simply discarded).

AGI256

AGI256 is a hack to AGI interpreter v2.936 to add 256-color picture resource support.

The AGI256 hack was originally made by Dark Minister.

AGI256 uses the unknown170(n) a.k.a. set.simple(n) command to load 256-color picture resources. The parameter n is the variable's number that holds the picture resource's number.

Example of use: <syntax type="C++"> v123 = 10 unknown170(v123) </syntax> That would load the picture resource number 10 as a 256-color picture resource. Any variable can be used with unknown170, v123 was just chosen for this example.

256-color picture resource format

Data    : Simply a raw 256-color 160x168 size picture, one byte per pixel.
Length  : Always 160*168*1 = 26880 bytes.
Palette : Isn't saved in the file. Uses the default VGA palette.

As AGI256 was hacked to a v2.936 AGI interpreter no compression is used on the picture resource data (Only v3 AGI interpreters use compression).

Implementation details

See the AGI256 Implementation Details page.

External links

How to use AGI256
The AGI256 demo
AGI Picture Tools (Some support AGI256)
An example of unknown170 command use
Sierra's original v2.936 AGI interpreter (Among other things)
The default VGA palette

AGI256-2

AGI256-2 is an extension to AGI256 to further add 256-color view support.

The AGI256-2 hack was originally made by Brian Provinciano.

AGI256-2 uses a modified cel blitting routine so that it can handle view data that isn't run length encoded and has 256 colors.

AGI256-2 uses the same palette as AGI256 i.e. the default VGA palette.

256-color view resource format

Like the v2 AGI view resources but with the following differences:

  • View header starts with bytes 0x0F, 0xF0
    • Can be used for detecting 256-color view resources
  • Doesn't support mirroring
    • Transparency and cel mirroring byte in cel header is used solely for choosing the transparent color
  • Cel data is not run length encoded
    • Cel data is raw 256-color data, one byte per pixel
      • NOTE though that 0x00 for a new line is still supported

Implementation details

See the AGI256-2 Implementation Details page.

External links

The AGI256-2 demo
AGI View Tools (Some support AGI256-2)
The default VGA palette

 

curved edge   curved edge