mirror of
https://github.com/rrika/cdcEngineDXHR.git
synced 2024-11-26 23:10:20 +00:00
add FileAllocatedReceiver
This commit is contained in:
parent
93b0fc3c97
commit
4c289b3eb3
@ -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
10
cdcFile/FileReceiver.cpp
Normal 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);
|
||||
}
|
||||
|
||||
}
|
@ -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;
|
||||
};
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user