Change ModuleManager::init function.

First step to help refactor Module management.
Add every module in the static ModuleInfo list. Module without id are assigned
to 0xffff.
The init function is called after constructor and take a pointer to Module
as an input.
This pointer is used to set the Module's global pointer in its file.
This commit is contained in:
Arkaran99 2014-09-13 22:00:17 +02:00
parent 7dafb164e8
commit 3caff5a107
46 changed files with 321 additions and 461 deletions

View file

@ -21,9 +21,6 @@
typedef void (*CellHddGameStatCallback)(vm::ptr<CellHddGameCBResult> cbResult, vm::ptr<CellHddGameStatGet> get, vm::ptr<CellHddGameStatSet> set);
//void cellSysutil_init();
//Module cellSysutil(0x0015, cellSysutil_init);
Module *cellSysutil = nullptr;
int cellSysutilGetSystemParamInt(int id, vm::ptr<be_t<u32>> value)
@ -844,8 +841,10 @@ extern int cellGameDataCheckCreate2(u32 version, vm::ptr<const char> dirName, u3
extern int cellGameDataCheckCreate(u32 version, vm::ptr<const char> dirName, u32 errDialog,
vm::ptr<void(*)(vm::ptr<CellGameDataCBResult> cbResult, vm::ptr<CellGameDataStatGet> get, vm::ptr<CellGameDataStatSet> set)> funcStat, u32 container);
void cellSysutil_init()
void cellSysutil_init(Module *pxThis)
{
cellSysutil = pxThis;
cellSysutil->AddFunc(0x40e895d3, cellSysutilGetSystemParamInt);
cellSysutil->AddFunc(0x938013a0, cellSysutilGetSystemParamString);