Dienstag, 10. Februar 2009

Tetris in Blitzbasic Sourcecode

Tetris Sourcecode in Blitzbasic...

Download Code!

  1. 3FF v1.2 - Harlequin Software 2002 - 2007
  2. Updated version 31 January 2007
  3. Const VERSION$="v1.2"
  4. AppTitle "3FF "+VERSION$
  5. Graphics 320,360,0,2
  6. Const ESCAPE=1, ENTER=28, SPACEBAR=57
  7. Const UPARROW=200, DOWNARROW=208, LEFTARROW=203, RIGHTARROW=205, LEFTCONTROL=29
  8. bit values for action
  9. Const PLAY=$1, QUITTED=$2, REDRAW=$4, LANDED=$8, GAMEOVER=$10, ESCAPED=$20
  10. Const BITSUSED=$3F
  11. Const DRAWN=BITSUSED Xor REDRAW, NOTLANDED=BITSUSED Xor LANDED
  12. Const GAMEOVER_OR_ESCAPED=GAMEOVER Or ESCAPED
  13. Const EMPTYROW=$801, FULLROW=$FFF, FULLVISIBLE=$7FE, HIDDENROW=$7FE
  14. Const EAST=-1, WEST=1, CLOCKWISE=1, ANTICLOCKWISE=-1
  15. East and West are inverted because - oh never mind
  16. Const ADDCOLOUR=True, ERASECOLOUR=False
  17. new for v1.2
  18. Const EMPTYSQUARE=-1
  19. Const SAMENORTH=1, SAMEEAST=2, SAMESOUTH=4, SAMEWEST=8
  20.  
  21. Global currentrow, shifter, rotation, numlines, startrow
  22. Global speed, time, action, score
  23.  
  24. new for v1.2
  25. Global tiles=CreateImage(16,16,112)
  26. Global empty=CreateImage(16,16)
  27.  
  28. Global line1snd=LoadSound("sound\line1.wav")
  29. Global line2snd=LoadSound("sound\line2.wav")
  30. Global line3snd=LoadSound("sound\line3.wav")
  31. Global line4snd=LoadSound("sound\line4.wav")
  32. Global landsnd=LoadSound("sound\land.wav")
  33.  
  34. Dim leveldata(23)
  35. Dim levelpaused(21)
  36. Dim currentbrick(3,3)
  37. Dim nextbrick(3,3)
  38. Dim lines(3)
  39. new for v1.2
  40. Dim colourbrick(15,3)
  41. Dim nextcolourbrick(15,3)
  42. Dim colourlevel(10,21)
  43.  
  44. SeedRnd MilliSecs()
  45. init()
  46. ################################ M A I N   L O O P #############################
  47. Repeat
  48.         draw_title()
  49.         clear_arrays(False)
  50.         draw_next_brick()
  51.         draw_score()
  52.         Flip False
  53.         action=0
  54.         Repeat
  55.                 Delay 1
  56.                 If KeyHit(ENTER) Then action=PLAY
  57.                 If KeyHit(ESCAPE) Then action=QUITTED
  58.         Until action
  59.         If action=PLAY
  60.                 FlushKeys()
  61.                 action=REDRAW
  62.                 speed=1000
  63.                 clear_arrays(True)
  64.                 get_a_brick()
  65.                 get_a_brick() to get "next brick" as well
  66.                 numlines=0
  67.                 draw_score()
  68.                 draw_play_area()
  69.                 time=MilliSecs()
  70.                 Repeat
  71.                         If action And LANDED
  72.                                 get_a_brick()
  73.                                 action=action And NOTLANDED
  74.                         Else
  75.                                 If MilliSecs()-time > speed
  76.                                         move_down()
  77.                                         time=MilliSecs()
  78.                                 Else
  79.                                         If KeyDown(DOWNARROW) And (MilliSecs()-time > 40) delay key-repeat
  80.                                                 move_down()
  81.                                                 time=MilliSecs()
  82.                                         Else
  83.                                                 If KeyHit(LEFTARROW)
  84.                                                         move_brick(WEST)
  85.                                                 Else
  86.                                                         If KeyHit(RIGHTARROW)
  87.                                                                 move_brick(EAST)
  88.                                                         Else
  89.                                                                 If KeyHit(UPARROW)
  90.                                                                         rotate_brick(CLOCKWISE)
  91.                                                                 Else
  92.                                                                         If KeyHit(LEFTCONTROL)
  93.                                                                                 rotate_brick(ANTICLOCKWISE)
  94.                                                                         EndIf
  95.                                                                 EndIf
  96.                                                         EndIf
  97.                                                 EndIf
  98.                                         EndIf
  99.                                 EndIf
  100.                         EndIf
  101.                         If action And REDRAW
  102.                                 If Not(action And LANDED) Then xor_brick(ADDCOLOUR)
  103.                                 Flip False
  104.                                 action=action And DRAWN
  105.                         Else
  106.                                 Delay 1 keep cpu usage down
  107.                         EndIf
  108.                         If KeyHit(SPACEBAR) Then pause()
  109.                         If KeyHit(ESCAPE) Then action=action Or ESCAPED
  110.                 Until action And GAMEOVER_OR_ESCAPED
  111.                 If action And GAMEOVER Then game_over_man()
  112.                 clear_arrays(False)
  113.         EndIf
  114. Until action = QUITTED
  115. End
  116. #############################################################
  117. Function clear_arrays(clearlevel)
  118. Local rownumber, row, column
  119.         If clearlevel
  120.                 For rownumber=0 To 21
  121.                         leveldata(rownumber)=EMPTYROW
  122.                 Next
  123.                 leveldata(22)=HIDDENROW
  124.                 For row=2 To 21
  125.                         For column=0 To 9
  126.                                 colourlevel(column,row)=EMPTYSQUARE
  127.                         Next
  128.                 Next
  129.         EndIf
  130.         For rownumber=0 To 3
  131.                 For rotation=0 To 15
  132.                         nextcolourbrick(rotation,rownumber)=EMPTYSQUARE
  133.                 Next
  134.         Next
  135. Return
  136. End Function
  137. -----------------------------------
  138. Function collided(xadd)
  139. Local x, y, collision=False
  140.         shifter=shifter + xadd
  141.         If shifter>-1           shifting left or right?
  142.                 For y=currentrow To currentrow+3
  143.                         If (currentbrick(rotation,y-currentrow) Shl shifter) And leveldata(y) Then collision=True
  144.                 Next
  145.         Else
  146.                 For y=currentrow To currentrow+3
  147.                         If (currentbrick(rotation,y-currentrow) Shr (shifter*-1)) And leveldata(y) Then collision=True 
  148.                 Next
  149.         EndIf
  150.         If collision Then shifter=shifter + (xadd * -1)
  151. Return collision
  152. End Function
  153. -----------------------------------
  154. Function draw_next_brick()
  155. Local x, y
  156.         For yloop=0 To 3 show next brick
  157.                 For square=0 To 3
  158.                         If nextcolourbrick(square,yloop) > EMPTYSQUARE
  159.                                 DrawBlock tiles,220+(square Shl 4),20+(yloop Shl 4),nextcolourbrick(square,yloop)
  160.                         Else
  161.                                 DrawBlock empty,220+(square Shl 4),20+(yloop Shl 4)
  162.                         EndIf
  163.                 Next
  164.         Next
  165.         action=action Or REDRAW
  166. Return
  167. End Function
  168. -----------------------------------
  169. Function draw_play_area()
  170. Local row, column
  171.         For row=2 To 21 draw the current level data to the screen
  172.                 For column=0 To 9
  173.                         If colourlevel(column,row) > EMPTYSQUARE
  174.                                 DrawBlock tiles,32+(column Shl 4),(row-2) Shl 4,colourlevel(column,row)
  175.                         Else
  176.                                 DrawBlock empty,32+(column Shl 4),(row-2) Shl 4
  177.                         EndIf
  178.                 Next
  179.         Next
  180. Return
  181. End Function
  182. -----------------------------------
  183. Function draw_score()
  184. Local x
  185.         For x=0 To 3
  186.                 DrawBlock empty,220+(x Shl 4),112
  187.         Next
  188.         For x=0 To 3
  189.                 DrawBlock empty,220+(x Shl 4),162
  190.         Next
  191.         Text 222,113,numlines
  192.         Text 222,163,score
  193. Return
  194. End Function
  195. -----------------------------------
  196. Function draw_title()
  197. Local row, column, tilenumber
  198.         Restore title3ff
  199.         For row=2 To 21
  200.                 Read tilenumber
  201.                 For column=0 To 9
  202.                         If tilenumber
  203.                                 Read colourlevel(column,row)
  204.                         Else
  205.                                 colourlevel(column,row)=EMPTYSQUARE
  206.                         EndIf
  207.                 Next
  208.         Next
  209.         draw_play_area()
  210.         Text 112,192,"Harlequin Software",True
  211.         Text 112,208,VERSION$,True
  212. Return
  213. End Function
  214. -----------------------------------
  215. Function game_over_man()
  216. Local x,y, rgb, r, g, b
  217.         xor_colour(True)
  218.         LockBuffer BackBuffer()
  219.         For y=136 To 167
  220.                 For x=48 To 175
  221.                         rgb=ReadPixelFast(x,y) And $FFFFFF
  222.                         r=rgb Shr 16
  223.                         g=(rgb Shr <img src="/templates/default/img/emoticons/cool.png" alt="8-)" style="display: inline vertical-align: bottom" class="emoticon" /> And $FF
  224.                         b=rgb And $FF
  225.                         r=r Shr 1
  226.                         g=g Shr 1
  227.                         b=b Shr 1
  228.                         WritePixelFast x,y,(r Shl 16) Or (g Shl <img src="/templates/default/img/emoticons/cool.png" alt="8-)" style="display: inline vertical-align: bottom" class="emoticon" /> Or b
  229.                 Next
  230.         Next
  231.         UnlockBuffer BackBuffer()
  232.         Text 112,146,"GAME OVER!",True
  233.         Rect 47,135,130,34,False
  234.         Flip False
  235.         Repeat
  236.                 Delay 1
  237.         Until KeyHit(ENTER) Or KeyHit(ESCAPE)
  238.         FlushKeys()
  239. Return
  240. End Function
  241. -----------------------------------
  242. Function get_a_brick()
  243. Local randbrick, rownumber
  244.         currentrow=startrow     startrow is next brick's start row
  245.         randbrick=Rand(0,6)
  246.         Select randbrick
  247.                 Case 0 Restore column
  248.                 Case 1 Restore L
  249.                 Case 2 Restore r
  250.                 Case 3 Restore cube
  251.                 Case 4 Restore T
  252.                 Case 5 Restore Z
  253.                 Case 6 Restore S
  254.         End Select
  255.         startrow=(randbrick > 2)
  256.         startrow depends on height of brick
  257.         For rownumber=0 To 3
  258.                 For rotation=0 To 3
  259.                         currentbrick(rotation,rownumber)=nextbrick(rotation,rownumber)
  260.                         Read nextbrick(rotation,rownumber)
  261.                 Next
  262.         Next
  263.         For rownumber=0 To 3
  264.                 For rotation=0 To 15
  265.                         colourbrick(rotation,rownumber)=nextcolourbrick(rotation,rownumber)
  266.                         Read nextcolourbrick(rotation,rownumber)
  267.                 Next
  268.         Next
  269.         rotation=0
  270.         shifter=0
  271.         If collided(0) Then action=action Or GAMEOVER Else draw_next_brick()
  272. Return
  273. End Function
  274. -----------------------------------
  275. Function init()
  276. Local tilenumber, i, x, y, w, help$, error, r, g, b, highlight
  277.         SetBuffer ImageBuffer(empty)
  278.         ClsColor 32,32,32
  279.         Cls
  280.         Color 64,64,64
  281.         Text 3,1,"0"
  282.         Restore brickcolours
  283.         For bricknum=0 To 6
  284.                 Read r,g,b
  285.                 For tilenumber=0 To 15
  286.                         SetBuffer ImageBuffer(tiles,tilenumber+(bricknum Shl 4))
  287.                         ClsColor r,g,b
  288.                         Cls
  289.                 Next
  290.                 lowlights
  291.                 For tilenumber=0 To 15
  292.                         SetBuffer ImageBuffer(tiles,tilenumber+(bricknum Shl 4))
  293.                         Color r Shr 1, g Shr 1, b Shr 1
  294.                         If Not(tilenumber And <img src="/templates/default/img/emoticons/cool.png" alt="8-)" style="display: inline vertical-align: bottom" class="emoticon" /> Then Line 0,0,0,15
  295.                         If Not(tilenumber And 4) Then Line 0,15,15,15
  296.                 Next
  297.                 r=r Shl 1
  298.                 If r>255 Then r=255
  299.                 g=g Shl 1
  300.                 If g>255 Then g=255
  301.                 b=b Shl 1
  302.                 If b>255 Then b=255
  303.                 hightlights
  304.                 For tilenumber=0 To 15
  305.                         SetBuffer ImageBuffer(tiles,tilenumber+(bricknum Shl 4))
  306.                         Color r,g,b
  307.                         Text 3,1,bricknum+1
  308.                         If Not(tilenumber And 1) Then Line 0,0,15,0
  309.                         If Not(tilenumber And 2) Then Line 15,0,15,15
  310.                 Next
  311.         Next
  312.         SetBuffer BackBuffer()
  313.         Color 192,164,0
  314.         For y=0 To 5
  315.                 Read help$
  316.                 Text 210,188+(26 * y),help$
  317.         Next
  318.         Color 128,96,0
  319.         For y=0 To 5
  320.                 Read help$
  321.                 Text 220,201+(26 * y),help$
  322.         Next
  323.         Color 255,255,255
  324.         Text 220,90,"Lines:"
  325.         Text 220,140,"Score:"
  326. Return
  327. End Function
  328. -----------------------------------
  329. Function join_bricks()
  330. Local row, column, firsttile, adjacents
  331. this function originaly checked all 20 rows (2-21) - but only a maximum 6 rows can be affected by any given brick
  332. unfortunately, that means I now have to test that the row number isn't less than 2, or greater than 21 - but
  333. it's a small overhead considering we are no longer checking all 20 rows of the play area.
  334.         For row=currentrow-1 To currentrow+4
  335.                 If row > 1      would cause array index out of bounds if at top of level if less than 2
  336.                         If leveldata(row) And FULLVISIBLE
  337.                                 For column=0 To 9
  338.                                         adjacents=0
  339.                                         If row<22       hidden row off bottom - don't check it
  340.                                                 If colourlevel(column,row) > EMPTYSQUARE
  341.                                                         firsttile=(colourlevel(column,row) And $F0) first tile of that colour
  342.                                                         If column > 0
  343.                                                                 If colourlevel(column-1,row) > EMPTYSQUARE
  344.                                                                         If (colourlevel(column-1,row) And $F0)=firsttile Then adjacents=SAMEWEST
  345.                                                                 EndIf
  346.                                                         EndIf
  347.                                                         If column < 9
  348.                                                                 If colourlevel(column+1,row) > EMPTYSQUARE
  349.                                                                         If (colourlevel(column+1,row) And $F0)=firsttile Then adjacents=adjacents Or SAMEEAST
  350.                                                                 EndIf
  351.                                                         EndIf
  352.                                                         If row < 21
  353.                                                                 If colourlevel(column,row+1) > EMPTYSQUARE
  354.                                                                         If (colourlevel(column,row+1) And $F0)=firsttile Then adjacents=adjacents Or SAMESOUTH
  355.                                                                 EndIf
  356.                                                         EndIf
  357.                                                         If colourlevel(column,row-1) > EMPTYSQUARE
  358.                                                                 If (colourlevel(column,row-1) And $F0)=firsttile Then adjacents=adjacents Or SAMENORTH
  359.                                                         EndIf
  360.                                                         colourlevel(column,row)=firsttile+adjacents
  361.                                                 EndIf
  362.                                         EndIf
  363.                                 Next
  364.                         EndIf
  365.                 EndIf
  366.         Next
  367. Return
  368. End Function
  369. -----------------------------------
  370. Function move_brick(xadd)
  371.         xor_brick(ERASECOLOUR)
  372.         If collided(xadd)
  373.                 xor_brick(ADDCOLOUR)
  374.         Else
  375.                 action=action Or REDRAW
  376.         EndIf
  377. Return
  378. End Function
  379. -----------------------------------
  380. Function move_down()
  381. Local newlines, rownumber, column, row, emptyrows, n, square
  382.         xor_brick(ERASECOLOUR)
  383.         currentrow=currentrow+1
  384.         If collided(0)
  385.                 newlines=0
  386.                 action=action Or LANDED
  387.                 currentrow=currentrow-1
  388.                 xor_brick(ADDCOLOUR)
  389.                 For row=0 To 3
  390.                         For column=0 To 3
  391.                                 If colourbrick((rotation Shl 2)+column,row) > EMPTYSQUARE
  392.                                         colourlevel(column+3-shifter,currentrow+row)=colourbrick((rotation Shl 2)+column,row)
  393.                                 EndIf
  394.                         Next
  395.                 Next
  396.                 For rownumber=currentrow To currentrow+3
  397.                         If leveldata(rownumber)=FULLROW
  398.                                 newlines=newlines+1
  399.                                 lines(rownumber-currentrow)=rownumber
  400.                                 currentbrick(rotation,rownumber-currentrow)=0
  401.                                 leveldata(rownumber)=EMPTYROW
  402.                         EndIf
  403.                 Next
  404.                 If newlines
  405.                         score=score+(newlines*10) + (((newlines-1)*0.5)*(newlines*10))
  406.                         Select newlines
  407.                                 Case 1 PlaySound(line1snd)
  408.                                 Case 2 PlaySound(line2snd)
  409.                                 Case 3 PlaySound(line3snd)
  410.                                 Case 4 PlaySound(line4snd)
  411.                         End Select
  412.                         For column=0 To 9
  413.                                 For row=0 To 3
  414.                                         If lines(row)
  415.                                                 For square=0 To 9-column
  416.                                                         If lines(row) And 1
  417.                                                                 If column=9
  418.                                                                         colourlevel(0,lines(row))=EMPTYSQUARE
  419.                                                                 Else
  420.                                                                         If square=9
  421.                                                                                 colourlevel(9,lines(row))=EMPTYSQUARE
  422.                                                                         Else
  423.                                                                                 colourlevel(square,lines(row))=colourlevel(square+1,lines(row))
  424.                                                                         EndIf
  425.                                                                 EndIf
  426.                                                         Else
  427.                                                                 If column=9
  428.                                                                         colourlevel(9,lines(row))=EMPTYSQUARE
  429.                                                                 Else
  430.                                                                         If square=9
  431.                                                                                 colourlevel(0,lines(row))=EMPTYSQUARE
  432.                                                                         Else
  433.                                                                                 colourlevel(9-square,lines(row))=colourlevel(8-square,lines(row))
  434.                                                                         EndIf
  435.                                                                 EndIf
  436.                                                         EndIf
  437.                                                 Next
  438.                                         EndIf
  439.                                 Next
  440.                                 join_bricks()
  441.                                 draw_play_area()
  442.                                 Delay 30: Flip False
  443.                         Next
  444.                         Delay 50
  445.                         For row=0 To 3
  446.                                 lines(row)=0
  447.                         Next
  448.                         For column=0 To newlines
  449.                                 For row=currentrow+3 To 1 Step-1
  450.                                         If leveldata(row)=EMPTYROW And leveldata(row-1)>EMPTYROW
  451.                                                 leveldata(row)=leveldata(row-1)
  452.                                                 leveldata(row-1)=EMPTYROW
  453.                                                 For square=0 To 9
  454.                                                         colourlevel(square,row)=colourlevel(square,row-1)
  455.                                                         colourlevel(square,row-1)=EMPTYSQUARE
  456.                                                 Next
  457.                                         EndIf
  458.                                 Next
  459.                                 draw_play_area()
  460.                                 Delay 30: Flip False
  461.                         Next
  462.                         n=numlines+newlines
  463.                         If (n -(n Mod 10)) > (numlines-(numlines Mod 10)) Then speed=speed-(speed * 0.1)
  464.                         speed + 10% every 10 lines
  465.                         numlines=numlines+newlines
  466.                         draw_score()
  467.                 Else
  468.                         PlaySound(landsnd)
  469.                 EndIf
  470.                 join_bricks()
  471.                 draw_play_area()
  472.                 Flip False
  473.         Else
  474.                 action=action Or REDRAW
  475.         EndIf
  476. Return
  477. End Function
  478. -----------------------------------
  479. Function pause()
  480. Local oldtime, x, y
  481.         oldtime=MilliSecs()-time
  482.         For y=0 To 19
  483.                 For x=2 To 11
  484.                         DrawBlock empty,x Shl 4,y Shl 4
  485.                 Next
  486.         Next
  487.         Text(112,147,"PAUSED",True)
  488.         Flip False
  489.         Repeat
  490.                 Delay 1
  491.                 If KeyHit(ESCAPE) Then action=action Or ESCAPED
  492.         Until KeyHit(SPACEBAR) Or (action And ESCAPED)
  493.         FlushKeys()
  494.         If Not(action And ESCAPED)
  495.                 draw_play_area()
  496.                 draw_next_brick()
  497.                 xor_colour(ADDCOLOUR)
  498.                 Flip False
  499.                 action=action And DRAWN
  500.                 time=MilliSecs()-oldtime
  501.         EndIf
  502. Return
  503. End Function
  504. -----------------------------------
  505. Function rotate_brick(modifier)
  506. Local oldrotation
  507.         xor_brick(ERASECOLOUR)
  508.         oldrotation=rotation
  509.         rotation=rotation + modifier
  510.         If rotation > 3 Then rotation=0 ElseIf rotation < 0 Then rotation=3
  511.         If collided(0)
  512.                 If shift_collided()
  513.                         rotation=oldrotation
  514.                         xor_brick(ADDCOLOUR)
  515.                 Else
  516.                         action=action Or REDRAW
  517.                 EndIf
  518.         Else
  519.                 action=action Or REDRAW
  520.         EndIf
  521. Return
  522. End Function
  523. -----------------------------------
  524. Function shift_collided()
  525. rotation caused a collision - can we shift brick sideways?
  526.         If collided(-1)
  527.                 If collided(1)
  528.                         If collided(-2)
  529.                                 Return collided(2)
  530.                         EndIf
  531.                 EndIf
  532.         EndIf
  533. Return False
  534. End Function
  535. -----------------------------------
  536. Function xor_brick(drawcolour)
  537. Local y
  538.         xor_colour(drawcolour)
  539.         If shifter>-1
  540.                 For y=currentrow To currentrow+3
  541.                         leveldata(y) = (leveldata(y)) Xor currentbrick(rotation,y-currentrow) Shl shifter
  542.                 Next
  543.         Else
  544.                 For y=currentrow To currentrow+3
  545.                         leveldata(y) = (leveldata(y)) Xor currentbrick(rotation,y-currentrow) Shr (shifter*-1)
  546.                 Next
  547.         EndIf
  548. Return
  549. End Function
  550. -----------------------------------
  551. Function xor_colour(draw)
  552. Local row, column
  553.         For row=0 To 3
  554.                 For column=0 To 3
  555.                         If colourbrick((rotation Shl 2)+column,row) > EMPTYSQUARE
  556.                                 If draw
  557.                                         DrawBlock tiles,80+(shifter * -16)+(column Shl 4),(currentrow+row-2) Shl 4,colourbrick((rotation Shl 2)+column,row)
  558.                                 Else
  559.                                         DrawBlock empty,80+(shifter * -16)+(column Shl 4),(currentrow+row-2) Shl 4
  560.                                 EndIf
  561.                         EndIf
  562.                 Next
  563.         Next
  564. Return
  565. End Function
  566. -----------------------------------
  567. .brickcolours
  568. Data 88,80,192          blue
  569. Data 220,174,132        tan
  570. Data 108,162,196        light blue
  571. Data 145,98,200         lilac
  572. Data 140,166,100        green
  573. Data 188,186,4          yellow
  574. Data 156,94,92          terracotta
  575. Data "Play:","Move:","Rotate right:","Rotate left:","Pause:","Quit:"
  576. Data "Enter","Cursor keys","Up-arrow","L-Ctrl","Spacebar","Escape"
  577. .title3ff
  578. Data 0,0
  579. Data 1,$2,$A,$A,$A,$A,$A,$A,$A,$A,$8                    RULE
  580. Data 0
  581. Data 1,-1, $32,$3C, -1,$36,$38, -1,$36,$38,-1   3FF
  582. Data 1,-1, -1,$35,  -1,$35,-1,  -1,$35,-1, -1
  583. Data 1,-1, $32,$3D, -1,$37,$38, -1,$37,$38,-1
  584. Data 1,-1, -1,$35,  -1,$35,-1,  -1,$35,-1,-1
  585. Data 1,-1, $32,$39, -1,$31,-1,  -1,$31,-1,-1
  586. Data 0
  587. Data 1,$2,$A,$A,$A,$A,$A,$A,$A,$A,$8                    RULE
  588. Data 0,0,0,0,0,0,0,0,0
  589. brickpatterns
  590. .column
  591. binary brick
  592. Data $40,$00,$40,$00, $40,$00,$40,$00, $40,$F0,$40,$F0, $40,$00,$40,$00
  593. colour brick
  594. Data -1,$4,-1,-1, -1,-1,-1,-1, -1,$4,-1,-1, -1,-1,-1,-1
  595. Data -1,$5,-1,-1, -1,-1,-1,-1, -1,$5,-1,-1, -1,-1,-1,-1
  596. Data -1,$5,-1,-1, $2,$A,$A,$8, -1,$5,-1,-1, $2,$A,$A,$8
  597. Data -1,$1,-1,-1, -1,-1,-1,-1, -1,$1,-1,-1, -1,-1,-1,-1
  598. .T
  599. binary brick
  600. Data $00,$00,$00,$00, $40,$40,$00,$40, $E0,$60,$E0,$C0, $00,$40,$40,$40
  601. colour brick
  602. Data -1,-1,-1,-1,    -1,-1,-1,-1,   -1,-1,-1,-1,    -1,-1,-1,-1
  603. Data -1,$44,-1,-1,   -1,$44,-1,-1,  -1,-1,-1,-1,    -1,$44,-1,-1
  604. Data $42,$4B,$48,-1, -1,$47,$48,-1, $42,$4E,$48,-1, $42,$4D,-1,-1
  605. Data -1,-1,-1,-1,    -1,$41,-1,-1,  -1,$41,-1,-1,   -1,$41,-1,-1
  606. .cube
  607. binary brick
  608. Data $00,$00,$00,$00, $60,$60,$60,$60, $60,$60,$60,$60, $00,$00,$00,$00
  609. colour brick
  610. Data -1,-1,-1,-1,   -1,-1,-1,-1,   -1,-1,-1,-1,   -1,-1,-1,-1
  611. Data -1,$36,$3C,-1, -1,$36,$3C,-1, -1,$36,$3C,-1, -1,$36,$3C,-1
  612. Data -1,$33,$39,-1, -1,$33,$39,-1, -1,$33,$39,-1, -1,$33,$39,-1
  613. Data -1,-1,-1,-1,   -1,-1,-1,-1,   -1,-1,-1,-1,   -1,-1,-1,-1
  614. .r
  615. binary brick
  616. Data $00,$00,$00,$00,$20,$40,$30,$00,$20,$70,$20,$70,$60,$00,$20,$10
  617. colour brick
  618. Data -1,-1,-1,-1,   -1,-1,-1,-1,    -1,-1,-1,-1,   -1,-1,-1,-1
  619. Data -1,-1,$24,-1,  -1,$24,-1,-1,   -1,-1,$26,$28, -1,-1,-1,-1
  620. Data -1,-1,$25,-1,  -1,$23,$2A,$28, -1,-1,$25,-1,  -1,$22,$2A,$2C
  621. Data -1,$22,$29,-1, -1,-1,-1,-1,    -1,-1,$21,-1,  -1,-1,-1,$21
  622. .L
  623. binary brick
  624. Data $00,$00,$00,$00,$40,$00,$C0,$20,$40,$E0,$40,$E0,$60,$80,$40,$00
  625. colour brick
  626. Data -1,-1,-1,-1,   -1,-1,-1,-1,    -1,-1,-1,-1,   -1,-1,-1,-1
  627. Data -1,$14,-1,-1,  -1,-1,-1,-1,    $12,$1C,-1,-1, -1,-1,$14,-1
  628. Data -1,$15,-1,-1,  $16,$1A,$18,-1, -1,$15,-1,-1,  $12,$1A,$19,-1
  629. Data -1,$13,$18,-1, $11,-1,-1,-1,   -1,$11,-1,-1,  -1,-1,-1,-1
  630. .Z
  631. binary brick
  632. Data $00,$00,$00,$00, $C0,$20,$C0,$20, $60,$60,$60,$60, $00,$40,$00,$40
  633. colour brick
  634. Data -1,-1,-1,-1,   -1,-1,-1,-1,   -1,-1,-1,-1,   -1,-1,-1,-1
  635. Data $52,$5C,-1,-1, -1,-1,$54,-1,  $52,$5C,-1,-1, -1,-1,$54,-1
  636. Data -1,$53,$58,-1, -1,$56,$59,-1, -1,$53,$58,-1, -1,$56,$59,-1
  637. Data -1,-1,-1,-1,   -1,$51,-1,-1,  -1,-1,-1,-1,   -1,$51,-1,-1
  638. .S
  639. binary brick
  640. Data $00,$00,$00,$00, $60,$40,$60,$40, $C0,$60,$C0,$60, $00,$20,$00,$20
  641. colour brick
  642. Data -1,-1,-1,-1,   -1,-1,-1,-1,    -1,-1,-1,-1,   -1,-1,-1,-1
  643. Data -1,$66,$68,-1, -1,$64,-1,-1,   -1,$66,$68,-1, -1,$64,-1,-1
  644. Data $62,$69,-1,-1, -1,$63,$6C,-1,  $62,$69,-1,-1, -1,$63,$6C,-1
  645. Data -1,-1,-1,-1,   -1,-1,$61,-1,   -1,-1,-1,-1,   -1,-1,$61,-1
Bewertung: keine, 0 Stimme(n) 1411 Klicks
Blitzbasic, Games, Sourcecode, Tetris
Von Mr.Foo in Games am 10.02.09@15:07 Uhr

Trackbacks
Trackback für spezifische URI dieses Eintrags

Keine Trackbacks

0 Kommentare
Ansicht der Kommentare: (Linear | Verschachtelt)

Noch keine Kommentare


Kommentar schreiben

Umschließende Sterne heben ein Wort hervor (*wort*), per _wort_ kann ein Wort unterstrichen werden.
Standard-Text Smilies wie :-) und ;-) werden zu Bildern konvertiert.
Die angegebene E-Mail-Adresse wird nicht dargestellt, sondern nur für eventuelle Benachrichtigungen verwendet.
Sie können [geshi lang=LANG][/lang] Tags verwenden um Quellcode abhängig von der gewählten Programmiersprache einzubinden
 
 

Mr. Foo

Tetris in Blitzbasic Sourcecode

  • Homepage

Suche

Kategorien

  • Android (2)
  • C-Sharp (4)
  • Datenbank (30)
  • Delphi (2)
  • Entwicklung (36)
  • Flash (5)
  • Games (10)
  • Gutscheine (4)
  • Hardware (14)
  • HTML CSS (16)
  • Internet (88)
  • Java (32)
  • Javascript (24)
  • Linkdump (9)
  • Linux (102)
  • Low-Level (10)
  • Lua (8)
  • Musik (9)
  • Netzwerk (25)
  • New World Order (109)
  • Perl (3)
  • PHP (130)
  • Magento (5)
  • Symfony (3)
  • Zend Framework (7)
  • Probleme und Lösungen (26)
  • Python (22)
  • Ressourcen (23)
  • Sicherheit (91)
  • Software (60)
  • Sonstiges (47)
  • Own Stuff (48)
  • Spass (46)
  • Technik / Wissenschaft (4)
  • Tips (15)
  • Weisheiten (17)
  • Windows (23)
  • Wort des Tages (15)


Alle Kategorien

Archive

  • Mai 2012
  • April 2012
  • März 2012
  • Das Neueste ...
  • Älteres ...

Abonnieren lohnt sich!

  • XML RSS 2.0 feed
  • ATOM/XML ATOM 1.0 feed
  • XML RSS 2.0 Kommentare

Tagcloud

Datenbank Entwicklung Internet Java Javascript Linux Lösung Netzwerk News New World Order PHP Problem Probleme und Lösungen Sicherheit Software Sonstiges Spass Tipp Update Windows

Beliebte Einträge

  • Magento ist scheisse (197)
  • Plugin-container.exe deaktivieren (107)
  • BWin Betrug und Abzocke bei Minigames? (65)
  • C compiler cannot create executables unter Debian (53)
  • Scheiss Linux - USB-Platte viel zu langsam (wenns mal funktioniert) (43)
  • Sicheres Kontaktformular mit PHP - Spam verhindern (37)
  • UML-Diagramme aus Java-Klassen generieren – Java2UML (28)
  • Es konnte keine TCP/IP-Verbindung mit dem Host hergestellt werden (28)
  • Option Bug im Internet Explorer bei Nutzung von innerHTML und Javascript (24)
  • Zend Studio - Javaw.exe lastet die CPU aus (24)

Kommentare

Hugo zu BWin Betrug und Abzocke bei Minigames?
So, 20.05.2012 12:25
ich habe mich gestern auf BWIN reg [...]
Ubuntu 12.04 zu The assembly mscorlib.dll was not found or could not be loaded.
Fr, 18.05.2012 17:11
Hat bei mir leider nicht geklappt. [...]
Oliver Riske zu Es konnte keine TCP/IP-Verbindung mit dem Host hergestellt werden
Di, 15.05.2012 20:38
Super Danke!
anon zu BWin Betrug und Abzocke bei Minigames?
Sa, 05.05.2012 18:43
ihr scheiss betrüger
Jürgen zu Unable to elevate error:1814 VLC Problem
Mi, 02.05.2012 16:54
So einfach ist es bei mir jedenfal [...]
 

Kontakt/Informationen