diff --git a/3rdParty/Storm/Source/storm.cpp b/3rdParty/Storm/Source/storm.cpp index 180521443..da7688b08 100644 --- a/3rdParty/Storm/Source/storm.cpp +++ b/3rdParty/Storm/Source/storm.cpp @@ -231,8 +231,8 @@ BOOLEAN __stdcall SFileSetBasePath(char *) rBool; void __cdecl SDrawRealizePalette(void) rVoid; BOOL __cdecl SVidPlayContinue(void) rBool; BOOL __stdcall SNetGetOwnerTurnsWaiting(DWORD *) rBool; -BOOL __stdcall SNetUnregisterEventHandler(int,void (__stdcall*)(struct _SNETEVENT *)) rPVoid; -BOOL __stdcall SNetRegisterEventHandler(int,void (__stdcall*)(struct _SNETEVENT *)) rPVoid; +BOOL __stdcall SNetUnregisterEventHandler(int,SEVTHANDLER) rPVoid; +BOOL __stdcall SNetRegisterEventHandler(int,SEVTHANDLER) rPVoid; BOOLEAN __stdcall SNetSetBasePlayer(int) rBool; int __stdcall SNetInitializeProvider(unsigned long,struct _SNETPROGRAMDATA *,struct _SNETPLAYERDATA *,struct _SNETUIDATA *,struct _SNETVERSIONDATA *) rInt; int __stdcall SNetGetProviderCaps(struct _SNETCAPS *) rInt; diff --git a/3rdParty/Storm/Source/storm.h b/3rdParty/Storm/Source/storm.h index adb798f82..c66f36752 100644 --- a/3rdParty/Storm/Source/storm.h +++ b/3rdParty/Storm/Source/storm.h @@ -372,6 +372,14 @@ typedef struct _s_evt DWORD dwSize; } S_EVT, *PS_EVT; +typedef struct _SNETEVENT { + int eventid; + int playerid; + void *data; + int databytes; +} _SNETEVENT; + +typedef void (STORMAPI *SEVTHANDLER)(struct _SNETEVENT *); // @TODO: "type" is unknown. //HANDLE STORMAPI SNetRegisterEventHandler(int type, void (STORMAPI *sEvent)(PS_EVT)); @@ -1316,8 +1324,8 @@ BOOLEAN __stdcall SFileSetBasePath(char *); void __cdecl SDrawRealizePalette(void); BOOL __cdecl SVidPlayContinue(void); BOOL __stdcall SNetGetOwnerTurnsWaiting(DWORD *); -BOOL __stdcall SNetUnregisterEventHandler(int,void (__stdcall*)(struct _SNETEVENT *)); -BOOL __stdcall SNetRegisterEventHandler(int,void (__stdcall*)(struct _SNETEVENT *)); +BOOL __stdcall SNetUnregisterEventHandler(int,SEVTHANDLER); +BOOL __stdcall SNetRegisterEventHandler(int,SEVTHANDLER); BOOLEAN __stdcall SNetSetBasePlayer(int); int __stdcall SNetInitializeProvider(unsigned long,struct _SNETPROGRAMDATA *,struct _SNETPLAYERDATA *,struct _SNETUIDATA *,struct _SNETVERSIONDATA *); int __stdcall SNetGetProviderCaps(struct _SNETCAPS *); diff --git a/Source/multi.cpp b/Source/multi.cpp index 3da4db9c8..6e1eb5cf1 100644 --- a/Source/multi.cpp +++ b/Source/multi.cpp @@ -1,5 +1,4 @@ #include "diablo.h" -#include "../3rdParty/Storm/Source/storm.h" #include "../DiabloUI/diabloui.h" BOOLEAN gbSomebodyWonGameKludge; // weak @@ -619,8 +618,8 @@ void NetClose() void multi_event_handler(BOOL add) { DWORD i; - BOOL(__stdcall * fn) - (int, void(__stdcall *)(_SNETEVENT *)); + BOOL(STORMAPI * fn) + (int, SEVTHANDLER); if (add) fn = SNetRegisterEventHandler; diff --git a/Source/multi.h b/Source/multi.h index 26330aa5f..142ae8268 100644 --- a/Source/multi.h +++ b/Source/multi.h @@ -2,6 +2,8 @@ #ifndef __MULTI_H__ #define __MULTI_H__ +#include "../3rdParty/Storm/Source/storm.h" + extern BOOLEAN gbSomebodyWonGameKludge; // weak extern char szPlayerDescript[128]; extern WORD sgwPackPlrOffsetTbl[MAX_PLRS]; diff --git a/structs.h b/structs.h index 625474f2f..09299c300 100644 --- a/structs.h +++ b/structs.h @@ -1247,8 +1247,6 @@ typedef struct _uiheroinfo { // storm ////////////////////////////////////////////////// -// TPDEF PTR FCN VOID SEVTHANDLER - // TPDEF PTR FCN UCHAR SMSGIDLEPROC // TPDEF PTR FCN VOID SMSGHANDLER @@ -1264,13 +1262,6 @@ typedef struct _SNETCAPS { int defaultturnsintransit; } _SNETCAPS; -typedef struct _SNETEVENT { - int eventid; - int playerid; - void *data; - int databytes; -} _SNETEVENT; - // TPDEF PTR FCN UCHAR SNETABORTPROC // TPDEF PTR FCN UCHAR SNETCATEGORYPROC // TPDEF PTR FCN UCHAR SNETCHECKAUTHPROC