?? map.h
字號:
#ifndef _MAP_H
#define _MAP_H
/********************************************************************
文件名: MAP.h
Copyright (c)2004 紅孩兒工作室
創(chuàng)建人 : 卞安
創(chuàng)建時(shí)間: 2004-5-18 12:33:30
版本: 1.0
類名: CMAP
說明:
地圖數(shù)據(jù)類
********************************************************************/
#include "ELSTILE.h"
#include "Cuboid.h"
#include "ELSTILE.h"
#include "2DSOUND.h"
//---------------------------------------------------------------
class CMAP
{
CCuboid *m_tile[9];//格子
CELSTILE *m_thistile;//當(dāng)前方塊組合
CELSTILE *m_lasttile;//下一個(gè)方塊組合
CELSTILE m_testtile;//測試轉(zhuǎn)動方塊組合
int m_x;//tile的格子X位置
int m_y;//tile的格子Y位置
float m_fy;//Y位置的浮點(diǎn)數(shù)
int m_type;
LPDIRECT3DDEVICE8 m_pD3DDevice;
HWND m_hWnd;
C2DSOUND *m_sound;//---聲音------
C2DSOUND *m_sound2;//---聲音------
public:
bool m_IsshowNext;//是否顯示下一個(gè)方塊
bool m_cancon;
int xiaorownum;//消行數(shù)量
bool m_addrow;//是否給對方加行數(shù)
int m_nowrow;//現(xiàn)在的行數(shù)
bool m_finish;//是否結(jié)束
bool m_Isdown;//是否在下落
long m_score;//分?jǐn)?shù)
int m_level;//級別
int g_level;//原設(shè)定級別
int m_speed;//速度
int m_map[20][10];
/** 成員函數(shù).
* 初始化
*/
CMAP();
~CMAP();
bool init(int _type,int _level,int _row,bool _shownext,LPDIRECT3DDEVICE8 pD3DDevice,HWND _hWnd,C2DSOUND *_sound,C2DSOUND *_sound2);
void Render();
/** 成員函數(shù).
* 清空容器
*/
void CleanMap();
/** 成員函數(shù).
* 隨機(jī)生成地圖
*\param _row為行數(shù)
*/
void RandMap(int _row);
/** 成員函數(shù).
* 使行數(shù)增加
*\param _row為行數(shù)
*/
void AddToMap(int _row);
/** 成員函數(shù).
* 判斷碰撞
*_tile為方塊
*/
bool IsAttack(CELSTILE *_tile);
/** 成員函數(shù).
* 下落
*_tile為方塊
*\result 返回是否完成
*/
void GoDown(CELSTILE *_tile);
/** 成員函數(shù).
* 下落至低部
*_tile為方塊
*/
void GoButtom(CELSTILE *_tile);
/** 成員函數(shù).
* 開始下落至低部
*/
void StartGoButtom();
/**成員函數(shù).
*等級判斷
*\return 返回增加值
*/
int AddLevel();
/**成員函數(shù).
*速度判斷
*/
void AddSpeed();
/**成員函數(shù).
*向左移
*/
void GoLeft(CELSTILE *_tile);
/**成員函數(shù).
*向右移
*/
void GoRight(CELSTILE *_tile);
/**成員函數(shù).
*處理碰撞
*/
void DoAttack(CELSTILE *_tile);
/**成員函數(shù).
*轉(zhuǎn)動方塊
*/
void RotateTile(CELSTILE *_tile);
/**成員函數(shù).
*回到頂端
*/
void GoTop(CELSTILE *_tile);
/**成員函數(shù).
*回到頂端
*/
void GoFinish1();
/**成員函數(shù).
*回到頂端
*/
void GoFinish2();
/**成員函數(shù).
*進(jìn)行修正
*/
void DoGood();
/**成員函數(shù).
*設(shè)置下一個(gè)方塊組合
*/
void SetNext(CELSTILE *_tile);
/**成員函數(shù).
*消行處理
*/
bool DoXiaoAni();
/**!\brief
*渲染下一個(gè)
*/
void RenderNext();
};
#endif
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -