|
|
Line 490: |
Line 490: |
|
| |
|
| <span id="Extensions"></span> | | <span id="Extensions"></span> |
| =Fan-Made Extensions=
| |
| ==AGIPAL==
| |
| AGIPAL uses the [[AGI/Specifications/Logic#Other_commands | 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.
| |
| <pre>
| |
| 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
| |
| </pre>
| |
|
| |
| 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 [[AGI/Specifications/Logic#Other_commands_2 | 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===
| |
| <pre>
| |
| 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.
| |
| </pre>
| |
|
| |
| 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 [[AGI/Specifications/Other/AGI256/Implementation_Details | AGI256 Implementation Details]] page.
| |
|
| |
| ===External links===
| |
|
| |
| [http://agisci.classicgaming.gamespy.com/agi256.shtml How to use AGI256]<br>
| |
| [http://dl.fileplanet.com/dl/dl.asp?ClassicGaming/agisci/agi-256c.zip The AGI256 demo]<br>
| |
| [http://agisci.classicgaming.gamespy.com/agiutil.shtml#PictureTools AGI Picture Tools (Some support AGI256)]<br>
| |
| [http://agisci.classicgaming.gamespy.com/txt/unknown.txt An example of unknown170 command use]<br>
| |
| [http://www.agidev.com/download/#cat4 Sierra's original v2.936 AGI interpreter (Among other things)]<br>
| |
| [http://en.wikipedia.org/wiki/Video_Graphics_Array#The_VGA_color_palette 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 [[AGI/Specifications/View#VIEW_resources | view resources]] but with the following differences:
| |
|
| |
| * [[AGI/Specifications/View#View_header_.287.2B_bytes.29 | 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 [[AGI/Specifications/View#Cel_header_.283_bytes.29 | 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 [[AGI/Specifications/Other/AGI256-2/Implementation_Details | AGI256-2 Implementation Details]] page.
| |
|
| |
| ===External links===
| |
|
| |
| [http://dl.fileplanet.com/dl/dl.asp?ClassicGaming/agisci/agi256-2.zip The AGI256-2 demo]<br>
| |
| [http://agisci.classicgaming.gamespy.com/agiutil.shtml#ViewTools AGI View Tools (Some support AGI256-2)]<br>
| |
| [http://en.wikipedia.org/wiki/Video_Graphics_Array#The_VGA_color_palette The default VGA palette]<br>
| |