Bypass navigation menu
RGB Classic Games
Keeping the classics alive
Currently hosting 566 great games!
Return to Chapter 2

ExtPut(X, Y, Image[Index], PutAction)

Transfers a graphics image stored with ExtGet starting at X, Y using the specified action.

Action is 1 of 5 options described as follows:

1 = PRESET - Produces a numeric opposite of the color stored in the array:

Array ColorScreen Color
0015
0114
0213
0312
0411
0510
0609
0708
0807
0906
1005
11 04
1203
1302
1401
1500

2 = PSET - Transfers the image exactly as it was stored.

3 = AND - Does a logical AND between the point on the screen and the color in the array.

4 = OR - Does a logical OR between the point on the screen and the color in the array.

5 = XOR - Does a logical XOR between the point on the screen and the color in the array. When PUT against a background twice, the background is restored. This allows animation to take place. To perform animation do the following:

  1. PUT the image on the screen
  2. Calculate the next X, Y position
  3. PUT the image at the previous X, Y position
  4. Repeat Step 1

Parameters

X - Horizontal position to transfer image
Y - Vertical position to transfer image
Image[Index] - Integer array holding graphic image starting at the specified index
PutAction - Action to use when transferring image

Examples

BASIC

CALL ExtPut(10, 20, Image%(0), 5)

PASCAL

ExtPut(10, 20, Image[0], 5);