资源简介

用C++写的游戏《是男人就下一百层》源代码。。。

资源截图

代码片段和文件信息

// backmusic.cpp : implementation file
//

#include “stdafx.h“
#include “man.h“
#include “backmusic.h“

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// backmusic

IMPLEMENT_DYNCREATE(backmusic CWinThread)

backmusic::backmusic()
{
m_wDeviceID=0;
}

backmusic::~backmusic()
{
}

BOOL backmusic::InitInstance()
{
// TODO:  perform and per-thread initialization here
return TRUE;
}

int backmusic::ExitInstance()
{
// TODO:  perform any per-thread cleanup here
return CWinThread::ExitInstance();
}

BEGIN_MESSAGE_MAP(backmusic CWinThread)
//{{AFX_MSG_MAP(backmusic)
// NOTE - the ClassWizard will add and remove mapping macros here.
//}}AFX_MSG_MAP
ON_THREAD_MESSAGE(WM_PLAYMMSOUND_PLAYFILEPlaySoundFile)
ON_THREAD_MESSAGE(WM_PLAYMMSOUND_CLOSEFILECloseSoundFile)
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// backmusic message handlers
void backmusic::PlaySoundFile(WPARAM wParamLPARAM lParam)
{
mciOpenParms.lpstrElementName=TEXT(“Music1.mid“);
mciSendCommand(0MCI_OPENMCI_WAIT|MCI_OPEN_ELEMENT
(DWORD)(LPMCI_OPEN_PARMS)&mciOpenParms);
m_wDeviceID=mciOpenParms.wDeviceID;
mciPlayParms.dwCallback=(DWORD)GetMainWnd();
mciPlayParms.dwFrom=0;
mciPlayParms.dwTo=0;
    mciSendCommand(m_wDeviceIDMCI_PLAYMCI_NOTIFY(DWORD)(LPMCI_OPEN_PARMS)&mciPlayParms);
}
void backmusic::CloseSoundFile(WPARAM wParamLPARAM lParam)
{
mciSendCommand(m_wDeviceIDMCI_CLOSE1NULL);
}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件     108544  2003-07-07 15:30  下楼2\docs\下一百层.ppt

     文件      38912  2003-07-07 15:21  下楼2\docs\下楼梯.doc

     文件       1640  2003-05-30 21:19  下楼2\exe\backmusic.cpp

     文件       1679  2003-05-30 21:09  下楼2\exe\backmusic.h

     文件      88258  2003-05-28 13:42  下楼2\exe\buffle.wav

     文件     352858  2003-05-28 14:52  下楼2\exe\die.wav

     文件       2414  2003-05-30 21:13  下楼2\exe\MainFrm.cpp

     文件       1431  2003-05-30 20:43  下楼2\exe\MainFrm.h

     文件     381476  2009-05-20 00:42  下楼2\exe\man.aps

     文件       2202  2009-05-20 01:00  下楼2\exe\man.clw

     文件       4060  2003-05-31 14:38  下楼2\exe\man.cpp

     文件       9000  2003-05-30 21:20  下楼2\exe\man.dsp

     文件        531  2003-04-02 12:04  下楼2\exe\man.dsw

     文件     389120  2006-12-21 16:54  下楼2\exe\man.exe

     文件       1323  2003-04-02 12:04  下楼2\exe\man.h

     文件     230400  2009-05-20 01:00  下楼2\exe\man.ncb

     文件      56832  2009-05-20 01:00  下楼2\exe\man.opt

     文件       1137  2003-06-06 09:39  下楼2\exe\man.plg

     文件      15189  2003-06-02 09:44  下楼2\exe\man.rc

     文件       1682  2003-04-02 12:04  下楼2\exe\manDoc.cpp

     文件       1442  2003-04-02 12:04  下楼2\exe\manDoc.h

     文件      19076  2003-06-06 09:38  下楼2\exe\manView.cpp

     文件       2685  2003-06-05 09:45  下楼2\exe\manView.h

     文件       9851  2001-05-18 11:37  下楼2\exe\Music1.mid

     文件      88258  2003-05-28 14:50  下楼2\exe\nail.wav

     文件       8917  2003-05-30 20:16  下楼2\exe\new.cpp

     文件       2872  2003-05-30 19:49  下楼2\exe\new.h

     文件     308758  2003-05-28 14:53  下楼2\exe\pause.wav

     文件       3927  2003-04-02 12:04  下楼2\exe\ReadMe.txt

     文件       8963  2003-05-30 21:23  下楼2\exe\Release\backmusic.obj

............此处省略86个文件信息

评论

共有 条评论