The QBasic Forum      Other Subforums, Links and Downloads
 
 Return to Index  

Animation using a single array code

July 12 2008 at 6:49 PM
ClearAirTurbulence  (no login)
from IP address 92.8.212.84

DECLARE SUB Delay ()
SCREEN 12

DIM SHARED Plr1(1 TO 5424) AS INTEGER
DIM SHARED Plr2(1 TO 5424) AS INTEGER
DIM SHARED Plr3(1 TO 5424) AS INTEGER
DIM SHARED Plr4(1 TO 5424) AS INTEGER
DIM SHARED Plr5(1 TO 5424) AS INTEGER
DIM SHARED Plr6(1 TO 5424) AS INTEGER
DIM SHARED Plr7(1 TO 5424) AS INTEGER
DIM SHARED Plr8(1 TO 5424) AS INTEGER
DIM SHARED Plr9(1 TO 5424) AS INTEGER

DEF SEG = VARSEG(Plr1(1)): BLOAD "run1.bsv", VARPTR(Plr1(1)): DEF SEG
OUT &H3C8, 0: FOR n = 1 TO 48: OUT &H3C9, Plr1(n): NEXT n
DEF SEG = VARSEG(Plr2(1)): BLOAD "run2.bsv", VARPTR(Plr2(1)): DEF SEG
DEF SEG = VARSEG(Plr3(1)): BLOAD "run3.bsv", VARPTR(Plr3(1)): DEF SEG
DEF SEG = VARSEG(Plr4(1)): BLOAD "run4.bsv", VARPTR(Plr4(1)): DEF SEG
DEF SEG = VARSEG(Plr5(1)): BLOAD "run5.bsv", VARPTR(Plr5(1)): DEF SEG
DEF SEG = VARSEG(Plr6(1)): BLOAD "run6.bsv", VARPTR(Plr6(1)): DEF SEG
DEF SEG = VARSEG(Plr7(1)): BLOAD "run7.bsv", VARPTR(Plr7(1)): DEF SEG
DEF SEG = VARSEG(Plr8(1)): BLOAD "run8.bsv", VARPTR(Plr8(1)): DEF SEG
DEF SEG = VARSEG(Plr9(1)): BLOAD "run9.bsv", VARPTR(Plr9(1)): DEF SEG

x = 220
y = 140

DO
PUT (x, y), Plr1(50), PSET: CALL Delay
PUT (x, y), Plr2(50), PSET: CALL Delay
PUT (x, y), Plr3(50), PSET: CALL Delay
PUT (x, y), Plr4(50), PSET: CALL Delay
PUT (x, y), Plr5(50), PSET: CALL Delay
PUT (x, y), Plr6(50), PSET: CALL Delay
PUT (x, y), Plr7(50), PSET: CALL Delay
PUT (x, y), Plr8(50), PSET: CALL Delay
PUT (x, y), Plr9(50), PSET: CALL Delay
LOOP

SUB Delay
OLDTimer = TIMER: DO: LOOP UNTIL TIMER > OLDTimer + .1
END SUB

 
 Respond to this message   
Response TitleAuthor and Date
Solution (View Thread)ClearAirTurbulence on Jul 16

Newbies usually go to www.qbasic.com and click on The QBasic Forum
Forum regulars have their own ways, which include The QBasic Community Forums