; Interactive fixture reuses the actual native scene, window events and presenter. .code DartsUiStart PROC call InitPaths3D call Create3DWindow test eax,eax jz dt_ui_fail invoke SetWindowLongA,h3DWnd,-4,OFFSET WindowEvents3D call ToggleFullscreen3D call BeginDarts3D call RenderDarts3D invoke ShowWindow,h3DWnd,1 call Present3D invoke SetForegroundWindow,h3DWnd invoke GetTickCount mov previousTick3D,eax dt_ui_loop: invoke PeekMessageA,OFFSET msg3D,0,0,0,1 test eax,eax jz dt_ui_frame cmp dword ptr msg3D[4],12h je dt_ui_close invoke TranslateMessage,OFFSET msg3D invoke DispatchMessageA,OFFSET msg3D jmp dt_ui_loop dt_ui_frame: invoke GetTickCount mov frameStart3D,eax sub eax,previousTick3D cmp eax,50 jbe @F mov eax,50 @@: mov deltaTime3D,eax mov eax,frameStart3D mov previousTick3D,eax invoke GetForegroundWindow cmp eax,h3DWnd jne dt_ui_idle invoke Pressed3D,1Bh test eax,eax jnz dt_ui_close invoke Pressed3D,7Ah test eax,eax jz @F call ToggleFullscreen3D @@: call HandleDarts3D call RenderDarts3D call Present3D dt_ui_idle: invoke Sleep,16 jmp dt_ui_loop dt_ui_close: call FreeDarts3D invoke ReleaseDC,h3DWnd,h3DDC invoke DestroyWindow,h3DWnd dt_ui_exit: invoke ExitProcess,0 ret dt_ui_fail: invoke ExitProcess,8503 ret DartsUiStart ENDP