EasyManua.ls Logo

Radio Shack TRS-80 X-PAD GT-116 - Page 34

Radio Shack TRS-80 X-PAD GT-116
65 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
280 IF Y>191 THEN
220
290
PAINTCX
*Y) tC >8:G0T0
300 A=PPOINT(X»Y)
310
IF A<>5 THEN 3G0
320 PSETCX »Y
*8>
330 FOR W=l T0
50:NEXT N
340
PRESETCX tY)
350 RETURN
360 PSET(X »Y t5)
370
FOR
W=l TO 50:NEXT W
380 PSET(X »Y
*A>
390 RETURN
400
X=PEEK(6537G) :Y=PEEK
ia®
:S=PEEK
(65378)
:RETURN
RUN the program
and
draw a box. To paint this figure:
1.
Move the
Pen to a
color-coded Menu, press down and
then lift
the Pen,
and bring it back to the box.
2.
Move the
Pen
within the boundaries of the box and
press down on the
tip. Presto
your
figure
is painted
in
the color
you chose!
3. Move the Pen
to the bottom
margin
to
clear the
Screen. Draw
two more boxes and paint the boxes with
the two remaining
color choices. (Congratulations,
you're quite
a
painter!)
'Fore
and
Aft Paintin'
When
you painted the figure,
you
painted
the
"foreground".
Painting
the rest of the
scene
("aft"
or
behind) is called "background painting".
You can paint
the foreground
and the background
the same color and
still keep
an
outline
of
your figure on the Screen. The
figure
is outlined in the remaining
colors
of the
Screen
Set.
To paint
the background
of your figure:
1. Draw the figure.
2. Move the Pen
to the margin
that is color-coded in the
color
you want the box's
background
to be
painted
and
press
down.
Then
press the
Pen
somewhere
on the
Display
Area
but
outside
of the
boundaries
of the
figure.
The
outline
of
the figure
is
still visible.
You
can
paint
the
background
either
before
or after
you
paint
the
foreground.
Mode-Us
Operandi
In the
painting
box
program,
PMODE
3 set the resolution
and
the
four-color
mode.
Look
at line
30 (SCREEN
1,0).
The first
number
(1)
in
this
command
sets
the
Graphics
Screen,
and
the
second
number
(0)
sets the
four
colors
of
the
mode:
green/yellow/red/blue
Look
at
our
program
again.
In lines
190
(3,
left margin
is
blue),
200
(2,
right
margin
is yellow),
and
210
(4,
top
margin
is
red),
we set
the
color for
our margins. In
this
program,
the
margins
are
listed
in
this order:
Left.
Right.
Top.
Why
are
the
margins
set
to blue,
yellow,
and
red?
Since
we are
in
Screen
Set and
four-color
mode,
the only
color
choices
are
blue,
yellow,
and
red
(since the
background
is
green).
You
can change
the order
of
these
color-coded
margins
by
simply
changing
the
order
of the
color
codes in
the
program:
190
C=2sG0T0
230
(2,
left
margin
is
now
yellow)
200 C=4:GQT0
230
(4,
right
margin
is now
red)
210
C=3:G0T0
230
(3,
top
margin
is
now blue)
RUN
the
program
and
paint with
these new
color-coded
margins.
Now
change
to
Screen
Set 1
by changing line
30 to:
30
SCREEN
1 ti
This
changes
the
color
set of
our four-color
mode
screen
to
27