Initialize all struct members.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7173 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
Soren Jorvang
2011-02-14 21:58:53 +00:00
parent f00a909103
commit c212548f8e
17 changed files with 308 additions and 308 deletions
+1 -1
View File
@@ -4,7 +4,7 @@ Import('env')
import sys
if env.has_key('shared_glew') and env['shared_glew']:
env['LIBS'] += 'GLEW'
env['LIBS'] += ['GLEW']
Return()
if sys.platform == 'darwin':
+1 -1
View File
@@ -3,7 +3,7 @@
Import('env')
if env.has_key('shared_lzo') and env['shared_lzo']:
env['LIBS'] += 'lzo2'
env['LIBS'] += ['lzo2']
Return()
env['CPPPATH'] += ['#Externals/LZO']
+1 -1
View File
@@ -7,7 +7,7 @@ if sys.platform == 'darwin':
Return()
if env.has_key('shared_sdl') and env['shared_sdl']:
env['LIBS'] += 'SDL'
env['LIBS'] += ['SDL']
Return()
files = [
+1 -1
View File
@@ -3,7 +3,7 @@
Import('env')
if env.has_key('shared_soil') and env['shared_soil']:
env['LIBS'] += 'SOIL'
env['LIBS'] += ['SOIL']
Return()
files = [
+3 -2
View File
@@ -3,8 +3,9 @@
Import('env')
import sys
if env.has_key('shared_libpng') and env['shared_libpng']:
env['LIBS'] += 'png'
if env.has_key('shared_png') and env['shared_png']:
# Currently using libwxpng in the shared case
#env['LIBS'] += ['png']
Return()
files = [
+1 -1
View File
@@ -4,7 +4,7 @@ Import('env')
import sys
if env.has_key('shared_zlib') and env['shared_zlib']:
env['LIBS'] += 'z'
env['LIBS'] += ['z']
Return()
files = [
+8 -8
View File
@@ -83,9 +83,7 @@ env['CCFLAGS'] += ['-fno-exceptions', '-fno-strict-aliasing']
if env['lint']:
env['CCFLAGS'] += ['-Werror']
env['CCFLAGS'] += ['-Wall', '-Wextra']
env['CCFLAGS'] += ['-Wno-missing-field-initializers', '-Wno-unused-parameter']
env['CCFLAGS'] += ['-Wpacked', '-Wpointer-arith', '-Wshadow', '-Wwrite-strings']
env['CCFLAGS'] += ['-Wall', '-Wextra', '-Wshadow', '-Wno-unused-parameter']
if env['CCVERSION'] < '4.2.0':
env['CCFLAGS'] += ['-Wno-pragmas']
if env['CCVERSION'] >= '4.3.0':
@@ -123,6 +121,10 @@ if sys.platform == 'darwin':
env['CCFLAGS'] += ['-Xarch_i386', '-msse3', '-Xarch_x86_64', '-mssse3']
env['CCFLAGS'] += ['-march=core2', '-mdynamic-no-pic']
env['CCFLAGS'] += ['-Wextra-tokens', '-Wnewline-eof']
env['CC'] = '/Developer/usr/bin/clang'
env['CXX'] = '/Developer/usr/bin/clang++'
env['CC'] = '/Developer/usr/bin/llvm-gcc'
env['CXX'] = '/Developer/usr/bin/llvm-g++'
env['CXXFLAGS'] += ['-x', 'objective-c++']
env['FRAMEWORKS'] += ['ApplicationServices', 'AudioUnit', 'Cocoa']
env['FRAMEWORKS'] += ['IOBluetooth', 'IOKit', 'OpenGL']
@@ -130,12 +132,8 @@ if sys.platform == 'darwin':
env['LINKFLAGS'] += ['-Wl,-dead_strip,-dead_strip_dylibs']
env['LINKFLAGS'] += ['-Wl,-pagezero_size,0x1000']
env['CC'] = '/Developer/usr/bin/llvm-gcc'
env['CXX'] = '/Developer/usr/bin/llvm-g++'
#env['CC'] = '/Developer/usr/bin/clang'
#env['CXX'] = '/Developer/usr/bin/clang++'
#if float(os.popen('xcode-select -version').read()[21:]) < 2000:
# print 'Xcode 4 is required to build Dolphin'
# print 'Xcode 4 running on Snow Leopard is required to build Dolphin'
# print 'It is available from http://developer.apple.com/devcenter/mac/'
# Exit(1)
@@ -166,6 +164,7 @@ if sys.platform == 'darwin':
wxconfig.ParseWXConfig(wxenv)
env['CPPPATH'] += wxenv['CPPPATH']
env['wxconfiglibs'] = wxenv['LIBS']
env['shared_png'] = True
env['data_dir'] = '#' + env['prefix'] + '/Dolphin.app/Contents/Resources'
env['shared_zlib'] = True
@@ -239,6 +238,7 @@ else:
env['flavor'] == 'debug')
if env['HAVE_WX']:
wxconfig.ParseWXConfig(env)
env['shared_png'] = True
else:
print "wxWidgets not found - see config.log"
+22 -22
View File
@@ -300,38 +300,38 @@ const DSPOPCTemplate opcodes[] =
};
const DSPOPCTemplate cw =
{"CW", 0x0000, 0x0000, NULL, NULL, 1, 1, {{P_VAL, 2, 0, 0, 0xffff}}, false, false};
{"CW", 0x0000, 0x0000, NULL, NULL, 1, 1, {{P_VAL, 2, 0, 0, 0xffff}}, false, false, false, false, false};
// extended opcodes
const DSPOPCTemplate opcodes_ext[] =
{
{"XXX", 0x0000, 0x00fc, DSPInterpreter::Ext::nop, &DSPEmitter::nop, 1, 1, {{P_VAL, 1, 0, 0, 0x00ff}}, false, false, false},
{"XXX", 0x0000, 0x00fc, DSPInterpreter::Ext::nop, &DSPEmitter::nop, 1, 1, {{P_VAL, 1, 0, 0, 0x00ff}}, false, false, false, false, false},
{"DR", 0x0004, 0x00fc, DSPInterpreter::Ext::dr, &DSPEmitter::dr, 1, 1, {{P_REG, 1, 0, 0, 0x0003}}, false, false, false},
{"IR", 0x0008, 0x00fc, DSPInterpreter::Ext::ir, &DSPEmitter::ir, 1, 1, {{P_REG, 1, 0, 0, 0x0003}}, false, false, false},
{"NR", 0x000c, 0x00fc, DSPInterpreter::Ext::nr, &DSPEmitter::nr, 1, 1, {{P_REG, 1, 0, 0, 0x0003}}, false, false, false},
{"MV", 0x0010, 0x00f0, DSPInterpreter::Ext::mv, &DSPEmitter::mv, 1, 2, {{P_REG18, 1, 0, 2, 0x000c}, {P_REG1C, 1, 0, 0, 0x0003}}, false, false, false},
{"DR", 0x0004, 0x00fc, DSPInterpreter::Ext::dr, &DSPEmitter::dr, 1, 1, {{P_REG, 1, 0, 0, 0x0003}}, false, false, false, false, false},
{"IR", 0x0008, 0x00fc, DSPInterpreter::Ext::ir, &DSPEmitter::ir, 1, 1, {{P_REG, 1, 0, 0, 0x0003}}, false, false, false, false, false},
{"NR", 0x000c, 0x00fc, DSPInterpreter::Ext::nr, &DSPEmitter::nr, 1, 1, {{P_REG, 1, 0, 0, 0x0003}}, false, false, false, false, false},
{"MV", 0x0010, 0x00f0, DSPInterpreter::Ext::mv, &DSPEmitter::mv, 1, 2, {{P_REG18, 1, 0, 2, 0x000c}, {P_REG1C, 1, 0, 0, 0x0003}}, false, false, false, false, false},
{"S", 0x0020, 0x00e4, DSPInterpreter::Ext::s, &DSPEmitter::s, 1, 2, {{P_PRG, 1, 0, 0, 0x0003}, {P_REG1C, 1, 0, 3, 0x0018}}, false, false, false},
{"SN", 0x0024, 0x00e4, DSPInterpreter::Ext::sn, &DSPEmitter::sn, 1, 2, {{P_PRG, 1, 0, 0, 0x0003}, {P_REG1C, 1, 0, 3, 0x0018}}, false, false, false},
{"S", 0x0020, 0x00e4, DSPInterpreter::Ext::s, &DSPEmitter::s, 1, 2, {{P_PRG, 1, 0, 0, 0x0003}, {P_REG1C, 1, 0, 3, 0x0018}}, false, false, false, false, false},
{"SN", 0x0024, 0x00e4, DSPInterpreter::Ext::sn, &DSPEmitter::sn, 1, 2, {{P_PRG, 1, 0, 0, 0x0003}, {P_REG1C, 1, 0, 3, 0x0018}}, false, false, false, false, false},
{"L", 0x0040, 0x00c4, DSPInterpreter::Ext::l, &DSPEmitter::l, 1, 2, {{P_REG18, 1, 0, 3, 0x0038}, {P_PRG, 1, 0, 0, 0x0003}}, false, false, false},
{"LN", 0x0044, 0x00c4, DSPInterpreter::Ext::ln, &DSPEmitter::ln, 1, 2, {{P_REG18, 1, 0, 3, 0x0038}, {P_PRG, 1, 0, 0, 0x0003}}, false, false, false},
{"L", 0x0040, 0x00c4, DSPInterpreter::Ext::l, &DSPEmitter::l, 1, 2, {{P_REG18, 1, 0, 3, 0x0038}, {P_PRG, 1, 0, 0, 0x0003}}, false, false, false, false, false},
{"LN", 0x0044, 0x00c4, DSPInterpreter::Ext::ln, &DSPEmitter::ln, 1, 2, {{P_REG18, 1, 0, 3, 0x0038}, {P_PRG, 1, 0, 0, 0x0003}}, false, false, false, false, false},
{"LS", 0x0080, 0x00ce, DSPInterpreter::Ext::ls, &DSPEmitter::ls, 1, 2, {{P_REG18, 1, 0, 4, 0x0030}, {P_ACCM, 1, 0, 0, 0x0001}}, false, false, false},
{"SL", 0x0082, 0x00ce, DSPInterpreter::Ext::sl, &DSPEmitter::sl, 1, 2, {{P_ACCM, 1, 0, 0, 0x0001}, {P_REG18, 1, 0, 4, 0x0030}}, false, false, false},
{"LSN", 0x0084, 0x00ce, DSPInterpreter::Ext::lsn, &DSPEmitter::lsn, 1, 2, {{P_REG18, 1, 0, 4, 0x0030}, {P_ACCM, 1, 0, 0, 0x0001}}, false, false, false},
{"SLN", 0x0086, 0x00ce, DSPInterpreter::Ext::sln, &DSPEmitter::sln, 1, 2, {{P_ACCM, 1, 0, 0, 0x0001}, {P_REG18, 1, 0, 4, 0x0030}}, false, false, false},
{"LSM", 0x0088, 0x00ce, DSPInterpreter::Ext::lsm, &DSPEmitter::lsm, 1, 2, {{P_REG18, 1, 0, 4, 0x0030}, {P_ACCM, 1, 0, 0, 0x0001}}, false, false, false},
{"SLM", 0x008a, 0x00ce, DSPInterpreter::Ext::slm, &DSPEmitter::slm, 1, 2, {{P_ACCM, 1, 0, 0, 0x0001}, {P_REG18, 1, 0, 4, 0x0030}}, false, false, false},
{"LSNM", 0x008c, 0x00ce, DSPInterpreter::Ext::lsnm, &DSPEmitter::lsnm, 1, 2, {{P_REG18, 1, 0, 4, 0x0030}, {P_ACCM, 1, 0, 0, 0x0001}}, false, false, false},
{"SLNM", 0x008e, 0x00ce, DSPInterpreter::Ext::slnm, &DSPEmitter::slnm, 1, 2, {{P_ACCM, 1, 0, 0, 0x0001}, {P_REG18, 1, 0, 4, 0x0030}}, false, false, false},
{"LS", 0x0080, 0x00ce, DSPInterpreter::Ext::ls, &DSPEmitter::ls, 1, 2, {{P_REG18, 1, 0, 4, 0x0030}, {P_ACCM, 1, 0, 0, 0x0001}}, false, false, false, false, false},
{"SL", 0x0082, 0x00ce, DSPInterpreter::Ext::sl, &DSPEmitter::sl, 1, 2, {{P_ACCM, 1, 0, 0, 0x0001}, {P_REG18, 1, 0, 4, 0x0030}}, false, false, false, false, false},
{"LSN", 0x0084, 0x00ce, DSPInterpreter::Ext::lsn, &DSPEmitter::lsn, 1, 2, {{P_REG18, 1, 0, 4, 0x0030}, {P_ACCM, 1, 0, 0, 0x0001}}, false, false, false, false, false},
{"SLN", 0x0086, 0x00ce, DSPInterpreter::Ext::sln, &DSPEmitter::sln, 1, 2, {{P_ACCM, 1, 0, 0, 0x0001}, {P_REG18, 1, 0, 4, 0x0030}}, false, false, false, false, false},
{"LSM", 0x0088, 0x00ce, DSPInterpreter::Ext::lsm, &DSPEmitter::lsm, 1, 2, {{P_REG18, 1, 0, 4, 0x0030}, {P_ACCM, 1, 0, 0, 0x0001}}, false, false, false, false, false},
{"SLM", 0x008a, 0x00ce, DSPInterpreter::Ext::slm, &DSPEmitter::slm, 1, 2, {{P_ACCM, 1, 0, 0, 0x0001}, {P_REG18, 1, 0, 4, 0x0030}}, false, false, false, false, false},
{"LSNM", 0x008c, 0x00ce, DSPInterpreter::Ext::lsnm, &DSPEmitter::lsnm, 1, 2, {{P_REG18, 1, 0, 4, 0x0030}, {P_ACCM, 1, 0, 0, 0x0001}}, false, false, false, false, false},
{"SLNM", 0x008e, 0x00ce, DSPInterpreter::Ext::slnm, &DSPEmitter::slnm, 1, 2, {{P_ACCM, 1, 0, 0, 0x0001}, {P_REG18, 1, 0, 4, 0x0030}}, false, false, false, false, false},
{"LD", 0x00c0, 0x00cc, DSPInterpreter::Ext::ld, &DSPEmitter::ld, 1, 3, {{P_REGM18, 1, 0, 4, 0x0020}, {P_REGM19, 1, 0, 3, 0x0010}, {P_PRG, 1, 0, 0, 0x0003}}, false, false, false},
{"LDN", 0x00c4, 0x00cc, DSPInterpreter::Ext::ldn, &DSPEmitter::ldn, 1, 3, {{P_REGM18, 1, 0, 4, 0x0020}, {P_REGM19, 1, 0, 3, 0x0010}, {P_PRG, 1, 0, 0, 0x0003}}, false, false, false},
{"LDM", 0x00c8, 0x00cc, DSPInterpreter::Ext::ldm, &DSPEmitter::ldm, 1, 3, {{P_REGM18, 1, 0, 4, 0x0020}, {P_REGM19, 1, 0, 3, 0x0010}, {P_PRG, 1, 0, 0, 0x0003}}, false, false, false},
{"LDNM", 0x00cc, 0x00cc, DSPInterpreter::Ext::ldnm, &DSPEmitter::ldnm, 1, 3, {{P_REGM18, 1, 0, 4, 0x0020}, {P_REGM19, 1, 0, 3, 0x0010}, {P_PRG, 1, 0, 0, 0x0003}}, false, false, false},
{"LD", 0x00c0, 0x00cc, DSPInterpreter::Ext::ld, &DSPEmitter::ld, 1, 3, {{P_REGM18, 1, 0, 4, 0x0020}, {P_REGM19, 1, 0, 3, 0x0010}, {P_PRG, 1, 0, 0, 0x0003}}, false, false, false, false, false},
{"LDN", 0x00c4, 0x00cc, DSPInterpreter::Ext::ldn, &DSPEmitter::ldn, 1, 3, {{P_REGM18, 1, 0, 4, 0x0020}, {P_REGM19, 1, 0, 3, 0x0010}, {P_PRG, 1, 0, 0, 0x0003}}, false, false, false, false, false},
{"LDM", 0x00c8, 0x00cc, DSPInterpreter::Ext::ldm, &DSPEmitter::ldm, 1, 3, {{P_REGM18, 1, 0, 4, 0x0020}, {P_REGM19, 1, 0, 3, 0x0010}, {P_PRG, 1, 0, 0, 0x0003}}, false, false, false, false, false},
{"LDNM", 0x00cc, 0x00cc, DSPInterpreter::Ext::ldnm, &DSPEmitter::ldnm, 1, 3, {{P_REGM18, 1, 0, 4, 0x0020}, {P_REGM19, 1, 0, 3, 0x0010}, {P_PRG, 1, 0, 0, 0x0003}}, false, false, false, false, false},
};
const int opcodes_size = sizeof(opcodes) / sizeof(DSPOPCTemplate);
+2 -2
View File
@@ -779,8 +779,8 @@ bool DSPAssembler::AssembleFile(const char *fname, int pass)
//printf("A: %s\n", line);
code_line++;
param_t params[10] = {{0}};
param_t params_ext[10] = {{0}};
param_t params[10] = {{0, P_NONE, NULL}};
param_t params_ext[10] = {{0, P_NONE, NULL}};
bool upper = true;
for (int i = 0; i < LINEBUF_SIZE; i++)
+1 -1
View File
@@ -223,7 +223,7 @@ bool DSPDisassembler::DisOpcode(const u16 *binbuf, int base_addr, int pass, u16
break;
}
}
const DSPOPCTemplate fake_op = {"CW", 0x0000, 0x0000, nop, NULL, 1, 1, {{P_VAL, 2, 0, 0, 0xffff}}, false};
const DSPOPCTemplate fake_op = {"CW", 0x0000, 0x0000, nop, NULL, 1, 1, {{P_VAL, 2, 0, 0, 0xffff}}, false, false, false, false, false};
if (!opc)
opc = &fake_op;
-1
View File
@@ -45,7 +45,6 @@ struct SPatch
{
char m_szPatchName[128];
TPatchFunction PatchFunction;
int returnType;
};
static const SPatch OSPatches[] =
File diff suppressed because it is too large Load Diff
@@ -38,7 +38,6 @@ struct GekkoOPTemplate
int opcode;
_Instruction Inst;
//GekkoOPInfo opinfo; // Doesn't need opinfo, Interpreter fills it out
int runCount;
};
static GekkoOPTemplate primarytable[] =
@@ -40,7 +40,6 @@ struct GekkoOPTemplate
int opcode;
_Instruction Inst;
//GekkoOPInfo opinfo; // Doesn't need opinfo, Interpreter fills it out
int runCount;
};
static GekkoOPTemplate primarytable[] =
+9 -6
View File
@@ -114,20 +114,23 @@ bool DolphinApp::OnInit()
},
{
wxCMD_LINE_SWITCH, wxS("d"), wxS("debugger"),
_("Opens the debugger")
_("Opens the debugger"),
wxCMD_LINE_VAL_NONE, wxCMD_LINE_PARAM_OPTIONAL
},
{
wxCMD_LINE_SWITCH, wxS("l"), wxS("logger"),
_("Opens the logger")
_("Opens the logger"),
wxCMD_LINE_VAL_NONE, wxCMD_LINE_PARAM_OPTIONAL
},
{
wxCMD_LINE_OPTION, wxS("e"), wxS("exec"),
_("Loads the specified file (DOL, ELF, WAD, GCM, ISO)"),
_("Loads the specified file (DOL,ELF,GCM,ISO,WAD)"),
wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL
},
{
wxCMD_LINE_SWITCH, wxS("b"), wxS("batch"),
_("Exit Dolphin with emulator")
_("Exit Dolphin with emulator"),
wxCMD_LINE_VAL_NONE, wxCMD_LINE_PARAM_OPTIONAL
},
{
wxCMD_LINE_OPTION, wxS("V"), wxS("video_backend"),
@@ -136,11 +139,11 @@ bool DolphinApp::OnInit()
},
{
wxCMD_LINE_OPTION, wxS("A"), wxS("audio_emulation"),
_("Specify low level (LLE) or high level (HLE) audio emulation"),
_("Low level (LLE) or high level (HLE) audio"),
wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL
},
{
wxCMD_LINE_NONE
wxCMD_LINE_NONE, NULL, NULL, NULL, wxCMD_LINE_VAL_NONE, 0
}
};
@@ -134,9 +134,9 @@ VideoConfigDiag::VideoConfigDiag(wxWindow* parent, const std::string &title, con
wxString::Format(_("Dolphin %s Graphics Configuration"),
wxGetTranslation(wxString::From8BitData(title.c_str()))),
wxDefaultPosition, wxDefaultSize)
, ininame(_ininame)
, choice_adapter(NULL)
, choice_ppshader(NULL)
, ininame(_ininame)
{
// TODO: Make this less hacky
vconfig = g_Config; // take over backend_info
@@ -51,13 +51,13 @@ sDecoderParameter g_DecodeParametersNative[] = {
/* GX_TF_RGB565 */ { "DecodeRGB565", NULL, 2, 2, 4, 4, PC_TEX_FMT_RGB565 },
/* GX_TF_RGB5A3 */ { "DecodeRGB5A3", NULL, 2, 4, 4, 4, PC_TEX_FMT_BGRA32 },
/* GX_TF_RGBA8 */ { "DecodeRGBA8", NULL, 4, 4, 4, 4, PC_TEX_FMT_BGRA32 },
/* 7 */ { NULL },
/* GX_TF_C4 */ { NULL },
/* GX_TF_C8 */ { NULL },
/* GX_TF_C14X2 */ { NULL },
/* B */ { NULL },
/* C */ { NULL },
/* D */ { NULL },
/* 7 */ { NULL, NULL, 0, 0, 0, 0, PC_TEX_FMT_NONE },
/* GX_TF_C4 */ { NULL, NULL, 0, 0, 0, 0, PC_TEX_FMT_NONE },
/* GX_TF_C8 */ { NULL, NULL, 0, 0, 0, 0, PC_TEX_FMT_NONE },
/* GX_TF_C14X2 */ { NULL, NULL, 0, 0, 0, 0, PC_TEX_FMT_NONE },
/* B */ { NULL, NULL, 0, 0, 0, 0, PC_TEX_FMT_NONE },
/* C */ { NULL, NULL, 0, 0, 0, 0, PC_TEX_FMT_NONE },
/* D */ { NULL, NULL, 0, 0, 0, 0, PC_TEX_FMT_NONE },
/* GX_TF_CMPR */ { "DecodeCMPR", NULL, 0.5f, 4, 8, 8, PC_TEX_FMT_BGRA32 },
};
@@ -69,13 +69,13 @@ sDecoderParameter g_DecodeParametersRGBA[] = {
/* GX_TF_RGB565 */ { "DecodeRGB565_RGBA", NULL, 2, 4, 4, 4, PC_TEX_FMT_RGBA32 },
/* GX_TF_RGB5A3 */ { "DecodeRGB5A3_RGBA", NULL, 2, 4, 4, 4, PC_TEX_FMT_RGBA32 },
/* GX_TF_RGBA8 */ { "DecodeRGBA8_RGBA", NULL, 4, 4, 4, 4, PC_TEX_FMT_RGBA32 },
/* 7 */ { NULL },
/* GX_TF_C4 */ { NULL },
/* GX_TF_C8 */ { NULL },
/* GX_TF_C14X2 */ { NULL },
/* B */ { NULL },
/* C */ { NULL },
/* D */ { NULL },
/* 7 */ { NULL, NULL, 0, 0, 0, 0, PC_TEX_FMT_NONE },
/* GX_TF_C4 */ { NULL, NULL, 0, 0, 0, 0, PC_TEX_FMT_NONE },
/* GX_TF_C8 */ { NULL, NULL, 0, 0, 0, 0, PC_TEX_FMT_NONE },
/* GX_TF_C14X2 */ { NULL, NULL, 0, 0, 0, 0, PC_TEX_FMT_NONE },
/* B */ { NULL, NULL, 0, 0, 0, 0, PC_TEX_FMT_NONE },
/* C */ { NULL, NULL, 0, 0, 0, 0, PC_TEX_FMT_NONE },
/* D */ { NULL, NULL, 0, 0, 0, 0, PC_TEX_FMT_NONE },
/* GX_TF_CMPR */ { "DecodeCMPR_RGBA", NULL, 0.5f, 4, 8, 8, PC_TEX_FMT_RGBA32 },
};