From 9a5961956064da94e61e64b4c48fc620ffafcafd Mon Sep 17 00:00:00 2001 From: Rodolfo Osvaldo Bogado Date: Fri, 30 Oct 2009 22:28:59 +0000 Subject: [PATCH] Extra small commit but ... Fix Paper mario and any games that uses SETZSCALE or SETZOFFSET c# is making me soft i don't see the cast error git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4485 8ced0084-cf51-0410-be5f-012b33b47a6e --- Source/Core/VideoCommon/Src/XFStructs.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Source/Core/VideoCommon/Src/XFStructs.cpp b/Source/Core/VideoCommon/Src/XFStructs.cpp index 5fd25d31d1..0ccc09c398 100644 --- a/Source/Core/VideoCommon/Src/XFStructs.cpp +++ b/Source/Core/VideoCommon/Src/XFStructs.cpp @@ -175,8 +175,8 @@ void LoadXFReg(u32 transferSize, u32 baseAddress, u32 *pData) // Killer 7 writes 16777216.0f here case XFMEM_SETZSCALE: VertexManager::Flush(); - VertexShaderManager::SetZScale((float)data); - PixelShaderManager::SetZScale((float)data); + VertexShaderManager::SetZScale(*(float*)&data); + PixelShaderManager::SetZScale(*(float*)&data); INFO_LOG(VIDEO, "Set ZScale : %x=%x\n", address, data); break; @@ -184,8 +184,8 @@ void LoadXFReg(u32 transferSize, u32 baseAddress, u32 *pData) // Killer 7 alterns this between 16777216.0f and 16710107.0f case XFMEM_SETZOFFSET: VertexManager::Flush(); - VertexShaderManager::SetZOffset((float)data); - PixelShaderManager::SetZOffset((float)data); + VertexShaderManager::SetZOffset(*(float*)&data); + PixelShaderManager::SetZOffset(*(float*)&data); INFO_LOG(VIDEO, "Set ZOffset : %x=%x\n", address, data); break;