rpcs3/rpcs3/Emu/SysCalls/Modules/cellFontFT.cpp
Arkaran99 3caff5a107 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.
2014-09-13 22:00:17 +02:00

54 lines
1.3 KiB
C++

#include "stdafx.h"
#include "Emu/Memory/Memory.h"
#include "Emu/SysCalls/Modules.h"
#include "cellFont.h"
#include "cellFontFT.h"
Module *cellFontFT = nullptr;
CCellFontFTInternal* s_fontFtInternalInstance = nullptr;
int cellFontInitLibraryFreeTypeWithRevision(u64 revisionFlags, vm::ptr<CellFontLibraryConfigFT> config, u32 lib_addr_addr)
{
cellFontFT->Warning("cellFontInitLibraryFreeTypeWithRevision(revisionFlags=0x%llx, config_addr=0x%x, lib_addr_addr=0x%x",
revisionFlags, config.addr(), lib_addr_addr);
//if (s_fontInternalInstance->m_bInitialized)
//return CELL_FONT_ERROR_UNINITIALIZED;
vm::write32(lib_addr_addr, (u32)Memory.Alloc(sizeof(CellFontLibrary), 1));
return CELL_OK;
}
int cellFontFTGetRevisionFlags()
{
UNIMPLEMENTED_FUNC(cellFontFT);
return CELL_OK;
}
int cellFontFTGetInitializedRevisionFlags()
{
UNIMPLEMENTED_FUNC(cellFontFT);
return CELL_OK;
}
void cellFontFT_init(Module *pxThis)
{
cellFontFT = pxThis;
cellFontFT->AddFunc(0x7a0a83c4, cellFontInitLibraryFreeTypeWithRevision);
cellFontFT->AddFunc(0xec89a187, cellFontFTGetRevisionFlags);
cellFontFT->AddFunc(0xfa0c2de0, cellFontFTGetInitializedRevisionFlags);
}
void cellFontFT_load()
{
s_fontFtInternalInstance = new CCellFontFTInternal();
}
void cellFontFT_unload()
{
delete s_fontFtInternalInstance;
}