summaryrefslogtreecommitdiff
path: root/src/core/loader/ncch.h
diff options
context:
space:
mode:
authorGravatar Yuri Kunde Schlesner2016-09-21 11:29:48 -0700
committerGravatar GitHub2016-09-21 11:29:48 -0700
commitd5d2ca8058a0f1c00ab7ca9fe2c058ba47546c0a (patch)
tree8a22ca73ff838f3f0090b29a548ae81087fc90ed /src/core/loader/ncch.h
parentREADME: Specify master branch for Travis CI badge (diff)
parentFix Travis clang-format check (diff)
downloadyuzu-d5d2ca8058a0f1c00ab7ca9fe2c058ba47546c0a.tar.gz
yuzu-d5d2ca8058a0f1c00ab7ca9fe2c058ba47546c0a.tar.xz
yuzu-d5d2ca8058a0f1c00ab7ca9fe2c058ba47546c0a.zip
Merge pull request #2086 from linkmauve/clang-format
Add clang-format as part of our {commit,travis}-time checks
Diffstat (limited to 'src/core/loader/ncch.h')
-rw-r--r--src/core/loader/ncch.h40
1 files changed, 19 insertions, 21 deletions
diff --git a/src/core/loader/ncch.h b/src/core/loader/ncch.h
index 75609ee57..04350d006 100644
--- a/src/core/loader/ncch.h
+++ b/src/core/loader/ncch.h
@@ -5,11 +5,9 @@
5#pragma once 5#pragma once
6 6
7#include <memory> 7#include <memory>
8
9#include "common/bit_field.h" 8#include "common/bit_field.h"
10#include "common/common_types.h" 9#include "common/common_types.h"
11#include "common/swap.h" 10#include "common/swap.h"
12
13#include "core/loader/loader.h" 11#include "core/loader/loader.h"
14 12
15//////////////////////////////////////////////////////////////////////////////////////////////////// 13////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -164,7 +162,7 @@ namespace Loader {
164class AppLoader_NCCH final : public AppLoader { 162class AppLoader_NCCH final : public AppLoader {
165public: 163public:
166 AppLoader_NCCH(FileUtil::IOFile&& file, const std::string& filepath) 164 AppLoader_NCCH(FileUtil::IOFile&& file, const std::string& filepath)
167 : AppLoader(std::move(file)), filepath(filepath) { } 165 : AppLoader(std::move(file)), filepath(filepath) {}
168 166
169 /** 167 /**
170 * Returns the type of the file 168 * Returns the type of the file
@@ -222,10 +220,10 @@ public:
222 * @param size Size of the RomFS in bytes 220 * @param size Size of the RomFS in bytes
223 * @return ResultStatus result of function 221 * @return ResultStatus result of function
224 */ 222 */
225 ResultStatus ReadRomFS(std::shared_ptr<FileUtil::IOFile>& romfs_file, u64& offset, u64& size) override; 223 ResultStatus ReadRomFS(std::shared_ptr<FileUtil::IOFile>& romfs_file, u64& offset,
224 u64& size) override;
226 225
227private: 226private:
228
229 /** 227 /**
230 * Reads an application ExeFS section of an NCCH file into AppLoader (e.g. .code, .logo, etc.) 228 * Reads an application ExeFS section of an NCCH file into AppLoader (e.g. .code, .logo, etc.)
231 * @param name Name of section to read out of NCCH file 229 * @param name Name of section to read out of NCCH file
@@ -246,24 +244,24 @@ private:
246 */ 244 */
247 ResultStatus LoadExeFS(); 245 ResultStatus LoadExeFS();
248 246
249 bool is_exefs_loaded = false; 247 bool is_exefs_loaded = false;
250 bool is_compressed = false; 248 bool is_compressed = false;
251 249
252 u32 entry_point = 0; 250 u32 entry_point = 0;
253 u32 code_size = 0; 251 u32 code_size = 0;
254 u32 stack_size = 0; 252 u32 stack_size = 0;
255 u32 bss_size = 0; 253 u32 bss_size = 0;
256 u32 core_version = 0; 254 u32 core_version = 0;
257 u8 priority = 0; 255 u8 priority = 0;
258 u8 resource_limit_category = 0; 256 u8 resource_limit_category = 0;
259 u32 ncch_offset = 0; // Offset to NCCH header, can be 0 or after NCSD header 257 u32 ncch_offset = 0; // Offset to NCCH header, can be 0 or after NCSD header
260 u32 exefs_offset = 0; 258 u32 exefs_offset = 0;
261 259
262 NCCH_Header ncch_header; 260 NCCH_Header ncch_header;
263 ExeFs_Header exefs_header; 261 ExeFs_Header exefs_header;
264 ExHeader_Header exheader_header; 262 ExHeader_Header exheader_header;
265 263
266 std::string filepath; 264 std::string filepath;
267}; 265};
268 266
269} // namespace Loader 267} // namespace Loader