fixed some warnings

This commit is contained in:
Thomas 2022-01-10 09:36:38 +01:00
parent 2642ff2e69
commit 8e6a206770
No known key found for this signature in database
GPG Key ID: E538821A6CDFDAD7
12 changed files with 20 additions and 22 deletions

View File

@ -41,10 +41,4 @@ private:
void readInvaderType(const configKey& baseKey, InvaderTypeDef&);
};
void ConfigBuilder::dumpInternalValues() const {
for(const auto& ite : internalValues){
cerr << ite.first << " -> " << ite.second << endl;
}
}
#endif

View File

@ -133,10 +133,9 @@ private:
/*!
* @brief main display function, clear the window and calls sub display functions
* @param[in] fps : current screen framerate
* @fn void displayAll(unsigned fps) const;
* @fn void displayAll() const;
*/
void displayAll(unsigned fps) const;
void displayAll() const;
/*!
* @brief display God related objets

View File

@ -6,7 +6,7 @@
* @version 1.0
* @brief Special entity known as "God"
*
* Well, i (Djalim) discovered that Thomas put God in the game
* Well, I (Djalim) discovered that Thomas put God in the game
* I didnt think it was a good idea but no man can stop Thomas
*
*/

View File

@ -11,8 +11,9 @@
#ifndef GUARD_MENU_H
#define GUARD_MENU_H
#include"vector"
#include"string"
#include<vector>
#include<string>
/*!
* @struct Menu

View File

@ -267,7 +267,7 @@ private:
* @param[in] rowSize : size of a line of pixel
* @fn vector<RGBAcolor> mirrorData(const vector<RGBAcolor>& inPixels, unsigned rowSize);
*/
vector<RGBAcolor> mirrorData(const vector<RGBAcolor>& inPixels, unsigned rowSize);
static vector<RGBAcolor> mirrorData(const vector<RGBAcolor>& inPixels, unsigned rowSize);
};

View File

@ -12,7 +12,7 @@
#define GUARD_UTILS_H
#include<vector>
#include<mingl/mingl.h>
#include "mingl/mingl.h"
// hardcoded values
#define PLAYER_HEIGHT 100

View File

@ -30,6 +30,12 @@ void sanitizeValue(string& val) {
}
}
void ConfigBuilder::dumpInternalValues() const {
for(const auto& ite : internalValues){
cerr << ite.first << " -> " << ite.second << endl;
}
}
/* WARNING : This implementation of YAML is not meant to be complete, but to work with our specific needs
* It also can't detect and report errors in a non-YAML-compliant file*/
@ -213,6 +219,7 @@ int ConfigBuilder::getInt(const configKey& key, int def, int min, int max) const
throw config_error("Value for key " + key + " do not follow preconditions : " +
to_string(min) + "<=" + to_string(val) + "<=" + to_string(max));
}
return val;
}catch(config_error& e){
cerr << e.what() << " . Using default value" << endl;
return def;

View File

@ -11,11 +11,10 @@
#include <chrono>
#include <thread>
#include <playMode.h>
#include "mingl/shape/rectangle.h"
#include "playMode.h"
#include "pixelManager.h"
#include "utils.h"
#include "god.h"
#include "mingl/shape/rectangle.h"
using namespace nsShape;
using namespace nsGraphics;

View File

@ -15,7 +15,7 @@
/** Displays the screen once, and returns
* The more important stuff must be drawn last
*/
void Game::displayAll(unsigned fps) const {
void Game::displayAll() const {
pm.drawSprite(pm.gameBackground);
for (unsigned i = 0; i < this->grid.size(); ++i){
for (unsigned j = 0; j < this->grid[i].size(); ++j){
@ -92,7 +92,6 @@ void applyBezier(Position& pos, const Position& point, const double percent) {
pos += (point-pos)*percent;
}
#include<mingl/shape/circle.h>
void Game::displayGod() const {
switch (god.state) {
case GodState::NONE:

View File

@ -127,7 +127,7 @@ WinValue Game::enterGameLoop(){ // returns when game is finished
if(arePlayersDead())return WinValue::INVADERS;
displayAll(fps);
displayAll();
pm.endFrame();

View File

@ -8,8 +8,8 @@
*
*/
#include<invadersGrid.h>
#include<iostream>
#include "invadersGrid.h"
bool InvadersColumn::hasNoValid() const {
return getOutterInvader()==size();

View File

@ -12,7 +12,6 @@
#include <fstream>
#include <sstream>
#include <utility>
#include <openssl/sha.h>
#include "scoresManager.h"
// Our own format : kustom