Object Class Reference

#include <Object.h>

Inheritance diagram for Object:

Bullet Camera CutScene Door EventPoint Person Tile Enemy Player List of all members.

Public Member Functions

 Object ()
 Object (List *objInfo, int x, int y)
virtual SDL_Rect getBox ()
virtual void collide (Object *o)
virtual void draw ()=0
virtual void update ()
virtual std::string id ()
virtual void setId (std::string id)
virtual void load (List *objInfo)
virtual void control ()
bool collidable ()
void setCollidable (bool b)
double getDepth ()
void setDepth (double depth)
CollisionType getType ()
void setType (CollisionType type)

Static Public Member Functions

static ObjectloadObject (std::string filename, int x, int y)

Protected Attributes

SDL_Rect _box
bool _collidable
double _depth
std::string _id
CollisionType _type

Detailed Description

Definition at line 13 of file Object.h.


Constructor & Destructor Documentation

Object::Object  ) 
 

Definition at line 10 of file Object.cpp.

Object::Object List objInfo,
int  x,
int  y
 

Definition at line 16 of file Object.cpp.

References _box, _id, List::empty(), and List::firstList().


Member Function Documentation

bool Object::collidable  )  [inline]
 

Definition at line 33 of file Object.h.

References _collidable.

Referenced by CollisionHandler::ObjsColliding(), and Level::registerTile().

virtual void Object::collide Object o  )  [inline, virtual]
 

Reimplemented in Bullet, CutScene, Door, EventPoint, Person, and Tile.

Definition at line 19 of file Object.h.

Referenced by CollisionHandler::checkCollision().

virtual void Object::control  )  [inline, virtual]
 

Reimplemented in Camera, CutScene, and Player.

Definition at line 30 of file Object.h.

virtual void Object::draw  )  [pure virtual]
 

Implemented in Bullet, Camera, CutScene, Door, EventPoint, Person, and Tile.

virtual SDL_Rect Object::getBox  )  [inline, virtual]
 

Definition at line 18 of file Object.h.

References _box.

Referenced by Bullet::Bullet(), Person::collide(), ShootInRangeCommand::execute(), FollowPlayerInRangeCommand::execute(), FollowPlayerCommand::execute(), AimCommand::execute(), CollisionHandler::ObjsColliding(), and Screen::update().

double Object::getDepth  )  [inline]
 

Definition at line 35 of file Object.h.

References _depth.

Referenced by Level::addObject(), and Level::registerTile().

CollisionType Object::getType  )  [inline]
 

Definition at line 37 of file Object.h.

References _type.

Referenced by Person::collide(), EventPoint::collide(), Door::collide(), CutScene::collide(), and Bullet::collide().

virtual std::string Object::id  )  [inline, virtual]
 

Definition at line 22 of file Object.h.

References _id.

Referenced by Level::addObject(), TurnCommand::getString(), StopPersonCommand::getString(), ShootInRangeCommand::getString(), ShootCommand::getString(), SetDoorLockCommand::getString(), SetControlCommand::getString(), SetCameraCommand::getString(), MoveCommand::getString(), JumpResetCommand::getString(), JumpCommand::getString(), FollowPlayerInRangeCommand::getString(), FollowPlayerCommand::getString(), CrouchCommand::getString(), AimCommand::getString(), AddHealthCommand::getString(), Level::levelObjectLoad(), and Tile::Tile().

virtual void Object::load List objInfo  )  [inline, virtual]
 

Reimplemented in CutScene, Door, Enemy, EventPoint, and Person.

Definition at line 25 of file Object.h.

Referenced by Level::levelSpecsLoad().

Object * Object::loadObject std::string  filename,
int  x,
int  y
[static]
 

Definition at line 38 of file Object.cpp.

References Parser::parse(), and List::rest().

Referenced by Level::levelObjectLoad().

void Object::setCollidable bool  b  )  [inline]
 

Definition at line 34 of file Object.h.

References _collidable.

Referenced by Level::levelTextureLoad().

void Object::setDepth double  depth  )  [inline]
 

Definition at line 36 of file Object.h.

References _depth.

Referenced by Level::levelTextureLoad().

virtual void Object::setId std::string  id  )  [inline, virtual]
 

Definition at line 23 of file Object.h.

References _id.

void Object::setType CollisionType  type  )  [inline]
 

Definition at line 38 of file Object.h.

References _type.

virtual void Object::update  )  [inline, virtual]
 

Reimplemented in Bullet, CutScene, Door, Enemy, EventPoint, Person, and Tile.

Definition at line 21 of file Object.h.


Member Data Documentation

SDL_Rect Object::_box [protected]
 

Definition at line 38 of file Object.h.

Referenced by Bullet::Bullet(), Person::collide(), Person::crouch(), Tile::draw(), Person::draw(), EventPoint::draw(), Door::draw(), Bullet::draw(), getBox(), Object(), Person::Person(), Door::setOpen(), Tile::Tile(), Person::touchingAbove(), Person::touchingBelow(), Person::touchingLeft(), Person::touchingRight(), Person::uncrouch(), Person::update(), and Bullet::update().

bool Object::_collidable [protected]
 

Definition at line 42 of file Object.h.

Referenced by collidable(), Door::collide(), Bullet::collide(), Person::die(), EventPoint::EventPoint(), Person::Person(), setCollidable(), Door::setOpen(), and Tile::Tile().

double Object::_depth [protected]
 

Definition at line 43 of file Object.h.

Referenced by getDepth(), Player::Player(), setDepth(), and Tile::Tile().

std::string Object::_id [protected]
 

Definition at line 45 of file Object.h.

Referenced by id(), Object(), CutScene::runScene(), setId(), and Tile::Tile().

CollisionType Object::_type [protected]
 

Definition at line 46 of file Object.h.

Referenced by Bullet::Bullet(), Camera::Camera(), Person::collide(), CutScene::CutScene(), Door::Door(), Enemy::Enemy(), EventPoint::EventPoint(), getType(), Player::Player(), setType(), and Tile::Tile().


The documentation for this class was generated from the following files:
Generated on Sat Apr 22 15:05:21 2006 for ProjectX by  doxygen 1.4.6-NO