home *** CD-ROM | disk | FTP | other *** search
/ Windows Game Programming for Dummies (2nd Edition) / WinGamProgFD.iso / pc / DirectX SDK / DXSDK / samples / Multimedia / DirectPlay / Maze / MazeCommon / ThingID.h < prev    next >
Encoding:
C/C++ Source or Header  |  2001-10-31  |  1.2 KB  |  34 lines

  1. //----------------------------------------------------------------------------
  2. // File: 
  3. //
  4. // Desc: 
  5. //
  6. // Copyright (c) 1999-2001 Microsoft Corp. All rights reserved.
  7. //-----------------------------------------------------------------------------
  8. #ifndef _CLIENT_ID_H
  9. #define _CLIENT_ID_H
  10.  
  11.  
  12.  
  13.  
  14. //-----------------------------------------------------------------------------
  15. // Name: 
  16. // Desc: Client IDs are 32-bit values that refer to a particular Client. They are 
  17. //       broken up into two bitfields, one of which can be used into an index 
  18. //       of a list of Client 'slots', the other bitfield is a "uniqueness" value 
  19. //       that is incremented each time a new Client is created. Hence, although
  20. //       the same slot may be reused by different Clients are different times, 
  21. //       it's possible to distinguish between the two by comparing uniqueness 
  22. //       values (you can just compare the whole 32-bit id).
  23. //-----------------------------------------------------------------------------
  24. typedef DWORD   CLClientID;
  25.  
  26. #define CLIENT_SLOT_BITS 13
  27. #define MAX_CLIENTS      (1<<CLIENT_SLOT_BITS)
  28. #define CLIENT_SLOT_MASK (MAX_CLIENTS-1)
  29.  
  30.  
  31.  
  32.  
  33. #endif
  34.