diff options
| author | ptitSeb <sebastien.chev@gmail.com> | 2024-11-30 17:00:05 +0100 |
|---|---|---|
| committer | ptitSeb <sebastien.chev@gmail.com> | 2024-11-30 17:00:05 +0100 |
| commit | b7007a1bdd56d5d6ce3460f7dc1d3a7d720fa858 (patch) | |
| tree | 6fd41c3963d23055b84681de8547227426b90855 /src | |
| parent | a26c108464896336c4bd0b780f2bca3de26d7df5 (diff) | |
| download | box64-b7007a1bdd56d5d6ce3460f7dc1d3a7d720fa858.tar.gz box64-b7007a1bdd56d5d6ce3460f7dc1d3a7d720fa858.zip | |
[BOX32][WRAPPER] Added a few more FreeType wrapped functions
Diffstat (limited to 'src')
| -rw-r--r-- | src/wrapped32/generated/functions_list.txt | 15 | ||||
| -rw-r--r-- | src/wrapped32/generated/wrappedfreetypetypes32.h | 11 | ||||
| -rw-r--r-- | src/wrapped32/generated/wrapper32.c | 8 | ||||
| -rw-r--r-- | src/wrapped32/generated/wrapper32.h | 4 | ||||
| -rw-r--r-- | src/wrapped32/wrappedfreetype.c | 193 | ||||
| -rw-r--r-- | src/wrapped32/wrappedfreetype_private.h | 26 |
6 files changed, 230 insertions, 27 deletions
diff --git a/src/wrapped32/generated/functions_list.txt b/src/wrapped32/generated/functions_list.txt index 06ae1193..ef50d56b 100644 --- a/src/wrapped32/generated/functions_list.txt +++ b/src/wrapped32/generated/functions_list.txt @@ -687,12 +687,14 @@ #() iFbp_bp_p -> iFBBp #() iFXbiip_i -> iFXBi #() iFXbLip_L -> iFXBL +#() vFpuBLLLL_ -> vFpuB #() vFXLbpLiL_ -> vFXLB #() vFXLrpLiL_ -> vFXLB #() iFXLbpLiL_ -> iFXLB #() iFXLbLLii_ -> iFXLB #() pFXrLiiuL_p -> pFXBp #() iFXLbLWWWcc_ -> iFXLB +#() iFprllll_rll_ -> iFpBB #() iEirLLLL_BLLLL_ -> iEiBB #() pEppriiiiiiiiilt_ -> pEppB #() vEEipp -> vEEipp @@ -811,6 +813,7 @@ #() iFEpui -> iFEpui #() iFEpuu -> iFEpuu #() iEEpup -> iEEpup +#() iFEpll -> iFEpll #() iEEpLi -> iEEpLi #() iFEpLi -> iFEpLi #() iEEppi -> iEEppi @@ -1099,6 +1102,7 @@ #() iEEippL -> iEEippL #() iEEpipp -> iEEpipp #() iEEpipV -> iEEpipV +#() iFEpuip -> iFEpuip #() iFEpupu -> iFEpupu #() iEEpLpp -> iEEpLpp #() iFEpLpp -> iFEpLpp @@ -1647,7 +1651,9 @@ wrappedfontconfig: - FcPatternAdd wrappedfreetype: - iFp: + - FT_Activate_Size - FT_Done_Face + - FT_Done_Size - FT_Has_PS_Glyph_Names - uFp: - FT_Get_Sfnt_Name_Count @@ -1666,8 +1672,12 @@ wrappedfreetype: - iFpl: - FT_Outline_Embolden - iFpp: + - FT_Get_Glyph - FT_Get_PS_Font_Info - FT_Get_WinFNT_Header + - FT_New_Size + - FT_Outline_Copy + - FT_Outline_Done - FT_Request_Size - FT_Set_Charmap - uFpL: @@ -1686,13 +1696,18 @@ wrappedfreetype: - FT_Load_Glyph - iFpuu: - FT_Set_Pixel_Sizes +- iFpll: + - FT_Outline_EmboldenXY - iFpLi: - FT_Load_Char - iFppp: - FT_Get_BDF_Property + - FT_Outline_Decompose - FT_Outline_Get_Bitmap - LFpLp: - FT_Get_Next_Char +- iFpuip: + - FT_Outline_New - iFpupu: - FT_Get_Glyph_Name - iFpplp: diff --git a/src/wrapped32/generated/wrappedfreetypetypes32.h b/src/wrapped32/generated/wrappedfreetypetypes32.h index 8d177619..3305bef6 100644 --- a/src/wrapped32/generated/wrappedfreetypetypes32.h +++ b/src/wrapped32/generated/wrappedfreetypetypes32.h @@ -27,9 +27,11 @@ typedef void (*vFppp_t)(void*, void*, void*); typedef int32_t (*iFpip_t)(void*, int32_t, void*); typedef int32_t (*iFpui_t)(void*, uint32_t, int32_t); typedef int32_t (*iFpuu_t)(void*, uint32_t, uint32_t); +typedef int32_t (*iFpll_t)(void*, intptr_t, intptr_t); typedef int32_t (*iFpLi_t)(void*, uintptr_t, int32_t); typedef int32_t (*iFppp_t)(void*, void*, void*); typedef uintptr_t (*LFpLp_t)(void*, uintptr_t, void*); +typedef int32_t (*iFpuip_t)(void*, uint32_t, int32_t, void*); typedef int32_t (*iFpupu_t)(void*, uint32_t, void*, uint32_t); typedef int32_t (*iFpplp_t)(void*, void*, intptr_t, void*); typedef int32_t (*iFpuuup_t)(void*, uint32_t, uint32_t, uint32_t, void*); @@ -38,7 +40,9 @@ typedef int32_t (*iFpLlpp_t)(void*, uintptr_t, intptr_t, void*, void*); typedef int32_t (*iFppllp_t)(void*, void*, intptr_t, intptr_t, void*); #define SUPER() ADDED_FUNCTIONS() \ + GO(FT_Activate_Size, iFp_t) \ GO(FT_Done_Face, iFp_t) \ + GO(FT_Done_Size, iFp_t) \ GO(FT_Has_PS_Glyph_Names, iFp_t) \ GO(FT_Get_Sfnt_Name_Count, uFp_t) \ GO(FT_Get_Postscript_Name, pFp_t) \ @@ -50,8 +54,12 @@ typedef int32_t (*iFppllp_t)(void*, void*, intptr_t, intptr_t, void*); GO(FT_Select_Size, iFpi_t) \ GO(FT_Render_Glyph, iFpu_t) \ GO(FT_Outline_Embolden, iFpl_t) \ + GO(FT_Get_Glyph, iFpp_t) \ GO(FT_Get_PS_Font_Info, iFpp_t) \ GO(FT_Get_WinFNT_Header, iFpp_t) \ + GO(FT_New_Size, iFpp_t) \ + GO(FT_Outline_Copy, iFpp_t) \ + GO(FT_Outline_Done, iFpp_t) \ GO(FT_Request_Size, iFpp_t) \ GO(FT_Set_Charmap, iFpp_t) \ GO(FT_Get_Char_Index, uFpL_t) \ @@ -62,10 +70,13 @@ typedef int32_t (*iFppllp_t)(void*, void*, intptr_t, intptr_t, void*); GO(FT_Get_Sfnt_Name, iFpip_t) \ GO(FT_Load_Glyph, iFpui_t) \ GO(FT_Set_Pixel_Sizes, iFpuu_t) \ + GO(FT_Outline_EmboldenXY, iFpll_t) \ GO(FT_Load_Char, iFpLi_t) \ GO(FT_Get_BDF_Property, iFppp_t) \ + GO(FT_Outline_Decompose, iFppp_t) \ GO(FT_Outline_Get_Bitmap, iFppp_t) \ GO(FT_Get_Next_Char, LFpLp_t) \ + GO(FT_Outline_New, iFpuip_t) \ GO(FT_Get_Glyph_Name, iFpupu_t) \ GO(FT_New_Face, iFpplp_t) \ GO(FT_Open_Face, iFpplp_t) \ diff --git a/src/wrapped32/generated/wrapper32.c b/src/wrapped32/generated/wrapper32.c index 9637a55c..42929822 100644 --- a/src/wrapped32/generated/wrapper32.c +++ b/src/wrapped32/generated/wrapper32.c @@ -778,12 +778,14 @@ typedef int32_t (*iFpbL_bL__t)(void*, struct_L_t*, struct_L_t*); typedef int32_t (*iFbp_bp_p_t)(struct_p_t*, struct_p_t*, void*); typedef int32_t (*iFXbiip_i_t)(void*, struct_iip_t*, int32_t); typedef int32_t (*iFXbLip_L_t)(void*, struct_Lip_t*, uintptr_t); +typedef void (*vFpuBLLLL__t)(void*, uint32_t, struct_LLLL_t*); typedef void (*vFXLbpLiL__t)(void*, uintptr_t, struct_pLiL_t*); typedef void (*vFXLrpLiL__t)(void*, uintptr_t, struct_pLiL_t*); typedef int32_t (*iFXLbpLiL__t)(void*, uintptr_t, struct_pLiL_t*); typedef int32_t (*iFXLbLLii__t)(void*, uintptr_t, struct_LLii_t*); typedef void* (*pFXrLiiuL_p_t)(void*, struct_LiiuL_t*, void*); typedef int32_t (*iFXLbLWWWcc__t)(void*, uintptr_t, struct_LWWWcc_t*); +typedef int32_t (*iFprllll_rll__t)(void*, struct_llll_t*, struct_ll_t*); typedef int32_t (*iEirLLLL_BLLLL__t)(int32_t, struct_LLLL_t*, struct_LLLL_t*); typedef void* (*pEppriiiiiiiiilt__t)(void*, void*, struct_iiiiiiiiilt_t*); typedef void (*vEEipp_t)(x64emu_t*, int32_t, void*, void*); @@ -902,6 +904,7 @@ typedef int32_t (*iFEpip_t)(x64emu_t*, void*, int32_t, void*); typedef int32_t (*iFEpui_t)(x64emu_t*, void*, uint32_t, int32_t); typedef int32_t (*iFEpuu_t)(x64emu_t*, void*, uint32_t, uint32_t); typedef int32_t (*iEEpup_t)(x64emu_t*, void*, uint32_t, void*); +typedef int32_t (*iFEpll_t)(x64emu_t*, void*, intptr_t, intptr_t); typedef int32_t (*iEEpLi_t)(x64emu_t*, void*, uintptr_t, int32_t); typedef int32_t (*iFEpLi_t)(x64emu_t*, void*, uintptr_t, int32_t); typedef int32_t (*iEEppi_t)(x64emu_t*, void*, void*, int32_t); @@ -1190,6 +1193,7 @@ typedef int32_t (*iEEipii_t)(x64emu_t*, int32_t, void*, int32_t, int32_t); typedef int32_t (*iEEippL_t)(x64emu_t*, int32_t, void*, void*, uintptr_t); typedef int32_t (*iEEpipp_t)(x64emu_t*, void*, int32_t, void*, void*); typedef int32_t (*iEEpipV_t)(x64emu_t*, void*, int32_t, void*, void*); +typedef int32_t (*iFEpuip_t)(x64emu_t*, void*, uint32_t, int32_t, void*); typedef int32_t (*iFEpupu_t)(x64emu_t*, void*, uint32_t, void*, uint32_t); typedef int32_t (*iEEpLpp_t)(x64emu_t*, void*, uintptr_t, void*, void*); typedef int32_t (*iFEpLpp_t)(x64emu_t*, void*, uintptr_t, void*, void*); @@ -2417,12 +2421,14 @@ void iFpbL_bL__32(x64emu_t *emu, uintptr_t fcn) { iFpbL_bL__t fn = (iFpbL_bL__t) void iFbp_bp_p_32(x64emu_t *emu, uintptr_t fcn) { iFbp_bp_p_t fn = (iFbp_bp_p_t)fcn; struct_p_t arg_4={0}; if (*(ptr_t*)(from_ptr((R_ESP + 4)))) from_struct_p(&arg_4, *(ptr_t*)(from_ptr((R_ESP + 4)))); struct_p_t arg_8={0}; if (*(ptr_t*)(from_ptr((R_ESP + 8)))) from_struct_p(&arg_8, *(ptr_t*)(from_ptr((R_ESP + 8)))); R_EAX = fn(*(ptr_t*)(from_ptr((R_ESP + 4))) ? &arg_4 : NULL, *(ptr_t*)(from_ptr((R_ESP + 8))) ? &arg_8 : NULL, from_ptriv(R_ESP + 12)); if (*(ptr_t*)(from_ptr((R_ESP + 4)))) to_struct_p(*(ptr_t*)(from_ptr((R_ESP + 4))), &arg_4); if (*(ptr_t*)(from_ptr((R_ESP + 8)))) to_struct_p(*(ptr_t*)(from_ptr((R_ESP + 8))), &arg_8); } void iFXbiip_i_32(x64emu_t *emu, uintptr_t fcn) { iFXbiip_i_t fn = (iFXbiip_i_t)fcn; struct_iip_t arg_8={0}; if (*(ptr_t*)(from_ptr((R_ESP + 8)))) from_struct_iip(&arg_8, *(ptr_t*)(from_ptr((R_ESP + 8)))); R_EAX = fn(getDisplay(from_ptriv(R_ESP + 4)), *(ptr_t*)(from_ptr((R_ESP + 8))) ? &arg_8 : NULL, from_ptri(int32_t, R_ESP + 12)); if (*(ptr_t*)(from_ptr((R_ESP + 8)))) to_struct_iip(*(ptr_t*)(from_ptr((R_ESP + 8))), &arg_8); } void iFXbLip_L_32(x64emu_t *emu, uintptr_t fcn) { iFXbLip_L_t fn = (iFXbLip_L_t)fcn; struct_Lip_t arg_8={0}; if (*(ptr_t*)(from_ptr((R_ESP + 8)))) from_struct_Lip(&arg_8, *(ptr_t*)(from_ptr((R_ESP + 8)))); R_EAX = fn(getDisplay(from_ptriv(R_ESP + 4)), *(ptr_t*)(from_ptr((R_ESP + 8))) ? &arg_8 : NULL, from_ulong(from_ptri(ulong_t, R_ESP + 12))); if (*(ptr_t*)(from_ptr((R_ESP + 8)))) to_struct_Lip(*(ptr_t*)(from_ptr((R_ESP + 8))), &arg_8); } +void vFpuBLLLL__32(x64emu_t *emu, uintptr_t fcn) { vFpuBLLLL__t fn = (vFpuBLLLL__t)fcn; struct_LLLL_t arg_12={0}; fn(from_ptriv(R_ESP + 4), from_ptri(uint32_t, R_ESP + 8), *(ptr_t*)(from_ptr((R_ESP + 12))) ? &arg_12 : NULL); if (*(ptr_t*)(from_ptr((R_ESP + 12)))) to_struct_LLLL(*(ptr_t*)(from_ptr((R_ESP + 12))), &arg_12); } void vFXLbpLiL__32(x64emu_t *emu, uintptr_t fcn) { vFXLbpLiL__t fn = (vFXLbpLiL__t)fcn; struct_pLiL_t arg_12={0}; if (*(ptr_t*)(from_ptr((R_ESP + 12)))) from_struct_pLiL(&arg_12, *(ptr_t*)(from_ptr((R_ESP + 12)))); fn(getDisplay(from_ptriv(R_ESP + 4)), from_ulong(from_ptri(ulong_t, R_ESP + 8)), *(ptr_t*)(from_ptr((R_ESP + 12))) ? &arg_12 : NULL); if (*(ptr_t*)(from_ptr((R_ESP + 12)))) to_struct_pLiL(*(ptr_t*)(from_ptr((R_ESP + 12))), &arg_12); } void vFXLrpLiL__32(x64emu_t *emu, uintptr_t fcn) { vFXLrpLiL__t fn = (vFXLrpLiL__t)fcn; struct_pLiL_t arg_12={0}; if (*(ptr_t*)(from_ptr((R_ESP + 12)))) from_struct_pLiL(&arg_12, *(ptr_t*)(from_ptr((R_ESP + 12)))); fn(getDisplay(from_ptriv(R_ESP + 4)), from_ulong(from_ptri(ulong_t, R_ESP + 8)), *(ptr_t*)(from_ptr((R_ESP + 12))) ? &arg_12 : NULL); } void iFXLbpLiL__32(x64emu_t *emu, uintptr_t fcn) { iFXLbpLiL__t fn = (iFXLbpLiL__t)fcn; struct_pLiL_t arg_12={0}; if (*(ptr_t*)(from_ptr((R_ESP + 12)))) from_struct_pLiL(&arg_12, *(ptr_t*)(from_ptr((R_ESP + 12)))); R_EAX = fn(getDisplay(from_ptriv(R_ESP + 4)), from_ulong(from_ptri(ulong_t, R_ESP + 8)), *(ptr_t*)(from_ptr((R_ESP + 12))) ? &arg_12 : NULL); if (*(ptr_t*)(from_ptr((R_ESP + 12)))) to_struct_pLiL(*(ptr_t*)(from_ptr((R_ESP + 12))), &arg_12); } void iFXLbLLii__32(x64emu_t *emu, uintptr_t fcn) { iFXLbLLii__t fn = (iFXLbLLii__t)fcn; struct_LLii_t arg_12={0}; if (*(ptr_t*)(from_ptr((R_ESP + 12)))) from_struct_LLii(&arg_12, *(ptr_t*)(from_ptr((R_ESP + 12)))); R_EAX = fn(getDisplay(from_ptriv(R_ESP + 4)), from_ulong(from_ptri(ulong_t, R_ESP + 8)), *(ptr_t*)(from_ptr((R_ESP + 12))) ? &arg_12 : NULL); if (*(ptr_t*)(from_ptr((R_ESP + 12)))) to_struct_LLii(*(ptr_t*)(from_ptr((R_ESP + 12))), &arg_12); } void pFXrLiiuL_p_32(x64emu_t *emu, uintptr_t fcn) { pFXrLiiuL_p_t fn = (pFXrLiiuL_p_t)fcn; struct_LiiuL_t arg_8={0}; if (*(ptr_t*)(from_ptr((R_ESP + 8)))) from_struct_LiiuL(&arg_8, *(ptr_t*)(from_ptr((R_ESP + 8)))); R_EAX = to_ptrv(fn(getDisplay(from_ptriv(R_ESP + 4)), *(ptr_t*)(from_ptr((R_ESP + 8))) ? &arg_8 : NULL, from_ptriv(R_ESP + 12))); } void iFXLbLWWWcc__32(x64emu_t *emu, uintptr_t fcn) { iFXLbLWWWcc__t fn = (iFXLbLWWWcc__t)fcn; struct_LWWWcc_t arg_12={0}; if (*(ptr_t*)(from_ptr((R_ESP + 12)))) from_struct_LWWWcc(&arg_12, *(ptr_t*)(from_ptr((R_ESP + 12)))); R_EAX = fn(getDisplay(from_ptriv(R_ESP + 4)), from_ulong(from_ptri(ulong_t, R_ESP + 8)), *(ptr_t*)(from_ptr((R_ESP + 12))) ? &arg_12 : NULL); if (*(ptr_t*)(from_ptr((R_ESP + 12)))) to_struct_LWWWcc(*(ptr_t*)(from_ptr((R_ESP + 12))), &arg_12); } +void iFprllll_rll__32(x64emu_t *emu, uintptr_t fcn) { iFprllll_rll__t fn = (iFprllll_rll__t)fcn; struct_llll_t arg_8={0}; if (*(ptr_t*)(from_ptr((R_ESP + 8)))) from_struct_llll(&arg_8, *(ptr_t*)(from_ptr((R_ESP + 8)))); struct_ll_t arg_12={0}; if (*(ptr_t*)(from_ptr((R_ESP + 12)))) from_struct_ll(&arg_12, *(ptr_t*)(from_ptr((R_ESP + 12)))); R_EAX = fn(from_ptriv(R_ESP + 4), *(ptr_t*)(from_ptr((R_ESP + 8))) ? &arg_8 : NULL, *(ptr_t*)(from_ptr((R_ESP + 12))) ? &arg_12 : NULL); } void iEirLLLL_BLLLL__32(x64emu_t *emu, uintptr_t fcn) { iEirLLLL_BLLLL__t fn = (iEirLLLL_BLLLL__t)fcn; errno = emu->libc_err; struct_LLLL_t arg_8={0}; if (*(ptr_t*)(from_ptr((R_ESP + 8)))) from_struct_LLLL(&arg_8, *(ptr_t*)(from_ptr((R_ESP + 8)))); struct_LLLL_t arg_12={0}; R_EAX = fn(from_ptri(int32_t, R_ESP + 4), *(ptr_t*)(from_ptr((R_ESP + 8))) ? &arg_8 : NULL, *(ptr_t*)(from_ptr((R_ESP + 12))) ? &arg_12 : NULL); if (*(ptr_t*)(from_ptr((R_ESP + 12)))) to_struct_LLLL(*(ptr_t*)(from_ptr((R_ESP + 12))), &arg_12); emu->libc_err = errno; } void pEppriiiiiiiiilt__32(x64emu_t *emu, uintptr_t fcn) { pEppriiiiiiiiilt__t fn = (pEppriiiiiiiiilt__t)fcn; errno = emu->libc_err; struct_iiiiiiiiilt_t arg_12={0}; if (*(ptr_t*)(from_ptr((R_ESP + 12)))) from_struct_iiiiiiiiilt(&arg_12, *(ptr_t*)(from_ptr((R_ESP + 12)))); R_EAX = to_ptrv(fn(from_ptriv(R_ESP + 4), from_ptriv(R_ESP + 8), *(ptr_t*)(from_ptr((R_ESP + 12))) ? &arg_12 : NULL)); emu->libc_err = errno; } void vEEipp_32(x64emu_t *emu, uintptr_t fcn) { vEEipp_t fn = (vEEipp_t)fcn; errno = emu->libc_err; fn(emu, from_ptri(int32_t, R_ESP + 4), from_ptriv(R_ESP + 8), from_ptriv(R_ESP + 12)); emu->libc_err = errno; } @@ -2541,6 +2547,7 @@ void iFEpip_32(x64emu_t *emu, uintptr_t fcn) { iFEpip_t fn = (iFEpip_t)fcn; R_EA void iFEpui_32(x64emu_t *emu, uintptr_t fcn) { iFEpui_t fn = (iFEpui_t)fcn; R_EAX = fn(emu, from_ptriv(R_ESP + 4), from_ptri(uint32_t, R_ESP + 8), from_ptri(int32_t, R_ESP + 12)); } void iFEpuu_32(x64emu_t *emu, uintptr_t fcn) { iFEpuu_t fn = (iFEpuu_t)fcn; R_EAX = fn(emu, from_ptriv(R_ESP + 4), from_ptri(uint32_t, R_ESP + 8), from_ptri(uint32_t, R_ESP + 12)); } void iEEpup_32(x64emu_t *emu, uintptr_t fcn) { iEEpup_t fn = (iEEpup_t)fcn; errno = emu->libc_err; R_EAX = fn(emu, from_ptriv(R_ESP + 4), from_ptri(uint32_t, R_ESP + 8), from_ptriv(R_ESP + 12)); emu->libc_err = errno; } +void iFEpll_32(x64emu_t *emu, uintptr_t fcn) { iFEpll_t fn = (iFEpll_t)fcn; R_EAX = fn(emu, from_ptriv(R_ESP + 4), from_long(from_ptri(long_t, R_ESP + 8)), from_long(from_ptri(long_t, R_ESP + 12))); } void iEEpLi_32(x64emu_t *emu, uintptr_t fcn) { iEEpLi_t fn = (iEEpLi_t)fcn; errno = emu->libc_err; R_EAX = fn(emu, from_ptriv(R_ESP + 4), from_ulong(from_ptri(ulong_t, R_ESP + 8)), from_ptri(int32_t, R_ESP + 12)); emu->libc_err = errno; } void iFEpLi_32(x64emu_t *emu, uintptr_t fcn) { iFEpLi_t fn = (iFEpLi_t)fcn; R_EAX = fn(emu, from_ptriv(R_ESP + 4), from_ulong(from_ptri(ulong_t, R_ESP + 8)), from_ptri(int32_t, R_ESP + 12)); } void iEEppi_32(x64emu_t *emu, uintptr_t fcn) { iEEppi_t fn = (iEEppi_t)fcn; errno = emu->libc_err; R_EAX = fn(emu, from_ptriv(R_ESP + 4), from_ptriv(R_ESP + 8), from_ptri(int32_t, R_ESP + 12)); emu->libc_err = errno; } @@ -2829,6 +2836,7 @@ void iEEipii_32(x64emu_t *emu, uintptr_t fcn) { iEEipii_t fn = (iEEipii_t)fcn; e void iEEippL_32(x64emu_t *emu, uintptr_t fcn) { iEEippL_t fn = (iEEippL_t)fcn; errno = emu->libc_err; R_EAX = fn(emu, from_ptri(int32_t, R_ESP + 4), from_ptriv(R_ESP + 8), from_ptriv(R_ESP + 12), from_ulong(from_ptri(ulong_t, R_ESP + 16))); emu->libc_err = errno; } void iEEpipp_32(x64emu_t *emu, uintptr_t fcn) { iEEpipp_t fn = (iEEpipp_t)fcn; errno = emu->libc_err; R_EAX = fn(emu, from_ptriv(R_ESP + 4), from_ptri(int32_t, R_ESP + 8), from_ptriv(R_ESP + 12), from_ptriv(R_ESP + 16)); emu->libc_err = errno; } void iEEpipV_32(x64emu_t *emu, uintptr_t fcn) { iEEpipV_t fn = (iEEpipV_t)fcn; errno = emu->libc_err; R_EAX = fn(emu, from_ptriv(R_ESP + 4), from_ptri(int32_t, R_ESP + 8), from_ptriv(R_ESP + 12), from_ptrv(R_ESP + 16)); emu->libc_err = errno; } +void iFEpuip_32(x64emu_t *emu, uintptr_t fcn) { iFEpuip_t fn = (iFEpuip_t)fcn; R_EAX = fn(emu, from_ptriv(R_ESP + 4), from_ptri(uint32_t, R_ESP + 8), from_ptri(int32_t, R_ESP + 12), from_ptriv(R_ESP + 16)); } void iFEpupu_32(x64emu_t *emu, uintptr_t fcn) { iFEpupu_t fn = (iFEpupu_t)fcn; R_EAX = fn(emu, from_ptriv(R_ESP + 4), from_ptri(uint32_t, R_ESP + 8), from_ptriv(R_ESP + 12), from_ptri(uint32_t, R_ESP + 16)); } void iEEpLpp_32(x64emu_t *emu, uintptr_t fcn) { iEEpLpp_t fn = (iEEpLpp_t)fcn; errno = emu->libc_err; R_EAX = fn(emu, from_ptriv(R_ESP + 4), from_ulong(from_ptri(ulong_t, R_ESP + 8)), from_ptriv(R_ESP + 12), from_ptriv(R_ESP + 16)); emu->libc_err = errno; } void iFEpLpp_32(x64emu_t *emu, uintptr_t fcn) { iFEpLpp_t fn = (iFEpLpp_t)fcn; R_EAX = fn(emu, from_ptriv(R_ESP + 4), from_ulong(from_ptri(ulong_t, R_ESP + 8)), from_ptriv(R_ESP + 12), from_ptriv(R_ESP + 16)); } diff --git a/src/wrapped32/generated/wrapper32.h b/src/wrapped32/generated/wrapper32.h index 51252ca4..4316305a 100644 --- a/src/wrapped32/generated/wrapper32.h +++ b/src/wrapped32/generated/wrapper32.h @@ -728,12 +728,14 @@ void iFpbL_bL__32(x64emu_t *emu, uintptr_t fnc); void iFbp_bp_p_32(x64emu_t *emu, uintptr_t fnc); void iFXbiip_i_32(x64emu_t *emu, uintptr_t fnc); void iFXbLip_L_32(x64emu_t *emu, uintptr_t fnc); +void vFpuBLLLL__32(x64emu_t *emu, uintptr_t fnc); void vFXLbpLiL__32(x64emu_t *emu, uintptr_t fnc); void vFXLrpLiL__32(x64emu_t *emu, uintptr_t fnc); void iFXLbpLiL__32(x64emu_t *emu, uintptr_t fnc); void iFXLbLLii__32(x64emu_t *emu, uintptr_t fnc); void pFXrLiiuL_p_32(x64emu_t *emu, uintptr_t fnc); void iFXLbLWWWcc__32(x64emu_t *emu, uintptr_t fnc); +void iFprllll_rll__32(x64emu_t *emu, uintptr_t fnc); void iEirLLLL_BLLLL__32(x64emu_t *emu, uintptr_t fnc); void pEppriiiiiiiiilt__32(x64emu_t *emu, uintptr_t fnc); void vEEipp_32(x64emu_t *emu, uintptr_t fnc); @@ -852,6 +854,7 @@ void iFEpip_32(x64emu_t *emu, uintptr_t fnc); void iFEpui_32(x64emu_t *emu, uintptr_t fnc); void iFEpuu_32(x64emu_t *emu, uintptr_t fnc); void iEEpup_32(x64emu_t *emu, uintptr_t fnc); +void iFEpll_32(x64emu_t *emu, uintptr_t fnc); void iEEpLi_32(x64emu_t *emu, uintptr_t fnc); void iFEpLi_32(x64emu_t *emu, uintptr_t fnc); void iEEppi_32(x64emu_t *emu, uintptr_t fnc); @@ -1140,6 +1143,7 @@ void iEEipii_32(x64emu_t *emu, uintptr_t fnc); void iEEippL_32(x64emu_t *emu, uintptr_t fnc); void iEEpipp_32(x64emu_t *emu, uintptr_t fnc); void iEEpipV_32(x64emu_t *emu, uintptr_t fnc); +void iFEpuip_32(x64emu_t *emu, uintptr_t fnc); void iFEpupu_32(x64emu_t *emu, uintptr_t fnc); void iEEpLpp_32(x64emu_t *emu, uintptr_t fnc); void iFEpLpp_32(x64emu_t *emu, uintptr_t fnc); diff --git a/src/wrapped32/wrappedfreetype.c b/src/wrapped32/wrappedfreetype.c index 82a7c942..2823f9ae 100644 --- a/src/wrapped32/wrappedfreetype.c +++ b/src/wrapped32/wrappedfreetype.c @@ -1537,20 +1537,6 @@ typedef struct my_FT_Outline_Funcs_s signed long delta; } my_FT_Outline_Funcs_t; -//EXPORT int my32_FT_Outline_Decompose(x64emu_t* emu, void* outline, my_FT_Outline_Funcs_t* tbl, void* data) -//{ -// my_FT_Outline_Funcs_t f = {0}; -// if(tbl) { -// f.move_to = find_FT_Outline_MoveToFunc_Fct(tbl->move_to); -// f.line_to = find_FT_Outline_LineToFunc_Fct(tbl->line_to); -// f.conic_to = find_FT_Outline_ConicToFunc_Fct(tbl->conic_to); -// f.cubic_to = find_FT_Outline_CubicToFunc_Fct(tbl->cubic_to); -// f.shift = tbl->shift; -// f.delta = tbl->delta; -// } -// return my->FT_Outline_Decompose(outline, tbl?(&f):tbl, data); -//} - EXPORT int my32_FT_New_Face(x64emu_t* emu, void* lib, void* name, long index, ptr_t* face) { FT_FaceRec_t* res = NULL; @@ -1808,6 +1794,40 @@ EXPORT void my32_FT_Outline_Get_CBox(x64emu_t* emu, FT_Outline_32_t* outline, FT bbox->yMax = to_long(res.yMax); } +EXPORT int my32_FT_Outline_Copy(x64emu_t* emu, FT_Outline_32_t* source, FT_Outline_32_t* target) +{ + // convert outline to 64 + int n = source->n_points; + FT_Outline_t source_l, target_l; + FT_Vector_t vector[n]; + source_l.n_contours = source->n_contours; + source_l.n_points = source->n_points; + source_l.points = vector; + FT_Vector_32_t* vec = from_ptrv(source->points); + for(int i=0; i<n; ++i) { + vector[i].x = from_long(vec[i].x); + vector[i].y = from_long(vec[i].y); + } + source_l.tags = from_ptrv(source->tags); + source_l.contours = from_ptrv(source->contours); + source_l.flags = source->flags; + int ret = my->FT_Outline_Copy(&source_l, &target_l); + // inplace outline shrink + target->flags = target_l.flags; + target->contours = to_ptrv(target_l.contours); + target->tags = to_ptrv(target_l.tags); + target->points = to_ptrv(target_l.points); + target->n_points = target_l.n_points; + target->n_contours = target_l.n_contours; + n = target->n_points; + for(int i=n-1; i>=0; --i) { + vector[i].x = to_long(vec[i].x); + vector[i].y = to_long(vec[i].y); + } + /// + return ret; +} + EXPORT int my32_FT_Render_Glyph(x64emu_t* emu, FT_GlyphSlotRec_32_t* glyph, uint32_t mode) { #if 1 @@ -1965,4 +1985,149 @@ EXPORT void my32_FT_Outline_Embolden(x64emu_t* emu, FT_Outline_32_t* outline, lo outline->flags = outline_l.flags; } +EXPORT void my32_FT_Outline_EmboldenXY(x64emu_t* emu, FT_Outline_32_t* outline, long xstrength, long ystrength) +{ + // convert outline to 64 + int n = outline->n_points; + FT_Outline_t outline_l; + FT_Vector_t vector[n]; + outline_l.n_contours = outline->n_contours; + outline_l.n_points = outline->n_points; + outline_l.points = vector; + FT_Vector_32_t* vec = from_ptrv(outline->points); + for(int i=0; i<n; ++i) { + vector[i].x = from_long(vec[i].x); + vector[i].y = from_long(vec[i].y); + } + outline_l.tags = from_ptrv(outline->tags); + outline_l.contours = from_ptrv(outline->contours); + outline_l.flags = outline->flags; + // + my->FT_Outline_EmboldenXY(&outline_l, xstrength, ystrength); + // convert outline to 32 + outline->n_contours = outline_l.n_contours; + outline->n_points = outline_l.n_points; + for(int i=0; i<n; ++i) { + vec[i].x = to_long(vector[i].x); + vec[i].y = to_long(vector[i].y); + } + outline->tags = to_ptrv(outline_l.tags); + outline->contours = to_ptrv(outline_l.contours); + outline->flags = outline_l.flags; +} + +EXPORT int my32_FT_Outline_Decompose(x64emu_t* emu, FT_Outline_32_t* outline, my_FT_Outline_Funcs_t* tbl, void* data) +{ + // convert outline to 64 + int n = outline->n_points; + FT_Outline_t outline_l; + FT_Vector_t vector[n]; + outline_l.n_contours = outline->n_contours; + outline_l.n_points = outline->n_points; + outline_l.points = vector; + FT_Vector_32_t* vec = from_ptrv(outline->points); + for(int i=0; i<n; ++i) { + vector[i].x = from_long(vec[i].x); + vector[i].y = from_long(vec[i].y); + } + outline_l.tags = from_ptrv(outline->tags); + outline_l.contours = from_ptrv(outline->contours); + outline_l.flags = outline->flags; + // + my_FT_Outline_Funcs_t f = {0}; + if(tbl) { + f.move_to = find_FT_Outline_MoveToFunc_Fct(tbl->move_to); + f.line_to = find_FT_Outline_LineToFunc_Fct(tbl->line_to); + f.conic_to = find_FT_Outline_ConicToFunc_Fct(tbl->conic_to); + f.cubic_to = find_FT_Outline_CubicToFunc_Fct(tbl->cubic_to); + f.shift = tbl->shift; + f.delta = tbl->delta; + } + int ret = my->FT_Outline_Decompose(outline, tbl?(&f):tbl, data); + // convert outline to 32 + outline->n_contours = outline_l.n_contours; + outline->n_points = outline_l.n_points; + for(int i=0; i<n; ++i) { + vec[i].x = to_long(vector[i].x); + vec[i].y = to_long(vector[i].y); + } + outline->tags = to_ptrv(outline_l.tags); + outline->contours = to_ptrv(outline_l.contours); + outline->flags = outline_l.flags; + return ret; +} + +EXPORT int my32_FT_Outline_Done(x64emu_t* emu, void* library, FT_Outline_32_t* outline) +{ + // convert outline to 64 + int n = outline->n_points; + FT_Outline_t outline_l; + FT_Vector_t vector[n]; + outline_l.n_contours = outline->n_contours; + outline_l.n_points = outline->n_points; + outline_l.points = from_ptrv(outline->points); + outline_l.tags = from_ptrv(outline->tags); + outline_l.contours = from_ptrv(outline->contours); + outline_l.flags = outline->flags; + int ret = my->FT_Outline_Done(library, outline); + return ret; +} + +EXPORT int my32_FT_Outline_New(x64emu_t* emu, void* library, uint32_t numPoints, int numContours, FT_Outline_32_t* outline) +{ + FT_Outline_t outline_l = {0}; + int ret = my->FT_Outline_New(library, numPoints, numContours, &outline_l); + // convert outline to 32 + outline->n_contours = outline_l.n_contours; + outline->n_points = outline_l.n_points; + outline->points = to_ptrv(outline_l.points); + outline->tags = to_ptrv(outline_l.tags); + outline->contours = to_ptrv(outline_l.contours); + outline->flags = outline_l.flags; + return ret; +} + + +EXPORT int my32_FT_Activate_Size(x64emu_t* emu, FT_SizeRec_32_t* size) +{ + //FT_SizeRec_t size_l = {0}; + //convert_FT_SizeRec_to_64(&size_l, size); + FT_FaceRec_t* face = from_ptrv(size->face); + inplace_FT_FaceRec_enlarge(face); + int ret = my->FT_Activate_Size(size); + inplace_FT_FaceRec_shrink(face); + return ret; +} +EXPORT int my32_FT_Done_Size(x64emu_t* emu, FT_SizeRec_32_t* size) +{ + //FT_SizeRec_t size_l = {0}; + //convert_FT_SizeRec_to_64(&size_l, size); + FT_FaceRec_t* face = from_ptrv(size->face); + inplace_FT_FaceRec_enlarge(face); + int ret = my->FT_Done_Size(size); + inplace_FT_FaceRec_shrink(face); + return ret; +} + +EXPORT int my32_FT_New_Size(x64emu_t* emu, FT_FaceRec_32_t* face, ptr_t* size) +{ + void* size_l = NULL; + inplace_FT_FaceRec_enlarge(face); + int ret = my->FT_New_Size(face, &size_l); + *size = to_ptrv(size_l); + inplace_FT_FaceRec_shrink(face); + return ret; +} + +EXPORT int my32_FT_Get_Glyph(x64emu_t* emu, FT_GlyphSlotRec_32_t* slot, ptr_t* glyph) +{ + FT_GlyphSlotRec_t slot_l = {0}; + convert_FT_GlyphSlot_to_64(&slot_l, slot); + void* glyph_l; + int ret = my->FT_Get_Glyph(&slot_l, &glyph_l); + *glyph = to_ptrv(glyph_l); + convert_FT_GlyphSlot_to_32(slot, &slot_l); + return ret; +} + #include "wrappedlib_init32.h" diff --git a/src/wrapped32/wrappedfreetype_private.h b/src/wrapped32/wrappedfreetype_private.h index c42424f0..d688fc86 100644 --- a/src/wrapped32/wrappedfreetype_private.h +++ b/src/wrapped32/wrappedfreetype_private.h @@ -4,7 +4,7 @@ // FT_Bitmap is struct uuipWCCp -//GO(FT_Activate_Size, iFp) +GOM(FT_Activate_Size, iFEp) //GO(FT_Add_Default_Modules, vFp) //GO(FT_Add_Module, //GO(FT_Angle_Diff, lFll) @@ -24,10 +24,10 @@ GO(FT_Cos, lFl) GO(FT_DivFix, lFll) GOM(FT_Done_Face, iFEp) GO(FT_Done_FreeType, iFp) -//GO(FT_Done_Glyph, vFp) +GO(FT_Done_Glyph, vFp) //GO(FT_Done_Library, iFp) //GO(FT_Done_MM_Var, iFpp) -//GO(FT_Done_Size, iFp) +GOM(FT_Done_Size, iFEp) //GO(FT_Face_CheckTrueTypePatents, //GO(FT_Face_GetCharsOfVariant, //GO(FT_Face_GetCharVariantIndex, uFpuu) @@ -56,7 +56,7 @@ GOM(FT_Get_First_Char, LFEpp) //GO(FT_Get_Font_Format, pFp) //GO(FT_Get_FSType_Flags, WFp) //GO(FT_Get_Gasp, -//GO(FT_Get_Glyph, iFpp) +GOM(FT_Get_Glyph, iFEpp) GOM(FT_Get_Glyph_Name, iFEpupu) GOM(FT_Get_Kerning, iFEpuuup) //GO(FT_Get_MM_Blend_Coordinates, @@ -87,15 +87,15 @@ GO(FT_Get_TrueType_Engine_Type, uFp) //GO(FT_Get_Var_Design_Coordinates, GOM(FT_Get_WinFNT_Header, iFEpp) GOM(FT_Get_X11_Font_Format, pFEp) -//GO(FT_Glyph_Copy, iFpp) -//GO(FT_Glyph_Get_CBox, vFpup) +GO(FT_Glyph_Copy, iFpp) +GO(FT_Glyph_Get_CBox, vFpuBLLLL_) //GO(FT_GlyphSlot_Embolden, vFp) //GO(FT_GlyphSlot_Oblique, vFp) //GO(FT_GlyphSlot_Own_Bitmap, iFp) //GO(FT_Glyph_Stroke, iFppC) //GO(FT_Glyph_StrokeBorder, iFppCC) //GO(FT_Glyph_To_Bitmap, iFpupC) -//GO(FT_Glyph_Transform, iFppp) +GO(FT_Glyph_Transform, iFprllll_rll_) //GO(FT_Gzip_Uncompress, GOM(FT_Has_PS_Glyph_Names, iFEp) GO(FT_Init_FreeType, iFBp_) @@ -119,24 +119,24 @@ GO(FT_MulFix, lFll) GOM(FT_New_Face, iFEpplp) //GOM(FT_New_Library, iFEpp) GOM(FT_New_Memory_Face, iFEppllp) -//GO(FT_New_Size, iFpp) +GOM(FT_New_Size, iFEpp) GOM(FT_Open_Face, iFEpplp) //GO(FT_OpenType_Free, vFpp) //GO(FT_OpenType_Validate, iFpuppppp) //GO(FT_Outline_Check, iFp) -//GO(FT_Outline_Copy, iFpp) -//GOM(FT_Outline_Decompose, iFEppp) -//GO(FT_Outline_Done, iFpp) +GOM(FT_Outline_Copy, iFEpp) +GOM(FT_Outline_Decompose, iFEppp) +GOM(FT_Outline_Done, iFEpp) //GO(FT_Outline_Done_Internal, GOM(FT_Outline_Embolden, iFEpl) -//GO(FT_Outline_EmboldenXY, iFpll) +GOM(FT_Outline_EmboldenXY, iFEpll) //GO(FT_Outline_Get_BBox, iFpp) GOM(FT_Outline_Get_Bitmap, iFEppp) GOM(FT_Outline_Get_CBox, vFEpp) //GO(FT_Outline_GetInsideBorder, //GO(FT_Outline_Get_Orientation, uFp) //GO(FT_Outline_GetOutsideBorder, uFp) -//GO(FT_Outline_New, iFpuip) +GOM(FT_Outline_New, iFEpuip) //GO(FT_Outline_New_Internal, //GO(FT_Outline_Render, iFppp) //GO(FT_Outline_Reverse, vFp) |