diff --git a/src/wrapped32/generated/functions_list.txt b/src/wrapped32/generated/functions_list.txt index a7d10174..b0c08250 100644 --- a/src/wrapped32/generated/functions_list.txt +++ b/src/wrapped32/generated/functions_list.txt @@ -741,6 +741,7 @@ #() iFpiii -> iFpiii #() iFpiiL -> iFpiiL #() iFpiip -> iFpiip +#() iFpiuu -> iFpiuu #() iFpili -> iFpili #() iFpipp -> iFpipp #() iFpuLp -> iFpuLp @@ -1384,6 +1385,7 @@ #() LFXLiiuuuLL -> LFXLiiuuuLL #() pFEuiiiuuuu -> pFEuiiiuuuu #() pFEXLiiuuLi -> pFEXLiiuuLi +#() pFpiiiiuuuu -> pFpiiiiuuuu #() iFXLbL_pppppp -> iFXLBpppppp #() iFXiLiiibiip_ip -> iFXiLiiiBip #() iFXiLLLiiibiip_ -> iFXiLLLiiiB @@ -2199,6 +2201,7 @@ wrappedsdl1: - vFp: - SDL_FreeSurface - SDL_KillThread + - SDL_UnloadObject - SDL_UnlockSurface - iFv: - SDL_Has3DNow @@ -2243,6 +2246,8 @@ wrappedsdl1: - SDL_SetColorKey - pFupp: - SDL_AddTimer +- iFpiuu: + - SDL_PeepEvents - uFpCCC: - SDL_MapRGB - pFiiiu: @@ -2251,6 +2256,8 @@ wrappedsdl1: - SDL_GetRGB - iFpWCiWCi: - SDL_BuildAudioCVT +- pFpiiiiuuuu: + - SDL_CreateRGBSurfaceFrom wrappedsdl2: % J SDL2_GUID_t uuuu - vFp: diff --git a/src/wrapped32/generated/wrappedsdl1types32.h b/src/wrapped32/generated/wrappedsdl1types32.h index 9f51a9db..ae4cfa62 100644 --- a/src/wrapped32/generated/wrappedsdl1types32.h +++ b/src/wrapped32/generated/wrappedsdl1types32.h @@ -26,15 +26,18 @@ typedef void* (*pFpu_t)(void*, uint32_t); typedef void* (*pFpp_t)(void*, void*); typedef int32_t (*iFpuu_t)(void*, uint32_t, uint32_t); typedef void* (*pFupp_t)(uint32_t, void*, void*); +typedef int32_t (*iFpiuu_t)(void*, int32_t, uint32_t, uint32_t); typedef uint32_t (*uFpCCC_t)(void*, uint8_t, uint8_t, uint8_t); typedef void* (*pFiiiu_t)(int32_t, int32_t, int32_t, uint32_t); typedef void (*vFupppp_t)(uint32_t, void*, void*, void*, void*); typedef int32_t (*iFpWCiWCi_t)(void*, uint16_t, uint8_t, int32_t, uint16_t, uint8_t, int32_t); +typedef void* (*pFpiiiiuuuu_t)(void*, int32_t, int32_t, int32_t, int32_t, uint32_t, uint32_t, uint32_t, uint32_t); #define SUPER() ADDED_FUNCTIONS() \ GO(SDL_Quit, vFv_t) \ GO(SDL_FreeSurface, vFp_t) \ GO(SDL_KillThread, vFp_t) \ + GO(SDL_UnloadObject, vFp_t) \ GO(SDL_UnlockSurface, vFp_t) \ GO(SDL_Has3DNow, iFv_t) \ GO(SDL_Has3DNowExt, iFv_t) \ @@ -66,9 +69,11 @@ typedef int32_t (*iFpWCiWCi_t)(void*, uint16_t, uint8_t, int32_t, uint16_t, uint GO(SDL_RWFromFile, pFpp_t) \ GO(SDL_SetColorKey, iFpuu_t) \ GO(SDL_AddTimer, pFupp_t) \ + GO(SDL_PeepEvents, iFpiuu_t) \ GO(SDL_MapRGB, uFpCCC_t) \ GO(SDL_SetVideoMode, pFiiiu_t) \ GO(SDL_GetRGB, vFupppp_t) \ - GO(SDL_BuildAudioCVT, iFpWCiWCi_t) + GO(SDL_BuildAudioCVT, iFpWCiWCi_t) \ + GO(SDL_CreateRGBSurfaceFrom, pFpiiiiuuuu_t) #endif // __wrappedsdl1TYPES32_H_ diff --git a/src/wrapped32/generated/wrapper32.c b/src/wrapped32/generated/wrapper32.c index 8b252ced..49bdd8d6 100644 --- a/src/wrapped32/generated/wrapper32.c +++ b/src/wrapped32/generated/wrapper32.c @@ -831,6 +831,7 @@ typedef int32_t (*iFuppp_t)(uint32_t, void*, void*, void*); typedef int32_t (*iFpiii_t)(void*, int32_t, int32_t, int32_t); typedef int32_t (*iFpiiL_t)(void*, int32_t, int32_t, uintptr_t); typedef int32_t (*iFpiip_t)(void*, int32_t, int32_t, void*); +typedef int32_t (*iFpiuu_t)(void*, int32_t, uint32_t, uint32_t); typedef int32_t (*iFpili_t)(void*, int32_t, intptr_t, int32_t); typedef int32_t (*iFpipp_t)(void*, int32_t, void*, void*); typedef int32_t (*iFpuLp_t)(void*, uint32_t, uintptr_t, void*); @@ -1474,6 +1475,7 @@ typedef uintptr_t (*LFXLiiiiiip_t)(void*, uintptr_t, int32_t, int32_t, int32_t, typedef uintptr_t (*LFXLiiuuuLL_t)(void*, uintptr_t, int32_t, int32_t, uint32_t, uint32_t, uint32_t, uintptr_t, uintptr_t); typedef void* (*pFEuiiiuuuu_t)(x64emu_t*, uint32_t, int32_t, int32_t, int32_t, uint32_t, uint32_t, uint32_t, uint32_t); typedef void* (*pFEXLiiuuLi_t)(x64emu_t*, void*, uintptr_t, int32_t, int32_t, uint32_t, uint32_t, uintptr_t, int32_t); +typedef void* (*pFpiiiiuuuu_t)(void*, int32_t, int32_t, int32_t, int32_t, uint32_t, uint32_t, uint32_t, uint32_t); typedef int32_t (*iFXLbL_pppppp_t)(void*, uintptr_t, struct_L_t*, void*, void*, void*, void*, void*, void*); typedef int32_t (*iFXiLiiibiip_ip_t)(void*, int32_t, uintptr_t, int32_t, int32_t, int32_t, struct_iip_t*, int32_t, void*); typedef int32_t (*iFXiLLLiiibiip__t)(void*, int32_t, uintptr_t, uintptr_t, uintptr_t, int32_t, int32_t, int32_t, struct_iip_t*); @@ -2322,6 +2324,7 @@ void iFuppp_32(x64emu_t *emu, uintptr_t fcn) { iFuppp_t fn = (iFuppp_t)fcn; R_EA void iFpiii_32(x64emu_t *emu, uintptr_t fcn) { iFpiii_t fn = (iFpiii_t)fcn; R_EAX = fn(from_ptriv(R_ESP + 4), from_ptri(int32_t, R_ESP + 8), from_ptri(int32_t, R_ESP + 12), from_ptri(int32_t, R_ESP + 16)); } void iFpiiL_32(x64emu_t *emu, uintptr_t fcn) { iFpiiL_t fn = (iFpiiL_t)fcn; R_EAX = fn(from_ptriv(R_ESP + 4), from_ptri(int32_t, R_ESP + 8), from_ptri(int32_t, R_ESP + 12), from_ulong(from_ptri(ulong_t, R_ESP + 16))); } void iFpiip_32(x64emu_t *emu, uintptr_t fcn) { iFpiip_t fn = (iFpiip_t)fcn; R_EAX = fn(from_ptriv(R_ESP + 4), from_ptri(int32_t, R_ESP + 8), from_ptri(int32_t, R_ESP + 12), from_ptriv(R_ESP + 16)); } +void iFpiuu_32(x64emu_t *emu, uintptr_t fcn) { iFpiuu_t fn = (iFpiuu_t)fcn; R_EAX = fn(from_ptriv(R_ESP + 4), from_ptri(int32_t, R_ESP + 8), from_ptri(uint32_t, R_ESP + 12), from_ptri(uint32_t, R_ESP + 16)); } void iFpili_32(x64emu_t *emu, uintptr_t fcn) { iFpili_t fn = (iFpili_t)fcn; R_EAX = fn(from_ptriv(R_ESP + 4), from_ptri(int32_t, R_ESP + 8), from_long(from_ptri(long_t, R_ESP + 12)), from_ptri(int32_t, R_ESP + 16)); } void iFpipp_32(x64emu_t *emu, uintptr_t fcn) { iFpipp_t fn = (iFpipp_t)fcn; R_EAX = fn(from_ptriv(R_ESP + 4), from_ptri(int32_t, R_ESP + 8), from_ptriv(R_ESP + 12), from_ptriv(R_ESP + 16)); } void iFpuLp_32(x64emu_t *emu, uintptr_t fcn) { iFpuLp_t fn = (iFpuLp_t)fcn; R_EAX = fn(from_ptriv(R_ESP + 4), from_ptri(uint32_t, R_ESP + 8), from_ulong(from_ptri(ulong_t, R_ESP + 12)), from_ptriv(R_ESP + 16)); } @@ -2965,6 +2968,7 @@ void LFXLiiiiiip_32(x64emu_t *emu, uintptr_t fcn) { LFXLiiiiiip_t fn = (LFXLiiii void LFXLiiuuuLL_32(x64emu_t *emu, uintptr_t fcn) { LFXLiiuuuLL_t fn = (LFXLiiuuuLL_t)fcn; R_EAX = to_ulong(fn(getDisplay(from_ptriv(R_ESP + 4)), from_ulong(from_ptri(ulong_t, R_ESP + 8)), from_ptri(int32_t, R_ESP + 12), from_ptri(int32_t, R_ESP + 16), from_ptri(uint32_t, R_ESP + 20), from_ptri(uint32_t, R_ESP + 24), from_ptri(uint32_t, R_ESP + 28), from_ulong(from_ptri(ulong_t, R_ESP + 32)), from_ulong(from_ptri(ulong_t, R_ESP + 36)))); } void pFEuiiiuuuu_32(x64emu_t *emu, uintptr_t fcn) { pFEuiiiuuuu_t fn = (pFEuiiiuuuu_t)fcn; R_EAX = to_ptrv(fn(emu, from_ptri(uint32_t, R_ESP + 4), from_ptri(int32_t, R_ESP + 8), from_ptri(int32_t, R_ESP + 12), from_ptri(int32_t, R_ESP + 16), from_ptri(uint32_t, R_ESP + 20), from_ptri(uint32_t, R_ESP + 24), from_ptri(uint32_t, R_ESP + 28), from_ptri(uint32_t, R_ESP + 32))); } void pFEXLiiuuLi_32(x64emu_t *emu, uintptr_t fcn) { pFEXLiiuuLi_t fn = (pFEXLiiuuLi_t)fcn; R_EAX = to_ptrv(fn(emu, getDisplay(from_ptriv(R_ESP + 4)), from_ulong(from_ptri(ulong_t, R_ESP + 8)), from_ptri(int32_t, R_ESP + 12), from_ptri(int32_t, R_ESP + 16), from_ptri(uint32_t, R_ESP + 20), from_ptri(uint32_t, R_ESP + 24), from_ulong(from_ptri(ulong_t, R_ESP + 28)), from_ptri(int32_t, R_ESP + 32))); } +void pFpiiiiuuuu_32(x64emu_t *emu, uintptr_t fcn) { pFpiiiiuuuu_t fn = (pFpiiiiuuuu_t)fcn; R_EAX = to_ptrv(fn(from_ptriv(R_ESP + 4), from_ptri(int32_t, R_ESP + 8), from_ptri(int32_t, R_ESP + 12), from_ptri(int32_t, R_ESP + 16), from_ptri(int32_t, R_ESP + 20), from_ptri(uint32_t, R_ESP + 24), from_ptri(uint32_t, R_ESP + 28), from_ptri(uint32_t, R_ESP + 32), from_ptri(uint32_t, R_ESP + 36))); } void iFXLbL_pppppp_32(x64emu_t *emu, uintptr_t fcn) { iFXLbL_pppppp_t fn = (iFXLbL_pppppp_t)fcn; struct_L_t arg_12={0}; if (*(ptr_t*)(from_ptr((R_ESP + 12)))) from_struct_L(&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, from_ptriv(R_ESP + 16), from_ptriv(R_ESP + 20), from_ptriv(R_ESP + 24), from_ptriv(R_ESP + 28), from_ptriv(R_ESP + 32), from_ptriv(R_ESP + 36)); if (*(ptr_t*)(from_ptr((R_ESP + 12)))) to_struct_L(*(ptr_t*)(from_ptr((R_ESP + 12))), &arg_12); } void iFXiLiiibiip_ip_32(x64emu_t *emu, uintptr_t fcn) { iFXiLiiibiip_ip_t fn = (iFXiLiiibiip_ip_t)fcn; struct_iip_t arg_28={0}; if (*(ptr_t*)(from_ptr((R_ESP + 28)))) from_struct_iip(&arg_28, *(ptr_t*)(from_ptr((R_ESP + 28)))); R_EAX = fn(getDisplay(from_ptriv(R_ESP + 4)), from_ptri(int32_t, R_ESP + 8), from_ulong(from_ptri(ulong_t, R_ESP + 12)), from_ptri(int32_t, R_ESP + 16), from_ptri(int32_t, R_ESP + 20), from_ptri(int32_t, R_ESP + 24), *(ptr_t*)(from_ptr((R_ESP + 28))) ? &arg_28 : NULL, from_ptri(int32_t, R_ESP + 32), from_ptriv(R_ESP + 36)); if (*(ptr_t*)(from_ptr((R_ESP + 28)))) to_struct_iip(*(ptr_t*)(from_ptr((R_ESP + 28))), &arg_28); } void iFXiLLLiiibiip__32(x64emu_t *emu, uintptr_t fcn) { iFXiLLLiiibiip__t fn = (iFXiLLLiiibiip__t)fcn; struct_iip_t arg_36={0}; if (*(ptr_t*)(from_ptr((R_ESP + 36)))) from_struct_iip(&arg_36, *(ptr_t*)(from_ptr((R_ESP + 36)))); R_EAX = fn(getDisplay(from_ptriv(R_ESP + 4)), from_ptri(int32_t, R_ESP + 8), from_ulong(from_ptri(ulong_t, R_ESP + 12)), from_ulong(from_ptri(ulong_t, R_ESP + 16)), from_ulong(from_ptri(ulong_t, R_ESP + 20)), from_ptri(int32_t, R_ESP + 24), from_ptri(int32_t, R_ESP + 28), from_ptri(int32_t, R_ESP + 32), *(ptr_t*)(from_ptr((R_ESP + 36))) ? &arg_36 : NULL); if (*(ptr_t*)(from_ptr((R_ESP + 36)))) to_struct_iip(*(ptr_t*)(from_ptr((R_ESP + 36))), &arg_36); } diff --git a/src/wrapped32/generated/wrapper32.h b/src/wrapped32/generated/wrapper32.h index 63d94afa..ff9a0d6b 100644 --- a/src/wrapped32/generated/wrapper32.h +++ b/src/wrapped32/generated/wrapper32.h @@ -782,6 +782,7 @@ void iFuppp_32(x64emu_t *emu, uintptr_t fnc); void iFpiii_32(x64emu_t *emu, uintptr_t fnc); void iFpiiL_32(x64emu_t *emu, uintptr_t fnc); void iFpiip_32(x64emu_t *emu, uintptr_t fnc); +void iFpiuu_32(x64emu_t *emu, uintptr_t fnc); void iFpili_32(x64emu_t *emu, uintptr_t fnc); void iFpipp_32(x64emu_t *emu, uintptr_t fnc); void iFpuLp_32(x64emu_t *emu, uintptr_t fnc); @@ -1425,6 +1426,7 @@ void LFXLiiiiiip_32(x64emu_t *emu, uintptr_t fnc); void LFXLiiuuuLL_32(x64emu_t *emu, uintptr_t fnc); void pFEuiiiuuuu_32(x64emu_t *emu, uintptr_t fnc); void pFEXLiiuuLi_32(x64emu_t *emu, uintptr_t fnc); +void pFpiiiiuuuu_32(x64emu_t *emu, uintptr_t fnc); void iFXLbL_pppppp_32(x64emu_t *emu, uintptr_t fnc); void iFXiLiiibiip_ip_32(x64emu_t *emu, uintptr_t fnc); void iFXiLLLiiibiip__32(x64emu_t *emu, uintptr_t fnc); diff --git a/src/wrapped32/wrappedsdl1.c b/src/wrapped32/wrappedsdl1.c index 86adf985..8e437659 100644 --- a/src/wrapped32/wrappedsdl1.c +++ b/src/wrapped32/wrappedsdl1.c @@ -567,6 +567,13 @@ EXPORT void* my32_SDL_GetVideoSurface() return unwrapSurface(ret); } +EXPORT void* my32_SDL_CreateRGBSurfaceFrom(void* pixels, int width, int height, int depth, int pitch, uint32_t rmask, uint32_t gmask, uint32_t bmask, uint32_t amask) +{ + void* p = my->SDL_CreateRGBSurfaceFrom(pixels, width, height, depth, pitch, rmask, gmask, bmask, amask); + return unwrapSurface(p); +} + + EXPORT void my32_SDL_FreeSurface(void* s) { my->SDL_FreeSurface(wrapSurface(s)); @@ -591,6 +598,14 @@ EXPORT int my32_SDL_PollEvent(my_SDL_Event_32_t* evt) return ret; } +EXPORT int my32_SDL_PeepEvents(my_SDL_Event_32_t* evts, int num, uint32_t action, uint32_t mask) +{ + my_SDL_Event_t events[num]; + int ret = my->SDL_PeepEvents(events, num, action, mask); + for(int i=0; i