Starshatter_Open
Open source Starshatter engine
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
NetGame Class Reference

#include <NetGame.h>

Inheritance diagram for NetGame:
NetGameClient NetGameServer

List of all members.

Public Types

enum  { SHIP, SHOT }

Public Member Functions

 NetGame ()
virtual ~NetGame ()
virtual bool IsClient () const
virtual bool IsServer () const
virtual bool IsActive () const
virtual DWORD GetNetID () const
virtual DWORD GetObjID () const
virtual void ExecFrame ()
virtual void Recv ()
virtual void Send ()
virtual void SendData (NetData *data)
virtual NetPlayerFindPlayerByName (const char *name)
virtual NetPlayerFindPlayerByNetID (DWORD netid)
virtual NetPlayerFindPlayerByObjID (DWORD objid)
virtual ShipFindShipByObjID (DWORD objid)
virtual ShotFindShotByObjID (DWORD objid)
virtual NetPeerGetPeer (NetPlayer *player)
virtual void Respawn (DWORD objid, Ship *spawn)

Static Public Member Functions

static const char * TYPENAME ()
static NetGameCreate ()
static NetGameGetInstance ()
static bool IsNetGame ()
static bool IsNetGameClient ()
static bool IsNetGameServer ()
static int NumPlayers ()
static DWORD GetNextObjID (int type=SHIP)

Protected Member Functions

virtual void DoJoinRequest (NetMsg *msg)
virtual void DoJoinAnnounce (NetMsg *msg)
virtual void DoQuitRequest (NetMsg *msg)
virtual void DoQuitAnnounce (NetMsg *msg)
virtual void DoGameOver (NetMsg *msg)
virtual void DoDisconnect (NetMsg *msg)
virtual void DoObjLoc (NetMsg *msg)
virtual void DoObjDamage (NetMsg *msg)
virtual void DoObjKill (NetMsg *msg)
virtual void DoObjSpawn (NetMsg *msg)
virtual void DoObjHyper (NetMsg *msg)
virtual void DoObjTarget (NetMsg *msg)
virtual void DoObjEmcon (NetMsg *msg)
virtual void DoSysDamage (NetMsg *msg)
virtual void DoSysStatus (NetMsg *msg)
virtual void DoElemCreate (NetMsg *msg)
virtual void DoElemRequest (NetMsg *msg)
virtual void DoShipLaunch (NetMsg *msg)
virtual void DoNavData (NetMsg *msg)
virtual void DoNavDelete (NetMsg *msg)
virtual void DoWepTrigger (NetMsg *msg)
virtual void DoWepRelease (NetMsg *msg)
virtual void DoWepDestroy (NetMsg *msg)
virtual void DoCommMsg (NetMsg *msg)
virtual void DoChatMsg (NetMsg *msg)
virtual void DoSelfDestruct (NetMsg *msg)

Protected Attributes

List< NetPlayerplayers
NetLinklink
DWORD objid
DWORD netid
Shiplocal_player
Text player_name
Text player_pass
Shiptarget
Simsim
bool active
DWORD last_send_time

Detailed Description

Definition at line 35 of file NetGame.h.


Member Enumeration Documentation

anonymous enum
Enumerator:
SHIP 
SHOT 

Definition at line 40 of file NetGame.h.


Constructor & Destructor Documentation

NetGame::NetGame ( )

Definition at line 55 of file NetGame.cpp.

NetGame::~NetGame ( )
virtual

Definition at line 76 of file NetGame.cpp.


Member Function Documentation

NetGame * NetGame::Create ( )
static

Definition at line 106 of file NetGame.cpp.

virtual void NetGame::DoChatMsg ( NetMsg msg)
inlineprotectedvirtual

Reimplemented in NetGameServer, and NetGameClient.

Definition at line 106 of file NetGame.h.

virtual void NetGame::DoCommMsg ( NetMsg msg)
inlineprotectedvirtual

Reimplemented in NetGameServer, and NetGameClient.

Definition at line 105 of file NetGame.h.

virtual void NetGame::DoDisconnect ( NetMsg msg)
inlineprotectedvirtual

Reimplemented in NetGameServer, and NetGameClient.

Definition at line 83 of file NetGame.h.

virtual void NetGame::DoElemCreate ( NetMsg msg)
inlineprotectedvirtual

Reimplemented in NetGameServer, and NetGameClient.

Definition at line 95 of file NetGame.h.

virtual void NetGame::DoElemRequest ( NetMsg msg)
inlineprotectedvirtual

Reimplemented in NetGameServer.

Definition at line 96 of file NetGame.h.

virtual void NetGame::DoGameOver ( NetMsg msg)
inlineprotectedvirtual

Reimplemented in NetGameServer, and NetGameClient.

Definition at line 82 of file NetGame.h.

virtual void NetGame::DoJoinAnnounce ( NetMsg msg)
inlineprotectedvirtual

Reimplemented in NetGameServer, and NetGameClient.

Definition at line 79 of file NetGame.h.

virtual void NetGame::DoJoinRequest ( NetMsg msg)
inlineprotectedvirtual

Reimplemented in NetGameServer, and NetGameClient.

Definition at line 78 of file NetGame.h.

virtual void NetGame::DoNavData ( NetMsg msg)
inlineprotectedvirtual

Reimplemented in NetGameServer, and NetGameClient.

Definition at line 98 of file NetGame.h.

virtual void NetGame::DoNavDelete ( NetMsg msg)
inlineprotectedvirtual

Reimplemented in NetGameServer, and NetGameClient.

Definition at line 99 of file NetGame.h.

virtual void NetGame::DoObjDamage ( NetMsg msg)
inlineprotectedvirtual

Reimplemented in NetGameServer, and NetGameClient.

Definition at line 86 of file NetGame.h.

virtual void NetGame::DoObjEmcon ( NetMsg msg)
inlineprotectedvirtual

Reimplemented in NetGameServer, and NetGameClient.

Definition at line 91 of file NetGame.h.

virtual void NetGame::DoObjHyper ( NetMsg msg)
inlineprotectedvirtual

Reimplemented in NetGameServer, and NetGameClient.

Definition at line 89 of file NetGame.h.

virtual void NetGame::DoObjKill ( NetMsg msg)
inlineprotectedvirtual

Reimplemented in NetGameServer, and NetGameClient.

Definition at line 87 of file NetGame.h.

virtual void NetGame::DoObjLoc ( NetMsg msg)
inlineprotectedvirtual

Reimplemented in NetGameServer, and NetGameClient.

Definition at line 85 of file NetGame.h.

virtual void NetGame::DoObjSpawn ( NetMsg msg)
inlineprotectedvirtual

Reimplemented in NetGameServer, and NetGameClient.

Definition at line 88 of file NetGame.h.

virtual void NetGame::DoObjTarget ( NetMsg msg)
inlineprotectedvirtual

Reimplemented in NetGameServer, and NetGameClient.

Definition at line 90 of file NetGame.h.

virtual void NetGame::DoQuitAnnounce ( NetMsg msg)
inlineprotectedvirtual

Reimplemented in NetGameServer, and NetGameClient.

Definition at line 81 of file NetGame.h.

virtual void NetGame::DoQuitRequest ( NetMsg msg)
inlineprotectedvirtual

Reimplemented in NetGameServer, and NetGameClient.

Definition at line 80 of file NetGame.h.

virtual void NetGame::DoSelfDestruct ( NetMsg msg)
inlineprotectedvirtual

Reimplemented in NetGameServer, and NetGameClient.

Definition at line 107 of file NetGame.h.

virtual void NetGame::DoShipLaunch ( NetMsg msg)
inlineprotectedvirtual

Reimplemented in NetGameServer, and NetGameClient.

Definition at line 97 of file NetGame.h.

virtual void NetGame::DoSysDamage ( NetMsg msg)
inlineprotectedvirtual

Reimplemented in NetGameServer, and NetGameClient.

Definition at line 92 of file NetGame.h.

virtual void NetGame::DoSysStatus ( NetMsg msg)
inlineprotectedvirtual

Reimplemented in NetGameServer, and NetGameClient.

Definition at line 93 of file NetGame.h.

virtual void NetGame::DoWepDestroy ( NetMsg msg)
inlineprotectedvirtual

Reimplemented in NetGameServer, and NetGameClient.

Definition at line 103 of file NetGame.h.

virtual void NetGame::DoWepRelease ( NetMsg msg)
inlineprotectedvirtual

Reimplemented in NetGameServer, and NetGameClient.

Definition at line 102 of file NetGame.h.

virtual void NetGame::DoWepTrigger ( NetMsg msg)
inlineprotectedvirtual

Reimplemented in NetGameServer, and NetGameClient.

Definition at line 101 of file NetGame.h.

void NetGame::ExecFrame ( )
virtual

Reimplemented in NetGameClient, and NetGameServer.

Definition at line 157 of file NetGame.cpp.

NetPlayer * NetGame::FindPlayerByName ( const char *  name)
virtual

Definition at line 235 of file NetGame.cpp.

NetPlayer * NetGame::FindPlayerByNetID ( DWORD  netid)
virtual

Definition at line 248 of file NetGame.cpp.

NetPlayer * NetGame::FindPlayerByObjID ( DWORD  objid)
virtual

Definition at line 261 of file NetGame.cpp.

Ship * NetGame::FindShipByObjID ( DWORD  objid)
virtual

Definition at line 274 of file NetGame.cpp.

Shot * NetGame::FindShotByObjID ( DWORD  objid)
virtual

Definition at line 283 of file NetGame.cpp.

NetGame * NetGame::GetInstance ( )
static

Definition at line 120 of file NetGame.cpp.

virtual DWORD NetGame::GetNetID ( ) const
inlinevirtual

Definition at line 49 of file NetGame.h.

DWORD NetGame::GetNextObjID ( int  type = SHIP)
static

Definition at line 135 of file NetGame.cpp.

DWORD NetGame::GetObjID ( ) const
virtual

Definition at line 126 of file NetGame.cpp.

NetPeer * NetGame::GetPeer ( NetPlayer player)
virtual

Definition at line 292 of file NetGame.cpp.

virtual bool NetGame::IsActive ( ) const
inlinevirtual

Definition at line 47 of file NetGame.h.

virtual bool NetGame::IsClient ( ) const
inlinevirtual

Reimplemented in NetGameClient, and NetGameServer.

Definition at line 45 of file NetGame.h.

bool NetGame::IsNetGame ( )
static

Definition at line 311 of file NetGame.cpp.

bool NetGame::IsNetGameClient ( )
static

Definition at line 317 of file NetGame.cpp.

bool NetGame::IsNetGameServer ( )
static

Definition at line 325 of file NetGame.cpp.

virtual bool NetGame::IsServer ( ) const
inlinevirtual

Reimplemented in NetGameClient, and NetGameServer.

Definition at line 46 of file NetGame.h.

int NetGame::NumPlayers ( )
static

Definition at line 220 of file NetGame.cpp.

void NetGame::Recv ( )
virtual

Definition at line 164 of file NetGame.cpp.

void NetGame::Respawn ( DWORD  objid,
Ship spawn 
)
virtual

Reimplemented in NetGameServer, and NetGameClient.

Definition at line 304 of file NetGame.cpp.

void NetGame::Send ( )
virtual

Reimplemented in NetGameServer, and NetGameClient.

Definition at line 215 of file NetGame.cpp.

virtual void NetGame::SendData ( NetData data)
inlinevirtual

Reimplemented in NetGameServer, and NetGameClient.

Definition at line 56 of file NetGame.h.

static const char* NetGame::TYPENAME ( )
inlinestatic

Definition at line 38 of file NetGame.h.


Member Data Documentation

bool NetGame::active
protected

Definition at line 119 of file NetGame.h.

DWORD NetGame::last_send_time
protected

Definition at line 121 of file NetGame.h.

NetLink* NetGame::link
protected

Definition at line 110 of file NetGame.h.

Ship* NetGame::local_player
protected

Definition at line 114 of file NetGame.h.

DWORD NetGame::netid
protected

Definition at line 113 of file NetGame.h.

DWORD NetGame::objid
protected

Definition at line 112 of file NetGame.h.

Text NetGame::player_name
protected

Definition at line 115 of file NetGame.h.

Text NetGame::player_pass
protected

Definition at line 116 of file NetGame.h.

List<NetPlayer> NetGame::players
protected

Definition at line 109 of file NetGame.h.

Sim* NetGame::sim
protected

Definition at line 118 of file NetGame.h.

Ship* NetGame::target
protected

Definition at line 117 of file NetGame.h.


The documentation for this class was generated from the following files: