Skip to content

Commit 7ea7d33

Browse files
committed
Award system refactoring. Part 2.
Dead code removed. Get rid of one Loki using (see #240).
1 parent 7b15fcd commit 7ea7d33

28 files changed

+0
-161
lines changed

src/xrGame/accumulative_states.h

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
#ifndef ACCUMULATIVE_STATES_INCLUDED
22
#define ACCUMULATIVE_STATES_INCLUDED
33

4-
#include <loki/Typelist.h>
5-
64
namespace award_system
75
{
86
enum enum_accumulative_player_values
@@ -46,22 +44,6 @@ enum enum_accumulative_player_values
4644
acpv_count,
4745
}; // enum enum_accumulative_player_values
4846

49-
namespace detail
50-
{
51-
template <enum_accumulative_player_values ValueId, typename T>
52-
struct accumulative_pair_t
53-
{
54-
static enum_accumulative_player_values const value_id = ValueId;
55-
typedef T value_type;
56-
}; // struct accumulative_pair_t
57-
} // namespace detail
58-
59-
#define ACCUMULATIVE_STATE_LIST Loki::NullType
60-
#define ADD_ACCUMULATIVE_STATE(id, type) \
61-
typedef Loki::Typelist<detail::accumulative_pair_t<id, type>, ACCUMULATIVE_STATE_LIST> \
62-
Accumulative_State_Type_##type;
63-
#define SAVE_TYPE_LIST(id, type) Accumulative_State_Type_##type
64-
6547
} // namespace award_system
6648

6749
#endif //#ifndef ACCUMULATIVE_STATES_INCLUDED

src/xrGame/black_list.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,6 @@ class black_list : public player_state_param
2828
AssociativeVector<shared_str, u32> m_victims;
2929
}; // class black_list
3030

31-
ADD_ACCUMULATIVE_STATE(acpv_black_list, black_list);
32-
#undef ACCUMULATIVE_STATE_LIST
33-
#define ACCUMULATIVE_STATE_LIST SAVE_TYPE_LIST(acpv_black_list, black_list)
34-
3531
} // namespace award_system
3632

3733
#endif //#ifndef BLACK_LIST_INCLUDED

src/xrGame/command_switch_counter.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,6 @@ class command_switch_counter : public player_state_param
2323
u32 m_counter;
2424
}; // class command_switch_counter
2525

26-
ADD_ACCUMULATIVE_STATE(acpv_command_switch_count, command_switch_counter);
27-
#undef ACCUMULATIVE_STATE_LIST
28-
#define ACCUMULATIVE_STATE_LIST SAVE_TYPE_LIST(acpv_command_switch_count, command_switch_counter)
29-
3026
} // namespace award_system
3127

3228
#endif //#ifndef COMMAND_SWITCH_COUNTER_INCLUDED

src/xrGame/double_shot_double_kill.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,6 @@ class double_shot_double_kill : public player_state_param
3737
u32 m_shot_count;
3838
}; // class double_shot_double_kill
3939

40-
ADD_ACCUMULATIVE_STATE(acpv_double_shot_double_kill_time, double_shot_double_kill);
41-
#undef ACCUMULATIVE_STATE_LIST
42-
#define ACCUMULATIVE_STATE_LIST SAVE_TYPE_LIST(acpv_double_shot_double_kill_time, double_shot_double_kill)
43-
4440
} // namespace award_system
4541

4642
#endif //#ifndef DOUBLE_SHOT_DOUBLE_KILL_INCLUDED

src/xrGame/faster_than_bullets_time.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,6 @@ class faster_than_bullets_time : public player_state_param
2626
u32 m_no_demag_time;
2727
}; // class faster_than_bullets_time
2828

29-
ADD_ACCUMULATIVE_STATE(acpv_faster_than_bullets_time, faster_than_bullets_time);
30-
#undef ACCUMULATIVE_STATE_LIST
31-
#define ACCUMULATIVE_STATE_LIST SAVE_TYPE_LIST(acpv_faster_than_bullets_time, faster_than_bullets_time)
32-
3329
} // namespace award_system
3430

3531
#endif //#ifndef FASTER_THAN_BULLETS_INCLUDED

src/xrGame/harvest_time.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,6 @@ class harvest_time : public player_state_param
2828
u32 m_spawn_time;
2929
}; // class harvest_time
3030

31-
ADD_ACCUMULATIVE_STATE(acpv_harvest_count, harvest_time);
32-
#undef ACCUMULATIVE_STATE_LIST
33-
#define ACCUMULATIVE_STATE_LIST SAVE_TYPE_LIST(acpv_harvest_count, harvest_time)
34-
3531
} // namespace award_system
3632

3733
#endif //#ifndef HARVEST_TIME_INCLUDED

src/xrGame/invincible_fury.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,6 @@ class player_state_invincible_fury : public player_state_param
2828
u32 m_last_kills;
2929
}; // class player_state_invincible_fury
3030

31-
ADD_ACCUMULATIVE_STATE(acpv_invincible_fury, player_state_invincible_fury);
32-
#undef ACCUMULATIVE_STATE_LIST
33-
#define ACCUMULATIVE_STATE_LIST SAVE_TYPE_LIST(acpv_invincible_fury, player_state_invincible_fury)
34-
3531
} // namespace award_system
3632

3733
#endif //#ifndef INVINCIBLE_FURY_INCLUDED

src/xrGame/killer_victim_velocity_angle.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,6 @@ class killer_victim_angle : public player_state_param
2525
float m_killer_victim_angle_cos;
2626
}; // class killer_victim_angle
2727

28-
ADD_ACCUMULATIVE_STATE(acpv_killer_victim_angle, killer_victim_angle);
29-
#undef ACCUMULATIVE_STATE_LIST
30-
#define ACCUMULATIVE_STATE_LIST SAVE_TYPE_LIST(acpv_killer_victim_angle, killer_victim_angle)
31-
3228
} // namespace award_system
3329

3430
#endif //#ifndef KILLER_VICTIM_VELOCITY_ANGLE_INCLUDED

src/xrGame/player_spot_params.h

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,6 @@ class player_spots_counter : public player_state_param
2222
virtual void reset_game(){};
2323
}; // class player_spots_counter
2424

25-
ADD_ACCUMULATIVE_STATE(acpv_spots, player_spots_counter);
26-
#undef ACCUMULATIVE_STATE_LIST
27-
#define ACCUMULATIVE_STATE_LIST SAVE_TYPE_LIST(acpv_spots, player_spots_counter)
28-
2925
class player_spots_with_top_enemy_divider : public player_spots_counter
3026
{
3127
typedef player_spots_counter inherited;
@@ -40,10 +36,6 @@ class player_spots_with_top_enemy_divider : public player_spots_counter
4036
u32 const get_top_enemy_player_score();
4137
}; // player_spots_with_top_enemy_divider
4238

43-
ADD_ACCUMULATIVE_STATE(acpv_enemy_top_player_div, player_spots_with_top_enemy_divider);
44-
#undef ACCUMULATIVE_STATE_LIST
45-
#define ACCUMULATIVE_STATE_LIST SAVE_TYPE_LIST(acpv_enemy_top_player_div, player_spots_with_top_enemy_divider)
46-
4739
} // namespace award_system
4840

4941
#endif //#ifndef PLAYER_SPOT_PARAMS_INCLUDED

src/xrGame/player_state_achilles_heel.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,6 @@ class achilles_heel_kill : public player_state_param
2525
bool m_achilles_kill_was;
2626
}; // class achilles_heel_kill
2727

28-
ADD_ACCUMULATIVE_STATE(acpv_achilles_heel_ready, achilles_heel_kill);
29-
#undef ACCUMULATIVE_STATE_LIST
30-
#define ACCUMULATIVE_STATE_LIST SAVE_TYPE_LIST(acpv_achilles_heel_ready, achilles_heel_kill)
31-
3228
} // namespace award_system
3329

3430
#endif //#ifndef PLAYER_STATE_ACHILLES_HEEL_INCLUDED

0 commit comments

Comments
 (0)