home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
No Fragments Archive 10: Diskmags
/
nf_archive_10.iso
/
MAGS
/
MUCH
/
MSG01.MSA
/
ARTICLES_SHELL.DOC
< prev
next >
Wrap
Text File
|
1993-06-25
|
1KB
|
39 lines
DEMO SHELL SOURCE
~~~~~~~~~~~~~~~~~~~
Included on this disk is a file called SHELL.BAS which is a small
program to help start you off when writing demos. It saves you having
to type out the same things over and over again whenever you start on a
new demo. (Can also be used for anything other than demos).
Here is the program:
1 gosub 50000
2 rem ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3 rem INITIALISATION
4 rem ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
46 logic=back : gosub 50000
47 rem ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
48 rem MAIN LOOP
49 rem ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
50 cls logic
90 H=hardkey
98 if H=57 then gosub 50000 : end : rem CLOSE DOWN
99 screen swap : wait vbl : goto 50
4997 rem ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4998 rem MESSAGES
4999 rem ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
50000 mode 0 : key off : hide : curs off : click off :
clear key : cls back : cls physic : cls logic
50009 return
You put all of the basic initialisation between lines 5 and 45, and on
line 46 you do the final initialisation (ie. switch music and rasters
on). The main loop is between 55 and 99. Ideally, this should consist
solely of GOSUBS which branch out to each part of the demo. These parts
should be from line 100 onwards. Write the scrolltext message on line
5000 and onwards.
Article: BLACK EAGLE 26/6/93