![]() |
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... | |
void | drawInvaderA (const Position &baseVector, unsigned size, const RGBAcolor &color) const |
display a type A invader on screen More... | |
void | drawInvaderB (const Position &baseVector, unsigned size, const RGBAcolor &color) const |
display a type B invader on screen More... | |
void | drawInvaderC (const Position &baseVector, unsigned size, const RGBAcolor &color) const |
display a type C invader on screen More... | |
void | drawPlayer (unsigned x, unsigned width, const nsGraphics::RGBAcolor &color) const |
display a player on screen More... | |
void | drawMissile (const Position &baseVector, unsigned width, const nsGraphics::RGBAcolor &color) const |
display a missile on screen More... | |
void | drawTorpedo (const Position &baseVector, unsigned width, const nsGraphics::RGBAcolor &color) const |
display a torpedo on screen More... | |
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 | displayMenu (const Position &pos, Menu ¤tMenu) |
display a menu on screen More... | |
void | displayMenu (const Position &pos, Menu ¤tMenu, const vector< ScoreLink > &rankings, const WinValue &winner) |
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) |
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 |
vector< Task > | drawTasks |
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 50 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 | ||
) |
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.
display a menu on screen
[in] | pos | : pixel coordinates of the menu |
[in,out] | currentMenu | : menu struct conteining the menu option |
[in] | pos | : pixel coordinates of the menu |
[in,out] | currentMenu | : menu struct conteining the menu option |
[in] | rankings | : the current top 10 players |
[in] | winner | : the winner of the game |
Definition at line 28 of file drawMenus.cpp.
void PixelManager::drawGodBench | ( | int | y | ) | const |
display god's bar
[in] | y | : god y pixel position |
Definition at line 86 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 90 of file drawEntities.cpp.
void PixelManager::drawHeart | ( | const Position & | baseVector | ) | const |
display a singular heart on screen
[in] | baseVector | : pixel coordinates of the heart |
Definition at line 27 of file drawEntities.cpp.
void PixelManager::drawInvaderA | ( | const Position & | baseVector, |
unsigned | size, | ||
const RGBAcolor & | color | ||
) | const |
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.
void PixelManager::drawInvaderB | ( | const Position & | baseVector, |
unsigned | size, | ||
const RGBAcolor & | color | ||
) | const |
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.
void PixelManager::drawInvaderC | ( | const Position & | baseVector, |
unsigned | size, | ||
const RGBAcolor & | color | ||
) | const |
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.
void PixelManager::drawMissile | ( | const Position & | baseVector, |
unsigned | width, | ||
const nsGraphics::RGBAcolor & | color | ||
) | const |
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 71 of file drawEntities.cpp.
void PixelManager::drawPlayer | ( | unsigned | x, |
unsigned | width, | ||
const nsGraphics::RGBAcolor & | color | ||
) | const |
display a player on screen
[in] | x | : horizontal position of the player |
[in] | witdh | : width of the player |
[in] | color | : color of the plater |
Definition at line 59 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 80 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 |
Definition at line 105 of file drawEntities.cpp.
void PixelManager::drawTorpedo | ( | const Position & | baseVector, |
unsigned | width, | ||
const nsGraphics::RGBAcolor & | color | ||
) | const |
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 76 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 20 of file pixelManager.cpp.
unsigned PixelManager::getScreenWidth | ( | ) | const |
give the width of the screen
Definition at line 24 of file pixelManager.cpp.
|
virtual |
loads sprites in parallel using multiple threads
[in] | vec | : We take his ownership, so |
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.
|
mutable |
Definition at line 53 of file pixelManager.h.
MySprite PixelManager::gameBackground |
sprite of the background during gameplay
Definition at line 77 of file pixelManager.h.
MySprite PixelManager::leftHand |
sprite of the left hand of god
Definition at line 87 of file pixelManager.h.
MySprite PixelManager::logo |
sprite of the logo of the game
Definition at line 67 of file pixelManager.h.
MySprite PixelManager::menuBackground |
sprite of the background during menu
Definition at line 72 of file pixelManager.h.
MySprite PixelManager::rightHand |
sprite of the right hand of god
Definition at line 82 of file pixelManager.h.
MinGL& PixelManager::window |
Definition at line 52 of file pixelManager.h.