mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-02-06 18:40:36 +00:00
cellFont: some stubs
This commit is contained in:
parent
825ae5b8aa
commit
17aeefe1b0
File diff suppressed because it is too large
Load Diff
@ -94,12 +94,30 @@ enum
|
||||
CELL_FONT_TYPE_SEURAT_CAPIE_MARU_GOTHIC_VAGR2_SET = 0x00300224,
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
CELL_FONT_LIBRARY_TYPE_NONE = 0
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
CELL_FONT_MAP_FONT = 0,
|
||||
CELL_FONT_MAP_UNICODE = 1,
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
CELL_FONT_OPEN_MODE_DEFAULT = 0,
|
||||
CELL_FONT_OPEN_MODE_IGNORE_VERTICAL_METRICS = 1,
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
CELL_FONT_GRAPHICS_DRAW_TYPE_MONO = 0,
|
||||
CELL_FONT_GRAPHICS_DRAW_TYPE_COLOR = 1,
|
||||
CELL_FONT_GRAPHICS_DRAW_TYPE_COLOR_REVERSE = 2,
|
||||
};
|
||||
|
||||
//Custom enum to determine the origin of a CellFont object
|
||||
enum
|
||||
{
|
||||
@ -109,6 +127,8 @@ enum
|
||||
CELL_FONT_OPEN_MEMORY,
|
||||
};
|
||||
|
||||
constexpr f32 CELL_FONT_GLYPH_OUTLINE_CONTROL_DISTANCE_DEFAULT = 0.125f;
|
||||
|
||||
|
||||
using CellFontMallocCallback = vm::ptr<void>(vm::ptr<void> arg, u32 size);
|
||||
using CellFontFreeCallback = void(vm::ptr<void> arg, vm::ptr<void> ptr);
|
||||
@ -148,7 +168,7 @@ struct CellFontLibrary
|
||||
{
|
||||
be_t<u32> libraryType;
|
||||
be_t<u32> libraryVersion;
|
||||
// ...
|
||||
vm::bptr<u32> SystemClosed;
|
||||
};
|
||||
|
||||
struct CellFontType
|
||||
@ -171,6 +191,24 @@ struct CellFontVerticalLayout
|
||||
be_t<f32> effectWidth;
|
||||
};
|
||||
|
||||
struct CellFontVertexesGlyphSubHeader
|
||||
{
|
||||
be_t<u32> size;
|
||||
be_t<f32> SystemReserved[11];
|
||||
};
|
||||
|
||||
struct CellFontVertexesGlyphData
|
||||
{
|
||||
const be_t<u32> size;
|
||||
vm::bptr<f32> SystemClosed;
|
||||
};
|
||||
|
||||
struct CellFontVertexesGlyph
|
||||
{
|
||||
vm::bptr<CellFontVertexesGlyphData> data;
|
||||
vm::bptr<CellFontVertexesGlyphSubHeader> subHeader;
|
||||
};
|
||||
|
||||
struct CellFontGlyphMetrics
|
||||
{
|
||||
be_t<f32> width;
|
||||
@ -185,6 +223,64 @@ struct CellFontGlyphMetrics
|
||||
be_t<f32> v_advance;
|
||||
};
|
||||
|
||||
struct CellFontGlyphOutline
|
||||
{
|
||||
be_t<s16> contoursCount;
|
||||
be_t<s16> pointsCount;
|
||||
|
||||
struct Point
|
||||
{
|
||||
be_t<f32> x;
|
||||
be_t<f32> y;
|
||||
};
|
||||
vm::bptr<Point> points;
|
||||
vm::bptr<u8> pointTags;
|
||||
vm::bptr<u16> contourIndexs;
|
||||
|
||||
be_t<u32> flags;
|
||||
|
||||
vm::bptr<void> generateEnv;
|
||||
};
|
||||
|
||||
using CellFontGetOutlineVertexCallback = vm::ptr<void>(vm::ptr<void> arg, s32 contourN, s32 vertexNumber, s32 vertexAttr, f32 x, f32 y);
|
||||
|
||||
struct CellFontGetOutlineVertexesIF
|
||||
{
|
||||
vm::bptr<CellFontGetOutlineVertexCallback> callback;
|
||||
vm::bptr<void> arg;
|
||||
};
|
||||
|
||||
struct CellFontGlyphBoundingBox
|
||||
{
|
||||
be_t<f32> min_x;
|
||||
be_t<f32> min_y;
|
||||
be_t<f32> max_x;
|
||||
be_t<f32> max_y;
|
||||
};
|
||||
|
||||
struct CellFontKerning
|
||||
{
|
||||
be_t<f32> offsetX;
|
||||
be_t<f32> offsetY;
|
||||
};
|
||||
|
||||
struct CellFontGlyphStyle
|
||||
{
|
||||
be_t<f32> scale_widthPixel;
|
||||
be_t<f32> scale_heightPixel;
|
||||
be_t<f32> effect_weight;
|
||||
be_t<f32> effect_slant;
|
||||
};
|
||||
|
||||
struct CellFontGlyph
|
||||
{
|
||||
be_t<u16> CF_type;
|
||||
be_t<u16> type;
|
||||
be_t<u32> size;
|
||||
CellFontGlyphMetrics Metrics;
|
||||
CellFontGlyphOutline Outline;
|
||||
};
|
||||
|
||||
struct CellFontRenderSurface
|
||||
{
|
||||
vm::bptr<void> buffer;
|
||||
@ -235,11 +331,16 @@ struct CellFontRendererConfig
|
||||
|
||||
struct CellFontRenderer
|
||||
{
|
||||
void *systemReserved[64];
|
||||
vm::bptr<void> systemReserved[64];
|
||||
};
|
||||
|
||||
struct CellFontGraphics
|
||||
{
|
||||
be_t<u32> graphicsType;
|
||||
// ...
|
||||
vm::bptr<uint32_t> SystemClosed;
|
||||
};
|
||||
|
||||
struct CellFontGraphicsDrawContext
|
||||
{
|
||||
vm::bptr<void> SystemReserved[64];
|
||||
};
|
||||
|
@ -5,30 +5,67 @@
|
||||
|
||||
LOG_CHANNEL(cellFontFT);
|
||||
|
||||
error_code cellFontInitLibraryFreeType()
|
||||
{
|
||||
UNIMPLEMENTED_FUNC(cellFontFT);
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
error_code cellFontInitLibraryFreeTypeWithRevision(u64 revisionFlags, vm::ptr<CellFontLibraryConfigFT> config, vm::pptr<CellFontLibrary> lib)
|
||||
{
|
||||
cellFontFT.warning("cellFontInitLibraryFreeTypeWithRevision(revisionFlags=0x%llx, config=*0x%x, lib=**0x%x)", revisionFlags, config, lib);
|
||||
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;
|
||||
}
|
||||
|
||||
lib->set(vm::alloc(sizeof(CellFontLibrary), vm::main));
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
error_code cellFontFTGetRevisionFlags()
|
||||
error_code cellFontInitLibraryFreeType(vm::ptr<CellFontLibraryConfigFT> config, vm::pptr<CellFontLibrary> lib)
|
||||
{
|
||||
UNIMPLEMENTED_FUNC(cellFontFT);
|
||||
return CELL_OK;
|
||||
cellFontFT.todo("cellFontInitLibraryFreeType(config=*0x%x, lib=**0x%x)", config, lib);
|
||||
|
||||
uint64_t revisionFlags = 0LL;
|
||||
//cellFontFTGetStubRevisionFlags(&revisionFlags);
|
||||
return cellFontInitLibraryFreeTypeWithRevision(revisionFlags, config, lib);
|
||||
}
|
||||
|
||||
error_code cellFontFTGetInitializedRevisionFlags()
|
||||
void cellFontFTGetRevisionFlags(vm::ptr<u64> revisionFlags)
|
||||
{
|
||||
UNIMPLEMENTED_FUNC(cellFontFT);
|
||||
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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user