void SysTick_Handler(void){  // runs at frequency of SysTick interrupts
	GPIO_PORTF_DATA_R ^= 0x02;     // toggle PF1, debugging
	//Game Engigine methods below
	if(GameOverFlag){
		if(Switch_Fire() || Switch_SpecialFire()){
			GameOverFlag = 0;
			Game_Init();
		}
	}
	else{
		Check_Collisions();
		Move_ActiveObjects();  
		if(Switch_Fire()){
			RegMissile_Fire();
			Sound_Shoot();
		}
		if(Switch_SpecialFire()){
			SpecMissile_Fire();
			Sound_Shoot();
		}
		SysTick_Init(Set_Difficulty());
	}
  Semaphore = 1;
}
Example #2
0
//------------HotPotato_SetIt------------
// Set "it" index to input
// Input: index of new "it" character
// Output: none
void HotPotato_SetIt(int data){
	Characters[it].potato=0;				// relieve old player
	it = data;											// pass the potato, set to 31 initially as a sort of no-tag back timer (30hz=1sec)
	Characters[data].potato= 31;
	Sound_Shoot();
}