Skip to content

Commit

Permalink
Award system refactoring. Part 2.
Browse files Browse the repository at this point in the history
Dead code removed. Get rid of one Loki using (see #240).
  • Loading branch information
drug007 committed Oct 18, 2018
1 parent 7b15fcd commit 7ea7d33
Show file tree
Hide file tree
Showing 28 changed files with 0 additions and 161 deletions.
18 changes: 0 additions & 18 deletions src/xrGame/accumulative_states.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
#ifndef ACCUMULATIVE_STATES_INCLUDED
#define ACCUMULATIVE_STATES_INCLUDED

#include <loki/Typelist.h>

namespace award_system
{
enum enum_accumulative_player_values
Expand Down Expand Up @@ -46,22 +44,6 @@ enum enum_accumulative_player_values
acpv_count,
}; // enum enum_accumulative_player_values

namespace detail
{
template <enum_accumulative_player_values ValueId, typename T>
struct accumulative_pair_t
{
static enum_accumulative_player_values const value_id = ValueId;
typedef T value_type;
}; // struct accumulative_pair_t
} // namespace detail

#define ACCUMULATIVE_STATE_LIST Loki::NullType
#define ADD_ACCUMULATIVE_STATE(id, type) \
typedef Loki::Typelist<detail::accumulative_pair_t<id, type>, ACCUMULATIVE_STATE_LIST> \
Accumulative_State_Type_##type;
#define SAVE_TYPE_LIST(id, type) Accumulative_State_Type_##type

} // namespace award_system

#endif //#ifndef ACCUMULATIVE_STATES_INCLUDED
4 changes: 0 additions & 4 deletions src/xrGame/black_list.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,6 @@ class black_list : public player_state_param
AssociativeVector<shared_str, u32> m_victims;
}; // class black_list

ADD_ACCUMULATIVE_STATE(acpv_black_list, black_list);
#undef ACCUMULATIVE_STATE_LIST
#define ACCUMULATIVE_STATE_LIST SAVE_TYPE_LIST(acpv_black_list, black_list)

} // namespace award_system

#endif //#ifndef BLACK_LIST_INCLUDED
4 changes: 0 additions & 4 deletions src/xrGame/command_switch_counter.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,6 @@ class command_switch_counter : public player_state_param
u32 m_counter;
}; // class command_switch_counter

ADD_ACCUMULATIVE_STATE(acpv_command_switch_count, command_switch_counter);
#undef ACCUMULATIVE_STATE_LIST
#define ACCUMULATIVE_STATE_LIST SAVE_TYPE_LIST(acpv_command_switch_count, command_switch_counter)

} // namespace award_system

#endif //#ifndef COMMAND_SWITCH_COUNTER_INCLUDED
4 changes: 0 additions & 4 deletions src/xrGame/double_shot_double_kill.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,6 @@ class double_shot_double_kill : public player_state_param
u32 m_shot_count;
}; // class double_shot_double_kill

ADD_ACCUMULATIVE_STATE(acpv_double_shot_double_kill_time, double_shot_double_kill);
#undef ACCUMULATIVE_STATE_LIST
#define ACCUMULATIVE_STATE_LIST SAVE_TYPE_LIST(acpv_double_shot_double_kill_time, double_shot_double_kill)

} // namespace award_system

#endif //#ifndef DOUBLE_SHOT_DOUBLE_KILL_INCLUDED
4 changes: 0 additions & 4 deletions src/xrGame/faster_than_bullets_time.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,6 @@ class faster_than_bullets_time : public player_state_param
u32 m_no_demag_time;
}; // class faster_than_bullets_time

ADD_ACCUMULATIVE_STATE(acpv_faster_than_bullets_time, faster_than_bullets_time);
#undef ACCUMULATIVE_STATE_LIST
#define ACCUMULATIVE_STATE_LIST SAVE_TYPE_LIST(acpv_faster_than_bullets_time, faster_than_bullets_time)

} // namespace award_system

#endif //#ifndef FASTER_THAN_BULLETS_INCLUDED
4 changes: 0 additions & 4 deletions src/xrGame/harvest_time.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,6 @@ class harvest_time : public player_state_param
u32 m_spawn_time;
}; // class harvest_time

ADD_ACCUMULATIVE_STATE(acpv_harvest_count, harvest_time);
#undef ACCUMULATIVE_STATE_LIST
#define ACCUMULATIVE_STATE_LIST SAVE_TYPE_LIST(acpv_harvest_count, harvest_time)

} // namespace award_system

#endif //#ifndef HARVEST_TIME_INCLUDED
4 changes: 0 additions & 4 deletions src/xrGame/invincible_fury.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,6 @@ class player_state_invincible_fury : public player_state_param
u32 m_last_kills;
}; // class player_state_invincible_fury

ADD_ACCUMULATIVE_STATE(acpv_invincible_fury, player_state_invincible_fury);
#undef ACCUMULATIVE_STATE_LIST
#define ACCUMULATIVE_STATE_LIST SAVE_TYPE_LIST(acpv_invincible_fury, player_state_invincible_fury)

} // namespace award_system

#endif //#ifndef INVINCIBLE_FURY_INCLUDED
4 changes: 0 additions & 4 deletions src/xrGame/killer_victim_velocity_angle.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,6 @@ class killer_victim_angle : public player_state_param
float m_killer_victim_angle_cos;
}; // class killer_victim_angle

ADD_ACCUMULATIVE_STATE(acpv_killer_victim_angle, killer_victim_angle);
#undef ACCUMULATIVE_STATE_LIST
#define ACCUMULATIVE_STATE_LIST SAVE_TYPE_LIST(acpv_killer_victim_angle, killer_victim_angle)

} // namespace award_system

#endif //#ifndef KILLER_VICTIM_VELOCITY_ANGLE_INCLUDED
8 changes: 0 additions & 8 deletions src/xrGame/player_spot_params.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,6 @@ class player_spots_counter : public player_state_param
virtual void reset_game(){};
}; // class player_spots_counter

ADD_ACCUMULATIVE_STATE(acpv_spots, player_spots_counter);
#undef ACCUMULATIVE_STATE_LIST
#define ACCUMULATIVE_STATE_LIST SAVE_TYPE_LIST(acpv_spots, player_spots_counter)

class player_spots_with_top_enemy_divider : public player_spots_counter
{
typedef player_spots_counter inherited;
Expand All @@ -40,10 +36,6 @@ class player_spots_with_top_enemy_divider : public player_spots_counter
u32 const get_top_enemy_player_score();
}; // player_spots_with_top_enemy_divider

ADD_ACCUMULATIVE_STATE(acpv_enemy_top_player_div, player_spots_with_top_enemy_divider);
#undef ACCUMULATIVE_STATE_LIST
#define ACCUMULATIVE_STATE_LIST SAVE_TYPE_LIST(acpv_enemy_top_player_div, player_spots_with_top_enemy_divider)

} // namespace award_system

#endif //#ifndef PLAYER_SPOT_PARAMS_INCLUDED
4 changes: 0 additions & 4 deletions src/xrGame/player_state_achilles_heel.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,6 @@ class achilles_heel_kill : public player_state_param
bool m_achilles_kill_was;
}; // class achilles_heel_kill

ADD_ACCUMULATIVE_STATE(acpv_achilles_heel_ready, achilles_heel_kill);
#undef ACCUMULATIVE_STATE_LIST
#define ACCUMULATIVE_STATE_LIST SAVE_TYPE_LIST(acpv_achilles_heel_ready, achilles_heel_kill)

} // namespace award_system

#endif //#ifndef PLAYER_STATE_ACHILLES_HEEL_INCLUDED
4 changes: 0 additions & 4 deletions src/xrGame/player_state_ambassador.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,6 @@ class player_state_ambassador : public player_state_param
bool m_delivered;
}; // class player_state_ambassador

ADD_ACCUMULATIVE_STATE(acpv_ambassador, player_state_ambassador);
#undef ACCUMULATIVE_STATE_LIST
#define ACCUMULATIVE_STATE_LIST SAVE_TYPE_LIST(acpv_ambassador, player_state_ambassador)

} // namespace award_system

#endif //#ifndef PLAYER_STATE_AMBASSADOR_INCLUDED
4 changes: 0 additions & 4 deletions src/xrGame/player_state_ammo_elapsed.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,6 @@ class player_state_ammo_elapsed : public player_state_param
virtual void reset_game(){};
}; // class player_state_ammo_elapsed

ADD_ACCUMULATIVE_STATE(acpv_ammo_elapsed, player_state_ammo_elapsed);
#undef ACCUMULATIVE_STATE_LIST
#define ACCUMULATIVE_STATE_LIST SAVE_TYPE_LIST(acpv_ammo_elapsed, player_state_ammo_elapsed)

} // namespace award_system

#endif //#ifndef PLAYER_STATE_AMMO_ELAPSED_INCLUDED
4 changes: 0 additions & 4 deletions src/xrGame/player_state_avenger.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,6 @@ class player_state_avenger : public player_state_param
u32 m_aveng_count;
}; // class player_state_avenger

ADD_ACCUMULATIVE_STATE(acpv_avenger, player_state_avenger);
#undef ACCUMULATIVE_STATE_LIST
#define ACCUMULATIVE_STATE_LIST SAVE_TYPE_LIST(acpv_avenger, player_state_avenger)

} // namespace award_system

#endif //#ifndef PLAYER_STATE_AVENGER
4 changes: 0 additions & 4 deletions src/xrGame/player_state_blitzkrieg.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,6 @@ class player_blitzkrieg : public player_state_param
u32 m_art_drop_count;
}; // class player_blitzkrieg

ADD_ACCUMULATIVE_STATE(acpv_blitzkrieg_time, player_blitzkrieg);
#undef ACCUMULATIVE_STATE_LIST
#define ACCUMULATIVE_STATE_LIST SAVE_TYPE_LIST(acpv_blitzkrieg_time, player_blitzkrieg)

} // namespace award_system

#endif //#ifndef PLAYER_STATE_BLITZKRIEG_INCLUDED
3 changes: 0 additions & 3 deletions src/xrGame/player_state_cherub.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,6 @@ class player_state_cherub : public player_state_param
shared_str m_bearer_name;
}; // class player_state_cherub

ADD_ACCUMULATIVE_STATE(acpv_cherub_ready, player_state_cherub);
#undef ACCUMULATIVE_STATE_LIST
#define ACCUMULATIVE_STATE_LIST SAVE_TYPE_LIST(acpv_cherub_ready, player_state_cherub)
}

#endif //#ifndef PLAYER_STATE_CHERUB_INCLUDED
4 changes: 0 additions & 4 deletions src/xrGame/player_state_climber.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,6 @@ class player_state_climber : public player_state_param
bool m_player_is_climber;
}; // class player_state_climber

ADD_ACCUMULATIVE_STATE(acpv_climber, player_state_climber);
#undef ACCUMULATIVE_STATE_LIST
#define ACCUMULATIVE_STATE_LIST SAVE_TYPE_LIST(acpv_climber, player_state_climber)

} // namespace award_system

#endif //#ifndef PLAYER_STATE_CLIMBER_INCLUDED
4 changes: 0 additions & 4 deletions src/xrGame/player_state_mad.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,6 @@ class player_state_mad : public player_state_param
void clear_old_kills();
}; // class player_state_mad

ADD_ACCUMULATIVE_STATE(acpv_mad, player_state_mad);
#undef ACCUMULATIVE_STATE_LIST
#define ACCUMULATIVE_STATE_LIST SAVE_TYPE_LIST(acpv_mad, player_state_mad)

} // namespace award_system

#endif //#ifndef PLAYER_STATE_MAD_INCLUDED
4 changes: 0 additions & 4 deletions src/xrGame/player_state_marksman.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,6 @@ class player_state_marksman : public player_state_param
u32 m_spawn_time;
}; // class player_state_marksman

ADD_ACCUMULATIVE_STATE(acpv_marksman_count, player_state_marksman);
#undef ACCUMULATIVE_STATE_LIST
#define ACCUMULATIVE_STATE_LIST SAVE_TYPE_LIST(acpv_marksman_count, player_state_marksman)

} // namespace award_system

#endif //#ifndef PLAYER_STATE_MARKSMAN
4 changes: 0 additions & 4 deletions src/xrGame/player_state_multichampion.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,6 @@ class player_multichampion : public player_state_param
bool m_can_be_multichampion;
}; // class player_multichampion

ADD_ACCUMULATIVE_STATE(acpv_multi_champion, player_multichampion);
#undef ACCUMULATIVE_STATE_LIST
#define ACCUMULATIVE_STATE_LIST SAVE_TYPE_LIST(acpv_multi_champion, player_multichampion)

} // namespace award_system

#endif //#ifndef PLAYER_STATE_MULTICHAMPION_INCLUDED
4 changes: 0 additions & 4 deletions src/xrGame/player_state_opener.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,6 @@ class player_state_opener : public player_state_param
bool m_opener_ready;
}; // class player_state_opener

ADD_ACCUMULATIVE_STATE(acpv_opener_ready, player_state_opener);
#undef ACCUMULATIVE_STATE_LIST
#define ACCUMULATIVE_STATE_LIST SAVE_TYPE_LIST(acpv_opener_ready, player_state_opener)

} // namespace award_system

#endif //#ifndef PLAYER_STATE_OPENER_INCLUDED
24 changes: 0 additions & 24 deletions src/xrGame/player_state_params.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,6 @@ class player_death_counter : public player_state_param
virtual void reset_game(){};
}; // class player_death_counter

ADD_ACCUMULATIVE_STATE(acpv_death_count, player_death_counter);
#undef ACCUMULATIVE_STATE_LIST
#define ACCUMULATIVE_STATE_LIST SAVE_TYPE_LIST(acpv_death_count, player_death_counter)

class player_artdeliver_counter : public player_state_param
{
typedef player_state_param inherited;
Expand All @@ -38,10 +34,6 @@ class player_artdeliver_counter : public player_state_param
virtual void reset_game(){};
}; // class player_artdeliver_counter

ADD_ACCUMULATIVE_STATE(acpv_artdeliver_count, player_artdeliver_counter);
#undef ACCUMULATIVE_STATE_LIST
#define ACCUMULATIVE_STATE_LIST SAVE_TYPE_LIST(acpv_artdeliver_count, player_artdeliver_counter)

class player_rawkill_counter : public player_state_param
{
typedef player_state_param inherited;
Expand All @@ -63,10 +55,6 @@ class player_rawkill_counter : public player_state_param
u32 m_raw_kills;
}; // class player_rawkill_counter

ADD_ACCUMULATIVE_STATE(acpv_kill_in_raw, player_rawkill_counter);
#undef ACCUMULATIVE_STATE_LIST
#define ACCUMULATIVE_STATE_LIST SAVE_TYPE_LIST(acpv_kill_in_raw, player_rawkill_counter)

class player_state_move : public player_state_param
{
typedef player_state_param inherited;
Expand All @@ -81,10 +69,6 @@ class player_state_move : public player_state_param
virtual void reset_game(){};
}; // class player_state_move

ADD_ACCUMULATIVE_STATE(acpv_move_state, player_state_move);
#undef ACCUMULATIVE_STATE_LIST
#define ACCUMULATIVE_STATE_LIST SAVE_TYPE_LIST(acpv_move_state, player_state_move)

class player_state_velocity : public player_state_param
{
typedef player_state_param inherited;
Expand All @@ -99,10 +83,6 @@ class player_state_velocity : public player_state_param
virtual void reset_game(){};
}; // class player_state_velocity

ADD_ACCUMULATIVE_STATE(acpv_move_velocity, player_state_velocity);
#undef ACCUMULATIVE_STATE_LIST
#define ACCUMULATIVE_STATE_LIST SAVE_TYPE_LIST(acpv_move_velocity, player_state_velocity)

class player_state_ang_velocity : public player_state_param
{
typedef player_state_param inherited;
Expand All @@ -117,10 +97,6 @@ class player_state_ang_velocity : public player_state_param
virtual void reset_game(){};
}; // class player_state_ang_velocity

ADD_ACCUMULATIVE_STATE(acpv_move_ang_velocity, player_state_ang_velocity);
#undef ACCUMULATIVE_STATE_LIST
#define ACCUMULATIVE_STATE_LIST SAVE_TYPE_LIST(acpv_move_ang_velocity, player_state_ang_velocity)

} // namespace award_system

#endif //#ifndef DEATH_COUNT_INCLUDED
4 changes: 0 additions & 4 deletions src/xrGame/player_state_remembrance.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,6 @@ class player_state_remembrance : public player_state_param
bool m_is_remembrance;
}; // class player_state_remembrance

ADD_ACCUMULATIVE_STATE(acpv_remembrance, player_state_remembrance);
#undef ACCUMULATIVE_STATE_LIST
#define ACCUMULATIVE_STATE_LIST SAVE_TYPE_LIST(acpv_remembrance, player_state_remembrance)

} // namespace award_system

#endif //#ifndef PLAYER_STATE_REMEMBRANCE
4 changes: 0 additions & 4 deletions src/xrGame/player_state_skewer.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,6 @@ class player_state_skewer : public player_state_param
u32 m_kills_count;
}; // class player_state_skewer

ADD_ACCUMULATIVE_STATE(acpv_skewer_count, player_state_skewer);
#undef ACCUMULATIVE_STATE_LIST
#define ACCUMULATIVE_STATE_LIST SAVE_TYPE_LIST(acpv_skewer_count, player_state_skewer)

} // namespace award_system

#endif //#ifndef PLAYER_STATE_SKEWER_INCLUDED
4 changes: 0 additions & 4 deletions src/xrGame/player_state_toughy.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,6 @@ class player_state_toughy : public player_state_param
u32 m_kills_count;
}; // class player_state_toughy

ADD_ACCUMULATIVE_STATE(acpv_toughy, player_state_toughy);
#undef ACCUMULATIVE_STATE_LIST
#define ACCUMULATIVE_STATE_LIST SAVE_TYPE_LIST(acpv_toughy, player_state_toughy)

} // namespace award_system

#endif //#ifndef PLAYER_STATE_TOUGHY_INCLUDED
16 changes: 0 additions & 16 deletions src/xrGame/player_team_win_score.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,6 @@ class player_team_win_score : public player_state_param
u8 m_player_team;
}; // class player_team_win_score

ADD_ACCUMULATIVE_STATE(acpv_my_team_win_score, player_team_win_score);
#undef ACCUMULATIVE_STATE_LIST
#define ACCUMULATIVE_STATE_LIST SAVE_TYPE_LIST(acpv_my_team_win_score, player_team_win_score)

class player_enemy_team_score : public player_team_win_score
{
typedef player_team_win_score inherited;
Expand All @@ -55,10 +51,6 @@ class player_enemy_team_score : public player_team_win_score

}; // class player_enemy_team_score

ADD_ACCUMULATIVE_STATE(acpv_enemy_team_score, player_enemy_team_score);
#undef ACCUMULATIVE_STATE_LIST
#define ACCUMULATIVE_STATE_LIST SAVE_TYPE_LIST(acpv_enemy_team_score, player_enemy_team_score)

class player_runtime_win_score : public player_team_win_score
{
typedef player_team_win_score inherited;
Expand All @@ -71,10 +63,6 @@ class player_runtime_win_score : public player_team_win_score
virtual void OnPlayerBringArtefact(game_PlayerState const* ps);
}; // class player_runtime_win_score

ADD_ACCUMULATIVE_STATE(acpv_my_team_win_score_now, player_runtime_win_score);
#undef ACCUMULATIVE_STATE_LIST
#define ACCUMULATIVE_STATE_LIST SAVE_TYPE_LIST(acpv_my_team_win_score_now, player_runtime_win_score)

class player_runtime_enemy_team_score : public player_enemy_team_score
{
typedef player_enemy_team_score inherited;
Expand All @@ -86,10 +74,6 @@ class player_runtime_enemy_team_score : public player_enemy_team_score
virtual void OnPlayerBringArtefact(game_PlayerState const* ps);
}; // class player_runtime_enemy_team_score

ADD_ACCUMULATIVE_STATE(acpv_enemy_team_score_now, player_runtime_enemy_team_score);
#undef ACCUMULATIVE_STATE_LIST
#define ACCUMULATIVE_STATE_LIST SAVE_TYPE_LIST(acpv_enemy_team_score_now, player_runtime_enemy_team_score)

} // namespace award_system

#endif //#ifndef PLAYER_TEAM_WIN_SCORE_INCLUDED
Loading

0 comments on commit 7ea7d33

Please sign in to comment.