home *** CD-ROM | disk | FTP | other *** search
/ Enigma Amiga Life 109 / EnigmaAmiga109CD.iso / software / sviluppo / purebasic_demo / purebasic / examples / fullversion_sources / chunky.pb < prev    next >
Encoding:
Text File  |  2000-01-27  |  699 b   |  51 lines

  1.  
  2. InitChunky(0)
  3. InitBitMap(0)
  4. InitScreen(0)
  5.  
  6. #Width  = 320
  7. #Height = 200
  8.  
  9. *MyChunky = AllocateChunkyBuffer(0, #Width, #Height)
  10. *MyBitMap.BitMap = AllocateLinearBitMap(0, #Width, 256, 8)
  11.  
  12. DrawingOutput(BitMapRastport())
  13.  
  14. Cls(2) ; Black border :)
  15.  
  16. ChunkyCls(3)
  17.  
  18. for x=0 to 320 step 2
  19.   for y=0 to 180 step 2
  20.     ChunkyPlot(x,y,6)
  21.   next
  22. next
  23.  
  24. Dim Shape1.b(15*15)
  25.  
  26. Shape1(0)  = 3
  27. Shape1(9) = 3
  28. Shape1(99) = 3
  29. Shape1(90)  = 3
  30.  
  31.  
  32. If OpenScreen(0, 320, #Height, 8, 0)
  33.  
  34.   ShowBitMap(0, ScreenID(), 0, 0)
  35.  
  36.   delay(40)
  37.  
  38.   repeat
  39.     a+1
  40.     ChunkyBlock(9, 9, @Shape1(), a, 50)
  41.     ;ChunkyToPlanar(BitMapID(), 0, 200)
  42.     ChunkyToPlanar2(*MyChunky, BitMapID()+40, 1998)
  43.   until a = 25
  44.  
  45. EndIf
  46.  
  47. MouseWait()
  48. End
  49.  
  50.  
  51.