g fail
This commit is contained in:
parent
5c3de700fe
commit
a22ae07829
@ -72,14 +72,6 @@ void PixelManager::drawBackground() const {
|
|||||||
background.draw(window);
|
background.draw(window);
|
||||||
}
|
}
|
||||||
|
|
||||||
PlayMode PixelManager::showInitialMenu() const {
|
|
||||||
return PlayMode::SINGLE;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool PixelManager::showDeathMenu() const {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
unsigned PixelManager::getScreenHeight() const {
|
unsigned PixelManager::getScreenHeight() const {
|
||||||
return window.getWindowSize().getY();
|
return window.getWindowSize().getY();
|
||||||
}
|
}
|
||||||
@ -119,3 +111,16 @@ void PixelManager::drawGodLeftHand(const Position& pos, bool closed) const {
|
|||||||
void PixelManager::drawFPS(unsigned fps) const {
|
void PixelManager::drawFPS(unsigned fps) const {
|
||||||
window << nsGui::Text(Position(getScreenWidth()-100, 10), "FPS : "+ to_string(fps), nsGraphics::KWhite);
|
window << nsGui::Text(Position(getScreenWidth()-100, 10), "FPS : "+ to_string(fps), nsGraphics::KWhite);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
vector<RGBAcolor>
|
||||||
|
PixelManager::mirrorData(const vector<nsGraphics::RGBAcolor>& inPixels, unsigned rowSize) {
|
||||||
|
vector<RGBAcolor> outPixels;
|
||||||
|
outPixels.reserve(inPixels.size());
|
||||||
|
|
||||||
|
for(unsigned i=0;i<inPixels.size();i+=rowSize){
|
||||||
|
for(unsigned j=0;j<rowSize;++j) {
|
||||||
|
outPixels.push_back(inPixels[i + rowSize - j - 1]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return std::move(outPixels);
|
||||||
|
}
|
@ -5,6 +5,7 @@ using namespace std;
|
|||||||
// TODO changer tout les unsigned par des size_t dans les boucles
|
// TODO changer tout les unsigned par des size_t dans les boucles
|
||||||
int main(){
|
int main(){
|
||||||
srand(time(NULL));
|
srand(time(NULL));
|
||||||
|
|
||||||
Game g;
|
Game g;
|
||||||
g.managedGames();
|
g.managedGames();
|
||||||
|
|
||||||
|
@ -3,19 +3,13 @@
|
|||||||
#include "utils.h"
|
#include "utils.h"
|
||||||
#include "god.h"
|
#include "god.h"
|
||||||
|
|
||||||
|
PlayMode PixelManager::showInitialMenu() const {
|
||||||
using namespace nsShape;
|
return PlayMode::SINGLE;
|
||||||
|
|
||||||
|
|
||||||
vector<RGBAcolor>
|
|
||||||
PixelManager::mirrorData(const vector<nsGraphics::RGBAcolor>& inPixels, unsigned rowSize) {
|
|
||||||
vector<RGBAcolor> outPixels;
|
|
||||||
outPixels.reserve(inPixels.size());
|
|
||||||
|
|
||||||
for(unsigned i=0;i<inPixels.size();i+=rowSize){
|
|
||||||
for(unsigned j=0;j<rowSize;++j) {
|
|
||||||
outPixels.push_back(inPixels[i + rowSize - j - 1]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return std::move(outPixels);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool PixelManager::showDeathMenu() const {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user