--- deliantra/Deliantra-Client/Client.xs 2006/07/12 17:20:04 1.129 +++ deliantra/Deliantra-Client/Client.xs 2006/07/23 04:37:51 1.132 @@ -1,4 +1,5 @@ #ifdef _WIN32 +# define WIN32_LEAN_AND_MEAN # define _WIN32_WINNT 0x0500 // needed to get win2000 api calls # include # include @@ -9,6 +10,10 @@ #include "perl.h" #include "XSUB.h" +#ifdef _WIN32 +# undef pipe +#endif + #include #include #include @@ -42,8 +47,6 @@ typedef signed int int32_t; #endif -#include "glext.h" - #define OBJ_STR "\xef\xbf\xbc" /* U+FFFC, objetc replacement character */ #define FOW_DARKNESS 32 @@ -511,6 +514,8 @@ SDL_GL_SetAttribute (SDL_GL_ACCUM_ALPHA_SIZE, 0); SDL_GL_SetAttribute (SDL_GL_DOUBLEBUFFER, 1); + SDL_GL_SetAttribute (SDL_GL_ACCELERATED_VISUAL, 1); + SDL_GL_SetAttribute (SDL_GL_SWAP_CONTROL, 1); SDL_EnableUNICODE (1); SDL_EnableKeyRepeat (SDL_DEFAULT_REPEAT_DELAY, SDL_DEFAULT_REPEAT_INTERVAL); @@ -607,7 +612,7 @@ break; } - XPUSHs (sv_2mortal (newRV_noinc ((SV *)hv))); + XPUSHs (sv_2mortal (sv_bless (newRV_noinc ((SV *)hv), gv_stashpv ("CFClient::UI::Event", 1)))); } } @@ -1916,10 +1921,7 @@ b *= a; } // microsoft visual "c" rounds instead of truncating... - glColor4ub (MIN ((int)(r * 256.f), 255), - MIN ((int)(g * 256.f), 255), - MIN ((int)(b * 256.f), 255), - MIN ((int)(a * 256.f), 255)); + glColor4f (r, g, b, a); void glInterleavedArrays (int format, int stride, char *data)