Atari ST series Technical Reference Manual page 166

Hide thumbs Also See for ST series:
Table of Contents

Advertisement

INTIN. For opaque copies, the logic opcode is a number
from 0-15 which corresponds exactly to the BitBlt opcodes.
Transparent copies use a logic mode number from 0-3,
which corresponds to the writing modes available from the
VDI. In transparent mode, the foreground color for the copy
is taken from the second word in the INTIN array, and the
background color from the third word in that array. For more
information on the VDI bit-blit routines, see Chapter 6 of
COMPUTEl's Technical Reference Guide, Atari ST Volume One:
The VDI.
Mouse and Sprite Operations
The line A sprite and mouse pointer routines are specialized
cases of the bit blit functions. On the ST, the system must
frequently move small graphics objects such as the mouse
pointer around on the screen. To make this easier, without
getting involved in all of the complexities of the BitBlt func­
tion, line A provides support for software sprites. These are
graphics objects that are 16 pixels wide by 16 lines high.
Each sprite has two components, the actual image data,
and a mask. The mask is blitted onto the destination screen
first, which allows you to "scoop out" a part of that destina­
tion and change it to the background color before laying
down the sprite image. This allows you to decide whether
the 0 bits in the 16 x 16 image block are transparent (leave
the existing destination image intact) or opaque (replace the
existing destination image with the pointer background
color). Therefore, any portion of the pointer may be one of
three colors: foreground color, background color, or transpar­
ent.
A sprite also has an attribute known as the hot spot. This
is the single point considered to be the sprite's location on
the screen, even though the sprite may be much larger than
a single point. This hot spot is expressed as an offset (in pix­
els) from the top left corner of the sprite.
Before the sprite is drawn on the screen, the image that
occupies the space on the screen is moved to a buffer area
known as the sprite save block. When the sprite is undrawn,
the image is moved back from that buffer to the screen. If
you are using multiple sprites, you must remember to un­
draw them in the reverse order of drawing, since any portion
of a sprite that is covered by another sprite ends up in the
158
CHAPTER 7

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents