warning fixes

please review Source/Plugins/Plugin_VideoOGL/Src/VertexManager.cpp


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@1307 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
nakeee
2008-11-26 20:28:03 +00:00
parent 8777917177
commit 0bad9e9385
12 changed files with 42 additions and 59 deletions

View File

@ -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<PROFILE_MAP_SIZE;i++)
{
if (g_profileMap[i] > 0)
{
fprintf(pFile, "0x%04X: %u\n", i, g_profileMap[i]);
fprintf(pFile, "0x%04X: %llu\n", i, g_profileMap[i]);
}
}

View File

@ -19,6 +19,7 @@
#define _GLOBALS_H
#include "pluginspecs_dsp.h"
#include "Common.h"
#include <stdio.h>
#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;

View File

@ -32,7 +32,7 @@ public:
TAccumulator()
{
_dbg_assert_(N < 2);
_assert_(N < 2);
}
void operator=(sint64 val)
@ -126,4 +126,4 @@ public:
}
};
#endif
#endif

View File

@ -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<<i))
{
_dbg_assert_msg_(!g_dsp.exception_in_progress_hack, "assert while exception");
_assert_msg_(!g_dsp.exception_in_progress_hack, "assert while exception");
dsp_reg_store_stack(DSP_STACK_C, g_dsp.pc);
dsp_reg_store_stack(DSP_STACK_D, g_dsp.r[R_SR]);
@ -441,4 +441,4 @@ void Hacks()
exit(1);
}
}
}
}

View File

@ -199,7 +199,7 @@ bool CheckCondition(uint8 _Condition)
void dsp_op_unknown(uint16 opc)
{
_dbg_assert_msg_(!g_dsp.exception_in_progress_hack, "assert while exception");
_assert_msg_(!g_dsp.exception_in_progress_hack, "assert while exception");
ErrorLog("dsp_op_unknown somewhere");
g_dsp.pc = g_dsp.err_pc;
}

View File

@ -151,7 +151,7 @@ inline sint64 dsp_get_long_acc(uint8 reg)
ProfilerAddDelta(g_dsp.err_pc, 1);
#endif
_dbg_assert_(reg < 2);
_assert_(reg < 2);
sint64 val;
sint64 low_acc;
val = (sint8)g_dsp.r[0x10 + reg];
@ -170,7 +170,7 @@ inline uint64 dsp_get_ulong_acc(uint8 reg)
ProfilerAddDelta(g_dsp.err_pc, 1);
#endif
_dbg_assert_(reg < 2);
_assert_(reg < 2);
uint64 val;
uint64 low_acc;
val = (uint8)g_dsp.r[0x10 + reg];
@ -189,7 +189,7 @@ inline void dsp_set_long_acc(uint8 _reg, sint64 val)
ProfilerAddDelta(g_dsp.err_pc, 1);
#endif
_dbg_assert_(_reg < 2);
_assert_(_reg < 2);
g_dsp.r[0x1c + _reg] = (uint16)val;
val >>= 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]);
}

View File

@ -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);
}
// --------------