#include <wp_weasel_proj.h>
Inherits massObject.
Inheritance diagram for wp_weasel_proj:
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 | |
Player * | owner |
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 |
Definition at line 30 of file wp_weasel_proj.h.
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.
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:
Player* wp_weasel_proj::owner [private] |
const s8 wp_weasel_proj::standingBounds [static, private] |
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] |
const u16 wp_weasel_proj::WALKSPEED = 384 [static, private] |
const u8 wp_weasel_proj::WALKANIMSPEED = 6 [static, private] |
const u8 wp_weasel_proj::HANGDELAY = 30 [static, private] |
u16 wp_weasel_proj::idleTime [private] |
bool wp_weasel_proj::justStoppedIdling [private] |