\r
#define _IN_PRIMDRAW\r
\r
-#ifdef _WINDOWS\r
-#include "stdafx.h"\r
-#include "externals.h"\r
-#include "gpu.h"\r
-#include "draw.h"\r
-#include "texture.h"\r
-#else\r
#include "gpuStdafx.h"\r
#include "gpuExternals.h"\r
#include "gpuPlugin.h"\r
#include "gpuTexture.h"\r
#include "gpuPrim.h"\r
\r
-#endif\r
-\r
//////////////////////////////////////////////////////////////////////// \r
// defines\r
////////////////////////////////////////////////////////////////////////\r
// globals\r
////////////////////////////////////////////////////////////////////////\r
\r
-//#ifndef _WINDOWS\r
-//EGLSurface surface;\r
-//EGLDisplay display;\r
-//#endif\r
+EGLSurface surface;\r
+EGLDisplay display;\r
+\r
\r
BOOL bDrawTextured; // current active drawing states\r
BOOL bDrawSmoothShaded;\r
// Some ASM color convertion... Lewpy's special...\r
////////////////////////////////////////////////////////////////////////\r
\r
-#ifdef _WINDOWS\r
-#pragma warning (disable : 4035)\r
-\r
-unsigned long DoubleBGR2RGB (unsigned long BGR)\r
-{\r
-\r
- __asm\r
- {\r
- mov eax, BGR /* this can hold the G value */\r
- mov ebx, eax /* this can hold the R value */\r
- mov edx, eax /* this can hold the B value */\r
- and ebx, 000000ffh /* mask the R value */\r
- shl ebx, 1\r
- test ebx, 00000100h\r
- jz RSKIP\r
- mov ebx, 000000ffh\r
-\r
-RSKIP: \r
- and eax, 0000ff00h /* mask the G value */\r
- shl eax, 1\r
- test eax, 00010000h\r
- jz GSKIP\r
- mov eax, 0000ff00h\r
-\r
-GSKIP: \r
- and edx, 00ff0000h /* mask the B value */\r
- shl edx, 1\r
- test edx, 01000000h\r
- jz BSKIP\r
- mov edx, 00ff0000h\r
- \r
-BSKIP: \r
- or eax, ebx /* add R to G value */\r
- or eax, edx /* add B to RG value */\r
- }\r
- /* Result returned in EAX */\r
-}\r
-\r
-unsigned short BGR24to16 (unsigned long BGR)\r
-{\r
- __asm\r
- {\r
- mov eax, BGR /* this can hold the G value */\r
- mov ebx, eax /* this can hold the R value */\r
- mov edx, eax /* this can hold the B value */\r
- shr ebx, 3 /* move the R value */\r
- and edx, 00f80000h /* mask the B value */\r
- shr edx, 9 /* move the B value */\r
- and eax, 00f800h /* mask the G value */\r
- shr eax, 6 /* move the G value */\r
- and ebx, 0000001fh /* mask the R value */\r
- or eax, ebx /* add R to G value */\r
- or eax, edx /* add B to RG value */\r
- }\r
- /* Result returned in AX */\r
-}\r
-\r
-#pragma warning (default : 4035)\r
-\r
-#else\r
\r
unsigned long DoubleBGR2RGB (unsigned long BGR)\r
{\r
return ((BGR>>3)&0x1f)|((BGR&0xf80000)>>9)|((BGR&0xf800)>>6);\r
}\r
\r
-#endif\r
\r
////////////////////////////////////////////////////////////////////////\r
// OpenGL primitive drawing commands\r
////////////////////////////////////////////////////////////////////////\r
\r
-__inline void PRIMdrawTexturedQuad(OGLVertex* vertex1, OGLVertex* vertex2, \r
+void PRIMdrawTexturedQuad(OGLVertex* vertex1, OGLVertex* vertex2,\r
OGLVertex* vertex3, OGLVertex* vertex4) \r
{\r
\r