- Janitorial tasks
- Bugfix in ARCode/Patch editor git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@1612 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
ed75de40f4
commit
3be88bb2dd
|
@ -31,7 +31,7 @@ bool CBoot::IsElfWii(const char *filename)
|
|||
u64 filesize = ftell(f);
|
||||
fseek(f, 0, SEEK_SET);
|
||||
u8 *mem = new u8[(size_t)filesize];
|
||||
fread(mem, 1, filesize, f);
|
||||
fread(mem, 1, (size_t)filesize, f);
|
||||
fclose(f);
|
||||
|
||||
ElfReader reader(mem);
|
||||
|
@ -50,7 +50,7 @@ bool CBoot::Boot_ELF(const char *filename)
|
|||
u64 filesize = ftell(f);
|
||||
fseek(f, 0, SEEK_SET);
|
||||
u8 *mem = new u8[(size_t)filesize];
|
||||
fread(mem, 1, filesize, f);
|
||||
fread(mem, 1, (size_t)filesize, f);
|
||||
fclose(f);
|
||||
|
||||
ElfReader reader(mem);
|
||||
|
|
|
@ -27,7 +27,7 @@ CDump::CDump(const char* _szFilename) :
|
|||
if (pStream != NULL)
|
||||
{
|
||||
fseek(pStream, 0, SEEK_END);
|
||||
m_size = ftell(pStream);
|
||||
m_size = (size_t) ftell(pStream);
|
||||
fseek(pStream, 0, SEEK_SET);
|
||||
|
||||
m_pData = new u8[m_size];
|
||||
|
|
|
@ -73,7 +73,7 @@ CLogWindow::CLogWindow(wxWindow* parent)
|
|||
m_options->SetMinSize(wxSize(m_options->GetSize().GetWidth() - 40,
|
||||
m_options->GetCount() * 15));
|
||||
#ifdef _WIN32
|
||||
for (int i = 0; i < m_options->GetCount(); ++i)
|
||||
for (unsigned int i = 0; i < m_options->GetCount(); ++i)
|
||||
m_options->GetItem(i)->SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_BTNFACE));
|
||||
#endif
|
||||
|
||||
|
|
|
@ -42,7 +42,7 @@ CBannerLoaderGC::CBannerLoaderGC(DiscIO::IFileSystem& _rFileSystem)
|
|||
}
|
||||
|
||||
// load the opening.bnr
|
||||
size_t FileSize = _rFileSystem.GetFileSize("opening.bnr");
|
||||
size_t FileSize = (size_t) _rFileSystem.GetFileSize("opening.bnr");
|
||||
|
||||
if (FileSize > 0)
|
||||
{
|
||||
|
|
|
@ -38,7 +38,7 @@ CBannerLoaderWii::CBannerLoaderWii(DiscIO::IFileSystem& _rFileSystem)
|
|||
sprintf(Filename, FULL_WII_USER_DIR "title/00010000/%02x%02x%02x%02x/data/banner.bin", (u8)TitleID[0], (u8)TitleID[1], (u8)TitleID[2], (u8)TitleID[3]);
|
||||
|
||||
// load the opening.bnr
|
||||
size_t FileSize = File::GetSize(Filename);
|
||||
size_t FileSize = (size_t) File::GetSize(Filename);
|
||||
|
||||
if (FileSize > 0)
|
||||
{
|
||||
|
|
|
@ -65,7 +65,7 @@ CARCFile::GetFileSize(const std::string& _rFullPath)
|
|||
|
||||
if (pFileInfo != NULL)
|
||||
{
|
||||
return(pFileInfo->m_FileSize);
|
||||
return((size_t) pFileInfo->m_FileSize);
|
||||
}
|
||||
|
||||
return(0);
|
||||
|
@ -93,7 +93,7 @@ CARCFile::ReadFile(const std::string& _rFullPath, u8* _pBuffer, size_t _MaxBuffe
|
|||
}
|
||||
|
||||
memcpy(_pBuffer, &m_pBuffer[pFileInfo->m_Offset], pFileInfo->m_FileSize);
|
||||
return(pFileInfo->m_FileSize);
|
||||
return((size_t) pFileInfo->m_FileSize);
|
||||
}
|
||||
|
||||
|
||||
|
@ -119,7 +119,7 @@ CARCFile::ExportFile(const std::string& _rFullPath, const std::string& _rExportF
|
|||
return(false);
|
||||
}
|
||||
|
||||
fwrite(&m_pBuffer[pFileInfo->m_Offset], pFileInfo->m_FileSize, 1, pFile);
|
||||
fwrite(&m_pBuffer[pFileInfo->m_Offset], (size_t) pFileInfo->m_FileSize, 1, pFile);
|
||||
fclose(pFile);
|
||||
return(true);
|
||||
}
|
||||
|
@ -199,7 +199,7 @@ CARCFile::BuildFilenames(const size_t _FirstIndex, const size_t _LastIndex, cons
|
|||
sprintf(rFileInfo.m_FullPath, "%s\\", &_szNameTable[uOffset]);
|
||||
}
|
||||
|
||||
CurrentIndex = BuildFilenames(CurrentIndex + 1, rFileInfo.m_FileSize, rFileInfo.m_FullPath, _szNameTable);
|
||||
CurrentIndex = BuildFilenames(CurrentIndex + 1, (size_t) rFileInfo.m_FileSize, rFileInfo.m_FullPath, _szNameTable);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -88,7 +88,7 @@ u64 CFileSystemGCWii::ReadFile(const char* _rFullPath, u8* _pBuffer, size_t _Max
|
|||
|
||||
bool CFileSystemGCWii::ExportFile(const char* _rFullPath, const char* _rExportFilename) const
|
||||
{
|
||||
size_t filesize = GetFileSize(_rFullPath);
|
||||
size_t filesize = (size_t) GetFileSize(_rFullPath);
|
||||
|
||||
if (filesize == 0)
|
||||
return false;
|
||||
|
@ -229,7 +229,7 @@ size_t CFileSystemGCWii::BuildFilenames(const size_t _FirstIndex, const size_t _
|
|||
else
|
||||
CharArrayFromFormat(rFileInfo->m_FullPath, "%s\\", filename);
|
||||
|
||||
CurrentIndex = BuildFilenames(CurrentIndex + 1, rFileInfo->m_FileSize, rFileInfo->m_FullPath, _NameTableOffset);
|
||||
CurrentIndex = BuildFilenames(CurrentIndex + 1, (size_t) rFileInfo->m_FileSize, rFileInfo->m_FullPath, _NameTableOffset);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -150,7 +150,7 @@ IVolume* CreateVolumeFromCryptedWiiImage(IBlobReader& _rReader, u32 _VolumeType)
|
|||
for(int i=0;i<16;i++)
|
||||
{
|
||||
char h[3]={*(t++),*(t++),0};
|
||||
binkey[i] = strtol(h,NULL,16);
|
||||
binkey[i] = (char) strtol(h,NULL,16);
|
||||
}
|
||||
|
||||
pT = fopen(WII_MASTERKEY_FILE, "wb");
|
||||
|
|
|
@ -23,7 +23,10 @@
|
|||
|
||||
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
|
||||
|
||||
#ifndef _CRT_SECURE_NO_DEPRECATE
|
||||
#define _CRT_SECURE_NO_DEPRECATE
|
||||
#endif
|
||||
|
||||
#define _SCL_SECURE_NO_DEPRECATE
|
||||
|
||||
|
||||
|
|
|
@ -45,7 +45,7 @@ void CARCodeAddEdit::CreateGUIControls(int _selection)
|
|||
EditCheatName = new wxTextCtrl(this, ID_EDITCHEAT_NAME, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0);
|
||||
EditCheatName->SetValue(wxString::FromAscii(currentCode.name.c_str()));
|
||||
EntrySelection = new wxSpinButton(this, ID_ENTRY_SELECT, wxDefaultPosition, wxDefaultSize, wxVERTICAL);
|
||||
EntrySelection->SetRange(0, (int)arCodes.size()-1);
|
||||
EntrySelection->SetRange((int)arCodes.size()-1, 0);
|
||||
EntrySelection->SetValue(_selection);
|
||||
EditCheatCode = new wxTextCtrl(this, ID_EDITCHEAT_CODE, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE);
|
||||
UpdateTextCtrl(currentCode);
|
||||
|
|
|
@ -650,9 +650,7 @@ void CISOProperties::PatchList_Save()
|
|||
|
||||
for (std::vector<PatchEngine::PatchEntry>::const_iterator iter2 = onFrame_it->entries.begin(); iter2 != onFrame_it->entries.end(); ++iter2)
|
||||
{
|
||||
std::string temp;
|
||||
ToStringFromFormat(&temp, "0x%08X:%s:0x%08X", iter2->address, PatchEngine::PatchTypeStrings[iter2->type], iter2->value);
|
||||
lines.push_back(temp);
|
||||
lines.push_back(std::string(wxString::Format(wxT("0x%08X:%s:0x%08X"), iter2->address, PatchEngine::PatchTypeStrings[iter2->type], iter2->value).mb_str()));
|
||||
}
|
||||
++index;
|
||||
}
|
||||
|
|
|
@ -48,7 +48,7 @@ void CPatchAddEdit::CreateGUIControls(int _selection)
|
|||
EditPatchOffset = new wxTextCtrl(this, ID_EDITPATCH_OFFSET, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0);
|
||||
EditPatchOffset->SetValue(wxString::Format(wxT("%08X"), currentEntries.at(0).address));
|
||||
EntrySelection = new wxSpinButton(this, ID_ENTRY_SELECT, wxDefaultPosition, wxDefaultSize, wxVERTICAL);
|
||||
EntrySelection->SetRange(0, (int)currentEntries.size()-1);
|
||||
EntrySelection->SetRange((int)currentEntries.size()-1, 0);
|
||||
wxArrayString wxArrayStringFor_EditPatchType;
|
||||
for (int i = 0; i < 3; ++i)
|
||||
wxArrayStringFor_EditPatchType.Add(wxString::FromAscii(PatchEngine::PatchTypeStrings[i]));
|
||||
|
|
|
@ -83,7 +83,7 @@ void startConsoleWin(int width, int height, char* fname)
|
|||
// Edit the log file name
|
||||
std::string FileEnding = ".log";
|
||||
std::string FileName = fname;
|
||||
char buffer[33]; itoa(i, buffer, 10); // convert number to string
|
||||
char buffer[33]; _itoa(i, buffer, 10); // convert number to string
|
||||
std::string FullFilename = (FileName + buffer + FileEnding);
|
||||
__fStdOut[i] = fopen(FullFilename.c_str(), "w");
|
||||
}
|
||||
|
|
|
@ -81,7 +81,7 @@ void startConsoleWin(int width, int height, char* fname)
|
|||
// Edit the log file name
|
||||
std::string FileEnding = ".log";
|
||||
std::string FileName = fname;
|
||||
char buffer[33]; itoa(i, buffer, 10); // convert number to string
|
||||
char buffer[33]; _itoa(i, buffer, 10); // convert number to string
|
||||
std::string FullFilename = (FileName + buffer + FileEnding);
|
||||
__fStdOut[i] = fopen(FullFilename.c_str(), "w");
|
||||
}
|
||||
|
|
|
@ -77,7 +77,7 @@ void startConsoleWin(int width, int height, char* fname)
|
|||
// Edit the log file name
|
||||
std::string FileEnding = ".log";
|
||||
std::string FileName = fname;
|
||||
char buffer[33]; itoa(i, buffer, 10); // convert number to string
|
||||
char buffer[33]; _itoa(i, buffer, 10); // convert number to string
|
||||
std::string FullFilename = (FileName + buffer + FileEnding);
|
||||
__fStdOut[i] = fopen(FullFilename.c_str(), "w");
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue