|
@@ -14,17 +14,6 @@
|
|
|
#include "powerup.hpp"
|
|
|
#include "functions.hpp"
|
|
|
#include "wall.hpp"
|
|
|
-#include <mutex>
|
|
|
-#include <thread>
|
|
|
-
|
|
|
-std::mutex m_player;
|
|
|
-std::mutex m_enemies;
|
|
|
-std::mutex m_bombs;
|
|
|
-std::mutex m_bullets;
|
|
|
-std::mutex m_rockets;
|
|
|
-std::mutex m_pow;
|
|
|
-std::mutex m_boss;
|
|
|
-std::mutex m_walls;
|
|
|
|
|
|
using std::cout;
|
|
|
using std::endl;
|
|
@@ -153,8 +142,6 @@ int main(int argc,char** argv)
|
|
|
if(argc>1)
|
|
|
if(strcmp(argv[1],"--uber-debug")==0){ player1.weaponclass=5; player1.weaponclassrkt=5; player1.rocketlauncher=true; player1.length=MAX_LENGTH; }
|
|
|
|
|
|
- std::thread t_draw(draw,std::ref(player1),std::ref(bullets),std::ref(bombs),std::ref(enemies),std::ref(walls),std::ref(powerups),std::ref(rockets),std::ref(boss1));
|
|
|
-
|
|
|
/////////ENTERING MAIN LOOP
|
|
|
|
|
|
while(1)
|
|
@@ -306,14 +293,15 @@ int main(int argc,char** argv)
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ draw(player1,bullets,bombs,enemies,walls,powerups,rockets,boss1);
|
|
|
write_score(Score,score);
|
|
|
|
|
|
if(boss1.alive){
|
|
|
write_bosshp(BossHP,boss1.health,boss1.healthmax,boss1.name);
|
|
|
- wrefresh(BossHP);
|
|
|
+ wnoutrefresh(BossHP);
|
|
|
}
|
|
|
|
|
|
- wrefresh(Score);
|
|
|
+ wnoutrefresh(Score);
|
|
|
refresh();
|
|
|
|
|
|
}
|