AHHHHHH
This commit is contained in:
parent
a2379f9af7
commit
2642ff2e69
@ -14,10 +14,8 @@
|
|||||||
|
|
||||||
#include<climits>
|
#include<climits>
|
||||||
|
|
||||||
/*
|
/* This header will only be imported once, but Djalim told me he would hurt me
|
||||||
* This header will only be imported once, but Djalim told me he would hurt me
|
* if I didn't move it into his own header file instead of the cpp file*/
|
||||||
* if I didn't move it into his own header file instead of the cpp file
|
|
||||||
*/
|
|
||||||
|
|
||||||
class ConfigBuilder{
|
class ConfigBuilder{
|
||||||
public:
|
public:
|
||||||
|
@ -30,10 +30,8 @@ void sanitizeValue(string& val) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/* WARNING : This implementation of YAML is not meant to be complete, but to work with our specific needs
|
||||||
* 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*/
|
||||||
* It also can't detect and report errors in a non-YAML-compliant file
|
|
||||||
*/
|
|
||||||
|
|
||||||
void ConfigBuilder::parseFile(const string& fname) {
|
void ConfigBuilder::parseFile(const string& fname) {
|
||||||
ifstream file(fname);
|
ifstream file(fname);
|
||||||
|
@ -113,8 +113,7 @@ void Game::remCollidingProjectiles(){
|
|||||||
++tor;
|
++tor;
|
||||||
}
|
}
|
||||||
/* if it was colling, it was removed and his Position is now replaced by the next.
|
/* if it was colling, it was removed and his Position is now replaced by the next.
|
||||||
* else, go to the next
|
* else, go to the next */
|
||||||
*/
|
|
||||||
if(!wasColliding)++miss;
|
if(!wasColliding)++miss;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -19,10 +19,8 @@ void Game::awakeGod() {
|
|||||||
* @returns true if we can finish the game
|
* @returns true if we can finish the game
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/* This is a really long function, but I feel like it's still readable because of the switch, and...
|
||||||
* This is a really long function, but I feel like it's still readable because of the switch, and...
|
* Honestly I think splitting it into multiple small functions would be ugly*/
|
||||||
* Honestly I think splitting it into multiple small functions would be ugly
|
|
||||||
*/
|
|
||||||
bool Game::manageGod() {
|
bool Game::manageGod() {
|
||||||
switch (god.state) {
|
switch (god.state) {
|
||||||
case GodState::NONE: {
|
case GodState::NONE: {
|
||||||
@ -86,10 +84,8 @@ bool Game::manageGod() {
|
|||||||
playerID target;
|
playerID target;
|
||||||
if (players.size() == 1)target = PLAYER1; // don't want to use random if not needed
|
if (players.size() == 1)target = PLAYER1; // don't want to use random if not needed
|
||||||
else target = rand() % players.size();
|
else target = rand() % players.size();
|
||||||
/*
|
/* Let's just pretend god is drunk and can fire at a player that have a death animation, because
|
||||||
* Let's just pretend god is drunk and can fire at a player that have a death animation, because
|
* honestly at this point I want to re-code the whole game engine to allow a better handling of cases like this...*/
|
||||||
* honestly at this point I want to re-code the whole game engine to allow a better handling of cases like this...
|
|
||||||
*/
|
|
||||||
|
|
||||||
Position playerMiddlePos(players[target].x + confData.playersWidth / 2,
|
Position playerMiddlePos(players[target].x + confData.playersWidth / 2,
|
||||||
pm.getScreenHeight() - PLAYER_HEIGHT / 2);
|
pm.getScreenHeight() - PLAYER_HEIGHT / 2);
|
||||||
|
@ -41,8 +41,7 @@ void ScoresManager::readFile() {
|
|||||||
|
|
||||||
/* the first line is the hash sum of (the following content + a secret key)
|
/* the first line is the hash sum of (the following content + a secret key)
|
||||||
* We use it to generate a data signature to prevent users
|
* We use it to generate a data signature to prevent users
|
||||||
* from tampering with the save file
|
* from tampering with the save file*/
|
||||||
*/
|
|
||||||
size_t hash;
|
size_t hash;
|
||||||
ifs >> hash;
|
ifs >> hash;
|
||||||
ifs.get(); // remove \n
|
ifs.get(); // remove \n
|
||||||
|
Loading…
Reference in New Issue
Block a user