Trying a fix to floating point single (issue 1556), Sonic Unleashed now have correct projections, also re-enabled color buffer clear on OpenGL plugin (was causing flickering in fullscreen and garbage on sides...)

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4441 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
sl1nk3.s 2009-10-20 23:09:44 +00:00
parent d40ce3f1e5
commit c600926710
4 changed files with 13 additions and 72 deletions

View File

@ -87,8 +87,11 @@ inline double ForceSingle(double _x)
// PanicAlert("RN = %d at %x", (int)FPSCR.RN, PC);
if (FPSCR.NI)
_x = FlushToZeroAsFloat(_x);
double x = static_cast<float>(_x);
return x;
IntDouble single;
single.d = _x;
memset(&single.i, 0, 4);
return single.d;
}
inline double ForceDouble(double d)

View File

@ -39,7 +39,6 @@
// TODO: Investigate a memory leak on save/load state
#if defined(__LZO_STRICT_16BIT)
#define IN_LEN (8*1024u)
#elif defined(LZO_ARCH_I086) && !defined(LZO_HAVE_MM_HUGE_ARRAY)
@ -71,18 +70,18 @@ static bool const bCompressed = true;
static Common::Thread *saveThread = NULL;
enum
{
version = 1,
};
// Don't forget to increase this after doing changes on the savestate system
#define STATE_VERSION 1
void DoState(PointerWrap &p)
{
u32 cookie = 0xBAADBABE + version;
u32 cookie = 0xBAADBABE + STATE_VERSION;
p.Do(cookie);
if (cookie != 0xBAADBABE + version)
if (cookie != 0xBAADBABE + STATE_VERSION)
{
PanicAlert("Can't load states from other versions.");
PanicAlert("Savestate version mismatch !\nSorry, you can't load states from others revisions.");
return;
}
// Begin with video plugin, so that it gets a chance to clear it's caches and writeback modified things to RAM

View File

@ -163,7 +163,7 @@ void CBreakPointWindow::OnAddBreakPointMany()
}
else
{
wxMessageBox(_T("You have no GameIni/BreakPoints.ini file"));
wxMessageBox(_T("Couldn't find User/GameConfig/BreakPoints.ini file"));
}
}

View File

@ -175,67 +175,6 @@ void HandleCgError(CGcontext ctx, CGerror err, void* appdata)
void VideoConfig::UpdateProjectionHack()
{
::UpdateProjectionHack(g_Config.iPhackvalue);
//switch(g_Config.iPhackvalue)
//{
//case OGL_HACK_NONE:
// g_Config.bProjHack1 = 0;
// g_Config.bPhackvalue1 = 0;
// g_Config.bPhackvalue2 = 0;
// break;
//case OGL_HACK_ZELDA_TP_BLOOM_HACK:
// g_Config.bPhackvalue1 = 1;
// g_Config.bProjHack1 = 1;
// break;
//case OGL_HACK_SONIC_AND_THE_BLACK_KNIGHT:
// g_Config.bPhackvalue1 = 1;
// g_Config.fhackvalue1 = 0.00002f;
// g_Config.bPhackvalue2 = 1;
// g_Config.fhackvalue2 = 1.999980f;
// break;
//case OGL_HACK_BLEACH_VERSUS_CRUSADE:
// g_Config.bPhackvalue2 = 1;
// g_Config.fhackvalue2 = 0.5f;
// g_Config.bPhackvalue1 = 0;
// g_Config.bProjHack1 = 0;
// break;
//case OGL_HACK_FINAL_FANTASY_CC_ECHO_OF_TIME:
// g_Config.bPhackvalue1 = 1;
// g_Config.fhackvalue1 = 0.8f;
// g_Config.bPhackvalue2 = 1;
// g_Config.fhackvalue2 = 1.2f;
// g_Config.bProjHack1 = 0;
// break;
//case OGL_HACK_HARVESTMOON_MM:
// g_Config.bPhackvalue1 = 1;
// g_Config.fhackvalue1 = 0.0075f;
// g_Config.bPhackvalue2 = 0;
// g_Config.bProjHack1 = 0;
//case OGL_HACK_BATEN_KAITOS:
// g_Config.bPhackvalue1 = 1;
// g_Config.fhackvalue1 = 0.0026f;
// g_Config.bPhackvalue2 = 1;
// g_Config.fhackvalue2 = 1.9974f;
// g_Config.bProjHack1 = 1;
// break;
//case OGL_HACK_BATEN_KAITOS_ORIGIN:
// g_Config.bPhackvalue1 = 1;
// g_Config.fhackvalue1 = 0.0012f;
// g_Config.bPhackvalue2 = 1;
// g_Config.fhackvalue2 = 1.9988f;
// g_Config.bProjHack1 = 1;
// break;
//case OGL_HACK_SKIES_OF_ARCADIA:
// g_Config.bPhackvalue1 = 1;
// g_Config.fhackvalue1 = 0.04f;
// g_Config.bPhackvalue2 = 0;
// g_Config.bProjHack1 = 0;
// break;
//}
//// Set the projections hacks
//Projection_SetHack0(g_Config.bProjHack1);
//Projection_SetHack1(ProjectionHack(g_Config.bPhackvalue1 == 0 ? false : true, g_Config.fhackvalue1));
//Projection_SetHack2(ProjectionHack(g_Config.bPhackvalue2 == 0 ? false : true, g_Config.fhackvalue2));
}