vc项目开发:俄罗斯方块制作日志 [下]

//给的注释已经够详尽了,我就不再写多余的分析了。

//July、2010/10月。

Dlg.h文件。

#if !defined(AFX_OPTIONDLG_H__570435A5_9237_4DE0_8215_48D075E106AD__INCLUDED_) #define AFX_OPTIONDLG_H__570435A5_9237_4DE0_8215_48D075E106AD__INCLUDED_ #if _MSC_VER > 1000 #pragma once #endif // _MSC_VER > 1000 // OptionDlg.h : header file // / // COptionDlg dialog class COptionDlg : public CDialog { // Construction public: int m_iBlockStyle; int m_iLevel; int m_iArea; COptionDlg(int m_iArea, int m_iLevel,int m_iBlockStyle, BOOL m_bMusic,BOOL m_bDrawGrid, CWnd* pParent = NULL); // Dialog Data //{{AFX_DATA(COptionDlg) enum { IDD = IDD_DLG_OPTION }; BOOL m_bDrawGrid; BOOL m_bMusic; //}}AFX_DATA // Overrides // ClassWizard generated virtual function overrides //{{AFX_VIRTUAL(COptionDlg) protected: virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support //}}AFX_VIRTUAL // Implementation protected: int m_oldArea; int m_oldLevel; int m_oldBlockSytle; BOOL m_oldMusic; BOOL m_oldDrawGrid; // Generated message map functions //{{AFX_MSG(COptionDlg) afx_msg void OnCheckGrid(); virtual void OnOK(); virtual BOOL OnInitDialog(); afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct); afx_msg void OnGameOption(); //}}AFX_MSG DECLARE_MESSAGE_MAP() }; //{{AFX_INSERT_LOCATION}} // Microsoft Visual C++ will insert additional declarations immediately before the previous line. #endif // !defined(AFX_OPTIONDLG_H__570435A5_9237_4DE0_8215_48D075E106AD__INCLUDED_)

Dlg.cpp文件。

// OptionDlg.cpp : implementation file // #include "stdafx.h" #include "skyjuly_RecTT.h" #include "OptionDlg.h" #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif / // COptionDlg dialog COptionDlg::COptionDlg(int m_iArea, int m_iLevel, int m_iBlockStyle,BOOL m_bMusic, BOOL m_bDrawGrid, CWnd* pParent /*=NULL*/) : CDialog(COptionDlg::IDD, pParent) { //{{AFX_DATA_INIT(COptionDlg) m_bDrawGrid = FALSE; m_bMusic = FALSE; //}}AFX_DATA_INIT } void COptionDlg::DoDataExchange(CDataExchange* pDX) { CDialog::DoDataExchange(pDX); //{{AFX_DATA_MAP(COptionDlg) DDX_Check(pDX, IDC_CHECK_GRID, m_bDrawGrid); DDX_Check(pDX, IDC_CHECK_MUSIC, m_bMusic); //}}AFX_DATA_MAP } BEGIN_MESSAGE_MAP(COptionDlg, CDialog) //{{AFX_MSG_MAP(COptionDlg) ON_BN_CLICKED(IDC_CHECK_GRID, OnCheckGrid) ON_WM_CREATE() ON_COMMAND(ID_GAME_OPTION, OnGameOption) //}}AFX_MSG_MAP END_MESSAGE_MAP() / // COptionDlg message handlers void COptionDlg::OnCheckGrid() { // TODO: Add your control notification handler code here } void COptionDlg::OnOK() { // TODO: Add extra validation here CDialog::OnOK(); } BOOL COptionDlg::OnInitDialog() { CDialog::OnInitDialog(); // TODO: Add extra initialization here return TRUE; // return TRUE unless you set the focus to a control // EXCEPTION: OCX Property Pages should return FALSE } int COptionDlg::OnCreate(LPCREATESTRUCT lpCreateStruct) { if (CDialog::OnCreate(lpCreateStruct) == -1) return -1; // TODO: Add your specialized creation code here return 0; } void COptionDlg::OnGameOption() { // TODO: Add your command handler code here }

//至此,大部分源码,已经贴出,欢迎各位 就俄罗斯方块算法交流指正。

//曾经 单单玩这个游戏,便 玩了好几个月。;-)。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值