mirror of
https://github.com/astromaddie/HaloCE-VR.git
synced 2026-10-23 19:00:15 +02:00
Recover transparent geometry submit (+1,285 meaningful code, zero exact losses); reconcile COMMON ownership and Q10 85+EXT1 credit, actions/main data, and separately disclosed denominator corrections. Preserve canonical-only repairs and all held research. C09 is ordinary disclosed cleanup, not a claim of proven scaffolding intent. Clean rebuild, 1,663 tests, parks, audits, provider links and independent EXT1 check pass. Local reconciliation only.
253 lines
5.1 KiB
C
253 lines
5.1 KiB
C
/*
|
|
AI.H
|
|
|
|
header included in hcex build.
|
|
*/
|
|
|
|
#ifndef __AI_H
|
|
#define __AI_H
|
|
#pragma once
|
|
|
|
/* ---------- constants */
|
|
|
|
enum
|
|
{
|
|
_ai_line_of_sight_clear = 0,
|
|
_ai_line_of_sight_occluded,
|
|
_ai_line_of_sight_from_cover,
|
|
_ai_line_of_sight_to_cover,
|
|
_ai_line_of_sight_obstructed,
|
|
NUMBER_OF_AI_LINE_OF_SIGHTS,
|
|
};
|
|
|
|
enum
|
|
{
|
|
_ai_line_of_sight_normal = 0,
|
|
_ai_line_of_sight_expand_source,
|
|
_ai_line_of_sight_expand_target,
|
|
NUMBER_OF_AI_LINE_OF_SIGHT_MODES,
|
|
};
|
|
|
|
/* ---------- macros */
|
|
|
|
/* ---------- structures */
|
|
|
|
struct ai_unit_information_look_data
|
|
{
|
|
long unit_index;
|
|
};
|
|
|
|
struct ai_object_information_look_data
|
|
{
|
|
long object_index;
|
|
};
|
|
|
|
struct ai_information_look_data
|
|
{
|
|
union
|
|
{
|
|
struct ai_unit_information_look_data unit;
|
|
struct ai_object_information_look_data object;
|
|
};
|
|
};
|
|
|
|
struct ai_allegiance_information_data
|
|
{
|
|
short team1_index;
|
|
short team2_index;
|
|
boolean broken;
|
|
};
|
|
|
|
struct ai_combat_stimulus_information_data
|
|
{
|
|
word pad;
|
|
};
|
|
|
|
struct ai_target_knowledge_information_data
|
|
{
|
|
long prop_index;
|
|
};
|
|
|
|
struct ai_information_data
|
|
{
|
|
union
|
|
{
|
|
struct ai_allegiance_information_data allegiance;
|
|
struct ai_combat_stimulus_information_data combat_stimulus;
|
|
struct ai_target_knowledge_information_data target_knowledge;
|
|
};
|
|
};
|
|
|
|
|
|
struct ai_information_packet
|
|
{
|
|
long target_unit_index;
|
|
short communication_type;
|
|
short dialogue_type_index;
|
|
short damage_category;
|
|
boolean updated_dialogue_timers;
|
|
short look_priority;
|
|
short look_type;
|
|
struct ai_information_look_data look_data;
|
|
short information_type;
|
|
struct ai_information_data information_data;
|
|
};
|
|
|
|
/* ---------- prototypes/AI.C */
|
|
|
|
void ai_initialize(
|
|
void);
|
|
void ai_dispose(
|
|
void);
|
|
void ai_dispose_from_old_map(
|
|
void);
|
|
void ai_initialize_for_new_map(
|
|
void);
|
|
void ai_place(
|
|
void);
|
|
void ai_globals_ai_active(
|
|
boolean enabled);
|
|
void ai_update(
|
|
void);
|
|
void ai_disconnect_from_structure_bsp(
|
|
void);
|
|
void ai_reconnect_to_structure_bsp(
|
|
void);
|
|
void ai_globals_dialogue_triggers_enabled(
|
|
boolean enabled);
|
|
void ai_globals_grenades_enabled(
|
|
boolean enabled);
|
|
void ai_update_team_status(
|
|
void);
|
|
void ai_handle_bump(
|
|
long unit_index,
|
|
long object_index,
|
|
union real_vector3d const *old_velocity);
|
|
void ai_create_mounted_weapons_for_unit(
|
|
long unit_index);
|
|
long ai_get_race_from_team_index(
|
|
short team_index);
|
|
void ai_get_major_upgrade_chance(
|
|
short major_upgrade,
|
|
boolean *upgrade_major,
|
|
boolean *random,
|
|
real *chance);
|
|
void ai_erase(
|
|
long encounter_index,
|
|
long platoon_index,
|
|
long squad_index,
|
|
boolean immediate);
|
|
boolean ai_consider_major_upgrade(
|
|
long encounter_index,
|
|
short squad_index,
|
|
real chance);
|
|
|
|
boolean ai_enemies_attacking_player(
|
|
void);
|
|
boolean ai_enemies_can_see_player(
|
|
void);
|
|
boolean ai_try_vehicle_eviction(
|
|
long actor_index,
|
|
long entering_unit_index,
|
|
boolean immediate);
|
|
long ai_get_responsible_unit(
|
|
long object_index,
|
|
boolean responsible_for_weapon_fire);
|
|
void ai_handle_death(
|
|
long unit_index,
|
|
long killer_object_index,
|
|
short damage_category);
|
|
boolean ai_handle_killing_spree(
|
|
long unit_index,
|
|
short killing_spree_count);
|
|
void ai_handle_allegiance_status_changed(
|
|
short team1_index,
|
|
short team2_index,
|
|
boolean currently_broken,
|
|
boolean permanently_broken);
|
|
void ai_handle_allegiance_broken_notification(
|
|
short team1_index,
|
|
short team2_index,
|
|
boolean broken);
|
|
boolean ai_test_ballistic_line_of_fire(
|
|
long actor_index,
|
|
union real_point3d const *origin,
|
|
real arc_time,
|
|
union real_vector3d const *arc_initial_velocity,
|
|
real arc_acceleration,
|
|
long ignore_object_index,
|
|
boolean ignore_vehicles);
|
|
boolean ai_test_line_of_fire(
|
|
long actor_index,
|
|
long ignore_unit_index,
|
|
union real_point3d const *origin,
|
|
union real_vector3d const *vector,
|
|
long *blocking_prop_index_reference);
|
|
short ai_test_line_of_sight(
|
|
union real_point3d const *point0,
|
|
short cluster0,
|
|
union real_point3d const *point1,
|
|
short cluster1,
|
|
short mode,
|
|
boolean test_line_of_fire,
|
|
long ignore_object_index,
|
|
boolean ignore_vehicles);
|
|
void ai_handle_editing(
|
|
long encounter_index);
|
|
void ai_handle_spatial_effect(
|
|
long object_index,
|
|
union real_point3d const *position,
|
|
short effect_type,
|
|
short volume,
|
|
short count);
|
|
|
|
boolean ai_release_inactive_swarms(
|
|
char *result_description,
|
|
boolean *more_to_release,
|
|
byte *working_memory,
|
|
short working_memory_size);
|
|
void ai_find_inactive_encounters(
|
|
byte *working_memory,
|
|
short working_memory_size);
|
|
boolean ai_release_inactive_encounters(
|
|
char *result_description,
|
|
boolean *more_to_release,
|
|
byte *working_memory,
|
|
short working_memory_size);
|
|
|
|
void ai_handle_damage(
|
|
long unit_index,
|
|
long shooter_object_index,
|
|
short damage_category,
|
|
real fraction,
|
|
union real_vector3d *damage_velocity,
|
|
boolean delayed);
|
|
void ai_handle_deleted_object(
|
|
long object_index);
|
|
void ai_handle_unit_effect(
|
|
long unit_index,
|
|
short effect_type,
|
|
short volume);
|
|
void ai_handle_enter_vehicle(
|
|
long unit_index,
|
|
long vehicle_index);
|
|
void ai_handle_exit_vehicle(
|
|
long unit_index,
|
|
long vehicle_index);
|
|
/* ---------- globals */
|
|
|
|
void ai_index_to_string(
|
|
long ai_index,
|
|
struct scenario *scenario,
|
|
char *buffer,
|
|
long size);
|
|
|
|
struct damage_data;
|
|
|
|
boolean ai_adjust_damage(
|
|
long actor_index,
|
|
struct damage_data *damage,
|
|
real *total_damage);
|
|
|
|
#endif // __AI_H
|