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

@ -5,8 +5,6 @@
#include "cellCamera.h"
void cellCamera_init();
//Module cellCamera(0x0023, cellCamera_init);
Module *cellCamera = nullptr;
struct cellCameraInternal
@ -224,8 +222,10 @@ int cellCameraRemoveNotifyEventQueue2()
return CELL_OK;
}
void cellCamera_init()
void cellCamera_init(Module* pxThis)
{
cellCamera = pxThis;
cellCamera->AddFunc(0xbf47c5dd, cellCameraInit);
cellCamera->AddFunc(0x5ad46570, cellCameraEnd);
cellCamera->AddFunc(0x85e1b8da, cellCameraOpen);