Skip to content

Commit

Permalink
ajout ecran prestarting
Browse files Browse the repository at this point in the history
  • Loading branch information
simonh88 committed Nov 16, 2015
1 parent c5c7afb commit d8b9561
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
7 changes: 6 additions & 1 deletion Display.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,12 @@ bool Display::blitStaticText(sf::RenderWindow *window)
*/
bool Display::textPlacementLoop(sf::RenderWindow *window)
{
window->draw(setStaticText("Placez vos bateaux !", 30, sf::Vector2u(250,10), true, false));
if (!textureBG.loadFromFile("img/waiting.png", sf::IntRect(0, 0, 800, 600)))
return false;
spriteBG.setTexture(textureBG);
window->draw(spriteBG);
window->draw(setStaticText("A vos armes !", 30, sf::Vector2u(330,10), true, false));

return true;
}
/*Affichage du texte et des sprites du StartMenu*/
Expand Down
4 changes: 2 additions & 2 deletions Game.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ void Game::placementLoop(sf::RenderWindow *window)
// Placement des bateaux de l'ia en secret
//moi.plat.printBateaux(moi.plat.nbBateaux(moi.plat.getCheckerboard()));
ia.placeBateauIA(this->moi.plat.nbBateaux(this->moi.plat.getCheckerboard()), maRecup.getNbRock());
ia.plat.loadTileMap("img/tileSet.png", sf::Vector2u(30, 30), 10, 10);
//ia.plat.loadTileMap("img/tileSet.png", sf::Vector2u(30, 30), 10, 10);
/* TEMPORAIRE IA VS IA
moi.placeBateauIA();
moi.plat.loadTileMap("img/tileSet.png", sf::Vector2u(30, 30), 10, 10);
Expand All @@ -186,7 +186,7 @@ void Game::placementLoop(sf::RenderWindow *window)
}
window->clear(sf::Color::Black);
blitText.textPlacementLoop(window);
window->draw(tmp.plat);
//window->draw(tmp.plat);
window->display();
}
/*Fonction gérant l'affichage du déroulement de la partie */
Expand Down
Binary file modified Naval_C
Binary file not shown.
Binary file added img/waiting.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit d8b9561

Please sign in to comment.