mirror of
https://github.com/zeldaret/ss
synced 2026-07-11 14:48:32 -04:00
db_mapFile
This commit is contained in:
@@ -3,17 +3,19 @@
|
||||
|
||||
#include <common.h>
|
||||
#include <m/m_dvd.h>
|
||||
#include <nw4r/db/db_mapFile.h>
|
||||
#include <rvl/OS.h>
|
||||
|
||||
class DbMapFile {
|
||||
public:
|
||||
DbMapFile(): unk_0(0) {}
|
||||
DbMapFile(): mMapFileHandle(nullptr) {}
|
||||
~DbMapFile();
|
||||
|
||||
void RegisterOnDvd(const char *, const OSModuleInfo *);
|
||||
void Unregister();
|
||||
private:
|
||||
UNKWORD unk_0;
|
||||
nw4r::db::MapFileHandle mMapFileHandle;
|
||||
nw4r::db::MapFile mMapFile;
|
||||
};
|
||||
|
||||
// https://github.com/zeldaret/tp/blob/main/include/DynamicLink.h
|
||||
@@ -75,11 +77,6 @@ struct DynamicModuleControl : DynamicModuleControlBase {
|
||||
/* 0x2C */ mDvd_callback_c *mDvdCallbackRequest;
|
||||
/* 0x30 */ EGG::ExpHeap *mHeap;
|
||||
/* 0x34 */ DbMapFile mpRelMapFile;
|
||||
// Some of these might be members of DbMapFile
|
||||
UNKWORD unk1;
|
||||
UNKWORD unk2;
|
||||
UNKWORD unk3;
|
||||
UNKWORD unk4;
|
||||
|
||||
static u32 sAllocBytes;
|
||||
static mDvd_toMainRam_base_c *sDvdFile;
|
||||
|
||||
@@ -10,8 +10,8 @@ extern "C" {
|
||||
|
||||
int fprintf(FILE* stream, const char* format, ...);
|
||||
int printf(const char* format, ...);
|
||||
int sprintf(const char* str, const char* format, ...);
|
||||
int snprintf(const char* str, size_t n, const char* format, ...);
|
||||
int sprintf(char* str, const char* format, ...);
|
||||
int snprintf(char* str, size_t n, const char* format, ...);
|
||||
int vsnprintf(char* str, size_t n, const char* format, va_list arg);
|
||||
int vprintf(const char* format, va_list arg);
|
||||
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
#ifndef DB_MAPFILE_H
|
||||
#define DB_MAPFILE_H
|
||||
|
||||
#include <rvl/OS.h>
|
||||
|
||||
namespace nw4r {
|
||||
namespace db {
|
||||
|
||||
typedef struct MapFile {
|
||||
u8 *mapBuf;
|
||||
const OSModuleInfo *moduleInfo;
|
||||
s32 fileEntry;
|
||||
MapFile *next;
|
||||
} MapFile;
|
||||
|
||||
typedef MapFile* MapFileHandle;
|
||||
|
||||
MapFileHandle MapFile_RegistOnDvd(void*, const char*, const OSModuleInfo*);
|
||||
void MapFile_Unregist(MapFileHandle);
|
||||
void MapFile_UnregistAll();
|
||||
bool MapFile_QuerySymbol(u32 address, u8 *strBuf, u32 strBufSize);
|
||||
|
||||
} // namespace db
|
||||
} // namespace nw4r
|
||||
|
||||
#endif
|
||||
@@ -105,6 +105,7 @@ BOOL OSLinkFixed(OSModuleInfo* newModule, void* bss);
|
||||
BOOL OSUnlink(OSModuleInfo* module);
|
||||
void OSSetStringTable(void* string_table);
|
||||
void __OSModuleInit(void);
|
||||
OSModuleInfo* OSSearchModule(void* ptr, u32* section, u32* offset);
|
||||
|
||||
#ifdef __cplusplus
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user