zzogl-pg: Get it compiling in Windows. (May very well break compilation in Linux. I'll deal with that later.)

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2747 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
arcum42 2010-03-19 04:36:28 +00:00
parent a0398f0b30
commit 686b08b7de
6 changed files with 67 additions and 50 deletions

View File

@ -607,7 +607,7 @@ inline bool PSMT_IS16BIT(int psm) { return ((psm & 0x7) == 2);}
inline bool PSMT_ISZTEX(int psm) {return ((psm & 0x30) == 0x30);} inline bool PSMT_ISZTEX(int psm) {return ((psm & 0x30) == 0x30);}
// PSMCT16, PSMCT16S, PSMT8, PSMT8H, PSMT16Z and PSMT16SZ use only half 16 bit per pixel. // PSMCT16, PSMCT16S, PSMT8, PSMT8H, PSMT16Z and PSMT16SZ use only half 16 bit per pixel.
inline bool PSMT_ISHALF(int psm) {return (psm & 2);} inline bool PSMT_ISHALF(int psm) {return ((psm & 2) == 2);}
// PSMT8 and PSMT8H use IDTEX8 CLUT, PSMT4H, PSMT4HL, PSMT4HH -- IDTEX4. // PSMT8 and PSMT8H use IDTEX8 CLUT, PSMT4H, PSMT4HL, PSMT4HH -- IDTEX4.
// Don't use it on non clut entries, please! // Don't use it on non clut entries, please!

View File

@ -176,7 +176,7 @@ int g_LastCRC = 0;
void CALLBACK GSsetGameCRC(int crc, int options) void CALLBACK GSsetGameCRC(int crc, int options)
{ {
VALIDATE_THRESH = 8; VALIDATE_THRESH = 8;
conf.mrtdepth = (conf.gamesettings&GAME_DISABLEMRTDEPTH !=0); conf.mrtdepth = ((conf.gamesettings & GAME_DISABLEMRTDEPTH) != 0);
if (!conf.mrtdepth) if (!conf.mrtdepth)
ERROR_LOG("Disabling MRT depth writing\n"); ERROR_LOG("Disabling MRT depth writing\n");

View File

@ -57,7 +57,7 @@ void LoadConfig() {
if( conf.aa < 0 || conf.aa > 4 ) conf.aa = 0; if( conf.aa < 0 || conf.aa > 4 ) conf.aa = 0;
conf.isWideScreen = conf.options & GSOPTION_WIDESCREEN; conf.isWideScreen = ((conf.options & GSOPTION_WIDESCREEN) != 0);
switch(conf.options & GSOPTION_WINDIMS) switch(conf.options & GSOPTION_WINDIMS)
{ {
case GSOPTION_WIN640: case GSOPTION_WIN640:

View File

@ -17,8 +17,8 @@
<Configurations> <Configurations>
<Configuration <Configuration
Name="Devel|Win32" Name="Devel|Win32"
InheritedPropertySheets=".\vsprops\pcsx2_plugin_common.vsprops"
ConfigurationType="2" ConfigurationType="2"
InheritedPropertySheets=".\vsprops\pcsx2_plugin_common.vsprops"
UseOfMFC="0" UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false" ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="2" CharacterSet="2"
@ -102,11 +102,14 @@
<Tool <Tool
Name="VCAppVerifierTool" Name="VCAppVerifierTool"
/> />
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration> </Configuration>
<Configuration <Configuration
Name="Debug|Win32" Name="Debug|Win32"
InheritedPropertySheets=".\vsprops\pcsx2_plugin_common.vsprops"
ConfigurationType="2" ConfigurationType="2"
InheritedPropertySheets=".\vsprops\pcsx2_plugin_common.vsprops"
CharacterSet="2" CharacterSet="2"
> >
<Tool <Tool
@ -175,11 +178,14 @@
<Tool <Tool
Name="VCAppVerifierTool" Name="VCAppVerifierTool"
/> />
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration> </Configuration>
<Configuration <Configuration
Name="Release|Win32" Name="Release|Win32"
InheritedPropertySheets=".\vsprops\pcsx2_plugin_common.vsprops"
ConfigurationType="2" ConfigurationType="2"
InheritedPropertySheets=".\vsprops\pcsx2_plugin_common.vsprops"
UseOfMFC="0" UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false" ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="2" CharacterSet="2"
@ -213,7 +219,7 @@
FavorSizeOrSpeed="1" FavorSizeOrSpeed="1"
OmitFramePointers="true" OmitFramePointers="true"
WholeProgramOptimization="true" WholeProgramOptimization="true"
AdditionalIncludeDirectories="..\x86\;..\..\ZeroGSShaders\" AdditionalIncludeDirectories="..\x86\;..\..\ZeroGSShaders\; ..\..\..\3rdparty\zlib\"
PreprocessorDefinitions="NDEBUG;_USRDLL;__i386__;ZEROGS_SSE2;RELEASE_TO_PUBLIC" PreprocessorDefinitions="NDEBUG;_USRDLL;__i386__;ZEROGS_SSE2;RELEASE_TO_PUBLIC"
StringPooling="true" StringPooling="true"
RuntimeLibrary="0" RuntimeLibrary="0"
@ -265,6 +271,9 @@
<Tool <Tool
Name="VCAppVerifierTool" Name="VCAppVerifierTool"
/> />
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration> </Configuration>
</Configurations> </Configurations>
<References> <References>
@ -278,6 +287,10 @@
RelativePath=".\Conf.cpp" RelativePath=".\Conf.cpp"
> >
</File> </File>
<File
RelativePath="..\GifTransfer.cpp"
>
</File>
<File <File
RelativePath="..\glprocs.c" RelativePath="..\glprocs.c"
> >
@ -286,10 +299,6 @@
RelativePath="..\GSmain.cpp" RelativePath="..\GSmain.cpp"
> >
</File> </File>
<File
RelativePath="..\GifTransfer.cpp"
>
</File>
<File <File
RelativePath=".\GSsoftdx.def" RelativePath=".\GSsoftdx.def"
> >
@ -365,6 +374,14 @@
RelativePath="..\ZZoglCreate.cpp" RelativePath="..\ZZoglCreate.cpp"
> >
</File> </File>
<File
RelativePath="..\ZZoglCRTC.cpp"
>
</File>
<File
RelativePath="..\ZZoglFlush.cpp"
>
</File>
<File <File
RelativePath="..\ZZoglSave.cpp" RelativePath="..\ZZoglSave.cpp"
> >
@ -373,21 +390,13 @@
RelativePath="..\ZZoglShaders.cpp" RelativePath="..\ZZoglShaders.cpp"
> >
</File> </File>
<File
RelativePath="..\ZZoglVB.cpp"
>
</File>
<File
RelativePath="..\ZZoglCRTC.cpp"
>
</File>
<File <File
RelativePath="..\ZZoglShoots.cpp" RelativePath="..\ZZoglShoots.cpp"
> >
</File> </File>
<File <File
RelativePath="..\ZZoglFlush.cpp" RelativePath="..\ZZoglVB.cpp"
> >
</File> </File>
</Filter> </Filter>
<Filter <Filter
@ -403,11 +412,11 @@
> >
</File> </File>
<File <File
RelativePath="..\GS.h" RelativePath="..\GifTransfer.h"
> >
</File> </File>
<File <File
RelativePath="..\GifTransfer.h" RelativePath="..\GS.h"
> >
</File> </File>
<File <File
@ -488,91 +497,91 @@
Name="zlib" Name="zlib"
> >
<File <File
RelativePath="..\3rdparty\zlib\adler32.c" RelativePath="..\..\..\..\3rdparty\zlib\adler32.c"
> >
</File> </File>
<File <File
RelativePath="..\3rdparty\zlib\compress.c" RelativePath="..\..\..\..\3rdparty\zlib\compress.c"
> >
</File> </File>
<File <File
RelativePath="..\3rdparty\zlib\crc32.c" RelativePath="..\..\..\..\3rdparty\zlib\crc32.c"
> >
</File> </File>
<File <File
RelativePath="..\3rdparty\zlib\crc32.h" RelativePath="..\..\..\..\3rdparty\zlib\crc32.h"
> >
</File> </File>
<File <File
RelativePath="..\3rdparty\zlib\deflate.c" RelativePath="..\..\..\..\3rdparty\zlib\deflate.c"
> >
</File> </File>
<File <File
RelativePath="..\3rdparty\zlib\deflate.h" RelativePath="..\..\..\..\3rdparty\zlib\deflate.h"
> >
</File> </File>
<File <File
RelativePath="..\3rdparty\zlib\gzio.c" RelativePath="..\..\..\..\3rdparty\zlib\gzio.c"
> >
</File> </File>
<File <File
RelativePath="..\3rdparty\zlib\infback.c" RelativePath="..\..\..\..\3rdparty\zlib\infback.c"
> >
</File> </File>
<File <File
RelativePath="..\3rdparty\zlib\inffast.c" RelativePath="..\..\..\..\3rdparty\zlib\inffast.c"
> >
</File> </File>
<File <File
RelativePath="..\3rdparty\zlib\inffast.h" RelativePath="..\..\..\..\3rdparty\zlib\inffast.h"
> >
</File> </File>
<File <File
RelativePath="..\3rdparty\zlib\inffixed.h" RelativePath="..\..\..\..\3rdparty\zlib\inffixed.h"
> >
</File> </File>
<File <File
RelativePath="..\3rdparty\zlib\inflate.c" RelativePath="..\..\..\..\3rdparty\zlib\inflate.c"
> >
</File> </File>
<File <File
RelativePath="..\3rdparty\zlib\inflate.h" RelativePath="..\..\..\..\3rdparty\zlib\inflate.h"
> >
</File> </File>
<File <File
RelativePath="..\3rdparty\zlib\inftrees.c" RelativePath="..\..\..\..\3rdparty\zlib\inftrees.c"
> >
</File> </File>
<File <File
RelativePath="..\3rdparty\zlib\inftrees.h" RelativePath="..\..\..\..\3rdparty\zlib\inftrees.h"
> >
</File> </File>
<File <File
RelativePath="..\3rdparty\zlib\trees.c" RelativePath="..\..\..\..\3rdparty\zlib\trees.c"
> >
</File> </File>
<File <File
RelativePath="..\3rdparty\zlib\trees.h" RelativePath="..\..\..\..\3rdparty\zlib\trees.h"
> >
</File> </File>
<File <File
RelativePath="..\3rdparty\zlib\uncompr.c" RelativePath="..\..\..\..\3rdparty\zlib\uncompr.c"
> >
</File> </File>
<File <File
RelativePath="..\3rdparty\zlib\zconf.h" RelativePath="..\..\..\..\3rdparty\zlib\zconf.h"
> >
</File> </File>
<File <File
RelativePath="..\3rdparty\zlib\zlib.h" RelativePath="..\..\..\..\3rdparty\zlib\zlib.h"
> >
</File> </File>
<File <File
RelativePath="..\3rdparty\zlib\zutil.c" RelativePath="..\..\..\..\3rdparty\zlib\zutil.c"
> >
</File> </File>
<File <File
RelativePath="..\3rdparty\zlib\zutil.h" RelativePath="..\..\..\..\3rdparty\zlib\zutil.h"
> >
</File> </File>
</Filter> </Filter>

View File

@ -216,11 +216,19 @@ DisableAllgl () {
glColorMask(1,1,1,1); glColorMask(1,1,1,1);
} }
// Calculate maximun height for target // Calculate maximum height for target
inline int inline int
get_maxheight(int fbp, int fbw, int psm) { get_maxheight(int fbp, int fbw, int psm)
{
int ret;
if (fbw == 0) return 0; if (fbw == 0) return 0;
return ( ( ( 0x00100000 - 64 * fbp ) / fbw ) & ~0x1f ) << (PSMT_ISHALF(psm)) ; if (PSMT_ISHALF(psm))
ret = (((0x00100000 - 64 * fbp)/fbw ) & ~0x1f) * 2;
else
ret = (((0x00100000 - 64 * fbp)/fbw ) & ~0x1f);
return ret;
} }
// Does psm need Alpha test with alpha expansion // Does psm need Alpha test with alpha expansion

View File

@ -8,7 +8,7 @@
#include <assert.h> #include <assert.h>
//#define ZLIB_WINAPI //#define ZLIB_WINAPI
#include "zlib.h" #include "zlib/zlib.h"
int def(char *src, char *dst, int bytes_to_compress, int *bytes_after_compressed) ; int def(char *src, char *dst, int bytes_to_compress, int *bytes_after_compressed) ;
int inf(char *src, char *dst, int bytes_to_decompress, int maximum_after_decompress) ; int inf(char *src, char *dst, int bytes_to_decompress, int maximum_after_decompress) ;