32 #include "..\ref_soft\r_local.h"
43 #define WINDOW_CLASS_NAME "Quake 2"
58 exstyle = WS_EX_TOPMOST;
69 wc.hCursor = LoadCursor (
NULL,IDC_ARROW);
70 wc.hbrBackground = (
void *)COLOR_GRAYTEXT;
74 if (!RegisterClass (&wc) )
82 AdjustWindowRect (&
r, stylebits,
FALSE);
191 const char *win_fs[] = {
"W",
"FS" };
238 ( retval ==
rserr_ok && !fullscreen ) )
326 if (!VirtualProtect((LPVOID)startaddr, length, PAGE_READWRITE, &flOldProtect))
355 unsigned fpu_ceil_cw, fpu_chop_cw, fpu_full_cw, fpu_cw, fpu_pushed_cw;
356 unsigned fpu_sp24_cw, fpu_sp24_ceil_cw;
362 __asm fnstcw word ptr fpu_cw
363 __asm mov
ax, word ptr fpu_cw
366 __asm or ah, 003h ; round to nearest
mode, extended precision
367 __asm mov fpu_full_cw, eax
370 __asm or ah, 00fh ; RTZ/truncate/chop
mode, extended precision
371 __asm mov fpu_chop_cw, eax
374 __asm or ah, 00bh ; ceil
mode, extended precision
375 __asm mov fpu_ceil_cw, eax
377 __asm and ah, 0f0h ; round to nearest, 24-bit single precision
378 __asm mov fpu_sp24_cw, eax
380 __asm and ah, 0f0h ; ceil
mode, 24-bit single precision
382 __asm mov fpu_sp24_ceil_cw, eax