Clean up NetworkSyncManager

This commit is contained in:
Steve Checkoway
2004-03-17 06:05:52 +00:00
parent 09e6b85f3b
commit 858ab01ae9
4 changed files with 48 additions and 53 deletions
+14 -18
View File
@@ -13,15 +13,12 @@
-----------------------------------------------------------------------------
*/
#include "ezsockets.h"
static int useSMserver; //Using network or not?
static EzSockets NetPlayerClient; //Socket used for network traffic
class EzSockets;
class NetworkSyncManager
{
public:
NetworkSyncManager();
NetworkSyncManager(int argc, char **argv);
~NetworkSyncManager();
void ReportScore(int playerID, int step, int score, int combo);
@@ -38,22 +35,21 @@ public:
int m_step;
int m_score;
int m_combo;
bool useSMserver;
EzSockets *NetPlayerClient;
private:
struct netHolder //Data structure used for sending data to server
{
int m_playerID; //PID (also used for Commands)
int m_step; //SID (StepID, 0-6 for Miss to Marv, 7,8 for boo and ok)
int m_score; //Player's Score
int m_combo; //Player's Current Combo
};
};
class netHolder //Data structure used for sending data to server
{
public:
int m_playerID; //PID (also used for Commands)
int m_step; //SID (StepID, 0-6 for Miss to Marv, 7,8 for boo and ok)
int m_score; //Player's Score
int m_combo; //Player's Current Combo
};
//Static this class inside itself
//so that other parts of the program that include
//NetworkSyncManager can use "currentNetPlayer"
static NetworkSyncManager currentNetPlayer;
extern NetworkSyncManager *NSMAN;
#endif