mirror of https://github.com/PCSX2/pcsx2.git
zzogl-pg: Reduce the # of compiler warnings.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2813 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
parent
564f443644
commit
ea04f34136
|
@ -57,7 +57,7 @@ u8* g_pBasePS2Mem = NULL;
|
||||||
int g_TransferredToGPU = 0;
|
int g_TransferredToGPU = 0;
|
||||||
std::string s_strIniPath("inis/"); // Air's new ini path (r2361)
|
std::string s_strIniPath("inis/"); // Air's new ini path (r2361)
|
||||||
|
|
||||||
static BOOL g_bHidden = 0;
|
//static BOOL g_bHidden = 0;
|
||||||
int g_GameSettings = 0;
|
int g_GameSettings = 0;
|
||||||
int CurrentSavestate = 0; // Number of SaveSlot. Default is 0
|
int CurrentSavestate = 0; // Number of SaveSlot. Default is 0
|
||||||
bool SaveStateExists = true; // We could not know save slot status before first change occured
|
bool SaveStateExists = true; // We could not know save slot status before first change occured
|
||||||
|
@ -637,7 +637,7 @@ void ProcessMessages()
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
SendMessage(GShwnd, WM_DESTROY, 0, 0);
|
SendMessage(GShwnd, WM_DESTROY, 0, 0);
|
||||||
g_bHidden = 1;
|
//g_bHidden = 1;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -46,6 +46,7 @@ void SaveConfig()
|
||||||
|
|
||||||
void LoadConfig()
|
void LoadConfig()
|
||||||
{
|
{
|
||||||
|
int err = 0;
|
||||||
memset(&conf, 0, sizeof(conf));
|
memset(&conf, 0, sizeof(conf));
|
||||||
conf.interlace = 0; // on, mode 1
|
conf.interlace = 0; // on, mode 1
|
||||||
conf.mrtdepth = 1;
|
conf.mrtdepth = 1;
|
||||||
|
@ -63,12 +64,12 @@ void LoadConfig()
|
||||||
SaveConfig();//save and return
|
SaveConfig();//save and return
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
fscanf(f, "interlace = %hhx\n", &conf.interlace);
|
err = fscanf(f, "interlace = %hhx\n", &conf.interlace);
|
||||||
fscanf(f, "mrtdepth = %hhx\n", &conf.mrtdepth);
|
err = fscanf(f, "mrtdepth = %hhx\n", &conf.mrtdepth);
|
||||||
fscanf(f, "options = %x\n", &conf.options);//u32
|
err = fscanf(f, "options = %x\n", &conf.options);//u32
|
||||||
fscanf(f, "bilinear = %hhx\n", &conf.bilinear);
|
err = fscanf(f, "bilinear = %hhx\n", &conf.bilinear);
|
||||||
fscanf(f, "aliasing = %hhx\n", &conf.aa);
|
err = fscanf(f, "aliasing = %hhx\n", &conf.aa);
|
||||||
fscanf(f, "gamesettings = %x\n", &conf.gamesettings);//u32
|
err = fscanf(f, "gamesettings = %x\n", &conf.gamesettings);//u32
|
||||||
fclose(f);
|
fclose(f);
|
||||||
|
|
||||||
// filter bad files
|
// filter bad files
|
||||||
|
|
|
@ -24,6 +24,7 @@
|
||||||
|
|
||||||
#include "GS.h"
|
#include "GS.h"
|
||||||
#include "Linux.h"
|
#include "Linux.h"
|
||||||
|
#include "zerogs.h"
|
||||||
|
|
||||||
#include <map>
|
#include <map>
|
||||||
|
|
||||||
|
@ -113,29 +114,30 @@ void CreateGameHackTable(GtkWidget *treeview)
|
||||||
|
|
||||||
//setup the model with all our rows of option data
|
//setup the model with all our rows of option data
|
||||||
mapConfOpts.clear();
|
mapConfOpts.clear();
|
||||||
add_map_entry(0x00000001, "00000001", "Tex Target checking - 00000001\nLego Racers");
|
|
||||||
add_map_entry(0x00000002, "00000002", "Auto reset targs - 00000002\nShadow Hearts, Samurai Warriors. Use when game is slow and toggling AA fixes it.");
|
add_map_entry(GAME_TEXTURETARGS, "00000001", "Tex Target checking - 00000001\nLego Racers");
|
||||||
add_map_entry(0x00000010, "00000010", "No target resolves - 00000010\nStops all resolving of targets. Try this first for really slow games. Dark Cloud 1");
|
add_map_entry(GAME_AUTORESET, "00000002", "Auto reset targs - 00000002\nShadow Hearts, Samurai Warriors. Use when game is slow and toggling AA fixes it.");
|
||||||
add_map_entry(0x00000020, "00000020", "Exact color testing - 00000020\nFixes overbright or shadow/black artifacts (Crash 'n Burn).");
|
add_map_entry(GAME_NOTARGETRESOLVE, "00000010", "No target resolves - 00000010\nStops all resolving of targets. Try this first for really slow games. Dark Cloud 1");
|
||||||
add_map_entry(0x00000040, "00000040", "No color clamping - 00000040\nSpeeds up games, but might be too bright or too dim.");
|
add_map_entry(GAME_EXACTCOLOR, "00000020", "Exact color testing - 00000020\nFixes overbright or shadow/black artifacts (Crash 'n Burn).");
|
||||||
add_map_entry(0x00000100, "00000100", "Alpha Fail hack - 00000100\nFor Sonic Unleashed, Shadow the Hedgehog, Ghost in the Shell. Remove vertical stripes or other coloring artefacts. Break Persona 4 and MGS3");
|
add_map_entry(GAME_NOCOLORCLAMP, "00000040", "No color clamping - 00000040\nSpeeds up games, but might be too bright or too dim.");
|
||||||
add_map_entry(0x00000200, "00000200", "Disable depth updates - 00000200");
|
add_map_entry(GAME_NOALPHAFAIL, "00000100", "Alpha Fail hack - 00000100\nFor Sonic Unleashed, Shadow the Hedgehog, Ghost in the Shell. Remove vertical stripes or other coloring artefacts. Break Persona 4 and MGS3");
|
||||||
add_map_entry(0x00000400, "00000400", "Resolve Hack #1 - 00000400\nKingdom Hearts. Speeds some games.");
|
add_map_entry(GAME_NODEPTHUPDATE, "00000200", "Disable depth updates - 00000200");
|
||||||
add_map_entry(0x00000800, "00000800", "Resolve Hack #2 - 00000800\nShadow Hearts, Urbz. Destroy FFX");
|
add_map_entry(GAME_QUICKRESOLVE1, "00000400", "Resolve Hack #1 - 00000400\nKingdom Hearts. Speeds some games.");
|
||||||
add_map_entry(0x00001000, "00001000", "No target CLUT - 00001000\nResident Evil 4, or foggy scenes.");
|
add_map_entry(GAME_NOQUICKRESOLVE, "00000800", "Resolve Hack #2 - 00000800\nShadow Hearts, Urbz. Destroy FFX");
|
||||||
add_map_entry(0x00002000, "00002000", "Disable stencil buffer - 00002000\nUsually safe to do for simple scenes. Harvest Moon");
|
add_map_entry(GAME_NOTARGETCLUT, "00001000", "No target CLUT - 00001000\nResident Evil 4, or foggy scenes.");
|
||||||
add_map_entry(0x00008000, "00008000", "No depth resolve - 00008000\nMight give z buffer artifacts.");
|
add_map_entry(GAME_NOSTENCIL, "00002000", "Disable stencil buffer - 00002000\nUsually safe to do for simple scenes. Harvest Moon");
|
||||||
add_map_entry(0x00010000, "00010000", "Full 16 bit resolution - 00010000\nUse when half the screen is missing.");
|
add_map_entry(GAME_NODEPTHRESOLVE, "00008000", "No depth resolve - 00008000\nMight give z buffer artifacts.");
|
||||||
add_map_entry(0x00020000, "00020000", "Resolve Hack #3 - 00020000\nNeopets");
|
add_map_entry(GAME_FULL16BITRES, "00010000", "Full 16 bit resolution - 00010000\nUse when half the screen is missing.");
|
||||||
add_map_entry(0x00040000, "00040000", "Fast Update - 00040000\nOkami. Speeds some games. Needs for Sonic Unleashed");
|
add_map_entry(GAME_RESOLVEPROMOTED, "00020000", "Resolve Hack #3 - 00020000\nNeopets");
|
||||||
add_map_entry(0x00080000, "00080000", "Disable alpha testing - 00080000");
|
add_map_entry(GAME_FASTUPDATE, "00040000", "Fast Update - 00040000\nOkami. Speeds some games. Needs for Sonic Unleashed");
|
||||||
add_map_entry(0x00100000, "00100000", "Enable Multiple RTs - 00100000");
|
add_map_entry(GAME_NOALPHATEST, "00080000", "Disable alpha testing - 00080000");
|
||||||
add_map_entry(0x01000000, "01000000", "Specular Highlights - 01000000\nMakes Xenosaga and Okage graphics faster by removing highlights");
|
add_map_entry(GAME_DISABLEMRTDEPTH, "00100000", "Enable Multiple RTs - 00100000");
|
||||||
add_map_entry(0x02000000, "02000000", "Partial targets - 02000000");
|
add_map_entry(GAME_XENOSPECHACK, "01000000", "Specular Highlights - 01000000\nMakes Xenosaga and Okage graphics faster by removing highlights");
|
||||||
add_map_entry(0x04000000, "04000000", "Partial depth - 04000000");
|
add_map_entry(GAME_PARTIALPOINTERS, "02000000", "Partial targets - 02000000");
|
||||||
add_map_entry(0x10000000, "10000000", "Gust fix, made gustgame more clean and fast - 10000000");
|
add_map_entry(GAME_PARTIALDEPTH, "04000000", "Partial depth - 04000000");
|
||||||
add_map_entry(0x20000000, "20000000", "No logarithmic Z, could decrease number of Z-artefacts - 20000000");
|
add_map_entry(GAME_GUSTHACK, "10000000", "Gust fix, made gustgame more clean and fast - 10000000");
|
||||||
add_map_entry(0x00000004, "00000004", "Interlace 2X - 00000004\nFixes 2x bigger screen (Gradius 3).");
|
add_map_entry(GAME_NOLOGZ, "20000000", "No logarithmic Z, could decrease number of Z-artefacts - 20000000");
|
||||||
|
add_map_entry(GAME_INTERLACE2X, "00000004", "Interlace 2X - 00000004\nFixes 2x bigger screen (Gradius 3).");
|
||||||
|
|
||||||
for(map<string, confOptsStruct>::iterator it = mapConfOpts.begin(); it != mapConfOpts.end(); ++it)
|
for(map<string, confOptsStruct>::iterator it = mapConfOpts.begin(); it != mapConfOpts.end(); ++it)
|
||||||
{
|
{
|
||||||
|
|
|
@ -14,6 +14,7 @@
|
||||||
<Option createDefFile="1" />
|
<Option createDefFile="1" />
|
||||||
<Option createStaticLib="1" />
|
<Option createStaticLib="1" />
|
||||||
<Compiler>
|
<Compiler>
|
||||||
|
<Add option="-Wall" />
|
||||||
<Add option="-g" />
|
<Add option="-g" />
|
||||||
</Compiler>
|
</Compiler>
|
||||||
<Linker>
|
<Linker>
|
||||||
|
@ -29,6 +30,7 @@
|
||||||
<Option createStaticLib="1" />
|
<Option createStaticLib="1" />
|
||||||
<Compiler>
|
<Compiler>
|
||||||
<Add option="-O2" />
|
<Add option="-O2" />
|
||||||
|
<Add option="-W" />
|
||||||
</Compiler>
|
</Compiler>
|
||||||
<Linker>
|
<Linker>
|
||||||
<Add option="-s" />
|
<Add option="-s" />
|
||||||
|
@ -37,11 +39,15 @@
|
||||||
</Target>
|
</Target>
|
||||||
</Build>
|
</Build>
|
||||||
<Compiler>
|
<Compiler>
|
||||||
<Add option="-Wall" />
|
|
||||||
<Add option="`pkg-config gtk+-2.0 --cflags`" />
|
<Add option="`pkg-config gtk+-2.0 --cflags`" />
|
||||||
|
<Add option="-Wno-format" />
|
||||||
|
<Add option="-Wno-unused-parameter" />
|
||||||
|
<Add option="-Wno-unused-value" />
|
||||||
|
<Add option="-Wunused-variable" />
|
||||||
<Add option="-m32" />
|
<Add option="-m32" />
|
||||||
<Add option="-I/opt/cg/include -L/opt/cg/lib" />
|
<Add option="-I/opt/cg/include -L/opt/cg/lib" />
|
||||||
<Add option="-msse2" />
|
<Add option="-fno-strict-aliasing" />
|
||||||
|
<Add option="-pipe -msse -msse2" />
|
||||||
<Add option="-fno-regmove" />
|
<Add option="-fno-regmove" />
|
||||||
<Add option="-DZEROGS_SSE2" />
|
<Add option="-DZEROGS_SSE2" />
|
||||||
<Add directory="../../Linux" />
|
<Add directory="../../Linux" />
|
||||||
|
|
|
@ -266,6 +266,7 @@ struct TGA_HEADER
|
||||||
bool
|
bool
|
||||||
ZeroGS::SaveTGA(const char* filename, int width, int height, void* pdata)
|
ZeroGS::SaveTGA(const char* filename, int width, int height, void* pdata)
|
||||||
{
|
{
|
||||||
|
int err = 0;
|
||||||
TGA_HEADER hdr;
|
TGA_HEADER hdr;
|
||||||
FILE* f = fopen(filename, "wb");
|
FILE* f = fopen(filename, "wb");
|
||||||
if (f == NULL)
|
if (f == NULL)
|
||||||
|
@ -280,8 +281,8 @@ ZeroGS::SaveTGA(const char* filename, int width, int height, void* pdata)
|
||||||
hdr.height = height;
|
hdr.height = height;
|
||||||
hdr.descriptor |= 8|(1<<5); // 8bit alpha, flip vertical
|
hdr.descriptor |= 8|(1<<5); // 8bit alpha, flip vertical
|
||||||
|
|
||||||
fwrite(&hdr, sizeof(hdr), 1, f);
|
err = fwrite(&hdr, sizeof(hdr), 1, f);
|
||||||
fwrite(pdata, width * height * 4, 1, f);
|
err = fwrite(pdata, width * height * 4, 1, f);
|
||||||
fclose(f);
|
fclose(f);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -48,7 +48,10 @@ extern u32 s_uFramebuffer;
|
||||||
# define INC_RESOLVE() ++g_nResolve
|
# define INC_RESOLVE() ++g_nResolve
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef DEVBUILD
|
||||||
static int g_bSaveResolved = 0;
|
static int g_bSaveResolved = 0;
|
||||||
|
#endif
|
||||||
|
|
||||||
extern int s_nResolved;
|
extern int s_nResolved;
|
||||||
extern u32 g_nResolve;
|
extern u32 g_nResolve;
|
||||||
extern bool g_bSaveTrans;
|
extern bool g_bSaveTrans;
|
||||||
|
@ -1241,10 +1244,10 @@ CRenderTarget* ZeroGS::CRenderTargetMngr::GetTarg(const frameInfo& frame, u32 op
|
||||||
// its data instead of resolving then updating (ffx2). Do not change the original target.
|
// its data instead of resolving then updating (ffx2). Do not change the original target.
|
||||||
for(MAPTARGETS::iterator it = mapTargets.begin(); it != mapTargets.end(); ++it) {
|
for(MAPTARGETS::iterator it = mapTargets.begin(); it != mapTargets.end(); ++it) {
|
||||||
if( it->second->start < end && start < it->second->end ) {
|
if( it->second->start < end && start < it->second->end ) {
|
||||||
if((g_GameSettings&GAME_FASTUPDATE) ||
|
if ((g_GameSettings&GAME_FASTUPDATE) ||
|
||||||
(frame.fbw == it->second->fbw) &&
|
((frame.fbw == it->second->fbw) &&
|
||||||
// check depth targets only if partialdepth option
|
// check depth targets only if partialdepth option
|
||||||
((it->second->fbp != frame.fbp) || ((g_GameSettings & GAME_PARTIALDEPTH) && (opts & CRenderTargetMngr::TO_DepthBuffer))))
|
((it->second->fbp != frame.fbp) || ((g_GameSettings & GAME_PARTIALDEPTH) && (opts & CRenderTargetMngr::TO_DepthBuffer)))))
|
||||||
{
|
{
|
||||||
if( besttarg != 0 ) {
|
if( besttarg != 0 ) {
|
||||||
besttarg = 0;
|
besttarg = 0;
|
||||||
|
|
|
@ -19,7 +19,9 @@
|
||||||
#ifndef __ZEROGS__H
|
#ifndef __ZEROGS__H
|
||||||
#define __ZEROGS__H
|
#define __ZEROGS__H
|
||||||
|
|
||||||
|
#ifdef _MSC_VER
|
||||||
#pragma warning(disable:4200) // nonstandard extension used : zero-sized array in struct/union
|
#pragma warning(disable:4200) // nonstandard extension used : zero-sized array in struct/union
|
||||||
|
#endif
|
||||||
|
|
||||||
// ----------------------------- Includes
|
// ----------------------------- Includes
|
||||||
#include "PS2Etypes.h"
|
#include "PS2Etypes.h"
|
||||||
|
|
Loading…
Reference in New Issue