Browse Source

Merge branch 'master' of jp/invaders into master

Merge "Fix bossrush rendering"

Thank you gogs
blue 4 years ago
parent
commit
b9e6818746
1 changed files with 3 additions and 15 deletions
  1. 3 15
      bossrush.cpp

+ 3 - 15
bossrush.cpp

@@ -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();
 
 	}