![]() |
SUPER Space invader : Turbo edition DX - VS GOD 1.0.0
A simple space invader ripoff
|
main display function, clear the window and calls sub display functions More...
#include <pixelManager.h>
Public Member Functions | |
virtual void | loadSprites (vector< Task > &tasks) |
loads sprites in parallel using multiple threads More... | |
PixelManager (MinGL &window) | |
constructor the pixel manager class More... | |
virtual void | drawInvaderA (const Position &baseVector, unsigned size, const RGBAcolor &color) const |
display a type A invader on screen More... | |
virtual void | drawInvaderB (const Position &baseVector, unsigned size, const RGBAcolor &color) const |
display a type B invader on screen More... | |
virtual void | drawInvaderC (const Position &baseVector, unsigned size, const RGBAcolor &color) const |
display a type C invader on screen More... | |
virtual void | drawPlayer (playerID pID, unsigned x, unsigned width, const nsGraphics::RGBAcolor &color) const |
display a player on screen More... | |
virtual void | drawMissile (const Position &baseVector, unsigned width, const nsGraphics::RGBAcolor &color) const |
display a missile on screen More... | |
virtual void | drawTorpedo (const Position &baseVector, unsigned width, const nsGraphics::RGBAcolor &color) const |
display a torpedo on screen More... | |
virtual void | drawHeart (const Position &baseVector) const |
display a singular heart on screen More... | |
void | drawSprite (const MySprite &msp, const Position &pos) const |
display a sprite on screen More... | |
void | displayButton (const Position &baseVector, const string &text, nsGraphics::RGBAcolor &color) |
display a menu button on screen More... | |
void | drawText (const Position &pos, const string &text, const RGBAcolor &color=nsGraphics::KWhite, Font font=Font::BITMAP_TIMES_ROMAN_24) const |
display text on screen More... | |
PlayMode | showInitialMenu () |
show the title screen of the game More... | |
bool | showDeathMenu (const vector< ScoreLink > &rankings, const WinValue &winner) |
show the menu after a player lose, or all invader has been defeated More... | |
unsigned | getScreenHeight () const |
give the height of the screen More... | |
unsigned | getScreenWidth () const |
give the width of the screen More... | |
void | startFrame () const |
clear the screen for a new frame More... | |
void | endFrame () const |
finish a frame render More... | |
void | askPlayerNameMenu (playerID pID, unsigned score, string &name) |
display the player name selection menu More... | |
void | drawGodBench (int y) const |
display god's bar More... | |
void | drawGodFace (int y, bool angry=false) const |
display god's face More... | |
Public Attributes | |
MinGL & | window |
display window More... | |
MySprite | logo |
sprite of the logo of the game More... | |
MySprite | menuBackground |
sprite of the background during menu More... | |
MySprite | gameBackground |
sprite of the background during gameplay More... | |
MySprite | rightHand |
sprite of the right hand of god More... | |
MySprite | leftHand |
sprite of the left hand of god More... | |
main display function, clear the window and calls sub display functions
Definition at line 45 of file pixelManager.h.
|
explicit |
constructor the pixel manager class
[in] | window | : window of the pixel manager |
Definition at line 22 of file drawEntities.cpp.
void PixelManager::askPlayerNameMenu | ( | playerID | pID, |
unsigned | score, | ||
string & | name | ||
) |
display the player name selection menu
[in] | pID | : player id |
[in] | score | : score of this player |
[out] | name | : name selected by the player |
Definition at line 108 of file drawMenus.cpp.
void PixelManager::displayButton | ( | const Position & | baseVector, |
const string & | text, | ||
nsGraphics::RGBAcolor & | color | ||
) |
display a menu button on screen
[in] | baseVector | : pixel coordinates of the button |
[in] | text | : text inside the button |
[in] | color | : color of the text inside the button |
Definition at line 22 of file drawMenus.cpp.
void PixelManager::drawGodBench | ( | int | y | ) | const |
display god's bar
[in] | y | : god y pixel position |
Definition at line 87 of file drawEntities.cpp.
void PixelManager::drawGodFace | ( | int | y, |
bool | angry = false |
||
) | const |
display god's face
[in] | y | : god's face y pixel position |
[in] | angry | : flag if god is angry or not |
Definition at line 91 of file drawEntities.cpp.
|
virtual |
display a singular heart on screen
[in] | baseVector | : pixel coordinates of the heart |
Definition at line 27 of file drawEntities.cpp.
|
virtual |
display a type A invader on screen
[in] | baseVector | : pixel coordinate of the invader |
[in] | size | : size multiplicator of the invader |
[in] | color | : color multiplicaror of the invader |
Definition at line 33 of file drawEntities.cpp.
|
virtual |
display a type B invader on screen
[in] | baseVector | : pixel coordinate of the invader |
[in] | size | : size multiplicator of the invader |
[in] | color | : color multiplicaror of the invader |
Definition at line 43 of file drawEntities.cpp.
|
virtual |
display a type C invader on screen
[in] | baseVector | : pixel coordinate of the invader |
[in] | size | : size multiplicator of the invader |
[in] | color | : color multiplicaror of the invader |
Definition at line 51 of file drawEntities.cpp.
|
virtual |
display a missile on screen
[in] | baseVector | : pixel coordinates of the missile |
[in] | width | : width of the missle |
[in] | color | : color of the missile |
Definition at line 72 of file drawEntities.cpp.
|
virtual |
display a player on screen
[in] | pID | : the ID of the player to draw |
[in] | x | : horizontal position of the player |
[in] | witdh | : width of the player |
[in] | color | : color of the plater |
Definition at line 60 of file drawEntities.cpp.
display a sprite on screen
[in] | msp | : sprite to draw |
[in] | pos | : pixel coordinates to draw the sprite |
Definition at line 81 of file drawEntities.cpp.
void PixelManager::drawText | ( | const Position & | pos, |
const string & | text, | ||
const RGBAcolor & | color = nsGraphics::KWhite , |
||
Font | font = Font::BITMAP_TIMES_ROMAN_24 |
||
) | const |
display text on screen
[in] | pos | : pixel coordinates of the text |
[in] | text | : text to show on screen |
[in] | color | : color of the text to show |
[in] | font | : the glut font to use for the text |
Definition at line 106 of file drawEntities.cpp.
|
virtual |
display a torpedo on screen
[in] | baseVector | : pixel coordinates of the torpedo |
[in] | width | : width of the torpedo |
[in] | color | : color of the torpedo |
Definition at line 77 of file drawEntities.cpp.
void PixelManager::endFrame | ( | ) | const |
finish a frame render
Definition at line 15 of file pixelManager.cpp.
unsigned PixelManager::getScreenHeight | ( | ) | const |
give the height of the screen
Definition at line 19 of file pixelManager.cpp.
unsigned PixelManager::getScreenWidth | ( | ) | const |
give the width of the screen
Definition at line 23 of file pixelManager.cpp.
|
virtual |
loads sprites in parallel using multiple threads
[in] | tasks | : vectot of task |
Definition at line 4 of file pixelManager.cpp.
show the menu after a player lose, or all invader has been defeated
[in] | rankings | : the current top 5 score |
[in] | winner | : the winner of the game |
Definition at line 156 of file drawMenus.cpp.
PlayMode PixelManager::showInitialMenu | ( | ) |
show the title screen of the game
Definition at line 72 of file drawMenus.cpp.
void PixelManager::startFrame | ( | ) | const |
clear the screen for a new frame
Definition at line 11 of file pixelManager.cpp.
MySprite PixelManager::gameBackground |
sprite of the background during gameplay
Definition at line 73 of file pixelManager.h.
MySprite PixelManager::leftHand |
sprite of the left hand of god
Definition at line 83 of file pixelManager.h.
MySprite PixelManager::logo |
sprite of the logo of the game
Definition at line 63 of file pixelManager.h.
MySprite PixelManager::menuBackground |
sprite of the background during menu
Definition at line 68 of file pixelManager.h.
MySprite PixelManager::rightHand |
sprite of the right hand of god
Definition at line 78 of file pixelManager.h.
MinGL& PixelManager::window |
display window
Definition at line 51 of file pixelManager.h.