From 1470c346b64eae683dfd6b888b9f46a20c182caa Mon Sep 17 00:00:00 2001 From: BhaaL Date: Mon, 13 Mar 2017 17:51:08 +0100 Subject: [PATCH] change parameter names to match our coding style while we're at it --- Source/Core/Core/Boot/Boot.cpp | 16 ++++++++-------- Source/Core/Core/Boot/Boot.h | 10 +++++----- Source/Core/Core/Boot/Boot_BS2Emu.cpp | 12 ++++++------ 3 files changed, 19 insertions(+), 19 deletions(-) diff --git a/Source/Core/Core/Boot/Boot.cpp b/Source/Core/Core/Boot/Boot.cpp index 63db90e702..575b9c307f 100644 --- a/Source/Core/Core/Boot/Boot.cpp +++ b/Source/Core/Core/Boot/Boot.cpp @@ -48,7 +48,7 @@ bool CBoot::DVDRead(u64 dvd_offset, u32 output_address, u32 length, bool decrypt return true; } -void CBoot::Load_FST(bool _bIsWii) +void CBoot::Load_FST(bool is_wii) { if (!DVDInterface::IsDiscInside()) return; @@ -62,22 +62,22 @@ void CBoot::Load_FST(bool _bIsWii) Memory::Write_U32(Memory::Read_U32(0x0000), 0x3180); u32 shift = 0; - if (_bIsWii) + if (is_wii) shift = 2; u32 fst_offset = 0; u32 fst_size = 0; u32 max_fst_size = 0; - volume.ReadSwapped(0x0424, &fst_offset, _bIsWii); - volume.ReadSwapped(0x0428, &fst_size, _bIsWii); - volume.ReadSwapped(0x042c, &max_fst_size, _bIsWii); + volume.ReadSwapped(0x0424, &fst_offset, is_wii); + volume.ReadSwapped(0x0428, &fst_size, is_wii); + volume.ReadSwapped(0x042c, &max_fst_size, is_wii); u32 arena_high = Common::AlignDown(0x817FFFFF - (max_fst_size << shift), 0x20); Memory::Write_U32(arena_high, 0x00000034); // load FST - DVDRead(fst_offset << shift, arena_high, fst_size << shift, _bIsWii); + DVDRead(fst_offset << shift, arena_high, fst_size << shift, is_wii); Memory::Write_U32(arena_high, 0x00000038); Memory::Write_U32(max_fst_size << shift, 0x0000003c); } @@ -165,7 +165,7 @@ bool CBoot::LoadMapFromFilename() // If ipl.bin is not found, this function does *some* of what BS1 does: // loading IPL(BS2) and jumping to it. // It does not initialize the hardware or anything else like BS1 does. -bool CBoot::Load_BS2(const std::string& _rBootROMFilename) +bool CBoot::Load_BS2(const std::string& boot_rom_filename) { // CRC32 hashes of the IPL file; including source where known // https://forums.dolphin-emu.org/Thread-unknown-hash-on-ipl-bin?pid=385344#pid385344 @@ -189,7 +189,7 @@ bool CBoot::Load_BS2(const std::string& _rBootROMFilename) // Load the whole ROM dump std::string data; - if (!File::ReadFileToString(_rBootROMFilename, data)) + if (!File::ReadFileToString(boot_rom_filename, data)) return false; // Use zlibs crc32 implementation to compute the hash diff --git a/Source/Core/Core/Boot/Boot.h b/Source/Core/Core/Boot/Boot.h index fd1633ba30..91e08387c5 100644 --- a/Source/Core/Core/Boot/Boot.h +++ b/Source/Core/Core/Boot/Boot.h @@ -41,18 +41,18 @@ public: private: static bool DVDRead(u64 dvd_offset, u32 output_address, u32 length, bool decrypt); - static void RunFunction(u32 _iAddr); + static void RunFunction(u32 address); static void UpdateDebugger_MapLoaded(); static bool Boot_ELF(const std::string& filename); static bool Boot_WiiWAD(const std::string& filename); - static bool EmulatedBS2_GC(bool skipAppLoader = false); + static bool EmulatedBS2_GC(bool skip_app_loader = false); static bool EmulatedBS2_Wii(); - static bool EmulatedBS2(bool _bIsWii); - static bool Load_BS2(const std::string& _rBootROMFilename); - static void Load_FST(bool _bIsWii); + static bool EmulatedBS2(bool is_wii); + static bool Load_BS2(const std::string& boot_rom_filename); + static void Load_FST(bool is_wii); static bool SetupWiiMemory(u64 ios_title_id); }; diff --git a/Source/Core/Core/Boot/Boot_BS2Emu.cpp b/Source/Core/Core/Boot/Boot_BS2Emu.cpp index c068504703..caba5422f1 100644 --- a/Source/Core/Core/Boot/Boot_BS2Emu.cpp +++ b/Source/Core/Core/Boot/Boot_BS2Emu.cpp @@ -30,9 +30,9 @@ #include "DiscIO/Enums.h" #include "DiscIO/Volume.h" -void CBoot::RunFunction(u32 _iAddr) +void CBoot::RunFunction(u32 address) { - PC = _iAddr; + PC = address; LR = 0x00; while (PC != 0x00) @@ -43,7 +43,7 @@ void CBoot::RunFunction(u32 _iAddr) // GameCube Bootstrap 2 HLE: // copy the apploader to 0x81200000 // execute the apploader, function by function, using the above utility. -bool CBoot::EmulatedBS2_GC(bool skipAppLoader) +bool CBoot::EmulatedBS2_GC(bool skip_app_loader) { INFO_LOG(BOOT, "Faking GC BS2..."); @@ -108,7 +108,7 @@ bool CBoot::EmulatedBS2_GC(bool skipAppLoader) const DiscIO::IVolume& volume = DVDInterface::GetVolume(); const u32 apploader_offset = 0x2440; u32 apploader_entry, apploader_size, apploader_trailer; - if (skipAppLoader || !volume.ReadSwapped(apploader_offset + 0x10, &apploader_entry, false) || + if (skip_app_loader || !volume.ReadSwapped(apploader_offset + 0x10, &apploader_entry, false) || !volume.ReadSwapped(apploader_offset + 0x14, &apploader_size, false) || !volume.ReadSwapped(apploader_offset + 0x18, &apploader_trailer, false) || apploader_entry == (u32)-1 || apploader_size + apploader_trailer == (u32)-1) @@ -412,7 +412,7 @@ bool CBoot::EmulatedBS2_Wii() } // Returns true if apploader has run successfully -bool CBoot::EmulatedBS2(bool _bIsWii) +bool CBoot::EmulatedBS2(bool is_wii) { - return _bIsWii ? EmulatedBS2_Wii() : EmulatedBS2_GC(); + return is_wii ? EmulatedBS2_Wii() : EmulatedBS2_GC(); }