add FileAllocatedReceiver

This commit is contained in:
Adam Jensen 2023-01-31 22:16:49 +00:00
parent 93b0fc3c97
commit 4c289b3eb3
3 changed files with 20 additions and 0 deletions

View File

@ -1,6 +1,7 @@
target_sources(dxhr PRIVATE
ArchiveFileSystem.cpp
FileHelpers.cpp
FileReceiver.cpp
FileSystemLayer.cpp
FileUserBufferReceiver.cpp
HackFileSystem.cpp)

10
cdcFile/FileReceiver.cpp Normal file
View File

@ -0,0 +1,10 @@
#include <cstring>
#include "FileReceiver.h"
namespace cdc {
void FileAllocatedReceiver::process(FileRequest*, void *input, uint32_t size, uint32_t offset) {
memcpy((char*)m_pBuffer + offset, input, size);
}
}

View File

@ -1,5 +1,6 @@
#pragma once
#include <cstdint>
// #include "cdcSys/Allocator.h"
namespace cdc {
@ -14,4 +15,12 @@ public:
virtual ~FileReceiver() = default;
};
class FileAllocatedReceiver : public FileReceiver {
protected:
char *m_pBuffer;
// AllocRequester m_memTag;
public:
void process(FileRequest*, void *input, uint32_t size, uint32_t offset /*, uint32_t arg4*/) override;
};
}