messagesall.h 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. /*-------------------------------------------------------------------------
  2. * \src\Lobby\MessagesAll.h
  3. *
  4. * Messages that pass over more than one session
  5. *
  6. * Owner:
  7. *
  8. * Copyright 1986-2000 Microsoft Corporation, All Rights Reserved
  9. *-----------------------------------------------------------------------*/
  10. #ifndef _MESSAGES_ALL_
  11. #define _MESSAGES_ALL_
  12. #include "MessageCore.h"
  13. /*
  14. *************************************************
  15. MESSAGES START HERE
  16. Messages range for this file is 301 - 320
  17. *************************************************
  18. */
  19. DEFINE_FEDMSG(LS, LOBBYMISSIONINFO, 301)
  20. FM_VAR_ITEM(szGameName);
  21. FM_VAR_ITEM(rgSquadIDs);
  22. FM_VAR_ITEM(szGameDetailsFiles);
  23. DWORD dwCookie; // how the mission is identified on the lobby
  24. unsigned dwStartTime;
  25. short nMinRank;
  26. short nMaxRank;
  27. unsigned nNumPlayers : 11;
  28. unsigned nMaxPlayersPerGame : 11;
  29. unsigned nMinPlayersPerTeam : 8;
  30. unsigned nMaxPlayersPerTeam : 8;
  31. unsigned nTeams : 3;
  32. bool fCountdownStarted : 1;
  33. bool fInProgress : 1;
  34. bool fMSArena : 1;
  35. bool fScoresCount : 1;
  36. bool fInvulnerableStations : 1;
  37. bool fAllowDevelopments : 1;
  38. bool fLimitedLives : 1;
  39. bool fConquest : 1;
  40. bool fDeathMatch : 1;
  41. bool fCountdown : 1;
  42. bool fProsperity : 1;
  43. bool fArtifacts : 1;
  44. bool fFlags : 1;
  45. bool fTerritorial : 1;
  46. bool fGuaranteedSlotsAvailable : 1;
  47. bool fAnySlotsAvailable : 1;
  48. bool fSquadGame : 1;
  49. bool fEjectPods : 1;
  50. END_FEDMSG
  51. DEFINE_FEDMSG(LS, MISSION_GONE, 302)
  52. DWORD dwCookie;
  53. END_FEDMSG
  54. #ifndef SquadID
  55. typedef int SquadID;
  56. #endif
  57. class SquadMembership
  58. {
  59. public:
  60. SquadID m_squadID;
  61. char m_szSquadName[c_cbName];
  62. bool m_fIsLeader : 1;
  63. bool m_fIsAssistantLeader : 1;
  64. SquadMembership() {} // creator beware--uninitialized values (but this is intentional for performance in allocating arrays that will be filled in)
  65. SquadMembership(SquadID squadID, const char *szSquadName, bool fIsLeader, bool fIsAssistantLeader) :
  66. m_squadID(squadID),
  67. m_fIsLeader(fIsLeader),
  68. m_fIsAssistantLeader(fIsAssistantLeader)
  69. {
  70. assert(!(m_fIsLeader && m_fIsAssistantLeader));
  71. assert(strlen(szSquadName) < c_cbName);
  72. Strcpy(m_szSquadName, szSquadName);
  73. };
  74. const SquadID GetID() const { return m_squadID; };
  75. const char* GetName() const { return m_szSquadName; };
  76. bool GetIsLeader() const { return m_fIsLeader; };
  77. bool GetIsAssistantLeader() const { return m_fIsAssistantLeader; };
  78. };
  79. typedef Slist_utl<SquadMembership*> SquadMembershipList;
  80. typedef Slink_utl<SquadMembership*> SquadMembershipLink;
  81. DEFINE_FEDMSG(LS, SQUAD_MEMBERSHIPS, 303)
  82. FM_VAR_ITEM(squadMemberships); // an array of SquadMembership structures
  83. int cSquadMemberships;
  84. END_FEDMSG
  85. #endif // _MESSAGES_LS_