diff options
| author | 2015-01-06 23:36:48 +0000 | |
|---|---|---|
| committer | 2015-01-15 21:21:26 +0000 | |
| commit | 43e699d849ac5dd7a29ff0eeb5821e2a824c091e (patch) | |
| tree | b05f3b2621d59bdd936211245126b51152a89f86 /src/core/loader/ncch.cpp | |
| parent | Loader: Fix indentation, whitespace, and a few other such cosmetic stuff. (diff) | |
| download | yuzu-43e699d849ac5dd7a29ff0eeb5821e2a824c091e.tar.gz yuzu-43e699d849ac5dd7a29ff0eeb5821e2a824c091e.tar.xz yuzu-43e699d849ac5dd7a29ff0eeb5821e2a824c091e.zip | |
Loader: Don’t duplicate the docstring into the cpp file.
Diffstat (limited to 'src/core/loader/ncch.cpp')
| -rw-r--r-- | src/core/loader/ncch.cpp | 41 |
1 files changed, 0 insertions, 41 deletions
diff --git a/src/core/loader/ncch.cpp b/src/core/loader/ncch.cpp index e246cebc4..f1d01252e 100644 --- a/src/core/loader/ncch.cpp +++ b/src/core/loader/ncch.cpp | |||
| @@ -113,10 +113,6 @@ AppLoader_NCCH::AppLoader_NCCH(const std::string& filename) { | |||
| 113 | AppLoader_NCCH::~AppLoader_NCCH() { | 113 | AppLoader_NCCH::~AppLoader_NCCH() { |
| 114 | } | 114 | } |
| 115 | 115 | ||
| 116 | /** | ||
| 117 | * Loads .code section into memory for booting | ||
| 118 | * @return ResultStatus result of function | ||
| 119 | */ | ||
| 120 | ResultStatus AppLoader_NCCH::LoadExec() const { | 116 | ResultStatus AppLoader_NCCH::LoadExec() const { |
| 121 | if (!is_loaded) | 117 | if (!is_loaded) |
| 122 | return ResultStatus::ErrorNotLoaded; | 118 | return ResultStatus::ErrorNotLoaded; |
| @@ -130,12 +126,6 @@ ResultStatus AppLoader_NCCH::LoadExec() const { | |||
| 130 | return ResultStatus::Error; | 126 | return ResultStatus::Error; |
| 131 | } | 127 | } |
| 132 | 128 | ||
| 133 | /** | ||
| 134 | * Reads an application ExeFS section of an NCCH file into AppLoader (e.g. .code, .logo, etc.) | ||
| 135 | * @param name Name of section to read out of NCCH file | ||
| 136 | * @param buffer Vector to read data into | ||
| 137 | * @return ResultStatus result of function | ||
| 138 | */ | ||
| 139 | ResultStatus AppLoader_NCCH::LoadSectionExeFS(const char* name, std::vector<u8>& buffer) const { | 129 | ResultStatus AppLoader_NCCH::LoadSectionExeFS(const char* name, std::vector<u8>& buffer) const { |
| 140 | // Iterate through the ExeFs archive until we find the .code file... | 130 | // Iterate through the ExeFs archive until we find the .code file... |
| 141 | FileUtil::IOFile file(filename, "rb"); | 131 | FileUtil::IOFile file(filename, "rb"); |
| @@ -187,12 +177,6 @@ ResultStatus AppLoader_NCCH::LoadSectionExeFS(const char* name, std::vector<u8>& | |||
| 187 | return ResultStatus::ErrorNotUsed; | 177 | return ResultStatus::ErrorNotUsed; |
| 188 | } | 178 | } |
| 189 | 179 | ||
| 190 | /** | ||
| 191 | * Loads an NCCH file (e.g. from a CCI, or the first NCCH in a CXI) | ||
| 192 | * @param error_string Pointer to string to put error message if an error has occurred | ||
| 193 | * @todo Move NCSD parsing out of here and create a separate function for loading these | ||
| 194 | * @return True on success, otherwise false | ||
| 195 | */ | ||
| 196 | ResultStatus AppLoader_NCCH::Load() { | 180 | ResultStatus AppLoader_NCCH::Load() { |
| 197 | LOG_INFO(Loader, "Loading NCCH file %s...", filename.c_str()); | 181 | LOG_INFO(Loader, "Loading NCCH file %s...", filename.c_str()); |
| 198 | 182 | ||
| @@ -248,47 +232,22 @@ ResultStatus AppLoader_NCCH::Load() { | |||
| 248 | return ResultStatus::Error; | 232 | return ResultStatus::Error; |
| 249 | } | 233 | } |
| 250 | 234 | ||
| 251 | /** | ||
| 252 | * Get the code (typically .code section) of the application | ||
| 253 | * @param buffer Reference to buffer to store data | ||
| 254 | * @return ResultStatus result of function | ||
| 255 | */ | ||
| 256 | ResultStatus AppLoader_NCCH::ReadCode(std::vector<u8>& buffer) const { | 235 | ResultStatus AppLoader_NCCH::ReadCode(std::vector<u8>& buffer) const { |
| 257 | return LoadSectionExeFS(".code", buffer); | 236 | return LoadSectionExeFS(".code", buffer); |
| 258 | } | 237 | } |
| 259 | 238 | ||
| 260 | /** | ||
| 261 | * Get the icon (typically icon section) of the application | ||
| 262 | * @param buffer Reference to buffer to store data | ||
| 263 | * @return ResultStatus result of function | ||
| 264 | */ | ||
| 265 | ResultStatus AppLoader_NCCH::ReadIcon(std::vector<u8>& buffer) const { | 239 | ResultStatus AppLoader_NCCH::ReadIcon(std::vector<u8>& buffer) const { |
| 266 | return LoadSectionExeFS("icon", buffer); | 240 | return LoadSectionExeFS("icon", buffer); |
| 267 | } | 241 | } |
| 268 | 242 | ||
| 269 | /** | ||
| 270 | * Get the banner (typically banner section) of the application | ||
| 271 | * @param buffer Reference to buffer to store data | ||
| 272 | * @return ResultStatus result of function | ||
| 273 | */ | ||
| 274 | ResultStatus AppLoader_NCCH::ReadBanner(std::vector<u8>& buffer) const { | 243 | ResultStatus AppLoader_NCCH::ReadBanner(std::vector<u8>& buffer) const { |
| 275 | return LoadSectionExeFS("banner", buffer); | 244 | return LoadSectionExeFS("banner", buffer); |
| 276 | } | 245 | } |
| 277 | 246 | ||
| 278 | /** | ||
| 279 | * Get the logo (typically logo section) of the application | ||
| 280 | * @param buffer Reference to buffer to store data | ||
| 281 | * @return ResultStatus result of function | ||
| 282 | */ | ||
| 283 | ResultStatus AppLoader_NCCH::ReadLogo(std::vector<u8>& buffer) const { | 247 | ResultStatus AppLoader_NCCH::ReadLogo(std::vector<u8>& buffer) const { |
| 284 | return LoadSectionExeFS("logo", buffer); | 248 | return LoadSectionExeFS("logo", buffer); |
| 285 | } | 249 | } |
| 286 | 250 | ||
| 287 | /** | ||
| 288 | * Get the RomFS of the application | ||
| 289 | * @param buffer Reference to buffer to store data | ||
| 290 | * @return ResultStatus result of function | ||
| 291 | */ | ||
| 292 | ResultStatus AppLoader_NCCH::ReadRomFS(std::vector<u8>& buffer) const { | 251 | ResultStatus AppLoader_NCCH::ReadRomFS(std::vector<u8>& buffer) const { |
| 293 | FileUtil::IOFile file(filename, "rb"); | 252 | FileUtil::IOFile file(filename, "rb"); |
| 294 | if (file.IsOpen()) { | 253 | if (file.IsOpen()) { |