[futurebasic] Re: GWorlds

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : December 1997 : Group Archive : Group : All Groups

From: Laurie Murphy <president@...>
Date: Tue, 30 Dec 1997 12:13:13 +1000
I wrote a simple bit of code to help someone with gworlds. Check out this
code. Ask me any questions you have after you've had a look through it.DIM GWorld&,oldWrld&,oldDev&

DIM GrafPortT,GrafPortL,GrafPortB,GrafPortR

END GLOBALS

WINDOW #1,,(0,0)-(640,480),_dialogPlain

GOSUB "Build GWorld"

DO
  
  CALL SETGWORLD(GWorld&,0)
  COLOR _zwhite
  BOX FILL 0,0 TO 640,480
  
  COLOR _zblack
  BOX FILL RND(640),RND(480) TO RND(640),RND(480)
  
  CALL SETGWORLD(oldWrld&,oldDev&)
  
  CALL COPYBITS(#GWorld&+2,#oldWrld&+2,GrafPortT,GrafPortT,_srccopy,0)
  
  HANDLEEVENTS
  IF INKEY$ = "" THEN programends = 1
UNTIL programends

CALL DISPOSEGWORLD(GWorld&)

END

"Build GWorld"

GrafPortT = 0
GrafPortL = 0
GrafPortB = 480
GrafPortR = 640

CALL GETGWORLD(oldWrld&,oldDev&)
OSErr = FN NEWGWORLD(GWorld&,8,GrafPortT,0,0,0)
RETURN



Victor Osimitz wrote:
> 
> Hi all:
> 
> I don't understand GWorlds. I looked through the handbook (couldn't even
> find anything about them) and read the section in Frank Turovich's book,
> Learning FutureBASIC II: The Toolbox and picked through Matt Beedle's
> animations, but I still dn't understand GWorlds. Can somebody just give
> me a basic introduction; I just need enough information to create a
> simple animation.
> 
> Thanks in advance.
> 
> Victor Osimitz
> Osimitz Solutions
> 
> - perseus1@...
> - victor85@...
> 
> - http://www.geocities.com/Eureka/6153/
> 
> - DownloadTimer II: Calculate download times the easy way!! Send email to
> perseus1@... with a subject of "info-downloadtimer" for more
> information. Version 2.1 is now available!
> 
> - Web Design; contact me for more information
> 
> --
> To unsubscribe, send ANY message to <futurebasic-unsubscribe@...>

-- 
____________________________________________________________________
Laurie Murphy		  president@...

Foxchange Productions http://foxchange.com
____________________________________________________________________