All pastes #399891 Raw Edit

Mine

public cpp v1 · immutable
·published 2007-03-18 10:06 UTC
rendered paste body
//problem code#ifdef _WIN32void __inline set_fpu_cw(void){_asm		{		wait			fnstcw	old_cw			wait			mov		ax, word ptr old_cw			or		ah, 0xc			mov		word ptr new_cw,ax			fldcw	new_cw	}}int __inline quick_ftol(float f){	_asm {		// Assumes that we are already in chop mode, and only need a 32-bit int		fld		DWORD PTR f		fistp	DWORD PTR dlong	}	return dlong.i[0];}void __inline restore_fpu_cw(void){	_asm	fldcw	old_cw}#else#define set_fpu_cw() /* */#define quick_ftol(f) ftol(f)#define restore_fpu_cw() /* */#endif/* MINGW COMPILER ERRORC:\fish\sc\dlls>makegcc -DCLIENT_WEAPONS -w -m486 -O1 -I. -I..\engine -I..\common -I..\pm_shared -I..\game_shared -o ..\pm_shared\obj/pm_debug.o -c ..\pm_shared/pm_debug.cIn file included from ..\pm_shared/pm_debug.c:16:../common/mathlib.h: In function `set_fpu_cw':../common/mathlib.h:84: `_zzasm' undeclared (first use in this function)../common/mathlib.h:84: (Each undeclared identifier is reported only once../common/mathlib.h:84: for each function it appears in.)../common/mathlib.h:84: parse error before `{'../common/mathlib.h: In function `quick_ftol':../common/mathlib.h:96: `_asm' undeclared (first use in this function)../common/mathlib.h:96: parse error before `{'../common/mathlib.h: In function `restore_fpu_cw':../common/mathlib.h:106: `_asm' undeclared (first use in this function)../common/mathlib.h:106: parse error before `fldcw'make: *** [..\pm_shared\obj/pm_debug.o] Error 1*/