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);}
// 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.
// 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)
{
VALIDATE_THRESH = 8;
conf.mrtdepth = (conf.gamesettings&GAME_DISABLEMRTDEPTH !=0);
conf.mrtdepth = ((conf.gamesettings & GAME_DISABLEMRTDEPTH) != 0);
if (!conf.mrtdepth)
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;
conf.isWideScreen = conf.options & GSOPTION_WIDESCREEN;
conf.isWideScreen = ((conf.options & GSOPTION_WIDESCREEN) != 0);
switch(conf.options & GSOPTION_WINDIMS)
{
case GSOPTION_WIN640:

View File

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

View File

@ -216,11 +216,19 @@ DisableAllgl () {
glColorMask(1,1,1,1);
}
// Calculate maximun height for target
// Calculate maximum height for target
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;
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

View File

@ -8,7 +8,7 @@
#include <assert.h>
//#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 inf(char *src, char *dst, int bytes_to_decompress, int maximum_after_decompress) ;