removed frame debugging
This commit is contained in:
		
							parent
							
								
									d3686f2855
								
							
						
					
					
						commit
						c6f86da6db
					
				| @ -121,10 +121,7 @@ WinValue Game::enterGameLoop(){ // returns when game is finished | |||||||
| 	typedef chrono::high_resolution_clock::time_point MyTimePoint; | 	typedef chrono::high_resolution_clock::time_point MyTimePoint; | ||||||
| 	MyTimePoint fpsStartTime = {}; | 	MyTimePoint fpsStartTime = {}; | ||||||
| 
 | 
 | ||||||
| 	DEBUG_INSTR(MyTimePoint debugTime); |  | ||||||
| 	while(window.isOpen()){ | 	while(window.isOpen()){ | ||||||
| 		DEBUG_INSTR(fflush(stdout)); |  | ||||||
| 		DEBUG_MSG("------------") |  | ||||||
| 
 | 
 | ||||||
| 		MyTimePoint startTime = chrono::high_resolution_clock::now(); | 		MyTimePoint startTime = chrono::high_resolution_clock::now(); | ||||||
| 		if(fpsStartTime.time_since_epoch()==chrono::seconds(0)){ | 		if(fpsStartTime.time_since_epoch()==chrono::seconds(0)){ | ||||||
| @ -133,38 +130,26 @@ WinValue Game::enterGameLoop(){ // returns when game is finished | |||||||
| 
 | 
 | ||||||
| 		pm->startFrame(); | 		pm->startFrame(); | ||||||
| 
 | 
 | ||||||
| 		START_TIMER() |  | ||||||
| 		managePlayers(); | 		managePlayers(); | ||||||
| 		PRINT_TIMER("manage players") |  | ||||||
| 		START_TIMER() |  | ||||||
| 		if(manageInvaders()) { // if they went down
 | 		if(manageInvaders()) { // if they went down
 | ||||||
| 			if (invadersTouchPlayer())return WinValue::INVADERS; | 			if (invadersTouchPlayer())return WinValue::INVADERS; | ||||||
| 			tryAwakeGod(); | 			tryAwakeGod(); | ||||||
| 		} | 		} | ||||||
| 		PRINT_TIMER("manage invaders") |  | ||||||
| 
 | 
 | ||||||
| 		START_TIMER() |  | ||||||
| 		if(manageGod())return WinValue::PLAYERS; | 		if(manageGod())return WinValue::PLAYERS; | ||||||
| 		if(arePlayersDead())return WinValue::GOD; | 		if(arePlayersDead())return WinValue::GOD; | ||||||
| 		PRINT_TIMER("god") |  | ||||||
| 
 | 
 | ||||||
| 		START_TIMER() |  | ||||||
| 		moveMissiles(); | 		moveMissiles(); | ||||||
| 		remCollidingProjectiles(); | 		remCollidingProjectiles(); | ||||||
| 		moveTorpedos(); | 		moveTorpedos(); | ||||||
| 		remCollidingProjectiles(); | 		remCollidingProjectiles(); | ||||||
| 		PRINT_TIMER("self collisions") |  | ||||||
| 
 | 
 | ||||||
| 		START_TIMER() |  | ||||||
| 		checkMissilesAndPlayers(); | 		checkMissilesAndPlayers(); | ||||||
| 		if(checkTorpedosAndInvaders())return WinValue::PLAYERS; | 		if(checkTorpedosAndInvaders())return WinValue::PLAYERS; | ||||||
| 		PRINT_TIMER("collisions between entities") |  | ||||||
| 
 | 
 | ||||||
| 		if(arePlayersDead())return WinValue::INVADERS; | 		if(arePlayersDead())return WinValue::INVADERS; | ||||||
| 
 | 
 | ||||||
| 		START_TIMER() |  | ||||||
| 		displayAll(fps); | 		displayAll(fps); | ||||||
| 		PRINT_TIMER("display") |  | ||||||
| 
 | 
 | ||||||
| 		pm->endFrame(); | 		pm->endFrame(); | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user