starf on dise

This commit is contained in:
imuny 2022-01-06 14:17:30 +01:00
parent af8476c4ba
commit 5c3de700fe
4 changed files with 28 additions and 20 deletions

View File

@ -4,10 +4,10 @@ general:
# Players config
players:
width: 250
width: 100
startXPosition: 50
fireCooldown: 10
speed: 10
speed: 20
user1:
color: red
keys:

View File

@ -1,6 +1,6 @@
560753531201765499
6613206509173847490
Thomas,2500
Thomas,1200
Thomas,1000
Thomas,300
Thomas,0
Thomas,0
Thomas,0

View File

@ -3,9 +3,9 @@
#include "utils.h"
#include "god.h"
using namespace nsShape;
PixelManager::PixelManager(MinGL& a) : window(a) {
window.initGlut();
window.initGraphic();
@ -118,17 +118,4 @@ 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);
}
}

21
src/menuDraw.cpp Normal file
View File

@ -0,0 +1,21 @@
#include <playMode.h>
#include "pixelManager.h"
#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);
}