Advertisement
Guest User

Untitled

a guest
Sep 22nd, 2017
147
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. If CommandLine() ="-w" Then
  2.     SCREEN 640,480,32,1
  3. Else
  4.     SCREEN 640,480,32,0
  5. EndIf
  6. ClsColor 32,32,64
  7. ball=MakeImage(32,32)
  8. DrawToImage ball
  9. For i=32 To 19 Step -1
  10.     Color 95-i*2.2, 125-i*3.5, 255-(i-17)*17
  11.     Circle 16-i/4, 16-i/4, i*0.6,1
  12. Next i
  13.     Color 182,182,250
  14.     Circle 12, 12, 8, 1
  15. DrawToScreen
  16. ball2=CloneImage(ball)
  17. ResizeImage ball2, 128,128
  18. ormy=MakeImage(500,500)
  19. info$="4.4 2.7 5.2 1.7 4.8 0.7 3.9 0.6 3.3 1.6 3.5 2.5 4.4 2.8 x x 4.6 1.8 4.4 1.2 4.2 1.2 3.8 1.7 3.9 2.0 4.2 2.0 4.6 1.8 x x 3.0 2.5 3.1 0.3 2.1 0.3 2.2 0.9 2.6 0.8 2.4 2.2 3.0 2.6 x x 1.8 0.4 1.9 2.3 1.1 2.1 0.7 1.3 1.1 0.5 1.8 0.4 x x 1.5 0.9 1.3 0.9 1.1 1.3 1.4 1.8 1.6 1.9 1.5 0.9 x x -0.5 2.5 -0.6 2.4 0.5 2.2 0.6 1.8 0.4 0.9 0.0 0.6 -1.1 1.1 -0.8 1.6 -0.2 1.1 0.0 1.3 0.1 1.7 -0.3 2.0 -0.7 2.0 -0.6 2.4 x x -1.0 2.1 -1.4 2.4 -2.0 2.4 -2.3 1.8 -2.0 0.9 -1.5 0.6 -0.9 1.0 x x -0.8 1.6 -0.9 2.1 x x -1.4 1.9 -1.9 1.9 -1.9 1.7 -1.7 1.3 -1.4 1.2 -1.3 1.5 -1.3 1.9 x x -2.6 2.4 -2.3 2.1 x x -2.0 0.9 -2.2 0.7 -3.0 1.0 -3.1 1.8 -2.7 2.4 x x -2.8 1.7 -2.7 1.2 -2.3 1.0 -2.2 1.4 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.7 1.9 0.6 0.0 x x 0.7 1.0 -0.5 1.1 x x -0.5 2.0 -0.6 0.0 x x -1.1 2.1 -1.2 0.1 -2.5 0.2 x x -1.1 1.1 -2.0 1.2 x x -1.1 2.1 -2.1 2.2 x x 2.8 -0.5 3.2 -2.6 1.6 -2.8 x x 3.0 -1.5 2.1 -1.7 x x 2.8 -0.4 1.6 -0.4 x x 0.8 -2.9 0.6 -0.5 -0.5 -2.9 -0.7 -0.6 x x x x -1.2 -0.5 -2.4 -0.8 -2.8 -2.0 -2.1 -2.8 -1.4 -3.0 -1.1 -0.5 -1.1 -0.5 "
  21. Dim taulu(200,5,1) As Float // x=0, y=1, z=2 sekä screen_x=3, ja screen_y=4
  22. For i=0 To CountWords(info$)
  23.     If GetWord(info$, i+1) <> "x" And i<CountWords(info$)
  24.         taulu(int(i/2), i Mod 2,0) = GetWord(info$, i+1)
  25.     Else
  26.         if i < CountWords(info$) then taulu((i/2), 5,0) = 1
  27.     EndIf
  28. If GetWord(info2$, i+1) <> "x" And i<CountWords(info2$)
  29.         taulu(int(i/2), i Mod 2,1) = GetWord(info2$, i+1)
  30.     Else
  31.         If i<CountWords(info2$) then taulu((i/2), 5,1) = 1
  32.     EndIf
  33. Next i
  34. Dim tex(64,64)
  35. For yx=0 To 64
  36. For xx=0 To 64
  37. tex(xx, yx) = (Abs(Sin(xx*2.9)*Sin(Int((xx / 64))*2.9))*128) + ((Abs(Sin(xx*2.9)*Sin(Int((xx / 64))*2.9))*128)*0.7 Shl 8) + ((Abs(Sin(xx*2.9)*Sin(Int((xx / 64))*2.9))*128)*0.7 Shl 16) + (255 Shl 24)
  38. Next xx
  39. Next yx
  40. font=LoadFont("arial",32)
  41. SetFont font
  42. start=Timer()
  43. bpm# = 161
  44. interval#=60000 / (bpm) // Abs sotkee aika paljon
  45. biisi= PlaySound("material.xm")
  46. phase = 150 // otetaan lagi äänessä huomioon
  47. Repeat
  48.     tahdit = (aika / interval) + 1 // LOL ;)
  49.     aika=Timer()-start+phase
  50.     modi# = Sin( Max(0, aika-1000) / 6 )
  51.  
  52.     beat# =Sin( aika * (360.0/interval) )
  53.     beat3# =Sin( aika * (360.0/(interval*2.0)) )^3.0
  54.     ClsColor 0,0,0
  55.     If tahdit < 34 Then
  56.         Gosub kalat
  57.     ElseIf tahdit => 34 And tahdit < 82  Then
  58.         eka_kerta = 1
  59.         merkit = 196
  60.         Gosub tunnel
  61.     ElseIf tahdit =>82 And tahdit < 114 Then
  62.         Gosub balls
  63.     ElseIf tahdit => 114 And tahdit < 130 Then
  64.         Gosub fill
  65.     ElseIf tahdit => 130 And tahdit < 146 Then
  66.         Gosub fill2
  67.     ElseIf tahdit =>146 And tahdit < 178
  68.         Gosub slowmo
  69.     ElseIf tahdit => 178 And tahdit < 218 Then
  70.         eka_kerta=0
  71.         merkit=47
  72.         id=1
  73.         Gosub tunnel
  74.     ElseIf tahdit => 218 And tahdit < 233
  75.         Color Max(0,255-(Max(0,aika-(218*interval))/3)),Max(0,255-(Max(0,aika-(218*interval))/3)),Max(0,255-(Max(0,aika-(218*interval))/3))
  76.         w# = Max(2, 640 - Max(0,aika-(218*interval))*2)
  77.         h# = Min(3, Max(1, Max(0,Max(0,aika-(218*interval))/2-100)))
  78.         Box 320 -w/2, 240 -h/2, w, h
  79.     ElseIf tahdit => 233
  80.         End
  81.     EndIf
  82.     Color cbWhite
  83. DrawScreen
  84. Forever
  85. kalat:
  86. If aika < 4000 Then ScreenGamma Int(Min(0,-255+aika/12)), Int(Min(0,-255+aika/12)), int(Min(0,-255+aika/12))
  87.     zoom# = int(tahdit/2)+1
  88.     ClsColor 32-Max(0,aika-(32*interval)), Min(100, Abs(Sin(aika / 99+180)*18*(zoom Mod 4))+0), Min((Abs(Sin(aika / 99)*15*(zoom Mod 6))+10), 100)
  89.     For i=1 To 550
  90.         Color (i Mod 128)+34,(i Mod 128)+54,(i Mod 128)+64
  91.         Box (( (Timer()+zoom*100) Shr 3 + i*11.0 ) * i/500 + Cos( (Timer()+zoom*100) / 8 )*49) Mod (640.0) , ((i*104.5*zoom) + Sin( (Timer()+zoom*100) / 8 )*20 ) Mod 480, 6-Sin( (Timer()+zoom*100) / 8+(i Mod 64)/25 )*4-(i/500), 3-Sin( (Timer()+zoom*100) / (7+i/45)+180 )*1, 1
  92.     Next i
  93. Return
  94. fill:
  95. kulma# = WrapAngle(180*Sin(aika/22))
  96.     For yy=0 To 29
  97.         Color Abs((yy-tahdit) Mod 25*2), Abs((yy-tahdit) Mod 29*4)*0.5, ((yy+tahdit) Mod 29*6)*0.5
  98.         Box 0,yy*16,640+Sin(beat)*2,16
  99.     Next yy
  100.     For yx=0 To 640 Step 4
  101.         CopyBox yx, 0, 4, 480, -320 + yx, -240 + int(Sin(yx*5 + aika/8)*(10+Sin(aika/4)*5)), SCREEN(), SCREEN()
  102.     Next yx
  103.     Color cbBlack
  104.     DrawToImage ormy
  105.     Box 0,0,500,500,1
  106.     For i=1 To 34
  107.         x# = 96
  108.         y# = 116
  109.         For u=12 To 36
  110.             DrawImage ball,56+x+Cos(kulma*2+(u Mod 4)*90-(u*Sin(aika/22)*2))*Int(u/4)*(16+beat),56+y+Sin(kulma*2+(u Mod 4)*90-(u*Sin(aika/22)*2))*Int(u/4)*(16+beat)
  111.         Next u
  112.             DrawImage ball2,x+beat,y+beat
  113.     Next i
  114.     DrawToScreen
  115.     For i=0 To 3
  116.         DrawImage ormy,160+Cos(aika/32+I*90)*(150+beat*10), 50 + Sin(aika/32+I*90)*(150+beat*10)
  117.     Next i
  118. Return
  119. fill2:
  120.     ClsColor Max(0,150-16*beat - Max(0,aika-(143*interval))) , Max(0, 150-16*beat- Max(0,aika-(143*interval))), Max(0, 150-16*beat - Max(0,aika-(143*interval))  )
  121.     Color Max(0,128+16*beat- Max(0,aika-(143*interval))), Max(0,64+8*beat- Max(0,aika-(143*interval))), Max(0,64+8*beat- Max(0,aika-(143*interval)))
  122.     For x=0 To 1024 Step 2
  123.             Box ((x Mod 35)*20)+ ((aika/8.0) Mod 40)-40  , ((x / 35)*20)+(sin(aika/14)*120 Mod 40)-80  ,20,20,1
  124.     Next x
  125.     For y=0 To 480 Step 2
  126.         turn# = Sin( (aika Shr 3)+y*2 )*32*Sin(aika/4) * Sin(y+aika Shr 2)
  127.         xplus# = 100 - turn - (Max(0,aika-(143*interval)))/2
  128.         xpos# = 50 + Sin( (aika Shr 2)+y*2 )*32*Sin(aika/4)
  129.         w# = 64  + (beat*10)
  130.         Color  Max(0, Min(168,26+turn*3.5)),Max(0,Min(168,26+turn*3.5)),  Max(0,62+turn*4)
  131.         Box xplus-10, y, w+20, 2
  132.         Color   Max(0,82+turn*4),Max(0,Min(128,36+turn*3.5)), Max(0, Min(128,36+turn*3.5))
  133.         Box xplus-10+150, 480-y, w+20, 2
  134.     Next y
  135.    
  136. Return
  137. slowmo:
  138. If aika < interval*150 Then ScreenGamma Int(Max(0,255-Max(0,aika-interval*145))), Int(Max(0,255-Max(0,aika-interval*145))), Int(Max(0,255-Max(0,aika-interval*145)))
  139.     For x=0 To 63
  140.         h=(Sin(aika/110.0+20)*150) + (x*110) Mod (65-x) + 120
  141.         Color abs(x-h)*0.7, Abs(x-h)*0.7, abs(x-h)
  142.         Box x*20+5, h+100, 20, 200-h ,1
  143.         Color abs(x-h)*0.5, Abs(x-h)*0.5, abs(x-h)
  144.         Box x*10+10, h+110, 10, 200-h ,1
  145.     Next x
  146.     For i=0 To 12
  147.         DrawImage ball, 320+Cos(aika/33)*100+ Cos(aika/12+i*6)*200, 115 + Sin(aika/7+i*6) * 110
  148.         DrawImage ball, 310+Cos(aika/33)*100+ Cos(aika/11+i*6+20)*180, 114 + Sin(aika/5+i*6+20) * 105
  149.     Next i
  150.     MoveScreen((aika / 16)*8)
  151. Return
  152. balls:
  153.     Color 35, 30, 30
  154.     suunta = Min(1, -1 + Max(0, tahdit - 97)*2)
  155.     For ax=0 To 332 Step 2
  156.             Box (((ax Mod 31)*32-((aika/7)*suunta Mod 64  )))-64  , ((ax / 31)*32)-64 -beat*8 ,32,32,1
  157.     Next ax
  158.     For i=0 To 100
  159.         DrawImage ball, 310 - Sin( (aika / 11) + (i+modi*1)*3 )*260 + (Sin(i*25)*40*modi),  275 - (Abs(Sin( (aika / 9) + i*9 ))*((210) - (Sin(i*25)*(42)+ 50*(beat))))
  160.     Next i
  161.     mirror( 298, 1 )
  162. Return
  163. tunnel:
  164.     For i=0 To 100
  165.         Color (Max(48, Min(110, (((400-(aika/10 + i^2) Mod 400 ) / 20.0 ) ^2))))*0.5, (Max(48, Min(110, (((400-(aika/10 + i^2) Mod 400 ) / 20.0 ) ^2))))*0.7, (Max(48, Min(110, (((400-(aika/10 + i^2) Mod 400 ) / 20.0 ) ^2))))*0.9
  166.         Box 320 + Cos((i*244.0+(aika/25.0)+beat*4 Mod 360))*((((400-(aika/10 + i^2+Max(1,beat*5)) Mod 400 ) / 20.0 ) ^2)+i*2), 240 + Sin((i*244.0+(aika/25.0)+beat*4 Mod 360))*((((400-(aika/10 + i^2+Max(1,beat*5)) Mod 400 ) / 20.0 ) ^2)+i*2), (((400-(aika/10 + i^2) Mod 400 ) / 20.0 ) ^2)/29+1, (((400-(aika/10 + i^2) Mod 400 ) / 20.0 ) ^2)/29+1
  167.     Next
  168.     Color 240,240,255
  169.     Lock SCREEN()
  170.     For i=0 To merkit
  171.     // 178 ->
  172.         taulu(i, 3,id) = ( (Cos((Max(0, aika -(16*interval)+kesto)/7))*taulu(i, 0,id) - Sin((Max(0, aika -(16*interval)+kesto)/7))*taulu(i, 0,id)) * 200 / ((Sin((Max(0, aika -(16*interval)+kesto)/7))*taulu(i, 0,id) + Cos((Max(0, aika -(16*interval)+kesto)/7))*taulu(i, 0,id))-(12 + beat*2 - (Max(0,aika-interval*200)/40) )) ) + 320 + (Max(0,(aika - interval*64))/2) * eka_kerta
  173.         taulu(i, 4,id) = ( taulu(i, 1,id) * 200 / ((Sin((Max(0, aika -(16*interval)+kesto)/7))*taulu(i, 0,id) + Cos((Max(0, aika -(16*interval)+kesto)/7))*taulu(i, 0,id))-(12 + beat*2 - (Max(0,aika-interval*200)/40) )) ) + 240
  174.         If i>0
  175.         If taulu(i, 5,id) = 0 And taulu(i-1,5,id) = 0 Then Line taulu(i, 3,id), taulu(i, 4,id), taulu(i-1, 3,id), taulu(i-1, 4,id)
  176.         EndIf
  177.     Next i
  178.     Unlock SCREEN()
  179.     Color cbWhite
  180.     If id=0 Then Text 1390-(aika-interval*42.0)/5.0, 415+beat*4.0, "cce is back with another intro!  just sit back and enjoy it as long as it lasts!"
  181.     If id=1 Then Text 1390-(aika-interval*180.0)/5.0, 415+beat*4.0, "that's all folks! code&sfx by cce, greets fly to Joxi"
  182. Return
  183. Function MoveScreen(seed,spdx=0,spdy=0,q=128)
  184.     pala=300/q
  185.     For i=0 To q
  186.     pituus#=i/100
  187.         addx= Cos( WrapAngle( seed+i*(float(i)/2) ) ) * Max(0, 128-(i)) / 5
  188.         CopyBox 0, i * pala, 640, pala, -320+addx, 270-(i+1) * pala, SCREEN(), SCREEN()
  189.     Next i
  190. EndFunction
  191. Function mirror(start,h)
  192.     For y=0 To start Step 2
  193.             CopyBox 0, start-y, 640, h, -320, (start-240) + y, SCREEN(), SCREEN()
  194.     Next y
  195. EndFunction
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement