mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06:00
Formatting/Whitespace Cleanup
Various fixes to formatting and whitespace
This commit is contained in:
@ -186,7 +186,7 @@ bool CBoot::Load_BS2(const std::string& _rBootROMFilename)
|
||||
PanicAlert("%s IPL found in %s directory. The disc may not be recognized", ipl_region.c_str(), BootRegion.c_str());
|
||||
|
||||
// Run the descrambler over the encrypted section containing BS1/BS2
|
||||
CEXIIPL::Descrambler((u8*)data.data()+0x100, 0x1AFE00);
|
||||
CEXIIPL::Descrambler((u8*)data.data() + 0x100, 0x1AFE00);
|
||||
|
||||
Memory::CopyToEmu(0x01200000, data.data() + 0x100, 0x700);
|
||||
Memory::CopyToEmu(0x01300000, data.data() + 0x820, 0x1AFE00);
|
||||
|
@ -64,7 +64,7 @@ bool CBoot::Boot_ELF(const std::string& filename)
|
||||
|
||||
// Load ELF into GameCube Memory
|
||||
ElfReader reader(elf.get());
|
||||
if(!reader.LoadIntoMemory())
|
||||
if (!reader.LoadIntoMemory())
|
||||
return false;
|
||||
|
||||
if (!reader.LoadSymbols())
|
||||
|
@ -28,9 +28,9 @@
|
||||
static u32 state_checksum(u32 *buf, int len)
|
||||
{
|
||||
u32 checksum = 0;
|
||||
len = len>>2;
|
||||
len = len >> 2;
|
||||
|
||||
for (int i=0; i<len; i++)
|
||||
for (int i = 0; i < len; i++)
|
||||
{
|
||||
checksum += buf[i];
|
||||
}
|
||||
@ -59,7 +59,7 @@ bool CBoot::Boot_WiiWAD(const std::string& _pFilename)
|
||||
state_file.ReadBytes(&state, sizeof(StateFlags));
|
||||
|
||||
state.type = 0x03; // TYPE_RETURN
|
||||
state.checksum = state_checksum((u32*)&state.flags, sizeof(StateFlags)-4);
|
||||
state.checksum = state_checksum((u32*)&state.flags, sizeof(StateFlags) - 4);
|
||||
|
||||
state_file.Seek(0, SEEK_SET);
|
||||
state_file.WriteBytes(&state, sizeof(StateFlags));
|
||||
@ -69,10 +69,10 @@ bool CBoot::Boot_WiiWAD(const std::string& _pFilename)
|
||||
File::CreateFullPath(state_filename);
|
||||
File::IOFile state_file(state_filename, "a+b");
|
||||
StateFlags state;
|
||||
memset(&state,0,sizeof(StateFlags));
|
||||
memset(&state, 0, sizeof(StateFlags));
|
||||
state.type = 0x03; // TYPE_RETURN
|
||||
state.discstate = 0x01; // DISCSTATE_WII
|
||||
state.checksum = state_checksum((u32*)&state.flags, sizeof(StateFlags)-4);
|
||||
state.checksum = state_checksum((u32*)&state.flags, sizeof(StateFlags) - 4);
|
||||
state_file.WriteBytes(&state, sizeof(StateFlags));
|
||||
}
|
||||
|
||||
|
@ -98,7 +98,7 @@ const char* ElfReader::GetSectionName(int section) const
|
||||
// This is just a simple elf loader, good enough to load elfs generated by devkitPPC
|
||||
bool ElfReader::LoadIntoMemory()
|
||||
{
|
||||
DEBUG_LOG(MASTER_LOG,"String section: %i", header->e_shstrndx);
|
||||
DEBUG_LOG(MASTER_LOG, "String section: %i", header->e_shstrndx);
|
||||
|
||||
// Should we relocate?
|
||||
bRelocate = (header->e_type != ET_EXEC);
|
||||
@ -109,7 +109,7 @@ bool ElfReader::LoadIntoMemory()
|
||||
return false;
|
||||
}
|
||||
|
||||
INFO_LOG(MASTER_LOG,"%i segments:", header->e_phnum);
|
||||
INFO_LOG(MASTER_LOG, "%i segments:", header->e_phnum);
|
||||
|
||||
// Copy segments into ram.
|
||||
for (int i = 0; i < header->e_phnum; i++)
|
||||
@ -128,13 +128,13 @@ bool ElfReader::LoadIntoMemory()
|
||||
|
||||
Memory::CopyToEmu(writeAddr, src, srcSize);
|
||||
if (srcSize < dstSize)
|
||||
Memory::Memset(writeAddr + srcSize, 0, dstSize-srcSize); //zero out bss
|
||||
Memory::Memset(writeAddr + srcSize, 0, dstSize - srcSize); //zero out bss
|
||||
|
||||
INFO_LOG(MASTER_LOG,"Loadable Segment Copied to %08x, size %08x", writeAddr, p->p_memsz);
|
||||
INFO_LOG(MASTER_LOG, "Loadable Segment Copied to %08x, size %08x", writeAddr, p->p_memsz);
|
||||
}
|
||||
}
|
||||
|
||||
INFO_LOG(MASTER_LOG,"Done loading.");
|
||||
INFO_LOG(MASTER_LOG, "Done loading.");
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user