@@ -67,20 +67,50 @@ class RecorderClass : public SubsystemInterface
6767 class CRCInfo
6868 {
6969 public:
70+ struct MismatchData
71+ {
72+ MismatchData () :
73+ mismatched (false ),
74+ playerIndex (0 ),
75+ queueSize (0 ),
76+ playbackCRC (0 ),
77+ playerCRC (0 )
78+ {}
79+
80+ MismatchData (Byte playerIndex, UnsignedShort queueSize, UnsignedInt playbackCRC, UnsignedInt playerCRC) :
81+ mismatched (true ),
82+ playerIndex (playerIndex),
83+ queueSize (queueSize),
84+ playbackCRC (playbackCRC),
85+ playerCRC (playerCRC)
86+ {}
87+
88+ Bool mismatched;
89+ Byte playerIndex;
90+ UnsignedShort queueSize;
91+ UnsignedInt playbackCRC;
92+ UnsignedInt playerCRC;
93+ };
94+
7095 CRCInfo ();
71- CRCInfo (UnsignedInt localPlayer, Bool isMultiplayer );
72- void addCRC (UnsignedInt val);
73- UnsignedInt readCRC ( );
74- int GetQueueSize () const { return m_data. size (); }
75- UnsignedInt getLocalPlayer () const { return m_localPlayer; }
76- void setSawCRCMismatch () { m_sawCRCMismatch = TRUE ; }
77- Bool sawCRCMismatch () const { return m_sawCRCMismatch; }
96+ void init (Bool isMultiplayer, Int localPlayerIndex );
97+ void addPlaybackCRC (UnsignedInt val);
98+ void addPlayerCRC (Int playerIndex, UnsignedInt val );
99+ void setSawCRCMismatch ();
100+ Bool sawCRCMismatch () const ;
101+ Byte getLocalPlayerIndex () const ;
102+ MismatchData getMismatchData ();
78103
79104 protected:
80- Bool m_sawCRCMismatch;
105+ UnsignedInt getLargestQueueSize () const ;
106+ UnsignedInt getPlaybackCRC ();
107+
81108 Bool m_skippedOne;
82- UnsignedInt m_localPlayer;
83- std::list<UnsignedInt> m_data;
109+ Bool m_sawCRCMismatch;
110+ Byte m_localPlayerIndex;
111+ std::list<UnsignedInt> m_playbackData;
112+ std::vector<UnsignedInt> m_playerData[MAX_PLAYER_COUNT ];
113+ Bool m_inactivePlayer[MAX_PLAYER_COUNT ];
84114 };
85115
86116public:
@@ -110,8 +140,9 @@ class RecorderClass : public SubsystemInterface
110140#endif
111141 Bool isPlaybackInProgress () const ;
112142
113- public:
114- void handleCRCMessage (UnsignedInt newCRC, Int playerIndex, Bool fromPlayback);
143+ void handlePlaybackCRCMessage (UnsignedInt newCRC);
144+ void handlePlayerCRCMessage (Int playerIndex, UnsignedInt newCRC);
145+ void checkForMismatch ();
115146
116147 // read in info relating to a replay, conditionally setting up m_file for playback
117148 struct ReplayHeader
0 commit comments