rpcsx/ps3fw/cellFontFT.cpp

355 lines
7.3 KiB
C++
Raw Permalink Normal View History

2020-12-05 13:08:24 +01:00
#include "stdafx.h"
2016-03-21 20:43:03 +01:00
#include "Emu/Cell/PPUModule.h"
2014-08-23 22:40:04 +02:00
#include "cellFontFT.h"
LOG_CHANNEL(cellFontFT);
2020-07-16 12:14:57 +02:00
error_code cellFontInitLibraryFreeTypeWithRevision(u64 revisionFlags, vm::ptr<CellFontLibraryConfigFT> config, vm::pptr<CellFontLibrary> lib)
{
2024-01-11 00:37:27 +01:00
cellFontFT.todo("cellFontInitLibraryFreeTypeWithRevision(revisionFlags=0x%llx, config=*0x%x, lib=**0x%x)", revisionFlags, config, lib);
if (!lib)
{
return CELL_FONT_ERROR_INVALID_PARAMETER;
}
*lib = {};
if (!config)
{
return CELL_FONT_ERROR_INVALID_PARAMETER;
}
if (false) // TODO
{
return CELL_FONT_ERROR_UNINITIALIZED;
}
2015-07-11 22:44:53 +02:00
lib->set(vm::alloc(sizeof(CellFontLibrary), vm::main));
return CELL_OK;
}
2024-01-11 00:37:27 +01:00
error_code cellFontInitLibraryFreeType(vm::ptr<CellFontLibraryConfigFT> config, vm::pptr<CellFontLibrary> lib)
{
2024-01-11 00:37:27 +01:00
cellFontFT.todo("cellFontInitLibraryFreeType(config=*0x%x, lib=**0x%x)", config, lib);
uint64_t revisionFlags = 0LL;
// cellFontFTGetStubRevisionFlags(&revisionFlags);
2024-01-11 00:37:27 +01:00
return cellFontInitLibraryFreeTypeWithRevision(revisionFlags, config, lib);
}
2024-01-11 00:37:27 +01:00
void cellFontFTGetRevisionFlags(vm::ptr<u64> revisionFlags)
{
2024-01-11 00:37:27 +01:00
cellFontFT.notice("cellFontFTGetRevisionFlags(revisionFlags=*0x%x)", revisionFlags);
if (revisionFlags)
{
*revisionFlags = 0x43;
}
}
error_code cellFontFTGetInitializedRevisionFlags(vm::ptr<u64> revisionFlags)
{
cellFontFT.notice("cellFontFTGetInitializedRevisionFlags(revisionFlags=*0x%x)", revisionFlags);
if (!revisionFlags)
{
return CELL_FONT_ERROR_INVALID_PARAMETER;
}
if (false) // TODO
{
return CELL_FONT_ERROR_UNINITIALIZED;
}
//*revisionFlags = something; // TODO
return CELL_OK;
}
2020-07-16 12:14:57 +02:00
error_code FTCacheStream_CacheEnd()
{
UNIMPLEMENTED_FUNC(cellFontFT);
return CELL_OK;
}
2020-07-16 12:14:57 +02:00
error_code FTCacheStream_CacheInit()
{
UNIMPLEMENTED_FUNC(cellFontFT);
return CELL_OK;
}
2020-07-16 12:14:57 +02:00
error_code FTCacheStream_CalcCacheIndexSize()
{
UNIMPLEMENTED_FUNC(cellFontFT);
return CELL_OK;
}
2020-07-16 12:14:57 +02:00
error_code FTCacheStream_End()
2019-04-05 20:14:01 +02:00
{
UNIMPLEMENTED_FUNC(cellFontFT);
return CELL_OK;
}
2020-07-16 12:14:57 +02:00
error_code FTCacheStream_Init()
{
UNIMPLEMENTED_FUNC(cellFontFT);
return CELL_OK;
}
2020-07-16 12:14:57 +02:00
error_code FTFaceH_Close()
2019-04-05 20:14:01 +02:00
{
UNIMPLEMENTED_FUNC(cellFontFT);
return CELL_OK;
}
2020-07-16 12:14:57 +02:00
error_code FTFaceH_FontFamilyName()
{
UNIMPLEMENTED_FUNC(cellFontFT);
return CELL_OK;
}
2020-07-16 12:14:57 +02:00
error_code FTFaceH_FontStyleName()
{
UNIMPLEMENTED_FUNC(cellFontFT);
return CELL_OK;
}
2020-07-16 12:14:57 +02:00
error_code FTFaceH_GetAscender()
{
UNIMPLEMENTED_FUNC(cellFontFT);
return CELL_OK;
}
2020-07-16 12:14:57 +02:00
error_code FTFaceH_GetBoundingBoxHeight()
{
UNIMPLEMENTED_FUNC(cellFontFT);
return CELL_OK;
}
2020-07-16 12:14:57 +02:00
error_code FTFaceH_GetBoundingBoxMaxX()
{
UNIMPLEMENTED_FUNC(cellFontFT);
return CELL_OK;
}
2020-07-16 12:14:57 +02:00
error_code FTFaceH_GetBoundingBoxMaxY()
{
UNIMPLEMENTED_FUNC(cellFontFT);
return CELL_OK;
}
2020-07-16 12:14:57 +02:00
error_code FTFaceH_GetBoundingBoxMinX()
{
UNIMPLEMENTED_FUNC(cellFontFT);
return CELL_OK;
}
2020-07-16 12:14:57 +02:00
error_code FTFaceH_GetBoundingBoxMinY()
{
UNIMPLEMENTED_FUNC(cellFontFT);
return CELL_OK;
}
2020-07-16 12:14:57 +02:00
error_code FTFaceH_GetBoundingBoxWidth()
{
UNIMPLEMENTED_FUNC(cellFontFT);
return CELL_OK;
}
2020-07-16 12:14:57 +02:00
error_code FTFaceH_GetCompositeCodes()
2019-04-05 20:14:01 +02:00
{
UNIMPLEMENTED_FUNC(cellFontFT);
return CELL_OK;
}
2020-07-16 12:14:57 +02:00
error_code FTFaceH_GetGlyphImage()
{
UNIMPLEMENTED_FUNC(cellFontFT);
return CELL_OK;
}
2020-07-16 12:14:57 +02:00
error_code FTFaceH_GetGlyphMetrics()
{
UNIMPLEMENTED_FUNC(cellFontFT);
return CELL_OK;
}
2020-07-16 12:14:57 +02:00
error_code FTFaceH_GetKerning()
2019-04-05 20:14:01 +02:00
{
UNIMPLEMENTED_FUNC(cellFontFT);
return CELL_OK;
}
2020-07-16 12:14:57 +02:00
error_code FTFaceH_GetMaxHorizontalAdvance()
{
UNIMPLEMENTED_FUNC(cellFontFT);
return CELL_OK;
}
2020-07-16 12:14:57 +02:00
error_code FTFaceH_GetMaxVerticalAdvance()
{
UNIMPLEMENTED_FUNC(cellFontFT);
return CELL_OK;
}
2020-07-16 12:14:57 +02:00
error_code FTFaceH_GetRenderBufferSize()
{
UNIMPLEMENTED_FUNC(cellFontFT);
return CELL_OK;
}
2020-07-16 12:14:57 +02:00
error_code FTFaceH_GetRenderEffectSlant()
2019-04-05 20:14:01 +02:00
{
UNIMPLEMENTED_FUNC(cellFontFT);
return CELL_OK;
}
2020-07-16 12:14:57 +02:00
error_code FTFaceH_GetRenderEffectWeight()
2019-04-05 20:14:01 +02:00
{
UNIMPLEMENTED_FUNC(cellFontFT);
return CELL_OK;
}
2020-07-16 12:14:57 +02:00
error_code FTFaceH_GetRenderScale()
{
UNIMPLEMENTED_FUNC(cellFontFT);
return CELL_OK;
}
2020-07-16 12:14:57 +02:00
error_code FTFaceH_GetRenderScalePixel()
2019-04-05 20:14:01 +02:00
{
UNIMPLEMENTED_FUNC(cellFontFT);
return CELL_OK;
}
2020-07-16 12:14:57 +02:00
error_code FTFaceH_GetRenderScalePoint()
{
UNIMPLEMENTED_FUNC(cellFontFT);
return CELL_OK;
}
2020-07-16 12:14:57 +02:00
error_code FTFaceH_SetCompositeCodes()
{
UNIMPLEMENTED_FUNC(cellFontFT);
return CELL_OK;
}
2020-07-16 12:14:57 +02:00
error_code FTFaceH_SetRenderEffectSlant()
2019-04-05 20:14:01 +02:00
{
UNIMPLEMENTED_FUNC(cellFontFT);
return CELL_OK;
}
2020-07-16 12:14:57 +02:00
error_code FTFaceH_SetRenderEffectWeight()
2019-04-05 20:14:01 +02:00
{
UNIMPLEMENTED_FUNC(cellFontFT);
return CELL_OK;
}
2020-07-16 12:14:57 +02:00
error_code FTFaceH_SetRenderScalePixel()
{
UNIMPLEMENTED_FUNC(cellFontFT);
return CELL_OK;
}
2020-07-16 12:14:57 +02:00
error_code FTFaceH_SetRenderScalePoint()
{
UNIMPLEMENTED_FUNC(cellFontFT);
return CELL_OK;
}
2020-07-16 12:14:57 +02:00
error_code FTManager_CloseFace()
{
UNIMPLEMENTED_FUNC(cellFontFT);
return CELL_OK;
}
2020-07-16 12:14:57 +02:00
error_code FTManager_Done_FreeType()
{
UNIMPLEMENTED_FUNC(cellFontFT);
return CELL_OK;
}
2020-07-16 12:14:57 +02:00
error_code FTManager_Init_FreeType()
{
UNIMPLEMENTED_FUNC(cellFontFT);
return CELL_OK;
}
2020-07-16 12:14:57 +02:00
error_code FTManager_OpenFileFace()
{
UNIMPLEMENTED_FUNC(cellFontFT);
return CELL_OK;
}
2020-07-16 12:14:57 +02:00
error_code FTManager_OpenMemFace()
{
UNIMPLEMENTED_FUNC(cellFontFT);
return CELL_OK;
}
2020-07-16 12:14:57 +02:00
error_code FTManager_OpenStreamFace()
{
UNIMPLEMENTED_FUNC(cellFontFT);
return CELL_OK;
}
2020-07-16 12:14:57 +02:00
error_code FTManager_SetFontOpenMode()
2019-04-05 20:14:01 +02:00
{
UNIMPLEMENTED_FUNC(cellFontFT);
return CELL_OK;
}
2016-03-21 20:43:03 +01:00
DECLARE(ppu_module_manager::cellFontFT)("cellFontFT", []()
{
REG_FUNC(cellFontFT, cellFontInitLibraryFreeType);
REG_FUNC(cellFontFT, cellFontInitLibraryFreeTypeWithRevision);
REG_FUNC(cellFontFT, cellFontFTGetRevisionFlags);
REG_FUNC(cellFontFT, cellFontFTGetInitializedRevisionFlags);
REG_FUNC(cellFontFT, FTCacheStream_CacheEnd);
REG_FUNC(cellFontFT, FTCacheStream_CacheInit);
REG_FUNC(cellFontFT, FTCacheStream_CalcCacheIndexSize);
REG_FUNC(cellFontFT, FTCacheStream_End);
REG_FUNC(cellFontFT, FTCacheStream_Init);
REG_FUNC(cellFontFT, FTFaceH_Close);
REG_FUNC(cellFontFT, FTFaceH_FontFamilyName);
REG_FUNC(cellFontFT, FTFaceH_FontStyleName);
REG_FUNC(cellFontFT, FTFaceH_GetAscender);
REG_FUNC(cellFontFT, FTFaceH_GetBoundingBoxHeight);
REG_FUNC(cellFontFT, FTFaceH_GetBoundingBoxMaxX);
REG_FUNC(cellFontFT, FTFaceH_GetBoundingBoxMaxY);
REG_FUNC(cellFontFT, FTFaceH_GetBoundingBoxMinX);
REG_FUNC(cellFontFT, FTFaceH_GetBoundingBoxMinY);
REG_FUNC(cellFontFT, FTFaceH_GetBoundingBoxWidth);
REG_FUNC(cellFontFT, FTFaceH_GetCompositeCodes);
REG_FUNC(cellFontFT, FTFaceH_GetGlyphImage);
REG_FUNC(cellFontFT, FTFaceH_GetGlyphMetrics);
REG_FUNC(cellFontFT, FTFaceH_GetKerning);
REG_FUNC(cellFontFT, FTFaceH_GetMaxHorizontalAdvance);
REG_FUNC(cellFontFT, FTFaceH_GetMaxVerticalAdvance);
REG_FUNC(cellFontFT, FTFaceH_GetRenderBufferSize);
REG_FUNC(cellFontFT, FTFaceH_GetRenderEffectSlant);
REG_FUNC(cellFontFT, FTFaceH_GetRenderEffectWeight);
REG_FUNC(cellFontFT, FTFaceH_GetRenderScale);
REG_FUNC(cellFontFT, FTFaceH_GetRenderScalePixel);
REG_FUNC(cellFontFT, FTFaceH_GetRenderScalePoint);
REG_FUNC(cellFontFT, FTFaceH_SetCompositeCodes);
REG_FUNC(cellFontFT, FTFaceH_SetRenderEffectSlant);
REG_FUNC(cellFontFT, FTFaceH_SetRenderEffectWeight);
REG_FUNC(cellFontFT, FTFaceH_SetRenderScalePixel);
REG_FUNC(cellFontFT, FTFaceH_SetRenderScalePoint);
REG_FUNC(cellFontFT, FTManager_CloseFace);
REG_FUNC(cellFontFT, FTManager_Done_FreeType);
REG_FUNC(cellFontFT, FTManager_Init_FreeType);
REG_FUNC(cellFontFT, FTManager_OpenFileFace);
REG_FUNC(cellFontFT, FTManager_OpenMemFace);
REG_FUNC(cellFontFT, FTManager_OpenStreamFace);
REG_FUNC(cellFontFT, FTManager_SetFontOpenMode);
});