god angry

This commit is contained in:
Thomas 2022-01-06 17:27:07 +01:00
parent bdbcd4eec2
commit c85d677afa
No known key found for this signature in database
GPG Key ID: E538821A6CDFDAD7
5 changed files with 14 additions and 9 deletions

View File

@ -11,6 +11,7 @@ enum class GodState{
RETRIEVE1, RETRIEVE1,
RETRIEVE2, RETRIEVE2,
THROW, THROW,
YOLO,
}; };
// I don't want to put that in config, I feel like it would be useless and overkill at this point // I don't want to put that in config, I feel like it would be useless and overkill at this point
#define GOD_BENCH_SIZE 64 #define GOD_BENCH_SIZE 64

View File

@ -65,7 +65,7 @@ public:
void drawGodRightHand(const Position& pos) const; void drawGodRightHand(const Position& pos) const;
void drawGodLeftHand(const Position& pos) const; void drawGodLeftHand(const Position& pos) const;
void drawGodFace(int y) const; void drawGodFace(int y, bool angry=false) const;
private: private:
// Explanation for choices : // Explanation for choices :

View File

@ -102,10 +102,11 @@ void PixelManager::drawGodLeftHand(const Position& pos) const {
drawSprite(leftHand, pos); drawSprite(leftHand, pos);
} }
void PixelManager::drawGodFace(int y) const { void PixelManager::drawGodFace(int y, bool angry) const {
Text t( Text t(
Position(getScreenWidth()/2, y), Position(getScreenWidth()/2, y),
".w.", nsGraphics::KBlue, angry ? ">w<" : ".w.",
nsGraphics::KBlue,
GlutFont::GlutFonts::BITMAP_TIMES_ROMAN_24, GlutFont::GlutFonts::BITMAP_TIMES_ROMAN_24,
Text::HorizontalAlignment::ALIGNH_CENTER Text::HorizontalAlignment::ALIGNH_CENTER
); );

View File

@ -17,7 +17,7 @@ void PixelManager::displayMenu(const Position& pos, Menu& currentMenu){
startFrame(); startFrame();
size_t margin = 0; size_t margin = 0;
size_t cpt = 0; size_t cpt = 0;
for(auto& value : currentMenu.entries ){ for(string& value : currentMenu.entries ){
displayButton(Position(0,0+margin)+ pos, value, (currentMenu.currentValue == cpt) ? currentMenu.selectedColor : currentMenu.unSelectedColor ); displayButton(Position(0,0+margin)+ pos, value, (currentMenu.currentValue == cpt) ? currentMenu.selectedColor : currentMenu.unSelectedColor );
++cpt; ++cpt;
margin += 50; margin += 50;

View File

@ -113,9 +113,12 @@ bool Game::manageGod() {
* we do not need to reset other members, they'll be treated as non-initialized * we do not need to reset other members, they'll be treated as non-initialized
* When we cycle back between states * When we cycle back between states
*/ */
}
return false; return false;
} }
case GodState::YOLO: {
}
}
} }
Position God::getRightHandPos(unsigned screenWidth) const { Position God::getRightHandPos(unsigned screenWidth) const {