mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-06-11 07:18:11 -05:00
Add ZoneWriting basis
This commit is contained in:
@ -1,8 +0,0 @@
|
||||
#pragma once
|
||||
#include <cstdint>
|
||||
|
||||
class ICapturedDataProvider
|
||||
{
|
||||
public:
|
||||
virtual void GetCapturedData(const uint8_t** pCapturedData, size_t* pSize) = 0;
|
||||
};
|
@ -1,5 +1,4 @@
|
||||
#pragma once
|
||||
|
||||
#include <istream>
|
||||
|
||||
#include "ILoadingStream.h"
|
||||
|
@ -2,7 +2,7 @@
|
||||
#include <memory>
|
||||
|
||||
#include "Loading/StreamProcessor.h"
|
||||
#include "Loading/ICapturedDataProvider.h"
|
||||
#include "Utils/ICapturedDataProvider.h"
|
||||
|
||||
class ProcessorCaptureData final : public StreamProcessor, public ICapturedDataProvider
|
||||
{
|
||||
|
@ -1,6 +1,6 @@
|
||||
#pragma once
|
||||
#include "IXChunkProcessor.h"
|
||||
#include "Loading/ICapturedDataProvider.h"
|
||||
#include "Utils/ICapturedDataProvider.h"
|
||||
#include <string>
|
||||
|
||||
class ChunkProcessorSalsa20 : public IXChunkProcessor, public ICapturedDataProvider
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include "Loading/ICapturedDataProvider.h"
|
||||
#include "Utils/ICapturedDataProvider.h"
|
||||
#include "Loading/ILoadingStep.h"
|
||||
#include "Loading/IHashProvider.h"
|
||||
|
||||
|
23
src/ZoneLoading/Loading/Steps/StepLoadZoneSizes.cpp
Normal file
23
src/ZoneLoading/Loading/Steps/StepLoadZoneSizes.cpp
Normal file
@ -0,0 +1,23 @@
|
||||
#include "StepLoadZoneSizes.h"
|
||||
|
||||
StepLoadZoneSizes::StepLoadZoneSizes()
|
||||
: m_size(0),
|
||||
m_external_size(0)
|
||||
{
|
||||
}
|
||||
|
||||
void StepLoadZoneSizes::PerformStep(ZoneLoader* zoneLoader, ILoadingStream* stream)
|
||||
{
|
||||
stream->Load(&m_size, sizeof(m_size));
|
||||
stream->Load(&m_external_size, sizeof(m_external_size));
|
||||
}
|
||||
|
||||
size_t StepLoadZoneSizes::GetSize() const
|
||||
{
|
||||
return m_size;
|
||||
}
|
||||
|
||||
size_t StepLoadZoneSizes::GetExternalSize() const
|
||||
{
|
||||
return m_external_size;
|
||||
}
|
20
src/ZoneLoading/Loading/Steps/StepLoadZoneSizes.h
Normal file
20
src/ZoneLoading/Loading/Steps/StepLoadZoneSizes.h
Normal file
@ -0,0 +1,20 @@
|
||||
#pragma once
|
||||
|
||||
#include <cstddef>
|
||||
|
||||
#include "Utils/ClassUtils.h"
|
||||
#include "Loading/ILoadingStep.h"
|
||||
|
||||
class StepLoadZoneSizes final : public ILoadingStep
|
||||
{
|
||||
size_t m_size;
|
||||
size_t m_external_size;
|
||||
|
||||
public:
|
||||
StepLoadZoneSizes();
|
||||
|
||||
void PerformStep(ZoneLoader* zoneLoader, ILoadingStream* stream) override;
|
||||
|
||||
_NODISCARD size_t GetSize() const;
|
||||
_NODISCARD size_t GetExternalSize() const;
|
||||
};
|
@ -4,7 +4,7 @@
|
||||
|
||||
#include "Crypto.h"
|
||||
#include "Loading/ILoadingStep.h"
|
||||
#include "Loading/ICapturedDataProvider.h"
|
||||
#include "Utils/ICapturedDataProvider.h"
|
||||
#include "Loading/IHashProvider.h"
|
||||
|
||||
class StepVerifyHash final : public ILoadingStep
|
||||
|
@ -3,7 +3,7 @@
|
||||
#include "Loading/ILoadingStep.h"
|
||||
#include "Crypto.h"
|
||||
#include "Loading/ISignatureProvider.h"
|
||||
#include "Loading/ICapturedDataProvider.h"
|
||||
#include "Utils/ICapturedDataProvider.h"
|
||||
|
||||
class StepVerifySignature final : public ILoadingStep
|
||||
{
|
||||
|
Reference in New Issue
Block a user