func_def eliminated

This commit is contained in:
Nekotekina 2015-07-26 15:10:06 +03:00
parent 31774b7262
commit be2f993155
35 changed files with 81 additions and 97 deletions

View file

@ -1,5 +1,5 @@
#pragma once #pragma once
using SceKernelDeci4pCallback = func_def<s32(s32 notifyId, s32 notifyCount, s32 notifyArg, vm::ptr<void> pCommon)>; using SceKernelDeci4pCallback = s32(s32 notifyId, s32 notifyCount, s32 notifyArg, vm::ptr<void> pCommon);
extern psv_log_base sceDeci4p; extern psv_log_base sceDeci4p;

View file

@ -1,6 +1,6 @@
#pragma once #pragma once
using SceFiberEntry = func_def<void(u32 argOnInitialize, u32 argOnRun)>; using SceFiberEntry = void(u32 argOnInitialize, u32 argOnRun);
struct set_alignment(8) SceFiber struct set_alignment(8) SceFiber
{ {

View file

@ -1,8 +1,8 @@
#pragma once #pragma once
using SceFiosOpCallback = func_def<s32(vm::ptr<void> pContext, s32 op, u8 event, s32 err)>; using SceFiosOpCallback = s32(vm::ptr<void> pContext, s32 op, u8 event, s32 err);
using SceFiosVprintfCallback = func_def<s32(vm::cptr<char> fmt, va_list ap)>; using SceFiosVprintfCallback = s32(vm::cptr<char> fmt, va_list ap);
using SceFiosMemcpyCallback = func_def<vm::ptr<void>(vm::ptr<void> dst, vm::cptr<void> src, u32 len)>; using SceFiosMemcpyCallback = vm::ptr<void>(vm::ptr<void> dst, vm::cptr<void> src, u32 len);
enum SceFiosWhence : s32 enum SceFiosWhence : s32
{ {
@ -100,7 +100,7 @@ struct SceFiosOverlay
char src[292]; char src[292];
}; };
using SceFiosIOFilterCallback = func_def<void()>; using SceFiosIOFilterCallback = void();
struct SceFiosPsarcDearchiverContext struct SceFiosPsarcDearchiverContext
{ {

View file

@ -29,7 +29,7 @@ enum
SCE_GXM_ERROR_DRIVER = 0x805B0017, SCE_GXM_ERROR_DRIVER = 0x805B0017,
}; };
using SceGxmDisplayQueueCallback = func_def<void(vm::cptr<void> callbackData)>; using SceGxmDisplayQueueCallback = void(vm::cptr<void> callbackData);
struct SceGxmInitializeParams struct SceGxmInitializeParams
{ {
@ -1193,12 +1193,12 @@ struct SceGxmShaderPatcher;
struct SceGxmRegisteredProgram; struct SceGxmRegisteredProgram;
using SceGxmShaderPatcherHostAllocCallback = func_def<vm::ptr<void>(vm::ptr<void> userData, u32 size)>; using SceGxmShaderPatcherHostAllocCallback = vm::ptr<void>(vm::ptr<void> userData, u32 size);
using SceGxmShaderPatcherHostFreeCallback = func_def<void(vm::ptr<void> userData, vm::ptr<void> mem)>; using SceGxmShaderPatcherHostFreeCallback = void(vm::ptr<void> userData, vm::ptr<void> mem);
using SceGxmShaderPatcherBufferAllocCallback = func_def<vm::ptr<void>(vm::ptr<void> userData, u32 size)>; using SceGxmShaderPatcherBufferAllocCallback = vm::ptr<void>(vm::ptr<void> userData, u32 size);
using SceGxmShaderPatcherBufferFreeCallback = func_def<void(vm::ptr<void> userData, vm::ptr<void> mem)>; using SceGxmShaderPatcherBufferFreeCallback = void(vm::ptr<void> userData, vm::ptr<void> mem);
using SceGxmShaderPatcherUsseAllocCallback = func_def<vm::ptr<void>(vm::ptr<void> userData, u32 size, vm::ptr<u32> usseOffset)>; using SceGxmShaderPatcherUsseAllocCallback = vm::ptr<void>(vm::ptr<void> userData, u32 size, vm::ptr<u32> usseOffset);
using SceGxmShaderPatcherUsseFreeCallback = func_def<void(vm::ptr<void> userData, vm::ptr<void> mem)>; using SceGxmShaderPatcherUsseFreeCallback = void(vm::ptr<void> userData, vm::ptr<void> mem);
struct SceGxmShaderPatcherParams struct SceGxmShaderPatcherParams
{ {

View file

@ -29,8 +29,8 @@ enum SceHttpAuthType : s32
SCE_HTTP_AUTH_RESERVED2 SCE_HTTP_AUTH_RESERVED2
}; };
using SceHttpAuthInfoCallback = func_def<s32(s32 request, SceHttpAuthType authType, vm::cptr<char> realm, vm::ptr<char> username, vm::ptr<char> password, s32 needEntity, vm::pptr<u8> entityBody, vm::ptr<u32> entitySize, vm::ptr<s32> save, vm::ptr<void> userArg)>; using SceHttpAuthInfoCallback = s32(s32 request, SceHttpAuthType authType, vm::cptr<char> realm, vm::ptr<char> username, vm::ptr<char> password, s32 needEntity, vm::pptr<u8> entityBody, vm::ptr<u32> entitySize, vm::ptr<s32> save, vm::ptr<void> userArg);
using SceHttpRedirectCallback = func_def<s32(s32 request, s32 statusCode, vm::ptr<s32> method, vm::cptr<char> location, vm::ptr<void> userArg)>; using SceHttpRedirectCallback = s32(s32 request, s32 statusCode, vm::ptr<s32> method, vm::cptr<char> location, vm::ptr<void> userArg);
struct SceHttpMemoryPoolStats struct SceHttpMemoryPoolStats
{ {
@ -54,8 +54,8 @@ struct SceHttpUriElement
u8 reserved[10]; u8 reserved[10];
}; };
using SceHttpCookieRecvCallback = func_def<s32(s32 request, vm::cptr<char> url, vm::cptr<char> cookieHeader, u32 headerLen, vm::ptr<void> userArg)>; using SceHttpCookieRecvCallback = s32(s32 request, vm::cptr<char> url, vm::cptr<char> cookieHeader, u32 headerLen, vm::ptr<void> userArg);
using SceHttpCookieSendCallback = func_def<s32(s32 request, vm::cptr<char> url, vm::cptr<char> cookieHeader, vm::ptr<void> userArg)>; using SceHttpCookieSendCallback = s32(s32 request, vm::cptr<char> url, vm::cptr<char> cookieHeader, vm::ptr<void> userArg);
struct SceHttpsData struct SceHttpsData
{ {
@ -69,6 +69,6 @@ struct SceHttpsCaList
le_t<s32> caNum; le_t<s32> caNum;
}; };
using SceHttpsCallback = func_def<s32(u32 verifyEsrr, vm::cptr<vm::ptr<SceSslCert>> sslCert, s32 certNum, vm::ptr<void> userArg)>; using SceHttpsCallback = s32(u32 verifyEsrr, vm::cptr<vm::ptr<SceSslCert>> sslCert, s32 certNum, vm::ptr<void> userArg);
extern psv_log_base sceHttp; extern psv_log_base sceHttp;

View file

@ -1,6 +1,6 @@
#pragma once #pragma once
using SceImeCharFilter = func_def<s32(u16 ch)>; using SceImeCharFilter = s32(u16 ch);
struct SceImeRect struct SceImeRect
{ {
@ -46,7 +46,7 @@ struct SceImePreeditGeometry
le_t<u32> height; le_t<u32> height;
}; };
using SceImeEventHandler = func_def<void(vm::ptr<void> arg, vm::cptr<SceImeEvent> e)>; using SceImeEventHandler = void(vm::ptr<void> arg, vm::cptr<SceImeEvent> e);
struct SceImeParam struct SceImeParam
{ {

View file

@ -305,7 +305,7 @@ struct SceKernelAllocMemBlockOpt
// Thread Manager definitions (threads) // Thread Manager definitions (threads)
using SceKernelThreadEntry = func_def<s32(u32 argSize, vm::ptr<void> pArgBlock)>; using SceKernelThreadEntry = s32(u32 argSize, vm::ptr<void> pArgBlock);
struct SceKernelThreadOptParam struct SceKernelThreadOptParam
{ {
@ -370,7 +370,7 @@ struct SceKernelSystemInfo
// Thread Manager definitions (callbacks) // Thread Manager definitions (callbacks)
using SceKernelCallbackFunction = func_def<s32(s32 notifyId, s32 notifyCount, s32 notifyArg, vm::ptr<void> pCommon)>; using SceKernelCallbackFunction = s32(s32 notifyId, s32 notifyCount, s32 notifyArg, vm::ptr<void> pCommon);
struct SceKernelCallbackInfo struct SceKernelCallbackInfo
{ {
@ -388,7 +388,7 @@ struct SceKernelCallbackInfo
// Thread Manager definitions (events) // Thread Manager definitions (events)
using SceKernelThreadEventHandler = func_def<s32(s32 type, s32 threadId, s32 arg, vm::ptr<void> pCommon)>; using SceKernelThreadEventHandler = s32(s32 type, s32 threadId, s32 arg, vm::ptr<void> pCommon);
struct SceKernelEventInfo struct SceKernelEventInfo
{ {

View file

@ -1,5 +1,5 @@
#pragma once #pragma once
using atexit_func_t = func_def<void(vm::ptr<void>)>; using atexit_func_t = void(vm::ptr<void>);
extern psv_log_base sceLibc; extern psv_log_base sceLibc;

View file

@ -70,8 +70,8 @@ struct SceLocationHeadingInfo
le_t<u64> timestamp; le_t<u64> timestamp;
}; };
using SceLocationLocationInfoCallback = func_def<void(s32 result, u8 handle, vm::cptr<SceLocationLocationInfo> location, vm::ptr<void> userdata)>; using SceLocationLocationInfoCallback = void(s32 result, u8 handle, vm::cptr<SceLocationLocationInfo> location, vm::ptr<void> userdata);
using SceLocationHeadingInfoCallback = func_def<void(s32 result, u8 handle, vm::cptr<SceLocationHeadingInfo> heading, vm::ptr<void> userdata)>; using SceLocationHeadingInfoCallback = void(s32 result, u8 handle, vm::cptr<SceLocationHeadingInfo> heading, vm::ptr<void> userdata);
struct SceLocationPermissionInfo struct SceLocationPermissionInfo
{ {

View file

@ -115,8 +115,8 @@ struct SceNetEmulationParam
u8 reserved[44]; u8 reserved[44];
}; };
using SceNetResolverFunctionAllocate = func_def<vm::ptr<void>(u32 size, s32 rid, vm::cptr<char> name, vm::ptr<void> user)>; using SceNetResolverFunctionAllocate = vm::ptr<void>(u32 size, s32 rid, vm::cptr<char> name, vm::ptr<void> user);
using SceNetResolverFunctionFree = func_def<void(vm::ptr<void> ptr, s32 rid, vm::cptr<char> name, vm::ptr<void> user)>; using SceNetResolverFunctionFree = void(vm::ptr<void> ptr, s32 rid, vm::cptr<char> name, vm::ptr<void> user);
struct SceNetResolverParam struct SceNetResolverParam
{ {

View file

@ -42,6 +42,6 @@ struct SceNetCtlAdhocPeerInfo
SceNetInAddr inet_addr; SceNetInAddr inet_addr;
}; };
using SceNetCtlCallback = func_def<void(s32 event_type, vm::ptr<void> arg)>; using SceNetCtlCallback = void(s32 event_type, vm::ptr<void> arg);
extern psv_log_base sceNetCtl; extern psv_log_base sceNetCtl;

View file

@ -95,7 +95,7 @@ struct SceNgsCallbackInfo
vm::lptr<void> pUserData; vm::lptr<void> pUserData;
}; };
using SceNgsCallbackFunc = func_def<void(vm::cptr<SceNgsCallbackInfo> pCallbackInfo)>; using SceNgsCallbackFunc = void(vm::cptr<SceNgsCallbackInfo> pCallbackInfo);
struct SceSulphaNgsConfig struct SceSulphaNgsConfig
{ {

View file

@ -10,7 +10,7 @@ enum SceNpBasicFriendListEventType : s32
SCE_NP_BASIC_FRIEND_LIST_EVENT_TYPE_DELETED = 4 SCE_NP_BASIC_FRIEND_LIST_EVENT_TYPE_DELETED = 4
}; };
using SceNpBasicFriendListEventHandler = func_def<void(SceNpBasicFriendListEventType eventType, vm::cptr<SceNpId> friendId, vm::ptr<void> userdata)>; using SceNpBasicFriendListEventHandler = void(SceNpBasicFriendListEventType eventType, vm::cptr<SceNpId> friendId, vm::ptr<void> userdata);
enum SceNpBasicFriendOnlineStatusEventType : s32 enum SceNpBasicFriendOnlineStatusEventType : s32
{ {
@ -28,7 +28,7 @@ enum SceNpBasicFriendOnlineStatus : s32
SCE_NP_BASIC_FRIEND_ONLINE_STATUS_ONLINE_IN_CONTEXT = 4 SCE_NP_BASIC_FRIEND_ONLINE_STATUS_ONLINE_IN_CONTEXT = 4
}; };
using SceNpBasicFriendOnlineStatusEventHandler = func_def<void(SceNpBasicFriendOnlineStatusEventType eventType, vm::cptr<SceNpId> friendId, SceNpBasicFriendOnlineStatus status, vm::ptr<void> userdata)>; using SceNpBasicFriendOnlineStatusEventHandler = void(SceNpBasicFriendOnlineStatusEventType eventType, vm::cptr<SceNpId> friendId, SceNpBasicFriendOnlineStatus status, vm::ptr<void> userdata);
enum SceNpBasicBlockListEventType : s32 enum SceNpBasicBlockListEventType : s32
{ {
@ -38,7 +38,7 @@ enum SceNpBasicBlockListEventType : s32
SCE_NP_BASIC_BLOCK_LIST_EVENT_TYPE_DELETED = 4 SCE_NP_BASIC_BLOCK_LIST_EVENT_TYPE_DELETED = 4
}; };
using SceNpBasicBlockListEventHandler = func_def<void(SceNpBasicBlockListEventType eventType, vm::cptr<SceNpId> playerId, vm::ptr<void> userdata)>; using SceNpBasicBlockListEventHandler = void(SceNpBasicBlockListEventType eventType, vm::cptr<SceNpId> playerId, vm::ptr<void> userdata);
enum SceNpBasicFriendGamePresenceEventType : s32 enum SceNpBasicFriendGamePresenceEventType : s32
{ {
@ -72,7 +72,7 @@ struct SceNpBasicGamePresence
SceNpBasicInGamePresence inGamePresence; SceNpBasicInGamePresence inGamePresence;
}; };
using SceNpBasicFriendGamePresenceEventHandler = func_def<void(SceNpBasicFriendGamePresenceEventType eventtype, vm::cptr<SceNpId> friendId, vm::cptr<SceNpBasicGamePresence> presence, vm::ptr<void> userdata)>; using SceNpBasicFriendGamePresenceEventHandler = void(SceNpBasicFriendGamePresenceEventType eventtype, vm::cptr<SceNpId> friendId, vm::cptr<SceNpBasicGamePresence> presence, vm::ptr<void> userdata);
struct SceNpBasicInGameDataMessage struct SceNpBasicInGameDataMessage
{ {
@ -80,7 +80,7 @@ struct SceNpBasicInGameDataMessage
le_t<u32> dataSize; le_t<u32> dataSize;
}; };
using SceNpBasicInGameDataMessageEventHandler = func_def<void(vm::cptr<SceNpId> from, vm::cptr<SceNpBasicInGameDataMessage> message, vm::ptr<void> userdata)>; using SceNpBasicInGameDataMessageEventHandler = void(vm::cptr<SceNpId> from, vm::cptr<SceNpBasicInGameDataMessage> message, vm::ptr<void> userdata);
struct SceNpBasicEventHandlers struct SceNpBasicEventHandlers
{ {

View file

@ -117,7 +117,7 @@ struct SceNpTicketVersion
le_t<u16> minor; le_t<u16> minor;
}; };
using SceNpAuthCallback = func_def<s32(s32 id, s32 result, vm::ptr<void> arg)>; using SceNpAuthCallback = s32(s32 id, s32 result, vm::ptr<void> arg);
struct SceNpAuthRequestParameter struct SceNpAuthRequestParameter
{ {

View file

@ -7,6 +7,6 @@ struct SceNpOptParam
le_t<u32> optParamSize; le_t<u32> optParamSize;
}; };
using SceNpServiceStateCallback = func_def<void(SceNpServiceState state, vm::ptr<void> userdata)>; using SceNpServiceStateCallback = void(SceNpServiceState state, vm::ptr<void> userdata);
extern psv_log_base sceNpManager; extern psv_log_base sceNpManager;

View file

@ -382,13 +382,13 @@ struct SceNpMatching2InvitationData
le_t<u32> optDataLen; le_t<u32> optDataLen;
}; };
using SceNpMatching2RequestCallback = func_def<void(u16 ctxId, u32 reqId, u16 event, s32 errorCode, vm::cptr<void> data, vm::ptr<void> arg)>; using SceNpMatching2RequestCallback = void(u16 ctxId, u32 reqId, u16 event, s32 errorCode, vm::cptr<void> data, vm::ptr<void> arg);
using SceNpMatching2LobbyEventCallback = func_def<void(u16 ctxId, u64 lobbyId, u16 event, s32 errorCode, vm::cptr<void> data, vm::ptr<void> arg)>; using SceNpMatching2LobbyEventCallback = void(u16 ctxId, u64 lobbyId, u16 event, s32 errorCode, vm::cptr<void> data, vm::ptr<void> arg);
using SceNpMatching2RoomEventCallback = func_def<void(u16 ctxId, u64 roomId, u16 event, s32 errorCode, vm::cptr<void> data, vm::ptr<void> arg)>; using SceNpMatching2RoomEventCallback = void(u16 ctxId, u64 roomId, u16 event, s32 errorCode, vm::cptr<void> data, vm::ptr<void> arg);
using SceNpMatching2LobbyMessageCallback = func_def<void(u16 ctxId, u64 lobbyId, u16 srcMemberId, u16 event, s32 errorCode, vm::cptr<void> data, vm::ptr<void> arg)>; using SceNpMatching2LobbyMessageCallback = void(u16 ctxId, u64 lobbyId, u16 srcMemberId, u16 event, s32 errorCode, vm::cptr<void> data, vm::ptr<void> arg);
using SceNpMatching2RoomMessageCallback = func_def<void(u16 ctxId, u64 roomId, u16 srcMemberId, u16 event, s32 errorCode, vm::cptr<void> data, vm::ptr<void> arg)>; using SceNpMatching2RoomMessageCallback = void(u16 ctxId, u64 roomId, u16 srcMemberId, u16 event, s32 errorCode, vm::cptr<void> data, vm::ptr<void> arg);
using SceNpMatching2SignalingCallback = func_def<void(u16 ctxId, u64 roomId, u16 peerMemberId, u16 event, s32 errorCode, vm::ptr<void> arg)>; using SceNpMatching2SignalingCallback = void(u16 ctxId, u64 roomId, u16 peerMemberId, u16 event, s32 errorCode, vm::ptr<void> arg);
using SceNpMatching2ContextCallback = func_def<void(u16 ctxId, u16 event, u8 eventCause, s32 errorCode, vm::ptr<void> arg)>; using SceNpMatching2ContextCallback = void(u16 ctxId, u16 event, u8 eventCause, s32 errorCode, vm::ptr<void> arg);
struct SceNpMatching2RequestOptParam struct SceNpMatching2RequestOptParam
{ {

View file

@ -9,6 +9,6 @@ struct ScePhotoExportParam
char reserved[32]; char reserved[32];
}; };
using ScePhotoExportCancelFunc = func_def<s32(vm::ptr<void>)>; using ScePhotoExportCancelFunc = s32(vm::ptr<void>);
extern psv_log_base scePhotoExport; extern psv_log_base scePhotoExport;

View file

@ -1,6 +1,6 @@
#pragma once #pragma once
using SceSulphaCallback = func_def<void(vm::ptr<void> arg)>; using SceSulphaCallback = void(vm::ptr<void> arg);
struct SceSulphaConfig struct SceSulphaConfig
{ {

View file

@ -153,6 +153,6 @@ struct SceUltUlthread
CHECK_SIZE(SceUltUlthread, 256); CHECK_SIZE(SceUltUlthread, 256);
using SceUltUlthreadEntry = func_def<s32(u32 arg)>; using SceUltUlthreadEntry = s32(u32 arg);
extern psv_log_base sceUlt; extern psv_log_base sceUlt;

View file

@ -114,7 +114,7 @@ struct SceVoicePortParam
}; };
}; };
using SceVoiceEventCallback = func_def<void(vm::ptr<void> event)>; using SceVoiceEventCallback = void(vm::ptr<void> event);
struct SceVoiceInitParam struct SceVoiceInitParam
{ {

View file

@ -116,7 +116,7 @@ namespace vm
{ {
AT m_addr; AT m_addr;
using type = func_def<RT(T...)>; using type = RT(T...);
AT addr() const AT addr() const
{ {

View file

@ -368,7 +368,7 @@ enum CellAdecMsgType : s32
CELL_ADEC_MSG_TYPE_SEQDONE, CELL_ADEC_MSG_TYPE_SEQDONE,
}; };
using CellAdecCbMsg = func_def<s32(u32 handle, CellAdecMsgType msgType, s32 msgData, u32 cbArg)>; using CellAdecCbMsg = s32(u32 handle, CellAdecMsgType msgType, s32 msgData, u32 cbArg);
struct CellAdecCb struct CellAdecCb
{ {

View file

@ -219,7 +219,7 @@ struct CellDmuxResource2
be_t<u32> shit[4]; be_t<u32> shit[4];
}; };
using CellDmuxCbMsg = func_def<u32(u32 demuxerHandle, vm::ptr<CellDmuxMsg> demuxerMsg, u32 cbArg)>; using CellDmuxCbMsg = u32(u32 demuxerHandle, vm::ptr<CellDmuxMsg> demuxerMsg, u32 cbArg);
struct CellDmuxCb struct CellDmuxCb
{ {
@ -227,7 +227,7 @@ struct CellDmuxCb
be_t<u32> cbArg; be_t<u32> cbArg;
}; };
using CellDmuxCbEsMsg = func_def<u32(u32 demuxerHandle, u32 esHandle, vm::ptr<CellDmuxEsMsg> esMsg, u32 cbArg)>; using CellDmuxCbEsMsg = u32(u32 demuxerHandle, u32 esHandle, vm::ptr<CellDmuxEsMsg> esMsg, u32 cbArg);
struct CellDmuxEsCb struct CellDmuxEsCb
{ {

View file

@ -57,8 +57,8 @@ using CellGifDecMainHandle = vm::ptr<struct GifDecoder>;
using CellGifDecSubHandle = u32; // vm::ptr<struct GifStream>; using CellGifDecSubHandle = u32; // vm::ptr<struct GifStream>;
// Callbacks for memory management // Callbacks for memory management
using CellGifDecCbControlMalloc = func_def<vm::ptr<void>(u32 size, vm::ptr<void> cbCtrlMallocArg)>; using CellGifDecCbControlMalloc = vm::ptr<void>(u32 size, vm::ptr<void> cbCtrlMallocArg);
using CellGifDecCbControlFree = func_def<s32(vm::ptr<void> ptr, vm::ptr<void> cbCtrlFreeArg)>; using CellGifDecCbControlFree = s32(vm::ptr<void> ptr, vm::ptr<void> cbCtrlFreeArg);
// Structs // Structs
struct CellGifDecThreadInParam struct CellGifDecThreadInParam

View file

@ -88,8 +88,8 @@ using CellPngDecMainHandle = vm::ptr<struct PngDecoder>;
using CellPngDecSubHandle = vm::ptr<struct PngStream>; using CellPngDecSubHandle = vm::ptr<struct PngStream>;
// Callbacks for memory management // Callbacks for memory management
using CellPngDecCbControlMalloc = func_def<vm::ptr<void>(u32 size, vm::ptr<void> cbCtrlMallocArg)>; using CellPngDecCbControlMalloc = vm::ptr<void>(u32 size, vm::ptr<void> cbCtrlMallocArg);
using CellPngDecCbControlFree = func_def<s32(vm::ptr<void> ptr, vm::ptr<void> cbCtrlFreeArg)>; using CellPngDecCbControlFree = s32(vm::ptr<void> ptr, vm::ptr<void> cbCtrlFreeArg);
// Structs // Structs
struct CellPngDecThreadInParam struct CellPngDecThreadInParam
@ -251,8 +251,8 @@ struct CellPngDecExtOutParam
}; };
// Callbacks for decoding partial streams // Callbacks for decoding partial streams
using CellPngDecCbControlStream = func_def<s32(vm::ptr<CellPngDecStrmInfo> strmInfo, vm::ptr<CellPngDecStrmParam> strmParam, vm::ptr<void> cbCtrlStrmArg)>; using CellPngDecCbControlStream = s32(vm::ptr<CellPngDecStrmInfo> strmInfo, vm::ptr<CellPngDecStrmParam> strmParam, vm::ptr<void> cbCtrlStrmArg);
using CellPngDecCbControlDisp = func_def<s32(vm::ptr<CellPngDecDispInfo> dispInfo, vm::ptr<CellPngDecDispParam> dispParam, vm::ptr<void> cbCtrlDispArg)>; using CellPngDecCbControlDisp = s32(vm::ptr<CellPngDecDispInfo> dispInfo, vm::ptr<CellPngDecDispParam> dispParam, vm::ptr<void> cbCtrlDispArg);
struct CellPngDecCbCtrlStrm struct CellPngDecCbCtrlStrm
{ {

View file

@ -79,8 +79,8 @@ enum
typedef s32(CellRudpEventHandler)(s32 event_id, s32 soc, vm::cptr<u8> data, u32 datalen, vm::cptr<sys_net_sockaddr> addr, u32 addrlen, vm::ptr<u32> arg); typedef s32(CellRudpEventHandler)(s32 event_id, s32 soc, vm::cptr<u8> data, u32 datalen, vm::cptr<sys_net_sockaddr> addr, u32 addrlen, vm::ptr<u32> arg);
using CellRudpAllocatorFuncAlloc = func_def<vm::ptr<u32>(u32 size)>; using CellRudpAllocatorFuncAlloc = vm::ptr<u32>(u32 size);
using CellRudpAllocatorFuncFree = func_def<u32(vm::ptr<u32> ptr)>; using CellRudpAllocatorFuncFree = u32(vm::ptr<u32> ptr);
struct CellRudpAllocator struct CellRudpAllocator
{ {

View file

@ -165,7 +165,7 @@ enum CellSearchEvent : s32
CELL_SEARCH_EVENT_SCENESEARCH_RESULT, CELL_SEARCH_EVENT_SCENESEARCH_RESULT,
}; };
using CellSearchSystemCallback = func_def<void(CellSearchEvent event, s32 result, vm::cptr<u32> param, vm::ptr<u32> userData)>; using CellSearchSystemCallback = void(CellSearchEvent event, s32 result, vm::cptr<u32> param, vm::ptr<u32> userData);
struct CellSearchContentId struct CellSearchContentId
{ {

View file

@ -317,7 +317,7 @@ struct set_alignment(8) CellSpursAttribute
CHECK_SIZE_ALIGN(CellSpursAttribute, 512, 8); CHECK_SIZE_ALIGN(CellSpursAttribute, 512, 8);
using CellSpursShutdownCompletionEventHook = func_def<void(vm::ptr<CellSpurs> spurs, u32 wid, vm::ptr<void> arg)>; using CellSpursShutdownCompletionEventHook = void(vm::ptr<CellSpurs> spurs, u32 wid, vm::ptr<void> arg);
struct set_alignment(16) CellSpursTraceInfo struct set_alignment(16) CellSpursTraceInfo
{ {
@ -428,7 +428,7 @@ struct set_alignment(128) CellSpurs
struct EventPortMux; struct EventPortMux;
using EventHandlerCallback = func_def<void(vm::ptr<EventPortMux>, u64 data)>; using EventHandlerCallback = void(vm::ptr<EventPortMux>, u64 data);
struct EventHandlerListNode struct EventHandlerListNode
{ {
@ -588,7 +588,7 @@ struct CellSpursExceptionInfo
}; };
// Exception handler // Exception handler
using CellSpursGlobalExceptionEventHandler = func_def<void(vm::ptr<CellSpurs> spurs, vm::cptr<CellSpursExceptionInfo> info, u32 id, vm::ptr<void> arg)>; using CellSpursGlobalExceptionEventHandler = void(vm::ptr<CellSpurs> spurs, vm::cptr<CellSpursExceptionInfo> info, u32 id, vm::ptr<void> arg);
struct CellSpursWorkloadAttribute struct CellSpursWorkloadAttribute
{ {
@ -678,7 +678,7 @@ struct set_alignment(16) CellSpursTaskAttribute2
CHECK_SIZE_ALIGN(CellSpursTaskAttribute2, 256, 16); CHECK_SIZE_ALIGN(CellSpursTaskAttribute2, 256, 16);
// Exception handler // Exception handler
using CellSpursTasksetExceptionEventHandler = func_def<void(vm::ptr<CellSpurs> spurs, vm::ptr<CellSpursTaskset> taskset, u32 idTask, vm::cptr<CellSpursExceptionInfo> info, vm::ptr<void> arg)>; using CellSpursTasksetExceptionEventHandler = void(vm::ptr<CellSpurs> spurs, vm::ptr<CellSpursTaskset> taskset, u32 idTask, vm::cptr<CellSpursExceptionInfo> info, vm::ptr<void> arg);
struct set_alignment(128) CellSpursTaskExitCode struct set_alignment(128) CellSpursTaskExitCode
{ {

View file

@ -82,4 +82,4 @@ struct CellSubDisplayPeerInfo
CellSubDisplayNickname pspNickname; CellSubDisplayNickname pspNickname;
}; };
using CellSubDisplayHandler = func_def<void(s32 cbMsg, u64 cbParam, vm::ptr<void> userdata)>; using CellSubDisplayHandler = void(s32 cbMsg, u64 cbParam, vm::ptr<void> userdata);

View file

@ -80,7 +80,7 @@ enum
CELL_SYSUTIL_SYSCHAT_VOICE_STREAMING_PAUSED = 0x0164, CELL_SYSUTIL_SYSCHAT_VOICE_STREAMING_PAUSED = 0x0164,
}; };
using CellSysutilCallback = func_def<void(u64 status, u64 param, vm::ptr<void> userdata)>; using CellSysutilCallback = void(u64 status, u64 param, vm::ptr<void> userdata);
void sysutilSendSystemCommand(u64 status, u64 param); void sysutilSendSystemCommand(u64 status, u64 param);
@ -154,15 +154,15 @@ enum
CELL_SYSCACHE_ERROR_NOTMOUNTED = 0x8002bc04, // We don't really need to simulate the mounting, so this is probably useless CELL_SYSCACHE_ERROR_NOTMOUNTED = 0x8002bc04, // We don't really need to simulate the mounting, so this is probably useless
}; };
using CellWebBrowserCallback = func_def<void(s32 cb_type, vm::ptr<void> client_session, vm::ptr<void> usrdata)>; using CellWebBrowserCallback = void(s32 cb_type, vm::ptr<void> client_session, vm::ptr<void> usrdata);
using CellWebComponentCallback = func_def<void(s32 web_browser_id, s32 cb_type, vm::ptr<void> client_session, vm::ptr<void> usrdata)>; using CellWebComponentCallback = void(s32 web_browser_id, s32 cb_type, vm::ptr<void> client_session, vm::ptr<void> usrdata);
using CellWebBrowserSystemCallback = func_def<void(s32 cb_type, vm::ptr<void> usrdata)>; using CellWebBrowserSystemCallback = void(s32 cb_type, vm::ptr<void> usrdata);
using CellWebBrowserMIMETypeCallback = func_def<void(vm::cptr<char> mimetype, vm::cptr<char> url, vm::ptr<void> usrdata)>; using CellWebBrowserMIMETypeCallback = void(vm::cptr<char> mimetype, vm::cptr<char> url, vm::ptr<void> usrdata);
using CellWebBrowserErrorCallback = func_def<void(s32 err_type, vm::ptr<void> usrdata)>; using CellWebBrowserErrorCallback = void(s32 err_type, vm::ptr<void> usrdata);
using CellWebBrowserStatusCallback = func_def<void(s32 err_type, vm::ptr<void> usrdata)>; using CellWebBrowserStatusCallback = void(s32 err_type, vm::ptr<void> usrdata);
using CellWebBrowserNotify = func_def<void(vm::cptr<char> message, vm::ptr<void> usrdata)>; using CellWebBrowserNotify = void(vm::cptr<char> message, vm::ptr<void> usrdata);
using CellWebBrowserUsrdata = func_def<void(vm::ptr<void> usrdata)>; using CellWebBrowserUsrdata = void(vm::ptr<void> usrdata);
struct CellWebBrowserMimeSet struct CellWebBrowserMimeSet
{ {

View file

@ -171,7 +171,7 @@ struct CellVdecPicFormat2
be_t<u32> unk1; be_t<u32> unk1;
}; };
using CellVdecCbMsg = func_def<u32(u32 handle, CellVdecMsgType msgType, s32 msgData, u32 cbArg)>; using CellVdecCbMsg = u32(u32 handle, CellVdecMsgType msgType, s32 msgData, u32 cbArg);
// Callback Function Information // Callback Function Information
struct CellVdecCb struct CellVdecCb

View file

@ -217,7 +217,7 @@ enum
// SCE_NP_MATCHING2_NET_H_ERRNO_BASE = 0x800225XX, // SCE_NP_MATCHING2_NET_H_ERRNO_BASE = 0x800225XX,
}; };
using SceNpBasicEventHandler = func_def<s32(s32 event, s32 retCode, u32 reqId, vm::ptr<void> arg)>; using SceNpBasicEventHandler = s32(s32 event, s32 retCode, u32 reqId, vm::ptr<void> arg);
// NP Manager Utility statuses // NP Manager Utility statuses
enum enum

View file

@ -148,4 +148,4 @@ enum
SCE_NP_TROPHY_STATUS_CHANGES_DETECTED = 9, SCE_NP_TROPHY_STATUS_CHANGES_DETECTED = 9,
}; };
using SceNpTrophyStatusCallback = func_def<s32(u32 context, u32 status, s32 completed, s32 total, vm::ptr<void> arg)>; using SceNpTrophyStatusCallback = s32(u32 context, u32 status, s32 completed, s32 total, vm::ptr<void> arg);

View file

@ -252,7 +252,7 @@ struct sys_dbg_event_flag_information_t
be_t<u32> wait_all_threads_num; be_t<u32> wait_all_threads_num;
}; };
using dbg_exception_handler_t = func_def<void(u64 exception_type, u64 thread_id, u64 dar)>; using dbg_exception_handler_t = void(u64 exception_type, u64 thread_id, u64 dar);
enum : u64 enum : u64
{ {

View file

@ -119,26 +119,10 @@ struct explicit_bool_t
}; };
// return 32 bit sizeof() to avoid widening/narrowing conversions with size_t // return 32 bit sizeof() to avoid widening/narrowing conversions with size_t
#define sizeof32(type) static_cast<u32>(sizeof32_t<sizeof(type)>::value) #define sizeof32(type) static_cast<u32>(sizeof(type))
// return 32 bit alignof() to avoid widening/narrowing conversions with size_t // return 32 bit alignof() to avoid widening/narrowing conversions with size_t
#define alignof32(type) static_cast<u32>(alignof32_t<__alignof(type)>::value) #define alignof32(type) static_cast<u32>(__alignof(type))
template<std::size_t Size> struct sizeof32_t
{
static_assert(Size <= UINT32_MAX, "sizeof32() error: size is too big");
enum : u32 { value = static_cast<u32>(Size) };
};
template<std::size_t Align> struct alignof32_t
{
static_assert(Align <= UINT32_MAX, "alignof32() error: alignment is too big");
enum : u32 { value = static_cast<u32>(Align) };
};
template<typename T> using func_def = T; // workaround for MSVC bug: `using X = func_def<void()>;` instead of `using X = void();`
template<typename T> struct ID_type; template<typename T> struct ID_type;