Vegastrike 0.5.1 rc1  1.0
Original sources for Vegastrike Evolved
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ZoneInfo Class Reference

#include <zonemgr.h>

Public Member Functions

void display ()
 
unsigned short getZoneNum ()
 
StarSystemgetSystem ()
 

Friends

class ZoneMgr
 

Detailed Description

Definition at line 44 of file zonemgr.h.

Member Function Documentation

void ZoneInfo::display ( )

Definition at line 878 of file zonemgr.cpp.

References _Universe, Universe::AccessCockpit(), Client::callsign, displayUnitInfo(), Client::game_unit, SaveGame::GetCallsign(), StarSystem::getFileName(), UnitContainer::GetUnit(), StarSystem::getUnitList(), Universe::isPlayerStarship(), Cockpit::savegame, and Universe::whichPlayerStarship().

Referenced by ZoneMgr::displayNPCs().

879 {
880  cout<<star_system->getFileName()<<"(zone "<<zonenum<<")"<<endl;
881  for (ClientList::iterator ci = zone_list.begin(); ci != zone_list.end(); ++ci) {
882  Client *clt = (*ci).get();
883  if (!clt) continue;
884  Unit *un = clt->game_unit.GetUnit();
885  if (un && _Universe->isPlayerStarship( un ) == NULL)
886  displayUnitInfo( un, clt->callsign, " CltNPC " );
887  }
888  un_iter iter = ( star_system->getUnitList() ).createIterator();
889  while (Unit*un = *iter) {
890  char name[15] = " NPC ";
891  string callsign;
892  int cp;
893  if ( ( cp = _Universe->whichPlayerStarship( un ) ) != -1 ) {
894  sprintf( name, "*Plr% 3d ", cp );
895  callsign = _Universe->AccessCockpit( cp )->savegame->GetCallsign();
896  }
897  displayUnitInfo( un, callsign, name );
898  ++iter;
899  }
900 }
StarSystem* ZoneInfo::getSystem ( )
inline

Definition at line 67 of file zonemgr.h.

Referenced by ZoneMgr::getUnit().

68  {
69  return star_system;
70  }
unsigned short ZoneInfo::getZoneNum ( )
inline

Definition at line 63 of file zonemgr.h.

64  {
65  return zonenum;
66  }

Friends And Related Function Documentation

friend class ZoneMgr
friend

Definition at line 46 of file zonemgr.h.


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