Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

Object Class Reference

#include <object.h>

List of all members.

Public Member Functions

 Object (Vector2D _pos, ObjectInfo *_objectinfo, GameTimer *_timer, ScoreManager *score_manager, Input *_input)
 ~Object ()
void OffScreen ()
void CycleStarts ()
void Action ()
void CalcDestination ()
void Draw (Display *display, int xoffset)
void MoveOK ()
void CollisionDetected (Tile *)
void React (Object *o)
int IsPlayer ()
bool Died ()
int FlagStatus (int flagpos)
int GetWidth ()
int GetHeight ()
int GetHealthState ()
int GetNMissiles ()
Vector2D GetPosition ()
int GetTileX ()
int GetTileY ()
void GetCoords (float *x, float *y)
Vector2D * GetVelocity ()
Vector2D * GetAcceleration ()
Vector2D * GetDestination ()
Animation * GetAnimation ()
ObjectInfo * GetObjectInfo ()
ObjectCell * RemoveObjectCell (ObjectCell *objcell)
Object * ObjectBayDetach ()
void Nudge (Vector2D dpos)
void PathRecommendsSpeed (float)
void PathSignals (int)
void Dies ()
void imm_Init ()
bool imm_Status ()
void imm_Event (int)
void hp_Init (bool tiles_damage)
int hp_Cur ()
void hp_ModifyHealth (int m)
void hp_Event (int)
void hp_HitTile (Tile *)
void hp_HitObj (Object *)
void vis_Init ()
void vis_Event (int)
void phys_Init (int flags)
void phys_Action ()
void phys_Event (int)
void phys_HitTile (Tile *)
void phys_HitObj (Object *)
void path_Event (int)
void bus_Event (int)
void bus_HitTile (Tile *)
void bus_HitObj (Object *)
void bus_PathSig (int)
ObjectMemento * CreateMemento ()
void RestoreFromMemento (ObjectMemento *)
Vector2D GetEdgePoint (int dir)
void ObjectBayAttach (Object *)
Input * GetInput ()
int GetTime ()
GameTimer * GetGameTimer ()
ScoreManager * GetScoreManager ()

Private Attributes

ObjectInfo * objectinfo
Animation ** animations
int cur_anim
int weakness_time_countdown
int cyclic
Object * object_bay
Vector2D pos
Vector2D dst
bool dst_calculated
int comps
bool died
GameTimer * game_timer
ScoreManager * score_manager
Input * input
Tile * lastcollided
int phys_flags
int phys_facing_offset
Vector2D phys_pos
Vector2D phys_vel
Vector2D phys_acc
Vector2D phys_dst
BehaviourInterface * behaviour
GunInterface ** gun
FacingInterface * facing
int path_flags
Path * path_cur
float path_dist
Object * path_shdw
Path * path_backup
int imm_countdown
int hp_cur
bool hp_tiledmg


Constructor & Destructor Documentation

Object::Object (  Vector2D    _pos,
ObjectInfo *    _objectinfo,
GameTimer *    _timer,
ScoreManager *    score_manager,
Input *    _input
) 
 

Object::~Object (    ) 
 


Member Function Documentation

void Object::Action (    ) 
 

x1S: perform action for the cycle

void Object::bus_Event (  int    ) 
 

For SIMPLE events - no parameters.

void Object::bus_HitObj (  Object *    ) 
 

Obj hit another object.

void Object::bus_HitTile (  Tile *    ) 
 

Obj hit a tile.

void Object::bus_PathSig (  int    ) 
 

Path emits a signal.

void Object::CalcDestination (    ) 
 

x1S: calculate projected destination

void Object::CollisionDetected (  Tile *    ) 
 

x1S IF colliding w/ a tile

ObjectMemento * Object::CreateMemento (    ) 
 

void Object::CycleStarts (    ) 
 

x1S: prepare for cycle (clear dest bit)

bool Object::Died (    )  [inline]
 

is the object dead?

void Object::Dies (    )  [inline]
 

void Object::Draw (  Display *    display,
int    xoffset
) 
 

x1S: time to draw self to screen

int Object::FlagStatus (  int    flagpos ) 
 

information from the object info

Vector2D * Object::GetAcceleration (    ) 
 

from physics module

Animation * Object::GetAnimation (    ) 
 

void Object::GetCoords (  float *    x,
float *    y
)  [inline]
 

Vector2D * Object::GetDestination (    ) 
 

result of physics + pathing

Vector2D Object::GetEdgePoint (  int    dir ) 
 

GameTimer * Object::GetGameTimer (    ) 
 

int Object::GetHealthState (    ) 
 

for on-screen display

int Object::GetHeight (    ) 
 

current frame height

Input * Object::GetInput (    ) 
 

int Object::GetNMissiles (    ) 
 

for on-screen display

ObjectInfo * Object::GetObjectInfo (    ) 
 

Vector2D Object::GetPosition (    )  [inline]
 

ScoreManager * Object::GetScoreManager (    ) 
 

int Object::GetTileX (    )  [inline]
 

int Object::GetTileY (    )  [inline]
 

int Object::GetTime (    ) 
 

Vector2D * Object::GetVelocity (    ) 
 

from physics module

int Object::GetWidth (    ) 
 

current frame width

int Object::hp_Cur (    ) 
 

return current # of hp

void Object::hp_Event (  int    ) 
 

bus message

void Object::hp_HitObj (  Object *    ) 
 

bus message

void Object::hp_HitTile (  Tile *    ) 
 

bus message

void Object::hp_Init (  bool    tiles_damage ) 
 

void Object::hp_ModifyHealth (  int    m ) 
 

m = dHP

void Object::imm_Event (  int    ) 
 

bus message

void Object::imm_Init (    ) 
 

bool Object::imm_Status (    ) 
 

true if immunity on

int Object::IsPlayer (    ) 
 

is the object the player?

void Object::MoveOK (    ) 
 

x1S IF mvmnt approved

void Object::Nudge (  Vector2D    dpos ) 
 

nudge position slightly

void Object::ObjectBayAttach (  Object *    ) 
 

Object * Object::ObjectBayDetach (    ) 
 

see "ObjectBayAttach" for more info.

void Object::OffScreen (    ) 
 

called when object goes offscreen

void Object::path_Event (  int    ) 
 

Calculate destination

void Object::PathRecommendsSpeed (  float    ) 
 

void Object::PathSignals (  int    ) 
 

void Object::phys_Action (    ) 
 

Calculate destination

void Object::phys_Event (  int    ) 
 

bus message

void Object::phys_HitObj (  Object *    ) 
 

bus message

void Object::phys_HitTile (  Tile *    ) 
 

bus message

void Object::phys_Init (  int    flags ) 
 

void Object::React (  Object *    o ) 
 

x1S IF colliding w/ an object

ObjectCell * Object::RemoveObjectCell (  ObjectCell *    objcell ) 
 

void Object::RestoreFromMemento (  ObjectMemento *    ) 
 

void Object::vis_Event (  int    ) 
 

bus message

void Object::vis_Init (    ) 
 


Member Data Documentation

Animation** Object::animations [private]
 

BehaviourInterface* Object::behaviour [private]
 

int Object::comps [private]
 

OBJCOMP_ flags : which components are being used.

int Object::cur_anim [private]
 

index into animations

int Object::cyclic [private]
 

it should be in ANIMINFO...

bool Object::died [private]
 

canonical reference: is object dead? (bus_Die called)

Vector2D Object::dst [private]
 

destination (sum of physics+pathing destination)

bool Object::dst_calculated [private]
 

destination calculated for obj yet?

FacingInterface* Object::facing [private]
 

GameTimer* Object::game_timer [private]
 

pointer to game context

GunInterface** Object::gun [private]
 

int Object::hp_cur [private]
 

# of hp

bool Object::hp_tiledmg [private]
 

takes damage from hit tiles?

int Object::imm_countdown [private]
 

Input* Object::input [private]
 

Tile* Object::lastcollided [private]
 

Object* Object::object_bay [private]
 

ObjectInfo* Object::objectinfo [private]
 

Path* Object::path_backup [private]
 

for when shadowed obj dies

Path* Object::path_cur [private]
 

current path following

float Object::path_dist [private]
 

progress along path

int Object::path_flags [private]
 

ex: PATH_REV, PATH_ACC_SPEED, PATH_LEVEL_REL...

Object* Object::path_shdw [private]
 

obj path shadows, or NULL

Vector2D Object::phys_acc [private]
 

acceleration

Vector2D Object::phys_dst [private]
 

destination

int Object::phys_facing_offset [private]
 

only used w/ PHYS_DRIVE_FACE

int Object::phys_flags [private]
 

Vector2D Object::phys_pos [private]
 

position

Vector2D Object::phys_vel [private]
 

velocity

Vector2D Object::pos [private]
 

position (previous destination)

ScoreManager* Object::score_manager [private]
 

int Object::weakness_time_countdown [private]
 


The documentation for this class was generated from the following files:
Generated on Sun Mar 2 18:50:28 2003 for eounicorn by doxygen1.3-rc3