wp_weasel_proj Class Reference

#include <wp_weasel_proj.h>

Inherits massObject.

Inheritance diagram for wp_weasel_proj:

Inheritance graph
[legend]
Collaboration diagram for wp_weasel_proj:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 wp_weasel_proj (spriteManager *newsm, Player *p)
virtual ~wp_weasel_proj ()
virtual void updateSprite ()
 Updates the sprite to apply gravitational effects to it.

Private Member Functions

void setIdlePeriod (u16 framesToWait)
void runLeft ()
void runRight ()
void changeDirection ()
bool atEdge ()
void playWalking ()
void playFalling ()
void hangDown ()
void playRandomSnarl ()

Private Attributes

Playerowner
u16 idleTime
bool justStoppedIdling

Static Private Attributes

static const s8 standingBounds []
static const s8 hangingBounds []
static const s8 fallingBounds []
static const u8 INITIALDELAY = 45
static const u16 WALKSPEED = 384
static const u8 WALKANIMSPEED = 6
static const u8 HANGDELAY = 30

Detailed Description

Definition at line 30 of file wp_weasel_proj.h.


Constructor & Destructor Documentation

wp_weasel_proj::wp_weasel_proj ( spriteManager newsm,
Player p 
)

Definition at line 30 of file wp_weasel_proj.cpp.

References spriteObject::COL_SOLID, gameManager::FXSprite, spriteObject::getFlippedh(), spriteObject::giveSprite(), INITIALDELAY, owner, playRandomSnarl(), spriteObject::setBounds(), spriteObject::setCheckCollision(), spriteObject::setCollision(), spriteObject::setFlipped(), spriteObject::setFrame(), setIdlePeriod(), spriteObject::setLayer(), spriteObject::setPallete(), spriteObject::sm, and standingBounds.

Here is the call graph for this function:

wp_weasel_proj::~wp_weasel_proj (  )  [virtual]

Definition at line 52 of file wp_weasel_proj.cpp.


Member Function Documentation

void wp_weasel_proj::updateSprite (  )  [virtual]

Updates the sprite to apply gravitational effects to it.

The sprite will accellerate downwards unless it lands on another baseable spriteObject.

Reimplemented from massObject.

Definition at line 57 of file wp_weasel_proj.cpp.

References gameManager::bigSplash, changeDirection(), spriteManager::createSingleFireSprite(), spriteObject::destroy(), spriteObject::frame, gameManager::FXSprite, spriteObject::getLeft(), spriteObject::getRight(), spriteObject::getx(), Player::gm, hangDown(), idleTime, massObject::isOnGround(), justStoppedIdling, gameManager::MALLOWYPOS, owner, playRandomSnarl(), spriteObject::playSound(), playWalking(), runLeft(), runRight(), spriteObject::SCREENH, spriteObject::setFrame(), spriteObject::sm, spriteObject::TICKSPERFRAME, massObject::updateSprite(), spriteObject::vx, massObject::wasOnGround(), and spriteObject::y.

Here is the call graph for this function:

void wp_weasel_proj::setIdlePeriod ( u16  framesToWait  )  [inline, private]

Definition at line 53 of file wp_weasel_proj.h.

References idleTime.

Referenced by hangDown(), and wp_weasel_proj().

void wp_weasel_proj::runLeft (  )  [inline, private]

Definition at line 54 of file wp_weasel_proj.h.

References spriteObject::setFlipped(), spriteObject::vx, and WALKSPEED.

Referenced by changeDirection(), and updateSprite().

Here is the call graph for this function:

void wp_weasel_proj::runRight (  )  [inline, private]

Definition at line 55 of file wp_weasel_proj.h.

References spriteObject::setFlipped(), spriteObject::vx, and WALKSPEED.

Referenced by changeDirection(), and updateSprite().

Here is the call graph for this function:

void wp_weasel_proj::changeDirection (  )  [inline, private]

Definition at line 56 of file wp_weasel_proj.h.

References spriteObject::flippedh, massObject::isOnGround(), runLeft(), runRight(), and spriteObject::vx.

Referenced by updateSprite().

Here is the call graph for this function:

bool wp_weasel_proj::atEdge (  )  [private]

Definition at line 140 of file wp_weasel_proj.cpp.

References spriteObject::flippedh, spriteManager::gameSprites, spriteObject::getBottom(), spriteObject::getLeft(), spriteObject::getRight(), and spriteObject::sm.

Here is the call graph for this function:

void wp_weasel_proj::playWalking (  )  [private]

Definition at line 118 of file wp_weasel_proj.cpp.

References spriteObject::setArbitraryAnim(), and WALKANIMSPEED.

Referenced by updateSprite().

Here is the call graph for this function:

void wp_weasel_proj::playFalling (  )  [private]

Definition at line 125 of file wp_weasel_proj.cpp.

References spriteObject::setArbitraryAnim().

Referenced by hangDown().

Here is the call graph for this function:

void wp_weasel_proj::hangDown (  )  [private]

Definition at line 132 of file wp_weasel_proj.cpp.

References HANGDELAY, playFalling(), setIdlePeriod(), spriteObject::vx, and spriteObject::vy.

Referenced by updateSprite().

Here is the call graph for this function:

void wp_weasel_proj::playRandomSnarl (  )  [private]

Definition at line 156 of file wp_weasel_proj.cpp.

References spriteObject::playSound(), spriteObject::sm, and gameManager::weaselSounds.

Referenced by updateSprite(), and wp_weasel_proj().

Here is the call graph for this function:


Member Data Documentation

Player* wp_weasel_proj::owner [private]

Definition at line 39 of file wp_weasel_proj.h.

Referenced by updateSprite(), and wp_weasel_proj().

const s8 wp_weasel_proj::standingBounds [static, private]

Definition at line 41 of file wp_weasel_proj.h.

Referenced by wp_weasel_proj().

const s8 wp_weasel_proj::hangingBounds [static, private]

Definition at line 42 of file wp_weasel_proj.h.

const s8 wp_weasel_proj::fallingBounds [static, private]

Definition at line 43 of file wp_weasel_proj.h.

const u8 wp_weasel_proj::INITIALDELAY = 45 [static, private]

Definition at line 45 of file wp_weasel_proj.h.

Referenced by wp_weasel_proj().

const u16 wp_weasel_proj::WALKSPEED = 384 [static, private]

Definition at line 46 of file wp_weasel_proj.h.

Referenced by runLeft(), and runRight().

const u8 wp_weasel_proj::WALKANIMSPEED = 6 [static, private]

Definition at line 47 of file wp_weasel_proj.h.

Referenced by playWalking().

const u8 wp_weasel_proj::HANGDELAY = 30 [static, private]

Definition at line 48 of file wp_weasel_proj.h.

Referenced by hangDown().

u16 wp_weasel_proj::idleTime [private]

Definition at line 50 of file wp_weasel_proj.h.

Referenced by setIdlePeriod(), and updateSprite().

bool wp_weasel_proj::justStoppedIdling [private]

Definition at line 51 of file wp_weasel_proj.h.

Referenced by updateSprite().


The documentation for this class was generated from the following files:
Generated on Tue Mar 13 23:27:56 2007 for MDuel DS by  doxygen 1.5.1-p1