home *** CD-ROM | disk | FTP | other *** search
/ NEXT Generation 27 / NEXT27.iso / pc / demos / emperor / dx3.exe / SDK / SAMPLES / IKLOWNS / CGREMOTE.H < prev    next >
C/C++ Source or Header  |  1996-08-28  |  2KB  |  89 lines

  1. /*===========================================================================*\
  2. |
  3. |  File:        cgremote.h
  4. |
  5. |  Description: 
  6. |       
  7. |-----------------------------------------------------------------------------
  8. |
  9. |  Copyright (C) 1995-1996 Microsoft Corporation.  All Rights Reserved.
  10. |
  11. |  Written by Moss Bay Engineering, Inc. under contract to Microsoft Corporation
  12. |
  13. \*===========================================================================*/
  14. /**************************************************************************
  15.  
  16.     (C) Copyright 1995-1996 Microsoft Corp.  All rights reserved.
  17.  
  18.     You have a royalty-free right to use, modify, reproduce and 
  19.     distribute the Sample Files (and/or any modified version) in 
  20.     any way you find useful, provided that you agree that 
  21.     Microsoft has no warranty obligations or liability for any 
  22.     Sample Application Files which are modified. 
  23.  
  24.     we do not recomend you base your game on IKlowns, start with one of
  25.     the other simpler sample apps in the GDK
  26.  
  27.  **************************************************************************/
  28.  
  29. #ifndef _CGREMOTE_H
  30. #define _CGREMOTE_H
  31. #include "linklist.h"
  32. #include "dplay.h"
  33.  
  34. #define MAX_OBJ_NAME    9
  35.  
  36. typedef int ACTION;
  37. typedef char OBJ_ID[MAX_OBJ_NAME];
  38.  
  39. typedef struct 
  40. {
  41.         BYTE    InstanceID;
  42.         BYTE    OwnerID;
  43.     OBJ_ID  ObjectID;
  44. } REMOTE_OBJECT;
  45.  
  46. #include "cgremque.h"
  47.  
  48. #define CREATE_OBJECT   0x81
  49. #define DESTROY_OBJECT  0x82
  50.  
  51. REMOTE_OBJECT *CreateRemotePeers(
  52.     char    *name, 
  53.     DWORD   InstanceID
  54. );
  55.  
  56. inline ACTION PollRemoteAction(
  57.     REMOTE_OBJECT *pObj,
  58.     void *&Data,
  59.     DWORD &nDataSize
  60. )
  61. {
  62.     return(GetNextRemoteAction(GetRemoteObjectQueue(pObj), Data, nDataSize));
  63. }
  64.  
  65. BOOL SendRemoteAction(
  66.     REMOTE_OBJECT *pObj,
  67.     ACTION Action, 
  68.     void *Data,
  69.     DWORD nDataSize
  70. );
  71.  
  72. void ReleaseRemoteData(void *);
  73.  
  74. BOOL DestroyRemotePeer(
  75.     REMOTE_OBJECT *pObj
  76. );
  77.  
  78. BOOL RemoteCreateLobby(void);
  79. BOOL RemoteConnect(REFGUID pGuid, LPSTR FullName, LPSTR NickName);
  80. BOOL RemoteCreate(REFGUID pGuid, LPSTR FullName, LPSTR NickName);
  81.  
  82. class CGameInput;
  83.  
  84.  
  85. void SetCurrentLevel(void   *);
  86.  
  87. #endif
  88.  
  89.