summaryrefslogtreecommitdiffstats
path: root/src/core/loader/3dsx.cpp
diff options
context:
space:
mode:
authorEmmanuel Gil Peyrot <linkmauve@linkmauve.fr>2015-01-05 21:09:35 +0100
committerEmmanuel Gil Peyrot <linkmauve@linkmauve.fr>2015-01-15 22:21:25 +0100
commitbc2212106f755f85e55d039ffc783116b15e5df6 (patch)
treed013d55d7e315c207742dd98e389c61d2efed321 /src/core/loader/3dsx.cpp
parentMerge pull request #481 from Subv/hm_b (diff)
downloadyuzu-bc2212106f755f85e55d039ffc783116b15e5df6.tar
yuzu-bc2212106f755f85e55d039ffc783116b15e5df6.tar.gz
yuzu-bc2212106f755f85e55d039ffc783116b15e5df6.tar.bz2
yuzu-bc2212106f755f85e55d039ffc783116b15e5df6.tar.lz
yuzu-bc2212106f755f85e55d039ffc783116b15e5df6.tar.xz
yuzu-bc2212106f755f85e55d039ffc783116b15e5df6.tar.zst
yuzu-bc2212106f755f85e55d039ffc783116b15e5df6.zip
Diffstat (limited to 'src/core/loader/3dsx.cpp')
-rw-r--r--src/core/loader/3dsx.cpp48
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 @@
#include "3dsx.h"
-
namespace Loader {
-
-/**
+/**
* File layout:
* - File header
* - Code, rodata and data relocation table headers
@@ -64,9 +62,9 @@ struct THREEDSX_Header
struct THREEDSX_RelocHdr
{
// # of absolute relocations (that is, fix address to post-relocation memory layout)
- u32 cross_segment_absolute;
+ u32 cross_segment_absolute;
// # of cross-segment relative relocations (that is, 32bit signed offsets that need to be patched)
- u32 cross_segment_relative;
+ u32 cross_segment_relative;
// more?
// Relocations are written in this order:
@@ -207,28 +205,28 @@ int THREEDSXReader::Load3DSXFile(const std::string& filename, u32 base_addr)
return ERROR_NONE;
}
- /// AppLoader_DSX constructor
- AppLoader_THREEDSX::AppLoader_THREEDSX(const std::string& filename) : filename(filename) {
- }
+/// AppLoader_DSX constructor
+AppLoader_THREEDSX::AppLoader_THREEDSX(const std::string& filename) : filename(filename) {
+}
- /// AppLoader_DSX destructor
- AppLoader_THREEDSX::~AppLoader_THREEDSX() {
- }
+/// AppLoader_DSX destructor
+AppLoader_THREEDSX::~AppLoader_THREEDSX() {
+}
- /**
- * Loads a 3DSX file
- * @return Success on success, otherwise Error
- */
- ResultStatus AppLoader_THREEDSX::Load() {
- LOG_INFO(Loader, "Loading 3DSX file %s...", filename.c_str());
- FileUtil::IOFile file(filename, "rb");
- if (file.IsOpen()) {
- THREEDSXReader::Load3DSXFile(filename, 0x00100000);
- Kernel::LoadExec(0x00100000);
- } else {
- return ResultStatus::Error;
- }
- return ResultStatus::Success;
+/**
+* Loads a 3DSX file
+* @return Success on success, otherwise Error
+*/
+ResultStatus AppLoader_THREEDSX::Load() {
+ LOG_INFO(Loader, "Loading 3DSX file %s...", filename.c_str());
+ FileUtil::IOFile file(filename, "rb");
+ if (file.IsOpen()) {
+ THREEDSXReader::Load3DSXFile(filename, 0x00100000);
+ Kernel::LoadExec(0x00100000);
+ } else {
+ return ResultStatus::Error;
}
+ return ResultStatus::Success;
+}
} // namespace Loader