Main Page   Namespace List   Class Hierarchy   Compound List   File List   Compound Members   File Members   Related Pages  

ObjectManager Class Reference

#include <objmgr.h>

List of all members.

Public Methods

 ObjectManager ()
 ~ObjectManager ()
void AddObject (GameObject *, objecttype=OT_UNKNOWN)
GameObjectAddObject (objecttype)
GameObjectGetObject (objecttype)
MainCharGetMainChar ()
CrosshairGetCrosshair ()
GameObjectFindFirstCollision (Rect &R, bool exclude=true)
vector< Rect > & draw (Graphics &)
void think ()
void animate ()
void update ()
void recenter ()
vector< Rect > & GetDrawList ()
void SetSubWorld (SubWorld *s)
SubWorldGetSubWorld () const

Private Methods

void AddToAnyObjectList (list< Object * > &, Object *)
void AddToObjectList (Object *)

Private Attributes

list< Object * > object_list
vector< Rectobject_draw_list
MainCharmainchar
Crosshaircrosshair
SubWorldcurrentSubWorld


Constructor & Destructor Documentation

ObjectManager::ObjectManager  
 

Definition at line 8 of file objmgr.cpp.

References crosshair, and mainchar.

ObjectManager::~ObjectManager  
 

Definition at line 14 of file objmgr.cpp.

References object_list.


Member Function Documentation

GameObject * ObjectManager::AddObject objecttype   
 

Definition at line 116 of file objmgr.cpp.

References AddToObjectList(), crosshair, mainchar, ObjectManager::Object::obj, objecttype, OT_BEAR, OT_BEARSPAWN, OT_CROSSHAIR, OT_EXPLODE, OT_MAINCHAR, OT_UFO, and ObjectManager::Object::type.

void ObjectManager::AddObject GameObject  ,
objecttype    = OT_UNKNOWN
 

Definition at line 107 of file objmgr.cpp.

References AddToObjectList(), ObjectManager::Object::obj, objecttype, and ObjectManager::Object::type.

Referenced by MainChar::FireWeapon(), Game::Game(), Game::step(), and BearSpawnPoint::think().

void ObjectManager::AddToAnyObjectList list< Object * > &    ol,
Object   obj
[private]
 

if the object structure doesn't have a gameobject, put it at the end of the list.

Todo:
should this be an assert?

Definition at line 30 of file objmgr.cpp.

References GameObject::GetLayer(), GameObject::GetY(), and ObjectManager::Object::obj.

Referenced by AddToObjectList().

void ObjectManager::AddToObjectList Object   [private]
 

Definition at line 102 of file objmgr.cpp.

References AddToAnyObjectList(), and object_list.

Referenced by AddObject().

void ObjectManager::animate  
 

Definition at line 257 of file objmgr.cpp.

References object_list.

Referenced by Game::GameLoop().

vector< Rect > & ObjectManager::draw Graphics  
 

Definition at line 137 of file objmgr.cpp.

References object_draw_list, and object_list.

Referenced by Game::RenderScreen().

GameObject * ObjectManager::FindFirstCollision Rect   R,
bool    exclude = true
 

Definition at line 311 of file objmgr.cpp.

References object_list, OT_CROSSHAIR, OT_MAINCHAR, Rect, and Util_Intersect().

Referenced by ExplodeObject::think().

Crosshair* ObjectManager::GetCrosshair   [inline]
 

Definition at line 26 of file objmgr.h.

References GetObject(), and OT_MAINCHAR.

Referenced by MainChar::FireWeapon(), Game::GameLoop(), and MainChar::think().

vector<Rect>& ObjectManager::GetDrawList   [inline]
 

Definition at line 40 of file objmgr.h.

References object_draw_list.

Referenced by Game::RenderScreen().

MainChar* ObjectManager::GetMainChar   [inline]
 

Definition at line 25 of file objmgr.h.

References objecttype.

Referenced by Game::Game(), Game::GameLoop(), and Bear::think().

GameObject * ObjectManager::GetObject objecttype   
 

Definition at line 277 of file objmgr.cpp.

References crosshair, mainchar, object_list, objecttype, OT_CROSSHAIR, and OT_MAINCHAR.

Referenced by Game::Game(), and GetCrosshair().

SubWorld* ObjectManager::GetSubWorld   const [inline]
 

Definition at line 43 of file objmgr.h.

References currentSubWorld.

Referenced by MainChar::FireWeapon(), GameObject::GetBoundingRect(), GameObject::Recenter(), MainChar::Recenter(), and Bear::think().

void ObjectManager::recenter  
 

Definition at line 267 of file objmgr.cpp.

References object_list.

Referenced by Game::GameLoop().

void ObjectManager::SetSubWorld SubWorld   s [inline]
 

Definition at line 42 of file objmgr.h.

Referenced by Game::Game().

void ObjectManager::think  
 

Definition at line 154 of file objmgr.cpp.

References GameObject::GetLayer(), GameObject::GetY(), ObjectManager::Object::obj, object_list, and GameObject::think().

Referenced by Game::GameLoop().

void ObjectManager::update  
 

Definition at line 296 of file objmgr.cpp.

References object_list.

Referenced by Game::GameLoop().


Member Data Documentation

Crosshair* ObjectManager::crosshair [private]
 

Definition at line 53 of file objmgr.h.

Referenced by AddObject(), GetObject(), and ObjectManager().

SubWorld* ObjectManager::currentSubWorld [private]
 

Definition at line 55 of file objmgr.h.

Referenced by GetSubWorld().

MainChar* ObjectManager::mainchar [private]
 

Definition at line 52 of file objmgr.h.

Referenced by AddObject(), GetObject(), and ObjectManager().

vector<Rect> ObjectManager::object_draw_list [private]
 

Definition at line 49 of file objmgr.h.

Referenced by draw(), and GetDrawList().

list<Object *> ObjectManager::object_list [private]
 

Definition at line 48 of file objmgr.h.

Referenced by AddToObjectList(), animate(), draw(), FindFirstCollision(), GetObject(), recenter(), think(), update(), and ~ObjectManager().


The documentation for this class was generated from the following files:
Generated on Sun Dec 8 12:02:22 2002 for nnc by doxygen1.3-rc1