From aa64da2561b08ee4348690fda4807af616ce6592 Mon Sep 17 00:00:00 2001 From: arcum42 Date: Sat, 23 Oct 2010 12:14:15 +0000 Subject: [PATCH] GregMiscellaneous: zzogl-pg: Get zzogl-pg working in Windows again. git-svn-id: http://pcsx2.googlecode.com/svn/branches/GregMiscellaneous@3963 96395faa-99c1-11dd-bbfe-3dabce05a288 --- plugins/zzogl-pg/opengl/GLWin.h | 2 + .../opengl/Win32/zerogsogl_2008.vcproj | 44 ++++++++++++++++++- plugins/zzogl-pg/opengl/ZZClut.cpp | 24 +++++----- plugins/zzogl-pg/opengl/ZZKick.cpp | 4 +- 4 files changed, 58 insertions(+), 16 deletions(-) diff --git a/plugins/zzogl-pg/opengl/GLWin.h b/plugins/zzogl-pg/opengl/GLWin.h index 6410086d99..c158ff72b4 100644 --- a/plugins/zzogl-pg/opengl/GLWin.h +++ b/plugins/zzogl-pg/opengl/GLWin.h @@ -68,5 +68,7 @@ class GLWindow extern GLWindow GLWin; extern void ChangeWindowSize(int nNewWidth, int nNewHeight); +extern void SetChangeDeviceSize(int nNewWidth, int nNewHeight); +extern int nBackbufferWidth, nBackbufferHeight; #endif // GLWIN_H_INCLUDED diff --git a/plugins/zzogl-pg/opengl/Win32/zerogsogl_2008.vcproj b/plugins/zzogl-pg/opengl/Win32/zerogsogl_2008.vcproj index 9b2502170d..7f8b3e0d8a 100644 --- a/plugins/zzogl-pg/opengl/Win32/zerogsogl_2008.vcproj +++ b/plugins/zzogl-pg/opengl/Win32/zerogsogl_2008.vcproj @@ -356,10 +356,18 @@ RelativePath="..\zpipe.cpp" > + + + + @@ -413,10 +421,18 @@ RelativePath="..\GifTransfer.h" > + + + + @@ -481,14 +497,30 @@ RelativePath="..\zerogs.h" > + + + + + + + + @@ -501,6 +533,14 @@ RelativePath="..\ZZoglShaders.h" > + + + + diff --git a/plugins/zzogl-pg/opengl/ZZClut.cpp b/plugins/zzogl-pg/opengl/ZZClut.cpp index f75be1e19d..d948952a81 100644 --- a/plugins/zzogl-pg/opengl/ZZClut.cpp +++ b/plugins/zzogl-pg/opengl/ZZClut.cpp @@ -372,7 +372,7 @@ __forceinline void GSMem_to_ClutBuffer__T32_I4_CSM1_c(u32* vm, u32 csa) } // Main GSmem to Clutbuffer function -__forceinline void GSMem_to_ClutBuffer(tex0Info &tex0) +/*__forceinline*/ void GSMem_to_ClutBuffer(tex0Info &tex0) { int entries = PSMT_IS8CLUT(tex0.psm) ? 256 : 16; @@ -487,17 +487,17 @@ __forceinline void GSMem_to_ClutBuffer(tex0Info &tex0) * Clut buffer -> local C array (linear) * *****************************************************************/ template -__forceinline void ClutBuffer_to_Array(T* dst, u32 csa, u32 clutsize) {} +/*__forceinline*/ void ClutBuffer_to_Array(T* dst, u32 csa, u32 clutsize) {} template <> -__forceinline void ClutBuffer_to_Array(u32* dst, u32 csa, u32 clutsize) +/*__forceinline*/ void ClutBuffer_to_Array(u32* dst, u32 csa, u32 clutsize) { u8* clut = (u8*)GetClutBufferAddress(csa); memcpy_amd((u8*)dst, clut, clutsize); } template <> -__forceinline void ClutBuffer_to_Array(u16* dst, u32 csa, u32 clutsize) +/*__forceinline*/ void ClutBuffer_to_Array(u16* dst, u32 csa, u32 clutsize) { u16* clut = (u16*)GetClutBufferAddress(csa); // Keep aligned version for sse2 @@ -597,10 +597,10 @@ __forceinline void ClutBuffer_to_Array(u16* dst, u32 csa, u32 clutsize) // false -> identical // true -> different template -__forceinline bool Cmp_ClutBuffer_GSMem(T* GSmem, u32 csa, u32 clutsize); +/*__forceinline*/ bool Cmp_ClutBuffer_GSMem(T* GSmem, u32 csa, u32 clutsize); template <> -__forceinline bool Cmp_ClutBuffer_GSMem(u32* GSmem, u32 csa, u32 clutsize) +/*__forceinline*/ bool Cmp_ClutBuffer_GSMem(u32* GSmem, u32 csa, u32 clutsize) { u64* _GSmem = (u64*) GSmem; u64* clut = (u64*)GetClutBufferAddress(csa); @@ -769,7 +769,7 @@ __forceinline bool Cmp_ClutBuffer_GSMem_core(u16* GSmem, u16* clut) #endif template <> -__forceinline bool Cmp_ClutBuffer_GSMem(u16* GSmem, u32 csa, u32 clutsize) +/*__forceinline*/ bool Cmp_ClutBuffer_GSMem(u16* GSmem, u32 csa, u32 clutsize) { #ifdef ZEROGS_SSE2 u16* clut = (u16*)GetClutBufferAddress(csa); // Keep aligned version for sse2 @@ -853,17 +853,17 @@ __forceinline bool Cmp_ClutBuffer_GSMem(u16* GSmem, u32 csa, u32 clutsize) // false -> identical // true -> different template -__forceinline bool Cmp_ClutBuffer_SavedClut(T* saved_clut, u32 csa, u32 clutsize); +/*__forceinline*/ bool Cmp_ClutBuffer_SavedClut(T* saved_clut, u32 csa, u32 clutsize); template <> -__forceinline bool Cmp_ClutBuffer_SavedClut(u32* saved_clut, u32 csa, u32 clutsize) +/*__forceinline*/ bool Cmp_ClutBuffer_SavedClut(u32* saved_clut, u32 csa, u32 clutsize) { u32* clut = GetClutBufferAddress(csa); - return memcmp_mmx(saved_clut, clut, clutsize); + return !!memcmp_mmx(saved_clut, clut, clutsize); } template <> -__forceinline bool Cmp_ClutBuffer_SavedClut(u16* saved_clut, u32 csa, u32 clutsize) +/*__forceinline*/ bool Cmp_ClutBuffer_SavedClut(u16* saved_clut, u32 csa, u32 clutsize) { assert((clutsize&31) == 0); @@ -973,7 +973,7 @@ __forceinline bool Cmp_ClutBuffer_SavedClut(u16* saved_clut, u32 csa, u32 c // used to build clut textures (note that this is for both 16 and 32 bit cluts) template -__forceinline void Build_Clut_Texture(u32 psm, u32 height, T* pclut, u8* psrc, T* pdst) +/*__forceinline*/ void Build_Clut_Texture(u32 psm, u32 height, T* pclut, u8* psrc, T* pdst) { switch (psm) { diff --git a/plugins/zzogl-pg/opengl/ZZKick.cpp b/plugins/zzogl-pg/opengl/ZZKick.cpp index 87ffc36798..c0161e1f4d 100644 --- a/plugins/zzogl-pg/opengl/ZZKick.cpp +++ b/plugins/zzogl-pg/opengl/ZZKick.cpp @@ -63,7 +63,7 @@ bool __forceinline NoHighlights(int i) return (!(conf.settings().xenosaga_spec) || !vb[i].zbuf.zmsk || prim->iip) ; } -void __forceinline Kick::KickVERTEX2() +void Kick::KickVERTEX2() { FUNCLOG @@ -75,7 +75,7 @@ void __forceinline Kick::KickVERTEX2() } } -void __forceinline Kick::KickVERTEX3() +void Kick::KickVERTEX3() { FUNCLOG