Skip to content

Commit

Permalink
Updated various enums
Browse files Browse the repository at this point in the history
  • Loading branch information
twist84 committed Nov 25, 2024
1 parent 0c4b87b commit ed905d6
Show file tree
Hide file tree
Showing 46 changed files with 1,289 additions and 1,257 deletions.
2 changes: 1 addition & 1 deletion game/source/ai/ai.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ void __cdecl ai_globals_set_ai_active(bool ai_active)
//.text:014321A0 ;
//.text:014321C0 ; void __cdecl ai_globals_update()
//.text:01432690 ;
//.text:014326E0 ; void __cdecl ai_handle_allegiance_status_changed(e_campaign_team, e_campaign_team, bool, bool, bool)
//.text:014326E0 ; void __cdecl ai_handle_allegiance_status_changed(e_game_team, e_game_team, bool, bool, bool)
//.text:01432890 ;

void __cdecl ai_handle_bump(long object_index, long bump_object_index, vector3d const* linear_velocity)
Expand Down
10 changes: 5 additions & 5 deletions game/source/ai/ai_script.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,10 @@ bool ai_print_scripting = false;
//.text:0143DFD0 ; bool __cdecl ai_script_process_fragment(s_file_reference*, char*, char*)
//.text:0143E030 ; void __cdecl ai_scripting_abort_activity(long)
//.text:0143E070 ; long __cdecl ai_scripting_ai_index_from_spawn_formation(long, long)
//.text:0143E0F0 ; void __cdecl ai_scripting_allegiance(e_campaign_team, e_campaign_team)
//.text:0143E1C0 ; void __cdecl ai_scripting_allegiance_break(e_campaign_team, e_campaign_team)
//.text:0143E1F0 ; bool __cdecl ai_scripting_allegiance_broken(e_campaign_team, e_campaign_team)
//.text:0143E230 ; void __cdecl ai_scripting_allegiance_remove(e_campaign_team, e_campaign_team)
//.text:0143E0F0 ; void __cdecl ai_scripting_allegiance(e_game_team, e_game_team)
//.text:0143E1C0 ; void __cdecl ai_scripting_allegiance_break(e_game_team, e_game_team)
//.text:0143E1F0 ; bool __cdecl ai_scripting_allegiance_broken(e_game_team, e_game_team)
//.text:0143E230 ; void __cdecl ai_scripting_allegiance_remove(e_game_team, e_game_team)
//.text:0143E260 ; void __cdecl ai_scripting_allow_dormant(long, bool)
//.text:0143E270 ; void __cdecl ai_scripting_berserk(long, bool)
//.text:0143E2C0 ; long __cdecl ai_scripting_body_count(long)
Expand Down Expand Up @@ -133,7 +133,7 @@ void __cdecl ai_scripting_erase_all()
//.text:014401C0 ; long __cdecl ai_scripting_point_set_get_point(long, short)
//.text:01440230 ; void __cdecl ai_scripting_prefer_target(long, bool)
//.text:014402A0 ; void __cdecl ai_scripting_prefer_target_ai(long, long, bool)
//.text:01440300 ; void __cdecl ai_scripting_prefer_target_team(long, e_campaign_team)
//.text:01440300 ; void __cdecl ai_scripting_prefer_target_team(long, e_game_team)
//.text:01440350 ; long __cdecl ai_scripting_random_point(long, real, real, real)
//.text:01440880 ; void __cdecl ai_scripting_reconnect()
//.text:01440890 ; void __cdecl ai_scripting_render_paths_all()
Expand Down
2 changes: 1 addition & 1 deletion game/source/ai/swarms.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ void __cdecl swarm_delete(long swarm_index)
//.text:014974D0 ; bool __cdecl swarm_perception_find_sense_position(long, real_point3d const*, actor_position_data*)
//.text:014975E0 ;
//.text:01497710 ; bool __cdecl swarm_remove_creature(long, long, bool, bool)
//.text:01497870 ; void __cdecl swarm_set_team(long, e_campaign_team)
//.text:01497870 ; void __cdecl swarm_set_team(long, e_game_team)
//.text:014978E0 ;
//.text:014979B0 ; void __cdecl swarm_spawner_definition_new(swarm_spawner_definition*)
//.text:01497A30 ; void __cdecl swarm_spawner_end(short)
Expand Down
8 changes: 4 additions & 4 deletions game/source/game/game_engine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ void __cdecl game_engine_game_starting()
//.text:0054F670 ; game_engine_get_damage_multiplier, modified by saber
//.text:0054FC10 ; long __cdecl game_engine_get_finalized_player_place(long)
//.text:0054FCC0 ; long __cdecl game_engine_get_finalized_player_score(long)
//.text:0054FDC0 ; long __cdecl game_engine_get_finalized_team_place(e_multiplayer_team)
//.text:0054FDC0 ; long __cdecl game_engine_get_finalized_team_place(e_game_team)
//.text:0054FE70 ; long __cdecl game_engine_get_game_object_list()
//.text:0054FEF0 ; bool __cdecl game_engine_get_hud_interface_state(e_output_user_index, game_engine_interface_state*)
//.text:00550410 ; void __cdecl game_engine_get_in_game_string(long, c_static_wchar_string<256>*)
Expand Down Expand Up @@ -183,7 +183,7 @@ void __cdecl game_engine_get_universal_string(long a1, c_static_wchar_string<256
}

//.text:00550EF0 ; long __cdecl game_engine_get_winning_player()
//.text:00550F50 ; e_multiplayer_team __cdecl game_engine_get_winning_team()
//.text:00550F50 ; e_game_team __cdecl game_engine_get_winning_team()
//.text:00550F80 ; bool __cdecl game_engine_grenades_on_map_allowed()

bool __cdecl game_engine_in_round()
Expand Down Expand Up @@ -369,7 +369,7 @@ long __cdecl game_engine_get_post_round_ticks()
return game_seconds_integer_to_ticks(4);
}

//.text:005521F0 ; void __cdecl game_engine_recompute_team_score(e_multiplayer_team, long)
//.text:005521F0 ; void __cdecl game_engine_recompute_team_score(e_game_team, long)
//.text:00552230 ; void __cdecl game_engine_reset_players_for_new_round()
//.text:00552280 ; void __cdecl game_engine_reset_round_conditions_for_new_round()
//.text:005522B0 ; void __cdecl game_engine_reset_stats_for_round_switch()
Expand Down Expand Up @@ -603,7 +603,7 @@ void __cdecl game_engine_update_round_conditions()

//.text:005537F0 ; void __cdecl game_engine_update_score_and_standing()
//.text:00553B60 ; void __cdecl game_engine_update_talkers()
//.text:00553D20 ; void __cdecl game_engine_update_team(e_multiplayer_team)
//.text:00553D20 ; void __cdecl game_engine_update_team(e_game_team)
//.text:00553DB0 ; void __cdecl game_engine_update_time()
//.text:00553FC0 ; bool __cdecl game_engine_validate_team_designator_for_new_map(e_multiplayer_team_designator)
//.text:00553FF0 ; bool __cdecl game_engine_vehicles_indestructible()
Expand Down
1 change: 0 additions & 1 deletion game/source/game/game_engine_default.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

#pragma pack(push, 4)

enum e_multiplayer_team;
enum e_team_scoring_method;
enum e_multiplayer_team_designator;
enum e_game_team;
Expand Down
6 changes: 3 additions & 3 deletions game/source/game/game_engine_scoring.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

//.text:00555C80 ; long __cdecl game_engine_scoring_get_player_compound_rank(long, enum e_game_engine_scoring_type)
//.text:00555CD0 ; long __cdecl game_engine_scoring_get_player_compound_rank_from_score_list(long, struct s_game_engine_player_score_list const *)
//.text:00555D10 ; long __cdecl game_engine_scoring_get_team_compound_rank(enum e_multiplayer_team, enum e_game_engine_scoring_type)
//.text:00555D60 ; long __cdecl game_engine_scoring_get_team_compound_rank_from_score_list(enum e_multiplayer_team, struct s_game_engine_score_list const *)
//.text:00555D10 ; long __cdecl game_engine_scoring_get_team_compound_rank(enum e_game_team, enum e_game_engine_scoring_type)
//.text:00555D60 ; long __cdecl game_engine_scoring_get_team_compound_rank_from_score_list(enum e_game_team, struct s_game_engine_score_list const *)
//.text:00555DA0 ; void __cdecl game_engine_scoring_initialize_for_new_round(void)
//.text:00555DD0 ; void __cdecl game_engine_scoring_notify_statborg_reset(void)
//.text:00555DF0 ; bool __cdecl game_engine_scoring_sort_players_compare_function(long, long, void const *)
//.text:00555E30 ; bool __cdecl game_engine_scoring_sort_teams_compare_function(enum e_multiplayer_team, enum e_multiplayer_team, void const *)
//.text:00555E30 ; bool __cdecl game_engine_scoring_sort_teams_compare_function(enum e_game_team, enum e_game_team, void const *)
//.text:00555E60 ; void __cdecl game_engine_scoring_update_leaders(void)
//.text:00555EE0 ; void __cdecl game_engine_scoring_update_leaders_internal(struct s_game_engine_score_list const *, struct s_game_engine_score_list const *)
//.text:00556190 ; bool __cdecl game_engine_scoring_update_leaders_is_dirty(void)
Expand Down
10 changes: 5 additions & 5 deletions game/source/game/game_engine_scripting.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ long __cdecl game_engine_active_player_count_by_team(long team)
{
return INVOKE(0x006E5590, game_engine_active_player_count_by_team, team);

//if (!VALID_INDEX(team, k_number_of_multiplayer_teams))
//if (!VALID_INDEX(team, k_multiplayer_team_count))
//{
// generate_event(_event_warning, "invalid team index #%ld passed to game_engine_active_player_count_by_team", team);
// return 0;
Expand All @@ -38,13 +38,13 @@ void __cdecl game_engine_ai_scripting_allegiance(short campaign_team, short team
{
INVOKE(0x006E5620, game_engine_ai_scripting_allegiance, campaign_team, team);

//if (!VALID_INDEX(campaign_team, k_number_of_campaign_teams))
//if (!VALID_INDEX(campaign_team, k_campaign_team_count))
//{
// generate_event(_event_warning, "mp_ai_allegiance: invalid campaign team #%d!", campaign_team);
// return;
//}
//
//if (!VALID_INDEX(team, k_number_of_multiplayer_teams))
//if (!VALID_INDEX(team, k_multiplayer_team_count))
//{
// generate_event(_event_warning, "mp_ai_allegiance: invalid multiplayer team #%d!", team);
// return;
Expand Down Expand Up @@ -85,7 +85,7 @@ void __cdecl game_engine_game_won(short team)
return;
}

if (!VALID_INDEX(team, k_number_of_multiplayer_teams))
if (!VALID_INDEX(team, k_multiplayer_team_count))
{
generate_event(_event_warning, "invalid team index #%ld passed to game_engine_game_won");
return;
Expand Down Expand Up @@ -131,7 +131,7 @@ void __cdecl game_engine_respawn_override_timers(short team)
//if (!game_is_authoritative())
// return;
//
//if (!VALID_INDEX(team, k_number_of_multiplayer_teams))
//if (!VALID_INDEX(team, k_multiplayer_team_count))
// return;
//
//TLS_DATA_GET_VALUE_REFERENCE(game_engine_globals);
Expand Down
22 changes: 11 additions & 11 deletions game/source/game/game_engine_team.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@
//.text:00556200 ; void __cdecl game_engine_build_initial_teams(void)
//.text:00556360 ; void __cdecl game_engine_build_teams(void)
//.text:005563B0 ; void __cdecl game_engine_build_valid_team_mapping(void)
//.text:00556500 ; long __cdecl game_engine_get_any_player_from_team(enum e_multiplayer_team)
//.text:00556500 ; long __cdecl game_engine_get_any_player_from_team(enum e_game_team)
//.text:00556590 ; unsigned short __cdecl game_engine_get_available_teams(void)

bool __cdecl game_engine_has_teams()
{
return INVOKE(0x005565E0, game_engine_has_teams);
}

//.text:00556610 ; bool __cdecl game_engine_is_team_active(enum e_multiplayer_team)
//.text:00556610 ; bool __cdecl game_engine_is_team_active(enum e_game_team)
//.text:00556660 ;

bool __cdecl game_engine_is_team_ever_active(long team)
Expand All @@ -23,22 +23,22 @@ bool __cdecl game_engine_is_team_ever_active(long team)
}

//.text:005566F0 ;
//.text:00556730 ; enum e_multiplayer_team __cdecl game_engine_next_active_team(enum e_multiplayer_team)
//.text:00556750 ; enum e_multiplayer_team __cdecl game_engine_next_inactive_team(enum e_multiplayer_team)
//.text:00556770 ; enum e_multiplayer_team __cdecl game_engine_next_team_internal(enum e_multiplayer_team, bool)
//.text:00556730 ; enum e_game_team __cdecl game_engine_next_active_team(enum e_game_team)
//.text:00556750 ; enum e_game_team __cdecl game_engine_next_inactive_team(enum e_game_team)
//.text:00556770 ; enum e_game_team __cdecl game_engine_next_team_internal(enum e_game_team, bool)
//.text:005567D0 ; void __cdecl game_engine_recompute_active_teams(void)
//.text:005568E0 ;
//.text:00556900 ; bool __cdecl game_engine_team_designator_is_enemy(enum e_multiplayer_team_designator, enum e_multiplayer_team_designator)
//.text:00556920 ; bool __cdecl game_engine_is_team_designator_valid(enum e_multiplayer_team_designator)
//.text:00556950 ; enum e_multiplayer_team __cdecl game_engine_team_designator_to_team_index(enum e_multiplayer_team_designator)
//.text:00556980 ; enum e_multiplayer_team_designator __cdecl game_engine_team_index_to_team_designator(enum e_multiplayer_team)
//.text:005569E0 ; bool __cdecl game_engine_team_is_enemy(enum e_multiplayer_team, enum e_multiplayer_team)
//.text:00556A10 ; bool __cdecl game_engine_team_is_out_of_lives(enum e_multiplayer_team)
//.text:00556AC0 ; long __cdecl game_engine_teams_get_number_of_players_alive(enum e_multiplayer_team)
//.text:00556950 ; enum e_game_team __cdecl game_engine_team_designator_to_team_index(enum e_multiplayer_team_designator)
//.text:00556980 ; enum e_multiplayer_team_designator __cdecl game_engine_team_index_to_team_designator(enum e_game_team)
//.text:005569E0 ; bool __cdecl game_engine_team_is_enemy(enum e_game_team, enum e_game_team)
//.text:00556A10 ; bool __cdecl game_engine_team_is_out_of_lives(enum e_game_team)
//.text:00556AC0 ; long __cdecl game_engine_teams_get_number_of_players_alive(enum e_game_team)
//.text:00556B60 ;
//.text:00556C30 ; long __cdecl game_engine_teams_get_number_of_shared_lives(void)
//.text:00556C40 ; bool __cdecl game_engine_teams_player_can_change_teams(long)
//.text:00556DD0 ; bool __cdecl game_engine_teams_use_one_shared_life(enum e_multiplayer_team)
//.text:00556DD0 ; bool __cdecl game_engine_teams_use_one_shared_life(enum e_game_team)
//.text:00556E60 ; long __cdecl game_engine_variant_get_maximum_team_count(class c_game_variant const *, enum e_map_id)
//.text:00556EB0 ; bool __cdecl game_engine_variant_has_teams(class c_game_variant const *)
//.text:00556ED0 ; bool __cdecl game_engine_variant_is_observer_allowed(class c_game_variant const *)
Expand Down
8 changes: 4 additions & 4 deletions game/source/game/game_engine_variant.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -406,22 +406,22 @@ c_game_engine_infection_variant* c_game_variant::get_infection_variant_writeable

bool c_game_variant::get_integer_game_engine_setting(e_game_variant_parameter parameter, long* out_value) const
{
return get_game_engine_setting(parameter, _text_value_pair_parameter_type_integer, out_value);
return get_game_engine_setting(parameter, _integer_value, out_value);
}

bool c_game_variant::set_integer_game_engine_setting(e_game_variant_parameter parameter, long value)
{
return set_game_engine_setting(parameter, _text_value_pair_parameter_type_integer, value);
return set_game_engine_setting(parameter, _integer_value, value);
}

bool c_game_variant::get_string_id_game_engine_setting(e_game_variant_parameter parameter, long* out_value) const
{
return get_game_engine_setting(parameter, _text_value_pair_parameter_type_string_id, out_value);
return get_game_engine_setting(parameter, _string_id_value, out_value);
}

bool c_game_variant::set_string_id_game_engine_setting(e_game_variant_parameter parameter, long value)
{
return set_game_engine_setting(parameter, _text_value_pair_parameter_type_string_id, value);
return set_game_engine_setting(parameter, _string_id_value, value);
}

bool c_game_variant::get_game_engine_setting(e_game_variant_parameter parameter, e_text_value_pair_parameter_type parameter_type, long* out_value) const
Expand Down
14 changes: 7 additions & 7 deletions game/source/game/multiplayer_game_hopper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -994,7 +994,7 @@ e_session_game_start_error __cdecl multiplayer_game_is_playable(word hopper_iden
//return INVOKE(0x00549650, multiplayer_game_is_playable, hopper_identifier, is_matchmaking, check_hopper, session_membership, out_player_error_mask);

e_session_game_start_error game_start_error = _session_game_start_error_none;
word player_error_mask = 0;
word player_mask = 0;

c_hopper_configuration* hopper = multiplayer_game_hoppers_get_hopper_configuration(hopper_identifier);

Expand All @@ -1004,7 +1004,7 @@ e_session_game_start_error __cdecl multiplayer_game_is_playable(word hopper_iden
{
if (online_has_all_online_enabled_users())
{
game_start_error = _session_game_start_match_error_must_have_live_for_match;
game_start_error = _session_game_start_match_error_must_be_in_live_lobby_for_match;
}
else
{
Expand All @@ -1013,7 +1013,7 @@ e_session_game_start_error __cdecl multiplayer_game_is_playable(word hopper_iden
// player_index = session_membership->get_next_player(player_index))
//{
// if (!session_membership->is_player_online_enabled(player_index))
// player_error_mask |= FLAG(player_index);
// player_mask |= FLAG(player_index);
//}

game_start_error = _session_game_start_match_error_must_have_online_enabled_profiles_for_match;
Expand All @@ -1039,7 +1039,7 @@ e_session_game_start_error __cdecl multiplayer_game_is_playable(word hopper_iden
//{
// if (!session_membership->is_player_online_enabled(player_index))
// {
// player_error_mask |= FLAG(player_index);
// player_mask |= FLAG(player_index);
// game_start_error = _session_game_start_error_account_not_online_enabled;
// }
//}
Expand All @@ -1060,10 +1060,10 @@ e_session_game_start_error __cdecl multiplayer_game_is_playable(word hopper_iden
{
long player_index = bit_vector_lowest_bit_set(peer->player_mask, 16);
if (player_index != NONE)
player_error_mask |= FLAG(player_index);
player_mask |= FLAG(player_index);
}

if (player_error_mask)
if (player_mask)
game_start_error = _session_game_start_error_maximum_multiplayer_split_screen_exceeded;
}
}
Expand Down Expand Up @@ -1133,7 +1133,7 @@ e_session_game_start_error __cdecl multiplayer_game_is_playable(word hopper_iden
}

if (out_player_error_mask)
*out_player_error_mask = player_error_mask;
*out_player_error_mask = player_mask;

return game_start_error;
}
Expand Down
10 changes: 5 additions & 5 deletions game/source/game/multiplayer_game_hopper.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ struct c_hopper_configuration
s_network_http_request_hash game_set_hash;
word hopper_identifier;
long hopper_category;
c_enum<e_hopper_type, long, _hopper_type_ffa_unranked, k_hopper_type_count> hopper_type;
c_enum<e_hopper_type, long, _hopper_type_unranked_ffa, k_hopper_type_count> hopper_type;
long image_index;
long xlast_index;
byte rich_presence_id;
Expand Down Expand Up @@ -96,8 +96,8 @@ struct c_hopper_configuration

union
{
// hopper_type == _hopper_type_ffa_unranked
// hopper_type == _hopper_type_ffa_ranked
// hopper_type == _hopper_type_unranked_ffa
// hopper_type == _hopper_type_ranked_ffa
struct
{
// ffa->minimum_player_count >= 2 && ffa->minimum_player_count <= 16
Expand All @@ -107,7 +107,7 @@ struct c_hopper_configuration
long maximum_player_count;
} ffa;

// hopper_type == _hopper_type_unranked
// hopper_type == _hopper_type_unranked_teams
struct
{
// unranked_teams->team_count >= 2 && unranked_teams->team_count <= 8
Expand All @@ -123,7 +123,7 @@ struct c_hopper_configuration
bool allow_parties_to_split;
} unranked_teams;

// hopper_type == _hopper_type_ranked
// hopper_type == _hopper_type_ranked_teams
struct
{
// ranked_teams->team_count >= 2 && ranked_teams->team_count <= 8
Expand Down
4 changes: 2 additions & 2 deletions game/source/game/player_control.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -363,13 +363,13 @@ void __cdecl player_control_update_machinima()
if (input_state->get_button(_button_action_unknown37).down_frames() == 1) // dpad left
{
player_control_globals->machinima_camera_use_old_controls = !player_control_globals->machinima_camera_use_old_controls;
user_interface_play_sound(_user_interface_sound_effect_x_button, NONE);
user_interface_play_sound(_ui_global_sound_effect_button_x, NONE);
}

if (input_state->get_button(_button_action_unknown38).down_frames() == 1) // dpad right
{
player_control_globals->machinima_camera_debug = !player_control_globals->machinima_camera_debug;
user_interface_play_sound(_user_interface_sound_effect_x_button, NONE);
user_interface_play_sound(_ui_global_sound_effect_button_x, NONE);
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions game/source/game/players.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ bool debug_player_network_aiming = false;
bool debug_objects_biped_melee_in_range = false;
bool debug_render_players = false;
string_id g_player_desired_mode_override = NONE;
long g_character_physics_override = _character_physics_override_none;
long g_character_physics_override = _character_physics_default;

s_player_identifier::s_player_identifier() :
ipv4_address(0),
Expand Down Expand Up @@ -212,7 +212,7 @@ void players_debug_render()
//interface_get_current_display_settings(NULL, NULL, NULL, &bounds);
//bounds.y0 = bounds.y1 - 20;
//
//char const* character_physics_override = g_character_physics_override < k_number_of_character_physics_overrides ? global_character_physics_override_names[g_character_physics_override] : "OUT OF RANGE!";
//char const* character_physics_override = g_character_physics_override < k_total_character_physics_overrides ? global_character_physics_override_names[g_character_physics_override] : "OUT OF RANGE!";
//csnzprintf(string, sizeof(string), "Character Physics Override: %s|n", character_physics_override);
//
//draw_string.set_bounds(&bounds);
Expand Down
Loading

0 comments on commit ed905d6

Please sign in to comment.