mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-14 21:37:52 -07:00
warning fixes
(may break sound on wii, look in the changelog of Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_AXWii.cpp if you wish to know why) git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@1306 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
d2b726da59
commit
8777917177
@ -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)
|
||||
{
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
@ -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 *)"";
|
||||
}
|
||||
|
||||
// __________________________________________________________________________________________________
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -49,7 +49,6 @@ void LoadPatchSection(const char *section, std::vector<Patch> &patches, IniFile
|
||||
return;
|
||||
|
||||
Patch currentPatch;
|
||||
int index = 0;
|
||||
|
||||
for (std::vector<std::string>::const_iterator iter = lines.begin(); iter != lines.end(); ++iter)
|
||||
{
|
||||
|
@ -134,6 +134,8 @@ bool LoadPlugin(const char *_Filename)
|
||||
//PanicAlert("return false: %i", ret);
|
||||
return false;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
// ============
|
||||
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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)
|
||||
{
|
||||
|
@ -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(
|
||||
|
@ -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;
|
||||
|
@ -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();
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
#endif
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
||||
|
@ -37,7 +37,7 @@ extern float ratioFactor;
|
||||
|
||||
|
||||
template<class ParamBlockType>
|
||||
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]);
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
#endif
|
||||
|
@ -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());
|
||||
|
||||
|
@ -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))
|
||||
|
@ -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();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user