X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?p=pcsx_rearmed.git;a=blobdiff_plain;f=plugins%2Fgpu-gles%2FgpuPrim.c;h=37db05217a8d7e7f2b958f5245b0531b877e5761;hp=7772dba1ac5f8efefc1d3cd4d6928bb6782701b0;hb=13326d3e8422568b7f5528e7b8878b2f496ea652;hpb=07f75e28d81b8acc64cfb6dee9302fb0eba8774a diff --git a/plugins/gpu-gles/gpuPrim.c b/plugins/gpu-gles/gpuPrim.c index 7772dba1..37db0521 100644 --- a/plugins/gpu-gles/gpuPrim.c +++ b/plugins/gpu-gles/gpuPrim.c @@ -26,13 +26,6 @@ #define _IN_PRIMDRAW -#ifdef _WINDOWS -#include "stdafx.h" -#include "externals.h" -#include "gpu.h" -#include "draw.h" -#include "texture.h" -#else #include "gpuStdafx.h" #include "gpuExternals.h" #include "gpuPlugin.h" @@ -40,8 +33,6 @@ #include "gpuTexture.h" #include "gpuPrim.h" -#endif - //////////////////////////////////////////////////////////////////////// // defines //////////////////////////////////////////////////////////////////////// @@ -53,10 +44,9 @@ // globals //////////////////////////////////////////////////////////////////////// -//#ifndef _WINDOWS -//EGLSurface surface; -//EGLDisplay display; -//#endif +EGLSurface surface; +EGLDisplay display; + BOOL bDrawTextured; // current active drawing states BOOL bDrawSmoothShaded; @@ -146,66 +136,6 @@ void UpdateGlobalTP(unsigned short gdata) // Some ASM color convertion... Lewpy's special... //////////////////////////////////////////////////////////////////////// -#ifdef _WINDOWS -#pragma warning (disable : 4035) - -unsigned long DoubleBGR2RGB (unsigned long BGR) -{ - - __asm - { - mov eax, BGR /* this can hold the G value */ - mov ebx, eax /* this can hold the R value */ - mov edx, eax /* this can hold the B value */ - and ebx, 000000ffh /* mask the R value */ - shl ebx, 1 - test ebx, 00000100h - jz RSKIP - mov ebx, 000000ffh - -RSKIP: - and eax, 0000ff00h /* mask the G value */ - shl eax, 1 - test eax, 00010000h - jz GSKIP - mov eax, 0000ff00h - -GSKIP: - and edx, 00ff0000h /* mask the B value */ - shl edx, 1 - test edx, 01000000h - jz BSKIP - mov edx, 00ff0000h - -BSKIP: - or eax, ebx /* add R to G value */ - or eax, edx /* add B to RG value */ - } - /* Result returned in EAX */ -} - -unsigned short BGR24to16 (unsigned long BGR) -{ - __asm - { - mov eax, BGR /* this can hold the G value */ - mov ebx, eax /* this can hold the R value */ - mov edx, eax /* this can hold the B value */ - shr ebx, 3 /* move the R value */ - and edx, 00f80000h /* mask the B value */ - shr edx, 9 /* move the B value */ - and eax, 00f800h /* mask the G value */ - shr eax, 6 /* move the G value */ - and ebx, 0000001fh /* mask the R value */ - or eax, ebx /* add R to G value */ - or eax, edx /* add B to RG value */ - } - /* Result returned in AX */ -} - -#pragma warning (default : 4035) - -#else unsigned long DoubleBGR2RGB (unsigned long BGR) { @@ -228,13 +158,12 @@ unsigned short BGR24to16 (unsigned long BGR) return ((BGR>>3)&0x1f)|((BGR&0xf80000)>>9)|((BGR&0xf800)>>6); } -#endif //////////////////////////////////////////////////////////////////////// // OpenGL primitive drawing commands //////////////////////////////////////////////////////////////////////// -__inline void PRIMdrawTexturedQuad(OGLVertex* vertex1, OGLVertex* vertex2, +void PRIMdrawTexturedQuad(OGLVertex* vertex1, OGLVertex* vertex2, OGLVertex* vertex3, OGLVertex* vertex4) {