141 lines
4.6 KiB
Plaintext
141 lines
4.6 KiB
Plaintext
|
|
{-----------------------------------------------------------------------+
|
|
| |
|
|
| Credits screen |
|
|
| |
|
|
+-----------------------------------------------------------------------}
|
|
|
|
gcl0x
|
|
|
|
{
|
|
First setup all subroutine definitions and variables, without making
|
|
calls. This way allows use of vLR to hop from page to page during setup,
|
|
with minimal overhead. At the end, run the main loop.
|
|
}
|
|
|
|
[def
|
|
{-
|
|
PrintText(Text,Pos)
|
|
|
|
Draw a zero-terminated text string to the screen.
|
|
Character 10 acts as newline.
|
|
There is no check for running off screen.
|
|
-}
|
|
push
|
|
[do
|
|
Text, Char= {Next character to be printed}
|
|
if<>0 {Zero termination}
|
|
Text<++ {Advance text pointer}
|
|
Char 10^ [if=0 Pos<. $800 Pos+ Pos=
|
|
else PrintChar!]
|
|
loop]
|
|
pop ret
|
|
] PrintText=
|
|
|
|
[def {Message}
|
|
$54# $68# $69# $73# $20# $47# $69# $67# $61# $74# $72# $6f# $6e#
|
|
$20# $54# $54# $4c# $20# $63# $6f# $6d# $70# $75# $74# $65# $72#
|
|
$0a# $6b# $69# $74# $20# $77# $61# $73# $20# $63# $6f# $6e# $63#
|
|
$65# $69# $76# $65# $64# $2c# $0a# $64# $65# $73# $69# $67# $6e#
|
|
$65# $64# $20# $61# $6e# $64# $20# $62# $72# $6f# $75# $67# $68#
|
|
$74# $20# $74# $6f# $0a# $79# $6f# $75# $20# $62# $79# $20# $4d#
|
|
$61# $72# $63# $65# $6c# $20# $76# $61# $6e# $20# $4b# $65# $72#
|
|
$76# $69# $6e# $63# $6b# $0a# $61# $6e# $64# $20# $57# $61# $6c#
|
|
$74# $65# $72# $20# $42# $65# $6c# $67# $65# $72# $73# $2c# $20#
|
|
$62# $61# $73# $65# $64# $0a# $6f# $6e# $20# $61# $6e# $20# $6f#
|
|
$72# $69# $67# $69# $6e# $61# $6c# $20# $64# $65# $73# $69# $67#
|
|
$6e# $20# $62# $79# $0a# $4d# $61# $72# $63# $65# $6c# $20# $76#
|
|
$61# $6e# $20# $4b# $65# $72# $76# $69# $6e# $63# $6b# $2e# $0a#
|
|
$0a# $53# $70# $65# $63# $69# $61# $6c# $20# $74# $68# $61# $6e#
|
|
$6b# $73# $20# $6d# $75# $73# $74# $20# $67# $6f# $20# $74# $6f#
|
|
0#
|
|
] Part1=
|
|
|
|
{-----------------------------------------------------------------------+
|
|
|}\vLR>++ ret{ RAM page 3 |
|
|
+-----------------------------------------------------------------------}
|
|
$0300:
|
|
|
|
[def
|
|
$0a# $4d# $61# $72# $63# $2c# $20# $50# $61# $75# $6c# $2c# $20#
|
|
$49# $76# $61# $6e# $61# $2c# $20# $4f# $73# $63# $61# $72# $2c#
|
|
$0a# $4d# $61# $72# $74# $69# $6a# $6e# $2c# $20# $45# $72# $69#
|
|
$6b# $2c# $20# $42# $65# $6c# $6c# $61# $2c# $20# $42# $65# $6e#
|
|
$2c# $0a# $44# $69# $65# $74# $65# $72# $2c# $20# $4d# $61# $72#
|
|
$74# $69# $6e# $2c# $20# $42# $72# $61# $64# $2c# $20# $4c# $6f#
|
|
$75# $2c# $0a# $48# $47# $2c# $20# $42# $72# $69# $61# $6e# $20#
|
|
$61# $6e# $64# $20# $61# $6c# $6c# $20# $47# $69# $67# $61# $74#
|
|
$72# $6f# $6e# $0a# $75# $73# $65# $72# $73# $21# $0a# $20# $20#
|
|
$20# $20# $20# $20# $20# $20# $20# $20# $20# $4d# $61# $72# $63#
|
|
$65# $6c# $20# $26# $20# $57# $61# $6c# $74# $65# $72# $0a# 0#
|
|
] Part2=
|
|
|
|
[def { Clear screen }
|
|
$800 p= $8801 i=
|
|
0 \sysArgs0. \sysArgs1. {Black}
|
|
\SYS_VDrawBits_134 \sysFn:
|
|
[do
|
|
p [do
|
|
\sysArgs4: 134!! {Clears 8 pixels vertically}
|
|
$800 p+ p= if>0loop]
|
|
i+ p=
|
|
255& 160^ if<>0loop]
|
|
ret
|
|
] ClearScreen=
|
|
|
|
[def
|
|
{-
|
|
Wait -- Wait Delay number of frames (range 1..255)
|
|
-}
|
|
\frameCount, Delay+ 255& tmp=
|
|
[do \frameCount, tmp- if<>0loop]
|
|
ret
|
|
] Wait=
|
|
|
|
{-----------------------------------------------------------------------+
|
|
|}\vLR>++ ret{ RAM page 4 |
|
|
+-----------------------------------------------------------------------}
|
|
$0400:
|
|
|
|
{ Print a 5x8 character on screen with the built-in font
|
|
Char must be in the 32-127 range (this is not checked) }
|
|
[def {PrintChar}
|
|
{Map ASCII code to offset in font table}
|
|
Char 82- [if<0 50+ i= \font32up
|
|
else i= \font82up] fontData= {Select low or high page}
|
|
i 2<< i+ {Multiply by 5}
|
|
fontData+ fontData= {Add to page address to reach bitmap data for Char}
|
|
|
|
{Draw 5 vertical slices: 5 using font data}
|
|
Color \sysArgs1.
|
|
Pos \sysArgs4:
|
|
6+ Pos=
|
|
\SYS_VDrawBits_134 \sysFn:
|
|
$fb i= [do
|
|
fontData 0? fontData<++ \sysArgs2. 134!!
|
|
\sysArgs4<++
|
|
i<++ i if<>0loop]
|
|
ret
|
|
] PrintChar=
|
|
|
|
{--- Setup ---}
|
|
|
|
$800 Pos= ClearScreen!
|
|
|
|
[do
|
|
{Redraw text in several colors}
|
|
62 Color= {Pen color}
|
|
[do
|
|
$800 Pos= {Pen position at top of screen}
|
|
Part1 Text= PrintText!
|
|
Part2 Text= PrintText!
|
|
240 Delay= Wait!
|
|
Color 8^ if<>0 Color 9- Color= loop]
|
|
|
|
loop]
|
|
|
|
{-----------------------------------------------------------------------+
|
|
| End |
|
|
+-----------------------------------------------------------------------}
|
|
|