News SF.net Project Frequently Asked Questions Documentation Downloads Mailing Lists How to Contribute

SourceForge.net Logo

Changing the way games are made and played.

Zap::HuntersFlagItem class Reference

Zap::HuntersFlagItem Class Reference

#include <huntersGame.h>

Inheritance diagram for Zap::HuntersFlagItem:

Zap::Item Zap::MoveObject Zap::GameObject TNL::NetObject TNL::Object

Public Member Functions

 HuntersFlagItem (Point pos=Point())
void renderItem (Point pos)
void onMountDestroyed ()
void setActualVel (Point v)
bool collide (GameObject *hitObject)
void changeFlagCount (U32 change)
U32 getFlagCount ()
U32 packUpdate (GhostConnection *connection, U32 updateMask, BitStream *stream)
 Write the object's state to a packet.

void unpackUpdate (GhostConnection *connection, BitStream *stream)
 Unpack data written by packUpdate().

 TNL_DECLARE_CLASS (HuntersFlagItem)

Protected Types

enum  MaskBits {
  FlagCountMask = Parent::FirstFreeMask << 0,
  FirstFreeMask = Parent::FirstFreeMask << 1
}

Protected Attributes

U32 mFlagCount

Private Types

typedef Item Parent

Member Typedef Documentation

typedef Item Zap::HuntersFlagItem::Parent [private]
 

Reimplemented from Zap::GameObject.


Member Enumeration Documentation

enum Zap::HuntersFlagItem::MaskBits [protected]
 

Enumeration values:
FlagCountMask 
FirstFreeMask 

Reimplemented from Zap::Item.


Constructor & Destructor Documentation

Zap::HuntersFlagItem::HuntersFlagItem Point  pos = Point()  ) 
 


Member Function Documentation

void Zap::HuntersFlagItem::renderItem Point  pos  )  [virtual]
 

Implements Zap::Item.

void Zap::HuntersFlagItem::onMountDestroyed  )  [virtual]
 

Reimplemented from Zap::Item.

void Zap::HuntersFlagItem::setActualVel Point  v  ) 
 

Reimplemented from Zap::Item.

bool Zap::HuntersFlagItem::collide GameObject hitObject  )  [virtual]
 

Reimplemented from Zap::Item.

void Zap::HuntersFlagItem::changeFlagCount U32  change  )  [inline]
 

U32 Zap::HuntersFlagItem::getFlagCount  )  [inline]
 

U32 Zap::HuntersFlagItem::packUpdate GhostConnection connection,
U32  updateMask,
BitStream *  stream
[virtual]
 

Write the object's state to a packet.

packUpdate is called on an object when it is to be written into a packet stream for transmission to the client. The updateMask parameter contains the out-of-date state mask for the object. The initial update mask for any object to a client will always be 0xFFFFFFFF, signifying that all states are out of date. It is often useful to check for this mask, to write one-time initialization information for that object.

Reimplemented from Zap::Item.

void Zap::HuntersFlagItem::unpackUpdate GhostConnection connection,
BitStream *  stream
[virtual]
 

Unpack data written by packUpdate().

unpackUpdate is called on the client to read an update out of a packet's bit stream. Because the update mask is not encoded by the network system directly, each unpack update function will have to determine from the bit stream which states are being updated.

Reimplemented from Zap::Item.

Zap::HuntersFlagItem::TNL_DECLARE_CLASS HuntersFlagItem   ) 
 


Field Documentation

U32 Zap::HuntersFlagItem::mFlagCount [protected]