mirror of
https://github.com/wiiu-env/wudd.git
synced 2024-11-22 01:49:15 +01:00
Format the code via clang-format
This commit is contained in:
parent
8d0f3825f6
commit
990c67d481
67
.clang-format
Normal file
67
.clang-format
Normal file
@ -0,0 +1,67 @@
|
||||
# Generated from CLion C/C++ Code Style settings
|
||||
BasedOnStyle: LLVM
|
||||
AccessModifierOffset: -4
|
||||
AlignAfterOpenBracket: Align
|
||||
AlignConsecutiveAssignments: Consecutive
|
||||
AlignConsecutiveMacros: AcrossEmptyLinesAndComments
|
||||
AlignOperands: Align
|
||||
AllowAllArgumentsOnNextLine: false
|
||||
AllowAllConstructorInitializersOnNextLine: false
|
||||
AllowAllParametersOfDeclarationOnNextLine: false
|
||||
AllowShortBlocksOnASingleLine: Always
|
||||
AllowShortCaseLabelsOnASingleLine: false
|
||||
AllowShortFunctionsOnASingleLine: All
|
||||
AllowShortIfStatementsOnASingleLine: Always
|
||||
AllowShortLambdasOnASingleLine: All
|
||||
AllowShortLoopsOnASingleLine: true
|
||||
AlwaysBreakAfterReturnType: None
|
||||
AlwaysBreakTemplateDeclarations: Yes
|
||||
BreakBeforeBraces: Custom
|
||||
BraceWrapping:
|
||||
AfterCaseLabel: false
|
||||
AfterClass: false
|
||||
AfterControlStatement: Never
|
||||
AfterEnum: false
|
||||
AfterFunction: false
|
||||
AfterNamespace: false
|
||||
AfterUnion: false
|
||||
BeforeCatch: false
|
||||
BeforeElse: false
|
||||
IndentBraces: false
|
||||
SplitEmptyFunction: false
|
||||
SplitEmptyRecord: true
|
||||
BreakBeforeBinaryOperators: None
|
||||
BreakBeforeTernaryOperators: true
|
||||
BreakConstructorInitializers: BeforeColon
|
||||
BreakInheritanceList: BeforeColon
|
||||
ColumnLimit: 0
|
||||
CompactNamespaces: false
|
||||
ContinuationIndentWidth: 8
|
||||
IndentCaseLabels: true
|
||||
IndentPPDirectives: None
|
||||
IndentWidth: 4
|
||||
KeepEmptyLinesAtTheStartOfBlocks: true
|
||||
MaxEmptyLinesToKeep: 2
|
||||
NamespaceIndentation: All
|
||||
ObjCSpaceAfterProperty: false
|
||||
ObjCSpaceBeforeProtocolList: true
|
||||
PointerAlignment: Right
|
||||
ReflowComments: false
|
||||
SpaceAfterCStyleCast: true
|
||||
SpaceAfterLogicalNot: false
|
||||
SpaceAfterTemplateKeyword: false
|
||||
SpaceBeforeAssignmentOperators: true
|
||||
SpaceBeforeCpp11BracedList: false
|
||||
SpaceBeforeCtorInitializerColon: true
|
||||
SpaceBeforeInheritanceColon: true
|
||||
SpaceBeforeParens: ControlStatements
|
||||
SpaceBeforeRangeBasedForLoopColon: true
|
||||
SpaceInEmptyParentheses: false
|
||||
SpacesBeforeTrailingComments: 1
|
||||
SpacesInAngles: false
|
||||
SpacesInCStyleCastParentheses: false
|
||||
SpacesInContainerLiterals: false
|
||||
SpacesInParentheses: false
|
||||
SpacesInSquareBrackets: false
|
||||
TabWidth: 4
|
||||
UseTab: Never
|
9
.github/workflows/ci.yml
vendored
9
.github/workflows/ci.yml
vendored
@ -6,9 +6,16 @@ on:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
|
||||
clang-format:
|
||||
runs-on: ubuntu-18.04
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: clang-format
|
||||
run: |
|
||||
docker run --rm -v ${PWD}:/src wiiuenv/clang-format:13.0.0-2 -r ./source
|
||||
build-binary:
|
||||
runs-on: ubuntu-18.04
|
||||
needs: clang-format
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Checkout submodules using a PAT
|
||||
|
8
.github/workflows/pr.yml
vendored
8
.github/workflows/pr.yml
vendored
@ -3,8 +3,16 @@ name: CI-PR
|
||||
on: [pull_request]
|
||||
|
||||
jobs:
|
||||
clang-format:
|
||||
runs-on: ubuntu-18.04
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: clang-format
|
||||
run: |
|
||||
docker run --rm -v ${PWD}:/src wiiuenv/clang-format:13.0.0-2 -r ./source
|
||||
build-binary:
|
||||
runs-on: ubuntu-18.04
|
||||
needs: clang-format
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Checkout submodules using a PAT
|
||||
|
10
README.md
10
README.md
@ -28,11 +28,15 @@ It's possible to use a docker image for building. This way you don't need anythi
|
||||
|
||||
```
|
||||
# Build docker image (only needed once)
|
||||
docker build . -t WUDD-builder
|
||||
docker build . -t wudd-builder
|
||||
|
||||
# make
|
||||
docker run -it --rm -v ${PWD}:/project WUDD-builder make
|
||||
docker run -it --rm -v ${PWD}:/project wudd-builder make
|
||||
|
||||
# make clean
|
||||
docker run -it --rm -v ${PWD}:/project WUDD-builder make clean
|
||||
docker run -it --rm -v ${PWD}:/project wudd-builder make clean
|
||||
```
|
||||
|
||||
## Format the code via docker
|
||||
|
||||
`docker run --rm -v ${PWD}:/src wiiuenv/clang-format:13.0.0-2 -r ./source -i`
|
@ -1,8 +1,9 @@
|
||||
#pragma once
|
||||
|
||||
|
||||
#include <utils/WiiUScreen.h>
|
||||
#include <utils/ScreenUtils.h>
|
||||
#include "input/Input.h"
|
||||
#include "utils/ScreenUtils.h"
|
||||
#include "utils/WiiUScreen.h"
|
||||
#include <stdint.h>
|
||||
|
||||
class ApplicationState {
|
||||
public:
|
||||
|
@ -14,15 +14,15 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
****************************************************************************/
|
||||
#include "GMPartitionsDumperState.h"
|
||||
#include <WUD/DiscReaderDiscDrive.h>
|
||||
#include <WUD/NUSTitle.h>
|
||||
#include <WUD/content/partitions/WiiUGMPartition.h>
|
||||
#include <WUD/header/WiiUDiscHeader.h>
|
||||
#include <common/common.h>
|
||||
#include <fs/FSUtils.h>
|
||||
#include <iosuhax.h>
|
||||
#include <memory>
|
||||
#include <WUD/DiscReaderDiscDrive.h>
|
||||
#include <WUD/header/WiiUDiscHeader.h>
|
||||
#include <fs/FSUtils.h>
|
||||
#include <WUD/content/partitions/WiiUGMPartition.h>
|
||||
#include <WUD/NUSTitle.h>
|
||||
#include "GMPartitionsDumperState.h"
|
||||
#include <utils/StringTools.h>
|
||||
|
||||
#define READ_BUFFER_SIZE (SECTOR_SIZE * 128)
|
||||
@ -504,5 +504,3 @@ std::string GMPartitionsDumperState::ErrorDescription() const {
|
||||
}
|
||||
return "UNKNOWN_ERROR";
|
||||
}
|
||||
|
||||
|
||||
|
@ -16,17 +16,18 @@
|
||||
****************************************************************************/
|
||||
#pragma once
|
||||
|
||||
#include "ApplicationState.h"
|
||||
#include "common/common.h"
|
||||
#include "fs/WUXFileWriter.h"
|
||||
#include "fs/WriteOnlyFileWithCache.h"
|
||||
#include <WUD/NUSTitle.h>
|
||||
#include <WUD/entities/TMD/Content.h>
|
||||
#include <WUD/header/WiiUDiscHeader.h>
|
||||
#include <input/Input.h>
|
||||
#include <map>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <memory>
|
||||
#include <input/Input.h>
|
||||
#include "ApplicationState.h"
|
||||
#include "fs/WriteOnlyFileWithCache.h"
|
||||
#include "fs/WUXFileWriter.h"
|
||||
#include <WUD/entities/TMD/Content.h>
|
||||
#include <WUD/NUSTitle.h>
|
||||
#include <WUD/header/WiiUDiscHeader.h>
|
||||
|
||||
class GMPartitionsDumperState : public ApplicationState {
|
||||
public:
|
||||
|
@ -15,8 +15,8 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
****************************************************************************/
|
||||
#include "MainApplicationState.h"
|
||||
#include "WUDDumperState.h"
|
||||
#include "GMPartitionsDumperState.h"
|
||||
#include "WUDDumperState.h"
|
||||
#include <sysapp/launch.h>
|
||||
|
||||
MainApplicationState::MainApplicationState() {
|
||||
@ -24,7 +24,8 @@ MainApplicationState::MainApplicationState() {
|
||||
this->state = STATE_WELCOME_SCREEN;
|
||||
}
|
||||
|
||||
MainApplicationState::~MainApplicationState() = default;;
|
||||
MainApplicationState::~MainApplicationState() = default;
|
||||
;
|
||||
|
||||
void MainApplicationState::render() {
|
||||
if (this->state == STATE_DO_SUBSTATE) {
|
||||
|
@ -16,16 +16,16 @@
|
||||
****************************************************************************/
|
||||
#pragma once
|
||||
|
||||
#include "ApplicationState.h"
|
||||
#include "fs/CFile.hpp"
|
||||
#include "input/Input.h"
|
||||
#include <common/common.h>
|
||||
#include <ctime>
|
||||
#include <map>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <optional>
|
||||
#include <queue>
|
||||
#include <ctime>
|
||||
#include <common/common.h>
|
||||
#include "input/Input.h"
|
||||
#include "fs/CFile.hpp"
|
||||
#include "ApplicationState.h"
|
||||
#include <string>
|
||||
|
||||
|
||||
class MainApplicationState : public ApplicationState {
|
||||
|
@ -53,7 +53,6 @@ std::shared_ptr<NUSDataProvider> DefaultNUSDataProcessor::getDataProvider() {
|
||||
|
||||
DefaultNUSDataProcessor::DefaultNUSDataProcessor(
|
||||
std::shared_ptr<NUSDataProvider> pDataProvider,
|
||||
std::shared_ptr<NUSDecryption> pNUSDecryption) :
|
||||
dataProvider(std::move(pDataProvider)),
|
||||
std::shared_ptr<NUSDecryption> pNUSDecryption) : dataProvider(std::move(pDataProvider)),
|
||||
nusDecryption(std::move(pNUSDecryption)) {
|
||||
}
|
||||
|
@ -16,8 +16,8 @@
|
||||
****************************************************************************/
|
||||
#pragma once
|
||||
|
||||
#include <utils/utils.h>
|
||||
#include "NUSDataProcessor.h"
|
||||
#include <utils/utils.h>
|
||||
|
||||
class DefaultNUSDataProcessor : public NUSDataProcessor {
|
||||
public:
|
||||
|
@ -15,11 +15,11 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
****************************************************************************/
|
||||
|
||||
#include <WUD/content/WiiUDiscContentsHeader.h>
|
||||
#include <MainApplicationState.h>
|
||||
#include <utils/rijndael.h>
|
||||
#include <coreinit/debug.h>
|
||||
#include <WUD/content/WiiUDiscContentsHeader.h>
|
||||
#include <common/common.h>
|
||||
#include <coreinit/debug.h>
|
||||
#include <utils/rijndael.h>
|
||||
|
||||
bool DiscReader::readDecryptedChunk(uint64_t readOffset, uint8_t *out_buffer, uint8_t *key, uint8_t *IV) const {
|
||||
int CHUNK_SIZE = 0x10000;
|
||||
@ -149,7 +149,6 @@ bool DiscReader::readEncrypted(uint8_t *buf, uint64_t offset, uint32_t size) {
|
||||
totalRead += toCopy;
|
||||
curOffset += missingFromPrevSector;
|
||||
offsetInBuf += missingFromPrevSector;
|
||||
|
||||
}
|
||||
|
||||
if (totalRead >= size) {
|
||||
|
@ -38,6 +38,7 @@ public:
|
||||
|
||||
uint8_t discKey[16]{};
|
||||
bool hasDiscKey = false;
|
||||
|
||||
private:
|
||||
uint8_t *sector_buf;
|
||||
};
|
@ -14,13 +14,13 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
****************************************************************************/
|
||||
#include "DiscReaderDiscDrive.h"
|
||||
#include <MainApplicationState.h>
|
||||
#include <WUD/content/WiiUDiscContentsHeader.h>
|
||||
#include <common/common.h>
|
||||
#include <MainApplicationState.h>
|
||||
#include <iosuhax.h>
|
||||
#include <utils/rijndael.h>
|
||||
#include <utils/logger.h>
|
||||
#include "DiscReaderDiscDrive.h"
|
||||
#include <utils/rijndael.h>
|
||||
|
||||
|
||||
DiscReaderDiscDrive::DiscReaderDiscDrive() : DiscReader() {
|
||||
|
@ -16,9 +16,9 @@
|
||||
****************************************************************************/
|
||||
#pragma once
|
||||
|
||||
#include "DiscReader.h"
|
||||
#include <cstdint>
|
||||
#include <optional>
|
||||
#include "DiscReader.h"
|
||||
|
||||
class DiscReaderDiscDrive : public DiscReader {
|
||||
public:
|
||||
|
@ -16,9 +16,9 @@
|
||||
****************************************************************************/
|
||||
#pragma once
|
||||
|
||||
#include <cstdint>
|
||||
#include <WUD/entities/TMD/Content.h>
|
||||
#include <WUD/entities/FST/FST.h>
|
||||
#include <WUD/entities/TMD/Content.h>
|
||||
#include <cstdint>
|
||||
|
||||
class NUSDataProvider {
|
||||
|
||||
@ -36,6 +36,5 @@ public:
|
||||
virtual bool getRawCert(std::vector<uint8_t> &out_data) = 0;
|
||||
|
||||
virtual void setFST(const std::shared_ptr<FST> &fst) {
|
||||
|
||||
}
|
||||
};
|
@ -16,11 +16,11 @@
|
||||
****************************************************************************/
|
||||
#pragma once
|
||||
|
||||
#include <WUD/content/partitions/WiiUGMPartition.h>
|
||||
#include "NUSDataProvider.h"
|
||||
#include "DiscReader.h"
|
||||
#include <utils/FSTUtils.h>
|
||||
#include "NUSDataProvider.h"
|
||||
#include <WUD/content/partitions/WiiUGMPartition.h>
|
||||
#include <coreinit/debug.h>
|
||||
#include <utils/FSTUtils.h>
|
||||
|
||||
class NUSDataProviderWUD : public NUSDataProvider {
|
||||
|
||||
|
@ -84,7 +84,6 @@ NUSTitle::NUSTitle(std::shared_ptr<TitleMetaData> pTMD,
|
||||
fst(std::move(pFST)),
|
||||
decryption(std::move(pDecryption)),
|
||||
dataProvider(std::move(pDataProvider)) {
|
||||
|
||||
}
|
||||
|
||||
std::optional<std::shared_ptr<NUSTitle>>
|
||||
|
@ -16,15 +16,15 @@
|
||||
****************************************************************************/
|
||||
#pragma once
|
||||
|
||||
#include <WUD/NUSDataProvider.h>
|
||||
#include <WUD/entities/TMD/TitleMetaData.h>
|
||||
#include <WUD/content/partitions/WiiUGMPartition.h>
|
||||
#include "Ticket.h"
|
||||
#include "NUSDataProcessor.h"
|
||||
#include "NUSDecryption.h"
|
||||
#include "DefaultNUSDataProcessor.h"
|
||||
#include "DiscReaderDiscDrive.h"
|
||||
#include "NUSDataProcessor.h"
|
||||
#include "NUSDataProviderWUD.h"
|
||||
#include "NUSDecryption.h"
|
||||
#include "Ticket.h"
|
||||
#include <WUD/NUSDataProvider.h>
|
||||
#include <WUD/content/partitions/WiiUGMPartition.h>
|
||||
#include <WUD/entities/TMD/TitleMetaData.h>
|
||||
|
||||
class NUSTitle {
|
||||
|
||||
@ -52,5 +52,4 @@ private:
|
||||
std::shared_ptr<NUSDecryption> pDecryption,
|
||||
std::shared_ptr<Ticket> pTicket,
|
||||
std::shared_ptr<FST> pFST);
|
||||
|
||||
};
|
@ -18,8 +18,7 @@
|
||||
#include <algorithm>
|
||||
#include <utils/logger.h>
|
||||
|
||||
Ticket::Ticket(const std::array<uint8_t, 16> &pEncryptedKey, const std::array<uint8_t, 16> &pDecryptedKey) :
|
||||
ticketKeyEnc(pEncryptedKey),
|
||||
Ticket::Ticket(const std::array<uint8_t, 16> &pEncryptedKey, const std::array<uint8_t, 16> &pDecryptedKey) : ticketKeyEnc(pEncryptedKey),
|
||||
ticketKeyDec(pDecryptedKey) {
|
||||
}
|
||||
|
||||
|
@ -17,10 +17,10 @@
|
||||
#pragma once
|
||||
|
||||
#include <cstdint>
|
||||
#include <utils/rijndael.h>
|
||||
#include <cstring>
|
||||
#include <optional>
|
||||
#include <memory>
|
||||
#include <optional>
|
||||
#include <utils/rijndael.h>
|
||||
#include <vector>
|
||||
|
||||
class Ticket {
|
||||
|
@ -14,8 +14,8 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
****************************************************************************/
|
||||
#include <coreinit/debug.h>
|
||||
#include "WiiUContentsInformation.h"
|
||||
#include <coreinit/debug.h>
|
||||
|
||||
uint32_t WiiUContentsInformation::LENGTH = 32768;
|
||||
|
||||
@ -47,9 +47,7 @@ std::optional<std::unique_ptr<WiiUContentsInformation>> WiiUContentsInformation:
|
||||
|
||||
|
||||
WiiUContentsInformation::WiiUContentsInformation(std::unique_ptr<WiiUDiscContentsHeader> pDiscContentHeader,
|
||||
std::unique_ptr<WiiUPartitions> pPartitions) :
|
||||
discContentHeader(std::move(pDiscContentHeader)),
|
||||
std::unique_ptr<WiiUPartitions> pPartitions) : discContentHeader(std::move(pDiscContentHeader)),
|
||||
partitions(std::move(pPartitions)){
|
||||
|
||||
};
|
||||
|
||||
|
@ -16,10 +16,10 @@
|
||||
****************************************************************************/
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <WUD/DiscReader.h>
|
||||
#include "WiiUDiscContentsHeader.h"
|
||||
#include "partitions/WiiUPartitions.h"
|
||||
#include <WUD/DiscReader.h>
|
||||
#include <memory>
|
||||
|
||||
class WiiUContentsInformation {
|
||||
|
||||
|
@ -14,9 +14,9 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
****************************************************************************/
|
||||
#include <utils/blocksize/DiscBlockSize.h>
|
||||
#include <coreinit/debug.h>
|
||||
#include "WiiUDiscContentsHeader.h"
|
||||
#include <coreinit/debug.h>
|
||||
#include <utils/blocksize/DiscBlockSize.h>
|
||||
|
||||
std::optional<std::unique_ptr<WiiUDiscContentsHeader>> WiiUDiscContentsHeader::make_unique(const std::shared_ptr<DiscReader> &discReader, uint32_t offset) {
|
||||
auto *buffer = (uint8_t *) malloc(LENGTH);
|
||||
@ -49,10 +49,7 @@ std::optional<std::unique_ptr<WiiUDiscContentsHeader>> WiiUDiscContentsHeader::m
|
||||
return std::unique_ptr<WiiUDiscContentsHeader>(new WiiUDiscContentsHeader(blockSize, tocHash, numberOfPartition));
|
||||
}
|
||||
|
||||
WiiUDiscContentsHeader::WiiUDiscContentsHeader(DiscBlockSize pSize, const std::array<uint8_t, 20> &pTocHash, uint32_t pNumberOfPartitions) :
|
||||
blockSize(pSize),
|
||||
WiiUDiscContentsHeader::WiiUDiscContentsHeader(DiscBlockSize pSize, const std::array<uint8_t, 20> &pTocHash, uint32_t pNumberOfPartitions) : blockSize(pSize),
|
||||
numberOfPartition(pNumberOfPartitions),
|
||||
tocHash(pTocHash) {
|
||||
|
||||
}
|
||||
|
||||
|
@ -16,11 +16,11 @@
|
||||
****************************************************************************/
|
||||
#pragma once
|
||||
|
||||
#include <WUD/DiscReader.h>
|
||||
#include <algorithm>
|
||||
#include <memory>
|
||||
#include <WUD/DiscReader.h>
|
||||
#include <utils/blocksize/DiscBlockSize.h>
|
||||
#include <optional>
|
||||
#include <utils/blocksize/DiscBlockSize.h>
|
||||
|
||||
class WiiUDiscContentsHeader {
|
||||
|
||||
|
@ -22,10 +22,8 @@ WiiUDataPartition::~WiiUDataPartition() = default;
|
||||
|
||||
WiiUDataPartition::WiiUDataPartition(
|
||||
std::shared_ptr<WiiUPartition> pPartition,
|
||||
std::shared_ptr<FST> pFST) :
|
||||
fst(std::move(pFST)),
|
||||
std::shared_ptr<FST> pFST) : fst(std::move(pFST)),
|
||||
basePartition(std::move(pPartition)) {
|
||||
|
||||
}
|
||||
|
||||
std::string WiiUDataPartition::getVolumeId() const & {
|
||||
|
@ -16,11 +16,11 @@
|
||||
****************************************************************************/
|
||||
#pragma once
|
||||
|
||||
#include "WiiUPartition.h"
|
||||
#include <WUD/entities/FST/FST.h>
|
||||
#include <cstdint>
|
||||
#include <cstdlib>
|
||||
#include <WUD/entities/FST/FST.h>
|
||||
#include <utils/blocksize/AddressInDiscBlocks.h>
|
||||
#include "WiiUPartition.h"
|
||||
|
||||
class WiiUDataPartition : public WiiUPartition {
|
||||
|
||||
@ -43,4 +43,3 @@ public:
|
||||
private:
|
||||
std::shared_ptr<WiiUPartition> basePartition;
|
||||
};
|
||||
|
||||
|
@ -16,10 +16,10 @@
|
||||
****************************************************************************/
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include "WiiUPartition.h"
|
||||
#include <cstdint>
|
||||
#include <cstdlib>
|
||||
#include "WiiUPartition.h"
|
||||
#include <memory>
|
||||
|
||||
class WiiUGMPartition : public WiiUPartition {
|
||||
public:
|
||||
@ -43,4 +43,3 @@ public:
|
||||
private:
|
||||
std::shared_ptr<WiiUPartition> basePartition;
|
||||
};
|
||||
|
||||
|
@ -14,9 +14,9 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
****************************************************************************/
|
||||
#include <memory>
|
||||
#include <coreinit/debug.h>
|
||||
#include "WiiUPartition.h"
|
||||
#include <coreinit/debug.h>
|
||||
#include <memory>
|
||||
|
||||
uint64_t WiiUPartition::getSectionOffsetOnDefaultPartition() {
|
||||
if (volumes.size() != 1) {
|
||||
@ -90,7 +90,3 @@ uint16_t WiiUPartition::getFileSystemDescriptor() const {
|
||||
}
|
||||
|
||||
WiiUPartition::~WiiUPartition() = default;
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -16,11 +16,12 @@
|
||||
****************************************************************************/
|
||||
#pragma once
|
||||
|
||||
#include <map>
|
||||
#include <utility>
|
||||
#include <utils/blocksize/DiscBlockSize.h>
|
||||
#include <utils/blocksize/AddressInDiscBlocks.h>
|
||||
#include "volumes/VolumeHeader.h"
|
||||
#include <map>
|
||||
#include <memory>
|
||||
#include <utility>
|
||||
#include <utils/blocksize/AddressInDiscBlocks.h>
|
||||
#include <utils/blocksize/DiscBlockSize.h>
|
||||
|
||||
class WiiUPartition {
|
||||
|
||||
|
@ -14,13 +14,13 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
****************************************************************************/
|
||||
#include <utils/FSTUtils.h>
|
||||
#include <coreinit/debug.h>
|
||||
#include <utils/FSTUtils.h>
|
||||
|
||||
#include <utility>
|
||||
#include "WiiUPartitions.h"
|
||||
#include "WiiUGMPartition.h"
|
||||
#include "WiiUDataPartition.h"
|
||||
#include "WiiUGMPartition.h"
|
||||
#include "WiiUPartitions.h"
|
||||
#include <utility>
|
||||
|
||||
bool WiiUPartitions::getFSTEntryAsByte(std::string &filePath,
|
||||
const std::shared_ptr<FST> &fst,
|
||||
@ -151,7 +151,6 @@ WiiUPartitions::make_unique(const std::shared_ptr<DiscReader> &discReader, uint3
|
||||
partitions.push_back(gmPartition);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
for (auto &partition : tmp) {
|
||||
@ -190,4 +189,3 @@ WiiUPartitions::make_unique(const std::shared_ptr<DiscReader> &discReader, uint3
|
||||
|
||||
WiiUPartitions::WiiUPartitions(std::vector<std::shared_ptr<WiiUPartition>> pPartitions) : partitions(std::move(pPartitions)) {
|
||||
}
|
||||
|
||||
|
@ -16,13 +16,13 @@
|
||||
****************************************************************************/
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <cstdint>
|
||||
#include <utils/blocksize/DiscBlockSize.h>
|
||||
#include <utils/blocksize/AddressInDiscBlocks.h>
|
||||
#include <WUD/entities/FST/FST.h>
|
||||
#include <WUD/DiscReader.h>
|
||||
#include "WiiUPartition.h"
|
||||
#include <WUD/DiscReader.h>
|
||||
#include <WUD/entities/FST/FST.h>
|
||||
#include <cstdint>
|
||||
#include <memory>
|
||||
#include <utils/blocksize/AddressInDiscBlocks.h>
|
||||
#include <utils/blocksize/DiscBlockSize.h>
|
||||
|
||||
#define WUD_TMD_FILENAME "title.tmd"
|
||||
#define WUD_TICKET_FILENAME "title.tik"
|
||||
|
@ -15,8 +15,8 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
****************************************************************************/
|
||||
#include "H3HashArray.h"
|
||||
#include <cstring>
|
||||
#include <coreinit/debug.h>
|
||||
#include <cstring>
|
||||
|
||||
H3HashArray::H3HashArray(uint8_t *pData, uint32_t pSize) {
|
||||
size = pSize;
|
||||
|
@ -15,9 +15,9 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
****************************************************************************/
|
||||
|
||||
#include <memory>
|
||||
#include "VolumeHeader.h"
|
||||
#include <coreinit/debug.h>
|
||||
#include <memory>
|
||||
#include <utils/logger.h>
|
||||
|
||||
uint32_t VolumeHeader::MAGIC = 0xCC93A4F5;
|
||||
@ -123,5 +123,3 @@ VolumeHeader::VolumeHeader(const VolumeBlockSize &pBlockSize,
|
||||
h3HashArrayListSize(pH3HashArrayListSize),
|
||||
numberOfH3HashArray(pNumberOfH3HashArray) {
|
||||
}
|
||||
|
||||
|
||||
|
@ -16,16 +16,17 @@
|
||||
****************************************************************************/
|
||||
#pragma once
|
||||
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
#include <cstdint>
|
||||
#include "H3HashArray.h"
|
||||
#include <WUD/DiscReader.h>
|
||||
#include <utils/blocksize/VolumeBlockSize.h>
|
||||
#include <cstdint>
|
||||
#include <memory>
|
||||
#include <optional>
|
||||
#include <utility>
|
||||
#include <utils/blocksize/AddressInVolumeBlocks.h>
|
||||
#include <utils/blocksize/SizeInVolumeBlocks.h>
|
||||
#include <optional>
|
||||
#include <utils/blocksize/VolumeBlockSize.h>
|
||||
#include <utils/utils.h>
|
||||
#include "H3HashArray.h"
|
||||
#include <vector>
|
||||
|
||||
class VolumeHeader {
|
||||
|
||||
@ -63,5 +64,4 @@ private:
|
||||
std::vector<std::shared_ptr<H3HashArray>> pH3HashArrayList,
|
||||
uint32_t pH3HashArrayListSize,
|
||||
uint32_t pNumberOfH3HashArray);
|
||||
|
||||
};
|
@ -85,10 +85,8 @@ std::optional<std::shared_ptr<FST>> FST::make_shared(const std::vector<uint8_t>
|
||||
FST::FST(std::unique_ptr<FSTHeader> pHeader,
|
||||
std::shared_ptr<SectionEntries> pSectionEntries,
|
||||
std::shared_ptr<StringTable> pStringTable,
|
||||
std::unique_ptr<NodeEntries> pNodeEntries) :
|
||||
sectionEntries(std::move(pSectionEntries)),
|
||||
std::unique_ptr<NodeEntries> pNodeEntries) : sectionEntries(std::move(pSectionEntries)),
|
||||
stringTable(std::move(pStringTable)),
|
||||
nodeEntries(std::move(pNodeEntries)),
|
||||
header(std::move(pHeader)) {
|
||||
|
||||
}
|
||||
|
@ -16,15 +16,15 @@
|
||||
****************************************************************************/
|
||||
#pragma once
|
||||
|
||||
#include <optional>
|
||||
#include <memory>
|
||||
#include <cstdint>
|
||||
#include <utility>
|
||||
#include <WUD/entities/FST/header/FSTHeader.h>
|
||||
#include <WUD/entities/FST/sectionentry/SectionEntries.h>
|
||||
#include <WUD/entities/FST/stringtable/StringTable.h>
|
||||
#include <WUD/entities/FST/nodeentry/NodeEntries.h>
|
||||
#include <WUD/entities/FST/nodeentry/RootEntry.h>
|
||||
#include <WUD/entities/FST/sectionentry/SectionEntries.h>
|
||||
#include <WUD/entities/FST/stringtable/StringTable.h>
|
||||
#include <cstdint>
|
||||
#include <memory>
|
||||
#include <optional>
|
||||
#include <utility>
|
||||
|
||||
class FST {
|
||||
public:
|
||||
@ -33,12 +33,12 @@ public:
|
||||
static std::optional<std::shared_ptr<FST>> make_shared(const std::vector<uint8_t> &data, uint32_t offset, const VolumeBlockSize &blockSize);
|
||||
|
||||
std::shared_ptr<SectionEntries> sectionEntries;
|
||||
|
||||
private:
|
||||
FST(std::unique_ptr<FSTHeader> pHeader,
|
||||
std::shared_ptr<SectionEntries> pSectionEntries,
|
||||
std::shared_ptr<StringTable> pStringTable,
|
||||
std::unique_ptr<NodeEntries> pNodeEntries
|
||||
);
|
||||
std::unique_ptr<NodeEntries> pNodeEntries);
|
||||
|
||||
std::shared_ptr<StringTable> stringTable;
|
||||
std::unique_ptr<NodeEntries> nodeEntries;
|
||||
|
@ -14,9 +14,9 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
****************************************************************************/
|
||||
#include "FSTHeader.h"
|
||||
#include <utils/blocksize/SectionBlockSize.h>
|
||||
#include <utils/logger.h>
|
||||
#include "FSTHeader.h"
|
||||
|
||||
std::optional<std::unique_ptr<FSTHeader>> FSTHeader::make_unique(const std::array<uint8_t, FSTHeader::LENGTH> &data) {
|
||||
auto *dataAsUint = (uint32_t *) data.data();
|
||||
@ -33,13 +33,11 @@ std::optional<std::unique_ptr<FSTHeader>> FSTHeader::make_unique(const std::arra
|
||||
FSTVersion,
|
||||
blockSize,
|
||||
numberOfSections,
|
||||
hashDisabled
|
||||
));
|
||||
hashDisabled));
|
||||
}
|
||||
|
||||
FSTHeader::FSTHeader(uint8_t pFSTVersion, SectionBlockSize pBlockSize, uint32_t pNumberOfSections, uint8_t pHashDisabled) : FSTVersion(pFSTVersion),
|
||||
blockSize(pBlockSize),
|
||||
numberOfSections(pNumberOfSections),
|
||||
hashDisabled(pHashDisabled) {
|
||||
|
||||
}
|
||||
|
@ -16,9 +16,9 @@
|
||||
****************************************************************************/
|
||||
#pragma once
|
||||
|
||||
#include <optional>
|
||||
#include <memory>
|
||||
#include <cstdint>
|
||||
#include <memory>
|
||||
#include <optional>
|
||||
#include <utils/blocksize/SectionBlockSize.h>
|
||||
|
||||
class FSTHeader {
|
||||
@ -35,5 +35,4 @@ public:
|
||||
|
||||
private:
|
||||
FSTHeader(uint8_t pFSTVersion, SectionBlockSize pBlockSize, uint32_t pNumberOfSections, uint8_t pHashDisabled);
|
||||
|
||||
};
|
||||
|
@ -14,8 +14,8 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
****************************************************************************/
|
||||
#include <coreinit/debug.h>
|
||||
#include "DirectoryEntry.h"
|
||||
#include <coreinit/debug.h>
|
||||
|
||||
std::optional<std::shared_ptr<DirectoryEntry>>
|
||||
DirectoryEntry::parseData(const std::array<uint8_t, NodeEntry::LENGTH> &data, const NodeEntryParam ¶m, const std::shared_ptr<SectionEntries> §ionEntries,
|
||||
@ -77,8 +77,7 @@ DirectoryEntry::DirectoryEntry(const NodeEntryParam ¶m,
|
||||
const std::shared_ptr<StringEntry> &pStringEntry,
|
||||
const std::shared_ptr<SectionEntry> &pSectionEntry,
|
||||
uint32_t pParentEntryNumber,
|
||||
uint32_t pLastEntryNumber) :
|
||||
NodeEntry(param.permission,
|
||||
uint32_t pLastEntryNumber) : NodeEntry(param.permission,
|
||||
pStringEntry,
|
||||
pSectionEntry,
|
||||
param.parent,
|
||||
@ -88,8 +87,7 @@ DirectoryEntry::DirectoryEntry(const NodeEntryParam ¶m,
|
||||
lastEntryNumber(pLastEntryNumber) {
|
||||
}
|
||||
|
||||
DirectoryEntry::DirectoryEntry(const std::shared_ptr<DirectoryEntry> &input) :
|
||||
NodeEntry(input->permission,
|
||||
DirectoryEntry::DirectoryEntry(const std::shared_ptr<DirectoryEntry> &input) : NodeEntry(input->permission,
|
||||
input->nameString,
|
||||
input->sectionEntry,
|
||||
input->parent,
|
||||
@ -97,5 +95,4 @@ DirectoryEntry::DirectoryEntry(const std::shared_ptr<DirectoryEntry> &input) :
|
||||
input->entryNumber),
|
||||
parentEntryNumber(input->parentEntryNumber),
|
||||
lastEntryNumber(input->lastEntryNumber) {
|
||||
|
||||
}
|
||||
|
@ -16,11 +16,11 @@
|
||||
****************************************************************************/
|
||||
#pragma once
|
||||
|
||||
#include "FileEntry.h"
|
||||
#include "NodeEntry.h"
|
||||
#include "NodeEntryParam.h"
|
||||
#include <WUD/entities/FST/sectionentry/SectionEntries.h>
|
||||
#include <WUD/entities/FST/stringtable/StringTable.h>
|
||||
#include "NodeEntryParam.h"
|
||||
#include "NodeEntry.h"
|
||||
#include "FileEntry.h"
|
||||
|
||||
class DirectoryEntry : public NodeEntry {
|
||||
public:
|
||||
|
@ -61,8 +61,7 @@ FileEntry::FileEntry(
|
||||
const NodeEntryParam ¶m,
|
||||
const std::shared_ptr<StringEntry> &pStringEntry,
|
||||
const std::shared_ptr<SectionEntry> &pSectionEntry,
|
||||
uint32_t pSize, SectionAddress pAddress) :
|
||||
NodeEntry(param.permission,
|
||||
uint32_t pSize, SectionAddress pAddress) : NodeEntry(param.permission,
|
||||
pStringEntry,
|
||||
pSectionEntry,
|
||||
param.parent,
|
||||
@ -70,5 +69,4 @@ FileEntry::FileEntry(
|
||||
param.entryNumber),
|
||||
address(std::move(pAddress)),
|
||||
size(pSize) {
|
||||
|
||||
}
|
@ -23,7 +23,6 @@
|
||||
|
||||
class FileEntry : public NodeEntry {
|
||||
public:
|
||||
|
||||
static std::optional<std::shared_ptr<NodeEntry>>
|
||||
parseData(const std::array<uint8_t, NodeEntry::LENGTH> &data,
|
||||
const NodeEntryParam ¶m,
|
||||
|
@ -14,8 +14,8 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
****************************************************************************/
|
||||
#include <coreinit/debug.h>
|
||||
#include "NodeEntries.h"
|
||||
#include <coreinit/debug.h>
|
||||
|
||||
std::optional<std::shared_ptr<NodeEntry>> NodeEntries::DeserializeImpl(const std::vector<uint8_t> &pData,
|
||||
uint32_t pOffset,
|
||||
|
@ -16,15 +16,15 @@
|
||||
****************************************************************************/
|
||||
#pragma once
|
||||
|
||||
#include <WUD/entities/FST/sectionentry/SectionEntries.h>
|
||||
#include <WUD/entities/FST/stringtable/StringTable.h>
|
||||
#include <utils/blocksize/SectionBlockSize.h>
|
||||
#include <WUD/entities/FST/sectionentry/SectionEntries.h>
|
||||
|
||||
#include <utility>
|
||||
#include "DirectoryEntry.h"
|
||||
#include "RootEntry.h"
|
||||
#include "NodeEntry.h"
|
||||
#include "NodeEntries.h"
|
||||
#include "NodeEntry.h"
|
||||
#include "RootEntry.h"
|
||||
#include <utility>
|
||||
|
||||
class NodeEntries {
|
||||
|
||||
|
@ -14,15 +14,15 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
****************************************************************************/
|
||||
#include <utils/blocksize/SectionBlockSize.h>
|
||||
#include <WUD/entities/FST/stringtable/StringTable.h>
|
||||
#include <WUD/entities/FST/sectionentry/SectionEntries.h>
|
||||
#include <WUD/entities/FST/stringtable/StringTable.h>
|
||||
#include <utils/blocksize/SectionBlockSize.h>
|
||||
|
||||
#include "DirectoryEntry.h"
|
||||
#include "NodeEntry.h"
|
||||
#include "RootEntry.h"
|
||||
#include <algorithm>
|
||||
#include <utility>
|
||||
#include "NodeEntry.h"
|
||||
#include "DirectoryEntry.h"
|
||||
#include "RootEntry.h"
|
||||
|
||||
std::optional<std::shared_ptr<NodeEntry>>
|
||||
NodeEntry::AutoDeserialize(const std::vector<uint8_t> &data,
|
||||
@ -123,17 +123,14 @@ NodeEntry::NodeEntry(const uint16_t pPermission,
|
||||
std::shared_ptr<StringEntry> pNameString,
|
||||
std::shared_ptr<SectionEntry> pSectionEntry,
|
||||
std::optional<std::shared_ptr<DirectoryEntry>> pParent,
|
||||
const uint8_t pType, const uint32_t pEntryNumber) :
|
||||
permission(pPermission),
|
||||
const uint8_t pType, const uint32_t pEntryNumber) : permission(pPermission),
|
||||
nameString(std::move(pNameString)),
|
||||
sectionEntry(std::move(pSectionEntry)),
|
||||
parent(std::move(pParent)),
|
||||
entryType(pType),
|
||||
entryNumber(pEntryNumber) {
|
||||
|
||||
}
|
||||
|
||||
void NodeEntry::printPathRecursive() {
|
||||
DEBUG_FUNCTION_LINE("%s", getFullPath().c_str());
|
||||
}
|
||||
|
||||
|
@ -16,13 +16,13 @@
|
||||
****************************************************************************/
|
||||
#pragma once
|
||||
|
||||
#include "NodeEntryParam.h"
|
||||
#include <WUD/entities/FST/sectionentry/SectionEntries.h>
|
||||
#include <WUD/entities/FST/sectionentry/SectionEntry.h>
|
||||
#include <WUD/entities/FST/stringtable/StringEntry.h>
|
||||
#include <cstdint>
|
||||
#include <utils/blocksize/SectionBlockSize.h>
|
||||
#include <WUD/entities/FST/stringtable/StringEntry.h>
|
||||
#include <WUD/entities/FST/sectionentry/SectionEntry.h>
|
||||
#include <WUD/entities/FST/sectionentry/SectionEntries.h>
|
||||
#include <utils/logger.h>
|
||||
#include "NodeEntryParam.h"
|
||||
|
||||
#define ENTRY_TYPE_File 0
|
||||
#define ENTRY_TYPE_Directory 1
|
||||
|
@ -17,6 +17,8 @@
|
||||
#pragma once
|
||||
|
||||
#include <cstdint>
|
||||
#include <memory>
|
||||
#include <optional>
|
||||
|
||||
class DirectoryEntry;
|
||||
|
||||
|
@ -14,11 +14,10 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
****************************************************************************/
|
||||
#include <coreinit/debug.h>
|
||||
#include "RootEntry.h"
|
||||
#include <coreinit/debug.h>
|
||||
|
||||
RootEntry::RootEntry(const std::shared_ptr<DirectoryEntry> &input) : DirectoryEntry(input) {
|
||||
|
||||
}
|
||||
|
||||
uint32_t RootEntry::parseLastEntryNumber(const std::array<uint8_t, NodeEntry::LENGTH> &data) {
|
||||
@ -26,8 +25,7 @@ uint32_t RootEntry::parseLastEntryNumber(const std::array<uint8_t, NodeEntry::LE
|
||||
}
|
||||
|
||||
std::optional<std::shared_ptr<NodeEntry>>
|
||||
RootEntry::parseData
|
||||
(const std::array<uint8_t, NodeEntry::LENGTH> &data,
|
||||
RootEntry::parseData(const std::array<uint8_t, NodeEntry::LENGTH> &data,
|
||||
const NodeEntryParam ¶m,
|
||||
const std::shared_ptr<SectionEntries> §ionEntries,
|
||||
const std::shared_ptr<StringTable> &stringTable) {
|
||||
|
@ -16,11 +16,11 @@
|
||||
****************************************************************************/
|
||||
#pragma once
|
||||
|
||||
#include <cstdint>
|
||||
#include <WUD/entities/FST/stringtable/StringTable.h>
|
||||
#include <utils/blocksize/SectionBlockSize.h>
|
||||
#include <WUD/entities/FST/sectionentry/SectionEntries.h>
|
||||
#include "DirectoryEntry.h"
|
||||
#include <WUD/entities/FST/sectionentry/SectionEntries.h>
|
||||
#include <WUD/entities/FST/stringtable/StringTable.h>
|
||||
#include <cstdint>
|
||||
#include <utils/blocksize/SectionBlockSize.h>
|
||||
|
||||
class RootEntry : public DirectoryEntry {
|
||||
|
||||
|
@ -42,7 +42,8 @@ std::optional<std::shared_ptr<SectionEntries>> SectionEntries::make_shared(const
|
||||
}
|
||||
std::array<uint8_t, SectionEntry::LENGTH> sectionEntryData{};
|
||||
memcpy(sectionEntryData.data(), data.data() + (i * SectionEntry::LENGTH), SectionEntry::LENGTH);
|
||||
list.push_back(std::make_shared<SectionEntry>(sectionEntryData, i, pBlockSize));;
|
||||
list.push_back(std::make_shared<SectionEntry>(sectionEntryData, i, pBlockSize));
|
||||
;
|
||||
}
|
||||
return std::shared_ptr<SectionEntries>(new SectionEntries(list));
|
||||
}
|
||||
@ -52,5 +53,4 @@ std::vector<std::shared_ptr<SectionEntry>> SectionEntries::getSections() const &
|
||||
}
|
||||
|
||||
SectionEntries::SectionEntries(std::vector<std::shared_ptr<SectionEntry>> pList) : list(std::move(pList)) {
|
||||
|
||||
}
|
||||
|
@ -16,14 +16,14 @@
|
||||
****************************************************************************/
|
||||
#pragma once
|
||||
|
||||
#include <optional>
|
||||
#include <memory>
|
||||
#include "SectionEntry.h"
|
||||
#include <cstdint>
|
||||
#include <memory>
|
||||
#include <optional>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
#include <utils/blocksize/VolumeBlockSize.h>
|
||||
#include <utils/logger.h>
|
||||
#include "SectionEntry.h"
|
||||
#include <vector>
|
||||
|
||||
class SectionEntries {
|
||||
|
||||
|
@ -16,9 +16,9 @@
|
||||
****************************************************************************/
|
||||
#pragma once
|
||||
|
||||
#include <array>
|
||||
#include <cstdint>
|
||||
#include <string>
|
||||
#include <array>
|
||||
#include <utils/blocksize/AddressInVolumeBlocks.h>
|
||||
#include <utils/blocksize/SizeInVolumeBlocks.h>
|
||||
|
||||
|
@ -16,9 +16,9 @@
|
||||
****************************************************************************/
|
||||
#include "StringEntry.h"
|
||||
|
||||
#include "StringTable.h"
|
||||
#include <utility>
|
||||
#include <utils/logger.h>
|
||||
#include "StringTable.h"
|
||||
|
||||
std::optional<std::string> StringEntry::toString() const {
|
||||
return stringTable->getByAddress(offset);
|
||||
|
@ -17,9 +17,9 @@
|
||||
#pragma once
|
||||
|
||||
#include <cstdint>
|
||||
#include <string>
|
||||
#include <memory>
|
||||
#include <optional>
|
||||
#include <string>
|
||||
|
||||
class StringTable;
|
||||
|
||||
|
@ -14,10 +14,10 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
****************************************************************************/
|
||||
#include <cstring>
|
||||
#include <coreinit/debug.h>
|
||||
#include <utils/logger.h>
|
||||
#include "StringTable.h"
|
||||
#include <coreinit/debug.h>
|
||||
#include <cstring>
|
||||
#include <utils/logger.h>
|
||||
|
||||
|
||||
std::optional<std::shared_ptr<StringTable>> StringTable::make_shared(const std::vector<uint8_t> &data, uint32_t offset, uint32_t stringCount) {
|
||||
|
@ -16,12 +16,12 @@
|
||||
****************************************************************************/
|
||||
#pragma once
|
||||
|
||||
#include <optional>
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
#include <string>
|
||||
#include <map>
|
||||
#include "StringEntry.h"
|
||||
#include <map>
|
||||
#include <memory>
|
||||
#include <optional>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
class StringTable {
|
||||
|
||||
|
@ -14,11 +14,10 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
****************************************************************************/
|
||||
#include <cstring>
|
||||
#include "Content.h"
|
||||
#include <cstring>
|
||||
|
||||
Content::Content(uint32_t pId, uint16_t pIndex, uint16_t pType, uint64_t pEncryptedFileSize, const std::array<uint8_t, 0x14> &pHash) :
|
||||
ID(pId),
|
||||
Content::Content(uint32_t pId, uint16_t pIndex, uint16_t pType, uint64_t pEncryptedFileSize, const std::array<uint8_t, 0x14> &pHash) : ID(pId),
|
||||
index(pIndex),
|
||||
type(pType),
|
||||
encryptedFileSize(pEncryptedFileSize),
|
||||
|
@ -17,8 +17,8 @@
|
||||
#pragma once
|
||||
|
||||
#include <cstdint>
|
||||
#include <optional>
|
||||
#include <memory>
|
||||
#include <optional>
|
||||
|
||||
class Content {
|
||||
public:
|
||||
|
@ -22,7 +22,6 @@
|
||||
TitleMetaData::TitleMetaData(std::vector<std::shared_ptr<Content>> pContentList) : contentList(std::move(pContentList)) {
|
||||
|
||||
// Get Contents
|
||||
|
||||
}
|
||||
|
||||
std::optional<std::shared_ptr<Content>> TitleMetaData::getContentByIndex(uint16_t i) {
|
||||
|
@ -16,11 +16,11 @@
|
||||
****************************************************************************/
|
||||
#pragma once
|
||||
|
||||
#include <optional>
|
||||
#include <memory>
|
||||
#include <cstdint>
|
||||
#include <vector>
|
||||
#include "Content.h"
|
||||
#include <cstdint>
|
||||
#include <memory>
|
||||
#include <optional>
|
||||
#include <vector>
|
||||
|
||||
class TitleMetaData {
|
||||
public:
|
||||
|
@ -21,8 +21,7 @@ uint32_t WiiUDiscHeader::LENGTH = 131072L;
|
||||
|
||||
WiiUDiscHeader::WiiUDiscHeader(std::unique_ptr<WiiUManufactorDiscId> pManufactorDiscId,
|
||||
std::unique_ptr<WiiUDiscId> pDiscId,
|
||||
std::unique_ptr<WiiUContentsInformation> pWiiUContentsInformation) :
|
||||
manufactorDiscId(std::move(pManufactorDiscId)),
|
||||
std::unique_ptr<WiiUContentsInformation> pWiiUContentsInformation) : manufactorDiscId(std::move(pManufactorDiscId)),
|
||||
discId(std::move(pDiscId)),
|
||||
wiiUContentsInformation(std::move(pWiiUContentsInformation)) {
|
||||
}
|
||||
|
@ -16,17 +16,16 @@
|
||||
****************************************************************************/
|
||||
#pragma once
|
||||
|
||||
#include <cstdint>
|
||||
#include <WUD/DiscReader.h>
|
||||
#include <WUD/content/WiiUContentsInformation.h>
|
||||
#include <WUD/DiscReaderDiscDrive.h>
|
||||
#include <memory>
|
||||
#include "WiiUManufactorDiscId.h"
|
||||
#include "WiiUDiscId.h"
|
||||
#include "WiiUManufactorDiscId.h"
|
||||
#include <WUD/DiscReader.h>
|
||||
#include <WUD/DiscReaderDiscDrive.h>
|
||||
#include <WUD/content/WiiUContentsInformation.h>
|
||||
#include <cstdint>
|
||||
#include <memory>
|
||||
|
||||
class WiiUDiscHeader {
|
||||
public:
|
||||
|
||||
static std::optional<std::unique_ptr<WiiUDiscHeader>> make_unique(const std::shared_ptr<DiscReader> &discReader);
|
||||
|
||||
std::unique_ptr<WiiUManufactorDiscId> manufactorDiscId;
|
||||
@ -39,6 +38,5 @@ private:
|
||||
explicit WiiUDiscHeader(
|
||||
std::unique_ptr<WiiUManufactorDiscId> pManufactorDiscId,
|
||||
std::unique_ptr<WiiUDiscId> pDiscId,
|
||||
std::unique_ptr<WiiUContentsInformation> pWiiUContentsInformation
|
||||
);
|
||||
std::unique_ptr<WiiUContentsInformation> pWiiUContentsInformation);
|
||||
};
|
@ -15,8 +15,8 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
****************************************************************************/
|
||||
#include "WiiUDiscId.h"
|
||||
#include <memory>
|
||||
#include <coreinit/debug.h>
|
||||
#include <memory>
|
||||
#include <utils/logger.h>
|
||||
|
||||
std::optional<std::unique_ptr<WiiUDiscId>> WiiUDiscId::make_unique(const std::shared_ptr<DiscReader> &discReader, uint32_t offset) {
|
||||
@ -46,9 +46,7 @@ std::optional<std::unique_ptr<WiiUDiscId>> WiiUDiscId::make_unique(const std::sh
|
||||
return std::unique_ptr<WiiUDiscId>(new WiiUDiscId(minorVersion, majorVersion, footprint));
|
||||
}
|
||||
|
||||
WiiUDiscId::WiiUDiscId(uint8_t pMinorVersion, uint8_t pMajorVersion, const std::string &pFootprint) :
|
||||
minorVersion(pMinorVersion),
|
||||
WiiUDiscId::WiiUDiscId(uint8_t pMinorVersion, uint8_t pMajorVersion, const std::string &pFootprint) : minorVersion(pMinorVersion),
|
||||
majorVersion(pMajorVersion),
|
||||
footprint(pFootprint) {
|
||||
|
||||
}
|
||||
|
@ -16,10 +16,10 @@
|
||||
****************************************************************************/
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <WUD/DiscReader.h>
|
||||
#include <memory>
|
||||
#include <optional>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
|
||||
class WiiUDiscId {
|
||||
|
@ -16,9 +16,9 @@
|
||||
****************************************************************************/
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <cstdint>
|
||||
#include <WUD/DiscReader.h>
|
||||
#include <cstdint>
|
||||
#include <memory>
|
||||
#include <optional>
|
||||
|
||||
class WiiUManufactorDiscId {
|
||||
|
@ -14,15 +14,15 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
****************************************************************************/
|
||||
#include <malloc.h>
|
||||
#include <utils/WiiUScreen.h>
|
||||
#include <common/common.h>
|
||||
#include <iosuhax.h>
|
||||
#include <fs/FSUtils.h>
|
||||
#include <utils/StringTools.h>
|
||||
#include <utils/utils.h>
|
||||
#include <WUD/content/WiiUDiscContentsHeader.h>
|
||||
#include "WUDDumperState.h"
|
||||
#include <WUD/content/WiiUDiscContentsHeader.h>
|
||||
#include <common/common.h>
|
||||
#include <fs/FSUtils.h>
|
||||
#include <iosuhax.h>
|
||||
#include <malloc.h>
|
||||
#include <utils/StringTools.h>
|
||||
#include <utils/WiiUScreen.h>
|
||||
#include <utils/utils.h>
|
||||
|
||||
WUDDumperState::WUDDumperState(WUDDumperState::eDumpTargetFormat pTargetFormat, eDumpTarget pTargetDevice)
|
||||
: targetFormat(pTargetFormat), targetDevice(pTargetDevice) {
|
||||
|
@ -16,15 +16,15 @@
|
||||
****************************************************************************/
|
||||
#pragma once
|
||||
|
||||
#include "ApplicationState.h"
|
||||
#include "fs/WUXFileWriter.h"
|
||||
#include "fs/WriteOnlyFileWithCache.h"
|
||||
#include <common/common.h>
|
||||
#include <input/Input.h>
|
||||
#include <map>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <memory>
|
||||
#include <input/Input.h>
|
||||
#include <common/common.h>
|
||||
#include "ApplicationState.h"
|
||||
#include "fs/WriteOnlyFileWithCache.h"
|
||||
#include "fs/WUXFileWriter.h"
|
||||
|
||||
#define READ_NUM_SECTORS 128
|
||||
#define WRITE_BUFFER_NUM_SECTORS 128
|
||||
@ -32,7 +32,6 @@
|
||||
|
||||
class WUDDumperState : public ApplicationState {
|
||||
public:
|
||||
|
||||
enum eDumpTargetFormat {
|
||||
DUMP_AS_WUX,
|
||||
DUMP_AS_WUD,
|
||||
@ -109,5 +108,4 @@ public:
|
||||
int32_t writtenSectors{};
|
||||
|
||||
void *emptySector = nullptr;
|
||||
|
||||
};
|
@ -1,8 +1,8 @@
|
||||
#include "CFile.hpp"
|
||||
#include <cstdarg>
|
||||
#include <cstdio>
|
||||
#include <strings.h>
|
||||
#include <utils/logger.h>
|
||||
#include "CFile.hpp"
|
||||
|
||||
CFile::CFile() {
|
||||
iFd = -1;
|
||||
@ -173,5 +173,3 @@ int32_t CFile::fwrite(const char *format, ...) {
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
|
@ -1,12 +1,12 @@
|
||||
#pragma once
|
||||
|
||||
#include <cstdio>
|
||||
#include <string>
|
||||
#include <cstring>
|
||||
#include <fcntl.h>
|
||||
#include <string>
|
||||
#include <unistd.h>
|
||||
#include <wut_types.h>
|
||||
#include <utils/logger.h>
|
||||
#include <wut_types.h>
|
||||
|
||||
class CFile {
|
||||
public:
|
||||
|
@ -1,11 +1,11 @@
|
||||
#include <malloc.h>
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
#include <fcntl.h>
|
||||
#include "FSUtils.h"
|
||||
#include "CFile.hpp"
|
||||
#include "utils/logger.h"
|
||||
#include <fcntl.h>
|
||||
#include <malloc.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
|
||||
int32_t FSUtils::LoadFileToMem(const char *filepath, uint8_t **inbuffer, uint32_t *size) {
|
||||
//! always initialze input
|
||||
@ -171,4 +171,3 @@ int32_t FSUtils::saveBufferToFile(const char *path, void *buffer, uint32_t size)
|
||||
file.close();
|
||||
return written;
|
||||
}
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <wut_types.h>
|
||||
#include <string>
|
||||
#include <wut_types.h>
|
||||
|
||||
class FSUtils {
|
||||
public:
|
||||
|
@ -14,11 +14,10 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
****************************************************************************/
|
||||
#include <utils/logger.h>
|
||||
#include "WUDFileWriter.h"
|
||||
#include <utils/logger.h>
|
||||
|
||||
WUDFileWriter::WUDFileWriter(const char *path, int32_t cacheSize, int32_t pSectorSize, bool split) :
|
||||
WriteOnlyFileWithCache(path, cacheSize, split),
|
||||
WUDFileWriter::WUDFileWriter(const char *path, int32_t cacheSize, int32_t pSectorSize, bool split) : WriteOnlyFileWithCache(path, cacheSize, split),
|
||||
sectorSize(pSectorSize) {
|
||||
}
|
||||
|
||||
@ -31,5 +30,4 @@ int32_t WUDFileWriter::writeSector(const uint8_t *buffer, uint32_t numberOfSecto
|
||||
}
|
||||
|
||||
void WUDFileWriter::finalize() {
|
||||
|
||||
}
|
||||
|
@ -25,6 +25,7 @@ public:
|
||||
virtual int32_t writeSector(const uint8_t *buffer, uint32_t numberOfSectors);
|
||||
|
||||
virtual void finalize();
|
||||
|
||||
protected:
|
||||
int32_t sectorSize;
|
||||
};
|
||||
|
@ -14,12 +14,11 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
****************************************************************************/
|
||||
#include <utils/logger.h>
|
||||
#include "WUXFileWriter.h"
|
||||
#include "WUDDumperState.h"
|
||||
#include <utils/logger.h>
|
||||
|
||||
WUXFileWriter::WUXFileWriter(const char *path, int32_t cacheSize, int32_t sectorSize, bool split) :
|
||||
WUDFileWriter(path, cacheSize, sectorSize, split) {
|
||||
WUXFileWriter::WUXFileWriter(const char *path, int32_t cacheSize, int32_t sectorSize, bool split) : WUDFileWriter(path, cacheSize, sectorSize, split) {
|
||||
wuxHeader_t wuxHeader = {0};
|
||||
wuxHeader.magic0 = WUX_MAGIC_0;
|
||||
wuxHeader.magic1 = WUX_MAGIC_1;
|
||||
@ -111,5 +110,4 @@ void WUXFileWriter::finalize() {
|
||||
WUDFileWriter::finalize();
|
||||
writeSectorIndexTable();
|
||||
WUXFileWriter::close();
|
||||
|
||||
}
|
||||
|
@ -16,8 +16,8 @@
|
||||
****************************************************************************/
|
||||
#pragma once
|
||||
|
||||
#include "utils/utils.h"
|
||||
#include "WUDFileWriter.h"
|
||||
#include "utils/utils.h"
|
||||
#include <map>
|
||||
|
||||
typedef struct {
|
||||
|
@ -14,11 +14,11 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
****************************************************************************/
|
||||
#include <malloc.h>
|
||||
#include <coreinit/memory.h>
|
||||
#include <utils/logger.h>
|
||||
#include <utils/StringTools.h>
|
||||
#include "WriteOnlyFileWithCache.h"
|
||||
#include <coreinit/memory.h>
|
||||
#include <malloc.h>
|
||||
#include <utils/StringTools.h>
|
||||
#include <utils/logger.h>
|
||||
|
||||
#define SPLIT_SIZE (0x80000000)
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
#pragma once
|
||||
|
||||
#include "Input.h"
|
||||
class CombinedInput : public Input {
|
||||
public:
|
||||
void combine(const Input &b) {
|
||||
|
@ -1,7 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <cstring>
|
||||
#include <cstdint>
|
||||
#include <cstring>
|
||||
|
||||
class Input {
|
||||
public:
|
||||
@ -57,5 +57,4 @@ public:
|
||||
|
||||
PadData data{};
|
||||
PadData lastData{};
|
||||
|
||||
};
|
||||
|
@ -16,8 +16,8 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
****************************************************************************/
|
||||
|
||||
#include <vpad/input.h>
|
||||
#include "Input.h"
|
||||
#include <vpad/input.h>
|
||||
|
||||
class VPadInput : public Input {
|
||||
public:
|
||||
|
@ -16,9 +16,9 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
****************************************************************************/
|
||||
|
||||
#include "Input.h"
|
||||
#include <padscore/kpad.h>
|
||||
#include <padscore/wpad.h>
|
||||
#include "Input.h"
|
||||
|
||||
class WPADInput : public Input {
|
||||
public:
|
||||
|
@ -1,21 +1,21 @@
|
||||
#include <whb/proc.h>
|
||||
#include <whb/log.h>
|
||||
#include <whb/log_udp.h>
|
||||
#include <whb/proc.h>
|
||||
|
||||
#include <thread>
|
||||
|
||||
#include <iosuhax.h>
|
||||
#include <ntfs.h>
|
||||
#include <coreinit/debug.h>
|
||||
#include <coreinit/energysaver.h>
|
||||
#include <padscore/kpad.h>
|
||||
#include <input/WPADInput.h>
|
||||
#include <input/CombinedInput.h>
|
||||
#include <input/WPADInput.h>
|
||||
#include <iosuhax.h>
|
||||
#include <ntfs.h>
|
||||
#include <padscore/kpad.h>
|
||||
|
||||
#include "utils/logger.h"
|
||||
#include "utils/WiiUScreen.h"
|
||||
#include "input/VPADInput.h"
|
||||
#include "MainApplicationState.h"
|
||||
#include "input/VPADInput.h"
|
||||
#include "utils/WiiUScreen.h"
|
||||
#include "utils/logger.h"
|
||||
|
||||
|
||||
void initIOSUHax();
|
||||
@ -84,8 +84,7 @@ void main_loop() {
|
||||
WPAD_CHAN_0,
|
||||
WPAD_CHAN_1,
|
||||
WPAD_CHAN_2,
|
||||
WPAD_CHAN_3
|
||||
};
|
||||
WPAD_CHAN_3};
|
||||
|
||||
if (gFSAfd < 0 || !sIosuhaxMount) {
|
||||
// state.setError(MainApplicationState::eErrorState::ERROR_IOSUHAX_FAILED);
|
||||
|
@ -16,10 +16,10 @@
|
||||
****************************************************************************/
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
#include <WUD/entities/FST/nodeentry/NodeEntry.h>
|
||||
#include <WUD/entities/FST/nodeentry/DirectoryEntry.h>
|
||||
#include <WUD/entities/FST/FST.h>
|
||||
#include <WUD/entities/FST/nodeentry/DirectoryEntry.h>
|
||||
#include <WUD/entities/FST/nodeentry/NodeEntry.h>
|
||||
#include <string>
|
||||
|
||||
class FSTUtils {
|
||||
public:
|
||||
@ -29,4 +29,3 @@ public:
|
||||
|
||||
static std::optional<std::shared_ptr<SectionEntry>> getSectionEntryForIndex(const std::shared_ptr<FST> &pFst, uint16_t index);
|
||||
};
|
||||
|
||||
|
@ -14,8 +14,8 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
****************************************************************************/
|
||||
#include <coreinit/screen.h>
|
||||
#include "ScreenUtils.h"
|
||||
#include <coreinit/screen.h>
|
||||
|
||||
void ScreenUtils::printTextOnScreen(ConsoleScreenID screen, int x, int y, const char *msg) {
|
||||
if (!msg) {
|
||||
|
@ -15,6 +15,7 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
****************************************************************************/
|
||||
#pragma once
|
||||
#include <stdint.h>
|
||||
|
||||
//! Defines the ID of a display usable with OSScreen.
|
||||
typedef enum ConsoleScreenID {
|
||||
|
@ -23,17 +23,16 @@
|
||||
*
|
||||
* for WiiXplorer 2010
|
||||
***************************************************************************/
|
||||
#include <vector>
|
||||
#include <string>
|
||||
#include <string.h>
|
||||
#include <stdarg.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <wchar.h>
|
||||
#include <strings.h>
|
||||
#include <wut_types.h>
|
||||
#include <stdio.h>
|
||||
#include "StringTools.h"
|
||||
#include <stdarg.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <string>
|
||||
#include <strings.h>
|
||||
#include <vector>
|
||||
#include <wchar.h>
|
||||
#include <wut_types.h>
|
||||
|
||||
|
||||
BOOL StringTools::EndsWith(const std::string &a, const std::string &b) {
|
||||
@ -214,8 +213,7 @@ bool StringTools::findStringIC(const std::string &strHaystack, const std::string
|
||||
auto it = std::search(
|
||||
strHaystack.begin(), strHaystack.end(),
|
||||
strNeedle.begin(), strNeedle.end(),
|
||||
[](char ch1, char ch2) { return std::toupper(ch1) == std::toupper(ch2); }
|
||||
);
|
||||
[](char ch1, char ch2) { return std::toupper(ch1) == std::toupper(ch2); });
|
||||
return (it != strHaystack.end());
|
||||
}
|
||||
|
||||
|
@ -25,11 +25,11 @@
|
||||
***************************************************************************/
|
||||
#pragma once
|
||||
|
||||
#include <vector>
|
||||
#include <string>
|
||||
#include <wut_types.h>
|
||||
#include <algorithm>
|
||||
#include <cctype>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <wut_types.h>
|
||||
|
||||
class StringTools {
|
||||
public:
|
||||
|
@ -1,3 +1,4 @@
|
||||
// clang-format off
|
||||
/*
|
||||
*
|
||||
* TinySHA1 - a header only implementation of the SHA1 algorithm in C++. Based
|
||||
|
@ -3,21 +3,22 @@
|
||||
#include <whb/log.h>
|
||||
#include <whb/log_console.h>
|
||||
|
||||
#include <coreinit/memheap.h>
|
||||
#include "utils/logger.h"
|
||||
#include <coreinit/cache.h>
|
||||
#include <coreinit/memfrmheap.h>
|
||||
#include <coreinit/memheap.h>
|
||||
#include <coreinit/memory.h>
|
||||
#include <coreinit/screen.h>
|
||||
#include <proc_ui/procui.h>
|
||||
#include <cstring>
|
||||
#include "utils/logger.h"
|
||||
#include <proc_ui/procui.h>
|
||||
|
||||
#define NUM_LINES (16)
|
||||
#define LINE_LENGTH (128)
|
||||
#define CONSOLE_FRAME_HEAP_TAG (0x000DECAF)
|
||||
#define PRINTF_BUFFER_LENGTH 2048
|
||||
|
||||
#define DEBUG_CONSOLE_LOG(FMT, ARGS...)do { \
|
||||
#define DEBUG_CONSOLE_LOG(FMT, ARGS...) \
|
||||
do { \
|
||||
DEBUG_FUNCTION_LINE(FMT, ##ARGS); \
|
||||
WiiUScreen::drawLinef(FMT, ##ARGS); \
|
||||
} while (0)
|
||||
|
@ -16,13 +16,12 @@
|
||||
****************************************************************************/
|
||||
#pragma once
|
||||
|
||||
#include <cstdint>
|
||||
#include "BlockSize.h"
|
||||
#include <cstdint>
|
||||
|
||||
class AddressInBlocks {
|
||||
public:
|
||||
explicit AddressInBlocks(const BlockSize &pBlockSize, uint32_t pValue) : blockSize(pBlockSize), value(pValue) {
|
||||
|
||||
}
|
||||
|
||||
AddressInBlocks() = default;
|
||||
|
@ -38,4 +38,4 @@ namespace std {
|
||||
return lhs.getAddressInBytes() < rhs.getAddressInBytes();
|
||||
}
|
||||
};
|
||||
}
|
||||
} // namespace std
|
||||
|
@ -16,8 +16,8 @@
|
||||
****************************************************************************/
|
||||
#pragma once
|
||||
|
||||
#include "VolumeBlockSize.h"
|
||||
#include "AddressInBlocks.h"
|
||||
#include "VolumeBlockSize.h"
|
||||
|
||||
class AddressInVolumeBlocks : public AddressInBlocks {
|
||||
|
||||
|
@ -16,8 +16,8 @@
|
||||
****************************************************************************/
|
||||
#pragma once
|
||||
|
||||
#include "utils/logger.h"
|
||||
#include "BlockSize.h"
|
||||
#include "utils/logger.h"
|
||||
|
||||
class DiscBlockSize : public BlockSize {
|
||||
|
||||
@ -25,6 +25,5 @@ public:
|
||||
DiscBlockSize() = default;
|
||||
|
||||
explicit DiscBlockSize(uint32_t blockSize) : BlockSize(blockSize) {
|
||||
|
||||
}
|
||||
};
|
@ -16,8 +16,8 @@
|
||||
****************************************************************************/
|
||||
#pragma once
|
||||
|
||||
#include <cstdint>
|
||||
#include "BlockSize.h"
|
||||
#include <cstdint>
|
||||
|
||||
class SectionBlockSize : public BlockSize {
|
||||
|
||||
|
@ -16,9 +16,9 @@
|
||||
****************************************************************************/
|
||||
#pragma once
|
||||
|
||||
#include "BlockSize.h"
|
||||
#include <iostream>
|
||||
#include <type_traits>
|
||||
#include "BlockSize.h"
|
||||
|
||||
class SizeInBlocks {
|
||||
public:
|
||||
|
@ -1,7 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include "VolumeBlockSize.h"
|
||||
#include "SizeInBlocks.h"
|
||||
#include "VolumeBlockSize.h"
|
||||
|
||||
class SizeInVolumeBlocks : public SizeInBlocks {
|
||||
|
||||
@ -9,6 +9,5 @@ public:
|
||||
SizeInVolumeBlocks() = default;
|
||||
|
||||
SizeInVolumeBlocks(const VolumeBlockSize &blockSize, uint32_t value) : SizeInBlocks(blockSize, value) {
|
||||
|
||||
}
|
||||
};
|
@ -16,8 +16,8 @@
|
||||
****************************************************************************/
|
||||
#pragma once
|
||||
|
||||
#include <cstdint>
|
||||
#include "BlockSize.h"
|
||||
#include <cstdint>
|
||||
|
||||
class VolumeBlockSize : public BlockSize {
|
||||
|
||||
|
@ -10,11 +10,13 @@ extern "C" {
|
||||
#define __FILENAME_X__ (strrchr(__FILE__, '\\') ? strrchr(__FILE__, '\\') + 1 : __FILE__)
|
||||
#define __FILENAME__ (strrchr(__FILE__, '/') ? strrchr(__FILE__, '/') + 1 : __FILENAME_X__)
|
||||
|
||||
#define DEBUG_FUNCTION_LINE(FMT, ARGS...)do { \
|
||||
#define DEBUG_FUNCTION_LINE(FMT, ARGS...) \
|
||||
do { \
|
||||
WHBLogPrintf("[%23s]%30s@L%04d: " FMT, __FILENAME__, __FUNCTION__, __LINE__, ##ARGS); \
|
||||
} while (0)
|
||||
|
||||
#define DEBUG_FUNCTION_LINE_WRITE(FMT, ARGS...)do { \
|
||||
#define DEBUG_FUNCTION_LINE_WRITE(FMT, ARGS...) \
|
||||
do { \
|
||||
WHBLogWritef("[%23s]%30s@L%04d: " FMT "", __FILENAME__, __FUNCTION__, __LINE__, ##ARGS); \
|
||||
} while (0)
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
// clang-format off
|
||||
/* Rijndael Block Cipher - rijndael.c
|
||||
|
||||
Written by Mike Scott 21st April 1999
|
||||
|
@ -4,5 +4,4 @@ extern "C" {
|
||||
void aes_set_key(unsigned char *key);
|
||||
void aes_decrypt(unsigned char *iv, unsigned char *inbuf, unsigned char *outbuf, unsigned long long len);
|
||||
void aes_encrypt(unsigned char *iv, unsigned char *inbuf, unsigned char *outbuf, unsigned long long len);
|
||||
|
||||
};
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user