How to Use AGI256

From AGI Wiki
Jump to navigationJump to search

Introduction

AGI256 is a patch for AGI by Dark Minister and Brian Provinciano to modify AGI so that it can use 256 colors. Dark Minister created the original version allowing AGI to support 256 color pictures. I have continued work on it giving new features such as support for 256 color views. To use this, you will need to create the pictures and views. The views can be created using my AGI256 View Editor. Pictures can also be created with this from BMP files. To create the pictures from DOS, you can use SavePic.

 

How To Create an AGI256 Picture Using SavePic

AGI256 is a patch for AGI created by dark minister to modify AGI so that it can use 256 colors. To use this, you will need to create the pictures first which you want to use. Dark Minister has also created a program to make the pictures called Savepic.

With Savepic, you can create a 256 color AGI image. Here are some instructions for creating the picture:

  1. Unzip the file "savepic.zip".
  2. Edit the PCX file "template.pcx" which is included in the zip (draw the picture inside the white box). 3) Save the file as a PCX.
  3. Go to Dos and type "savepic .pcx".
  4. A .pic file will be created and you're ready to put it into your game.

 

How To Use The Picture In Your Game

Next, you can put the picture into your game. Once the picture resource is in the game, you now must add in into the logic. You load it into the your game with a hacked version of the command "unknown170".

For example, to load PICTURE.001 you would type the following:

v255 = 1;
unknown170(255);

You call "unknown170" with the number of the variable which contains the number of the picture you want to load. The variable used in the example is 255, but it can be any disposable variable.

To see a full example of the usage of "unknown170":

 

Example

Code:

<syntaxhighlight lang="agi"> // **************************************************************************** // // unknown170 Example // // ****************************************************************************

if (isset(f5)) {

 load.pic(v0);
 draw.pic(v0);
 discard.pic(v0);
 v255 = 3;
 unknown170(255);
 set.horizon(50);
 status.line.off();
 prevent.input();
 program.control();
 show.pic();
 display(10,1,"         Intro/Opening screen");

} if (have.key()) {

 set(f14);
 clear.lines(22,24,0);
 stop.motion(o0);
 reset(f33);
 new.room(2);

} return();

// Messages

  1. message 1 " Intro/Opening screen"

</syntaxhighlight>