#ifdef _DEBUG #define D3D_DEBUG_INFO #endif #include "glincludes.h" extern "C" int _fltused = 1; #pragma data_seg(".edit") static char* edit = "edit"; #pragma code_seg(".main") void __cdecl main(void) { if (!WINDOWED) { ChangeDisplaySettings (&dmScreenSettings,CDS_FULLSCREEN); _asm { XOR ESI, ESI PUSH ESI PUSH ESI PUSH ESI PUSH ESI PUSH ESI PUSH ESI PUSH ESI PUSH ESI PUSH ESI PUSH ESI PUSH WS_POPUP | WS_VISIBLE | WS_MAXIMIZE PUSH ESI PUSH edit PUSH 0x8 CALL dword ptr [CreateWindowExA] } } else { _asm { XOR ESI, ESI PUSH ESI PUSH ESI PUSH ESI PUSH ESI PUSH ESI PUSH ESI PUSH HEIGHT PUSH WIDTH PUSH ESI PUSH ESI PUSH WS_POPUP | WS_VISIBLE PUSH ESI PUSH edit PUSH 0x8 CALL dword ptr [CreateWindowExA] } } _asm { PUSH EAX CALL dword ptr [GetDC] MOV dword ptr [hdc], EAX CALL dword ptr [ShowCursor] CALL dword ptr [CreateOGL] CALL dword ptr [CreateShaders] CALL dword ptr [InitSound] theloop: #ifdef _DEBUG call dword ptr [ReloadShader] test eax, eax jz frameloop CALL dword ptr [CreateShadersDBG] frameloop: #endif call dword ptr [get_Time] fstp dword ptr [time] CALL dword ptr [DrawFrame] PUSH VK_ESCAPE CALL dword ptr [GetAsyncKeyState] test eax, eax jz theloop CALL dword ptr [ExitProcess] } }