Browse Source

Remove unused commands parameter in setup_level()

Matteo Zeccoli Marazzini 4 years ago
parent
commit
7da20d6ef4
3 changed files with 4 additions and 4 deletions
  1. 1 1
      functions.cpp
  2. 1 1
      functions.hpp
  3. 2 2
      invaders.cpp

+ 1 - 1
functions.cpp

@@ -294,7 +294,7 @@ int choose_level(int* commands)
 	return input - '0';
 }
 
-void setup_level(int level, double& shootr, double& poweruprate, int& refresh_t, boss& boss1, int& enemy_num, int& walls_num, int* commands)
+void setup_level(int level, double& shootr, double& poweruprate, int& refresh_t, boss& boss1, int& enemy_num, int& walls_num)
 {
 	switch(level)        //setting game parameters
 	{

+ 1 - 1
functions.hpp

@@ -64,7 +64,7 @@ void print_scores();
 
 int choose_level(int* commands);
 
-void setup_level(int level, double& shootr, double& poweruprate, int& refresh_t, boss& boss1, int& enemy_num, int& walls_num, int* commands);
+void setup_level(int level, double& shootr, double& poweruprate, int& refresh_t, boss& boss1, int& enemy_num, int& walls_num);
 
 void change_commands(int* commands);
 

+ 2 - 2
invaders.cpp

@@ -105,7 +105,7 @@ int main(int argc,char** argv)
 	//////////PROGRAM START: creation of game objects and set of parameters
 	
 	level = choose_level(commands);     	// get desired level
-	setup_level(level, shootrate, poweruprate, refresh_time, boss1, enemy_num, walls_num, commands);     	// set game parameters and boss
+	setup_level(level, shootrate, poweruprate, refresh_time, boss1, enemy_num, walls_num);     	// set game parameters and boss
 	load_enemies(enemies,enemy_num);
 	player1.set_commands(commands);
 	erase();
@@ -275,7 +275,7 @@ int main(int argc,char** argv)
 					refresh();
 					if(choice=='n')
 						level = choose_level(commands);     	// get desired level
-					setup_level(level, shootrate, poweruprate, refresh_time, boss1, enemy_num, walls_num, commands);     	// set game parameters and boss
+					setup_level(level, shootrate, poweruprate, refresh_time, boss1, enemy_num, walls_num);     	// set game parameters and boss
 					load_enemies(enemies,enemy_num);
 					reset(player1, enemies, boss1, bullets, bombs, walls, walls_num, powerups, rockets, chflag); // reset box, player, enemy and deletes all bullets and bombs
 					erase();