gameManager Class Reference

Class to manage game sprites and handle high-level game logic. More...

#include <gameManager.h>

Inherits spriteManager.

Inheritance diagram for gameManager:

Inheritance graph
[legend]
Collaboration diagram for gameManager:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 gameManager (u8 newscreen=0)
 Create a new gameManager instance and assign it a screen to manage.
virtual ~gameManager ()
virtual void activate ()
 In addition to giving this gameManager control of its screen, reset all scores.
virtual void deactivate ()
 In addition to relinquishing control of this gameManager's screen, reset all scores.
virtual void clearOutSprites (bool keepSound=false)
 Flush the sprite system and reset everything for a new round.
void loadPlayer1SpriteSet (const unsigned short *p, const unsigned char *s)
 load the sprite data for the first Player
void loadPlayer2SpriteSet (const unsigned short *p, const unsigned char *s)
 load the sprite data for the second Player
void loadEnvSpriteSet (const unsigned short *p, const unsigned char *s)
 load the sprite data for the environment (floor, marshmallow and Pickup spawners)
void loadPickupSpriteSet (const unsigned short *p, const unsigned char *s)
 load the sprite data for the Pickups
void loadFXSpriteSet (const unsigned short *p, const unsigned char *s)
 load the sprite data for the game's effects
void loadDunceSpriteSet (const unsigned short *p, const unsigned char *s)
 load the sprite data for the dunce hat
void loadBootsSpriteSet (const unsigned short *p, const unsigned char *s)
 load the sprite data for the boots
void refreshPalletes ()
 Reload all palletes that the game's spriteObjects needs to operate.
void preloadGFX ()
 Preload commonly used GFX for the gameManager's sprites to share.
void unloadGFX ()
 Unload all preloaded GFX from memory.
virtual void gameTick ()
 The game's update function, called once per frame.
void resetGame (bool ending=false)
 Reset the game in order to start a new round.
void generateBricks ()
 Generate a playfield made out of floorTiles.
void generateRopes ()
 Generate the gameManager's Ropes which Players can use to navigate up and down the playfield.
void drawMallow ()
 Generate the marshmallow sea that sits at the bottom of the screen and looks nice.
void generateSpawners ()
 Generate the game's pickup spawners and position them at the correct places on the screen.
void playerSank (Player *p)
 A player drowned in the marshmallow.
void playerDiedSilently (Player *p)
 this death isn't associated with any particular Weapon, it's just for completely silent ones if ever needed
void playerSkulled (Player *p)
 Player was hit by a skull.
void playerLightningd (Player *p)
 A Player was touched by someone with 1000 volts.
void playerMined (Player *p)
 A Player stepped on a mine.
void playerDisintegrated (Player *p)
 A Player was shot by a gun.
void playerWeaseled (Player *p)
 A Player got bitten by a weasel.
void playerPucked (Player *p)
 A Player was hit by a nuclear puck.
void resetScores ()
 reset all score-related variables in preparation for a new match
bool isGamePaused ()
 Check whether or not the game is paused.
pickupGraphicsgetNextAvailablePickupGFXSet ()
 Find the next set of Pickup GFX that are not in use and return them.
void addPickup (Pickup *p)
 Adds a Pickup to the array of available Pickups so that they can be retrieved later.
void removePickup (Pickup *p)
 Removes a Pickup from the array of available Pickups when it has died or is no longer needed.
bool allowPickupSpawning ()
 Check whether or not it is allowable for Pickups to be created.

Public Attributes

u8 p1score
u8 p2score
u8 pointsToWin
u8 p1RoundScore
 the score that Player 1 has accumulated for this round
u8 p2RoundScore
 the score that Player 2 has accumulated for this round
soundData bigSplash
soundData platformExplode
soundData spawnPuff
soundData gotPickup
soundData teleport
soundData skullLoop
soundData skullPickup
soundData lightningHit
soundData lightningLoop
soundData invisOn
soundData invisOff
soundData mineExp
soundData mineDrop
soundData gunFire
soundData bootsJump
soundData smallSplash
soundData chutClose
soundData chutOpen
soundData hookHit
soundData duncePickup
soundData magnetLoop
soundData netThrow
soundData bulletReflect
soundData boomerangLoop
soundData throwSound
soundData weaselSounds [7]
spriteSet player1Sprite
spriteSet player2Sprite
spriteSet tileSprite
spriteSet pickupSprite
spriteSet FXSprite
spriteSet dunceHatSprite
spriteSet bootsSprite
u8 player1000VPallete
const short unsigned int * player1000VPalleteData
vector< pickupGraphicspickupGFX
 all the preloaded GFX that Pickups will hopefully need (maxPickups + 2)
u16 spawnGFX [4]
u16 dunceGFX [2]
u16 bootsGFX [2]
pickupSpawnerpickupSpawners [3]
 the pickupSpawners that generate Pickups for the game
Playerplayer1
 The Player who spawns on the left hand side of the battlefield.
Playerplayer2
 The Player who spawns on the right hand side of the battlefield.
vector< Pickup * > pickups
 a vector of Pickups saves us from having to iterate through all actors to find them
spriteManagermenuTop
 spriteManager which handles the top screen during frontend
spriteManagergameBottom
 spriteManager which handles the bottom screen during gameplay
menuBottommenuBase
 spriteManager which handles the bottom screen during frontend
vector< u8 > pickupMask
 an array of Pickup IDs that are ok to use. These correspond to Pickup::pickupType.
u8 statTimerID
 the timer id of the main timer that is used to record Weapon time statistics

Static Public Attributes

static const u8 MALLOWYPOS = 169
 the Y screen position (in pixels) to play splash effects at

Private Member Functions

void playerDied (Player *p, u8 weaponID=18, bool skipKill=false)
 Called when a Player bites the dust.

Private Attributes

s8 gameEndTimer
 count down from here (in ticks) when round ends, then reset
u8 roundNumber
 the number of the round that is currently being played
bool pauseSpawning
 Set to true to stop Pickups from spawning. Pickups shouldn't spawn when the round is over, as a safety measure.

Static Private Attributes

static const u8 ROUNDENDTIMEOUT = 60
 time in frames that the round will restart after a Player is killed

Classes

struct  pickupGraphics
 holds preloaded graphical data for the game's Pickups, so that we don't have to load them up freshly each time More...

Detailed Description

Class to manage game sprites and handle high-level game logic.

The gameManager works in tandem with a menuGBottom in order to run the game itself. The gameManager is responsible for the 'important' game logic and display, whilst the menuGBottom is responsible for controlling Pickup spawns, showing scores etc and pausing the game.

The game is played in rounds, and a configurable number of rounds make up a match. The gameManager is in control of its screen for the entire duration of the match.

Author:
pospi

Definition at line 53 of file gameManager.h.


Constructor & Destructor Documentation

gameManager::gameManager ( u8  newscreen = 0  )  [inline]

Create a new gameManager instance and assign it a screen to manage.

Parameters:
newscreen the screen this gameManager should handle. 1 is the top screen, 0 is the bottom one.

Definition at line 62 of file gameManager.h.

References bootsSprite, dunceHatSprite, FXSprite, pickupSprite, player1Sprite, player2Sprite, and tileSprite.

gameManager::~gameManager (  )  [virtual]

Definition at line 26 of file gameManager.cpp.


Member Function Documentation

virtual void gameManager::activate (  )  [inline, virtual]

In addition to giving this gameManager control of its screen, reset all scores.

We do this because the gameManager is only activated at the start of a match.

Reimplemented from spriteManager.

Definition at line 81 of file gameManager.h.

References spriteManager::activate(), gameEndTimer, pickupMask, and resetScores().

Referenced by menuBottom::mainAction().

Here is the call graph for this function:

virtual void gameManager::deactivate (  )  [inline, virtual]

In addition to relinquishing control of this gameManager's screen, reset all scores.

Reimplemented from spriteManager.

Definition at line 92 of file gameManager.h.

References spriteManager::deactivate(), and resetScores().

Referenced by menuGBottom::gameTick().

Here is the call graph for this function:

void gameManager::clearOutSprites ( bool  keepSound = false  )  [virtual]

Flush the sprite system and reset everything for a new round.

Sets all spriteSets palleteID's back to -1 so that they will be reloaded when gameManager::refreshPalletes() is called. Also clears the Pickups array and resets the number of active Pickups.

Reimplemented from spriteManager.

Definition at line 619 of file gameManager.cpp.

References bootsSprite, spriteManager::clearOutSprites(), dunceHatSprite, FXSprite, gameBottom, pickupGFX, pickups, pickupSprite, player1, player1Sprite, player2, player2Sprite, and tileSprite.

Referenced by resetGame().

Here is the call graph for this function:

void gameManager::loadPlayer1SpriteSet ( const unsigned short *  p,
const unsigned char *  s 
)

load the sprite data for the first Player

Definition at line 554 of file gameManager.cpp.

References spriteManager::loadSpriteSet(), and player1Sprite.

Referenced by menuBottom::loadPlayerGFX(), and refreshPalletes().

Here is the call graph for this function:

void gameManager::loadPlayer2SpriteSet ( const unsigned short *  p,
const unsigned char *  s 
)

load the sprite data for the second Player

Definition at line 560 of file gameManager.cpp.

References spriteManager::loadSpriteSet(), and player2Sprite.

Referenced by menuBottom::loadPlayerGFX(), and refreshPalletes().

Here is the call graph for this function:

void gameManager::loadEnvSpriteSet ( const unsigned short *  p,
const unsigned char *  s 
)

load the sprite data for the environment (floor, marshmallow and Pickup spawners)

Definition at line 566 of file gameManager.cpp.

References spriteManager::loadSpriteSet(), and tileSprite.

Referenced by main(), and refreshPalletes().

Here is the call graph for this function:

void gameManager::loadPickupSpriteSet ( const unsigned short *  p,
const unsigned char *  s 
)

load the sprite data for the Pickups

Definition at line 572 of file gameManager.cpp.

References spriteManager::loadSpriteSet(), and pickupSprite.

Referenced by main(), and refreshPalletes().

Here is the call graph for this function:

void gameManager::loadFXSpriteSet ( const unsigned short *  p,
const unsigned char *  s 
)

load the sprite data for the game's effects

Definition at line 578 of file gameManager.cpp.

References FXSprite, and spriteManager::loadSpriteSet().

Referenced by main(), and refreshPalletes().

Here is the call graph for this function:

void gameManager::loadDunceSpriteSet ( const unsigned short *  p,
const unsigned char *  s 
)

load the sprite data for the dunce hat

Definition at line 584 of file gameManager.cpp.

References dunceHatSprite, and spriteManager::loadSpriteSet().

Referenced by main(), and refreshPalletes().

Here is the call graph for this function:

void gameManager::loadBootsSpriteSet ( const unsigned short *  p,
const unsigned char *  s 
)

load the sprite data for the boots

Definition at line 590 of file gameManager.cpp.

References bootsSprite, and spriteManager::loadSpriteSet().

Referenced by main(), and refreshPalletes().

Here is the call graph for this function:

void gameManager::refreshPalletes (  ) 

Reload all palletes that the game's spriteObjects needs to operate.

This should be called after flushing the sprite system so that newly created sprites display properly.

Definition at line 600 of file gameManager.cpp.

References bootsSprite, dunceHatSprite, FXSprite, loadBootsSpriteSet(), loadDunceSpriteSet(), loadEnvSpriteSet(), loadFXSpriteSet(), spriteManager::loadPallete(), loadPickupSpriteSet(), loadPlayer1SpriteSet(), loadPlayer2SpriteSet(), pickupSprite, player1000VPallete, player1000VPalleteData, player1Sprite, player2Sprite, and tileSprite.

Referenced by resetGame().

Here is the call graph for this function:

void gameManager::preloadGFX (  ) 

Preload commonly used GFX for the gameManager's sprites to share.

These GFX encompass Player effects (gameManager::spawnGFX), boots (gameManager::bootsGFX) and dunce hats (gameManager::dunceGFX).

Definition at line 137 of file gameManager.cpp.

References bootsGFX, bootsSprite, dunceGFX, dunceHatSprite, FXSprite, spriteManager::loadGFX(), menuBase, menuBottom::numPickups, pickupGFX, pickupSprite, and spawnGFX.

Referenced by resetGame().

Here is the call graph for this function:

void gameManager::unloadGFX (  ) 

Unload all preloaded GFX from memory.

Not currently in use.

See also:
gameManager::preloadGFX()

Definition at line 168 of file gameManager.cpp.

References bootsGFX, dunceGFX, pickupGFX, spriteManager::screen, and spawnGFX.

void gameManager::gameTick (  )  [virtual]

The game's update function, called once per frame.

In addition to the spriteManager's purpose of updating and redrawing spriteObjects, this function also performs additional high-level game logic such as scoring, checking Player inputs and computing collision.

The order of main execution loops is as follows:

This does make some things a little tricky, but it leaves things in a very predictable order with spriteObjects at very specific states after each loop.

Reimplemented from spriteManager.

Definition at line 324 of file gameManager.cpp.

References Player::checkPad(), Player::clearWeapon(), gameBottom, gameEndTimer, spriteManager::gameSprites, spriteManager::gameTick(), spriteManager::getNextSpriteID(), Player::isDisabled(), massObject::isFrozen(), menuBase, p1RoundScore, p1score, p2RoundScore, p2score, pauseSpawning, player1, menuBottom::player1id, player2, menuBottom::player2id, Player::playVictory(), pointsToWin, Player::readyForVictory(), resetGame(), ROUNDENDTIMEOUT, menuBottom::scoreRound(), statTimerID, and Player::updateAnimation().

Referenced by main().

Here is the call graph for this function:

void gameManager::resetGame ( bool  ending = false  ) 

Reset the game in order to start a new round.

This function performs the actions of spriteManager::clearOutSprites() in addition to resetting game objects, Players and scores.

Parameters:
ending whether or not the game is ending and going back to the frontend menus. If ending, draw the game summary screen with victory dancing guy etc.

Definition at line 38 of file gameManager.cpp.

References clearOutSprites(), spriteManager::createSingleFireSprite(), drawMallow(), FXSprite, gameBottom, menuGBottom::gameOver, generateBricks(), generateRopes(), generateSpawners(), spriteObject::getx(), spriteObject::gety(), spriteObject::giveGFX(), spriteObject::giveSprite(), spriteManager::loadGFX(), p1RoundScore, p1score, p2RoundScore, p2score, pickupSpawners, player1, player1Sprite, player2, player2Sprite, spriteObject::playSound(), preloadGFX(), refreshPalletes(), menuGBottom::resetIdleTime(), roundNumber, spriteObject::setArbitraryAnim(), Player::setControls(), spriteObject::setLayer(), spriteObject::setPallete(), Player::setPallete(), spriteObject::setRotSet(), Player::setStartFlipped(), Player::setStartPos(), spawnGFX, spawnPuff, and spriteObject::TICKSPERFRAME.

Referenced by gameTick().

Here is the call graph for this function:

void gameManager::generateBricks (  ) 

Generate a playfield made out of floorTiles.

The same number of tiles are generated each time, even though due to the random nature of the game, some are not used. These extra tiles are simply placed offscreen for the round.

Definition at line 206 of file gameManager.cpp.

References spriteManager::gameSprites, spriteManager::loadGFX(), OFFX, OFFY, and tileSprite.

Referenced by resetGame().

Here is the call graph for this function:

void gameManager::generateRopes (  ) 

Generate the gameManager's Ropes which Players can use to navigate up and down the playfield.

Definition at line 239 of file gameManager.cpp.

References Rope::childGFX, spriteObject::giveGFX(), spriteManager::loadGFX(), Rope::makeStatic(), Rope::setLength(), spriteObject::setPallete(), Rope::setPos(), and tileSprite.

Referenced by resetGame().

Here is the call graph for this function:

void gameManager::drawMallow (  ) 

Generate the marshmallow sea that sits at the bottom of the screen and looks nice.

Definition at line 294 of file gameManager.cpp.

References tileSprite.

Referenced by resetGame().

void gameManager::generateSpawners (  ) 

Generate the game's pickup spawners and position them at the correct places on the screen.

Definition at line 264 of file gameManager.cpp.

References spriteObject::giveSprite(), pickupSpawners, pickupSpawner::SDIR_DOWN, pickupSpawner::SDIR_LEFT, pickupSpawner::SDIR_RIGHT, pickupSpawner::setDirection(), spriteObject::setFrame(), spriteObject::setPallete(), spriteObject::setPos(), and tileSprite.

Referenced by resetGame().

Here is the call graph for this function:

void gameManager::playerSank ( Player p  ) 

A player drowned in the marshmallow.

Award a kill only if the other Player just hit them with their body or a Weapon.

Parameters:
p reference to the Player who died

Definition at line 471 of file gameManager.cpp.

References Player::CS_BASICHIT, Player::CS_BOOMERANG, Player::CS_GRENFALL, Player::CS_INVISPLAYER, Player::CS_SHIELDPLAYER, Player::CS_TNTFALL, Player::CS_WARPEDPLAYER, Player::isNetted(), Player::lastCollision, player1, player2, playerDied(), Player::playSplashEffect(), Pickup::PT_BOOMERANG, Pickup::PT_GRENADE, Pickup::PT_INVIS, Pickup::PT_NET, Pickup::PT_SHIELD, Pickup::PT_TNT, and Pickup::PT_WARP.

Referenced by Player::updateSprite().

Here is the call graph for this function:

void gameManager::playerDiedSilently ( Player p  ) 

this death isn't associated with any particular Weapon, it's just for completely silent ones if ever needed

Parameters:
p reference to the Player who died

Definition at line 443 of file gameManager.cpp.

References player1, player2, playerDied(), and Player::playInvis().

Here is the call graph for this function:

void gameManager::playerSkulled ( Player p  ) 

Player was hit by a skull.

Award a kill if the other Player was using a magnet, or they just bumped into the Player who died.

Parameters:
p reference to the Player who died

Definition at line 455 of file gameManager.cpp.

References Player::CS_NONE, Player::lastCollision, player1, player2, playerDied(), Player::playSkulled(), Pickup::PT_MAGNET, Pickup::PT_SKULL, and Player::usingMagnet().

Referenced by Pickup::playerTouchAction().

Here is the call graph for this function:

void gameManager::playerLightningd ( Player p  ) 

A Player was touched by someone with 1000 volts.

Parameters:
p reference to the Player who died

Definition at line 501 of file gameManager.cpp.

References Player::play1000VHitEffect(), player1, player2, playerDied(), and Pickup::PT_1000V.

Referenced by Player::collidingWith().

Here is the call graph for this function:

void gameManager::playerMined ( Player p  ) 

A Player stepped on a mine.

Parameters:
p reference to the Player who died

Definition at line 512 of file gameManager.cpp.

References player1, player2, playerDied(), Player::playMineHitEffect(), and Pickup::PT_MINE.

Referenced by Player::collidingWith().

Here is the call graph for this function:

void gameManager::playerDisintegrated ( Player p  ) 

A Player was shot by a gun.

Parameters:
p reference to the Player who died

Definition at line 523 of file gameManager.cpp.

References Player::playDisintegrated(), player1, player2, playerDied(), and Pickup::PT_GUN.

Referenced by wp_gun::weaponFireAction().

Here is the call graph for this function:

void gameManager::playerWeaseled ( Player p  ) 

A Player got bitten by a weasel.

Parameters:
p reference to the Player who died

Definition at line 534 of file gameManager.cpp.

References Player::playDisintegrated(), player1, player2, playerDied(), and Pickup::PT_WEASEL.

Referenced by Player::collidingWith().

Here is the call graph for this function:

void gameManager::playerPucked ( Player p  ) 

A Player was hit by a nuclear puck.

Parameters:
p reference to the Player who died

Definition at line 545 of file gameManager.cpp.

References player1, player2, playerDied(), Player::playMineHitEffect(), and Pickup::PT_PUCK.

Referenced by wp_puck_proj::collidingWith().

Here is the call graph for this function:

void gameManager::resetScores (  )  [inline]

reset all score-related variables in preparation for a new match

Definition at line 139 of file gameManager.h.

References p1RoundScore, p1score, p2RoundScore, p2score, and roundNumber.

Referenced by activate(), and deactivate().

bool gameManager::isGamePaused (  ) 

Check whether or not the game is paused.

When paused, the main loop is not executed, which is a very efficient way of stopping the action.

Returns:
true if the game is paused, false otherwise

Definition at line 128 of file gameManager.cpp.

References gameBottom.

Referenced by Player::weaponChange().

gameManager::pickupGraphics * gameManager::getNextAvailablePickupGFXSet (  ) 

Find the next set of Pickup GFX that are not in use and return them.

Returns:
the pickupGraphics set that is next available, or NULL if we have run out

Definition at line 186 of file gameManager.cpp.

References pickupGFX.

Referenced by wp_magnet::popOutPawnWeapon(), and pickupSpawner::updateSprite().

void gameManager::addPickup ( Pickup p  ) 

Adds a Pickup to the array of available Pickups so that they can be retrieved later.

Parameters:
p the Pickup to add to the gameManager::pickups array

Definition at line 649 of file gameManager.cpp.

References pickups.

Referenced by Pickup::Pickup().

void gameManager::removePickup ( Pickup p  ) 

Removes a Pickup from the array of available Pickups when it has died or is no longer needed.

Parameters:
p the Pickup to remvoe from the gameManager::pickups array

Definition at line 659 of file gameManager.cpp.

References pickups.

Referenced by Pickup::~Pickup().

bool gameManager::allowPickupSpawning (  )  [inline]

Check whether or not it is allowable for Pickups to be created.

Returns:
true if Pickup spawning is ok, false otherwise.

Definition at line 195 of file gameManager.h.

References pauseSpawning.

Referenced by menuGBottom::gameTick().

void gameManager::playerDied ( Player p,
u8  weaponID = 18,
bool  skipKill = false 
) [private]

Called when a Player bites the dust.

Freezes the action and awards kill & death statistics to the proper Players.

Parameters:
p a reference to the Player who died
weaponID ID of the Weapon the Player was killed by. Relates to Pickup::pickupType. type 18 is a death by drowning (no Weapon)
skipKill if true, the death was a suicide and no kill points are awarded

Definition at line 410 of file gameManager.cpp.

References Player::disableControls(), Player::freezePlayer(), gameEndTimer, menuBase, p1RoundScore, p2RoundScore, player1, menuBottom::player1id, player2, menuBottom::player2id, ROUNDENDTIMEOUT, menuBottom::scoreDeath(), menuBottom::scoreKill(), and Player::stopNetted().

Referenced by playerDiedSilently(), playerDisintegrated(), playerLightningd(), playerMined(), playerPucked(), playerSank(), playerSkulled(), and playerWeaseled().

Here is the call graph for this function:


Member Data Documentation

u8 gameManager::p1score

Definition at line 132 of file gameManager.h.

Referenced by menuGBottom::gameTick(), gameTick(), resetGame(), and resetScores().

u8 gameManager::p2score

Definition at line 132 of file gameManager.h.

Referenced by menuGBottom::gameTick(), gameTick(), resetGame(), and resetScores().

u8 gameManager::pointsToWin

Definition at line 132 of file gameManager.h.

Referenced by menuGBottom::gameTick(), gameTick(), menuBottom::loadSRAM(), menuBottom::mainAction(), menuBottom::roundsNav(), menuBottom::sramLoadDefaults(), and menuBottom::sramLoadPrevVars().

u8 gameManager::p1RoundScore

the score that Player 1 has accumulated for this round

Definition at line 134 of file gameManager.h.

Referenced by gameTick(), playerDied(), resetGame(), and resetScores().

u8 gameManager::p2RoundScore

the score that Player 2 has accumulated for this round

Definition at line 136 of file gameManager.h.

Referenced by gameTick(), playerDied(), resetGame(), and resetScores().

soundData gameManager::bigSplash

Definition at line 145 of file gameManager.h.

Referenced by main(), Player::playSplashEffect(), and wp_weasel_proj::updateSprite().

soundData gameManager::platformExplode

Definition at line 145 of file gameManager.h.

Referenced by main(), Pickup::~Pickup(), and wp_gren_proj::~wp_gren_proj().

soundData gameManager::spawnPuff

Definition at line 145 of file gameManager.h.

Referenced by main(), and resetGame().

soundData gameManager::gotPickup

Definition at line 145 of file gameManager.h.

Referenced by Player::collidingWith(), and main().

soundData gameManager::teleport

Definition at line 145 of file gameManager.h.

Referenced by main(), and Player::playWarpEffect().

soundData gameManager::skullLoop

Definition at line 145 of file gameManager.h.

Referenced by main(), and Pickup::setType().

soundData gameManager::skullPickup

Definition at line 145 of file gameManager.h.

Referenced by main(), and Player::playSkulled().

soundData gameManager::lightningHit

Definition at line 145 of file gameManager.h.

Referenced by main(), and Player::play1000VHitEffect().

soundData gameManager::lightningLoop

Definition at line 145 of file gameManager.h.

Referenced by main().

soundData gameManager::invisOn

Definition at line 145 of file gameManager.h.

Referenced by main(), and wp_invis::weaponFireAction().

soundData gameManager::invisOff

Definition at line 145 of file gameManager.h.

Referenced by main(), and wp_invis::weaponFireAction().

soundData gameManager::mineExp

Definition at line 145 of file gameManager.h.

Referenced by main(), wp_mine_proj::~wp_mine_proj(), and wp_puck_proj::~wp_puck_proj().

soundData gameManager::mineDrop

Definition at line 145 of file gameManager.h.

Referenced by main().

soundData gameManager::gunFire

Definition at line 145 of file gameManager.h.

Referenced by main(), and wp_gun::weaponFireAction().

soundData gameManager::bootsJump

Definition at line 145 of file gameManager.h.

Referenced by main(), and wp_boot::weaponFireAction().

soundData gameManager::smallSplash

Definition at line 145 of file gameManager.h.

Referenced by main(), wp_puck_proj::updateSprite(), wp_gren_proj::updateSprite(), and wp_boomerang_proj::updateSprite().

soundData gameManager::chutClose

Definition at line 145 of file gameManager.h.

Referenced by main(), and wp_chut::stopFiring().

soundData gameManager::chutOpen

Definition at line 145 of file gameManager.h.

Referenced by main(), and wp_chut::weaponFireAction().

soundData gameManager::hookHit

Definition at line 145 of file gameManager.h.

Referenced by main().

soundData gameManager::duncePickup

Definition at line 145 of file gameManager.h.

Referenced by wp_dunce::equipAction(), and main().

soundData gameManager::magnetLoop

Definition at line 145 of file gameManager.h.

Referenced by main(), and wp_magnet::weaponFireAction().

soundData gameManager::netThrow

Definition at line 145 of file gameManager.h.

Referenced by main(), and wp_net::weaponFireAction().

soundData gameManager::bulletReflect

Definition at line 145 of file gameManager.h.

Referenced by main(), and wp_gun::weaponFireAction().

soundData gameManager::boomerangLoop

Definition at line 145 of file gameManager.h.

Referenced by main(), and wp_boomerang_proj::wp_boomerang_proj().

soundData gameManager::throwSound

Definition at line 145 of file gameManager.h.

Referenced by main(), wp_puck::weaponFireAction(), and wp_gren::weaponFireAction().

soundData gameManager::weaselSounds[7]

Definition at line 147 of file gameManager.h.

Referenced by main(), and wp_weasel_proj::playRandomSnarl().

spriteSet gameManager::player1Sprite

Definition at line 150 of file gameManager.h.

Referenced by clearOutSprites(), gameManager(), loadPlayer1SpriteSet(), refreshPalletes(), and resetGame().

spriteSet gameManager::player2Sprite

Definition at line 150 of file gameManager.h.

Referenced by clearOutSprites(), gameManager(), loadPlayer2SpriteSet(), refreshPalletes(), and resetGame().

spriteSet gameManager::tileSprite

Definition at line 150 of file gameManager.h.

Referenced by clearOutSprites(), drawMallow(), gameManager(), generateBricks(), generateRopes(), generateSpawners(), loadEnvSpriteSet(), and refreshPalletes().

spriteSet gameManager::pickupSprite

Definition at line 150 of file gameManager.h.

Referenced by clearOutSprites(), gameManager(), loadPickupSpriteSet(), Pickup::Pickup(), preloadGFX(), refreshPalletes(), wp_boomerang_proj::wp_boomerang_proj(), wp_gren_proj::wp_gren_proj(), and wp_puck_proj::wp_puck_proj().

spriteSet gameManager::FXSprite

Definition at line 150 of file gameManager.h.

Referenced by clearOutSprites(), wp_shield::equipAction(), gameManager(), loadFXSpriteSet(), Pickup::Pickup(), Player::play1000VHitEffect(), Player::playSplashEffect(), Player::playWarpEffect(), preloadGFX(), refreshPalletes(), resetGame(), wp_weasel_proj::updateSprite(), wp_puck_proj::updateSprite(), wp_gren_proj::updateSprite(), wp_boomerang_proj::updateSprite(), wp_net_proj::wp_net_proj(), wp_weasel_proj::wp_weasel_proj(), Pickup::~Pickup(), wp_gren_proj::~wp_gren_proj(), wp_mine_proj::~wp_mine_proj(), and wp_puck_proj::~wp_puck_proj().

spriteSet gameManager::dunceHatSprite

Definition at line 150 of file gameManager.h.

Referenced by clearOutSprites(), wp_dunce::equipAction(), gameManager(), loadDunceSpriteSet(), preloadGFX(), and refreshPalletes().

spriteSet gameManager::bootsSprite

Definition at line 150 of file gameManager.h.

Referenced by clearOutSprites(), wp_boot::equipAction(), gameManager(), loadBootsSpriteSet(), preloadGFX(), and refreshPalletes().

u8 gameManager::player1000VPallete

Definition at line 151 of file gameManager.h.

Referenced by refreshPalletes(), and wp_1000V::weaponTick().

const short unsigned int* gameManager::player1000VPalleteData

Definition at line 152 of file gameManager.h.

Referenced by main(), and refreshPalletes().

vector<pickupGraphics> gameManager::pickupGFX

all the preloaded GFX that Pickups will hopefully need (maxPickups + 2)

Definition at line 169 of file gameManager.h.

Referenced by clearOutSprites(), getNextAvailablePickupGFXSet(), preloadGFX(), and unloadGFX().

u16 gameManager::spawnGFX[4]

Definition at line 173 of file gameManager.h.

Referenced by Player::play1000VHitEffect(), Player::playSplashEffect(), Player::playWarpEffect(), preloadGFX(), resetGame(), unloadGFX(), wp_gren_proj::~wp_gren_proj(), wp_mine_proj::~wp_mine_proj(), and wp_puck_proj::~wp_puck_proj().

u16 gameManager::dunceGFX[2]

Definition at line 174 of file gameManager.h.

Referenced by wp_dunce::equipAction(), preloadGFX(), and unloadGFX().

u16 gameManager::bootsGFX[2]

Definition at line 175 of file gameManager.h.

Referenced by wp_boot::equipAction(), preloadGFX(), and unloadGFX().

pickupSpawner* gameManager::pickupSpawners[3]

the pickupSpawners that generate Pickups for the game

Definition at line 178 of file gameManager.h.

Referenced by menuGBottom::gameTick(), generateSpawners(), resetGame(), and menuGBottom::spawnPickup().

Player* gameManager::player1

The Player who spawns on the left hand side of the battlefield.

Definition at line 180 of file gameManager.h.

Referenced by clearOutSprites(), Pickup::collidingWith(), wp_dunce::equipAction(), wp_boot::equipAction(), menuGBottom::gameTick(), gameTick(), Player::play1000VHitEffect(), playerDied(), playerDiedSilently(), playerDisintegrated(), playerLightningd(), playerMined(), playerPucked(), playerSank(), playerSkulled(), playerWeaseled(), Player::playSplashEffect(), Player::playWarpEffect(), resetGame(), wp_gren_proj::updateSprite(), Player::weaponChange(), wp_magnet::weaponFireAction(), wp_gun::weaponFireAction(), wp_gren_proj::~wp_gren_proj(), wp_mine_proj::~wp_mine_proj(), and wp_puck_proj::~wp_puck_proj().

Player* gameManager::player2

The Player who spawns on the right hand side of the battlefield.

Definition at line 182 of file gameManager.h.

Referenced by clearOutSprites(), Pickup::collidingWith(), menuGBottom::gameTick(), gameTick(), Player::play1000VHitEffect(), playerDied(), playerDiedSilently(), playerDisintegrated(), playerLightningd(), playerMined(), playerPucked(), playerSank(), playerSkulled(), playerWeaseled(), resetGame(), wp_gren_proj::updateSprite(), wp_magnet::weaponFireAction(), and wp_gun::weaponFireAction().

vector<Pickup*> gameManager::pickups

a vector of Pickups saves us from having to iterate through all actors to find them

Definition at line 184 of file gameManager.h.

Referenced by addPickup(), clearOutSprites(), removePickup(), and wp_magnet::weaponFireAction().

const u8 gameManager::MALLOWYPOS = 169 [static]

the Y screen position (in pixels) to play splash effects at

Definition at line 198 of file gameManager.h.

Referenced by Player::playSplashEffect(), wp_weasel_proj::updateSprite(), wp_puck_proj::updateSprite(), wp_gren_proj::updateSprite(), and wp_boomerang_proj::updateSprite().

spriteManager* gameManager::menuTop

spriteManager which handles the top screen during frontend

Definition at line 200 of file gameManager.h.

Referenced by main().

spriteManager* gameManager::gameBottom

spriteManager which handles the bottom screen during gameplay

Definition at line 202 of file gameManager.h.

Referenced by clearOutSprites(), gameTick(), isGamePaused(), main(), and resetGame().

menuBottom* gameManager::menuBase

spriteManager which handles the bottom screen during frontend

Definition at line 204 of file gameManager.h.

Referenced by gameTick(), main(), playerDied(), Player::playVictory(), preloadGFX(), and Player::weaponChange().

vector<u8> gameManager::pickupMask

an array of Pickup IDs that are ok to use. These correspond to Pickup::pickupType.

Definition at line 206 of file gameManager.h.

Referenced by activate(), menuGBottom::gameTick(), menuBottom::mainAction(), and menuGBottom::spawnPickup().

u8 gameManager::statTimerID

the timer id of the main timer that is used to record Weapon time statistics

Definition at line 208 of file gameManager.h.

Referenced by menuGBottom::gameTick(), gameTick(), main(), Player::Player(), and Player::weaponChange().

s8 gameManager::gameEndTimer [private]

count down from here (in ticks) when round ends, then reset

Definition at line 212 of file gameManager.h.

Referenced by activate(), gameTick(), and playerDied().

u8 gameManager::roundNumber [private]

the number of the round that is currently being played

Definition at line 214 of file gameManager.h.

Referenced by resetGame(), and resetScores().

const u8 gameManager::ROUNDENDTIMEOUT = 60 [static, private]

time in frames that the round will restart after a Player is killed

Definition at line 216 of file gameManager.h.

Referenced by gameTick(), and playerDied().

bool gameManager::pauseSpawning [private]

Set to true to stop Pickups from spawning. Pickups shouldn't spawn when the round is over, as a safety measure.

Definition at line 218 of file gameManager.h.

Referenced by allowPickupSpawning(), and gameTick().


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