64,637
社区成员
发帖
与我相关
我的任务
分享
// HGE_01.cpp : Defines the entry point for the application.
//
#include "stdafx.h"
#include "../include/hge.h"
#pragma comment (lib, "../lib/vc/hge.LIB")
//#pragma comment (lib, "../lib/vc/hgehelp.LIB")
HGE *hge = 0;
bool FrameFunc()
{
if(hge->Input_GetKeyState(HGEK_ESCAPE))
return true;
return false;
}
int APIENTRY WinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPSTR lpCmdLine,
int nCmdShow)
{
hge = hgeCreate(HGE_VERSION);
hge->System_SetState(HGE_FRAMEFUNC,FrameFunc);
hge->System_SetState(HGE_WINDOWED,true);
hge->System_SetState(HGE_USESOUND,false);
hge->System_SetState(HGE_TITLE,"HGE 01 ");
if(hge->System_Initiate())
{
hge->System_Start();
}
else
{
MessageBox(NULL,hge->System_GetErrorMessage(),"Error",MB_OK|MB_ICONERROR|MB_APPLMODAL);
}
hge->System_Shutdown();
hge->Release();
return 0;
}