mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-07-14 13:45:59 +00:00
sceFontStyleFrameGetEffectWeight
This commit is contained in:
parent
6184d51621
commit
2d839cb144
3 changed files with 36 additions and 24 deletions
|
@ -834,6 +834,7 @@ s32 PS4_SYSV_ABI sceFontRenderSurfaceSetStyleFrame(OrbisFontRenderSurface* rende
|
|||
// Assign style frame pointer
|
||||
renderSurface->unkn_28[0] = styleFrame;
|
||||
*(uint32_t*)(renderSurface->unkn_28 + 1) = 0; // Reset related field
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI sceFontSetEffectSlant() {
|
||||
|
@ -947,8 +948,35 @@ s32 PS4_SYSV_ABI sceFontStyleFrameGetEffectSlant(OrbisFontStyleFrame* styleFrame
|
|||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI sceFontStyleFrameGetEffectWeight() {
|
||||
LOG_ERROR(Lib_Font, "(STUBBED) called");
|
||||
s32 PS4_SYSV_ABI sceFontStyleFrameGetEffectWeight(OrbisFontStyleFrame* fontStyleFrame,
|
||||
float* weightXScale, float* weightYScale,
|
||||
uint32_t* mode) {
|
||||
if (!fontStyleFrame) {
|
||||
return ORBIS_FONT_ERROR_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
// Validate the magic number
|
||||
if (fontStyleFrame->magic != 0xF09) {
|
||||
return ORBIS_FONT_ERROR_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
// Check if the weight effect is enabled (bit 2 in flags)
|
||||
if (!(fontStyleFrame->flags & 0x04)) {
|
||||
return ORBIS_FONT_ERROR_UNSET_PARAMETER;
|
||||
}
|
||||
|
||||
// Retrieve weight scales (default is +1.0 to maintain normal weight)
|
||||
if (weightXScale) {
|
||||
*weightXScale = fontStyleFrame->weightXScale + 1.0f;
|
||||
}
|
||||
if (weightYScale) {
|
||||
*weightYScale = fontStyleFrame->weightYScale + 1.0f;
|
||||
}
|
||||
|
||||
// Reset mode if provided
|
||||
if (mode) {
|
||||
*mode = 0;
|
||||
}
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
|
@ -1297,16 +1325,6 @@ s32 PS4_SYSV_ABI Func_FE7E5AE95D3058F5() {
|
|||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI module_start() {
|
||||
LOG_ERROR(Lib_Font, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI module_stop() {
|
||||
LOG_ERROR(Lib_Font, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
void RegisterlibSceFont(Core::Loader::SymbolsResolver* sym) {
|
||||
LIB_FUNCTION("CUKn5pX-NVY", "libSceFont", 1, "libSceFont", 1, 1,
|
||||
sceFontAttachDeviceCacheBuffer);
|
||||
|
|
|
@ -43,7 +43,9 @@ struct OrbisFontStyleFrame {
|
|||
u16 magic; // Expected to be 0xF09
|
||||
u16 flags;
|
||||
//
|
||||
float slantRatio; // 0x24
|
||||
float weightXScale; // 0x1c
|
||||
float weightYScale; // 0x20
|
||||
float slantRatio; // 0x24
|
||||
};
|
||||
|
||||
s32 PS4_SYSV_ABI sceFontAttachDeviceCacheBuffer();
|
||||
|
@ -214,7 +216,9 @@ s32 PS4_SYSV_ABI sceFontStringRefersRenderCharacters();
|
|||
s32 PS4_SYSV_ABI sceFontStringRefersTextCharacters();
|
||||
s32 PS4_SYSV_ABI sceFontStyleFrameGetEffectSlant(OrbisFontStyleFrame* styleFrame,
|
||||
float* slantRatio);
|
||||
s32 PS4_SYSV_ABI sceFontStyleFrameGetEffectWeight();
|
||||
s32 PS4_SYSV_ABI sceFontStyleFrameGetEffectWeight(OrbisFontStyleFrame* fontStyleFrame,
|
||||
float* weightXScale, float* weightYScale,
|
||||
uint32_t* mode);
|
||||
s32 PS4_SYSV_ABI sceFontStyleFrameGetResolutionDpi();
|
||||
s32 PS4_SYSV_ABI sceFontStyleFrameGetScalePixel();
|
||||
s32 PS4_SYSV_ABI sceFontStyleFrameGetScalePoint();
|
||||
|
|
|
@ -113,16 +113,6 @@ s32 PS4_SYSV_ABI sceFontSelectRendererFt() {
|
|||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI module_start() {
|
||||
LOG_ERROR(Lib_FontFt, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI module_stop() {
|
||||
LOG_ERROR(Lib_FontFt, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
void RegisterlibSceFontFt(Core::Loader::SymbolsResolver* sym) {
|
||||
LIB_FUNCTION("e60aorDdpB8", "libSceFontFt", 1, "libSceFontFt", 1, 1, sceFontFtInitAliases);
|
||||
LIB_FUNCTION("BxcmiMc3UaA", "libSceFontFt", 1, "libSceFontFt", 1, 1, sceFontFtSetAliasFont);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue