This commit is contained in:
imuny 2022-01-06 14:19:39 +01:00
parent 5c3de700fe
commit a22ae07829
3 changed files with 23 additions and 23 deletions

View File

@ -72,14 +72,6 @@ void PixelManager::drawBackground() const {
background.draw(window);
}
PlayMode PixelManager::showInitialMenu() const {
return PlayMode::SINGLE;
}
bool PixelManager::showDeathMenu() const {
return true;
}
unsigned PixelManager::getScreenHeight() const {
return window.getWindowSize().getY();
}
@ -118,4 +110,17 @@ void PixelManager::drawGodLeftHand(const Position& pos, bool closed) const {
void PixelManager::drawFPS(unsigned fps) const {
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);
}

View File

@ -5,6 +5,7 @@ using namespace std;
// TODO changer tout les unsigned par des size_t dans les boucles
int main(){
srand(time(NULL));
Game g;
g.managedGames();

View File

@ -3,19 +3,13 @@
#include "utils.h"
#include "god.h"
using namespace nsShape;
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);
PlayMode PixelManager::showInitialMenu() const {
return PlayMode::SINGLE;
}
bool PixelManager::showDeathMenu() const {
return true;
}