diff --git a/Source/Core/Common/Src/StringUtil.cpp b/Source/Core/Common/Src/StringUtil.cpp index 4c1163f345..205ad61e72 100644 --- a/Source/Core/Common/Src/StringUtil.cpp +++ b/Source/Core/Common/Src/StringUtil.cpp @@ -376,14 +376,14 @@ int ChooseStringFrom(const char* str, const char* * items) // Thousand separator. Turns 12345678 into 12,345,678. std::string ThS(int a, bool b) { - char cbuf[20]; int j = 0; + char cbuf[20]; // determine treatment of signed or unsigned if(b) sprintf(cbuf, "%u", a); else sprintf(cbuf, "%i", a); std::string sbuf = cbuf; - for (int i = 0; i < sbuf.length(); ++i) + for (u32 i = 0; i < sbuf.length(); ++i) { if((i & 3) == 3) { diff --git a/Source/Core/Common/Src/WaveFile.cpp b/Source/Core/Common/Src/WaveFile.cpp index 89c260fc3d..7cbeafa05a 100644 --- a/Source/Core/Common/Src/WaveFile.cpp +++ b/Source/Core/Common/Src/WaveFile.cpp @@ -58,13 +58,15 @@ bool WaveFileWriter::Start(const char *filename) // We are now at offset 44 if (ftell(file) != 44) PanicAlert("wrong offset: %i", ftell(file)); + + return true; } void WaveFileWriter::Stop() { if (!file) return; - u32 file_size = (u32)ftell(file); + // u32 file_size = (u32)ftell(file); fseek(file, 4, SEEK_SET); Write(audio_size + 36); fseek(file, 40, SEEK_SET); @@ -118,4 +120,4 @@ void WaveFileWriter::AddStereoSamplesBE(const short *sample_data, int count) } fwrite(conv_buffer, count * 4, 1, file); audio_size += count * 4; -} \ No newline at end of file +} diff --git a/Source/Core/Core/Src/Core.cpp b/Source/Core/Core/Src/Core.cpp index e6f0f74316..f374acb8c9 100644 --- a/Source/Core/Core/Src/Core.cpp +++ b/Source/Core/Core/Src/Core.cpp @@ -560,11 +560,10 @@ void Callback_PADLog(const TCHAR* _szMessage) //std::string Callback_ISOName(void) char * Callback_ISOName(void) { - char * a = ""; if(g_CoreStartupParameter.m_strName.length() > 0) return (char *)g_CoreStartupParameter.m_strName.c_str(); else - return a; + return (char *)""; } // __________________________________________________________________________________________________ diff --git a/Source/Core/Core/Src/HW/EXI_Device.cpp b/Source/Core/Core/Src/HW/EXI_Device.cpp index 60f0853de6..777e644021 100644 --- a/Source/Core/Core/Src/HW/EXI_Device.cpp +++ b/Source/Core/Core/Src/HW/EXI_Device.cpp @@ -151,11 +151,13 @@ IEXIDevice* EXIDevice_Create(TEXIDevices _EXIDevice) case EXIDEVICE_MIC: return new CEXIMic(1); break; - #if 0 + case EXIDEVICE_ETH: + #if 0 return new CEXIETHERNET(); - break; #endif + break; + } return NULL; } diff --git a/Source/Core/Core/Src/PatchEngine.cpp b/Source/Core/Core/Src/PatchEngine.cpp index 50bdeb9643..c436f42a33 100644 --- a/Source/Core/Core/Src/PatchEngine.cpp +++ b/Source/Core/Core/Src/PatchEngine.cpp @@ -49,7 +49,6 @@ void LoadPatchSection(const char *section, std::vector &patches, IniFile return; Patch currentPatch; - int index = 0; for (std::vector::const_iterator iter = lines.begin(); iter != lines.end(); ++iter) { diff --git a/Source/Core/Core/Src/Plugins/Plugin_Video.cpp b/Source/Core/Core/Src/Plugins/Plugin_Video.cpp index e943a6dff0..f76b3fb5b9 100644 --- a/Source/Core/Core/Src/Plugins/Plugin_Video.cpp +++ b/Source/Core/Core/Src/Plugins/Plugin_Video.cpp @@ -134,6 +134,8 @@ bool LoadPlugin(const char *_Filename) //PanicAlert("return false: %i", ret); return false; } + + return false; } // ============ diff --git a/Source/Core/DebuggerWX/Src/MemoryWindow.cpp b/Source/Core/DebuggerWX/Src/MemoryWindow.cpp index 2ae39b249e..ccd563ae8b 100644 --- a/Source/Core/DebuggerWX/Src/MemoryWindow.cpp +++ b/Source/Core/DebuggerWX/Src/MemoryWindow.cpp @@ -145,13 +145,13 @@ void CMemoryWindow::SetMemoryValue(wxCommandEvent& event) u32 val; if (!TryParseUInt(std::string("0x") + str_addr, &addr)) { - PanicAlert("Invalid Address: %s", str_addr); - return; + PanicAlert("Invalid Address: %s", str_addr.c_str()); + return; } if (!TryParseUInt(std::string("0x") + str_val, &val)) { - PanicAlert("Invalid Value: %s", str_val); - return; + PanicAlert("Invalid Value: %s", str_val.c_str()); + return; } Memory::Write_U32(val, addr); diff --git a/Source/Core/DiscIO/Src/BannerLoaderWii.cpp b/Source/Core/DiscIO/Src/BannerLoaderWii.cpp index 0eae9fd877..204c1fe771 100644 --- a/Source/Core/DiscIO/Src/BannerLoaderWii.cpp +++ b/Source/Core/DiscIO/Src/BannerLoaderWii.cpp @@ -101,7 +101,7 @@ CBannerLoaderWii::StupidWideCharToString(u16* _pSrc, size_t _max) { std::string temp; - int offset = 0; + u32 offset = 0; while (_pSrc[offset] != 0x0000) { temp += (char)(_pSrc[offset] >> 8); diff --git a/Source/Core/DolphinWX/Src/ISOProperties.cpp b/Source/Core/DolphinWX/Src/ISOProperties.cpp index d582d4f113..fa1c986b6e 100644 --- a/Source/Core/DolphinWX/Src/ISOProperties.cpp +++ b/Source/Core/DolphinWX/Src/ISOProperties.cpp @@ -432,7 +432,7 @@ void CISOProperties::OnBannerImageSave(wxCommandEvent& WXUNUSED (event)) { wxString dirHome; - wxFileDialog dialog(this, _("Save as..."), wxGetHomeDir(&dirHome), wxString::Format(_("%s.png"), m_GameID->GetLabel()), + wxFileDialog dialog(this, _("Save as..."), wxGetHomeDir(&dirHome), wxString::Format(_("%s.png"), m_GameID->GetLabel().c_str()), _("*.*"), wxFD_SAVE|wxFD_OVERWRITE_PROMPT, wxDefaultPosition, wxDefaultSize); if (dialog.ShowModal() == wxID_OK) { diff --git a/Source/Core/VideoCommon/Src/XFBConvert.cpp b/Source/Core/VideoCommon/Src/XFBConvert.cpp index e1eee07c5b..3f20ab421d 100644 --- a/Source/Core/VideoCommon/Src/XFBConvert.cpp +++ b/Source/Core/VideoCommon/Src/XFBConvert.cpp @@ -100,8 +100,8 @@ void ConvertToXFB(u32 *dst, const u8* _pEFB, int width, int height) if (((size_t)dst & 0xF) != 0) { PanicAlert("ConvertToXFB - unaligned XFB"); } - __m128i zero = _mm_setzero_si128(); - for (int i = 0; i < numBlocks; i++) + + for (u32 i = 0; i < numBlocks; i++) { __m128i yuyv0 = _mm_srai_epi32( _mm_add_epi32( diff --git a/Source/Plugins/Plugin_DSP_HLE/Src/Debugger/Debugger.cpp b/Source/Plugins/Plugin_DSP_HLE/Src/Debugger/Debugger.cpp index c176325b9d..fcd69bc3d7 100644 --- a/Source/Plugins/Plugin_DSP_HLE/Src/Debugger/Debugger.cpp +++ b/Source/Plugins/Plugin_DSP_HLE/Src/Debugger/Debugger.cpp @@ -86,8 +86,9 @@ CDebugger::CDebugger(wxWindow *parent, wxWindowID id, const wxString &title, : wxDialog(parent, id, title, position, size, style) , m_GPRListView(NULL) //, gUpdFreq(5) // loaded from file - , gPreset(0) , giShowAll(-1) + , gPreset(0) + , upd95(false) // block view settings , upd94(false) @@ -217,7 +218,7 @@ SetTitle(wxT("Sound Debugging")); // Declarations - wxBoxSizer * sMAIN, * sMain, * sMail, * sBlock; + wxBoxSizer * sMAIN, * sMain, *_sMail, * sBlock; wxButton* m_Upd; wxButton* m_SelC; @@ -475,10 +476,10 @@ SetTitle(wxT("Sound Debugging")); wxBoxSizer * sMailRight = new wxBoxSizer(wxVERTICAL); //wxStaticBoxSizer * sMailRight = new wxStaticBoxSizer(wxVERTICAL, m_PageMail, wxT("Current")); - sMail = new wxBoxSizer(wxHORIZONTAL); - sMail->Add(m_m1Sizer, 0, wxEXPAND | (wxUP | wxDOWN), 5); // margin = 5 - sMail->Add(m_m2Sizer, 1, wxEXPAND | (wxUP | wxDOWN | wxLEFT), 5); // margin = 5 - sMail->Add(sMailRight, 0, wxEXPAND | wxALL, 0); // margin = 0 + _sMail = new wxBoxSizer(wxHORIZONTAL); + _sMail->Add(m_m1Sizer, 0, wxEXPAND | (wxUP | wxDOWN), 5); // margin = 5 + _sMail->Add(m_m2Sizer, 1, wxEXPAND | (wxUP | wxDOWN | wxLEFT), 5); // margin = 5 + _sMail->Add(sMailRight, 0, wxEXPAND | wxALL, 0); // margin = 0 sMailRight->Add(m_RadioBox[3], 0, wxALL, 5); // margin = 5 sMailRight->Add(m_gameSizer1, 1, wxEXPAND | wxALL, 5); // margin = 5 @@ -515,7 +516,7 @@ SetTitle(wxT("Sound Debugging")); //sMAIN->SetSizeHints(this); m_PageMain->SetSizer(sMain); - m_PageMail->SetSizer(sMail); + m_PageMail->SetSizer(_sMail); m_PageBlock->SetSizer(sBlock); //sMain->Layout(); @@ -649,8 +650,8 @@ void CDebugger::OnOptions(wxCommandEvent& event) void CDebugger::OnShowAll(wxCommandEvent& event) { /// Only allow one selection at a time - for (int i = 0; i < m_opt_showall->GetCount(); ++i) - if(i != event.GetInt()) m_opt_showall->Check(i, false); + for (u32 i = 0; i < m_opt_showall->GetCount(); ++i) + if(i != (u32)event.GetInt()) m_opt_showall->Check(i, false); if(m_opt_showall->IsChecked(0)) giShowAll = 0; else if(m_opt_showall->IsChecked(1)) giShowAll = 1; diff --git a/Source/Plugins/Plugin_DSP_HLE/Src/Debugger/Debugger.h b/Source/Plugins/Plugin_DSP_HLE/Src/Debugger/Debugger.h index 830baf3b47..51c1d04d58 100644 --- a/Source/Plugins/Plugin_DSP_HLE/Src/Debugger/Debugger.h +++ b/Source/Plugins/Plugin_DSP_HLE/Src/Debugger/Debugger.h @@ -98,7 +98,7 @@ class CDebugger : public wxDialog void MailSettings(wxCommandEvent& event); void Readfile(std::string FileName, bool GC); std::string Readfile_(std::string FileName); - int CountFiles(std::string FileName); + u32 CountFiles(std::string FileName); // ============== Blocks void DoScrollBlocks(); diff --git a/Source/Plugins/Plugin_DSP_HLE/Src/Debugger/Mails.cpp b/Source/Plugins/Plugin_DSP_HLE/Src/Debugger/Mails.cpp index bda9dac271..bb151e4c38 100644 --- a/Source/Plugins/Plugin_DSP_HLE/Src/Debugger/Mails.cpp +++ b/Source/Plugins/Plugin_DSP_HLE/Src/Debugger/Mails.cpp @@ -145,7 +145,7 @@ void CDebugger::ReadDir() // -------------- bool CDebugger::NoDuplicate(std::string FileName) { - for (int i = 0; i < all_files.size(); i++) + for (u32 i = 0; i < all_files.size(); i++) { if(all_files.at(i) == FileName) return false; @@ -154,7 +154,7 @@ bool CDebugger::NoDuplicate(std::string FileName) } // Count the number of files for each game -int CDebugger::CountFiles(std::string FileName) +u32 CDebugger::CountFiles(std::string FileName) { int match = 0; @@ -178,7 +178,6 @@ std::string CDebugger::Readfile_(std::string FileName) char c; // declare a char variable FILE *file; // declare a FILE pointer std::string sz = ""; - char ch[1] = ""; if(File::Exists(FileName.c_str())) file = fopen(FileName.c_str(), "r"); // open a text file for reading @@ -201,18 +200,18 @@ std::string CDebugger::Readfile_(std::string FileName) break; // break when EOF is reached } - fclose(file); - return sz; + fclose(file); } + return sz; } // Read file void CDebugger::Readfile(std::string FileName, bool GC) { - int n = CountFiles(FileName); // count how many mails we have - int curr_n = 0; + u32 n = CountFiles(FileName); // count how many mails we have + u32 curr_n = 0; std::ifstream file; - for (int i = 0; i < m_RadioBox[3]->GetCount(); i++) + for (u32 i = 0; i < m_RadioBox[3]->GetCount(); i++) { if(m_RadioBox[3]->IsItemEnabled(i)) curr_n++; m_RadioBox[3]->Enable(i, false); // disable all @@ -220,7 +219,7 @@ void CDebugger::Readfile(std::string FileName, bool GC) //wprintf("Disabled all: n %i\n", n); - for (int i = 0; i < n; i++) + for (u32 i = 0; i < n; i++) { m_RadioBox[3]->Enable(i, true); // then anble the right ones //wprintf("m_RadioBox[3] enabled: %i\n", i); @@ -253,25 +252,23 @@ void CDebugger::Readfile(std::string FileName, bool GC) // --------------- void CDebugger::OnGameChange(wxCommandEvent& event) { - if(event.GetId() == 2006) + if(event.GetId() == 2006) { - // Only allow one selected game at a time - for (int i = 0; i < m_gc->GetCount(); ++i) - if(i != event.GetInt()) m_gc->Check(i, false); - for (int i = 0; i < m_wii->GetCount(); ++i) - m_wii->Check(i, false); - Readfile(gc_files[event.GetInt()], true); + // Only allow one selected game at a time + for (u32 i = 0; i < m_gc->GetCount(); ++i) + if(i != (u32)event.GetInt()) m_gc->Check(i, false); + for (u32 i = 0; i < m_wii->GetCount(); ++i) + m_wii->Check(i, false); + Readfile(gc_files[event.GetInt()], true); } - else + else { - for (int i = 0; i < m_gc->GetCount(); ++i) - m_gc->Check(i, false); - for (int i = 0; i < m_wii->GetCount(); ++i) - if(i != event.GetInt()) m_wii->Check(i, false); - Readfile(wii_files[event.GetInt()], false); + for (u32 i = 0; i < m_gc->GetCount(); ++i) + m_gc->Check(i, false); + for (u32 i = 0; i < m_wii->GetCount(); ++i) + if(i != (u32)event.GetInt()) m_wii->Check(i, false); + Readfile(wii_files[event.GetInt()], false); } - - } // Settings diff --git a/Source/Plugins/Plugin_DSP_HLE/Src/Logging/Console.cpp b/Source/Plugins/Plugin_DSP_HLE/Src/Logging/Console.cpp index 6835bf00ef..9a1b4ae9e7 100644 --- a/Source/Plugins/Plugin_DSP_HLE/Src/Logging/Console.cpp +++ b/Source/Plugins/Plugin_DSP_HLE/Src/Logging/Console.cpp @@ -126,7 +126,7 @@ int aprintf(int a, char *fmt, ...) // --------------------------------------------------------------------------------------- // Printf to screen function -int wprintf(char *fmt, ...) +int wprintf(const char *fmt, ...) { #if defined(DEBUG_HLE) && defined(_WIN32) && (defined(_DEBUG) || defined(DEBUGFAST)) char s[1024*20]; // Warning, mind this value diff --git a/Source/Plugins/Plugin_DSP_HLE/Src/Logging/Console.h b/Source/Plugins/Plugin_DSP_HLE/Src/Logging/Console.h index ac18d9051b..3f63d563b8 100644 --- a/Source/Plugins/Plugin_DSP_HLE/Src/Logging/Console.h +++ b/Source/Plugins/Plugin_DSP_HLE/Src/Logging/Console.h @@ -17,7 +17,7 @@ void startConsoleWin(int width, int height, char* fname); -int wprintf(char *fmt, ...); +int wprintf(const char *fmt, ...); int aprintf(int a, char *fmt, ...); void ClearScreen(); void OpenConsole(); @@ -25,4 +25,4 @@ void CloseConsole(); #ifdef _WIN32 HWND GetConsoleHwnd(void); -#endif \ No newline at end of file +#endif diff --git a/Source/Plugins/Plugin_DSP_HLE/Src/Logging/Logging.cpp b/Source/Plugins/Plugin_DSP_HLE/Src/Logging/Logging.cpp index 3a282782bf..f8e9785302 100644 --- a/Source/Plugins/Plugin_DSP_HLE/Src/Logging/Logging.cpp +++ b/Source/Plugins/Plugin_DSP_HLE/Src/Logging/Logging.cpp @@ -252,7 +252,7 @@ std::string writeMessage(int a, int i, bool Wii) { if(Wii) // Wii { - sprintf(buf,"%c%02i %i %10s/%10s %10s | %06s %06s | %i %i | %03i %05i %05i %03i %05i %05i | %05i %05i[%i %05i]", + sprintf(buf,"%c%02i %i %10s/%10s %10s | %6s %6s | %i %i | %03i %05i %05i %03i %05i %05i | %05i %05i[%i %05i]", 223, i, mem[i], ThS(gsamplePos[i],true).c_str(), ThS(gsampleEnd[i],true).c_str(), ThS(gloopPos[i],true).c_str(), ThS(gvolume_left[i]).c_str(), ThS(gvolume_right[i]).c_str(), glooping[i], gis_stream[i], @@ -262,7 +262,7 @@ std::string writeMessage(int a, int i, bool Wii) } else // GC { - sprintf(buf,"%c%02i %10s/%10s %10s | %06s %06s | %i %i | %03i %05i %05i %03i %05i %05i | %05i %05i[%i %05i]", + sprintf(buf,"%c%02i %10s/%10s %10s | %6s %6s | %i %i | %03i %05i %05i %03i %05i %05i | %05i %05i[%i %05i]", 223, i, ThS(gsamplePos[i],true).c_str(), ThS(gsampleEnd[i],true).c_str(), ThS(gloopPos[i],true).c_str(), ThS(gvolume_left[i]).c_str(), ThS(gvolume_right[i]).c_str(), glooping[i], gis_stream[i], @@ -286,7 +286,7 @@ std::string writeMessage(int a, int i, bool Wii) { if(m_frame->bShowBase) // base 10 (decimal) { - sprintf(buf,"%c%02i %10s/%10s %10s | %06s %06s | %u %u %u | %u %u %u %u %u %08x %08x", + sprintf(buf,"%c%02i %10s/%10s %10s | %6s %6s | %u %u %u | %u %u %u %u %u %08x %08x %08x %08x %08x %08x %08x", 223, i, ThS(gsamplePos[i]).c_str(), ThS(gsampleEnd[i]).c_str(), ThS(gloopPos[i]).c_str(), ThS(gvolume_left[i]).c_str(), ThS(gvolume_right[i]).c_str(), gsrc_type[i], gaudioFormat[i], gcoef[i], @@ -298,7 +298,7 @@ std::string writeMessage(int a, int i, bool Wii) { if(Wii) // Wii { - sprintf(buf,"%c%02i %08x/%08x %08x | %04x %04x | %u %u %u | %u %u %u %08x %08x %08x %08x %08x", + sprintf(buf,"%c%02i %08x/%08x %08x | %04x %04x | %u %u %u | %u %u %u %08x %08x %08x %08x %08x %08x", 223, i, gsamplePos[i], gsampleEnd[i], gloopPos[i], gvolume_left[i], gvolume_right[i], gsrc_type[i], gaudioFormat[i], gcoef[i], @@ -308,7 +308,7 @@ std::string writeMessage(int a, int i, bool Wii) } else // GC { - sprintf(buf,"%c%02i %08x/%08x %08x | %04x %04x | %u %u %u | %u %u %u %u %u %08x %08x %08x %08x %08x", + sprintf(buf,"%c%02i %08x/%08x %08x | %04x %04x | %u %u %u | %u %u %u %u %u %08x %08x %08x %08x %08x %08x", 223, i, gsamplePos[i], gsampleEnd[i], gloopPos[i], gvolume_left[i], gvolume_right[i], gsrc_type[i], gaudioFormat[i], gcoef[i], @@ -674,7 +674,7 @@ void Logging_(short* _pBuffer, int _iSize, int a, bool Wii, ParamBlockType &PBs, /* Have a separate set for which ones to show. Currently show blocks that have been running at least once the last 100 updates. // -------------- - /* + Move all items back like this: 1 to 0 2 1 @@ -855,7 +855,7 @@ void Logging_(short* _pBuffer, int _iSize, int a, bool Wii, ParamBlockType &PBs, 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) { @@ -877,7 +877,7 @@ void Logging_(short* _pBuffer, int _iSize, int a, bool Wii, ParamBlockType &PBs, } } - for (int i = 0; i < viupd.size(); i++) + for (u32 i = 0; i < viupd.size(); i++) { if(viupd.at(i) == 0) sbuff = sbuff + " "; @@ -934,12 +934,12 @@ void CUCode_AX::Logging(short* _pBuffer, int _iSize, int a, bool Wii) { if(version == 0) { - numberOfPBs = ReadOutPBsWii(m_addressPBs, PBw, NUMBER_OF_PBS, true); + numberOfPBs = ReadOutPBsWii(m_addressPBs, PBw, NUMBER_OF_PBS); Logging_(_pBuffer, _iSize, a, Wii, PBw, numberOfPBs, m_addressPBs); } else { - numberOfPBs = ReadOutPBsWii(m_addressPBs, PBw_, NUMBER_OF_PBS, true); + numberOfPBs = ReadOutPBsWii(m_addressPBs, PBw_, NUMBER_OF_PBS); Logging_(_pBuffer, _iSize, a, Wii, PBw_, numberOfPBs, m_addressPBs); } } @@ -949,4 +949,4 @@ void CUCode_AX::Logging(short* _pBuffer, int _iSize, int a, bool Wii) Logging_(_pBuffer, _iSize, a, Wii, PBs, numberOfPBs, m_addressPBs); } } -} \ No newline at end of file +} diff --git a/Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_AX.cpp b/Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_AX.cpp index 00e355cfcb..b102927ec1 100644 --- a/Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_AX.cpp +++ b/Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_AX.cpp @@ -123,7 +123,7 @@ if(m_frame->ScanMails) if(Wii) TmpMailLog += "Current CRC: " + StringFromFormat("0x%08x \n\n", _CRC); - for (int i = 0; i < sMailTime.size(); i++) + for (u32 i = 0; i < sMailTime.size(); i++) { char tmpbuf[128]; sprintf(tmpbuf, "Mail %i received: %s\n", i, sMailTime.at(i).c_str()); TmpMailLog += tmpbuf; @@ -191,10 +191,10 @@ if(m_frame->ScanMails) } // Compare this mail to old mails - int addnew = 0; - for (int i = 0; i < m_frame->sMail.size(); i++) + u32 addnew = 0; + for (u32 j = 0; j < m_frame->sMail.size(); j++) { - if(m_frame->sMail.at(i).length() != sTemp.length()) + if(m_frame->sMail.at(j).length() != sTemp.length()) { //wxMessageBox( wxString::Format("%s \n\n%s", m_frame->sMail.at(i).c_str(), // sTemp.c_str()) ); @@ -207,7 +207,7 @@ if(m_frame->ScanMails) if(addnew == m_frame->sMail.size()) { //wprintf("%i | %i\n", addnew, m_frame->sMail.size()); - int resizeTo = m_frame->sMail.size() + 1; + u32 resizeTo = m_frame->sMail.size() + 1; // ------------------------------------ // get timestamp @@ -453,8 +453,8 @@ bool CUCode_AX::AXTask(u32& _uMail) u32 Addr__12; u32 Addr__4_1; u32 Addr__4_2; - u32 Addr__4_3; - u32 Addr__4_4; + // u32 Addr__4_3; + // u32 Addr__4_4; u32 Addr__5_1; u32 Addr__5_2; u32 Addr__6; diff --git a/Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_AXWii.cpp b/Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_AXWii.cpp index 1080732681..46745d2ff6 100644 --- a/Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_AXWii.cpp +++ b/Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_AXWii.cpp @@ -41,10 +41,10 @@ extern CDebugger * m_frame; // ----------- -CUCode_AXWii::CUCode_AXWii(CMailHandler& _rMailHandler, u32 _CRC) +CUCode_AXWii::CUCode_AXWii(CMailHandler& _rMailHandler, u32 l_CRC) : IUCode(_rMailHandler) , m_addressPBs(0xFFFFFFFF) - , _CRC(_CRC) + , _CRC(l_CRC) { // we got loaded m_rMailHandler.PushMail(0xDCD10000); @@ -54,7 +54,7 @@ CUCode_AXWii::CUCode_AXWii(CMailHandler& _rMailHandler, u32 _CRC) temprbuffer = new int[1024 * 1024]; lCUCode_AX = new CUCode_AX(_rMailHandler); - lCUCode_AX->_CRC = _CRC; + lCUCode_AX->_CRC = l_CRC; } CUCode_AXWii::~CUCode_AXWii() @@ -98,7 +98,7 @@ void CUCode_AXWii::MixAdd_(short* _pBuffer, int _iSize, ParamBlockType &PBs) //AXParamBlockWii PBs[NUMBER_OF_PBS]; // read out pbs - int numberOfPBs = ReadOutPBsWii(m_addressPBs, PBs, NUMBER_OF_PBS, false); + int numberOfPBs = ReadOutPBsWii(m_addressPBs, PBs, NUMBER_OF_PBS); if (_iSize > 1024 * 1024) _iSize = 1024 * 1024; @@ -122,7 +122,7 @@ void CUCode_AXWii::MixAdd_(short* _pBuffer, int _iSize, ParamBlockType &PBs) { const u32 blockAddr = (u32)(PBs[p].this_pb_hi<< 16) | PBs[p].this_pb_lo; const short *pSrc = (const short *)g_dspInitialize.pGetMemoryPointer(blockAddr); - for (int i = 0; i < sizeof(AXParamBlockWii) / 2; i+=2) + for (u32 i = 0; i < sizeof(AXParamBlockWii) / 2; i+=2) { if(i == 10 || i == 34 || i == 41 || i == 46 || i == 46 || i == 58 || i == 60 || i == 68 || i == 88 || i == 95) @@ -132,7 +132,7 @@ void CUCode_AXWii::MixAdd_(short* _pBuffer, int _iSize, ParamBlockType &PBs) i/2, i, m_frame->PBn[i].c_str(), m_frame->PBp[i].c_str() ); - for (int i = 0; i < 50 - line.length(); ++i) + for (u32 j = 0; j < 50 - line.length(); ++j) line += " "; m_frame->str0 += line; @@ -248,14 +248,14 @@ bool CUCode_AXWii::AXTask(u32& _uMail) u32 Addr__AXStudio; u32 Addr__AXOutSBuffer; - u32 Addr__AXOutSBuffer_1; - u32 Addr__AXOutSBuffer_2; + // u32 Addr__AXOutSBuffer_1; + // u32 Addr__AXOutSBuffer_2; u32 Addr__A; - u32 Addr__12; + // u32 Addr__12; u32 Addr__5_1; u32 Addr__5_2; u32 Addr__6; - u32 Addr__9; + // u32 Addr__9; bool bExecuteList = true; diff --git a/Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_AX_Voice.h b/Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_AX_Voice.h index 385bd7f762..e2ee053243 100644 --- a/Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_AX_Voice.h +++ b/Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_AX_Voice.h @@ -37,7 +37,7 @@ extern float ratioFactor; template -inline int ReadOutPBsWii(u32 pbs_address, ParamBlockType& _pPBs, int _num, int _deb) +inline int ReadOutPBsWii(u32 pbs_address, ParamBlockType& _pPBs, int _num) { int count = 0; u32 blockAddr = pbs_address; @@ -52,7 +52,7 @@ inline int ReadOutPBsWii(u32 pbs_address, ParamBlockType& _pPBs, int _num, int _ if (pSrc != NULL) { short *pDest = (short *)&_pPBs[i]; - for (int p = 0; p < sizeof(AXParamBlockWii) / 2; p++) + for (u32 p = 0; p < sizeof(AXParamBlockWii) / 2; p++) { if(p == 6 || p == 7) pDest[p] = pSrc[p]; // control for the u32 else pDest[p] = Common::swap16(pSrc[p]); diff --git a/Source/Plugins/Plugin_Wiimote/Src/Console.cpp b/Source/Plugins/Plugin_Wiimote/Src/Console.cpp index c077ddd9b8..fe0cc8c848 100644 --- a/Source/Plugins/Plugin_Wiimote/Src/Console.cpp +++ b/Source/Plugins/Plugin_Wiimote/Src/Console.cpp @@ -124,7 +124,7 @@ int aprintf(int a, char *fmt, ...) // --------------------------------------------------------------------------------------- // Printf to screen function -int wprintf(char *fmt, ...) +int wprintf(const char *fmt, ...) { #if defined(DEBUG_WIIMOTE) && defined(_WIN32) char s[500]; // WARNING: mind this value diff --git a/Source/Plugins/Plugin_Wiimote/Src/Console.h b/Source/Plugins/Plugin_Wiimote/Src/Console.h index 401b374ffd..caae103b10 100644 --- a/Source/Plugins/Plugin_Wiimote/Src/Console.h +++ b/Source/Plugins/Plugin_Wiimote/Src/Console.h @@ -17,10 +17,10 @@ void startConsoleWin(int width, int height, char* fname); -int wprintf(char *fmt, ...); -int aprintf(int a, char *fmt, ...); +int wprintf(const char *fmt, ...); +int aprintf(int a, const char *fmt, ...); void ClearScreen(); #ifdef _WIN32 HWND GetConsoleHwnd(void); -#endif \ No newline at end of file +#endif diff --git a/Source/Plugins/Plugin_Wiimote/Src/EmuMain.cpp b/Source/Plugins/Plugin_Wiimote/Src/EmuMain.cpp index b2b0612244..ddeb7a5153 100644 --- a/Source/Plugins/Plugin_Wiimote/Src/EmuMain.cpp +++ b/Source/Plugins/Plugin_Wiimote/Src/EmuMain.cpp @@ -240,7 +240,7 @@ void WmReadData(u16 _channelID, wm_read_data* rd) address, address & 0xffff, (u8)size); // Debugging - u32 offset = address & 0xffff; + // u32 offset = address & 0xffff; //std::string Temp = WiiMoteEmu::ArrayToString(g_RegExt, size, offset); //wprintf("Unencrypted data:\n%s\n", Temp.c_str()); diff --git a/Source/Plugins/Plugin_Wiimote/Src/FillReport.cpp b/Source/Plugins/Plugin_Wiimote/Src/FillReport.cpp index 27f1f9d885..a99dff5a82 100644 --- a/Source/Plugins/Plugin_Wiimote/Src/FillReport.cpp +++ b/Source/Plugins/Plugin_Wiimote/Src/FillReport.cpp @@ -251,7 +251,7 @@ void FillReportAcc(wm_accel& _acc) yhistsize+=1; - /*if(GetAsyncKeyState(VK_INSERT)) + if(GetAsyncKeyState(VK_INSERT)) AX-=1; else if(GetAsyncKeyState(VK_DELETE)) AX+=1; @@ -262,9 +262,8 @@ void FillReportAcc(wm_accel& _acc) else if(GetAsyncKeyState(VK_SHIFT)) AZ-=1; else if(GetAsyncKeyState(VK_CONTROL)) - AZ+=1;*/ + AZ+=1; - /* if(GetAsyncKeyState(VK_NUMPAD1)) X+=1; else if(GetAsyncKeyState(VK_NUMPAD2)) diff --git a/Source/Plugins/Plugin_Wiimote/Src/wiimote_real.cpp b/Source/Plugins/Plugin_Wiimote/Src/wiimote_real.cpp index 7cb8dc7756..1b8e4c48b9 100644 --- a/Source/Plugins/Plugin_Wiimote/Src/wiimote_real.cpp +++ b/Source/Plugins/Plugin_Wiimote/Src/wiimote_real.cpp @@ -66,10 +66,10 @@ namespace WiiMoteReal CWiiMote(u8 _WiimoteNumber, wiimote_t* _pWiimote) : m_WiimoteNumber(_WiimoteNumber) - , m_pWiiMote(_pWiimote) - , m_LastReportValid(false) , m_channelID(0) + , m_pWiiMote(_pWiimote) , m_pCriticalSection(NULL) + , m_LastReportValid(false) { m_pCriticalSection = new Common::CriticalSection();