diff options
| author | 2015-01-05 20:09:35 +0000 | |
|---|---|---|
| committer | 2015-01-15 21:21:25 +0000 | |
| commit | bc2212106f755f85e55d039ffc783116b15e5df6 (patch) | |
| tree | d013d55d7e315c207742dd98e389c61d2efed321 /src/core/loader/3dsx.cpp | |
| parent | Merge pull request #481 from Subv/hm_b (diff) | |
| download | yuzu-bc2212106f755f85e55d039ffc783116b15e5df6.tar.gz yuzu-bc2212106f755f85e55d039ffc783116b15e5df6.tar.xz yuzu-bc2212106f755f85e55d039ffc783116b15e5df6.zip | |
Loader: Fix indentation, whitespace, and a few other such cosmetic stuff.
Diffstat (limited to 'src/core/loader/3dsx.cpp')
| -rw-r--r-- | src/core/loader/3dsx.cpp | 48 |
1 files changed, 23 insertions, 25 deletions
diff --git a/src/core/loader/3dsx.cpp b/src/core/loader/3dsx.cpp index 4d072871a..fad544571 100644 --- a/src/core/loader/3dsx.cpp +++ b/src/core/loader/3dsx.cpp | |||
| @@ -13,11 +13,9 @@ | |||
| 13 | 13 | ||
| 14 | #include "3dsx.h" | 14 | #include "3dsx.h" |
| 15 | 15 | ||
| 16 | |||
| 17 | namespace Loader { | 16 | namespace Loader { |
| 18 | 17 | ||
| 19 | 18 | /** | |
| 20 | /** | ||
| 21 | * File layout: | 19 | * File layout: |
| 22 | * - File header | 20 | * - File header |
| 23 | * - Code, rodata and data relocation table headers | 21 | * - Code, rodata and data relocation table headers |
| @@ -64,9 +62,9 @@ struct THREEDSX_Header | |||
| 64 | struct THREEDSX_RelocHdr | 62 | struct THREEDSX_RelocHdr |
| 65 | { | 63 | { |
| 66 | // # of absolute relocations (that is, fix address to post-relocation memory layout) | 64 | // # of absolute relocations (that is, fix address to post-relocation memory layout) |
| 67 | u32 cross_segment_absolute; | 65 | u32 cross_segment_absolute; |
| 68 | // # of cross-segment relative relocations (that is, 32bit signed offsets that need to be patched) | 66 | // # of cross-segment relative relocations (that is, 32bit signed offsets that need to be patched) |
| 69 | u32 cross_segment_relative; | 67 | u32 cross_segment_relative; |
| 70 | // more? | 68 | // more? |
| 71 | 69 | ||
| 72 | // Relocations are written in this order: | 70 | // Relocations are written in this order: |
| @@ -207,28 +205,28 @@ int THREEDSXReader::Load3DSXFile(const std::string& filename, u32 base_addr) | |||
| 207 | return ERROR_NONE; | 205 | return ERROR_NONE; |
| 208 | } | 206 | } |
| 209 | 207 | ||
| 210 | /// AppLoader_DSX constructor | 208 | /// AppLoader_DSX constructor |
| 211 | AppLoader_THREEDSX::AppLoader_THREEDSX(const std::string& filename) : filename(filename) { | 209 | AppLoader_THREEDSX::AppLoader_THREEDSX(const std::string& filename) : filename(filename) { |
| 212 | } | 210 | } |
| 213 | 211 | ||
| 214 | /// AppLoader_DSX destructor | 212 | /// AppLoader_DSX destructor |
| 215 | AppLoader_THREEDSX::~AppLoader_THREEDSX() { | 213 | AppLoader_THREEDSX::~AppLoader_THREEDSX() { |
| 216 | } | 214 | } |
| 217 | 215 | ||
| 218 | /** | 216 | /** |
| 219 | * Loads a 3DSX file | 217 | * Loads a 3DSX file |
| 220 | * @return Success on success, otherwise Error | 218 | * @return Success on success, otherwise Error |
| 221 | */ | 219 | */ |
| 222 | ResultStatus AppLoader_THREEDSX::Load() { | 220 | ResultStatus AppLoader_THREEDSX::Load() { |
| 223 | LOG_INFO(Loader, "Loading 3DSX file %s...", filename.c_str()); | 221 | LOG_INFO(Loader, "Loading 3DSX file %s...", filename.c_str()); |
| 224 | FileUtil::IOFile file(filename, "rb"); | 222 | FileUtil::IOFile file(filename, "rb"); |
| 225 | if (file.IsOpen()) { | 223 | if (file.IsOpen()) { |
| 226 | THREEDSXReader::Load3DSXFile(filename, 0x00100000); | 224 | THREEDSXReader::Load3DSXFile(filename, 0x00100000); |
| 227 | Kernel::LoadExec(0x00100000); | 225 | Kernel::LoadExec(0x00100000); |
| 228 | } else { | 226 | } else { |
| 229 | return ResultStatus::Error; | 227 | return ResultStatus::Error; |
| 230 | } | ||
| 231 | return ResultStatus::Success; | ||
| 232 | } | 228 | } |
| 229 | return ResultStatus::Success; | ||
| 230 | } | ||
| 233 | 231 | ||
| 234 | } // namespace Loader | 232 | } // namespace Loader |