home *** CD-ROM | disk | FTP | other *** search
/ GameStar 2006 March / Gamestar_82_2006-03_dvd.iso / DVDStar / Editace / quake4_sdkv10.exe / source / game / Instance.h < prev    next >
C/C++ Source or Header  |  2005-11-14  |  1KB  |  47 lines

  1. //----------------------------------------------------------------
  2. // Instance.h
  3. //
  4. // Copyright 2002-2005 Raven Software
  5. //----------------------------------------------------------------
  6.  
  7. #ifndef __INSTANCE_H__
  8. #define __INSTANCE_H__
  9.  
  10. #include "Game_local.h"
  11.  
  12. class rvInstance {
  13. public:
  14.     rvInstance( int id, bool deferPopulate = false );
  15.     ~rvInstance();
  16.  
  17.     void Populate( void );
  18.     void PopulateFromMessage( const idBitMsg& msg );
  19.     void Restart( void );
  20.     
  21.     void JoinInstance( idPlayer* player );
  22.     int GetInstanceID( void );
  23.     
  24.     void SetSpawnInstanceID( int newInstance );
  25.  
  26.     void PrintMapNumbers( void );
  27.     int    GetNumMapEntities( void ) { return numMapEntities; }
  28.     unsigned short GetMapEntityNumber( int i ) { return mapEntityNumbers[ i ]; }
  29. private:
  30.     void BuildInstanceMessage( void );
  31.  
  32.     int                        instanceID;
  33.     int                        spawnInstanceID;
  34.     unsigned short*            mapEntityNumbers;
  35.     int                        numMapEntities;
  36.     int                        initialSpawnCount;
  37.     
  38.     idBitMsg                mapEntityMsg;
  39.     byte                    mapEntityMsgBuf[ MAX_GAME_MESSAGE_SIZE ];
  40. };
  41.  
  42. ID_INLINE int rvInstance::GetInstanceID( void ) {
  43.     return instanceID;
  44. }
  45.  
  46. #endif
  47.