1
0
Fork 0
mirror of https://git.rip/DMCA_FUCKER/re3.git synced 2024-11-06 01:55:58 +00:00

Add Relocatable Chunk stubs

This commit is contained in:
Sergeanur 2021-01-08 23:42:42 +02:00
parent b6875b41f4
commit a871da4fbe
2 changed files with 87 additions and 0 deletions

View file

@ -0,0 +1,36 @@
#include "common.h"
#include "relocatableChunk.h"
namespace base
{
// TODO(LCS): add actual code (all of these are stubs)
void* cRelocatableChunk::Load(void* data, bool bShrink) { return nil; }
void* cRelocatableChunk::Load(const char* name, bool bShrink) { return nil; }
void cRelocatableChunk::Fixup(const sChunkHeader& header, void* data) {}
void cRelocatableChunk::Fixup(void* data) {}
void* cRelocatableChunk::Shrink(const sChunkHeader& header, void* data) { return nil; }
void* cRelocatableChunk::Shrink(void* data) { return nil; }
cRelocatableChunkClassInfo::cRelocatableChunkClassInfo(const char* class_name, const void* pVmt, int size) {}
cRelocatableChunkWriter::cRelocatableChunkWriter() {}
cRelocatableChunkWriter::~cRelocatableChunkWriter() {}
void cRelocatableChunkWriter::AddPatch(void* addr) {}
void cRelocatableChunkWriter::AddPatchWithInfo(const char* str, int unk, void* addr) {}
void cRelocatableChunkWriter::AllocateRaw(void* addr, uint32 size, uint32 align, bool a5, bool a6) {}
void cRelocatableChunkWriter::Clear() {}
void cRelocatableChunkWriter::Class(void* ptr, const cRelocatableChunkClassInfo& classInfo) {}
void cRelocatableChunkWriter::DebugFileLine(void*) {}
void cRelocatableChunkWriter::PatchFunc(void* ptr) {}
bool cRelocatableChunkWriter::IsAllocated(void* addr) { return false; }
void cRelocatableChunkWriter::Reserve(int, int) {}
void cRelocatableChunkWriter::Save(const char* filename, uint32 a3, uint32 a4, bool a5) {}
void cRelocatableChunkWriter::Save(void* file, uint32 a3, uint32 a4, bool a5, sChunkHeader* pHeader) {}
};

View file

@ -0,0 +1,51 @@
#pragma once
namespace base
{
// TODO(LCS): add actual struct fields
struct sChunkHeader;
struct sDataBlock;
struct sFileLine;
class cRelocatableChunk
{
public:
void* Load(void* data, bool bShrink);
void* Load(const char* name, bool bShrink);
void Fixup(const sChunkHeader& header, void* data);
void Fixup(void* data);
void* Shrink(const sChunkHeader& header, void* data);
void* Shrink(void* data);
};
class cRelocatableChunkClassInfo
{
public:
cRelocatableChunkClassInfo(const char* class_name, const void* pVmt, int size);
};
class cRelocatableChunkWriter
{
public:
cRelocatableChunkWriter();
~cRelocatableChunkWriter();
void AddPatch(void* addr);
void AddPatchWithInfo(const char* str, int unk, void* addr);
void AllocateRaw(void* addr, uint32 size, uint32 align, bool a5 = false, bool a6 = false);
void Clear();
void Class(void* ptr, const cRelocatableChunkClassInfo& classInfo);
void DebugFileLine(void*);
void PatchFunc(void* ptr);
bool IsAllocated(void* addr);
void Reserve(int, int);
void Save(const char* filename, uint32 a3, uint32 a4, bool a5);
void Save(void* file, uint32 a3, uint32 a4, bool a5, sChunkHeader* pHeader);
};
};