mirror of
https://github.com/RPCSX/rpcsx.git
synced 2025-12-06 07:12:14 +01:00
move module initialization into a module manager, still has some issues like stopping not working and debug crashing add #idef 0 to modules that aren't in the windows project don't double initialize and don't de-initialize for now, since many modules don't expect it and it leads to many errors remove duplicate module lists for empty modules and implemented ones, make Module non-copyable but movable add secondary project, no real use for it now add some memleak config to the emucore and add asmjit path to rpcs3 small rebase error fixed to get it to compile again add filters for emucore re-add the module manager and static file WIP commit, linker errors abound some more abstraction layer stuff fix the remaining linker errors, re-enable platform specific mouse, pad and keyboard handlers rebasing fix memset undefined and re() usage of se_t before declaration Add wxGUI define by default for cmake builds fix copy constructors of Datetime header fix copy constructors of other wx interface classes remove static declarations of global variables make wxGLCanvas constructor non-ambiguous even with wx2.8. compat mode, fix wrong std::exception constructor calls remove duplicate definition for FromUTF8 and ToUTF8 temp changes
88 lines
2 KiB
C++
88 lines
2 KiB
C++
#include "stdafx.h"
|
|
#include "Emu/ConLog.h"
|
|
#include "Emu/Memory/Memory.h"
|
|
#include "Emu/System.h"
|
|
#include "Emu/Cell/PPUThread.h"
|
|
#include "Emu/SysCalls/SC_FUNC.h"
|
|
#include "Emu/SysCalls/Modules.h"
|
|
#include "Emu/SysCalls/SysCalls.h"
|
|
#include "cellFont.h"
|
|
|
|
//void cellFontFT_init();
|
|
//void cellFontFT_load();
|
|
//void cellFontFT_unload();
|
|
//Module cellFontFT(0x001a, cellFontFT_init, cellFontFT_load, cellFontFT_unload);
|
|
extern Module *cellFontFT = nullptr;
|
|
|
|
struct CellFontLibraryConfigFT
|
|
{
|
|
u32 library_addr; //void*
|
|
CellFontMemoryInterface MemoryIF;
|
|
};
|
|
|
|
struct CellFontRendererConfigFT
|
|
{
|
|
struct {
|
|
u32 buffer_addr; //void*
|
|
u32 initSize;
|
|
u32 maxSize;
|
|
u32 expandSize;
|
|
u32 resetSize;
|
|
} BufferingPolicy;
|
|
};
|
|
|
|
struct CCellFontFTInternal
|
|
{
|
|
bool m_bInitialized;
|
|
|
|
CCellFontFTInternal()
|
|
: m_bInitialized(false)
|
|
{
|
|
}
|
|
};
|
|
|
|
CCellFontFTInternal* s_fontFtInternalInstance = nullptr;
|
|
|
|
int cellFontInitLibraryFreeTypeWithRevision(u64 revisionFlags, mem_ptr_t<CellFontLibraryConfigFT> config, u32 lib_addr_addr)
|
|
{
|
|
cellFontFT->Warning("cellFontInitLibraryFreeTypeWithRevision(revisionFlags=0x%llx, config_addr=0x%x, lib_addr_addr=0x%x",
|
|
revisionFlags, config.GetAddr(), lib_addr_addr);
|
|
|
|
if (!config.IsGood() || !Memory.IsGoodAddr(lib_addr_addr))
|
|
return CELL_FONT_ERROR_INVALID_PARAMETER;
|
|
//if (s_fontInternalInstance->m_bInitialized)
|
|
//return CELL_FONT_ERROR_UNINITIALIZED;
|
|
|
|
Memory.Write32(lib_addr_addr, 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()
|
|
{
|
|
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;
|
|
} |