[BOX32] Added a few 32bits wrapped function libSDL2

This commit is contained in:
ptitSeb 2024-10-13 10:01:06 +02:00
parent b6cd19b78b
commit 5fcd9d45a3
4 changed files with 11 additions and 7 deletions

View File

@ -735,6 +735,7 @@
#() iFipup -> iFipup
#() iFippi -> iFippi
#() iFippL -> iFippL
#() iFippp -> iFippp
#() iFipON -> iFipON
#() iFuiup -> iFuiup
#() iFuupi -> iFuupi

View File

@ -825,6 +825,7 @@ typedef int32_t (*iFipui_t)(int32_t, void*, uint32_t, int32_t);
typedef int32_t (*iFipup_t)(int32_t, void*, uint32_t, void*);
typedef int32_t (*iFippi_t)(int32_t, void*, void*, int32_t);
typedef int32_t (*iFippL_t)(int32_t, void*, void*, uintptr_t);
typedef int32_t (*iFippp_t)(int32_t, void*, void*, void*);
typedef int32_t (*iFipON_t)(int32_t, void*, int32_t, ...);
typedef int32_t (*iFuiup_t)(uint32_t, int32_t, uint32_t, void*);
typedef int32_t (*iFuupi_t)(uint32_t, uint32_t, void*, int32_t);
@ -2322,6 +2323,7 @@ void iFipui_32(x64emu_t *emu, uintptr_t fcn) { iFipui_t fn = (iFipui_t)fcn; R_EA
void iFipup_32(x64emu_t *emu, uintptr_t fcn) { iFipup_t fn = (iFipup_t)fcn; R_EAX = fn(from_ptri(int32_t, R_ESP + 4), from_ptriv(R_ESP + 8), from_ptri(uint32_t, R_ESP + 12), from_ptriv(R_ESP + 16)); }
void iFippi_32(x64emu_t *emu, uintptr_t fcn) { iFippi_t fn = (iFippi_t)fcn; R_EAX = fn(from_ptri(int32_t, R_ESP + 4), from_ptriv(R_ESP + 8), from_ptriv(R_ESP + 12), from_ptri(int32_t, R_ESP + 16)); }
void iFippL_32(x64emu_t *emu, uintptr_t fcn) { iFippL_t fn = (iFippL_t)fcn; R_EAX = fn(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))); }
void iFippp_32(x64emu_t *emu, uintptr_t fcn) { iFippp_t fn = (iFippp_t)fcn; R_EAX = fn(from_ptri(int32_t, R_ESP + 4), from_ptriv(R_ESP + 8), from_ptriv(R_ESP + 12), from_ptriv(R_ESP + 16)); }
void iFipON_32(x64emu_t *emu, uintptr_t fcn) { iFipON_t fn = (iFipON_t)fcn; R_EAX = fn(from_ptri(int32_t, R_ESP + 4), from_ptriv(R_ESP + 8), of_convert32(from_ptri(int32_t, R_ESP + 12)), from_ptriv(R_ESP + 16)); }
void iFuiup_32(x64emu_t *emu, uintptr_t fcn) { iFuiup_t fn = (iFuiup_t)fcn; R_EAX = fn(from_ptri(uint32_t, R_ESP + 4), from_ptri(int32_t, R_ESP + 8), from_ptri(uint32_t, R_ESP + 12), from_ptriv(R_ESP + 16)); }
void iFuupi_32(x64emu_t *emu, uintptr_t fcn) { iFuupi_t fn = (iFuupi_t)fcn; R_EAX = fn(from_ptri(uint32_t, R_ESP + 4), from_ptri(uint32_t, R_ESP + 8), from_ptriv(R_ESP + 12), from_ptri(int32_t, R_ESP + 16)); }

View File

@ -776,6 +776,7 @@ void iFipui_32(x64emu_t *emu, uintptr_t fnc);
void iFipup_32(x64emu_t *emu, uintptr_t fnc);
void iFippi_32(x64emu_t *emu, uintptr_t fnc);
void iFippL_32(x64emu_t *emu, uintptr_t fnc);
void iFippp_32(x64emu_t *emu, uintptr_t fnc);
void iFipON_32(x64emu_t *emu, uintptr_t fnc);
void iFuiup_32(x64emu_t *emu, uintptr_t fnc);
void iFuupi_32(x64emu_t *emu, uintptr_t fnc);

View File

@ -89,8 +89,8 @@ GO(SDL_Delay, vFu)
GOM(SDL_DelEventWatch, vFEpp)
// SDL_DelHintCallback
//GO(SDL_DequeueAudio, uFupu)
//GO(SDL_DestroyCond, vFp)
//GO(SDL_DestroyMutex, vFp)
GO(SDL_DestroyCond, vFp)
GO(SDL_DestroyMutex, vFp)
GO(SDL_DestroyRenderer, vFp)
GO(SDL_DestroySemaphore, vFp)
GO(SDL_DestroyTexture, vFp)
@ -198,7 +198,7 @@ GO(SDL_GetCurrentVideoDriver, pFv)
//GO(SDL_GetDefaultCursor, pFv)
GOM(SDL_GetDesktopDisplayMode, iFEip)
GO(SDL_GetDisplayBounds, iFip)
//GO(SDL_GetDisplayDPI, iFippp)
GO(SDL_GetDisplayDPI, iFippp)
GOM(SDL_GetDisplayMode, iFiip) //%noE
GO(SDL_GetDisplayName, pFi)
//GO(SDL_GetDisplayOrientation, uFi)
@ -389,10 +389,10 @@ GO(SDL_JoystickClose, vFp)
GO(SDL_JoystickEventState, iFi)
//GO(SDL_JoystickFromInstanceID, pFi)
//GO(SDL_JoystickGetAttached, iFp)
//GO(SDL_JoystickGetAxis, wFpi)
GO(SDL_JoystickGetAxis, wFpi)
//GO(SDL_JoystickGetAxisInitialState, uFpip)
//GO(SDL_JoystickGetBall, iFpipp)
//GO(SDL_JoystickGetButton, CFpi)
GO(SDL_JoystickGetButton, CFpi)
GOS(SDL_JoystickGetDeviceGUID, JFEi) // return a struct that is "uint8_t data[16]"
//GO(SDL_JoystickGetDeviceInstanceID, iFi)
//GO(SDL_JoystickGetDevicePlayerIndex, iFi)
@ -424,7 +424,7 @@ GO(SDL_JoystickOpen, pFi)
//GO(SDL_JoystickPathForIndex, pFi)
//GO(SDL_JoystickRumble, iFpWWu)
//GO(SDL_JoystickRumbleTriggers, iFpWWu)
//GO(SDL_JoystickUpdate, vFv)
GO(SDL_JoystickUpdate, vFv)
//GO(SDL_LinuxSetThreadPriority, iFli)
//GO(SDL_lltoa, pFlpi)
GOM(SDL_LoadBMP_RW, pFEpi)
@ -554,7 +554,7 @@ GO(SDL_RenderSetLogicalSize, iFpii)
//GO(SDL_ResetAssertionReport, vFv)
//GO(SDL_ResetHints, vFv)
//GO(SDL_ResetKeyboard, vFv)
//GO(SDL_RestoreWindow, vFp)
GO(SDL_RestoreWindow, vFp)
//GOM(SDL_RWFromConstMem, pFEpi)
//GOM(SDL_RWFromFP, pFEpi)
GOM(SDL_RWFromFile, pFEpp)