亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? fallingblocks.html

?? 一個完整的俄羅斯方塊游戲
?? HTML
字號:
<!--------------------------------------------------------------------------->  
<!--                           INTRODUCTION                                

 The Code Project article submission template (HTML version)

 Using this template will help us post your article sooner. We are using MS 
 IIS and ASP pages on the server, allowing us to simplify the templates used 
 to create the articles.

 To fill in this template, just follow the 3 easy steps below:

   1. Fill in the article description details
   2. Add links to your images and downloads
   3. Include the main article text

 That's all there is to it! All formatting will be done by the ASP script 
 engine.
-->  

<!--------------------------------------------------------------------------->  
<!--                        IGNORE THIS SECTION                            -->
<html>
<head>
<title>The Code Project</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<Style>
BODY, P, TD { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10pt }
H2,H3,H4,H5 { color: #ff9900; font-weight: bold; }
H2 { font-size: 13pt; }
H3 { font-size: 12pt; }
H4 { font-size: 10pt; color: black; }
PRE { BACKGROUND-COLOR: #FBEDBB; FONT-FAMILY: "Courier New", Courier, mono; WHITE-SPACE: pre; }
CODE { COLOR: #990000; FONT-FAMILY: "Courier New", Courier, mono; }
</style>
</head>
<body bgcolor="#FFFFFF" color=#000000>
<!--------------------------------------------------------------------------->  


<!-------------------------------     STEP 1      --------------------------->
<!--  Fill in the details (CodeProject will reformat this section for you) -->

<pre>
Basename:    FallingBlocks
Title:       Falling Blocks
Author:      Xavier John
Email:       xavier_john@yahoo.com
Environment: VC++ 6.0, Windows 2000, Win Me, Direct X 7 or 8
Keywords:    Games, Game, DirectX, Tetris, 
Level:       Intermediate
Description: Falling Blocks is a game like Tetris.
Section      DirectX
SubSection   Games
</pre>


<!-------------------------------     STEP 2      --------------------------->
<!--  Include download and sample image information. All included files    --> 
<!--  should be in /my_cool_code/                                          -->

<li class=download><a href="FallingBlocks/FallingBlocks.zip">Download the game - 50 Kb </a></li>
<li class=download><a href="FallingBlocks/FallingBlocks_src.zip">Download source - 115 Kb</a></li>
<h2>Falling Blocks.</h2>
<p> Falling Blocks is a game similar to Tetris.</p>


<p>The controls for the game are simple. Use the Left arrow and the Right arrow to move the block left or right. Up arrow or R to rotate the block. Down arrow to move the block down faster and the center key (5) to drop the block.<br>
The objective is to get continuous blocks in a row. A row filled with blocks are removed and points are given.</p>

<p><img src="FallingBlocks.gif" alt="Sample Image" ></p>

<p>
Software required to build the project<br>
   1) Visual C++ 6.0<br>
   2) Direct X 8.0 SDK   (Direct X 7.0 SDK should also work but I have not tried it)
</p>
<p>
Software required to run the game <br>
   1) Direct X 7.0 <br>
   2) Windows 2000 or Win 9x
</p>

<!-------------------------------     STEP 3      --------------------------->
<!--  Add the article text. Please use simple formatting (<h2>, <p> etc)   --> 

<p>This code should help you create small games using Direct X. I have sprinkled commends all over the code so it should help you with understanding the code.</p>
<h3>The Code</h3>
<p>The project consists of the following Classes, <br>

 1) <code>CBlockList</code> <br>
 2) <code>CDisplay</code><br>
 3) <code>CFlooredBlocks</code><br>
 4) <code>CShape</code><br>
 5) <code>CSurface</code>
<br><br>
The classes <code>CDisplay</code> and <code>CSurface</code> are created by Microsoft and are shipped along with the Direct X SDK. I developed this game using Direct X 8 SDK. It should work fine with Direct X 7 but I have not tried it. To run the game Direct X 7 is all that is required. You will have to adjust the project setting to reflect your Direct X SDK paths.
<br><Br>
The game creates two shapes when the game starts. One is the shape currently falling and the other is the next shape. When a shape hits the bottom it is added to the Floored Block list and a new Next shape is created.
For each line of blocks removed 10* NumberOfLinesRemoved* NumberOfLinesRemoved * GameSpeed points are given.
<br><br>
Game is over when a shape hits the bottom and some of the blocks are above the grey line. You can start a new game from the menu.
<br><br>
Under the level menu you can select the game speed. If you set the game to crazy mode you will get weird shapes. It is easy to add you own shapes in this game. All you have to do is add the shape to the array and update the array information.
<br><br>
<code>m_pStockShapes</code> array holds the shape definitation.
<pre>
const short CShape::m_pStockShapes[] = { 
	    11,   // No Of shapes in the array
	    2 /*No of orientation shapes */, 4 /*No Of blocks for this shape*/, 
	    2,1, 2,2, 3,2, 3,3,     //  O
	    1,2, 2,2, 2,1, 3,1,     //  OO 
	                            //   O 
	    0,   // Each shape ends with a 0
}
</pre>
<code>SBlock</code> structure holds the block coordinates and the color. 
</p>
<pre>
struct SBlock {
  Short nX,nY,nColor;
};
</pre>
<br>
<code>CBlockList</code> will be the parent class for the <code>CShape</code> class and the <code>CFlooredBlocks</code> class. It contains the methods to maintain the linked list.
<pre>
class CBlockList {
public:
    bool IsOccupied(short nX, short ,nY) ; // Return true if the given location is already occupied
    Bool Insert(Sblock Block);          //Inserts the block based on the value in linked list.
    Bool Add (const Sblock Block) ;     // Adds the block to the end of the list.
    void Display(short nX=0; short nY); // Displays the block on the screen offsetting it by nX and nY.
    bool Delete(Sblock Block);          //Deletes the block from the list.
    void Destroy(); // Empties the linked list.
   
};
</pre>
<p>
The <code>CFlooredBlocks</code> maintains the list of blocks that have been placed on the floor. All the shapes that fall down are added to this list.
</p>
<pre>
class CFlooredBlocks: public CBlockList {
   RECT m_rcBoundary;   // Holds the playing area
public:
   void Display();
   short CheckAndRemoveContinuousBlocks(); // Returns the number of lines removed. 
                                           // This can be used to calculate the score. 
   IncrementYabove(short nY); // Helper function for CheckAndRemoveContinuousBlocks 
                              // used to drop the blocks above the removed line.
   bool IsOccupied(nX,nY);    // Returns true if the coordinates are occupied.
   bool Insert(Sblock Block);
};
</pre>
<p>
<code>CShape</code> class creates the shapes from the given array. It helps with moving the shape and checks if it had gone outside the boundary or hit any other blocks.
</p>
<pre>
class CShape:public CBlockList {
     CFlooredBlocks* m_pFlooredBlocks;
public:
     bool CreateRandShape(); // Creates a shape from the build in shapes at random. 
                            // This function creates the blocks and gives it the color;

     bool MoveTo(x1,y1);  //Moves the shape to the given coordinates.
     bool MoveRight();    // Moves the shape right. Returns true if successful.
     bool MoveLeft();
     bool MoveDown(); // Moves the shape down. 
     bool Rotate();   // Rotates based on the shape.
     Void Display();  // Displays the shape
     Void ConvertToSpaceCoord(); // Converts the internal SBlock to contain the actual 
                                 // coordinates so that it can be added to the floored list.
     bool SetMaxNoOfShapesAllowed(short nMac); // Sets the maximum number of shapes that 
                                               // will be used from the array. This way you 
                                               // can added new shapes to the array and active
                                               // it by changing this value.
};
</pre>

<p>
Look at the code and everything should be self-explanatory. Have fun.<br>
Make games and share your knowledge :)
</p>

<!-------------------------------    That's it!   --------------------------->

</body>
</html>

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
男女男精品视频| 中文字幕电影一区| 一本一本大道香蕉久在线精品| 国产综合久久久久久鬼色 | 亚洲品质自拍视频网站| 久久久久国产精品人| 欧美电影免费观看完整版| 欧美一区二区三区喷汁尤物| 91精品国产综合久久久蜜臀图片| 日本高清免费不卡视频| 9i看片成人免费高清| 日本电影欧美片| 欧美日韩一区 二区 三区 久久精品| 91国在线观看| 欧美体内she精高潮| 欧美日韩精品欧美日韩精品| 在线不卡一区二区| 欧美一区2区视频在线观看| 日韩久久久精品| 国产亚洲短视频| 中文字幕欧美一| 午夜精品视频在线观看| 老司机精品视频一区二区三区| 蜜乳av一区二区| 国产激情偷乱视频一区二区三区| 国产精品一二三四区| 99久久婷婷国产综合精品| 91福利在线导航| 91精品国产色综合久久不卡蜜臀 | 成人免费观看视频| 在线一区二区三区做爰视频网站| 884aa四虎影成人精品一区| 久久久久久久av麻豆果冻| 中文字幕在线一区二区三区| 亚洲综合另类小说| 久久精品99久久久| 色婷婷久久99综合精品jk白丝| 欧美精品一二三四| 国产精品卡一卡二卡三| 午夜视频在线观看一区二区三区 | 97se亚洲国产综合自在线观| 555夜色666亚洲国产免| 国产精品女人毛片| 日韩成人精品在线| 99国产精品久久久久久久久久久| 欧美日本在线播放| 国产精品久久久久一区二区三区 | 亚洲色欲色欲www| 九九国产精品视频| 精品视频一区三区九区| 中文av一区特黄| 久久精品二区亚洲w码| 欧美午夜精品一区二区三区| 欧美国产视频在线| 免费成人在线观看视频| 欧美在线视频你懂得| 国产精品美女久久久久久久久 | 在线精品视频免费播放| 国产日产欧美一区二区视频| 日韩中文欧美在线| www.成人网.com| 久久久不卡网国产精品二区| 日韩高清电影一区| 精品视频一区二区不卡| 亚洲精品乱码久久久久久久久| 国内精品伊人久久久久av影院 | 一本大道av一区二区在线播放| 精品国产91乱码一区二区三区| 偷窥国产亚洲免费视频| 欧美午夜精品一区二区三区| 亚洲色图都市小说| 91啪在线观看| 亚洲综合色视频| 在线中文字幕不卡| 亚洲自拍另类综合| 在线观看日韩高清av| 亚洲午夜久久久久久久久久久| 日本精品一区二区三区高清| 亚洲欧美日韩国产综合| 91精品办公室少妇高潮对白| 一区二区三区四区在线免费观看| 色国产精品一区在线观看| 亚洲精品第1页| 欧美日韩成人在线一区| 久久电影网电视剧免费观看| 欧美一区2区视频在线观看| 日本免费在线视频不卡一不卡二 | 国产成人亚洲综合色影视| 国产婷婷色一区二区三区在线| 国产一区二区三区四区五区入口| 国产亚洲综合av| 暴力调教一区二区三区| 一区二区三区四区国产精品| 91久久免费观看| 精品国产1区二区| 久久99热狠狠色一区二区| 国产欧美一区二区精品忘忧草| 午夜视频在线观看一区二区三区| 欧美一区二区三区视频| 精品综合免费视频观看| 2021国产精品久久精品| 国产一区二区美女诱惑| 久久综合狠狠综合久久激情 | 精品视频1区2区3区| 亚洲成人午夜电影| 日韩欧美一区在线观看| 国产在线乱码一区二区三区| 国产欧美日韩综合| 91在线小视频| 天天综合天天做天天综合| 91精品国产91久久久久久最新毛片 | 午夜在线成人av| 欧美v亚洲v综合ⅴ国产v| 国产盗摄精品一区二区三区在线| 亚洲美女精品一区| 7777精品伊人久久久大香线蕉超级流畅| 亚洲大片在线观看| 亚洲精品一区在线观看| 成人av在线资源| 亚洲一区二区三区中文字幕在线| 欧美巨大另类极品videosbest | 国产亚洲欧美色| 91香蕉视频污| 日本女人一区二区三区| 国产精品日韩成人| 欧美日韩午夜在线视频| 激情文学综合网| 爽好多水快深点欧美视频| 久久久精品欧美丰满| 99久久伊人久久99| 精品制服美女久久| 夜夜嗨av一区二区三区网页| 欧美一区二区女人| 欧美日韩一区二区在线视频| 国产麻豆精品theporn| 一区二区三区在线高清| 精品国产乱子伦一区| 色呦呦一区二区三区| 精品一区二区三区在线观看国产| 亚洲国产欧美另类丝袜| 国产区在线观看成人精品 | 午夜免费欧美电影| 国产精品色在线| 国产视频一区在线观看| 欧美精品在线观看一区二区| 欧美视频你懂的| 91亚洲精品乱码久久久久久蜜桃| 久久精品国产澳门| 日韩国产精品大片| 亚洲成av人综合在线观看| 国产喷白浆一区二区三区| 国产偷国产偷精品高清尤物| 欧美日本韩国一区二区三区视频| 91网页版在线| 成人小视频免费观看| 精品伊人久久久久7777人| 伊人婷婷欧美激情| 亚洲综合区在线| 亚洲卡通欧美制服中文| 亚洲天堂2016| 综合精品久久久| 综合久久一区二区三区| 国产精品夫妻自拍| 天堂蜜桃91精品| 亚洲成人免费视| 亚洲黄网站在线观看| 亚洲美女区一区| 亚洲午夜精品网| 天天综合日日夜夜精品| 视频一区二区欧美| 视频一区在线播放| 日韩av二区在线播放| 国产激情一区二区三区四区| 粉嫩绯色av一区二区在线观看| 成人av在线播放网站| 色综合久久中文字幕综合网| 日本精品裸体写真集在线观看 | 老司机免费视频一区二区三区| 日韩av二区在线播放| 麻豆精品久久久| 国产高清不卡一区二区| 色婷婷亚洲一区二区三区| 欧美吻胸吃奶大尺度电影| 欧美日韩精品一区视频| 欧美久久高跟鞋激| 日韩欧美一二三四区| 日韩欧美国产不卡| 欧美精品18+| 精品成人一区二区三区四区| 国产日韩精品视频一区| **性色生活片久久毛片| 欧美国产日韩a欧美在线观看| 亚洲成人福利片| 精品亚洲欧美一区| 99久久国产免费看| 在线不卡一区二区| 国产精品乱码人人做人人爱| 亚洲一线二线三线久久久| 美日韩一区二区| 国产福利一区二区三区视频在线|