SECTION 6
Color, Animation and Sprite Graphics
Statements Unique to the C128
GRAPHICS OVERVIEW ...............................................................6-3
Graphics Features......................................................................6-3
Command Summary
.................................................................. 6-3
GRAPHICS PROGRAMMING ON
THE COMMODORE 128...............................................................6-4
Choosing Colors.........................................................................6-4
Types of Screen Display............................................................6-5
Selecting the Graphic Mode
.....................................................
6-6
Displaying Graphics on the Screen
........................................
6-8
Drawing a Circle - The CIRCLE Command
........................
6-9
Drawing a Box - The BOX Command............................... 6-10
Drawing Lines, Points and Other Shapes—
The DRAW Command.................................................... 6-10
PAINTing Outlined Areas - The PAINT Command
........
6-11
Displaying Characters on a Bit-Mapped Screen—
The CHAR Command......................................................... 6-12
Creating a Graphics Sample Program
.................................. 6-12
Changing the Size of Graphic Images—
The SCALE Command....................................................... 6-14
SPRITES: PROGRAMMABLE, MOVABLE OBJECT
BLOCKS
....................................................................................... 6-16
Sprite Creation......................................................................... 6-17
Using Sprite Statements in a Program
.................................. 6-17
Drawing the Sprite Image....................................................... 6-18
Storing the Sprite Data with SSHAPE.................................... 6-19
Saving the Picture Data in a Sprite....................................... 6-20
Turning on Sprites
.................................................................. 6-20
Moving Sprites with MOVSPR
............................................... 6-21
Creating a Sprite Program
.....................................................
6-23
Sprite Definition Mode—The SPRDEF Command............... 6-24
Sprite Creation Procedure in SPRite DEFinition M ode
......
6-26
6-1