scene_loader.c
void ChangeProjectileVelocity(SceneData* scene_data, bool add_velocity){
	// Active tank
	Tank* tank = scene_data[SCENE_GAME_MAP].active_tank;
	
	if(add_velocity == true){
		if(tank->velocity_of_projectile >= PROJECTILE_VELOCITY_MAX){
			printf("Reached projectile velocity maximum!\n");
		}else{
			// Increase projectile velocity by PROJECTILE_VELOCITY_STEP
			tank->velocity_of_projectile += PROJECTILE_VELOCITY_STEP;
		}
	}else{
		if(tank->velocity_of_projectile <= PROJECTILE_VELOCITY_MIN){
			printf("Reached projectile velocity minimum!\n");
		}else{
			// Decrease projectile velocity by PROJECTILE_VELOCITY_STEP
			tank->velocity_of_projectile -= PROJECTILE_VELOCITY_STEP;
		}
	}
	printf("Projectile velocity: %.2f\n", tank->velocity_of_projectile);
	
	return;
}
/*  This function increases current active tank projectile velocity  
	if add_velocity == true, increase the velocity
	else decreade projectile velocity by PROJECTILE_VELOCITY_STEP degree  */
This function increases current active tank projectile velocity
if add_velocity == true, increase the velocity
else decreade projectile velocity by PROJECTILE_VELOCITY_STEP degree
This function increases current active tank projectile velocity if add_velocity == true increase the velocity else decreade projectile velocity by PROJECTILE_VELOCITY_STEP degree
void ChangeProjectileVelocity(SceneData* scene_data, bool add_velocity){
	Tank* tank = scene_data[SCENE_GAME_MAP].active_tank;
	if(add_velocity == true){
		if(tank->velocity_of_projectile >= PROJECTILE_VELOCITY_MAX){
			printf("Reached projectile velocity maximum!\n");
		}else{
			tank->velocity_of_projectile += PROJECTILE_VELOCITY_STEP;
		}
	}else{
		if(tank->velocity_of_projectile <= PROJECTILE_VELOCITY_MIN){
			printf("Reached projectile velocity minimum!\n");
		}else{
			tank->velocity_of_projectile -= PROJECTILE_VELOCITY_STEP;
		}
	}
	printf("Projectile velocity: %.2f\n", tank->velocity_of_projectile);
	return;
}
void ChangeProjectileVelocity ( SceneData * scene_data , bool add_velocity ) { Tank * tank = scene_data [ SCENE_GAME_MAP ] . active_tank ; if ( add_velocity == true ) { if ( tank -> velocity_of_projectile >= PROJECTILE_VELOCITY_MAX ) { printf ( " \n " ) ; } else { tank -> velocity_of_projectile += PROJECTILE_VELOCITY_STEP ; } } else { if ( tank -> velocity_of_projectile <= PROJECTILE_VELOCITY_MIN ) { printf ( " \n " ) ; } else { tank -> velocity_of_projectile -= PROJECTILE_VELOCITY_STEP ; } } printf ( " \n " , tank -> velocity_of_projectile ) ; return ; }
This function increases current active tank projectile velocity
if add_velocity == true, increase the velocity
else decreade projectile velocity by PROJECTILE_VELOCITY_STEP degree
This function increases current active tank projectile velocity if add_velocity == true increase the velocity else decreade projectile velocity by PROJECTILE_VELOCITY_STEP degree
// Active tank // Increase projectile velocity by PROJECTILE_VELOCITY_STEP // Decrease projectile velocity by PROJECTILE_VELOCITY_STEP