From 1d05290be7f884eade268b3317a31c32028e08df Mon Sep 17 00:00:00 2001 From: Soren Jorvang Date: Sat, 28 Aug 2010 15:53:01 +0000 Subject: [PATCH] Include "Hash.h" rather than "hash.h" for case-sensitive file systems. Fix some compiler warnings. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6141 8ced0084-cf51-0410-be5f-012b33b47a6e --- Source/Core/Core/Src/PowerPC/Jit64/Jit_LoadStore.cpp | 4 ++-- Source/Core/VideoCommon/Src/TextureDecoder.h | 2 +- Source/Core/VideoCommon/Src/VertexShaderGen.cpp | 10 +++++----- Source/Plugins/Plugin_VideoOGL/Src/DLCache.cpp | 8 ++++---- .../Plugin_WiimoteNew/Src/WiimoteEmu/MatrixMath.h | 2 +- .../Plugin_WiimoteNew/Src/WiimoteEmu/WiimoteEmu.cpp | 2 +- 6 files changed, 14 insertions(+), 14 deletions(-) diff --git a/Source/Core/Core/Src/PowerPC/Jit64/Jit_LoadStore.cpp b/Source/Core/Core/Src/PowerPC/Jit64/Jit_LoadStore.cpp index 4dd676e57a..5365c50424 100644 --- a/Source/Core/Core/Src/PowerPC/Jit64/Jit_LoadStore.cpp +++ b/Source/Core/Core/Src/PowerPC/Jit64/Jit_LoadStore.cpp @@ -50,8 +50,8 @@ void Jit64::lXXx(UGeckoInstruction inst) { Default(inst); return; } // Determine memory access size and sign extend - int accessSize; - bool signExtend; + int accessSize = 0; + bool signExtend = false; switch (inst.OPCD) { case 32: /* lwz */ diff --git a/Source/Core/VideoCommon/Src/TextureDecoder.h b/Source/Core/VideoCommon/Src/TextureDecoder.h index 828dd3e8bc..15e19c4389 100644 --- a/Source/Core/VideoCommon/Src/TextureDecoder.h +++ b/Source/Core/VideoCommon/Src/TextureDecoder.h @@ -17,7 +17,7 @@ #ifndef _TEXTUREDECODER_H #define _TEXTUREDECODER_H -#include "hash.h" +#include "Hash.h" enum { TMEM_SIZE = 1024*1024, diff --git a/Source/Core/VideoCommon/Src/VertexShaderGen.cpp b/Source/Core/VideoCommon/Src/VertexShaderGen.cpp index 6a40609e11..d271299d44 100644 --- a/Source/Core/VideoCommon/Src/VertexShaderGen.cpp +++ b/Source/Core/VideoCommon/Src/VertexShaderGen.cpp @@ -240,7 +240,7 @@ const char *GenerateVertexShaderCode(u32 components, API_TYPE api_type) if (components & (VB_HAS_COL0 << j)) WRITE(p, "mat = color%d;\n", j); else if (components & VB_HAS_COL0) - WRITE(p, "mat = color0;\n", j); + WRITE(p, "mat = color0;\n"); else WRITE(p, "mat = float4(1.0f, 1.0f, 1.0f, 1.0f);\n"); } @@ -252,7 +252,7 @@ const char *GenerateVertexShaderCode(u32 components, API_TYPE api_type) if (components & (VB_HAS_COL0< 0.0f) ? max(0.0f, dot(_norm0, "I_LIGHTS".lights[%d].dir.xyz)) : 0.0f;\n", index, index); + WRITE(p, "attn = (dot(_norm0,ldir) > 0.0f) ? max(0.0f, dot(_norm0, "I_LIGHTS".lights[%d].dir.xyz)) : 0.0f;\n", index); WRITE(p, "attn = max(0.0f, dot("I_LIGHTS".lights[%d].cosatt.xyz, float3(1,attn,attn*attn))) / dot("I_LIGHTS".lights[%d].distatt.xyz, float3(1,attn,attn*attn));\n", index, index); } diff --git a/Source/Plugins/Plugin_VideoOGL/Src/DLCache.cpp b/Source/Plugins/Plugin_VideoOGL/Src/DLCache.cpp index dbc4eee3a8..b07ca49cc6 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/DLCache.cpp +++ b/Source/Plugins/Plugin_VideoOGL/Src/DLCache.cpp @@ -200,9 +200,9 @@ bool AnalyzeAndRunDisplayList(u32 address, int size, CachedDisplayList *dl) break; case GX_CMD_CALL_DL: { - u32 address = DataReadU32(); + u32 addr = DataReadU32(); u32 count = DataReadU32(); - ExecuteDisplayList(address, count); + ExecuteDisplayList(addr, count); } break; case GX_CMD_UNKNOWN_METRICS: // zelda 4 swords calls it and checks the metrics registers after that @@ -359,9 +359,9 @@ bool CompileAndRunDisplayList(u32 address, int size, CachedDisplayList *dl) case GX_CMD_CALL_DL: { - u32 address = DataReadU32(); + u32 addr= DataReadU32(); u32 count = DataReadU32(); - ExecuteDisplayList(address, count); + ExecuteDisplayList(addr, count); emitter.ABI_CallFunctionCC((void *)&ExecuteDisplayList, address, count); } break; diff --git a/Source/Plugins/Plugin_WiimoteNew/Src/WiimoteEmu/MatrixMath.h b/Source/Plugins/Plugin_WiimoteNew/Src/WiimoteEmu/MatrixMath.h index 41e6512916..d1072fefa6 100644 --- a/Source/Plugins/Plugin_WiimoteNew/Src/WiimoteEmu/MatrixMath.h +++ b/Source/Plugins/Plugin_WiimoteNew/Src/WiimoteEmu/MatrixMath.h @@ -81,4 +81,4 @@ inline void MatrixTransformVertex(Matrix const & m, Vertex & v) } } -#endif \ No newline at end of file +#endif diff --git a/Source/Plugins/Plugin_WiimoteNew/Src/WiimoteEmu/WiimoteEmu.cpp b/Source/Plugins/Plugin_WiimoteNew/Src/WiimoteEmu/WiimoteEmu.cpp index 6f019d77dd..4fd416757a 100644 --- a/Source/Plugins/Plugin_WiimoteNew/Src/WiimoteEmu/WiimoteEmu.cpp +++ b/Source/Plugins/Plugin_WiimoteNew/Src/WiimoteEmu/WiimoteEmu.cpp @@ -632,7 +632,7 @@ void Wiimote::Update() // IR if (rptf.ir) - GetIRData(data + rptf.ir, (rptf.accel!=NULL)); + GetIRData(data + rptf.ir, (rptf.accel != 0)); // extension if (rptf.ext)