diff --git a/Source/Plugins/Plugin_DSP_LLE/Src/Globals.cpp b/Source/Plugins/Plugin_DSP_LLE/Src/Globals.cpp index ca3c6a8e80..b45b2c41e7 100644 --- a/Source/Plugins/Plugin_DSP_LLE/Src/Globals.cpp +++ b/Source/Plugins/Plugin_DSP_LLE/Src/Globals.cpp @@ -117,12 +117,12 @@ void ProfilerDump(uint64 count) FILE* pFile = fopen("c:\\_\\DSP_Prof.txt", "wt"); if (pFile != NULL) { - fprintf(pFile, "Number of DSP steps: %i\n\n", count); + fprintf(pFile, "Number of DSP steps: %llu\n\n", count); for (int i=0; i 0) { - fprintf(pFile, "0x%04X: %u\n", i, g_profileMap[i]); + fprintf(pFile, "0x%04X: %llu\n", i, g_profileMap[i]); } } diff --git a/Source/Plugins/Plugin_DSP_LLE/Src/Globals.h b/Source/Plugins/Plugin_DSP_LLE/Src/Globals.h index 42287e3857..d5c4f43a73 100644 --- a/Source/Plugins/Plugin_DSP_LLE/Src/Globals.h +++ b/Source/Plugins/Plugin_DSP_LLE/Src/Globals.h @@ -19,6 +19,7 @@ #define _GLOBALS_H #include "pluginspecs_dsp.h" +#include "Common.h" #include #define WITH_DSP_ON_THREAD 1 @@ -31,24 +32,6 @@ void ErrorLog(const char* _fmt, ...); void DSP_DebugBreak(); -#ifndef _dbg_assert_ - #if defined(_DEBUG) || defined(DEBUGFAST) - - #undef _dbg_assert_ - #undef _dbg_assert_msg_ - #define _dbg_assert_(_a_) if (!(_a_)){DebugBreak();} - #define _dbg_assert_msg_(_a_, _desc_, ...)\ - if (!(_a_)){\ - if (MessageBox(NULL, _desc_, "*** Fatal Error ***", MB_YESNO | MB_ICONERROR) == IDNO){DebugBreak();}} - - #else - - #define _dbg_assert_(_a_); - #define _dbg_assert_msg_(_a_, _desc_, ...); - - #endif -#endif - typedef unsigned char uint8; typedef unsigned short uint16; typedef unsigned int uint32; diff --git a/Source/Plugins/Plugin_DSP_LLE/Src/HLE_Helper.h b/Source/Plugins/Plugin_DSP_LLE/Src/HLE_Helper.h index f0e5abb76c..11108a7e24 100644 --- a/Source/Plugins/Plugin_DSP_LLE/Src/HLE_Helper.h +++ b/Source/Plugins/Plugin_DSP_LLE/Src/HLE_Helper.h @@ -32,7 +32,7 @@ public: TAccumulator() { - _dbg_assert_(N < 2); + _assert_(N < 2); } void operator=(sint64 val) @@ -126,4 +126,4 @@ public: } }; -#endif \ No newline at end of file +#endif diff --git a/Source/Plugins/Plugin_DSP_LLE/Src/gdsp_interpreter.cpp b/Source/Plugins/Plugin_DSP_LLE/Src/gdsp_interpreter.cpp index f609298237..02fc2987fd 100644 --- a/Source/Plugins/Plugin_DSP_LLE/Src/gdsp_interpreter.cpp +++ b/Source/Plugins/Plugin_DSP_LLE/Src/gdsp_interpreter.cpp @@ -131,8 +131,8 @@ void gdsp_init() void gdsp_reset() { -// _dbg_assert_msg_(0, "gdsp_reset()"); - _dbg_assert_msg_(!g_dsp.exception_in_progress_hack, "assert while exception"); +// _assert_msg_(0, "gdsp_reset()"); + _assert_msg_(!g_dsp.exception_in_progress_hack, "assert while exception"); g_dsp.pc = DSP_RESET_VECTOR; g_dsp.exception_in_progress_hack = false; } @@ -294,7 +294,7 @@ void gdsp_step() { if (gdsp_exceptions & (1<>= 16; g_dsp.r[0x1e + _reg] = (uint16)val; @@ -200,21 +200,21 @@ inline void dsp_set_long_acc(uint8 _reg, sint64 val) inline sint16 dsp_get_acc_l(uint8 _reg) { - _dbg_assert_(_reg < 2); + _assert_(_reg < 2); return(g_dsp.r[0x1c + _reg]); } inline sint16 dsp_get_acc_m(uint8 _reg) { - _dbg_assert_(_reg < 2); + _assert_(_reg < 2); return(g_dsp.r[0x1e + _reg]); } inline sint16 dsp_get_acc_h(uint8 _reg) { - _dbg_assert_(_reg < 2); + _assert_(_reg < 2); return(g_dsp.r[0x10 + _reg]); } @@ -232,7 +232,7 @@ inline sint64 dsp_get_long_acx(uint8 _reg) ProfilerAddDelta(g_dsp.err_pc, 1); #endif - _dbg_assert_(_reg < 2); + _assert_(_reg < 2); sint64 val = (sint16)g_dsp.r[0x1a + _reg]; val <<= 16; sint64 low_acc = g_dsp.r[0x18 + _reg]; @@ -243,14 +243,14 @@ inline sint64 dsp_get_long_acx(uint8 _reg) inline sint16 dsp_get_ax_l(uint8 _reg) { - _dbg_assert_(_reg < 2); + _assert_(_reg < 2); return(g_dsp.r[0x18 + _reg]); } inline sint16 dsp_get_ax_h(uint8 _reg) { - _dbg_assert_(_reg < 2); + _assert_(_reg < 2); return(g_dsp.r[0x1a + _reg]); } diff --git a/Source/Plugins/Plugin_DSP_LLE/Src/main.cpp b/Source/Plugins/Plugin_DSP_LLE/Src/main.cpp index a673c52c5c..f07630a682 100644 --- a/Source/Plugins/Plugin_DSP_LLE/Src/main.cpp +++ b/Source/Plugins/Plugin_DSP_LLE/Src/main.cpp @@ -254,7 +254,7 @@ void DSP_Initialize(DSPInitialize _dspInitialize) if (t != NULL) { gd_globals_t gdg; - gd_dis_file(&gdg, "C:\\_\\DSP_UC_09CD143F.bin", t); + gd_dis_file(&gdg, (char *)"C:\\_\\DSP_UC_09CD143F.bin", t); fclose(t); } // -------------- diff --git a/Source/Plugins/Plugin_VideoOGL/Src/Debugger/Debugger.cpp b/Source/Plugins/Plugin_VideoOGL/Src/Debugger/Debugger.cpp index a20cd1450d..13cdeddaad 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/Debugger/Debugger.cpp +++ b/Source/Plugins/Plugin_VideoOGL/Src/Debugger/Debugger.cpp @@ -459,8 +459,8 @@ void CDebugger::DoShowHideConsole() void CDebugger::LogSettings(wxCommandEvent& event) { // Only allow one selected log at a time - for (int i = 0; i < m_settings->GetCount(); ++i) - if(i != event.GetInt()) m_settings->Check(i, false); + for (u32 i = 0; i < m_settings->GetCount(); ++i) + if(i != (u32)event.GetInt()) m_settings->Check(i, false); if(m_settings->IsChecked(0)) g_Config.iLog = CONF_LOG; else if(m_settings->IsChecked(1)) g_Config.iLog = CONF_PRIMLOG; diff --git a/Source/Plugins/Plugin_VideoOGL/Src/Logging/Logging.cpp b/Source/Plugins/Plugin_VideoOGL/Src/Logging/Logging.cpp index 7399e6ecc5..212cd513cb 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/Logging/Logging.cpp +++ b/Source/Plugins/Plugin_VideoOGL/Src/Logging/Logging.cpp @@ -223,7 +223,7 @@ void Logging(int a) iupdonce = true; } - for (int i = 0; i < viupd.size(); i++) // 0, 1,..., 9 + for (u32 i = 0; i < viupd.size(); i++) // 0, 1,..., 9 { if (i < viupd.size()-1) { @@ -245,7 +245,7 @@ void Logging(int a) } } - for (int i = 0; i < viupd.size(); i++) + for (u32 i = 0; i < viupd.size(); i++) { if(viupd.at(i) == 0) sbuff = sbuff + " "; diff --git a/Source/Plugins/Plugin_VideoOGL/Src/NativeVertexFormat.cpp b/Source/Plugins/Plugin_VideoOGL/Src/NativeVertexFormat.cpp index d13cb06daf..89c46d9cde 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/NativeVertexFormat.cpp +++ b/Source/Plugins/Plugin_VideoOGL/Src/NativeVertexFormat.cpp @@ -72,13 +72,13 @@ inline GLuint VarToGL(VarType t) return lookup[t]; } -void NativeVertexFormat::Initialize(const PortableVertexDeclaration &vtx_decl) +void NativeVertexFormat::Initialize(const PortableVertexDeclaration &_vtx_decl) { using namespace Gen; - if (vtx_decl.stride & 3) { + if (_vtx_decl.stride & 3) { // We will not allow vertex components causing uneven strides. - PanicAlert("Uneven vertex stride: %i", vtx_decl.stride); + PanicAlert("Uneven vertex stride: %i", _vtx_decl.stride); } #ifdef USE_JIT @@ -87,22 +87,22 @@ void NativeVertexFormat::Initialize(const PortableVertexDeclaration &vtx_decl) SetCodePtr(m_compiledCode); ABI_EmitPrologue(6); - CallCdeclFunction4_I(glVertexPointer, 3, GL_FLOAT, vtx_decl.stride, 0); + CallCdeclFunction4_I(glVertexPointer, 3, GL_FLOAT, _vtx_decl.stride, 0); if (vtx_decl.num_normals >= 1) { - CallCdeclFunction3_I(glNormalPointer, VarToGL(vtx_decl.normal_gl_type), vtx_decl.stride, vtx_decl.normal_offset[0]); + CallCdeclFunction3_I(glNormalPointer, VarToGL(vtx_decl.normal_gl_type), _vtx_decl.stride, vtx_decl.normal_offset[0]); if (vtx_decl.num_normals == 3) { - CallCdeclFunction6((void *)glVertexAttribPointer, SHADER_NORM1_ATTRIB, vtx_decl.normal_gl_size, VarToGL(vtx_decl.normal_gl_type), GL_TRUE, vtx_decl.stride, vtx_decl.normal_offset[1]); - CallCdeclFunction6((void *)glVertexAttribPointer, SHADER_NORM2_ATTRIB, vtx_decl.normal_gl_size, VarToGL(vtx_decl.normal_gl_type), GL_TRUE, vtx_decl.stride, vtx_decl.normal_offset[2]); + CallCdeclFunction6((void *)glVertexAttribPointer, SHADER_NORM1_ATTRIB, vtx_decl.normal_gl_size, VarToGL(vtx_decl.normal_gl_type), GL_TRUE, _vtx_decl.stride, vtx_decl.normal_offset[1]); + CallCdeclFunction6((void *)glVertexAttribPointer, SHADER_NORM2_ATTRIB, vtx_decl.normal_gl_size, VarToGL(vtx_decl.normal_gl_type), GL_TRUE, _vtx_decl.stride, vtx_decl.normal_offset[2]); } } for (int i = 0; i < 2; i++) { if (vtx_decl.color_offset[i] != -1) { if (i == 0) - CallCdeclFunction4_I(glColorPointer, 4, GL_UNSIGNED_BYTE, vtx_decl.stride, vtx_decl.color_offset[i]); + CallCdeclFunction4_I(glColorPointer, 4, GL_UNSIGNED_BYTE, _vtx_decl.stride, vtx_decl.color_offset[i]); else - CallCdeclFunction4((void *)glSecondaryColorPointer, 4, GL_UNSIGNED_BYTE, vtx_decl.stride, vtx_decl.color_offset[i]); + CallCdeclFunction4((void *)glSecondaryColorPointer, 4, GL_UNSIGNED_BYTE, _vtx_decl.stride, vtx_decl.color_offset[i]); } } @@ -129,12 +129,12 @@ void NativeVertexFormat::Initialize(const PortableVertexDeclaration &vtx_decl) #endif CallCdeclFunction4_I( glTexCoordPointer, vtx_decl.texcoord_size[i], VarToGL(vtx_decl.texcoord_gl_type[i]), - vtx_decl.stride, vtx_decl.texcoord_offset[i]); + _vtx_decl.stride, vtx_decl.texcoord_offset[i]); } } if (vtx_decl.posmtx_offset != -1) { - CallCdeclFunction6((void *)glVertexAttribPointer, SHADER_POSMTX_ATTRIB, 4, GL_UNSIGNED_BYTE, GL_FALSE, vtx_decl.stride, vtx_decl.posmtx_offset); + CallCdeclFunction6((void *)glVertexAttribPointer, SHADER_POSMTX_ATTRIB, 4, GL_UNSIGNED_BYTE, GL_FALSE, _vtx_decl.stride, vtx_decl.posmtx_offset); } ABI_EmitEpilogue(6); @@ -185,4 +185,4 @@ void NativeVertexFormat::SetupVertexPointers() const { glVertexAttribPointer(SHADER_POSMTX_ATTRIB, 4, GL_UNSIGNED_BYTE, GL_FALSE, vtx_decl.stride, (void *)vtx_decl.posmtx_offset); } #endif -} \ No newline at end of file +} diff --git a/Source/Plugins/Plugin_VideoOGL/Src/TextureConverter.cpp b/Source/Plugins/Plugin_VideoOGL/Src/TextureConverter.cpp index f5c864f012..0062c3203a 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/TextureConverter.cpp +++ b/Source/Plugins/Plugin_VideoOGL/Src/TextureConverter.cpp @@ -38,7 +38,7 @@ static FRAGMENTSHADER s_yuyvToRgbProgram; void CreateRgbToYuyvProgram() { // output is BGRA because that is slightly faster than RGBA - char *FProgram = + char *FProgram = (char *) "uniform samplerRECT samp0 : register(s0);\n" "void main(\n" " out float4 ocol0 : COLOR0,\n" @@ -63,7 +63,7 @@ void CreateRgbToYuyvProgram() void CreateYuyvToRgbProgram() { - char *FProgram = + char *FProgram = (char *) "uniform samplerRECT samp0 : register(s0);\n" "void main(\n" " out float4 ocol0 : COLOR0,\n" @@ -221,4 +221,4 @@ void DecodeToTexture(u8* srcAddr, int srcWidth, int srcHeight, GLuint destTextur GL_REPORT_ERRORD(); } -} \ No newline at end of file +} diff --git a/Source/Plugins/Plugin_VideoOGL/Src/VertexManager.cpp b/Source/Plugins/Plugin_VideoOGL/Src/VertexManager.cpp index c62791c989..3d43d6b5ba 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/VertexManager.cpp +++ b/Source/Plugins/Plugin_VideoOGL/Src/VertexManager.cpp @@ -28,7 +28,7 @@ namespace VertexManager static GLuint s_vboBuffers[0x40] = {0}; static int s_nCurVBOIndex = 0; // current free buffer static u8 *s_pBaseBufferPointer = NULL; -static std::vector< std::pair > s_vStoredPrimitives; // every element, mode and count to be passed to glDrawArrays +static std::vector< std::pair > s_vStoredPrimitives; // every element, mode and count to be passed to glDrawArrays static u32 s_prevcomponents; // previous state set u8* s_pCurBufferPointer = NULL; @@ -103,7 +103,7 @@ void AddVertices(int primitive, int numvertices) c_primitiveType[primitive] == GL_QUADS) { INCSTAT(stats.thisFrame.numPrimitiveJoins); // Easy join - std::pair &last_pair = s_vStoredPrimitives[s_vStoredPrimitives.size() - 1]; + std::pair &last_pair = s_vStoredPrimitives[s_vStoredPrimitives.size() - 1]; last_pair.second += numvertices; return; } @@ -263,7 +263,7 @@ void Flush() #endif int offset = 0; - for (std::vector< std::pair >::const_iterator it = s_vStoredPrimitives.begin(); it != s_vStoredPrimitives.end(); ++it) + for (std::vector< std::pair >::const_iterator it = s_vStoredPrimitives.begin(); it != s_vStoredPrimitives.end(); ++it) { INCSTAT(stats.thisFrame.numDrawCalls); glDrawArrays(it->first, offset, it->second);