Browse Source

Define SEVTHANDLER

pull/109/head
Anders Jenbo 7 years ago
parent
commit
790197cae5
  1. 4
      3rdParty/Storm/Source/storm.cpp
  2. 12
      3rdParty/Storm/Source/storm.h
  3. 5
      Source/multi.cpp
  4. 2
      Source/multi.h
  5. 9
      structs.h

4
3rdParty/Storm/Source/storm.cpp vendored

@ -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;

12
3rdParty/Storm/Source/storm.h vendored

@ -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 *);

5
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;

2
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];

9
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

Loading…
Cancel
Save