diff --git a/3rdParty/Storm/Source/storm.h b/3rdParty/Storm/Source/storm.h index b7da79bb1..f3330c871 100644 --- a/3rdParty/Storm/Source/storm.h +++ b/3rdParty/Storm/Source/storm.h @@ -342,8 +342,8 @@ void BOOL SFileSetBasePath(const char *); BOOL SVidPlayContinue(void); BOOL SNetGetOwnerTurnsWaiting(DWORD *); -BOOL SNetUnregisterEventHandler(int, SEVTHANDLER); -BOOL SNetRegisterEventHandler(int, SEVTHANDLER); +bool SNetUnregisterEventHandler(event_type, SEVTHANDLER); +bool SNetRegisterEventHandler(event_type, SEVTHANDLER); BOOLEAN SNetSetBasePlayer(int); int SNetInitializeProvider(unsigned long, struct _SNETPROGRAMDATA *, struct _SNETPLAYERDATA *, struct _SNETUIDATA *, struct _SNETVERSIONDATA *); int SNetGetProviderCaps(struct _SNETCAPS *); diff --git a/Source/multi.cpp b/Source/multi.cpp index 6ee2e8b38..ed606a840 100644 --- a/Source/multi.cpp +++ b/Source/multi.cpp @@ -43,7 +43,7 @@ int player_state[MAX_PLRS]; * Contains the set of supported event types supported by the multiplayer * event handler. */ -const int event_types[3] = { +const event_type event_types[3] = { EVENT_TYPE_PLAYER_LEAVE_GAME, EVENT_TYPE_PLAYER_CREATE_GAME, EVENT_TYPE_PLAYER_MESSAGE @@ -696,8 +696,7 @@ static void multi_handle_events(_SNETEVENT *pEvt) static void multi_event_handler(BOOL add) { DWORD i; - BOOL(STORMAPI * fn) - (int, SEVTHANDLER); + bool (*fn)(event_type, SEVTHANDLER); if (add) fn = SNetRegisterEventHandler; diff --git a/SourceX/storm/storm_net.cpp b/SourceX/storm/storm_net.cpp index 317b328a2..b6f896346 100644 --- a/SourceX/storm/storm_net.cpp +++ b/SourceX/storm/storm_net.cpp @@ -48,14 +48,14 @@ int SNetGetProviderCaps(struct _SNETCAPS *caps) return dvlnet_inst->SNetGetProviderCaps(caps); } -BOOL SNetUnregisterEventHandler(int evtype, SEVTHANDLER func) +bool SNetUnregisterEventHandler(event_type evtype, SEVTHANDLER func) { - return dvlnet_inst->SNetUnregisterEventHandler(*(event_type *)&evtype, func); + return dvlnet_inst->SNetUnregisterEventHandler(evtype, func); } -BOOL SNetRegisterEventHandler(int evtype, SEVTHANDLER func) +bool SNetRegisterEventHandler(event_type evtype, SEVTHANDLER func) { - return dvlnet_inst->SNetRegisterEventHandler(*(event_type *)&evtype, func); + return dvlnet_inst->SNetRegisterEventHandler(evtype, func); } BOOL SNetDestroy()