【VC开源代码栏目提醒】:网学会员,鉴于大家对VC开源代码十分关注,论文会员在此为大家搜集整理了“GAME.CPP”一文,供大家参考学习!
// Game.cpp: implementation of the CGame class.
//
//////////////////////////////////////////////////////////////////////
#include "stdafx.h"
#include "basic.h"
#include "Game.h"
#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
CGame::CGame()
{
}
CGame::~CGame()
{
}
//////////////////////////////////////////////////////////////////////
bool CGame::Init()
{
// HERE insert DirectDraw, DirectInput, DirectSound initialization
AfxMessageBox("Game initialization");
return true;
}
//////////////////////////////////////////////////////////////////////
bool CGame::UpdateFrame()
{
// HERE insert main game loop
// You should wait here for vertical blank
AfxMessageBox("Game loop");
return true;
}
//////////////////////////////////////////////////////////////////////
void CGame::Activate()
{
// HERE restore the screen
}
//////////////////////////////////////////////////////////////////////
bool CGame::Finish()
{
// HERE release all DirectX objects
AfxMessageBox("Game over");
return true;
}
上一篇:
InDepot_Unit.pas
下一篇:
学术论文摘要的定义及写作基本要求