Pass player_info to add_bonus_points_to_score

This commit is contained in:
Kp 2016-10-15 00:53:20 +00:00
parent 25f5fc231a
commit ad35460eb0
3 changed files with 3 additions and 4 deletions

View file

@ -50,7 +50,7 @@ extern array<bitmap_index, MAX_GAUGE_BMS> Gauges_hires; // hires gauges
// Flags for gauges/hud stuff
void add_points_to_score(player_info &, int points);
extern void add_bonus_points_to_score(int points);
void add_bonus_points_to_score(player_info &, int points);
#ifdef dsx
namespace dsx {

View file

@ -948,7 +948,7 @@ static void DoEndLevelScoreGlitz()
} else
endgame_points = is_last_level = 0;
add_bonus_points_to_score(skill_points + energy_points + shield_points + hostage_points + all_hostage_points + endgame_points);
add_bonus_points_to_score(player_info, skill_points + energy_points + shield_points + hostage_points + all_hostage_points + endgame_points);
c = 0;
snprintf(m_str[c++], sizeof(m_str[0]), "%s%i", TXT_SHIELD_BONUS, shield_points); // Return at start to lower menu...

View file

@ -1723,10 +1723,9 @@ void add_points_to_score(player_info &player_info, int points)
/* This is only called in single player when the player is between
* levels.
*/
void add_bonus_points_to_score(int points)
void add_bonus_points_to_score(player_info &player_info, int points)
{
assert(!(Game_mode & GM_MULTI));
auto &player_info = get_local_plrobj().ctype.player_info;
common_add_points_to_score(points, player_info);
}