From 57c5cb12e9881def0f5d927484cadf0f1b2d9dbf Mon Sep 17 00:00:00 2001 From: Maarten ter Huurne Date: Wed, 27 Aug 2008 12:17:47 +0000 Subject: [PATCH] Fixed warnings about missing braces in array initialisation. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@356 8ced0084-cf51-0410-be5f-012b33b47a6e --- .../Plugins/Plugin_VideoOGL/Src/PixelShaderManager.cpp | 2 +- .../Plugins/Plugin_VideoOGL/Src/VertexShaderManager.cpp | 9 ++++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/Source/Plugins/Plugin_VideoOGL/Src/PixelShaderManager.cpp b/Source/Plugins/Plugin_VideoOGL/Src/PixelShaderManager.cpp index 2f4b43738a..01a2c12826 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/PixelShaderManager.cpp +++ b/Source/Plugins/Plugin_VideoOGL/Src/PixelShaderManager.cpp @@ -33,7 +33,7 @@ static int s_nMaxPixelInstructions; static int s_nColorsChanged[2]; // 0 - regular colors, 1 - k colors static int s_nTexDimsChanged[2], s_nIndTexMtxChanged = 0; //min, max static bool s_bAlphaChanged, s_bZBiasChanged, s_bIndTexScaleChanged; -static float lastRGBAfull[2][4][4] = {0}; +static float lastRGBAfull[2][4][4]; static u32 lastAlpha = 0; static u32 lastTexDims[8]={0}; static u32 lastZBias = 0; diff --git a/Source/Plugins/Plugin_VideoOGL/Src/VertexShaderManager.cpp b/Source/Plugins/Plugin_VideoOGL/Src/VertexShaderManager.cpp index 576e08225f..bf70f9fed9 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/VertexShaderManager.cpp +++ b/Source/Plugins/Plugin_VideoOGL/Src/VertexShaderManager.cpp @@ -192,11 +192,10 @@ bool VertexShaderMngr::CompileVertexShader(VERTEXSHADER& vs, const char* pstrpro return true; } -// TODO: this array is misdeclared. Why teh f** does it go through the compilers? -const u16 s_mtrltable[16][2] = {0, 0, 0, 1, 1, 1, 0, 2, - 2, 1, 0, 3, 1, 2, 0, 3, - 3, 1, 0, 4, 1, 3, 0, 4, - 2, 2, 0, 4, 1, 3, 0, 4}; +const u16 s_mtrltable[16][2] = {{0, 0}, {0, 1}, {1, 1}, {0, 2}, + {2, 1}, {0, 3}, {1, 2}, {0, 3}, + {3, 1}, {0, 4}, {1, 3}, {0, 4}, + {2, 2}, {0, 4}, {1, 3}, {0, 4}}; /// syncs the shader constant buffers with xfmem void VertexShaderMngr::SetConstants(VERTEXSHADER& vs)