fixed some warnings
This commit is contained in:
		
							parent
							
								
									2642ff2e69
								
							
						
					
					
						commit
						8e6a206770
					
				| @ -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 | ||||
|  | ||||
| @ -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 | ||||
|  | ||||
| @ -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 | ||||
|  * | ||||
|  */ | ||||
|  | ||||
| @ -11,8 +11,9 @@ | ||||
| 
 | ||||
| #ifndef GUARD_MENU_H | ||||
| #define GUARD_MENU_H | ||||
| #include"vector" | ||||
| #include"string" | ||||
| 
 | ||||
| #include<vector> | ||||
| #include<string> | ||||
| 
 | ||||
| /*!
 | ||||
|  * @struct Menu | ||||
|  | ||||
| @ -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); | ||||
| }; | ||||
| 
 | ||||
| 
 | ||||
|  | ||||
| @ -12,7 +12,7 @@ | ||||
| #define GUARD_UTILS_H | ||||
| 
 | ||||
| #include<vector> | ||||
| #include<mingl/mingl.h> | ||||
| #include "mingl/mingl.h" | ||||
| 
 | ||||
| // hardcoded values
 | ||||
| #define PLAYER_HEIGHT 100 | ||||
|  | ||||
| @ -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; | ||||
|  | ||||
| @ -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; | ||||
|  | ||||
| @ -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: | ||||
|  | ||||
| @ -127,7 +127,7 @@ WinValue Game::enterGameLoop(){ // returns when game is finished | ||||
| 
 | ||||
| 		if(arePlayersDead())return WinValue::INVADERS; | ||||
| 
 | ||||
| 		displayAll(fps); | ||||
| 		displayAll(); | ||||
| 
 | ||||
| 		pm.endFrame(); | ||||
| 
 | ||||
|  | ||||
| @ -8,8 +8,8 @@ | ||||
|  * | ||||
|  */ | ||||
| 
 | ||||
| #include<invadersGrid.h> | ||||
| #include<iostream> | ||||
| #include "invadersGrid.h" | ||||
| 
 | ||||
| bool InvadersColumn::hasNoValid() const { | ||||
| 	return getOutterInvader()==size(); | ||||
|  | ||||
| @ -12,7 +12,6 @@ | ||||
| #include <fstream> | ||||
| #include <sstream> | ||||
| #include <utility> | ||||
| #include <openssl/sha.h> | ||||
| #include "scoresManager.h" | ||||
| 
 | ||||
| // Our own format : kustom
 | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user