home *** CD-ROM | disk | FTP | other *** search
/ CD-ROM Data 2002 May / CD Rom Data Mayıs 2002.iso / Freeware / Blitz Basic / data1.cab / Support / help / samples / parallax / parallax.bb < prev    next >
Encoding:
Text File  |  2002-04-10  |  2.4 KB  |  123 lines

  1. Graphics 640,480
  2.  
  3. mnt1=LoadImage("mnt1.bmp") : HandleImage mnt1,0,0
  4. mnt2=LoadImage("mnt2.bmp") : HandleImage mnt2,0,0
  5. wat1=LoadImage("wat1.bmp") : HandleImage wat1,0,0
  6. wat2=LoadImage("wat2.bmp") : HandleImage wat2,0,0
  7. wat3=LoadImage("wat3.bmp") : HandleImage wat3,0,0
  8. wat4=LoadImage("wat4.bmp") : HandleImage wat4,0,0
  9. wat5=LoadImage("wat5.bmp") : HandleImage wat5,0,0
  10. wat6=LoadImage("wat6.bmp") : HandleImage wat6,0,0
  11. land=LoadImage("land2.bmp") : HandleImage land,0,0
  12.  
  13.  
  14. SetBuffer BackBuffer ()
  15.  
  16. Repeat
  17.     TX=MouseX():TY=MouseY()
  18.     MX=MX+(TX-MX)/4
  19.     MY=MY+(TY-MY)/4
  20.     Color 0,0,119
  21.     Rect 0,0,640,260
  22.     
  23.     animoff=animoff+1 Mod 30
  24.     waveoff%=animoff/5
  25.     
  26.     ypos=260-MY/40
  27.  
  28.     offset=MX/15
  29.     If offset>348 Then offset=offset-348
  30.     xpos=0-offset
  31.     Repeat
  32.     DrawImage mnt1,xpos,ypos
  33.     xpos=xpos+348
  34.     Until xpos>639
  35.     
  36.     ypos=ypos+28
  37.     offset=MX/10
  38.     If offset>336 Then offset=offset-336
  39.     xpos=0-offset
  40.     Repeat
  41.     DrawImage mnt2,xpos,ypos
  42.     xpos=xpos+336
  43.     Until xpos>639
  44.     
  45.     ypos=ypos+36
  46.     offset=MX/8+waveoff*40
  47.     If offset>240 Then offset=offset-240
  48.     xpos=0-offset
  49.     Repeat
  50.     DrawImage wat1,xpos,ypos
  51.     xpos=xpos+240
  52.     Until xpos>639
  53.     
  54.     offset=MX/6+waveoff*44
  55.     If offset>264 Then offset=offset-264
  56.     xpos=0-offset
  57.     ypos=ypos-MY/64+17
  58.     Repeat
  59.     DrawImage wat2,xpos,ypos
  60.     xpos=xpos+264
  61.     Until xpos>639
  62.     
  63.     offset=MX/4+waveoff*48
  64.     If offset>288 Then offset=offset-288
  65.     xpos=0-offset
  66.     ypos=ypos-MY/40+24
  67.     Repeat
  68.     DrawImage wat3,xpos,ypos
  69.     xpos=xpos+288
  70.     Until xpos>639
  71.     
  72.     offset=MX/2+waveoff*52
  73.     If offset>312 Then offset=offset-312
  74.     xpos=0-offset
  75.     ypos=ypos-MY/32+32
  76.     Repeat
  77.     DrawImage wat4,xpos,ypos
  78.     xpos=xpos+312
  79.     Until xpos>639
  80.     
  81.     offset=MX+waveoff*56
  82.     If offset>336 Then offset=offset-336
  83.     xpos=0-offset
  84.     ypos=ypos-MY/24+40
  85.     Repeat
  86.     DrawImage wat5,xpos,ypos
  87.     xpos=xpos+336
  88.     Until xpos>639
  89.     
  90.     offset=MX*1.82
  91.     DrawImage land,0-offset,228-MY/4
  92.     
  93.     offset=MX*2+waveoff*64
  94.     If offset>384 Then offset=offset-384
  95.     xpos=0-offset
  96.     ypos=514-MY/4
  97.     Repeat
  98.     DrawImage wat6,xpos,ypos
  99.     xpos=xpos+384
  100.     Until xpos>639
  101.     
  102.     Color 0,0,0
  103.     Rect 0,419,640,1
  104.  
  105.     Color 30,100,0
  106.     Rect 0,420,640,60
  107.     
  108.     Color 255,255,255
  109.     Rect MX-5,MY,11,1:Rect MX,MY-5,1,11
  110.     
  111.     Color 255,255,0
  112.     Text 320,140,"LOVELY PARALLAX DISPLAY",1,0
  113.     Text 320,170,"Move the mouse around",1,0
  114.     Text 320,190,"ESC to quit",1,0
  115.     
  116.     
  117. ;    Rect 0,ScanLine(),100,1        ; DISPLAY SPEED TEST
  118.                 
  119.     
  120.     Flip
  121. Until KeyDown(1)
  122.  
  123. End