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

@ -10,8 +10,6 @@ extern "C"
#include "cellVpost.h"
//void cellVpost_init();
//Module cellVpost(0x0008, cellVpost_init);
Module *cellVpost = nullptr;
int cellVpostQueryAttr(vm::ptr<const CellVpostCfgParam> cfgParam, vm::ptr<CellVpostAttr> attr)
@ -153,8 +151,10 @@ int cellVpostExec(u32 handle, vm::ptr<const u8> inPicBuff, vm::ptr<const CellVpo
return CELL_OK;
}
void cellVpost_init()
void cellVpost_init(Module *pxThis)
{
cellVpost = pxThis;
cellVpost->AddFunc(0x95e788c3, cellVpostQueryAttr);
cellVpost->AddFunc(0xcd33f3e2, cellVpostOpen);
cellVpost->AddFunc(0x40524325, cellVpostOpenEx);