| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | BOUNCE.MOO |
BOUNCE.COM follows this message.
----begin BOUNCE.MOO-------------------------------------------------------
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
''' '''
''' BOUNCE.MOO *** released to the public domain *** '''
''' '''
''' Originally by Rowan Crowe, Wednesday, 03-Jan-1996 '''
''' 3:635/727.1{at}fidonet '''
''' rowan{at}jelly.freeway.DIALix.oz.au '''
''' '''
''' Fairly cute but useless demonstration program bounces several '''
''' independent "balls" around the screen area. '''
''' '''
''' %BallCount may be modified. Limits are 1 to about 8000 (!) balls. '''
''' '''
''' Requires MoonRock compiler: '''
''' MRC bounce/-m/-c '''
''' '''
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
begin DEF
%BallCount = 25 ' number of balls on screen
dim x%[%BallCount] ' current ball x position
dim y%[%BallCount] ' current ball y position
dim dx%[%BallCount] ' direction to travel: -1, 0, 1
dim dy%[%BallCount] ' " " " "
begin CODE
$outstream _tty_str_direct
colour ?,0
cls
{at}mov ah, 01h
{at}mov cx, 2000h
{at}int 10h
' disable cursor.
for i% = 0 to %BallCount
x%[i%] = rand(7900) \ 100 ' scale 0-79 (nb: '\' = integer division)
y%[i%] = rand(2300) \ 100 ' scale 0-23
dx%[i%] = 0
while dx%[i%] = 0
t% = rand(32000) - 16000
dx%[i%] = sgn(t%) ' -1, 0, +1
wend
dy%[i%] = 0
while dy%[i%] = 0
t% = rand(32000) - 16000
dy%[i%] = sgn(t%) ' -1, 0, +1
wend
next
k% = -1
while k% = -1
c% = 7
for i% = 0 to %BallCount
mcursor x%[i%],y%[i%]
print " " ' clear last position
x%[i%] = x%[i%] + dx%[i%]
y%[i%] = y%[i%] + dy%[i%]
mcursor x%[i%],y%[i%]
colour c%
c% = c% + 1
if c% = 8 then c% = 0
print "\h04" ' diamond "ball"
if x%[i%] > 77 then
t% = rand(5000) - 4000
if t% < 0 then
dx%[i%] = 0
else
dx%[i%] = -1
endif
endif
if x%[i%] < 1 then
t% = rand(5000) - 4000
if t% < 0 then
dx%[i%] = 0
else
dx%[i%] = 1
endif
endif
if y%[i%] > 23 then
t% = rand(5000) - 4000
if t% < 0 then
dy%[i%] = 0
else
dy%[i%] = -1
endif
endif
if y%[i%] < 1 then
t% = rand(5000) - 4000
if t% < 0 then
dy%[i%] = 0
else
dy%[i%] = 1
endif
endif
next
colour 14,1
mcursor 8,11
print " MoonRock demonstration program -- press any key to exit "
colour ?,0
delay(1)
k% = inkey
wend
if k% = 0 then k% = inkey ' eat up extended keypress
colour 7,0
cls
{at}mov ah, 01h
{at}mov cx, 0607h
{at}int 10h
' enable cursor
end(0)
---------------------------------------------------------end BOUNCE.MOO----
---
* Origin: Jelly-Bean software development, Melbourne AUST. (3:635/727.1)SEEN-BY: 50/99 632/103 348 998 633/371 634/384 635/503 513 544 727 638/102 SEEN-BY: 639/252 640/230 690/718 711/401 410 413 430 808 809 934 713/888 SEEN-BY: 800/1 7877/2809 @PATH: 635/727 632/348 635/503 50/99 711/808 809 934 |
|
| SOURCE: echomail via fidonet.ozzmosis.com | |
Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.