From ea04f341364e44f89195bc4414c57e0666689923 Mon Sep 17 00:00:00 2001 From: arcum42 Date: Sat, 3 Apr 2010 12:48:27 +0000 Subject: [PATCH] zzogl-pg: Reduce the # of compiler warnings. git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2813 96395faa-99c1-11dd-bbfe-3dabce05a288 --- plugins/zzogl-pg/opengl/GSmain.cpp | 4 +- plugins/zzogl-pg/opengl/Linux/Conf.cpp | 13 ++--- plugins/zzogl-pg/opengl/Linux/Linux.cpp | 48 ++++++++++--------- .../opengl/Linux/zzogl-pg/zzogl-pg.cbp | 10 +++- plugins/zzogl-pg/opengl/ZZoglShoots.cpp | 5 +- plugins/zzogl-pg/opengl/targets.cpp | 9 ++-- plugins/zzogl-pg/opengl/zerogs.h | 2 + 7 files changed, 53 insertions(+), 38 deletions(-) diff --git a/plugins/zzogl-pg/opengl/GSmain.cpp b/plugins/zzogl-pg/opengl/GSmain.cpp index 9c0448db61..42e1b216d1 100644 --- a/plugins/zzogl-pg/opengl/GSmain.cpp +++ b/plugins/zzogl-pg/opengl/GSmain.cpp @@ -57,7 +57,7 @@ u8* g_pBasePS2Mem = NULL; int g_TransferredToGPU = 0; 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 CurrentSavestate = 0; // Number of SaveSlot. Default is 0 bool SaveStateExists = true; // We could not know save slot status before first change occured @@ -637,7 +637,7 @@ void ProcessMessages() } else { SendMessage(GShwnd, WM_DESTROY, 0, 0); - g_bHidden = 1; + //g_bHidden = 1; return; } } diff --git a/plugins/zzogl-pg/opengl/Linux/Conf.cpp b/plugins/zzogl-pg/opengl/Linux/Conf.cpp index b13c850e91..4caac02e5d 100644 --- a/plugins/zzogl-pg/opengl/Linux/Conf.cpp +++ b/plugins/zzogl-pg/opengl/Linux/Conf.cpp @@ -46,6 +46,7 @@ void SaveConfig() void LoadConfig() { + int err = 0; memset(&conf, 0, sizeof(conf)); conf.interlace = 0; // on, mode 1 conf.mrtdepth = 1; @@ -63,12 +64,12 @@ void LoadConfig() SaveConfig();//save and return return; } - fscanf(f, "interlace = %hhx\n", &conf.interlace); - fscanf(f, "mrtdepth = %hhx\n", &conf.mrtdepth); - fscanf(f, "options = %x\n", &conf.options);//u32 - fscanf(f, "bilinear = %hhx\n", &conf.bilinear); - fscanf(f, "aliasing = %hhx\n", &conf.aa); - fscanf(f, "gamesettings = %x\n", &conf.gamesettings);//u32 + err = fscanf(f, "interlace = %hhx\n", &conf.interlace); + err = fscanf(f, "mrtdepth = %hhx\n", &conf.mrtdepth); + err = fscanf(f, "options = %x\n", &conf.options);//u32 + err = fscanf(f, "bilinear = %hhx\n", &conf.bilinear); + err = fscanf(f, "aliasing = %hhx\n", &conf.aa); + err = fscanf(f, "gamesettings = %x\n", &conf.gamesettings);//u32 fclose(f); // filter bad files diff --git a/plugins/zzogl-pg/opengl/Linux/Linux.cpp b/plugins/zzogl-pg/opengl/Linux/Linux.cpp index d90a880e43..e8cc5689eb 100644 --- a/plugins/zzogl-pg/opengl/Linux/Linux.cpp +++ b/plugins/zzogl-pg/opengl/Linux/Linux.cpp @@ -24,6 +24,7 @@ #include "GS.h" #include "Linux.h" +#include "zerogs.h" #include @@ -113,29 +114,30 @@ void CreateGameHackTable(GtkWidget *treeview) //setup the model with all our rows of option data 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(0x00000010, "00000010", "No target resolves - 00000010\nStops all resolving of targets. Try this first for really slow games. Dark Cloud 1"); - add_map_entry(0x00000020, "00000020", "Exact color testing - 00000020\nFixes overbright or shadow/black artifacts (Crash 'n Burn)."); - add_map_entry(0x00000040, "00000040", "No color clamping - 00000040\nSpeeds up games, but might be too bright or too dim."); - 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(0x00000200, "00000200", "Disable depth updates - 00000200"); - add_map_entry(0x00000400, "00000400", "Resolve Hack #1 - 00000400\nKingdom Hearts. Speeds some games."); - add_map_entry(0x00000800, "00000800", "Resolve Hack #2 - 00000800\nShadow Hearts, Urbz. Destroy FFX"); - add_map_entry(0x00001000, "00001000", "No target CLUT - 00001000\nResident Evil 4, or foggy scenes."); - add_map_entry(0x00002000, "00002000", "Disable stencil buffer - 00002000\nUsually safe to do for simple scenes. Harvest Moon"); - add_map_entry(0x00008000, "00008000", "No depth resolve - 00008000\nMight give z buffer artifacts."); - add_map_entry(0x00010000, "00010000", "Full 16 bit resolution - 00010000\nUse when half the screen is missing."); - add_map_entry(0x00020000, "00020000", "Resolve Hack #3 - 00020000\nNeopets"); - add_map_entry(0x00040000, "00040000", "Fast Update - 00040000\nOkami. Speeds some games. Needs for Sonic Unleashed"); - add_map_entry(0x00080000, "00080000", "Disable alpha testing - 00080000"); - add_map_entry(0x00100000, "00100000", "Enable Multiple RTs - 00100000"); - add_map_entry(0x01000000, "01000000", "Specular Highlights - 01000000\nMakes Xenosaga and Okage graphics faster by removing highlights"); - add_map_entry(0x02000000, "02000000", "Partial targets - 02000000"); - add_map_entry(0x04000000, "04000000", "Partial depth - 04000000"); - add_map_entry(0x10000000, "10000000", "Gust fix, made gustgame more clean and fast - 10000000"); - add_map_entry(0x20000000, "20000000", "No logarithmic Z, could decrease number of Z-artefacts - 20000000"); - add_map_entry(0x00000004, "00000004", "Interlace 2X - 00000004\nFixes 2x bigger screen (Gradius 3)."); + + add_map_entry(GAME_TEXTURETARGS, "00000001", "Tex Target checking - 00000001\nLego Racers"); + 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(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(GAME_EXACTCOLOR, "00000020", "Exact color testing - 00000020\nFixes overbright or shadow/black artifacts (Crash 'n Burn)."); + add_map_entry(GAME_NOCOLORCLAMP, "00000040", "No color clamping - 00000040\nSpeeds up games, but might be too bright or too dim."); + 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(GAME_NODEPTHUPDATE, "00000200", "Disable depth updates - 00000200"); + add_map_entry(GAME_QUICKRESOLVE1, "00000400", "Resolve Hack #1 - 00000400\nKingdom Hearts. Speeds some games."); + add_map_entry(GAME_NOQUICKRESOLVE, "00000800", "Resolve Hack #2 - 00000800\nShadow Hearts, Urbz. Destroy FFX"); + add_map_entry(GAME_NOTARGETCLUT, "00001000", "No target CLUT - 00001000\nResident Evil 4, or foggy scenes."); + add_map_entry(GAME_NOSTENCIL, "00002000", "Disable stencil buffer - 00002000\nUsually safe to do for simple scenes. Harvest Moon"); + add_map_entry(GAME_NODEPTHRESOLVE, "00008000", "No depth resolve - 00008000\nMight give z buffer artifacts."); + add_map_entry(GAME_FULL16BITRES, "00010000", "Full 16 bit resolution - 00010000\nUse when half the screen is missing."); + add_map_entry(GAME_RESOLVEPROMOTED, "00020000", "Resolve Hack #3 - 00020000\nNeopets"); + add_map_entry(GAME_FASTUPDATE, "00040000", "Fast Update - 00040000\nOkami. Speeds some games. Needs for Sonic Unleashed"); + add_map_entry(GAME_NOALPHATEST, "00080000", "Disable alpha testing - 00080000"); + add_map_entry(GAME_DISABLEMRTDEPTH, "00100000", "Enable Multiple RTs - 00100000"); + add_map_entry(GAME_XENOSPECHACK, "01000000", "Specular Highlights - 01000000\nMakes Xenosaga and Okage graphics faster by removing highlights"); + add_map_entry(GAME_PARTIALPOINTERS, "02000000", "Partial targets - 02000000"); + add_map_entry(GAME_PARTIALDEPTH, "04000000", "Partial depth - 04000000"); + add_map_entry(GAME_GUSTHACK, "10000000", "Gust fix, made gustgame more clean and fast - 10000000"); + 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::iterator it = mapConfOpts.begin(); it != mapConfOpts.end(); ++it) { diff --git a/plugins/zzogl-pg/opengl/Linux/zzogl-pg/zzogl-pg.cbp b/plugins/zzogl-pg/opengl/Linux/zzogl-pg/zzogl-pg.cbp index 8b1036182b..f68a2f5e6d 100644 --- a/plugins/zzogl-pg/opengl/Linux/zzogl-pg/zzogl-pg.cbp +++ b/plugins/zzogl-pg/opengl/Linux/zzogl-pg/zzogl-pg.cbp @@ -14,6 +14,7 @@