虽然其实只是抄了一遍而已,不过之后我会考虑使用纯汇编启动一次看看
hge = hgeCreate(HGE_VERSION);
hge->System_SetState(HGE_FRAMEFUNC, FrameFunc);
hge->System_SetState(HGE_WINDOWED, true);
if(hge->System_Initiate())
{
hge->System_Start();
hge->System_Shutdown();
}
hge->Release();
首先是C++的代码。以上代码就足以运行一个简单的hge了,当然库和头文件自己导进去,全局的hge指针也需要声明下。
__asm
{
push 180h
call hgeCreate
mov ecx,dword ptr [eax]
mov edx,dword ptr [ecx+24h]
push offset FrameFunc
push 8
push eax
mov dword ptr [hge],eax
call edx
mov eax,dword ptr [hge]
mov ecx,dword ptr [eax]
mov edx,dword ptr [ecx+20h]
push 1
push 1
push eax
call edx
mov eax,dword ptr [hge]
mov ecx,dword p