|
@@ -11,6 +11,8 @@ using std::cout;
|
|
|
using std::endl;
|
|
|
using std::min;
|
|
|
|
|
|
+int ENEMY_NUM=1;
|
|
|
+
|
|
|
int main(int argc,char** argv)
|
|
|
{
|
|
|
if(argc>1){
|
|
@@ -95,7 +97,8 @@ int main(int argc,char** argv)
|
|
|
|
|
|
WALLS_NUM=2;
|
|
|
|
|
|
- ENEMY_NUM=choose_level(shootrate, refresh_time, boss1, level, commands); //choose difficulty level and set game parameters and boss
|
|
|
+ choose_level(shootrate, refresh_time, boss1, level, ENEMY_NUM, commands); //choose difficulty level and set game parameters and boss
|
|
|
+ load_enemies(enemies,ENEMY_NUM);
|
|
|
player1.set_commands(commands);
|
|
|
erase();
|
|
|
|
|
@@ -106,7 +109,6 @@ int main(int argc,char** argv)
|
|
|
|
|
|
Score=newwin(3,10,R/3,C+3);
|
|
|
BossHP=newwin(3,15,R/3-3,C+3);
|
|
|
- load_enemies(enemies,ENEMY_NUM);
|
|
|
|
|
|
int i=0;
|
|
|
for(w_vec::iterator it=walls.begin(); it!=walls.end(); ++it, ++i) //creating walls (in a quite symmetric pattern)
|
|
@@ -259,7 +261,8 @@ int main(int argc,char** argv)
|
|
|
score=0;
|
|
|
erase();
|
|
|
refresh();
|
|
|
- choose_level(shootrate, refresh_time, boss1, level, commands);
|
|
|
+ choose_level(shootrate, refresh_time, boss1, level, ENEMY_NUM, commands);
|
|
|
+ load_enemies(enemies,ENEMY_NUM);
|
|
|
reset(player1, enemies, boss1, bullets, bombs, walls, powerups,rockets, level,chflag); // reset box, player, enemy and deletes all bullets and bombs
|
|
|
erase();
|
|
|
refresh();
|
|
@@ -289,7 +292,8 @@ int main(int argc,char** argv)
|
|
|
score=0;
|
|
|
erase();
|
|
|
refresh();
|
|
|
- choose_level(shootrate, refresh_time, boss1, level, commands);
|
|
|
+ choose_level(shootrate, refresh_time, boss1, level, ENEMY_NUM, commands);
|
|
|
+ load_enemies(enemies,ENEMY_NUM);
|
|
|
reset(player1, enemies, boss1, bullets, bombs, walls, powerups,rockets,level,chflag); // reset box, player, enemy and delete all bullets and bombs
|
|
|
erase();
|
|
|
refresh();
|