Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

Monster Class Reference

#include </home/clem/local/src/opie/noncore/games/kbill/Monster.h>

Collaboration diagram for Monster:

Collaboration graph
[legend]
List of all members.

Public Member Functions

void get_border ()
void enter ()
int move (int mode)
void draw ()
void draw_std ()
void draw_at ()
void draw_stray ()
void update ()
void update_in ()
void update_at ()
void update_out ()
void update_dying ()
int clicked (int locx, int locy)
int clickedstray (int locx, int locy)
int step_size (unsigned int lev)
 Monster (Board *b, int mid=0)
void setMaxPixmaps (int maxBody, int maxEyes)
void setArrested (int ticks, int duration)
void setDangerous (int ticks, int IQ)
void setHarmless (int ticks, int hDuration, int wDuration)
void setREM (int ticks)
void setPosition (int pos)
void setPrison (int pos)
void setFreedom (int pos)
void setDirection (int dir)
monsterState state ()
int position ()
int direction ()
int id ()
bool move ()
int body ()
int eyes ()

Public Attributes

int state
int index
Picturecels
int x
int y
int target_x
int target_y
int target_c
int cargo
int x_offset
int y_offset
int sx
int sy

Static Public Attributes

static const int SLOW = 0
static const int FAST = 1
static const int OFF = 0
static const int IN = 1
static const int AT = 2
static const int OUT = 3
static const int DYING = 4
static const int STRAY = 5
static const int GRAVITY = 3
static const int XOFFSET = 20
static const int YOFFSET = 3

Private Attributes

Boardboard
int ID
int IQ
monsterState actualState
int pauseDuration
int pause
int dangerousPause
int harmlessDuration
int harmlessLeft
int warningDuration
int arrestDuration
int arrestLeft
int arrestPause
int actualDirection
int lastDirection
int actualPosition
int lastPosition
int feetPosition
int maxBodyPixmaps
int maxEyesPixmaps
int prisonPosition
int freedomPosition

Constructor & Destructor Documentation

Monster::Monster Board b,
int  mid = 0
 

Definition at line 3 of file monster.cpp.

References actualPosition, board, feetPosition, ID, IQ, lastPosition, maxBodyPixmaps, maxEyesPixmaps, monsterhome, OUT, Board::position(), prisonentry, prisonexit, setArrested(), setFreedom(), setHarmless(), setPrison(), and setREM().


Member Function Documentation

int Monster::body  ) 
 

Definition at line 227 of file monster.cpp.

References actualPosition, actualState, feetPosition, harmless, harmlessLeft, ID, maxBodyPixmaps, OUT, rem, and warningDuration.

Referenced by Referee::introMonster().

int Monster::clicked int  locx,
int  locy
 

Definition at line 196 of file Monster.cc.

References bill, Horde::height, x, and y.

Referenced by Game::button_press().

int Monster::clickedstray int  locx,
int  locy
 

Definition at line 200 of file Monster.cc.

References Library::height, OS, x, and y.

Referenced by Game::button_press().

int Monster::direction  ) 
 

Definition at line 103 of file monster.cpp.

References actualDirection.

void Monster::draw  ) 
 

Definition at line 63 of file Monster.cc.

References AT, draw_at(), draw_std(), draw_stray(), DYING, IN, OUT, state(), and STRAY.

Referenced by Horde::draw().

void Monster::draw_at  ) 
 

Definition at line 214 of file Monster.cc.

References cargo, cels, Network::computers, UI::draw(), index, net, Library::os, OS, sx, sy, target_c, ui, x, x_offset, y, and y_offset.

Referenced by draw().

void Monster::draw_std  ) 
 

Definition at line 208 of file Monster.cc.

References cargo, cels, UI::draw(), index, Library::os, OS, ui, x, x_offset, y, and y_offset.

Referenced by draw().

void Monster::draw_stray  ) 
 

Definition at line 223 of file Monster.cc.

References bill, cargo, UI::draw(), game, Game::grabbed, Horde::list, Library::os, OS, ui, x, and y.

Referenced by draw().

void Monster::enter  ) 
 

Definition at line 16 of file Monster.cc.

References bill, cargo, cels, Network::computers, game, get_border(), IN, index, Horde::lcels, net, Horde::off_screen, Horde::on_screen, OS, Game::RAND(), state(), target_c, target_x, target_y, Network::units, Network::width, Library::WINGDOWS, Computer::x, x, x_offset, XOFFSET, Computer::y, y, y_offset, and YOFFSET.

Referenced by Horde::launch().

int Monster::eyes  ) 
 

Definition at line 242 of file monster.cpp.

References actualDirection, actualPosition, actualState, E, harmless, lastDirection, N, OUT, S, W, and X.

Referenced by Referee::introMonster().

void Monster::get_border  ) 
 

Definition at line 3 of file Monster.cc.

References bill, game, Horde::height, i, Game::RAND(), Game::scrheight, Game::scrwidth, target_x, target_y, and Horde::width.

Referenced by enter(), and update_at().

int Monster::id  ) 
 

Definition at line 108 of file monster.cpp.

References ID.

bool Monster::move  ) 
 

Definition at line 113 of file monster.cpp.

References actualDirection, actualPosition, actualState, arrestDuration, arrestLeft, arrestPause, board, brick, Board::closeup(), d, dangerous, dangerousPause, E, empty, FALSE, feetPosition, freedomPosition, harmless, harmlessLeft, ID, IQ, Board::isWay(), lastPosition, maxBodyPixmaps, monster, Board::move(), N, OUT, pacman, pause, pauseDuration, Board::position(), prison, prisonPosition, rem, Board::reset(), S, Board::set(), TRUE, tunnel, Board::turn(), W, Board::x(), X, and Board::y().

Referenced by update_in(), and update_out().

int Monster::move int  mode  ) 
 

Definition at line 32 of file Monster.cc.

References abs, bill, cels, FAST, game, Horde::lcels, Game::level, Horde::rcels, SLOW, step_size(), target_x, target_y, x, and y.

int Monster::position  ) 
 

Definition at line 98 of file monster.cpp.

References actualPosition.

Referenced by Referee::introMonster().

void Monster::setArrested int  ticks,
int  duration
 

Definition at line 32 of file monster.cpp.

References actualState, arrestDuration, arrestLeft, arrestPause, dangerous, harmlessLeft, pause, and pauseDuration.

Referenced by Referee::initMonsters(), and Monster().

void Monster::setDangerous int  ticks,
int  IQ
 

Definition at line 42 of file monster.cpp.

References actualState, dangerous, dangerousPause, harmlessLeft, IQ, pause, and pauseDuration.

Referenced by Referee::initMonsters(), and Referee::introMonster().

void Monster::setDirection int  dir  ) 
 

Definition at line 86 of file monster.cpp.

References actualDirection, lastDirection, and X.

Referenced by Referee::initMonsters(), and Referee::introMonster().

void Monster::setFreedom int  pos  ) 
 

Definition at line 81 of file monster.cpp.

References freedomPosition.

Referenced by Referee::initMonsters(), and Monster().

void Monster::setHarmless int  ticks,
int  hDuration,
int  wDuration
 

Definition at line 52 of file monster.cpp.

References actualState, harmless, harmlessDuration, harmlessLeft, pause, pauseDuration, and warningDuration.

Referenced by Monster().

void Monster::setMaxPixmaps int  maxBody,
int  maxEyes
 

Definition at line 24 of file monster.cpp.

References feetPosition, maxBodyPixmaps, and maxEyesPixmaps.

Referenced by Referee::initMonsters(), and Referee::introMonster().

void Monster::setPosition int  pos  ) 
 

Definition at line 68 of file monster.cpp.

References actualPosition, board, feetPosition, ID, lastPosition, monster, Board::reset(), and Board::set().

Referenced by Referee::initMonsters(), and Referee::introMonster().

void Monster::setPrison int  pos  ) 
 

Definition at line 76 of file monster.cpp.

References prisonPosition.

Referenced by Referee::initMonsters(), and Monster().

void Monster::setREM int  ticks  ) 
 

Definition at line 61 of file monster.cpp.

References actualState, pause, pauseDuration, and rem.

Referenced by Monster().

monsterState Monster::state  ) 
 

Referenced by draw(), enter(), update(), update_at(), update_dying(), update_in(), and update_out().

int Monster::step_size unsigned int  lev  ) 
 

Definition at line 204 of file Monster.cc.

References game, and Game::MIN().

Referenced by move().

void Monster::update  ) 
 

Definition at line 186 of file Monster.cc.

References AT, DYING, IN, OUT, state(), update_at(), update_dying(), update_in(), and update_out().

Referenced by Horde::update().

void Monster::update_at  ) 
 

Definition at line 101 of file Monster.cc.

References Network::base, bill, Computer::busy, cargo, cels, Network::computers, Computer::find_stray(), get_border(), Library::height, Horde::height, index, Horde::lcels, Horde::list, net, Network::off, OFF, Library::OFF, Computer::os, OS, OUT, state, sx, sy, target_c, Network::win, Library::WINGDOWS, x, x_offset, and y_offset.

Referenced by update().

void Monster::update_dying  ) 
 

Definition at line 173 of file Monster.cc.

References bill, cargo, Horde::DCELS, GRAVITY, index, OFF, Horde::on_screen, OS, state(), STRAY, Library::WINGDOWS, y, and y_offset.

Referenced by update().

void Monster::update_in  ) 
 

Definition at line 75 of file Monster.cc.

References Horde::acels, AT, bill, Computer::busy, cels, Network::computers, game, i, index, move(), net, OS, Game::RAND(), SLOW, state(), target_c, target_x, target_y, Network::units, Horde::WCELS, Network::width, Library::WINGDOWS, Computer::x, XOFFSET, Computer::y, y_offset, and YOFFSET.

Referenced by update().

void Monster::update_out  ) 
 

Definition at line 156 of file Monster.cc.

References bill, FAST, game, Horde::height, index, Game::INTERSECT(), move(), OFF, Horde::off_screen, Horde::on_screen, Game::scrheight, Game::scrwidth, state(), Horde::WCELS, Horde::width, x, y, and y_offset.

Referenced by update().


Member Data Documentation

int Monster::actualDirection [private]
 

Definition at line 50 of file monster.h.

Referenced by direction(), eyes(), move(), and setDirection().

int Monster::actualPosition [private]
 

Definition at line 52 of file monster.h.

Referenced by body(), eyes(), Monster(), move(), position(), and setPosition().

monsterState Monster::actualState [private]
 

Definition at line 36 of file monster.h.

Referenced by body(), eyes(), move(), setArrested(), setDangerous(), setHarmless(), and setREM().

int Monster::arrestDuration [private]
 

Definition at line 46 of file monster.h.

Referenced by move(), and setArrested().

int Monster::arrestLeft [private]
 

Definition at line 47 of file monster.h.

Referenced by move(), and setArrested().

int Monster::arrestPause [private]
 

Definition at line 48 of file monster.h.

Referenced by move(), and setArrested().

const int Monster::AT = 2 [static]
 

Definition at line 25 of file Monster.h.

Referenced by Game::button_press(), draw(), update(), and update_in().

Board* Monster::board [private]
 

Definition at line 32 of file monster.h.

Referenced by Monster(), move(), and setPosition().

int Monster::cargo
 

Definition at line 15 of file Monster.h.

Referenced by Game::button_press(), Game::button_release(), draw_at(), draw_std(), draw_stray(), enter(), update_at(), and update_dying().

Picture* Monster::cels
 

Definition at line 10 of file Monster.h.

Referenced by Game::button_press(), draw_at(), draw_std(), enter(), move(), update_at(), and update_in().

int Monster::dangerousPause [private]
 

Definition at line 40 of file monster.h.

Referenced by move(), and setDangerous().

const int Monster::DYING = 4 [static]
 

Definition at line 27 of file Monster.h.

Referenced by Game::button_press(), draw(), and update().

const int Monster::FAST = 1 [static]
 

Definition at line 21 of file Monster.h.

Referenced by move(), and update_out().

int Monster::feetPosition [private]
 

Definition at line 54 of file monster.h.

Referenced by body(), Monster(), move(), setMaxPixmaps(), and setPosition().

int Monster::freedomPosition [private]
 

Definition at line 58 of file monster.h.

Referenced by move(), and setFreedom().

const int Monster::GRAVITY = 3 [static]
 

Definition at line 30 of file Monster.h.

Referenced by update_dying().

int Monster::harmlessDuration [private]
 

Definition at line 42 of file monster.h.

Referenced by setHarmless().

int Monster::harmlessLeft [private]
 

Definition at line 43 of file monster.h.

Referenced by body(), move(), setArrested(), setDangerous(), and setHarmless().

int Monster::ID [private]
 

Definition at line 33 of file monster.h.

Referenced by body(), id(), Monster(), move(), and setPosition().

const int Monster::IN = 1 [static]
 

Definition at line 24 of file Monster.h.

Referenced by draw(), enter(), and update().

int Monster::index
 

Definition at line 9 of file Monster.h.

Referenced by Game::button_press(), draw_at(), draw_std(), enter(), update_at(), update_dying(), update_in(), and update_out().

int Monster::IQ [private]
 

Definition at line 34 of file monster.h.

Referenced by Monster(), move(), and setDangerous().

int Monster::lastDirection [private]
 

Definition at line 51 of file monster.h.

Referenced by eyes(), and setDirection().

int Monster::lastPosition [private]
 

Definition at line 53 of file monster.h.

Referenced by Monster(), move(), and setPosition().

int Monster::maxBodyPixmaps [private]
 

Definition at line 55 of file monster.h.

Referenced by body(), Monster(), move(), and setMaxPixmaps().

int Monster::maxEyesPixmaps [private]
 

Definition at line 56 of file monster.h.

Referenced by Monster(), and setMaxPixmaps().

const int Monster::OFF = 0 [static]
 

Definition at line 23 of file Monster.h.

Referenced by Game::button_press(), Game::button_release(), Horde::setup(), update_at(), update_dying(), and update_out().

const int Monster::OUT = 3 [static]
 

Definition at line 26 of file Monster.h.

Referenced by body(), draw(), eyes(), Monster(), move(), update(), and update_at().

int Monster::pause [private]
 

Definition at line 39 of file monster.h.

Referenced by move(), setArrested(), setDangerous(), setHarmless(), and setREM().

int Monster::pauseDuration [private]
 

Definition at line 38 of file monster.h.

Referenced by move(), setArrested(), setDangerous(), setHarmless(), and setREM().

int Monster::prisonPosition [private]
 

Definition at line 57 of file monster.h.

Referenced by move(), and setPrison().

const int Monster::SLOW = 0 [static]
 

Definition at line 20 of file Monster.h.

Referenced by move(), and update_in().

monsterState Monster::state
 

Definition at line 93 of file monster.cpp.

Referenced by Game::button_press(), Game::button_release(), Computer::find_stray(), Horde::setup(), and update_at().

const int Monster::STRAY = 5 [static]
 

Definition at line 28 of file Monster.h.

Referenced by Game::button_press(), draw(), Computer::find_stray(), and update_dying().

int Monster::sx
 

Definition at line 18 of file Monster.h.

Referenced by draw_at(), and update_at().

int Monster::sy
 

Definition at line 18 of file Monster.h.

Referenced by draw_at(), and update_at().

int Monster::target_c
 

Definition at line 14 of file Monster.h.

Referenced by Game::button_press(), draw_at(), enter(), update_at(), and update_in().

int Monster::target_x
 

Definition at line 12 of file Monster.h.

Referenced by enter(), get_border(), move(), and update_in().

int Monster::target_y
 

Definition at line 13 of file Monster.h.

Referenced by enter(), get_border(), move(), and update_in().

int Monster::warningDuration [private]
 

Definition at line 44 of file monster.h.

Referenced by body(), and setHarmless().

int Monster::x
 

Definition at line 11 of file Monster.h.

Referenced by clicked(), clickedstray(), draw_at(), draw_std(), draw_stray(), enter(), Computer::find_stray(), move(), update_at(), and update_out().

int Monster::x_offset
 

Definition at line 16 of file Monster.h.

Referenced by Game::button_press(), draw_at(), draw_std(), enter(), and update_at().

const int Monster::XOFFSET = 20 [static]
 

Definition at line 32 of file Monster.h.

Referenced by enter(), Computer::setup(), and update_in().

int Monster::y
 

Definition at line 11 of file Monster.h.

Referenced by clicked(), clickedstray(), draw_at(), draw_std(), draw_stray(), enter(), Computer::find_stray(), move(), update_dying(), and update_out().

int Monster::y_offset
 

Definition at line 17 of file Monster.h.

Referenced by Game::button_press(), draw_at(), draw_std(), enter(), update_at(), update_dying(), update_in(), and update_out().

const int Monster::YOFFSET = 3 [static]
 

Definition at line 33 of file Monster.h.

Referenced by enter(), and update_in().


The documentation for this class was generated from the following files:
Generated on Sat Nov 5 17:40:42 2005 for OPIE by  doxygen 1.4.2