<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.hard-light.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Benoit</id>
	<title>FreeSpace Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.hard-light.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Benoit"/>
	<link rel="alternate" type="text/html" href="https://wiki.hard-light.org/index.php/Special:Contributions/Benoit"/>
	<updated>2026-11-15T10:04:16Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.9</generator>
	<entry>
		<id>https://wiki.hard-light.org/index.php?title=Source_ai&amp;diff=10512</id>
		<title>Source ai</title>
		<link rel="alternate" type="text/html" href="https://wiki.hard-light.org/index.php?title=Source_ai&amp;diff=10512"/>
		<updated>2007-07-11T13:19:17Z</updated>

		<summary type="html">&lt;p&gt;Benoit: /* ai_waypoints */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Initialization ==&lt;br /&gt;
&lt;br /&gt;
=== init_ai_objects ===&lt;br /&gt;
&lt;br /&gt;
For each ship objects, call init_ai_object.&lt;br /&gt;
&lt;br /&gt;
=== init_ai_object(int objnum) ===&lt;br /&gt;
&lt;br /&gt;
Initialize ai_info structure of object `objnum&#039;.&lt;br /&gt;
&lt;br /&gt;
=== ai_object_init(object *obj, int ai_index) ===&lt;br /&gt;
&lt;br /&gt;
FIXME&lt;br /&gt;
&lt;br /&gt;
== Update ==&lt;br /&gt;
&lt;br /&gt;
=== ai_process ===&lt;br /&gt;
&lt;br /&gt;
This method is called once a frame by ship/ship.cpp in ship_process_post.&lt;br /&gt;
&lt;br /&gt;
 1. init_ship_info&lt;br /&gt;
 2. create_waypoints&lt;br /&gt;
 3. ai_frame&lt;br /&gt;
 4. if not in docking or warping modes: do read flying controls (?)&lt;br /&gt;
&lt;br /&gt;
=== ai_frame ===&lt;br /&gt;
&lt;br /&gt;
 1. possibly: ai_warp_out&lt;br /&gt;
 2. ai_maybe_self_destruct&lt;br /&gt;
 3. ai_process_mission_orders&lt;br /&gt;
 4. possibly: ai_avoid_shockwave, ai_abort_rearm_request&lt;br /&gt;
 5. ai_do_repair_frame&lt;br /&gt;
 6. possibly: ai_await_repair_frame&lt;br /&gt;
 7. maybe_big_ship_collide_recover_frame&lt;br /&gt;
 8. ai_preprocess_ignore_objnum&lt;br /&gt;
 9. ai_manage_shield&lt;br /&gt;
 10. ai_maybe_depart&lt;br /&gt;
 99. ai_execute_behavior&lt;br /&gt;
&lt;br /&gt;
=== ai_execute_behavior ===&lt;br /&gt;
&lt;br /&gt;
Branch on different ai submethods, given the ai_info-&amp;gt;mode received&lt;br /&gt;
as argument:&lt;br /&gt;
* AIM_CHASE: call ai_chase or evade_weapon or [...]&lt;br /&gt;
* AIM_EVADE: call ai_evade or [...]&lt;br /&gt;
* AIM_STILL: call ai_still&lt;br /&gt;
* AIM_STAY_NEAR: call ai_stay_near&lt;br /&gt;
* AIM_GUARD: call ai_guard&lt;br /&gt;
* AIM_WAYPOINTS: call ai_waypoints&lt;br /&gt;
* AIM_FLY_TO_SHIP: call ai_fly_to_ship&lt;br /&gt;
* AIM_DOCK: call ai_dock&lt;br /&gt;
* AIM_NONE: do nothing&lt;br /&gt;
* AIM_BIGSHIP: call ai_big_ship&lt;br /&gt;
* AIM_PATH: call ai_find_path then ai_path&lt;br /&gt;
* AIM_SAFETY: call ai_safety&lt;br /&gt;
* AIM_EVADE_WEAPON: call evade_weapon&lt;br /&gt;
* AIM_STRAFE: call ai_big_strafe or set to AIM_NONE&lt;br /&gt;
* AIM_BAY_EMERGE: call ai_bay_emerge&lt;br /&gt;
* AIM_BAY_DEPART: call ai_bay_depart()&lt;br /&gt;
* AIM_SENTRYGUN: call ai_sentrygun()&lt;br /&gt;
* AIM_WARP_OUT: do nothing: this case is handled directly from ai_frame&lt;br /&gt;
* AIM_GET_BEHIND: see FIXME&lt;br /&gt;
* default: should not be there, just abort&lt;br /&gt;
&lt;br /&gt;
Eventually call mabe_evade_dumbfire_weapon, when FIXME.&lt;br /&gt;
&lt;br /&gt;
=== ai_process_mission_orders ===&lt;br /&gt;
&lt;br /&gt;
FIXME&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Behaviors ==&lt;br /&gt;
&lt;br /&gt;
=== Docking ===&lt;br /&gt;
&lt;br /&gt;
==== Mode: AIM_DOCK ====&lt;br /&gt;
&lt;br /&gt;
Enterring AIM_DOCK:&lt;br /&gt;
* ai_dock_with_object: ask for a `docker&#039; object to dock with a `dockee&#039; one, possibly enter one fo the following submodes:&lt;br /&gt;
** AIS_DOCK_0: start docking&lt;br /&gt;
** AIS_DOCK_4A: dock instantly&lt;br /&gt;
** AIS_UNDOCK_0: start undocking&lt;br /&gt;
&lt;br /&gt;
==== Handler: ai_dock ====&lt;br /&gt;
&lt;br /&gt;
Approach a ship, follow path to docking platform, approach platform; after awhile, undock.&lt;br /&gt;
&lt;br /&gt;
Docking is decomposed in several steps:&lt;br /&gt;
* AIS_DOCK_0: find a path to the dockee then enable submode AIS_DOCK_1.&lt;br /&gt;
* AIS_DOCK_1: follow the path previously built until just before the last point. Switch to AIS_DOCK_2 when the point preceding the last one is reached.&lt;br /&gt;
* AIS_DOCK_2: do final approach: orient docker correctly then approach dockee. Once close enough, swith to submode AIS_DOCK_3.&lt;br /&gt;
* AIS_DOCK_3: eventually dock. Call `ai_do_objects_docked_stuff&#039; to decide wether to switch to AIS_DOCK_4 (rearm/repair) or to AIS_DOCK_4A (just wait).&lt;br /&gt;
* AIS_DOCK_4A: just sit where docker is, waiting for further orders. When goal is AI_GOAL_DOCK, this means mission goal completion.&lt;br /&gt;
* AIS_DOCK_4: rearm/repair by calling `ai_do_objects_repairing_stuff&#039;. If the dockee is going too fast, abort by calling `ai_abort_rearm_request&#039;.&lt;br /&gt;
&lt;br /&gt;
Undocking is decomposed in several steps:&lt;br /&gt;
* FIXME&lt;br /&gt;
&lt;br /&gt;
==== Auxiliary functions ====&lt;br /&gt;
&lt;br /&gt;
* ai_cleanup_dock_mode_subjective&lt;br /&gt;
  &amp;gt; none&lt;br /&gt;
  &amp;lt; ai_dock, ai_cleanup_dock_mode_objective&lt;br /&gt;
&lt;br /&gt;
* maybe_dock_obstructed&lt;br /&gt;
  &amp;gt; pp_collide_any&lt;br /&gt;
  &amp;lt; ai_dock&lt;br /&gt;
&lt;br /&gt;
* dock_orient_and_approach&lt;br /&gt;
  &amp;gt; several methods (quite a very important function)&lt;br /&gt;
  &amp;lt; ai_dock, ai_dock_with_object, call_doa&lt;br /&gt;
&lt;br /&gt;
* ai_do_objects_repairing_stuff&lt;br /&gt;
  &amp;gt; several methods (quite a very important function)&lt;br /&gt;
  &amp;lt; ai_dock, ai_set_goal_maybe_abord_dock, ai_cleanup_rearm_mode,&lt;br /&gt;
    ai_do_repair_frame, ai_ship_destroy, ai_abort_rearm_request,&lt;br /&gt;
    ai_issue_rearm_request, ai_rearm_repair&lt;br /&gt;
&lt;br /&gt;
* ai_abort_rearm_request&lt;br /&gt;
  &amp;gt;&lt;br /&gt;
  &amp;lt; ai_dock, ai_do_repair_frame, ai_set_mode_warp_out, ai_await_repair_frame,&lt;br /&gt;
    ai_frame, maybe_process_friendly_hit, ai_ship_hit, ai_abort_rearm_request,&lt;br /&gt;
&lt;br /&gt;
* ai_do_objects_docked_stuff&lt;br /&gt;
  &amp;gt; dock_check_find_direct_docked_object, object_is_docked, dock_dock_objects,&lt;br /&gt;
  &amp;lt; ai_dock, ai_dock_with_object&lt;br /&gt;
&lt;br /&gt;
* ai_do_objects_undocked_stuff&lt;br /&gt;
  &amp;gt; dock_check_find_direct_docked_object, dock_undock_objects&lt;br /&gt;
  &amp;lt; ai_dock, ai_do_objects_repairing_stuff, ai_deathroll_start&lt;br /&gt;
&lt;br /&gt;
* ai_cleanup_dock_mode_objective&lt;br /&gt;
  &amp;gt; ai_cleanup_dock_mode_subjective&lt;br /&gt;
  &amp;lt; ai_deathroll_start&lt;br /&gt;
&lt;br /&gt;
* dock_find_dockpoint_used_by_object&lt;br /&gt;
* hud_maybe_flash_docking_text&lt;br /&gt;
* ai_return_path_num_from_dockbay&lt;br /&gt;
* ai_do_default_behavior&lt;br /&gt;
* ai_mission_goal_complete&lt;br /&gt;
* ai_find_path&lt;br /&gt;
&lt;br /&gt;
=== Chasing ===&lt;br /&gt;
&lt;br /&gt;
==== Mode: AIM_CHASE ====&lt;br /&gt;
&lt;br /&gt;
Enterring AIM_CHASE:&lt;br /&gt;
* ai_attack_object: enter SM_ATTACK submode&lt;br /&gt;
* ai_attack_wing: enter SM_ATTACK submode&lt;br /&gt;
* guard_object_was_hit: enter SM_ATTACK submode&lt;br /&gt;
* ai_do_default_behavior: enter SM_ATTACK submode&lt;br /&gt;
* maybe_set_dynamic_chase: enter SM_ATTACK submode&lt;br /&gt;
* ai_ship_hit: enter SM_EVADE_WEAPON or SM_EVADE submode&lt;br /&gt;
&lt;br /&gt;
Handler: ai_chase&lt;br /&gt;
&lt;br /&gt;
Make player object chase ennemy.&lt;br /&gt;
&lt;br /&gt;
Chasing may be interpreted by many different sub-handlers:&lt;br /&gt;
&lt;br /&gt;
* SM_CONTINUOUS_TURN: ai_chase_ct, after a while, switch to SM_ATTACK submode&lt;br /&gt;
* SM_STEALTH_FIND: ai_stealth_find&lt;br /&gt;
* SM_STEALTH_SWEEP: ai_stealth_sweep&lt;br /&gt;
* SM_ATTACK, SM_SUPER_ATTACK, SM_ATTACK_FOREVER: ai_chase_attack&lt;br /&gt;
* SM_AVOID: avoid_ship&lt;br /&gt;
* SM_GET_BEHIND: get_behind_ship&lt;br /&gt;
* SM_GET_AWAY: ai_chase_ga&lt;br /&gt;
* SM_EVADE_SQUIGGLE: ai_chase_es&lt;br /&gt;
* SM_EVADE_BRAKE: ai_chase_eb&lt;br /&gt;
* SM_EVADE: evade_ship&lt;br /&gt;
* SM_EVADE_WEAPON: evade_weapon&lt;br /&gt;
&lt;br /&gt;
==== Mode: AIM_GET_BEHIND ====&lt;br /&gt;
&lt;br /&gt;
A grep on the whole code reveals no way to enter AIM_GET_BEHIND.&lt;br /&gt;
&lt;br /&gt;
=== Evading ===&lt;br /&gt;
&lt;br /&gt;
==== Mode: AIM_EVADE ====&lt;br /&gt;
&lt;br /&gt;
Enterring AIM_EVADE:&lt;br /&gt;
* ai_evade_object&lt;br /&gt;
* ai_set_evade_object&lt;br /&gt;
* ai_maybe_evade_locked_missile&lt;br /&gt;
* maybe_evade_dumbfire_weapon&lt;br /&gt;
&lt;br /&gt;
==== Mode: AIM_SAFETY ====&lt;br /&gt;
&lt;br /&gt;
Search for a safety spot.&lt;br /&gt;
&lt;br /&gt;
Enterring AIM_SAFETY:&lt;br /&gt;
* ai_do_safety&lt;br /&gt;
* ai_do_default_behavior&lt;br /&gt;
&lt;br /&gt;
==== Mode: AIM_EVADE_WEAPON ====&lt;br /&gt;
&lt;br /&gt;
Evade a weapon.&lt;br /&gt;
&lt;br /&gt;
Enterring AIM_EVADE_WEAPON:&lt;br /&gt;
* ai_maybe_evade_locked_missile&lt;br /&gt;
* maybe_evade_dumbfire_weapon&lt;br /&gt;
* ai_ship_hit&lt;br /&gt;
&lt;br /&gt;
=== Guarding ===&lt;br /&gt;
&lt;br /&gt;
==== Mode: AIM_GUARD ====&lt;br /&gt;
&lt;br /&gt;
Enterring AIM_GUARD:&lt;br /&gt;
* ai_set_guard_wing&lt;br /&gt;
* ai_set_guard_object&lt;br /&gt;
&lt;br /&gt;
=== Wandering ===&lt;br /&gt;
&lt;br /&gt;
==== Mode: AIM_STILL ====&lt;br /&gt;
&lt;br /&gt;
Enterring AIM_STILL:&lt;br /&gt;
* ai_stay_still:&lt;br /&gt;
&lt;br /&gt;
Set mode to AIM_STILL and objective direction view. This direction&lt;br /&gt;
view is updated by ai_still so that the object turn towrds it.&lt;br /&gt;
&lt;br /&gt;
==== Mode: AIM_STAY_NEAR ====&lt;br /&gt;
&lt;br /&gt;
Enterring AIM_STAY_NEAR:&lt;br /&gt;
* ai_do_stay_near&lt;br /&gt;
&lt;br /&gt;
==== Mode: AIM_NONE ====&lt;br /&gt;
&lt;br /&gt;
Enterring AIM_NONE:&lt;br /&gt;
* ai_object_init&lt;br /&gt;
* ai_set_guard_wing&lt;br /&gt;
* maybe_hack_cruiser_chase_abort&lt;br /&gt;
* ai_chase&lt;br /&gt;
* ai_guard&lt;br /&gt;
* ai_stay_near&lt;br /&gt;
* ai_dock&lt;br /&gt;
* ai_emerge_bay_path_cleanup&lt;br /&gt;
* ai_bay_emerge&lt;br /&gt;
* ai_bay_depart&lt;br /&gt;
* ai_execute_behavior/AIM_CHASE, AIM_STRAFE&lt;br /&gt;
* ai_do_default_behavior&lt;br /&gt;
* init_ai_object&lt;br /&gt;
* ai_deathroll_start&lt;br /&gt;
&lt;br /&gt;
=== Following path ===&lt;br /&gt;
&lt;br /&gt;
==== Mode: AIM_WAYPOINTS ====&lt;br /&gt;
&lt;br /&gt;
Enterring AIM_WAYPOINTS:&lt;br /&gt;
* ai_start_waypoints&lt;br /&gt;
&lt;br /&gt;
==== Mode: AIM_PATH ====&lt;br /&gt;
&lt;br /&gt;
Enterring AIM_PATH:&lt;br /&gt;
* FIXME&lt;br /&gt;
&lt;br /&gt;
=== Flying to a ship ===&lt;br /&gt;
&lt;br /&gt;
Enterring AIM_FLY_TO_SHIP:&lt;br /&gt;
* ai_start_fly_to_ship&lt;br /&gt;
&lt;br /&gt;
=== Strafing ===&lt;br /&gt;
&lt;br /&gt;
Enterring AIM_STRAFE:&lt;br /&gt;
* See aibig.&lt;br /&gt;
&lt;br /&gt;
=== Big ship ===&lt;br /&gt;
&lt;br /&gt;
==== Mode: AIM_BIGSHIP ====&lt;br /&gt;
&lt;br /&gt;
Enterring AIM_BIGSHIP:&lt;br /&gt;
* This state is constant and certainly set at big ship&#039;s creation.&lt;br /&gt;
&lt;br /&gt;
==== Mode: AIM_SENTRYGUN ====&lt;br /&gt;
&lt;br /&gt;
Enterring AIM_SENTRYGUN:&lt;br /&gt;
* ai_do_default_behavior&lt;br /&gt;
&lt;br /&gt;
=== Emerging bay ===&lt;br /&gt;
&lt;br /&gt;
==== Mode: AIM_BAY_EMERGE ====&lt;br /&gt;
&lt;br /&gt;
Enterring AIM_BAY_EMERGE:&lt;br /&gt;
* ai_acquire_emerge_path&lt;br /&gt;
&lt;br /&gt;
==== Mode: AIM_BAY_DEPART ====&lt;br /&gt;
&lt;br /&gt;
Enterring AIM_BAY_DEPART:&lt;br /&gt;
* ai_acquire_depart_path&lt;br /&gt;
&lt;br /&gt;
=== Warping ===&lt;br /&gt;
&lt;br /&gt;
==== Mode: AIM_WARP_OUT ====&lt;br /&gt;
&lt;br /&gt;
Enterring AIM_WARP_OUT:&lt;br /&gt;
* ai_set_mode_warp_out&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Waypoints ==&lt;br /&gt;
&lt;br /&gt;
ai_start_waypoints&lt;br /&gt;
find_nearest_waypoint&lt;br /&gt;
create_waypoints&lt;br /&gt;
&lt;br /&gt;
=== ai_waypoints ===&lt;br /&gt;
&lt;br /&gt;
Make player object fly waypoints.&lt;br /&gt;
&lt;br /&gt;
== Code map ==&lt;br /&gt;
&lt;br /&gt;
== Waypoints ==&lt;br /&gt;
&lt;br /&gt;
ai_start_waypoints&lt;br /&gt;
find_nearest_waypoint&lt;br /&gt;
create_waypoints&lt;br /&gt;
&lt;br /&gt;
=== ai_waypoints ===&lt;br /&gt;
&lt;br /&gt;
Make player object fly waypoints.&lt;br /&gt;
&lt;br /&gt;
== Code map ==&lt;br /&gt;
&lt;br /&gt;
=== Geometrical ===&lt;br /&gt;
&lt;br /&gt;
==== Pure math functions ====&lt;br /&gt;
&lt;br /&gt;
* compute_dots&lt;br /&gt;
* project_point_to_perimeter&lt;br /&gt;
* get_tangent_point&lt;br /&gt;
* ai_matrix_dist&lt;br /&gt;
* update_min_max&lt;br /&gt;
&lt;br /&gt;
==== Mixed ====&lt;br /&gt;
&lt;br /&gt;
* turn_towards_point&lt;br /&gt;
* turn_away_from_point&lt;br /&gt;
* turn_towards_tangent&lt;br /&gt;
* turn_toward_tangent_with_axis&lt;br /&gt;
&lt;br /&gt;
* get_tangent_point&lt;br /&gt;
&lt;br /&gt;
* get_nearest_bbox_point&lt;br /&gt;
&lt;br /&gt;
* bisect_chord (call add_path_point!?)&lt;br /&gt;
&lt;br /&gt;
* get_enemy_team_range&lt;br /&gt;
&lt;br /&gt;
=== Physical ===&lt;br /&gt;
&lt;br /&gt;
* fds_aux&lt;br /&gt;
&lt;br /&gt;
* pp_collide_any&lt;br /&gt;
* compute_collision_time&lt;br /&gt;
* might_collide_with_ship&lt;br /&gt;
* might_hit_teammate&lt;br /&gt;
* will_collide_pp&lt;br /&gt;
* will_collide_with_big_ship&lt;br /&gt;
* will_collide_with_big_ship_all&lt;br /&gt;
&lt;br /&gt;
* force_avoid_player_check&lt;br /&gt;
* maybe_avoid_player&lt;br /&gt;
* avoid_ship&lt;br /&gt;
* avoid_player&lt;br /&gt;
&lt;br /&gt;
* compute_time_to_enemy&lt;br /&gt;
&lt;br /&gt;
* adjust_accel_for_docking&lt;br /&gt;
* accelerate_ship&lt;br /&gt;
* change_acceleration&lt;br /&gt;
* set_accel_for_target_speed&lt;br /&gt;
* set_accel_for_docking&lt;br /&gt;
* attack_set_accel&lt;br /&gt;
&lt;br /&gt;
* static_rand_timed&lt;br /&gt;
&lt;br /&gt;
* set_predicted_enemy_pos_turret&lt;br /&gt;
* set_predicted_enemy_pos&lt;br /&gt;
&lt;br /&gt;
=== Accessors ===&lt;br /&gt;
&lt;br /&gt;
* is_instructor&lt;br /&gt;
&lt;br /&gt;
* object_is_targetable&lt;br /&gt;
&lt;br /&gt;
* num_enemies_attacking&lt;br /&gt;
* num_turrets_attacking&lt;br /&gt;
* num_nearby_fighters&lt;br /&gt;
* compute_num_homing_objects&lt;br /&gt;
&lt;br /&gt;
* get_wing_lowest_max_speed&lt;br /&gt;
&lt;br /&gt;
* is_ignore_object_sub&lt;br /&gt;
* find_ignore_new_object_index&lt;br /&gt;
* is_ignore_object&lt;br /&gt;
* compact_ignore_new_objects&lt;br /&gt;
&lt;br /&gt;
* get_enemy_timestamp&lt;br /&gt;
&lt;br /&gt;
* FIXME: inline get_ai_info(object *obj) { return &amp;amp; Ai_info[Ships[obj-&amp;gt;instance].ai_index] }&lt;br /&gt;
&lt;br /&gt;
=== Behavioral ===&lt;br /&gt;
&lt;br /&gt;
==== Waypoints ====&lt;br /&gt;
&lt;br /&gt;
* add_path_point&lt;br /&gt;
* create_path_to_point&lt;br /&gt;
* copy_xlate_model_path_points&lt;br /&gt;
* create_model_path&lt;br /&gt;
* create_model_exit_path&lt;br /&gt;
&lt;br /&gt;
* ai_find_path&lt;br /&gt;
* get_base_path_info&lt;br /&gt;
* modify_model_path_points&lt;br /&gt;
* maybe_recreate_path&lt;br /&gt;
* ai_path&lt;br /&gt;
&lt;br /&gt;
* ai_start_waypoints&lt;br /&gt;
* find_nearest_waypoint&lt;br /&gt;
* ai_waypoints&lt;br /&gt;
&lt;br /&gt;
==== Attacking/Evading ====&lt;br /&gt;
&lt;br /&gt;
* evaluate_object_as_nearest_objnum&lt;br /&gt;
* get_nearest_objnum&lt;br /&gt;
* find_nearby_threat&lt;br /&gt;
* find_enemy&lt;br /&gt;
&lt;br /&gt;
* ai_attack_object&lt;br /&gt;
* ai_attack_wing&lt;br /&gt;
* ai_chase_ct&lt;br /&gt;
* ai_chase_eb&lt;br /&gt;
* ai_endangered_time&lt;br /&gt;
* ai_endangered_by_weapon&lt;br /&gt;
* ai_near_full_strength&lt;br /&gt;
* get_behind_ship&lt;br /&gt;
&lt;br /&gt;
* ai_evade_object&lt;br /&gt;
* evade_weapon&lt;br /&gt;
* ai_evade&lt;br /&gt;
* slide_face_ship&lt;br /&gt;
* evade_ship&lt;br /&gt;
&lt;br /&gt;
* ai_do_safety&lt;br /&gt;
* ai_safety_pick_spot&lt;br /&gt;
* ai_safety_goto_spot&lt;br /&gt;
* ai_safety_circle_spot&lt;br /&gt;
* ai_safety&lt;br /&gt;
&lt;br /&gt;
==== Docking/Repairing/Rearming ====&lt;br /&gt;
&lt;br /&gt;
* ai_set_goal_maybe_abort_dock&lt;br /&gt;
* ai_do_objects_docked_stuff&lt;br /&gt;
* ai_do_objects_undocked_stuff&lt;br /&gt;
* ai_dock_with_object&lt;br /&gt;
&lt;br /&gt;
==== Neutral ====&lt;br /&gt;
&lt;br /&gt;
* ai_stay_still&lt;br /&gt;
* ai_do_stay_near&lt;br /&gt;
&lt;br /&gt;
* ai_form_on_wing&lt;br /&gt;
* ai_formation_object_get_slotnum&lt;br /&gt;
&lt;br /&gt;
* ai_ignore_object&lt;br /&gt;
* ai_ignore_wing&lt;br /&gt;
&lt;br /&gt;
* ai_start_fly_to_ship&lt;br /&gt;
* ai_fly_to_ship&lt;br /&gt;
&lt;br /&gt;
==== Firing ====&lt;br /&gt;
&lt;br /&gt;
* maybe_resume_previous_mode&lt;br /&gt;
&lt;br /&gt;
* ai_maybe_fire_afterburner&lt;br /&gt;
* maybe_afterburner_after_ship_hit&lt;br /&gt;
&lt;br /&gt;
* ai_select_primary_weapon_OLD&lt;br /&gt;
* ai_select_primary_weapon&lt;br /&gt;
* set_primary_weapon_linkage&lt;br /&gt;
* ai_fire_primary_weapon&lt;br /&gt;
* ai_select_secondary_weapon&lt;br /&gt;
* ai_fire_secondary_weapon&lt;br /&gt;
&lt;br /&gt;
* ai_maybe_announce_shockwave_weapon&lt;br /&gt;
&lt;br /&gt;
* compute_incoming_payload&lt;br /&gt;
* check_ok_to_fire&lt;br /&gt;
&lt;br /&gt;
* ai_get_weapon_dist&lt;br /&gt;
* ai_get_weapon_speed&lt;br /&gt;
&lt;br /&gt;
==== Misc ====&lt;br /&gt;
&lt;br /&gt;
* ai_set_positions&lt;br /&gt;
&lt;br /&gt;
=== Rendering (debug) ===&lt;br /&gt;
&lt;br /&gt;
* render_all_ship_bay_paths&lt;br /&gt;
* render_all_subsys_paths&lt;br /&gt;
* render_path_points&lt;br /&gt;
&lt;br /&gt;
=== (Still not sorted) ===&lt;br /&gt;
&lt;br /&gt;
* ai_good_secondary_time&lt;br /&gt;
* is_preferred_weapon&lt;br /&gt;
* ai_init_secondary_info&lt;br /&gt;
* ai_set_rearm_status&lt;br /&gt;
* ai_good_time_to_rearm&lt;br /&gt;
* garbage_collect_path_points&lt;br /&gt;
* ai_init&lt;br /&gt;
* ai_level_init&lt;br /&gt;
* free_ai_stuff&lt;br /&gt;
* Skill_level_names&lt;br /&gt;
* parse_ai_class&lt;br /&gt;
* reset_ai_class_names&lt;br /&gt;
* parse_aitbl&lt;br /&gt;
* hash&lt;br /&gt;
* create_object_hash&lt;br /&gt;
* is_object_stealth_ship&lt;br /&gt;
* init_ai_stealth_info&lt;br /&gt;
* get_skill_stealth_dist_scaler&lt;br /&gt;
* get_skill_stealth_dot_scaler&lt;br /&gt;
* ai_is_stealth_visible&lt;br /&gt;
* update_ai_stealth_info_with_error&lt;br /&gt;
* ai_update_danger_weapon&lt;br /&gt;
* ai_turn_towards_vector&lt;br /&gt;
* init_ship_info&lt;br /&gt;
* set_target_objnum&lt;br /&gt;
* set_targeted_subsys&lt;br /&gt;
* ai_object_init&lt;br /&gt;
* turn_away_from_point&lt;br /&gt;
* is_ignore_object_sub&lt;br /&gt;
* find_ignore_new_object_index&lt;br /&gt;
* is_ignore_object&lt;br /&gt;
* compact_ignore_new_objects&lt;br /&gt;
* ai_near_full_strength&lt;br /&gt;
* mabs_pick_goal_point&lt;br /&gt;
* maybe_avoid_big_ship&lt;br /&gt;
* compute_desired_rvec&lt;br /&gt;
* ai_stealth_find&lt;br /&gt;
* ai_stealth_sweep&lt;br /&gt;
* ai_chase_attack&lt;br /&gt;
* ai_chase_es&lt;br /&gt;
* ai_chase_ga&lt;br /&gt;
* ai_set_attack_subsystem&lt;br /&gt;
* ai_set_guard_vec&lt;br /&gt;
* ai_set_guard_wing&lt;br /&gt;
* ai_set_evade_object&lt;br /&gt;
* ai_set_guard_object&lt;br /&gt;
* update_aspect_lock_information&lt;br /&gt;
* ai_chase_fly_away&lt;br /&gt;
* has_preferred_secondary&lt;br /&gt;
* ai_choose_secondary_weapon&lt;br /&gt;
* set_secondary_fire_delay&lt;br /&gt;
* ai_chase_big_approach_set_goal&lt;br /&gt;
* ai_chase_big_circle_set_goal&lt;br /&gt;
* ai_chase_big_get_separations&lt;br /&gt;
* ai_chase_big_parallel_set_goal&lt;br /&gt;
* ai_cruiser_chase_set_goal_pos&lt;br /&gt;
* maybe_hack_cruiser_chase_abort&lt;br /&gt;
* ai_cruiser_chase&lt;br /&gt;
* ai_chase&lt;br /&gt;
* dock_move_towards_point&lt;br /&gt;
* set_goal_dock_orient&lt;br /&gt;
* find_parent_rotating_submodel&lt;br /&gt;
* find_adjusted_dockpoint_info&lt;br /&gt;
* dock_orient_and_approach&lt;br /&gt;
* debug_find_guard_object&lt;br /&gt;
* num_ships_attacking&lt;br /&gt;
* remove_farthest_attacker&lt;br /&gt;
* ai_maybe_limit_attackers&lt;br /&gt;
* guard_object_was_hit&lt;br /&gt;
* maybe_update_guard_object&lt;br /&gt;
* ai_guard_find_nearby_bomb&lt;br /&gt;
* ai_guard_find_nearby_ship&lt;br /&gt;
* ai_guard_find_nearby_asteroid&lt;br /&gt;
* ai_guard_find_nearby_object&lt;br /&gt;
* get_cylinder_points&lt;br /&gt;
* ai_big_guard&lt;br /&gt;
* ai_guard&lt;br /&gt;
* ai_do_objects_repairing_stuff&lt;br /&gt;
* ai_cleanup_dock_mode_subjective&lt;br /&gt;
* ai_cleanup_dock_mode_objective&lt;br /&gt;
* ai_cleanup_rearm_mode&lt;br /&gt;
* ai_still&lt;br /&gt;
* ai_stay_near&lt;br /&gt;
* maybe_dock_obstructed&lt;br /&gt;
* ai_dock&lt;br /&gt;
* ai_debug_render_stuff&lt;br /&gt;
* process_subobjects&lt;br /&gt;
* get_wing_index&lt;br /&gt;
* get_wing_leader&lt;br /&gt;
* get_wing_delta&lt;br /&gt;
* gwlr_1&lt;br /&gt;
* gwlr_object_1&lt;br /&gt;
* get_wing_largest_radius&lt;br /&gt;
* DCF&lt;br /&gt;
* DCF&lt;br /&gt;
* get_absolute_wing_pos&lt;br /&gt;
* render_wing_phantoms&lt;br /&gt;
* render_wing_phantoms_all&lt;br /&gt;
* ai_fly_in_formation&lt;br /&gt;
* ai_disband_formation&lt;br /&gt;
* formation_is_leader_chaotic&lt;br /&gt;
* ai_most_massive_object_of_its_wing_of_all_docked_objects_helper&lt;br /&gt;
* ai_formation&lt;br /&gt;
* ai_do_repair_frame&lt;br /&gt;
* call_doa&lt;br /&gt;
* ai_maybe_launch_cmeasure&lt;br /&gt;
* ai_preprocess_ignore_objnum&lt;br /&gt;
* ai_chase_circle&lt;br /&gt;
* ai_transfer_shield&lt;br /&gt;
* ai_balance_shield&lt;br /&gt;
* ai_manage_shield&lt;br /&gt;
* ai_maybe_evade_locked_missile&lt;br /&gt;
* maybe_evade_dumbfire_weapon&lt;br /&gt;
* ai_manage_bay_doors&lt;br /&gt;
* ai_acquire_emerge_path&lt;br /&gt;
* ai_emerge_bay_path_cleanup&lt;br /&gt;
* ai_bay_emerge&lt;br /&gt;
* ai_find_closest_depart_path&lt;br /&gt;
* ai_acquire_depart_path&lt;br /&gt;
* ai_bay_depart&lt;br /&gt;
* ai_sentrygun&lt;br /&gt;
* ai_execute_behavior&lt;br /&gt;
* mrs_subsystem&lt;br /&gt;
* num_allies_rearming&lt;br /&gt;
* maybe_request_support&lt;br /&gt;
* ai_set_mode_warp_out&lt;br /&gt;
* ai_maybe_depart&lt;br /&gt;
* ai_warp_out&lt;br /&gt;
* ai_find_shockwave_weapon&lt;br /&gt;
* ai_announce_ship_dying&lt;br /&gt;
* ai_find_shockwave_ship&lt;br /&gt;
* aas_1&lt;br /&gt;
* ai_avoid_shockwave&lt;br /&gt;
* ai_await_repair_frame&lt;br /&gt;
* ai_maybe_self_destruct&lt;br /&gt;
* ai_need_new_target&lt;br /&gt;
* maybe_big_ship_collide_recover_frame&lt;br /&gt;
* validate_mode_submode&lt;br /&gt;
* ai_frame&lt;br /&gt;
* create_waypoints&lt;br /&gt;
* ai_process&lt;br /&gt;
* init_ai_object&lt;br /&gt;
* init_ai_objects&lt;br /&gt;
* init_ai_system&lt;br /&gt;
* ai_set_default_behavior&lt;br /&gt;
* ai_do_default_behavior&lt;br /&gt;
* process_friendly_hit_message&lt;br /&gt;
* maybe_process_friendly_hit&lt;br /&gt;
* maybe_set_dynamic_chase&lt;br /&gt;
* firing_aspect_seeking_bomb&lt;br /&gt;
* big_ship_collide_recover_start&lt;br /&gt;
* ai_update_lethality&lt;br /&gt;
* ai_ship_hit&lt;br /&gt;
* ai_ship_destroy&lt;br /&gt;
* ai_deathroll_start&lt;br /&gt;
* ai_abort_rearm_request&lt;br /&gt;
* ai_add_rearm_goal&lt;br /&gt;
* ai_issue_rearm_request&lt;br /&gt;
* ai_rearm_repair&lt;br /&gt;
* ai_return_path_num_from_dockbay&lt;br /&gt;
* cheat_fire_synaptic&lt;br /&gt;
* maybe_cheat_fire_synaptic&lt;/div&gt;</summary>
		<author><name>Benoit</name></author>
	</entry>
	<entry>
		<id>https://wiki.hard-light.org/index.php?title=Source_ai&amp;diff=10511</id>
		<title>Source ai</title>
		<link rel="alternate" type="text/html" href="https://wiki.hard-light.org/index.php?title=Source_ai&amp;diff=10511"/>
		<updated>2007-07-11T13:19:01Z</updated>

		<summary type="html">&lt;p&gt;Benoit: New page: == Initialization ==  === init_ai_objects ===  For each ship objects, call init_ai_object.  === init_ai_object(int objnum) ===  Initialize ai_info structure of object `objnum&amp;#039;.  === ai_obj...&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Initialization ==&lt;br /&gt;
&lt;br /&gt;
=== init_ai_objects ===&lt;br /&gt;
&lt;br /&gt;
For each ship objects, call init_ai_object.&lt;br /&gt;
&lt;br /&gt;
=== init_ai_object(int objnum) ===&lt;br /&gt;
&lt;br /&gt;
Initialize ai_info structure of object `objnum&#039;.&lt;br /&gt;
&lt;br /&gt;
=== ai_object_init(object *obj, int ai_index) ===&lt;br /&gt;
&lt;br /&gt;
FIXME&lt;br /&gt;
&lt;br /&gt;
== Update ==&lt;br /&gt;
&lt;br /&gt;
=== ai_process ===&lt;br /&gt;
&lt;br /&gt;
This method is called once a frame by ship/ship.cpp in ship_process_post.&lt;br /&gt;
&lt;br /&gt;
 1. init_ship_info&lt;br /&gt;
 2. create_waypoints&lt;br /&gt;
 3. ai_frame&lt;br /&gt;
 4. if not in docking or warping modes: do read flying controls (?)&lt;br /&gt;
&lt;br /&gt;
=== ai_frame ===&lt;br /&gt;
&lt;br /&gt;
 1. possibly: ai_warp_out&lt;br /&gt;
 2. ai_maybe_self_destruct&lt;br /&gt;
 3. ai_process_mission_orders&lt;br /&gt;
 4. possibly: ai_avoid_shockwave, ai_abort_rearm_request&lt;br /&gt;
 5. ai_do_repair_frame&lt;br /&gt;
 6. possibly: ai_await_repair_frame&lt;br /&gt;
 7. maybe_big_ship_collide_recover_frame&lt;br /&gt;
 8. ai_preprocess_ignore_objnum&lt;br /&gt;
 9. ai_manage_shield&lt;br /&gt;
 10. ai_maybe_depart&lt;br /&gt;
 99. ai_execute_behavior&lt;br /&gt;
&lt;br /&gt;
=== ai_execute_behavior ===&lt;br /&gt;
&lt;br /&gt;
Branch on different ai submethods, given the ai_info-&amp;gt;mode received&lt;br /&gt;
as argument:&lt;br /&gt;
* AIM_CHASE: call ai_chase or evade_weapon or [...]&lt;br /&gt;
* AIM_EVADE: call ai_evade or [...]&lt;br /&gt;
* AIM_STILL: call ai_still&lt;br /&gt;
* AIM_STAY_NEAR: call ai_stay_near&lt;br /&gt;
* AIM_GUARD: call ai_guard&lt;br /&gt;
* AIM_WAYPOINTS: call ai_waypoints&lt;br /&gt;
* AIM_FLY_TO_SHIP: call ai_fly_to_ship&lt;br /&gt;
* AIM_DOCK: call ai_dock&lt;br /&gt;
* AIM_NONE: do nothing&lt;br /&gt;
* AIM_BIGSHIP: call ai_big_ship&lt;br /&gt;
* AIM_PATH: call ai_find_path then ai_path&lt;br /&gt;
* AIM_SAFETY: call ai_safety&lt;br /&gt;
* AIM_EVADE_WEAPON: call evade_weapon&lt;br /&gt;
* AIM_STRAFE: call ai_big_strafe or set to AIM_NONE&lt;br /&gt;
* AIM_BAY_EMERGE: call ai_bay_emerge&lt;br /&gt;
* AIM_BAY_DEPART: call ai_bay_depart()&lt;br /&gt;
* AIM_SENTRYGUN: call ai_sentrygun()&lt;br /&gt;
* AIM_WARP_OUT: do nothing: this case is handled directly from ai_frame&lt;br /&gt;
* AIM_GET_BEHIND: see FIXME&lt;br /&gt;
* default: should not be there, just abort&lt;br /&gt;
&lt;br /&gt;
Eventually call mabe_evade_dumbfire_weapon, when FIXME.&lt;br /&gt;
&lt;br /&gt;
=== ai_process_mission_orders ===&lt;br /&gt;
&lt;br /&gt;
FIXME&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Behaviors ==&lt;br /&gt;
&lt;br /&gt;
=== Docking ===&lt;br /&gt;
&lt;br /&gt;
==== Mode: AIM_DOCK ====&lt;br /&gt;
&lt;br /&gt;
Enterring AIM_DOCK:&lt;br /&gt;
* ai_dock_with_object: ask for a `docker&#039; object to dock with a `dockee&#039; one, possibly enter one fo the following submodes:&lt;br /&gt;
** AIS_DOCK_0: start docking&lt;br /&gt;
** AIS_DOCK_4A: dock instantly&lt;br /&gt;
** AIS_UNDOCK_0: start undocking&lt;br /&gt;
&lt;br /&gt;
==== Handler: ai_dock ====&lt;br /&gt;
&lt;br /&gt;
Approach a ship, follow path to docking platform, approach platform; after awhile, undock.&lt;br /&gt;
&lt;br /&gt;
Docking is decomposed in several steps:&lt;br /&gt;
* AIS_DOCK_0: find a path to the dockee then enable submode AIS_DOCK_1.&lt;br /&gt;
* AIS_DOCK_1: follow the path previously built until just before the last point. Switch to AIS_DOCK_2 when the point preceding the last one is reached.&lt;br /&gt;
* AIS_DOCK_2: do final approach: orient docker correctly then approach dockee. Once close enough, swith to submode AIS_DOCK_3.&lt;br /&gt;
* AIS_DOCK_3: eventually dock. Call `ai_do_objects_docked_stuff&#039; to decide wether to switch to AIS_DOCK_4 (rearm/repair) or to AIS_DOCK_4A (just wait).&lt;br /&gt;
* AIS_DOCK_4A: just sit where docker is, waiting for further orders. When goal is AI_GOAL_DOCK, this means mission goal completion.&lt;br /&gt;
* AIS_DOCK_4: rearm/repair by calling `ai_do_objects_repairing_stuff&#039;. If the dockee is going too fast, abort by calling `ai_abort_rearm_request&#039;.&lt;br /&gt;
&lt;br /&gt;
Undocking is decomposed in several steps:&lt;br /&gt;
* FIXME&lt;br /&gt;
&lt;br /&gt;
==== Auxiliary functions ====&lt;br /&gt;
&lt;br /&gt;
* ai_cleanup_dock_mode_subjective&lt;br /&gt;
  &amp;gt; none&lt;br /&gt;
  &amp;lt; ai_dock, ai_cleanup_dock_mode_objective&lt;br /&gt;
&lt;br /&gt;
* maybe_dock_obstructed&lt;br /&gt;
  &amp;gt; pp_collide_any&lt;br /&gt;
  &amp;lt; ai_dock&lt;br /&gt;
&lt;br /&gt;
* dock_orient_and_approach&lt;br /&gt;
  &amp;gt; several methods (quite a very important function)&lt;br /&gt;
  &amp;lt; ai_dock, ai_dock_with_object, call_doa&lt;br /&gt;
&lt;br /&gt;
* ai_do_objects_repairing_stuff&lt;br /&gt;
  &amp;gt; several methods (quite a very important function)&lt;br /&gt;
  &amp;lt; ai_dock, ai_set_goal_maybe_abord_dock, ai_cleanup_rearm_mode,&lt;br /&gt;
    ai_do_repair_frame, ai_ship_destroy, ai_abort_rearm_request,&lt;br /&gt;
    ai_issue_rearm_request, ai_rearm_repair&lt;br /&gt;
&lt;br /&gt;
* ai_abort_rearm_request&lt;br /&gt;
  &amp;gt;&lt;br /&gt;
  &amp;lt; ai_dock, ai_do_repair_frame, ai_set_mode_warp_out, ai_await_repair_frame,&lt;br /&gt;
    ai_frame, maybe_process_friendly_hit, ai_ship_hit, ai_abort_rearm_request,&lt;br /&gt;
&lt;br /&gt;
* ai_do_objects_docked_stuff&lt;br /&gt;
  &amp;gt; dock_check_find_direct_docked_object, object_is_docked, dock_dock_objects,&lt;br /&gt;
  &amp;lt; ai_dock, ai_dock_with_object&lt;br /&gt;
&lt;br /&gt;
* ai_do_objects_undocked_stuff&lt;br /&gt;
  &amp;gt; dock_check_find_direct_docked_object, dock_undock_objects&lt;br /&gt;
  &amp;lt; ai_dock, ai_do_objects_repairing_stuff, ai_deathroll_start&lt;br /&gt;
&lt;br /&gt;
* ai_cleanup_dock_mode_objective&lt;br /&gt;
  &amp;gt; ai_cleanup_dock_mode_subjective&lt;br /&gt;
  &amp;lt; ai_deathroll_start&lt;br /&gt;
&lt;br /&gt;
* dock_find_dockpoint_used_by_object&lt;br /&gt;
* hud_maybe_flash_docking_text&lt;br /&gt;
* ai_return_path_num_from_dockbay&lt;br /&gt;
* ai_do_default_behavior&lt;br /&gt;
* ai_mission_goal_complete&lt;br /&gt;
* ai_find_path&lt;br /&gt;
&lt;br /&gt;
=== Chasing ===&lt;br /&gt;
&lt;br /&gt;
==== Mode: AIM_CHASE ====&lt;br /&gt;
&lt;br /&gt;
Enterring AIM_CHASE:&lt;br /&gt;
* ai_attack_object: enter SM_ATTACK submode&lt;br /&gt;
* ai_attack_wing: enter SM_ATTACK submode&lt;br /&gt;
* guard_object_was_hit: enter SM_ATTACK submode&lt;br /&gt;
* ai_do_default_behavior: enter SM_ATTACK submode&lt;br /&gt;
* maybe_set_dynamic_chase: enter SM_ATTACK submode&lt;br /&gt;
* ai_ship_hit: enter SM_EVADE_WEAPON or SM_EVADE submode&lt;br /&gt;
&lt;br /&gt;
Handler: ai_chase&lt;br /&gt;
&lt;br /&gt;
Make player object chase ennemy.&lt;br /&gt;
&lt;br /&gt;
Chasing may be interpreted by many different sub-handlers:&lt;br /&gt;
&lt;br /&gt;
* SM_CONTINUOUS_TURN: ai_chase_ct, after a while, switch to SM_ATTACK submode&lt;br /&gt;
* SM_STEALTH_FIND: ai_stealth_find&lt;br /&gt;
* SM_STEALTH_SWEEP: ai_stealth_sweep&lt;br /&gt;
* SM_ATTACK, SM_SUPER_ATTACK, SM_ATTACK_FOREVER: ai_chase_attack&lt;br /&gt;
* SM_AVOID: avoid_ship&lt;br /&gt;
* SM_GET_BEHIND: get_behind_ship&lt;br /&gt;
* SM_GET_AWAY: ai_chase_ga&lt;br /&gt;
* SM_EVADE_SQUIGGLE: ai_chase_es&lt;br /&gt;
* SM_EVADE_BRAKE: ai_chase_eb&lt;br /&gt;
* SM_EVADE: evade_ship&lt;br /&gt;
* SM_EVADE_WEAPON: evade_weapon&lt;br /&gt;
&lt;br /&gt;
==== Mode: AIM_GET_BEHIND ====&lt;br /&gt;
&lt;br /&gt;
A grep on the whole code reveals no way to enter AIM_GET_BEHIND.&lt;br /&gt;
&lt;br /&gt;
=== Evading ===&lt;br /&gt;
&lt;br /&gt;
==== Mode: AIM_EVADE ====&lt;br /&gt;
&lt;br /&gt;
Enterring AIM_EVADE:&lt;br /&gt;
* ai_evade_object&lt;br /&gt;
* ai_set_evade_object&lt;br /&gt;
* ai_maybe_evade_locked_missile&lt;br /&gt;
* maybe_evade_dumbfire_weapon&lt;br /&gt;
&lt;br /&gt;
==== Mode: AIM_SAFETY ====&lt;br /&gt;
&lt;br /&gt;
Search for a safety spot.&lt;br /&gt;
&lt;br /&gt;
Enterring AIM_SAFETY:&lt;br /&gt;
* ai_do_safety&lt;br /&gt;
* ai_do_default_behavior&lt;br /&gt;
&lt;br /&gt;
==== Mode: AIM_EVADE_WEAPON ====&lt;br /&gt;
&lt;br /&gt;
Evade a weapon.&lt;br /&gt;
&lt;br /&gt;
Enterring AIM_EVADE_WEAPON:&lt;br /&gt;
* ai_maybe_evade_locked_missile&lt;br /&gt;
* maybe_evade_dumbfire_weapon&lt;br /&gt;
* ai_ship_hit&lt;br /&gt;
&lt;br /&gt;
=== Guarding ===&lt;br /&gt;
&lt;br /&gt;
==== Mode: AIM_GUARD ====&lt;br /&gt;
&lt;br /&gt;
Enterring AIM_GUARD:&lt;br /&gt;
* ai_set_guard_wing&lt;br /&gt;
* ai_set_guard_object&lt;br /&gt;
&lt;br /&gt;
=== Wandering ===&lt;br /&gt;
&lt;br /&gt;
==== Mode: AIM_STILL ====&lt;br /&gt;
&lt;br /&gt;
Enterring AIM_STILL:&lt;br /&gt;
* ai_stay_still:&lt;br /&gt;
&lt;br /&gt;
Set mode to AIM_STILL and objective direction view. This direction&lt;br /&gt;
view is updated by ai_still so that the object turn towrds it.&lt;br /&gt;
&lt;br /&gt;
==== Mode: AIM_STAY_NEAR ====&lt;br /&gt;
&lt;br /&gt;
Enterring AIM_STAY_NEAR:&lt;br /&gt;
* ai_do_stay_near&lt;br /&gt;
&lt;br /&gt;
==== Mode: AIM_NONE ====&lt;br /&gt;
&lt;br /&gt;
Enterring AIM_NONE:&lt;br /&gt;
* ai_object_init&lt;br /&gt;
* ai_set_guard_wing&lt;br /&gt;
* maybe_hack_cruiser_chase_abort&lt;br /&gt;
* ai_chase&lt;br /&gt;
* ai_guard&lt;br /&gt;
* ai_stay_near&lt;br /&gt;
* ai_dock&lt;br /&gt;
* ai_emerge_bay_path_cleanup&lt;br /&gt;
* ai_bay_emerge&lt;br /&gt;
* ai_bay_depart&lt;br /&gt;
* ai_execute_behavior/AIM_CHASE, AIM_STRAFE&lt;br /&gt;
* ai_do_default_behavior&lt;br /&gt;
* init_ai_object&lt;br /&gt;
* ai_deathroll_start&lt;br /&gt;
&lt;br /&gt;
=== Following path ===&lt;br /&gt;
&lt;br /&gt;
==== Mode: AIM_WAYPOINTS ====&lt;br /&gt;
&lt;br /&gt;
Enterring AIM_WAYPOINTS:&lt;br /&gt;
* ai_start_waypoints&lt;br /&gt;
&lt;br /&gt;
==== Mode: AIM_PATH ====&lt;br /&gt;
&lt;br /&gt;
Enterring AIM_PATH:&lt;br /&gt;
* FIXME&lt;br /&gt;
&lt;br /&gt;
=== Flying to a ship ===&lt;br /&gt;
&lt;br /&gt;
Enterring AIM_FLY_TO_SHIP:&lt;br /&gt;
* ai_start_fly_to_ship&lt;br /&gt;
&lt;br /&gt;
=== Strafing ===&lt;br /&gt;
&lt;br /&gt;
Enterring AIM_STRAFE:&lt;br /&gt;
* See aibig.&lt;br /&gt;
&lt;br /&gt;
=== Big ship ===&lt;br /&gt;
&lt;br /&gt;
==== Mode: AIM_BIGSHIP ====&lt;br /&gt;
&lt;br /&gt;
Enterring AIM_BIGSHIP:&lt;br /&gt;
* This state is constant and certainly set at big ship&#039;s creation.&lt;br /&gt;
&lt;br /&gt;
==== Mode: AIM_SENTRYGUN ====&lt;br /&gt;
&lt;br /&gt;
Enterring AIM_SENTRYGUN:&lt;br /&gt;
* ai_do_default_behavior&lt;br /&gt;
&lt;br /&gt;
=== Emerging bay ===&lt;br /&gt;
&lt;br /&gt;
==== Mode: AIM_BAY_EMERGE ====&lt;br /&gt;
&lt;br /&gt;
Enterring AIM_BAY_EMERGE:&lt;br /&gt;
* ai_acquire_emerge_path&lt;br /&gt;
&lt;br /&gt;
==== Mode: AIM_BAY_DEPART ====&lt;br /&gt;
&lt;br /&gt;
Enterring AIM_BAY_DEPART:&lt;br /&gt;
* ai_acquire_depart_path&lt;br /&gt;
&lt;br /&gt;
=== Warping ===&lt;br /&gt;
&lt;br /&gt;
==== Mode: AIM_WARP_OUT ====&lt;br /&gt;
&lt;br /&gt;
Enterring AIM_WARP_OUT:&lt;br /&gt;
* ai_set_mode_warp_out&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Waypoints ==&lt;br /&gt;
&lt;br /&gt;
ai_start_waypoints&lt;br /&gt;
find_nearest_waypoint&lt;br /&gt;
create_waypoints&lt;br /&gt;
&lt;br /&gt;
=== ai_waypoints ===&lt;br /&gt;
&lt;br /&gt;
Make player object fly waypoints.&lt;br /&gt;
&lt;br /&gt;
== Code map ==&lt;br /&gt;
&lt;br /&gt;
== Waypoints ==&lt;br /&gt;
&lt;br /&gt;
ai_start_waypoints&lt;br /&gt;
find_nearest_waypoint&lt;br /&gt;
create_waypoints&lt;br /&gt;
&lt;br /&gt;
=== ai_waypoints ===&lt;br /&gt;
&lt;br /&gt;
Make player object fly waypoints.&lt;br /&gt;
&lt;br /&gt;
## ----------------------------------------------------------------------------&lt;br /&gt;
== Code map ==&lt;br /&gt;
&lt;br /&gt;
=== Geometrical ===&lt;br /&gt;
&lt;br /&gt;
==== Pure math functions ====&lt;br /&gt;
&lt;br /&gt;
* compute_dots&lt;br /&gt;
* project_point_to_perimeter&lt;br /&gt;
* get_tangent_point&lt;br /&gt;
* ai_matrix_dist&lt;br /&gt;
* update_min_max&lt;br /&gt;
&lt;br /&gt;
==== Mixed ====&lt;br /&gt;
&lt;br /&gt;
* turn_towards_point&lt;br /&gt;
* turn_away_from_point&lt;br /&gt;
* turn_towards_tangent&lt;br /&gt;
* turn_toward_tangent_with_axis&lt;br /&gt;
&lt;br /&gt;
* get_tangent_point&lt;br /&gt;
&lt;br /&gt;
* get_nearest_bbox_point&lt;br /&gt;
&lt;br /&gt;
* bisect_chord (call add_path_point!?)&lt;br /&gt;
&lt;br /&gt;
* get_enemy_team_range&lt;br /&gt;
&lt;br /&gt;
=== Physical ===&lt;br /&gt;
&lt;br /&gt;
* fds_aux&lt;br /&gt;
&lt;br /&gt;
* pp_collide_any&lt;br /&gt;
* compute_collision_time&lt;br /&gt;
* might_collide_with_ship&lt;br /&gt;
* might_hit_teammate&lt;br /&gt;
* will_collide_pp&lt;br /&gt;
* will_collide_with_big_ship&lt;br /&gt;
* will_collide_with_big_ship_all&lt;br /&gt;
&lt;br /&gt;
* force_avoid_player_check&lt;br /&gt;
* maybe_avoid_player&lt;br /&gt;
* avoid_ship&lt;br /&gt;
* avoid_player&lt;br /&gt;
&lt;br /&gt;
* compute_time_to_enemy&lt;br /&gt;
&lt;br /&gt;
* adjust_accel_for_docking&lt;br /&gt;
* accelerate_ship&lt;br /&gt;
* change_acceleration&lt;br /&gt;
* set_accel_for_target_speed&lt;br /&gt;
* set_accel_for_docking&lt;br /&gt;
* attack_set_accel&lt;br /&gt;
&lt;br /&gt;
* static_rand_timed&lt;br /&gt;
&lt;br /&gt;
* set_predicted_enemy_pos_turret&lt;br /&gt;
* set_predicted_enemy_pos&lt;br /&gt;
&lt;br /&gt;
=== Accessors ===&lt;br /&gt;
&lt;br /&gt;
* is_instructor&lt;br /&gt;
&lt;br /&gt;
* object_is_targetable&lt;br /&gt;
&lt;br /&gt;
* num_enemies_attacking&lt;br /&gt;
* num_turrets_attacking&lt;br /&gt;
* num_nearby_fighters&lt;br /&gt;
* compute_num_homing_objects&lt;br /&gt;
&lt;br /&gt;
* get_wing_lowest_max_speed&lt;br /&gt;
&lt;br /&gt;
* is_ignore_object_sub&lt;br /&gt;
* find_ignore_new_object_index&lt;br /&gt;
* is_ignore_object&lt;br /&gt;
* compact_ignore_new_objects&lt;br /&gt;
&lt;br /&gt;
* get_enemy_timestamp&lt;br /&gt;
&lt;br /&gt;
* FIXME: inline get_ai_info(object *obj) { return &amp;amp; Ai_info[Ships[obj-&amp;gt;instance].ai_index] }&lt;br /&gt;
&lt;br /&gt;
=== Behavioral ===&lt;br /&gt;
&lt;br /&gt;
==== Waypoints ====&lt;br /&gt;
&lt;br /&gt;
* add_path_point&lt;br /&gt;
* create_path_to_point&lt;br /&gt;
* copy_xlate_model_path_points&lt;br /&gt;
* create_model_path&lt;br /&gt;
* create_model_exit_path&lt;br /&gt;
&lt;br /&gt;
* ai_find_path&lt;br /&gt;
* get_base_path_info&lt;br /&gt;
* modify_model_path_points&lt;br /&gt;
* maybe_recreate_path&lt;br /&gt;
* ai_path&lt;br /&gt;
&lt;br /&gt;
* ai_start_waypoints&lt;br /&gt;
* find_nearest_waypoint&lt;br /&gt;
* ai_waypoints&lt;br /&gt;
&lt;br /&gt;
==== Attacking/Evading ====&lt;br /&gt;
&lt;br /&gt;
* evaluate_object_as_nearest_objnum&lt;br /&gt;
* get_nearest_objnum&lt;br /&gt;
* find_nearby_threat&lt;br /&gt;
* find_enemy&lt;br /&gt;
&lt;br /&gt;
* ai_attack_object&lt;br /&gt;
* ai_attack_wing&lt;br /&gt;
* ai_chase_ct&lt;br /&gt;
* ai_chase_eb&lt;br /&gt;
* ai_endangered_time&lt;br /&gt;
* ai_endangered_by_weapon&lt;br /&gt;
* ai_near_full_strength&lt;br /&gt;
* get_behind_ship&lt;br /&gt;
&lt;br /&gt;
* ai_evade_object&lt;br /&gt;
* evade_weapon&lt;br /&gt;
* ai_evade&lt;br /&gt;
* slide_face_ship&lt;br /&gt;
* evade_ship&lt;br /&gt;
&lt;br /&gt;
* ai_do_safety&lt;br /&gt;
* ai_safety_pick_spot&lt;br /&gt;
* ai_safety_goto_spot&lt;br /&gt;
* ai_safety_circle_spot&lt;br /&gt;
* ai_safety&lt;br /&gt;
&lt;br /&gt;
==== Docking/Repairing/Rearming ====&lt;br /&gt;
&lt;br /&gt;
* ai_set_goal_maybe_abort_dock&lt;br /&gt;
* ai_do_objects_docked_stuff&lt;br /&gt;
* ai_do_objects_undocked_stuff&lt;br /&gt;
* ai_dock_with_object&lt;br /&gt;
&lt;br /&gt;
==== Neutral ====&lt;br /&gt;
&lt;br /&gt;
* ai_stay_still&lt;br /&gt;
* ai_do_stay_near&lt;br /&gt;
&lt;br /&gt;
* ai_form_on_wing&lt;br /&gt;
* ai_formation_object_get_slotnum&lt;br /&gt;
&lt;br /&gt;
* ai_ignore_object&lt;br /&gt;
* ai_ignore_wing&lt;br /&gt;
&lt;br /&gt;
* ai_start_fly_to_ship&lt;br /&gt;
* ai_fly_to_ship&lt;br /&gt;
&lt;br /&gt;
==== Firing ====&lt;br /&gt;
&lt;br /&gt;
* maybe_resume_previous_mode&lt;br /&gt;
&lt;br /&gt;
* ai_maybe_fire_afterburner&lt;br /&gt;
* maybe_afterburner_after_ship_hit&lt;br /&gt;
&lt;br /&gt;
* ai_select_primary_weapon_OLD&lt;br /&gt;
* ai_select_primary_weapon&lt;br /&gt;
* set_primary_weapon_linkage&lt;br /&gt;
* ai_fire_primary_weapon&lt;br /&gt;
* ai_select_secondary_weapon&lt;br /&gt;
* ai_fire_secondary_weapon&lt;br /&gt;
&lt;br /&gt;
* ai_maybe_announce_shockwave_weapon&lt;br /&gt;
&lt;br /&gt;
* compute_incoming_payload&lt;br /&gt;
* check_ok_to_fire&lt;br /&gt;
&lt;br /&gt;
* ai_get_weapon_dist&lt;br /&gt;
* ai_get_weapon_speed&lt;br /&gt;
&lt;br /&gt;
==== Misc ====&lt;br /&gt;
&lt;br /&gt;
* ai_set_positions&lt;br /&gt;
&lt;br /&gt;
=== Rendering (debug) ===&lt;br /&gt;
&lt;br /&gt;
* render_all_ship_bay_paths&lt;br /&gt;
* render_all_subsys_paths&lt;br /&gt;
* render_path_points&lt;br /&gt;
&lt;br /&gt;
=== (Still not sorted) ===&lt;br /&gt;
&lt;br /&gt;
* ai_good_secondary_time&lt;br /&gt;
* is_preferred_weapon&lt;br /&gt;
* ai_init_secondary_info&lt;br /&gt;
* ai_set_rearm_status&lt;br /&gt;
* ai_good_time_to_rearm&lt;br /&gt;
* garbage_collect_path_points&lt;br /&gt;
* ai_init&lt;br /&gt;
* ai_level_init&lt;br /&gt;
* free_ai_stuff&lt;br /&gt;
* Skill_level_names&lt;br /&gt;
* parse_ai_class&lt;br /&gt;
* reset_ai_class_names&lt;br /&gt;
* parse_aitbl&lt;br /&gt;
* hash&lt;br /&gt;
* create_object_hash&lt;br /&gt;
* is_object_stealth_ship&lt;br /&gt;
* init_ai_stealth_info&lt;br /&gt;
* get_skill_stealth_dist_scaler&lt;br /&gt;
* get_skill_stealth_dot_scaler&lt;br /&gt;
* ai_is_stealth_visible&lt;br /&gt;
* update_ai_stealth_info_with_error&lt;br /&gt;
* ai_update_danger_weapon&lt;br /&gt;
* ai_turn_towards_vector&lt;br /&gt;
* init_ship_info&lt;br /&gt;
* set_target_objnum&lt;br /&gt;
* set_targeted_subsys&lt;br /&gt;
* ai_object_init&lt;br /&gt;
* turn_away_from_point&lt;br /&gt;
* is_ignore_object_sub&lt;br /&gt;
* find_ignore_new_object_index&lt;br /&gt;
* is_ignore_object&lt;br /&gt;
* compact_ignore_new_objects&lt;br /&gt;
* ai_near_full_strength&lt;br /&gt;
* mabs_pick_goal_point&lt;br /&gt;
* maybe_avoid_big_ship&lt;br /&gt;
* compute_desired_rvec&lt;br /&gt;
* ai_stealth_find&lt;br /&gt;
* ai_stealth_sweep&lt;br /&gt;
* ai_chase_attack&lt;br /&gt;
* ai_chase_es&lt;br /&gt;
* ai_chase_ga&lt;br /&gt;
* ai_set_attack_subsystem&lt;br /&gt;
* ai_set_guard_vec&lt;br /&gt;
* ai_set_guard_wing&lt;br /&gt;
* ai_set_evade_object&lt;br /&gt;
* ai_set_guard_object&lt;br /&gt;
* update_aspect_lock_information&lt;br /&gt;
* ai_chase_fly_away&lt;br /&gt;
* has_preferred_secondary&lt;br /&gt;
* ai_choose_secondary_weapon&lt;br /&gt;
* set_secondary_fire_delay&lt;br /&gt;
* ai_chase_big_approach_set_goal&lt;br /&gt;
* ai_chase_big_circle_set_goal&lt;br /&gt;
* ai_chase_big_get_separations&lt;br /&gt;
* ai_chase_big_parallel_set_goal&lt;br /&gt;
* ai_cruiser_chase_set_goal_pos&lt;br /&gt;
* maybe_hack_cruiser_chase_abort&lt;br /&gt;
* ai_cruiser_chase&lt;br /&gt;
* ai_chase&lt;br /&gt;
* dock_move_towards_point&lt;br /&gt;
* set_goal_dock_orient&lt;br /&gt;
* find_parent_rotating_submodel&lt;br /&gt;
* find_adjusted_dockpoint_info&lt;br /&gt;
* dock_orient_and_approach&lt;br /&gt;
* debug_find_guard_object&lt;br /&gt;
* num_ships_attacking&lt;br /&gt;
* remove_farthest_attacker&lt;br /&gt;
* ai_maybe_limit_attackers&lt;br /&gt;
* guard_object_was_hit&lt;br /&gt;
* maybe_update_guard_object&lt;br /&gt;
* ai_guard_find_nearby_bomb&lt;br /&gt;
* ai_guard_find_nearby_ship&lt;br /&gt;
* ai_guard_find_nearby_asteroid&lt;br /&gt;
* ai_guard_find_nearby_object&lt;br /&gt;
* get_cylinder_points&lt;br /&gt;
* ai_big_guard&lt;br /&gt;
* ai_guard&lt;br /&gt;
* ai_do_objects_repairing_stuff&lt;br /&gt;
* ai_cleanup_dock_mode_subjective&lt;br /&gt;
* ai_cleanup_dock_mode_objective&lt;br /&gt;
* ai_cleanup_rearm_mode&lt;br /&gt;
* ai_still&lt;br /&gt;
* ai_stay_near&lt;br /&gt;
* maybe_dock_obstructed&lt;br /&gt;
* ai_dock&lt;br /&gt;
* ai_debug_render_stuff&lt;br /&gt;
* process_subobjects&lt;br /&gt;
* get_wing_index&lt;br /&gt;
* get_wing_leader&lt;br /&gt;
* get_wing_delta&lt;br /&gt;
* gwlr_1&lt;br /&gt;
* gwlr_object_1&lt;br /&gt;
* get_wing_largest_radius&lt;br /&gt;
* DCF&lt;br /&gt;
* DCF&lt;br /&gt;
* get_absolute_wing_pos&lt;br /&gt;
* render_wing_phantoms&lt;br /&gt;
* render_wing_phantoms_all&lt;br /&gt;
* ai_fly_in_formation&lt;br /&gt;
* ai_disband_formation&lt;br /&gt;
* formation_is_leader_chaotic&lt;br /&gt;
* ai_most_massive_object_of_its_wing_of_all_docked_objects_helper&lt;br /&gt;
* ai_formation&lt;br /&gt;
* ai_do_repair_frame&lt;br /&gt;
* call_doa&lt;br /&gt;
* ai_maybe_launch_cmeasure&lt;br /&gt;
* ai_preprocess_ignore_objnum&lt;br /&gt;
* ai_chase_circle&lt;br /&gt;
* ai_transfer_shield&lt;br /&gt;
* ai_balance_shield&lt;br /&gt;
* ai_manage_shield&lt;br /&gt;
* ai_maybe_evade_locked_missile&lt;br /&gt;
* maybe_evade_dumbfire_weapon&lt;br /&gt;
* ai_manage_bay_doors&lt;br /&gt;
* ai_acquire_emerge_path&lt;br /&gt;
* ai_emerge_bay_path_cleanup&lt;br /&gt;
* ai_bay_emerge&lt;br /&gt;
* ai_find_closest_depart_path&lt;br /&gt;
* ai_acquire_depart_path&lt;br /&gt;
* ai_bay_depart&lt;br /&gt;
* ai_sentrygun&lt;br /&gt;
* ai_execute_behavior&lt;br /&gt;
* mrs_subsystem&lt;br /&gt;
* num_allies_rearming&lt;br /&gt;
* maybe_request_support&lt;br /&gt;
* ai_set_mode_warp_out&lt;br /&gt;
* ai_maybe_depart&lt;br /&gt;
* ai_warp_out&lt;br /&gt;
* ai_find_shockwave_weapon&lt;br /&gt;
* ai_announce_ship_dying&lt;br /&gt;
* ai_find_shockwave_ship&lt;br /&gt;
* aas_1&lt;br /&gt;
* ai_avoid_shockwave&lt;br /&gt;
* ai_await_repair_frame&lt;br /&gt;
* ai_maybe_self_destruct&lt;br /&gt;
* ai_need_new_target&lt;br /&gt;
* maybe_big_ship_collide_recover_frame&lt;br /&gt;
* validate_mode_submode&lt;br /&gt;
* ai_frame&lt;br /&gt;
* create_waypoints&lt;br /&gt;
* ai_process&lt;br /&gt;
* init_ai_object&lt;br /&gt;
* init_ai_objects&lt;br /&gt;
* init_ai_system&lt;br /&gt;
* ai_set_default_behavior&lt;br /&gt;
* ai_do_default_behavior&lt;br /&gt;
* process_friendly_hit_message&lt;br /&gt;
* maybe_process_friendly_hit&lt;br /&gt;
* maybe_set_dynamic_chase&lt;br /&gt;
* firing_aspect_seeking_bomb&lt;br /&gt;
* big_ship_collide_recover_start&lt;br /&gt;
* ai_update_lethality&lt;br /&gt;
* ai_ship_hit&lt;br /&gt;
* ai_ship_destroy&lt;br /&gt;
* ai_deathroll_start&lt;br /&gt;
* ai_abort_rearm_request&lt;br /&gt;
* ai_add_rearm_goal&lt;br /&gt;
* ai_issue_rearm_request&lt;br /&gt;
* ai_rearm_repair&lt;br /&gt;
* ai_return_path_num_from_dockbay&lt;br /&gt;
* cheat_fire_synaptic&lt;br /&gt;
* maybe_cheat_fire_synaptic&lt;/div&gt;</summary>
		<author><name>Benoit</name></author>
	</entry>
	<entry>
		<id>https://wiki.hard-light.org/index.php?title=Source_Code_Reference&amp;diff=10510</id>
		<title>Source Code Reference</title>
		<link rel="alternate" type="text/html" href="https://wiki.hard-light.org/index.php?title=Source_Code_Reference&amp;diff=10510"/>
		<updated>2007-07-11T10:35:30Z</updated>

		<summary type="html">&lt;p&gt;Benoit: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== External libraries ==&lt;br /&gt;
&lt;br /&gt;
Freespace2 relies on the following libraries, which are included in the source tree:&lt;br /&gt;
* lua: LUA Scripting language&lt;br /&gt;
* libjpeg: Jpeg library&lt;br /&gt;
* oggvorbis: Ogg Vorbis sound library&lt;br /&gt;
* dx8sdk: DirectX 8 SDK&lt;br /&gt;
* dx9sdk: DirectX 9 SDK&lt;br /&gt;
&lt;br /&gt;
See msdn.microsoft.com for discussion of the DirectX libraries. For the other libraries, look in the README files for more info&lt;br /&gt;
&lt;br /&gt;
== Freespace2 Source Code ==&lt;br /&gt;
&lt;br /&gt;
The root also contains the actual Freespace2 code, in the code/ directory. The Freespace2 source code consists in several components, each of which is kept in a separate subdirectory. These components are listed below, from different views.&lt;br /&gt;
&lt;br /&gt;
=== Alphabetical view ===&lt;br /&gt;
&lt;br /&gt;
* [[Source ai|ai]] (Computer AI)&lt;br /&gt;
* [[Source anim|anim]] (Displaying .ani animated bitmaps)&lt;br /&gt;
* asteroid (Handle asteroids - movement, collisions, creating smaller asteriods when larger ones are blown up etc.)&lt;br /&gt;
* autopilot (Handles autopilot control - where if there are no enemies, travelling a long distance etc. control is temporarily switched to the computer)&lt;br /&gt;
* [[Source bmpman|bmpman]] (Manage 2d graphics files, such as .bmp, .tga, .jpg etc.)&lt;br /&gt;
* camera (???)&lt;br /&gt;
* cfile (File/directory management routines including .VP file handling that are OS independent eg. handles differences between Linux &amp;amp; Windows)&lt;br /&gt;
* cmdline (Handles command line switches, such as -mipmap etc.)&lt;br /&gt;
* cmeasure (Handles countermeasures - flares that the player &amp;amp; AI can drop to disrupt missiles)&lt;br /&gt;
* controlconfig (Configures keyboard/mouse/joystick controls)&lt;br /&gt;
* cutscene (Handles cutscene viewing)&lt;br /&gt;
* [[Source ddsutils|ddsutils]] (Handles compressed textures for 3d graphics cards that support it)&lt;br /&gt;
* debris (Creates &amp;amp; handles flying debris from exploding ships)&lt;br /&gt;
* debugconsole (Handles debugging console and file)&lt;br /&gt;
* decals (Adds support for painting decals - small 2d textures - onto ships etc.)&lt;br /&gt;
* demo (Allows you to save &amp;amp; playback games to show as demos)&lt;br /&gt;
* directx (Specific includes for the Microsoft DirectX library - Windows only)&lt;br /&gt;
* exceptionhandler (Deals with crashes, saving stack trace, system info etc.)&lt;br /&gt;
* fireball (Displays &amp;amp; handles fireballs and warping effects)&lt;br /&gt;
* freespace2 (Main code - handles engine initialisation, loading resources, plus windows resources like icons &amp;amp; dialog boxes)&lt;br /&gt;
* fs2open_pxo (Network code)&lt;br /&gt;
* gamehelp (Displays context sensitive help text)&lt;br /&gt;
* gamesequence (Handles progression of events during a campaign, such as entering a mission, showing credits etc.)&lt;br /&gt;
* gamesnd (Handles sounds &amp;amp; music)&lt;br /&gt;
* globalincs (Basic global constants &amp;amp; definitions, eg. version, colours)&lt;br /&gt;
* [[Source graphics|graphics]] (Low-level wrapper for all 2d &amp;amp; 3d graphics that handles different display engines (DirectX, OpenGL etc)&lt;br /&gt;
* hud (Handles the HUD - all the 2d cockpit graphics that the player can see eg. radar, ammo, escort list, sqaud etc)&lt;br /&gt;
* iff_defs (Handles traitor ships???)&lt;br /&gt;
* io (Handles IO devices, such as keyboard, mouse &amp;amp; joystick)&lt;br /&gt;
* irc (Adds support for an IRC chat client)&lt;br /&gt;
* [[Source jpgutils|jpgutils]] (Opens, reads JPG files)&lt;br /&gt;
* jumpnode (Displays &amp;amp; handles jump nodes)&lt;br /&gt;
* lab (???)&lt;br /&gt;
* lighting (Handles light sources, and their effect on ships)&lt;br /&gt;
* localization (Handles a global string table for translating all written text into foreign languages)&lt;br /&gt;
* math (Library of math routines for handling vectors, splines etc)&lt;br /&gt;
* menuui (Handles all the misc user interface, such as the main menu, tech room, campaign list etc)&lt;br /&gt;
* mission (Handles general mission actions eg. briefing, goals, training info, in-mission messages etc)&lt;br /&gt;
* missionui (Handles UI for general mission actions)&lt;br /&gt;
* mm (Headers for older MS Multimedia library)&lt;br /&gt;
* model (Displays and handles ship models eg. reading files, collission detection etc)&lt;br /&gt;
* nebula (Displays and handles nebulae)&lt;br /&gt;
* network (All multi-player code, eg. UI, network traffic)&lt;br /&gt;
* object (High-level code to handle all objects eg. ships, weapons, debris, asteroids, waypoints, fireballs, shockwaves)&lt;br /&gt;
* observer (???)&lt;br /&gt;
* osapi (Wraps low-level Operating System calls, for different OS, eg. multi-threads, windows event loops, main app window)&lt;br /&gt;
* palman (Handles bitmap palettes - different colour maps for the same 2d bitmap)&lt;br /&gt;
* parse (Handles scripting files, eg. python, LUA etc)&lt;br /&gt;
* particle (Displays and handles particles, such as smoke, fire) &lt;br /&gt;
* [[Source pcxutils|pcxutils]] (Handles 2d .pcx graphics files)&lt;br /&gt;
* physics (Handles realistic physical behaviour of objects, such as ship acceleration/deceleration, rotation etc.)&lt;br /&gt;
* playerman (Handles pilot files &amp;amp; player ship movement)&lt;br /&gt;
* popup (Displays &amp;amp; handles 2d pop-up windows, eg. when the player dies)&lt;br /&gt;
* radar (Displays &amp;amp; handles the radar)&lt;br /&gt;
* [[Source render|render]] (Low-level 3d rendering code for some primitives)&lt;br /&gt;
* ship (Displays &amp;amp; handles all ship code, eg. shields, afterburner)&lt;br /&gt;
* sound (Low-level sound, speach &amp;amp; music routines)&lt;br /&gt;
* species_defs (Reads species_defs.tbl to handle different behaviour for different species)&lt;br /&gt;
* starfield (Displays &amp;amp; handles background images such as starfields, nebulae etc)&lt;br /&gt;
* stats (Displays &amp;amp; handles player statistics, medals etc)&lt;br /&gt;
* [[Source tgautils|tgautils]] (Handles .tga 2d graphics files)&lt;br /&gt;
* ui (Low-level user inteface routines eg. buttons, scrollbars)&lt;br /&gt;
* vcodec (Handles player voice streaming for multiplayer ???)&lt;br /&gt;
* weapon (Displays &amp;amp; handles everything to do with weapons)&lt;br /&gt;
* windows_stub (Low-level windows functions that are needed for Unix)&lt;br /&gt;
&lt;br /&gt;
There are also some directories that are only used for generating tools (not part of the main fs2 executable):&lt;br /&gt;
* cfilearchiver (Creates .VP file archives)&lt;br /&gt;
* cfileextractor (Extracts .VP file archives)&lt;br /&gt;
* cryptstring (Creates encrypted strings)&lt;br /&gt;
* fred2 (The FReespace EDitor)&lt;br /&gt;
* inetfile (FTP &amp;amp; HTTP network handlers)&lt;br /&gt;
* scramble (Utility to scramble file tables for the Demo version)&lt;br /&gt;
* variables (???)&lt;br /&gt;
* wxfred2 (Cross-platform version of FRED2)&lt;br /&gt;
&lt;br /&gt;
=== Layer view ===&lt;br /&gt;
&lt;br /&gt;
* Infrastructure&lt;br /&gt;
** System&lt;br /&gt;
*** cfile/&lt;br /&gt;
*** exceptionhandler/&lt;br /&gt;
*** irc/&lt;br /&gt;
*** localization/&lt;br /&gt;
*** osapi/&lt;br /&gt;
** Math&lt;br /&gt;
*** math/&lt;br /&gt;
** Sound&lt;br /&gt;
*** sound/&lt;br /&gt;
*** vcodec/&lt;br /&gt;
** Windows&lt;br /&gt;
*** ui/&lt;br /&gt;
*** windows_stub/&lt;br /&gt;
** 2D graphics&lt;br /&gt;
*** [[Source anim|anim]]&lt;br /&gt;
*** [[Source bmpman|bmpman]]&lt;br /&gt;
*** [[Source ddsutils|ddsutils]]&lt;br /&gt;
*** [[Source jpgutils|jpgutils]]&lt;br /&gt;
*** [[Source pcxutils|pcxutils]]&lt;br /&gt;
*** [[Source tgautils|tgautils]]&lt;br /&gt;
*** palman/&lt;br /&gt;
** 3D graphics&lt;br /&gt;
*** decals/&lt;br /&gt;
*** mm/&lt;br /&gt;
*** directx/&lt;br /&gt;
*** [[Source graphics|graphics]]&lt;br /&gt;
*** camera/&lt;br /&gt;
*** [[Source render|render]]&lt;br /&gt;
** User Input&lt;br /&gt;
*** controlconfig/&lt;br /&gt;
*** io/&lt;br /&gt;
* Freespace2&lt;br /&gt;
** Common&lt;br /&gt;
*** globalincs/&lt;br /&gt;
*** cutscene/&lt;br /&gt;
*** cmdline/&lt;br /&gt;
*** debugconsole/&lt;br /&gt;
** In Space&lt;br /&gt;
*** [[Source ai|ai]]&lt;br /&gt;
*** asteroid/&lt;br /&gt;
*** autopilot/&lt;br /&gt;
*** cmeasure/&lt;br /&gt;
*** debris/&lt;br /&gt;
*** demo/&lt;br /&gt;
*** fireball/&lt;br /&gt;
*** gamehelp/&lt;br /&gt;
*** gamesequence/&lt;br /&gt;
*** gamesnd/&lt;br /&gt;
*** hud/&lt;br /&gt;
*** iff_defs/&lt;br /&gt;
*** jumpnode/&lt;br /&gt;
*** lighting/&lt;br /&gt;
*** nebula/&lt;br /&gt;
*** object/&lt;br /&gt;
*** observer/&lt;br /&gt;
*** model/&lt;br /&gt;
*** network/&lt;br /&gt;
*** particle/&lt;br /&gt;
*** parse/&lt;br /&gt;
*** popup/&lt;br /&gt;
*** physics/&lt;br /&gt;
*** radar/&lt;br /&gt;
*** ship/&lt;br /&gt;
*** species_defs/&lt;br /&gt;
*** starfield/&lt;br /&gt;
*** weapon/&lt;br /&gt;
** In Base&lt;br /&gt;
*** stats/&lt;br /&gt;
*** menuui/&lt;br /&gt;
*** mission/&lt;br /&gt;
*** missionui/&lt;br /&gt;
** Engine&lt;br /&gt;
*** fs2open_pxo/&lt;br /&gt;
*** freespace2/&lt;br /&gt;
*** playerman/&lt;br /&gt;
* FRED&lt;br /&gt;
** fred2/&lt;br /&gt;
** wxfred2/&lt;br /&gt;
* Tools&lt;br /&gt;
** cfilearchiver/&lt;br /&gt;
** cfileextractor/&lt;br /&gt;
** cryptstring/&lt;br /&gt;
** lab/&lt;br /&gt;
** scramble/&lt;br /&gt;
** inetfile/&lt;br /&gt;
** variables/&lt;br /&gt;
&lt;br /&gt;
=== Category Browser ===&lt;br /&gt;
The subdirectories above are also categorised by function. See the Category:Source Code to browse this way.&lt;br /&gt;
&lt;br /&gt;
[[Category:Source Code]]&lt;/div&gt;</summary>
		<author><name>Benoit</name></author>
	</entry>
	<entry>
		<id>https://wiki.hard-light.org/index.php?title=Source_Code_Reference&amp;diff=10110</id>
		<title>Source Code Reference</title>
		<link rel="alternate" type="text/html" href="https://wiki.hard-light.org/index.php?title=Source_Code_Reference&amp;diff=10110"/>
		<updated>2007-06-26T20:32:34Z</updated>

		<summary type="html">&lt;p&gt;Benoit: /* Freespace2 Source Code */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== External libraries ==&lt;br /&gt;
&lt;br /&gt;
Freespace2 relies on the following libraries, which are included in the source tree:&lt;br /&gt;
* lua: LUA Scripting language&lt;br /&gt;
* libjpeg: Jpeg library&lt;br /&gt;
* oggvorbis: Ogg Vorbis sound library&lt;br /&gt;
* dx8sdk: DirectX 8 SDK&lt;br /&gt;
* dx9sdk: DirectX 9 SDK&lt;br /&gt;
&lt;br /&gt;
See msdn.microsoft.com for discussion of the DirectX libraries. For the other libraries, look in the README files for more info&lt;br /&gt;
&lt;br /&gt;
== Freespace2 Source Code ==&lt;br /&gt;
&lt;br /&gt;
The root also contains the actual Freespace2 code, in the code/ directory. The Freespace2 source code consists in several components, each of which is kept in a separate subdirectory. These components are listed below, from different views.&lt;br /&gt;
&lt;br /&gt;
=== Alphabetical view ===&lt;br /&gt;
&lt;br /&gt;
* ai (Computer AI)&lt;br /&gt;
* [[Source anim|anim]] (Displaying .ani animated bitmaps)&lt;br /&gt;
* asteroid (Handle asteroids - movement, collisions, creating smaller asteriods when larger ones are blown up etc.)&lt;br /&gt;
* autopilot (Handles autopilot control - where if there are no enemies, travelling a long distance etc. control is temporarily switched to the computer)&lt;br /&gt;
* [[Source bmpman|bmpman]] (Manage 2d graphics files, such as .bmp, .tga, .jpg etc.)&lt;br /&gt;
* camera (???)&lt;br /&gt;
* cfile (File/directory management routines including .VP file handling that are OS independent eg. handles differences between Linux &amp;amp; Windows)&lt;br /&gt;
* cmdline (Handles command line switches, such as -mipmap etc.)&lt;br /&gt;
* cmeasure (Handles countermeasures - flares that the player &amp;amp; AI can drop to disrupt missiles)&lt;br /&gt;
* controlconfig (Configures keyboard/mouse/joystick controls)&lt;br /&gt;
* cutscene (Handles cutscene viewing)&lt;br /&gt;
* [[Source ddsutils|ddsutils]] (Handles compressed textures for 3d graphics cards that support it)&lt;br /&gt;
* debris (Creates &amp;amp; handles flying debris from exploding ships)&lt;br /&gt;
* debugconsole (Handles debugging console and file)&lt;br /&gt;
* decals (Adds support for painting decals - small 2d textures - onto ships etc.)&lt;br /&gt;
* demo (Allows you to save &amp;amp; playback games to show as demos)&lt;br /&gt;
* directx (Specific includes for the Microsoft DirectX library - Windows only)&lt;br /&gt;
* exceptionhandler (Deals with crashes, saving stack trace, system info etc.)&lt;br /&gt;
* fireball (Displays &amp;amp; handles fireballs and warping effects)&lt;br /&gt;
* freespace2 (Main code - handles engine initialisation, loading resources, plus windows resources like icons &amp;amp; dialog boxes)&lt;br /&gt;
* fs2open_pxo (Network code)&lt;br /&gt;
* gamehelp (Displays context sensitive help text)&lt;br /&gt;
* gamesequence (Handles progression of events during a campaign, such as entering a mission, showing credits etc.)&lt;br /&gt;
* gamesnd (Handles sounds &amp;amp; music)&lt;br /&gt;
* globalincs (Basic global constants &amp;amp; definitions, eg. version, colours)&lt;br /&gt;
* [[Source graphics|graphics]] (Low-level wrapper for all 2d &amp;amp; 3d graphics that handles different display engines (DirectX, OpenGL etc)&lt;br /&gt;
* hud (Handles the HUD - all the 2d cockpit graphics that the player can see eg. radar, ammo, escort list, sqaud etc)&lt;br /&gt;
* iff_defs (Handles traitor ships???)&lt;br /&gt;
* io (Handles IO devices, such as keyboard, mouse &amp;amp; joystick)&lt;br /&gt;
* irc (Adds support for an IRC chat client)&lt;br /&gt;
* [[Source jpgutils|jpgutils]] (Opens, reads JPG files)&lt;br /&gt;
* jumpnode (Displays &amp;amp; handles jump nodes)&lt;br /&gt;
* lab (???)&lt;br /&gt;
* lighting (Handles light sources, and their effect on ships)&lt;br /&gt;
* localization (Handles a global string table for translating all written text into foreign languages)&lt;br /&gt;
* math (Library of math routines for handling vectors, splines etc)&lt;br /&gt;
* menuui (Handles all the misc user interface, such as the main menu, tech room, campaign list etc)&lt;br /&gt;
* mission (Handles general mission actions eg. briefing, goals, training info, in-mission messages etc)&lt;br /&gt;
* missionui (Handles UI for general mission actions)&lt;br /&gt;
* mm (Headers for older MS Multimedia library)&lt;br /&gt;
* model (Displays and handles ship models eg. reading files, collission detection etc)&lt;br /&gt;
* nebula (Displays and handles nebulae)&lt;br /&gt;
* network (All multi-player code, eg. UI, network traffic)&lt;br /&gt;
* object (High-level code to handle all objects eg. ships, weapons, debris, asteroids, waypoints, fireballs, shockwaves)&lt;br /&gt;
* observer (???)&lt;br /&gt;
* osapi (Wraps low-level Operating System calls, for different OS, eg. multi-threads, windows event loops, main app window)&lt;br /&gt;
* palman (Handles bitmap palettes - different colour maps for the same 2d bitmap)&lt;br /&gt;
* parse (Handles scripting files, eg. python, LUA etc)&lt;br /&gt;
* particle (Displays and handles particles, such as smoke, fire) &lt;br /&gt;
* [[Source pcxutils|pcxutils]] (Handles 2d .pcx graphics files)&lt;br /&gt;
* physics (Handles realistic physical behaviour of objects, such as ship acceleration/deceleration, rotation etc.)&lt;br /&gt;
* playerman (Handles pilot files &amp;amp; player ship movement)&lt;br /&gt;
* popup (Displays &amp;amp; handles 2d pop-up windows, eg. when the player dies)&lt;br /&gt;
* radar (Displays &amp;amp; handles the radar)&lt;br /&gt;
* [[Source render|render]] (Low-level 3d rendering code for some primitives)&lt;br /&gt;
* ship (Displays &amp;amp; handles all ship code, eg. shields, afterburner)&lt;br /&gt;
* sound (Low-level sound, speach &amp;amp; music routines)&lt;br /&gt;
* species_defs (Reads species_defs.tbl to handle different behaviour for different species)&lt;br /&gt;
* starfield (Displays &amp;amp; handles background images such as starfields, nebulae etc)&lt;br /&gt;
* stats (Displays &amp;amp; handles player statistics, medals etc)&lt;br /&gt;
* [[Source tgautils|tgautils]] (Handles .tga 2d graphics files)&lt;br /&gt;
* ui (Low-level user inteface routines eg. buttons, scrollbars)&lt;br /&gt;
* vcodec (Handles player voice streaming for multiplayer ???)&lt;br /&gt;
* weapon (Displays &amp;amp; handles everything to do with weapons)&lt;br /&gt;
* windows_stub (Low-level windows functions that are needed for Unix)&lt;br /&gt;
&lt;br /&gt;
There are also some directories that are only used for generating tools (not part of the main fs2 executable):&lt;br /&gt;
* cfilearchiver (Creates .VP file archives)&lt;br /&gt;
* cfileextractor (Extracts .VP file archives)&lt;br /&gt;
* cryptstring (Creates encrypted strings)&lt;br /&gt;
* fred2 (The FReespace EDitor)&lt;br /&gt;
* inetfile (FTP &amp;amp; HTTP network handlers)&lt;br /&gt;
* scramble (Utility to scramble file tables for the Demo version)&lt;br /&gt;
* variables (???)&lt;br /&gt;
* wxfred2 (Cross-platform version of FRED2)&lt;br /&gt;
&lt;br /&gt;
=== Layer view ===&lt;br /&gt;
&lt;br /&gt;
* Infrastructure&lt;br /&gt;
** System&lt;br /&gt;
*** cfile/&lt;br /&gt;
*** exceptionhandler/&lt;br /&gt;
*** irc/&lt;br /&gt;
*** localization/&lt;br /&gt;
*** osapi/&lt;br /&gt;
** Math&lt;br /&gt;
*** math/&lt;br /&gt;
** Sound&lt;br /&gt;
*** sound/&lt;br /&gt;
*** vcodec/&lt;br /&gt;
** Windows&lt;br /&gt;
*** ui/&lt;br /&gt;
*** windows_stub/&lt;br /&gt;
** 2D graphics&lt;br /&gt;
*** [[Source anim|anim]]&lt;br /&gt;
*** [[Source bmpman|bmpman]]&lt;br /&gt;
*** [[Source ddsutils|ddsutils]]&lt;br /&gt;
*** [[Source jpgutils|jpgutils]]&lt;br /&gt;
*** [[Source pcxutils|pcxutils]]&lt;br /&gt;
*** [[Source tgautils|tgautils]]&lt;br /&gt;
*** palman/&lt;br /&gt;
** 3D graphics&lt;br /&gt;
*** decals/&lt;br /&gt;
*** mm/&lt;br /&gt;
*** directx/&lt;br /&gt;
*** [[Source graphics|graphics]]&lt;br /&gt;
*** camera/&lt;br /&gt;
*** [[Source render|render]]&lt;br /&gt;
** User Input&lt;br /&gt;
*** controlconfig/&lt;br /&gt;
*** io/&lt;br /&gt;
* Freespace2&lt;br /&gt;
** Common&lt;br /&gt;
*** globalincs/&lt;br /&gt;
*** cutscene/&lt;br /&gt;
*** cmdline/&lt;br /&gt;
*** debugconsole/&lt;br /&gt;
** In Space&lt;br /&gt;
*** ai/&lt;br /&gt;
*** asteroid/&lt;br /&gt;
*** autopilot/&lt;br /&gt;
*** cmeasure/&lt;br /&gt;
*** debris/&lt;br /&gt;
*** demo/&lt;br /&gt;
*** fireball/&lt;br /&gt;
*** gamehelp/&lt;br /&gt;
*** gamesequence/&lt;br /&gt;
*** gamesnd/&lt;br /&gt;
*** hud/&lt;br /&gt;
*** iff_defs/&lt;br /&gt;
*** jumpnode/&lt;br /&gt;
*** lighting/&lt;br /&gt;
*** nebula/&lt;br /&gt;
*** object/&lt;br /&gt;
*** observer/&lt;br /&gt;
*** model/&lt;br /&gt;
*** network/&lt;br /&gt;
*** particle/&lt;br /&gt;
*** parse/&lt;br /&gt;
*** popup/&lt;br /&gt;
*** physics/&lt;br /&gt;
*** radar/&lt;br /&gt;
*** ship/&lt;br /&gt;
*** species_defs/&lt;br /&gt;
*** starfield/&lt;br /&gt;
*** weapon/&lt;br /&gt;
** In Base&lt;br /&gt;
*** stats/&lt;br /&gt;
*** menuui/&lt;br /&gt;
*** mission/&lt;br /&gt;
*** missionui/&lt;br /&gt;
** Engine&lt;br /&gt;
*** fs2open_pxo/&lt;br /&gt;
*** freespace2/&lt;br /&gt;
*** playerman/&lt;br /&gt;
* FRED&lt;br /&gt;
** fred2/&lt;br /&gt;
** wxfred2/&lt;br /&gt;
* Tools&lt;br /&gt;
** cfilearchiver/&lt;br /&gt;
** cfileextractor/&lt;br /&gt;
** cryptstring/&lt;br /&gt;
** lab/&lt;br /&gt;
** scramble/&lt;br /&gt;
** inetfile/&lt;br /&gt;
** variables/&lt;br /&gt;
&lt;br /&gt;
=== Category Browser ===&lt;br /&gt;
The subdirectories above are also categorised by function. See the Category:Source Code to browse this way.&lt;br /&gt;
&lt;br /&gt;
[[Category:Source Code]]&lt;/div&gt;</summary>
		<author><name>Benoit</name></author>
	</entry>
	<entry>
		<id>https://wiki.hard-light.org/index.php?title=Source_Code_Reference&amp;diff=10109</id>
		<title>Source Code Reference</title>
		<link rel="alternate" type="text/html" href="https://wiki.hard-light.org/index.php?title=Source_Code_Reference&amp;diff=10109"/>
		<updated>2007-06-26T20:30:40Z</updated>

		<summary type="html">&lt;p&gt;Benoit: /* Layer view */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== External libraries ==&lt;br /&gt;
&lt;br /&gt;
Freespace2 relies on the following libraries, which are included in the source tree:&lt;br /&gt;
* lua: LUA Scripting language&lt;br /&gt;
* libjpeg: Jpeg library&lt;br /&gt;
* oggvorbis: Ogg Vorbis sound library&lt;br /&gt;
* dx8sdk: DirectX 8 SDK&lt;br /&gt;
* dx9sdk: DirectX 9 SDK&lt;br /&gt;
&lt;br /&gt;
See msdn.microsoft.com for discussion of the DirectX libraries. For the other libraries, look in the README files for more info&lt;br /&gt;
&lt;br /&gt;
== Freespace2 Source Code ==&lt;br /&gt;
&lt;br /&gt;
The root also contains the actual Freespace2 code, in the code/ directory. The Freespace2 source code consists in several components, each of which is kept in a separate subdirectory. These components are listed below, from different views.&lt;br /&gt;
&lt;br /&gt;
=== Alphabetical view ===&lt;br /&gt;
&lt;br /&gt;
* ai (Computer AI)&lt;br /&gt;
* [[Source anim|anim]] (Displaying .ani animated bitmaps)&lt;br /&gt;
* asteroid (Handle asteroids - movement, collisions, creating smaller asteriods when larger ones are blown up etc.)&lt;br /&gt;
* autopilot (Handles autopilot control - where if there are no enemies, travelling a long distance etc. control is temporarily switched to the computer)&lt;br /&gt;
* [[Source bmpman|bmpman]] (Manage 2d graphics files, such as .bmp, .tga, .jpg etc.)&lt;br /&gt;
* camera (???)&lt;br /&gt;
* cfile (File/directory management routines including .VP file handling that are OS independent eg. handles differences between Linux &amp;amp; Windows)&lt;br /&gt;
* cmdline (Handles command line switches, such as -mipmap etc.)&lt;br /&gt;
* cmeasure (Handles countermeasures - flares that the player &amp;amp; AI can drop to disrupt missiles)&lt;br /&gt;
* controlconfig (Configures keyboard/mouse/joystick controls)&lt;br /&gt;
* cutscene (Handles cutscene viewing)&lt;br /&gt;
* [[Source ddsutils|ddsutils]] (Handles compressed textures for 3d graphics cards that support it)&lt;br /&gt;
* debris (Creates &amp;amp; handles flying debris from exploding ships)&lt;br /&gt;
* debugconsole (Handles debugging console and file)&lt;br /&gt;
* decals (Adds support for painting decals - small 2d textures - onto ships etc.)&lt;br /&gt;
* demo (Allows you to save &amp;amp; playback games to show as demos)&lt;br /&gt;
* directx (Specific includes for the Microsoft DirectX library - Windows only)&lt;br /&gt;
* exceptionhandler (Deals with crashes, saving stack trace, system info etc.)&lt;br /&gt;
* fireball (Displays &amp;amp; handles fireballs and warping effects)&lt;br /&gt;
* freespace2 (Main code - handles engine initialisation, loading resources, plus windows resources like icons &amp;amp; dialog boxes)&lt;br /&gt;
* fs2open_pxo (Network code)&lt;br /&gt;
* gamehelp (Displays context sensitive help text)&lt;br /&gt;
* gamesequence (Handles progression of events during a campaign, such as entering a mission, showing credits etc.)&lt;br /&gt;
* gamesnd (Handles sounds &amp;amp; music)&lt;br /&gt;
* globalincs (Basic global constants &amp;amp; definitions, eg. version, colours)&lt;br /&gt;
* [[Source graphics|graphics]] (Low-level wrapper for all 2d &amp;amp; 3d graphics that handles different display engines (DirectX, OpenGL etc)&lt;br /&gt;
* hud (Handles the HUD - all the 2d cockpit graphics that the player can see eg. radar, ammo, escort list, sqaud etc)&lt;br /&gt;
* iff_defs (Handles traitor ships???)&lt;br /&gt;
* io (Handles IO devices, such as keyboard, mouse &amp;amp; joystick)&lt;br /&gt;
* irc (Adds support for an IRC chat client)&lt;br /&gt;
* [[Source jpgutils|jpgutils]] (Opens, reads JPG files)&lt;br /&gt;
* jumpnode (Displays &amp;amp; handles jump nodes)&lt;br /&gt;
* lab (???)&lt;br /&gt;
* lighting (Handles light sources, and their effect on ships)&lt;br /&gt;
* localization (Handles a global string table for translating all written text into foreign languages)&lt;br /&gt;
* math (Library of math routines for handling vectors, splines etc)&lt;br /&gt;
* menuui (Handles all the misc user interface, such as the main menu, tech room, campaign list etc)&lt;br /&gt;
* mission (Handles general mission actions eg. briefing, goals, training info, in-mission messages etc)&lt;br /&gt;
* missionui (Handles UI for general mission actions)&lt;br /&gt;
* mm (Headers for older MS Multimedia library)&lt;br /&gt;
* model (Displays and handles ship models eg. reading files, collission detection etc)&lt;br /&gt;
* nebula (Displays and handles nebulae)&lt;br /&gt;
* network (All multi-player code, eg. UI, network traffic)&lt;br /&gt;
* object (High-level code to handle all objects eg. ships, weapons, debris, asteroids, waypoints, fireballs, shockwaves)&lt;br /&gt;
* observer (???)&lt;br /&gt;
* osapi (Wraps low-level Operating System calls, for different OS, eg. multi-threads, windows event loops, main app window)&lt;br /&gt;
* palman (Handles bitmap palettes - different colour maps for the same 2d bitmap)&lt;br /&gt;
* parse (Handles scripting files, eg. python, LUA etc)&lt;br /&gt;
* particle (Displays and handles particles, such as smoke, fire) &lt;br /&gt;
* [[Source pcxutils|pcxutils]] (Handles 2d .pcx graphics files)&lt;br /&gt;
* physics (Handles realistic physical behaviour of objects, such as ship acceleration/deceleration, rotation etc.)&lt;br /&gt;
* playerman (Handles pilot files &amp;amp; player ship movement)&lt;br /&gt;
* popup (Displays &amp;amp; handles 2d pop-up windows, eg. when the player dies)&lt;br /&gt;
* radar (Displays &amp;amp; handles the radar)&lt;br /&gt;
* [[Source render|render]] (Low-level 3d rendering code for some primitives)&lt;br /&gt;
* ship (Displays &amp;amp; handles all ship code, eg. shields, afterburner)&lt;br /&gt;
* sound (Low-level sound, speach &amp;amp; music routines)&lt;br /&gt;
* species_defs (Reads species_defs.tbl to handle different behaviour for different species)&lt;br /&gt;
* starfield (Displays &amp;amp; handles background images such as starfields, nebulae etc)&lt;br /&gt;
* stats (Displays &amp;amp; handles player statistics, medals etc)&lt;br /&gt;
* [[Source tgautils|tgautils]] (Handles .tga 2d graphics files)&lt;br /&gt;
* ui (Low-level user inteface routines eg. buttons, scrollbars)&lt;br /&gt;
* vcodec (Handles player voice streaming for multiplayer ???)&lt;br /&gt;
* weapon (Displays &amp;amp; handles everything to do with weapons)&lt;br /&gt;
* windows_stub (Low-level windows functions that are needed for Unix)&lt;br /&gt;
&lt;br /&gt;
There are also some directories that are only used for generating tools (not part of the main fs2 executable):&lt;br /&gt;
* cfilearchiver (Creates .VP file archives)&lt;br /&gt;
* cfileextractor (Extracts .VP file archives)&lt;br /&gt;
* cryptstring (Creates encrypted strings)&lt;br /&gt;
* fred2 (The FReespace EDitor)&lt;br /&gt;
* inetfile (FTP &amp;amp; HTTP network handlers)&lt;br /&gt;
* scramble (Utility to scramble file tables for the Demo version)&lt;br /&gt;
* variables (???)&lt;br /&gt;
* wxfred2 (Cross-platform version of FRED2)&lt;br /&gt;
&lt;br /&gt;
=== Layer view ===&lt;br /&gt;
&lt;br /&gt;
* Infrastructure&lt;br /&gt;
** System&lt;br /&gt;
*** cfile/&lt;br /&gt;
*** exceptionhandler/&lt;br /&gt;
*** irc/&lt;br /&gt;
*** localization/&lt;br /&gt;
*** osapi/&lt;br /&gt;
** Math&lt;br /&gt;
*** math/&lt;br /&gt;
** Sound&lt;br /&gt;
*** sound/&lt;br /&gt;
*** vcodec/&lt;br /&gt;
** Windows&lt;br /&gt;
*** ui/&lt;br /&gt;
*** windows_stub/&lt;br /&gt;
** 2D graphics&lt;br /&gt;
*** [[Source anim|anim]]&lt;br /&gt;
*** [[Source bmpman|bmpman]]&lt;br /&gt;
*** [[Source ddsutils|ddsutils]]&lt;br /&gt;
*** [[Source jpgutils|jpgutils]]&lt;br /&gt;
*** [[Source pcxutils|pcxutils]]&lt;br /&gt;
*** [[Source tgautils|tgautils]]&lt;br /&gt;
*** palman/&lt;br /&gt;
** 3D graphics&lt;br /&gt;
*** decals/&lt;br /&gt;
*** mm/&lt;br /&gt;
*** directx/&lt;br /&gt;
*** graphics/&lt;br /&gt;
*** camera/&lt;br /&gt;
*** render/&lt;br /&gt;
** User Input&lt;br /&gt;
*** controlconfig/&lt;br /&gt;
*** io/&lt;br /&gt;
* Freespace2&lt;br /&gt;
** Common&lt;br /&gt;
*** globalincs/&lt;br /&gt;
*** cutscene/&lt;br /&gt;
*** cmdline/&lt;br /&gt;
*** debugconsole/&lt;br /&gt;
** In Space&lt;br /&gt;
*** ai/&lt;br /&gt;
*** asteroid/&lt;br /&gt;
*** autopilot/&lt;br /&gt;
*** cmeasure/&lt;br /&gt;
*** debris/&lt;br /&gt;
*** demo/&lt;br /&gt;
*** fireball/&lt;br /&gt;
*** gamehelp/&lt;br /&gt;
*** gamesequence/&lt;br /&gt;
*** gamesnd/&lt;br /&gt;
*** hud/&lt;br /&gt;
*** iff_defs/&lt;br /&gt;
*** jumpnode/&lt;br /&gt;
*** lighting/&lt;br /&gt;
*** nebula/&lt;br /&gt;
*** object/&lt;br /&gt;
*** observer/&lt;br /&gt;
*** model/&lt;br /&gt;
*** network/&lt;br /&gt;
*** particle/&lt;br /&gt;
*** parse/&lt;br /&gt;
*** popup/&lt;br /&gt;
*** physics/&lt;br /&gt;
*** radar/&lt;br /&gt;
*** ship/&lt;br /&gt;
*** species_defs/&lt;br /&gt;
*** starfield/&lt;br /&gt;
*** weapon/&lt;br /&gt;
** In Base&lt;br /&gt;
*** stats/&lt;br /&gt;
*** menuui/&lt;br /&gt;
*** mission/&lt;br /&gt;
*** missionui/&lt;br /&gt;
** Engine&lt;br /&gt;
*** fs2open_pxo/&lt;br /&gt;
*** freespace2/&lt;br /&gt;
*** playerman/&lt;br /&gt;
* FRED&lt;br /&gt;
** fred2/&lt;br /&gt;
** wxfred2/&lt;br /&gt;
* Tools&lt;br /&gt;
** cfilearchiver/&lt;br /&gt;
** cfileextractor/&lt;br /&gt;
** cryptstring/&lt;br /&gt;
** lab/&lt;br /&gt;
** scramble/&lt;br /&gt;
** inetfile/&lt;br /&gt;
** variables/&lt;br /&gt;
&lt;br /&gt;
=== Category Browser ===&lt;br /&gt;
The subdirectories above are also categorised by function. See the Category:Source Code to browse this way.&lt;br /&gt;
&lt;br /&gt;
[[Category:Source Code]]&lt;/div&gt;</summary>
		<author><name>Benoit</name></author>
	</entry>
	<entry>
		<id>https://wiki.hard-light.org/index.php?title=Source_Code_Reference&amp;diff=10108</id>
		<title>Source Code Reference</title>
		<link rel="alternate" type="text/html" href="https://wiki.hard-light.org/index.php?title=Source_Code_Reference&amp;diff=10108"/>
		<updated>2007-06-26T20:27:39Z</updated>

		<summary type="html">&lt;p&gt;Benoit: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== External libraries ==&lt;br /&gt;
&lt;br /&gt;
Freespace2 relies on the following libraries, which are included in the source tree:&lt;br /&gt;
* lua: LUA Scripting language&lt;br /&gt;
* libjpeg: Jpeg library&lt;br /&gt;
* oggvorbis: Ogg Vorbis sound library&lt;br /&gt;
* dx8sdk: DirectX 8 SDK&lt;br /&gt;
* dx9sdk: DirectX 9 SDK&lt;br /&gt;
&lt;br /&gt;
See msdn.microsoft.com for discussion of the DirectX libraries. For the other libraries, look in the README files for more info&lt;br /&gt;
&lt;br /&gt;
== Freespace2 Source Code ==&lt;br /&gt;
&lt;br /&gt;
The root also contains the actual Freespace2 code, in the code/ directory. The Freespace2 source code consists in several components, each of which is kept in a separate subdirectory. These components are listed below, from different views.&lt;br /&gt;
&lt;br /&gt;
=== Alphabetical view ===&lt;br /&gt;
&lt;br /&gt;
* ai (Computer AI)&lt;br /&gt;
* [[Source anim|anim]] (Displaying .ani animated bitmaps)&lt;br /&gt;
* asteroid (Handle asteroids - movement, collisions, creating smaller asteriods when larger ones are blown up etc.)&lt;br /&gt;
* autopilot (Handles autopilot control - where if there are no enemies, travelling a long distance etc. control is temporarily switched to the computer)&lt;br /&gt;
* [[Source bmpman|bmpman]] (Manage 2d graphics files, such as .bmp, .tga, .jpg etc.)&lt;br /&gt;
* camera (???)&lt;br /&gt;
* cfile (File/directory management routines including .VP file handling that are OS independent eg. handles differences between Linux &amp;amp; Windows)&lt;br /&gt;
* cmdline (Handles command line switches, such as -mipmap etc.)&lt;br /&gt;
* cmeasure (Handles countermeasures - flares that the player &amp;amp; AI can drop to disrupt missiles)&lt;br /&gt;
* controlconfig (Configures keyboard/mouse/joystick controls)&lt;br /&gt;
* cutscene (Handles cutscene viewing)&lt;br /&gt;
* [[Source ddsutils|ddsutils]] (Handles compressed textures for 3d graphics cards that support it)&lt;br /&gt;
* debris (Creates &amp;amp; handles flying debris from exploding ships)&lt;br /&gt;
* debugconsole (Handles debugging console and file)&lt;br /&gt;
* decals (Adds support for painting decals - small 2d textures - onto ships etc.)&lt;br /&gt;
* demo (Allows you to save &amp;amp; playback games to show as demos)&lt;br /&gt;
* directx (Specific includes for the Microsoft DirectX library - Windows only)&lt;br /&gt;
* exceptionhandler (Deals with crashes, saving stack trace, system info etc.)&lt;br /&gt;
* fireball (Displays &amp;amp; handles fireballs and warping effects)&lt;br /&gt;
* freespace2 (Main code - handles engine initialisation, loading resources, plus windows resources like icons &amp;amp; dialog boxes)&lt;br /&gt;
* fs2open_pxo (Network code)&lt;br /&gt;
* gamehelp (Displays context sensitive help text)&lt;br /&gt;
* gamesequence (Handles progression of events during a campaign, such as entering a mission, showing credits etc.)&lt;br /&gt;
* gamesnd (Handles sounds &amp;amp; music)&lt;br /&gt;
* globalincs (Basic global constants &amp;amp; definitions, eg. version, colours)&lt;br /&gt;
* [[Source graphics|graphics]] (Low-level wrapper for all 2d &amp;amp; 3d graphics that handles different display engines (DirectX, OpenGL etc)&lt;br /&gt;
* hud (Handles the HUD - all the 2d cockpit graphics that the player can see eg. radar, ammo, escort list, sqaud etc)&lt;br /&gt;
* iff_defs (Handles traitor ships???)&lt;br /&gt;
* io (Handles IO devices, such as keyboard, mouse &amp;amp; joystick)&lt;br /&gt;
* irc (Adds support for an IRC chat client)&lt;br /&gt;
* [[Source jpgutils|jpgutils]] (Opens, reads JPG files)&lt;br /&gt;
* jumpnode (Displays &amp;amp; handles jump nodes)&lt;br /&gt;
* lab (???)&lt;br /&gt;
* lighting (Handles light sources, and their effect on ships)&lt;br /&gt;
* localization (Handles a global string table for translating all written text into foreign languages)&lt;br /&gt;
* math (Library of math routines for handling vectors, splines etc)&lt;br /&gt;
* menuui (Handles all the misc user interface, such as the main menu, tech room, campaign list etc)&lt;br /&gt;
* mission (Handles general mission actions eg. briefing, goals, training info, in-mission messages etc)&lt;br /&gt;
* missionui (Handles UI for general mission actions)&lt;br /&gt;
* mm (Headers for older MS Multimedia library)&lt;br /&gt;
* model (Displays and handles ship models eg. reading files, collission detection etc)&lt;br /&gt;
* nebula (Displays and handles nebulae)&lt;br /&gt;
* network (All multi-player code, eg. UI, network traffic)&lt;br /&gt;
* object (High-level code to handle all objects eg. ships, weapons, debris, asteroids, waypoints, fireballs, shockwaves)&lt;br /&gt;
* observer (???)&lt;br /&gt;
* osapi (Wraps low-level Operating System calls, for different OS, eg. multi-threads, windows event loops, main app window)&lt;br /&gt;
* palman (Handles bitmap palettes - different colour maps for the same 2d bitmap)&lt;br /&gt;
* parse (Handles scripting files, eg. python, LUA etc)&lt;br /&gt;
* particle (Displays and handles particles, such as smoke, fire) &lt;br /&gt;
* [[Source pcxutils|pcxutils]] (Handles 2d .pcx graphics files)&lt;br /&gt;
* physics (Handles realistic physical behaviour of objects, such as ship acceleration/deceleration, rotation etc.)&lt;br /&gt;
* playerman (Handles pilot files &amp;amp; player ship movement)&lt;br /&gt;
* popup (Displays &amp;amp; handles 2d pop-up windows, eg. when the player dies)&lt;br /&gt;
* radar (Displays &amp;amp; handles the radar)&lt;br /&gt;
* [[Source render|render]] (Low-level 3d rendering code for some primitives)&lt;br /&gt;
* ship (Displays &amp;amp; handles all ship code, eg. shields, afterburner)&lt;br /&gt;
* sound (Low-level sound, speach &amp;amp; music routines)&lt;br /&gt;
* species_defs (Reads species_defs.tbl to handle different behaviour for different species)&lt;br /&gt;
* starfield (Displays &amp;amp; handles background images such as starfields, nebulae etc)&lt;br /&gt;
* stats (Displays &amp;amp; handles player statistics, medals etc)&lt;br /&gt;
* [[Source tgautils|tgautils]] (Handles .tga 2d graphics files)&lt;br /&gt;
* ui (Low-level user inteface routines eg. buttons, scrollbars)&lt;br /&gt;
* vcodec (Handles player voice streaming for multiplayer ???)&lt;br /&gt;
* weapon (Displays &amp;amp; handles everything to do with weapons)&lt;br /&gt;
* windows_stub (Low-level windows functions that are needed for Unix)&lt;br /&gt;
&lt;br /&gt;
There are also some directories that are only used for generating tools (not part of the main fs2 executable):&lt;br /&gt;
* cfilearchiver (Creates .VP file archives)&lt;br /&gt;
* cfileextractor (Extracts .VP file archives)&lt;br /&gt;
* cryptstring (Creates encrypted strings)&lt;br /&gt;
* fred2 (The FReespace EDitor)&lt;br /&gt;
* inetfile (FTP &amp;amp; HTTP network handlers)&lt;br /&gt;
* scramble (Utility to scramble file tables for the Demo version)&lt;br /&gt;
* variables (???)&lt;br /&gt;
* wxfred2 (Cross-platform version of FRED2)&lt;br /&gt;
&lt;br /&gt;
=== Layer view ===&lt;br /&gt;
&lt;br /&gt;
* Infrastructure&lt;br /&gt;
** System&lt;br /&gt;
*** cfile/&lt;br /&gt;
*** exceptionhandler/&lt;br /&gt;
*** irc/&lt;br /&gt;
*** localization/&lt;br /&gt;
*** osapi/&lt;br /&gt;
** Math&lt;br /&gt;
*** math/&lt;br /&gt;
** Sound&lt;br /&gt;
*** sound/&lt;br /&gt;
*** vcodec/&lt;br /&gt;
** Windows&lt;br /&gt;
*** ui/&lt;br /&gt;
*** windows_stub/&lt;br /&gt;
** 2D graphics&lt;br /&gt;
*** anim/&lt;br /&gt;
*** bmpman/&lt;br /&gt;
*** ddsutils/&lt;br /&gt;
*** tgautils/&lt;br /&gt;
*** jpgutils/&lt;br /&gt;
*** pcxutils/&lt;br /&gt;
*** palman/&lt;br /&gt;
** 3D graphics&lt;br /&gt;
*** decals/&lt;br /&gt;
*** mm/&lt;br /&gt;
*** directx/&lt;br /&gt;
*** graphics/&lt;br /&gt;
*** camera/&lt;br /&gt;
*** render/&lt;br /&gt;
** User Input&lt;br /&gt;
*** controlconfig/&lt;br /&gt;
*** io/&lt;br /&gt;
* Freespace2&lt;br /&gt;
** Common&lt;br /&gt;
*** globalincs/&lt;br /&gt;
*** cutscene/&lt;br /&gt;
*** cmdline/&lt;br /&gt;
*** debugconsole/&lt;br /&gt;
** In Space&lt;br /&gt;
*** ai/&lt;br /&gt;
*** asteroid/&lt;br /&gt;
*** autopilot/&lt;br /&gt;
*** cmeasure/&lt;br /&gt;
*** debris/&lt;br /&gt;
*** demo/&lt;br /&gt;
*** fireball/&lt;br /&gt;
*** gamehelp/&lt;br /&gt;
*** gamesequence/&lt;br /&gt;
*** gamesnd/&lt;br /&gt;
*** hud/&lt;br /&gt;
*** iff_defs/&lt;br /&gt;
*** jumpnode/&lt;br /&gt;
*** lighting/&lt;br /&gt;
*** nebula/&lt;br /&gt;
*** object/&lt;br /&gt;
*** observer/&lt;br /&gt;
*** model/&lt;br /&gt;
*** network/&lt;br /&gt;
*** particle/&lt;br /&gt;
*** parse/&lt;br /&gt;
*** popup/&lt;br /&gt;
*** physics/&lt;br /&gt;
*** radar/&lt;br /&gt;
*** ship/&lt;br /&gt;
*** species_defs/&lt;br /&gt;
*** starfield/&lt;br /&gt;
*** weapon/&lt;br /&gt;
** In Base&lt;br /&gt;
*** stats/&lt;br /&gt;
*** menuui/&lt;br /&gt;
*** mission/&lt;br /&gt;
*** missionui/&lt;br /&gt;
** Engine&lt;br /&gt;
*** fs2open_pxo/&lt;br /&gt;
*** freespace2/&lt;br /&gt;
*** playerman/&lt;br /&gt;
* FRED&lt;br /&gt;
** fred2/&lt;br /&gt;
** wxfred2/&lt;br /&gt;
* Tools&lt;br /&gt;
** cfilearchiver/&lt;br /&gt;
** cfileextractor/&lt;br /&gt;
** cryptstring/&lt;br /&gt;
** lab/&lt;br /&gt;
** scramble/&lt;br /&gt;
** inetfile/&lt;br /&gt;
** variables/&lt;br /&gt;
&lt;br /&gt;
=== Category Browser ===&lt;br /&gt;
The subdirectories above are also categorised by function. See the Category:Source Code to browse this way.&lt;br /&gt;
&lt;br /&gt;
[[Category:Source Code]]&lt;/div&gt;</summary>
		<author><name>Benoit</name></author>
	</entry>
	<entry>
		<id>https://wiki.hard-light.org/index.php?title=Source_Code_Reference&amp;diff=10107</id>
		<title>Source Code Reference</title>
		<link rel="alternate" type="text/html" href="https://wiki.hard-light.org/index.php?title=Source_Code_Reference&amp;diff=10107"/>
		<updated>2007-06-26T20:24:09Z</updated>

		<summary type="html">&lt;p&gt;Benoit: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== External libraries ==&lt;br /&gt;
&lt;br /&gt;
Freespace2 relies on the following libraries, which are included in the source tree:&lt;br /&gt;
* lua: LUA Scripting language&lt;br /&gt;
* libjpeg: Jpeg library&lt;br /&gt;
* oggvorbis: Ogg Vorbis sound library&lt;br /&gt;
* dx8sdk: DirectX 8 SDK&lt;br /&gt;
* dx9sdk: DirectX 9 SDK&lt;br /&gt;
&lt;br /&gt;
See msdn.microsoft.com for discussion of the DirectX libraries. For the other libraries, look in the README files for more info&lt;br /&gt;
&lt;br /&gt;
== Freespace2 Source Code ==&lt;br /&gt;
&lt;br /&gt;
The root also contains the actual Freespace2 code, in the code/ directory. The Freespace2 source code consists in several components, each of which is kept in a separate subdirectory. These components are listed below.&lt;br /&gt;
&lt;br /&gt;
=== Alphabetical view ===&lt;br /&gt;
&lt;br /&gt;
* ai (Computer AI)&lt;br /&gt;
* [[Source anim|anim]] (Displaying .ani animated bitmaps)&lt;br /&gt;
* asteroid (Handle asteroids - movement, collisions, creating smaller asteriods when larger ones are blown up etc.)&lt;br /&gt;
* autopilot (Handles autopilot control - where if there are no enemies, travelling a long distance etc. control is temporarily switched to the computer)&lt;br /&gt;
* [[Source bmpman|bmpman]] (Manage 2d graphics files, such as .bmp, .tga, .jpg etc.)&lt;br /&gt;
* camera (???)&lt;br /&gt;
* cfile (File/directory management routines including .VP file handling that are OS independent eg. handles differences between Linux &amp;amp; Windows)&lt;br /&gt;
* cmdline (Handles command line switches, such as -mipmap etc.)&lt;br /&gt;
* cmeasure (Handles countermeasures - flares that the player &amp;amp; AI can drop to disrupt missiles)&lt;br /&gt;
* controlconfig (Configures keyboard/mouse/joystick controls)&lt;br /&gt;
* cutscene (Handles cutscene viewing)&lt;br /&gt;
* [[Source ddsutils|ddsutils]] (Handles compressed textures for 3d graphics cards that support it)&lt;br /&gt;
* debris (Creates &amp;amp; handles flying debris from exploding ships)&lt;br /&gt;
* debugconsole (Handles debugging console and file)&lt;br /&gt;
* decals (Adds support for painting decals - small 2d textures - onto ships etc.)&lt;br /&gt;
* demo (Allows you to save &amp;amp; playback games to show as demos)&lt;br /&gt;
* directx (Specific includes for the Microsoft DirectX library - Windows only)&lt;br /&gt;
* exceptionhandler (Deals with crashes, saving stack trace, system info etc.)&lt;br /&gt;
* fireball (Displays &amp;amp; handles fireballs and warping effects)&lt;br /&gt;
* freespace2 (Main code - handles engine initialisation, loading resources, plus windows resources like icons &amp;amp; dialog boxes)&lt;br /&gt;
* fs2open_pxo (Network code)&lt;br /&gt;
* gamehelp (Displays context sensitive help text)&lt;br /&gt;
* gamesequence (Handles progression of events during a campaign, such as entering a mission, showing credits etc.)&lt;br /&gt;
* gamesnd (Handles sounds &amp;amp; music)&lt;br /&gt;
* globalincs (Basic global constants &amp;amp; definitions, eg. version, colours)&lt;br /&gt;
* [[Source graphics|graphics]] (Low-level wrapper for all 2d &amp;amp; 3d graphics that handles different display engines (DirectX, OpenGL etc)&lt;br /&gt;
* hud (Handles the HUD - all the 2d cockpit graphics that the player can see eg. radar, ammo, escort list, sqaud etc)&lt;br /&gt;
* iff_defs (Handles traitor ships???)&lt;br /&gt;
* io (Handles IO devices, such as keyboard, mouse &amp;amp; joystick)&lt;br /&gt;
* irc (Adds support for an IRC chat client)&lt;br /&gt;
* [[Source jpgutils|jpgutils]] (Opens, reads JPG files)&lt;br /&gt;
* jumpnode (Displays &amp;amp; handles jump nodes)&lt;br /&gt;
* lab (???)&lt;br /&gt;
* lighting (Handles light sources, and their effect on ships)&lt;br /&gt;
* localization (Handles a global string table for translating all written text into foreign languages)&lt;br /&gt;
* math (Library of math routines for handling vectors, splines etc)&lt;br /&gt;
* menuui (Handles all the misc user interface, such as the main menu, tech room, campaign list etc)&lt;br /&gt;
* mission (Handles general mission actions eg. briefing, goals, training info, in-mission messages etc)&lt;br /&gt;
* missionui (Handles UI for general mission actions)&lt;br /&gt;
* mm (Headers for older MS Multimedia library)&lt;br /&gt;
* model (Displays and handles ship models eg. reading files, collission detection etc)&lt;br /&gt;
* nebula (Displays and handles nebulae)&lt;br /&gt;
* network (All multi-player code, eg. UI, network traffic)&lt;br /&gt;
* object (High-level code to handle all objects eg. ships, weapons, debris, asteroids, waypoints, fireballs, shockwaves)&lt;br /&gt;
* observer (???)&lt;br /&gt;
* osapi (Wraps low-level Operating System calls, for different OS, eg. multi-threads, windows event loops, main app window)&lt;br /&gt;
* palman (Handles bitmap palettes - different colour maps for the same 2d bitmap)&lt;br /&gt;
* parse (Handles scripting files, eg. python, LUA etc)&lt;br /&gt;
* particle (Displays and handles particles, such as smoke, fire) &lt;br /&gt;
* [[Source pcxutils|pcxutils]] (Handles 2d .pcx graphics files)&lt;br /&gt;
* physics (Handles realistic physical behaviour of objects, such as ship acceleration/deceleration, rotation etc.)&lt;br /&gt;
* playerman (Handles pilot files &amp;amp; player ship movement)&lt;br /&gt;
* popup (Displays &amp;amp; handles 2d pop-up windows, eg. when the player dies)&lt;br /&gt;
* radar (Displays &amp;amp; handles the radar)&lt;br /&gt;
* [[Source render|render]] (Low-level 3d rendering code for some primitives)&lt;br /&gt;
* ship (Displays &amp;amp; handles all ship code, eg. shields, afterburner)&lt;br /&gt;
* sound (Low-level sound, speach &amp;amp; music routines)&lt;br /&gt;
* species_defs (Reads species_defs.tbl to handle different behaviour for different species)&lt;br /&gt;
* starfield (Displays &amp;amp; handles background images such as starfields, nebulae etc)&lt;br /&gt;
* stats (Displays &amp;amp; handles player statistics, medals etc)&lt;br /&gt;
* [[Source tgautils|tgautils]] (Handles .tga 2d graphics files)&lt;br /&gt;
* ui (Low-level user inteface routines eg. buttons, scrollbars)&lt;br /&gt;
* vcodec (Handles player voice streaming for multiplayer ???)&lt;br /&gt;
* weapon (Displays &amp;amp; handles everything to do with weapons)&lt;br /&gt;
* windows_stub (Low-level windows functions that are needed for Unix)&lt;br /&gt;
&lt;br /&gt;
There are also some directories that are only used for generating tools (not part of the main fs2 executable):&lt;br /&gt;
* cfilearchiver (Creates .VP file archives)&lt;br /&gt;
* cfileextractor (Extracts .VP file archives)&lt;br /&gt;
* cryptstring (Creates encrypted strings)&lt;br /&gt;
* fred2 (The FReespace EDitor)&lt;br /&gt;
* inetfile (FTP &amp;amp; HTTP network handlers)&lt;br /&gt;
* scramble (Utility to scramble file tables for the Demo version)&lt;br /&gt;
* variables (???)&lt;br /&gt;
* wxfred2 (Cross-platform version of FRED2)&lt;br /&gt;
&lt;br /&gt;
=== Layer view ===&lt;br /&gt;
&lt;br /&gt;
* Infrastructure&lt;br /&gt;
** System&lt;br /&gt;
*** cfile/&lt;br /&gt;
*** exceptionhandler/&lt;br /&gt;
*** irc/&lt;br /&gt;
*** localization/&lt;br /&gt;
*** osapi/&lt;br /&gt;
** Math&lt;br /&gt;
*** math/&lt;br /&gt;
** Sound&lt;br /&gt;
*** sound/&lt;br /&gt;
*** vcodec/&lt;br /&gt;
** Windows&lt;br /&gt;
*** ui/&lt;br /&gt;
*** windows_stub/&lt;br /&gt;
** 2D graphics&lt;br /&gt;
*** anim/&lt;br /&gt;
*** bmpman/&lt;br /&gt;
*** ddsutils/&lt;br /&gt;
*** tgautils/&lt;br /&gt;
*** jpgutils/&lt;br /&gt;
*** pcxutils/&lt;br /&gt;
*** palman/&lt;br /&gt;
** 3D graphics&lt;br /&gt;
*** decals/&lt;br /&gt;
*** mm/&lt;br /&gt;
*** directx/&lt;br /&gt;
*** graphics/&lt;br /&gt;
*** camera/&lt;br /&gt;
*** render/&lt;br /&gt;
** User Input&lt;br /&gt;
*** controlconfig/&lt;br /&gt;
*** io/&lt;br /&gt;
* Freespace2&lt;br /&gt;
** Common&lt;br /&gt;
*** globalincs/&lt;br /&gt;
*** cutscene/&lt;br /&gt;
*** cmdline/&lt;br /&gt;
*** debugconsole/&lt;br /&gt;
** In Space&lt;br /&gt;
*** ai/&lt;br /&gt;
*** asteroid/&lt;br /&gt;
*** autopilot/&lt;br /&gt;
*** cmeasure/&lt;br /&gt;
*** debris/&lt;br /&gt;
*** demo/&lt;br /&gt;
*** fireball/&lt;br /&gt;
*** gamehelp/&lt;br /&gt;
*** gamesequence/&lt;br /&gt;
*** gamesnd/&lt;br /&gt;
*** hud/&lt;br /&gt;
*** iff_defs/&lt;br /&gt;
*** jumpnode/&lt;br /&gt;
*** lighting/&lt;br /&gt;
*** nebula/&lt;br /&gt;
*** object/&lt;br /&gt;
*** observer/&lt;br /&gt;
*** model/&lt;br /&gt;
*** network/&lt;br /&gt;
*** particle/&lt;br /&gt;
*** parse/&lt;br /&gt;
*** popup/&lt;br /&gt;
*** physics/&lt;br /&gt;
*** radar/&lt;br /&gt;
*** ship/&lt;br /&gt;
*** species_defs/&lt;br /&gt;
*** starfield/&lt;br /&gt;
*** weapon/&lt;br /&gt;
** In Base&lt;br /&gt;
*** stats/&lt;br /&gt;
*** menuui/&lt;br /&gt;
*** mission/&lt;br /&gt;
*** missionui/&lt;br /&gt;
** Engine&lt;br /&gt;
*** fs2open_pxo/&lt;br /&gt;
*** freespace2/&lt;br /&gt;
*** playerman/&lt;br /&gt;
* FRED&lt;br /&gt;
** fred2/&lt;br /&gt;
** wxfred2/&lt;br /&gt;
* Tools&lt;br /&gt;
** cfilearchiver/&lt;br /&gt;
** cfileextractor/&lt;br /&gt;
** cryptstring/&lt;br /&gt;
** lab/&lt;br /&gt;
** scramble/&lt;br /&gt;
** inetfile/&lt;br /&gt;
** variables/&lt;br /&gt;
&lt;br /&gt;
=== Category Browser ===&lt;br /&gt;
The subdirectories above are also categorised by function. See the Category:Source Code to browse this way.&lt;br /&gt;
&lt;br /&gt;
[[Category:Source Code]]&lt;/div&gt;</summary>
		<author><name>Benoit</name></author>
	</entry>
	<entry>
		<id>https://wiki.hard-light.org/index.php?title=Source_Code_Reference&amp;diff=10106</id>
		<title>Source Code Reference</title>
		<link rel="alternate" type="text/html" href="https://wiki.hard-light.org/index.php?title=Source_Code_Reference&amp;diff=10106"/>
		<updated>2007-06-26T20:20:51Z</updated>

		<summary type="html">&lt;p&gt;Benoit: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== External libraries ==&lt;br /&gt;
&lt;br /&gt;
Freespace2 relies on the following libraries, which are included in the source tree:&lt;br /&gt;
* lua: LUA Scripting language&lt;br /&gt;
* libjpeg: Jpeg library&lt;br /&gt;
* oggvorbis: Ogg Vorbis sound library&lt;br /&gt;
* dx8sdk: DirectX 8 SDK&lt;br /&gt;
* dx9sdk: DirectX 9 SDK&lt;br /&gt;
&lt;br /&gt;
See msdn.microsoft.com for discussion of the DirectX libraries. For the other libraries, look in the README files for more info&lt;br /&gt;
&lt;br /&gt;
== Code organization ==&lt;br /&gt;
&lt;br /&gt;
The root also contains the actual Freespace2 code, in the code/ directory. The Freespace2 source code consists in several components, each of which is kept in a separate subdirectory. These components are listed below.&lt;br /&gt;
&lt;br /&gt;
=== Alphabetical view ===&lt;br /&gt;
&lt;br /&gt;
* ai (Computer AI)&lt;br /&gt;
* [[Source anim|anim]] (Displaying .ani animated bitmaps)&lt;br /&gt;
* asteroid (Handle asteroids - movement, collisions, creating smaller asteriods when larger ones are blown up etc.)&lt;br /&gt;
* autopilot (Handles autopilot control - where if there are no enemies, travelling a long distance etc. control is temporarily switched to the computer)&lt;br /&gt;
* [[Source bmpman|bmpman]] (Manage 2d graphics files, such as .bmp, .tga, .jpg etc.)&lt;br /&gt;
* camera (???)&lt;br /&gt;
* cfile (File/directory management routines including .VP file handling that are OS independent eg. handles differences between Linux &amp;amp; Windows)&lt;br /&gt;
* cmdline (Handles command line switches, such as -mipmap etc.)&lt;br /&gt;
* cmeasure (Handles countermeasures - flares that the player &amp;amp; AI can drop to disrupt missiles)&lt;br /&gt;
* controlconfig (Configures keyboard/mouse/joystick controls)&lt;br /&gt;
* cutscene (Handles cutscene viewing)&lt;br /&gt;
* [[Source ddsutils|ddsutils]] (Handles compressed textures for 3d graphics cards that support it)&lt;br /&gt;
* debris (Creates &amp;amp; handles flying debris from exploding ships)&lt;br /&gt;
* debugconsole (Handles debugging console and file)&lt;br /&gt;
* decals (Adds support for painting decals - small 2d textures - onto ships etc.)&lt;br /&gt;
* demo (Allows you to save &amp;amp; playback games to show as demos)&lt;br /&gt;
* directx (Specific includes for the Microsoft DirectX library - Windows only)&lt;br /&gt;
* exceptionhandler (Deals with crashes, saving stack trace, system info etc.)&lt;br /&gt;
* fireball (Displays &amp;amp; handles fireballs and warping effects)&lt;br /&gt;
* freespace2 (Main code - handles engine initialisation, loading resources, plus windows resources like icons &amp;amp; dialog boxes)&lt;br /&gt;
* fs2open_pxo (Network code)&lt;br /&gt;
* gamehelp (Displays context sensitive help text)&lt;br /&gt;
* gamesequence (Handles progression of events during a campaign, such as entering a mission, showing credits etc.)&lt;br /&gt;
* gamesnd (Handles sounds &amp;amp; music)&lt;br /&gt;
* globalincs (Basic global constants &amp;amp; definitions, eg. version, colours)&lt;br /&gt;
* [[Source graphics|graphics]] (Low-level wrapper for all 2d &amp;amp; 3d graphics that handles different display engines (DirectX, OpenGL etc)&lt;br /&gt;
* hud (Handles the HUD - all the 2d cockpit graphics that the player can see eg. radar, ammo, escort list, sqaud etc)&lt;br /&gt;
* iff_defs (Handles traitor ships???)&lt;br /&gt;
* io (Handles IO devices, such as keyboard, mouse &amp;amp; joystick)&lt;br /&gt;
* irc (Adds support for an IRC chat client)&lt;br /&gt;
* [[Source jpgutils|jpgutils]] (Opens, reads JPG files)&lt;br /&gt;
* jumpnode (Displays &amp;amp; handles jump nodes)&lt;br /&gt;
* lab (???)&lt;br /&gt;
* lighting (Handles light sources, and their effect on ships)&lt;br /&gt;
* localization (Handles a global string table for translating all written text into foreign languages)&lt;br /&gt;
* math (Library of math routines for handling vectors, splines etc)&lt;br /&gt;
* menuui (Handles all the misc user interface, such as the main menu, tech room, campaign list etc)&lt;br /&gt;
* mission (Handles general mission actions eg. briefing, goals, training info, in-mission messages etc)&lt;br /&gt;
* missionui (Handles UI for general mission actions)&lt;br /&gt;
* mm (Headers for older MS Multimedia library)&lt;br /&gt;
* model (Displays and handles ship models eg. reading files, collission detection etc)&lt;br /&gt;
* nebula (Displays and handles nebulae)&lt;br /&gt;
* network (All multi-player code, eg. UI, network traffic)&lt;br /&gt;
* object (High-level code to handle all objects eg. ships, weapons, debris, asteroids, waypoints, fireballs, shockwaves)&lt;br /&gt;
* observer (???)&lt;br /&gt;
* osapi (Wraps low-level Operating System calls, for different OS, eg. multi-threads, windows event loops, main app window)&lt;br /&gt;
* palman (Handles bitmap palettes - different colour maps for the same 2d bitmap)&lt;br /&gt;
* parse (Handles scripting files, eg. python, LUA etc)&lt;br /&gt;
* particle (Displays and handles particles, such as smoke, fire) &lt;br /&gt;
* [[Source pcxutils|pcxutils]] (Handles 2d .pcx graphics files)&lt;br /&gt;
* physics (Handles realistic physical behaviour of objects, such as ship acceleration/deceleration, rotation etc.)&lt;br /&gt;
* playerman (Handles pilot files &amp;amp; player ship movement)&lt;br /&gt;
* popup (Displays &amp;amp; handles 2d pop-up windows, eg. when the player dies)&lt;br /&gt;
* radar (Displays &amp;amp; handles the radar)&lt;br /&gt;
* [[Source render|render]] (Low-level 3d rendering code for some primitives)&lt;br /&gt;
* ship (Displays &amp;amp; handles all ship code, eg. shields, afterburner)&lt;br /&gt;
* sound (Low-level sound, speach &amp;amp; music routines)&lt;br /&gt;
* species_defs (Reads species_defs.tbl to handle different behaviour for different species)&lt;br /&gt;
* starfield (Displays &amp;amp; handles background images such as starfields, nebulae etc)&lt;br /&gt;
* stats (Displays &amp;amp; handles player statistics, medals etc)&lt;br /&gt;
* [[Source tgautils|tgautils]] (Handles .tga 2d graphics files)&lt;br /&gt;
* ui (Low-level user inteface routines eg. buttons, scrollbars)&lt;br /&gt;
* vcodec (Handles player voice streaming for multiplayer ???)&lt;br /&gt;
* weapon (Displays &amp;amp; handles everything to do with weapons)&lt;br /&gt;
* windows_stub (Low-level windows functions that are needed for Unix)&lt;br /&gt;
&lt;br /&gt;
There are also some directories that are only used for generating tools (not part of the main fs2 executable):&lt;br /&gt;
* cfilearchiver (Creates .VP file archives)&lt;br /&gt;
* cfileextractor (Extracts .VP file archives)&lt;br /&gt;
* cryptstring (Creates encrypted strings)&lt;br /&gt;
* fred2 (The FReespace EDitor)&lt;br /&gt;
* inetfile (FTP &amp;amp; HTTP network handlers)&lt;br /&gt;
* scramble (Utility to scramble file tables for the Demo version)&lt;br /&gt;
* variables (???)&lt;br /&gt;
* wxfred2 (Cross-platform version of FRED2)&lt;br /&gt;
&lt;br /&gt;
=== Layer view ===&lt;br /&gt;
&lt;br /&gt;
* Infrastructure&lt;br /&gt;
** System&lt;br /&gt;
*** cfile/&lt;br /&gt;
*** exceptionhandler/&lt;br /&gt;
*** irc/&lt;br /&gt;
*** localization/&lt;br /&gt;
*** osapi/&lt;br /&gt;
** Math&lt;br /&gt;
*** math/&lt;br /&gt;
** Sound&lt;br /&gt;
*** sound/&lt;br /&gt;
*** vcodec/&lt;br /&gt;
** Windows&lt;br /&gt;
*** ui/&lt;br /&gt;
*** windows_stub/&lt;br /&gt;
** 2D graphics&lt;br /&gt;
*** anim/&lt;br /&gt;
*** bmpman/&lt;br /&gt;
*** ddsutils/&lt;br /&gt;
*** tgautils/&lt;br /&gt;
*** jpgutils/&lt;br /&gt;
*** pcxutils/&lt;br /&gt;
*** palman/&lt;br /&gt;
** 3D graphics&lt;br /&gt;
*** decals/&lt;br /&gt;
*** mm/&lt;br /&gt;
*** directx/&lt;br /&gt;
*** graphics/&lt;br /&gt;
*** camera/&lt;br /&gt;
*** render/&lt;br /&gt;
** User Input&lt;br /&gt;
*** controlconfig/&lt;br /&gt;
*** io/&lt;br /&gt;
* Freespace2&lt;br /&gt;
** Common&lt;br /&gt;
*** globalincs/&lt;br /&gt;
*** cutscene/&lt;br /&gt;
*** cmdline/&lt;br /&gt;
*** debugconsole/&lt;br /&gt;
** In Space&lt;br /&gt;
*** ai/&lt;br /&gt;
*** asteroid/&lt;br /&gt;
*** autopilot/&lt;br /&gt;
*** cmeasure/&lt;br /&gt;
*** debris/&lt;br /&gt;
*** demo/&lt;br /&gt;
*** fireball/&lt;br /&gt;
*** gamehelp/&lt;br /&gt;
*** gamesequence/&lt;br /&gt;
*** gamesnd/&lt;br /&gt;
*** hud/&lt;br /&gt;
*** iff_defs/&lt;br /&gt;
*** jumpnode/&lt;br /&gt;
*** lighting/&lt;br /&gt;
*** nebula/&lt;br /&gt;
*** object/&lt;br /&gt;
*** observer/&lt;br /&gt;
*** model/&lt;br /&gt;
*** network/&lt;br /&gt;
*** particle/&lt;br /&gt;
*** parse/&lt;br /&gt;
*** popup/&lt;br /&gt;
*** physics/&lt;br /&gt;
*** radar/&lt;br /&gt;
*** ship/&lt;br /&gt;
*** species_defs/&lt;br /&gt;
*** starfield/&lt;br /&gt;
*** weapon/&lt;br /&gt;
** In Base&lt;br /&gt;
*** stats/&lt;br /&gt;
*** menuui/&lt;br /&gt;
*** mission/&lt;br /&gt;
*** missionui/&lt;br /&gt;
** Engine&lt;br /&gt;
*** fs2open_pxo/&lt;br /&gt;
*** freespace2/&lt;br /&gt;
*** playerman/&lt;br /&gt;
* FRED&lt;br /&gt;
** fred2/&lt;br /&gt;
** wxfred2/&lt;br /&gt;
* Tools&lt;br /&gt;
** cfilearchiver/&lt;br /&gt;
** cfileextractor/&lt;br /&gt;
** cryptstring/&lt;br /&gt;
** lab/&lt;br /&gt;
** scramble/&lt;br /&gt;
** inetfile/&lt;br /&gt;
** variables/&lt;br /&gt;
&lt;br /&gt;
=== Category Browser ===&lt;br /&gt;
The subdirectories above are also categorised by function. See the Category:Source Code to browse this way.&lt;br /&gt;
&lt;br /&gt;
[[Category:Source Code]]&lt;/div&gt;</summary>
		<author><name>Benoit</name></author>
	</entry>
	<entry>
		<id>https://wiki.hard-light.org/index.php?title=Source_Code_Reference&amp;diff=10105</id>
		<title>Source Code Reference</title>
		<link rel="alternate" type="text/html" href="https://wiki.hard-light.org/index.php?title=Source_Code_Reference&amp;diff=10105"/>
		<updated>2007-06-26T20:18:53Z</updated>

		<summary type="html">&lt;p&gt;Benoit: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The root directory contains the following external libraries (See msdn.microsoft.com for discussion of the DirectX libraries; for the other libraries, look in the README files for more info):&lt;br /&gt;
* lua: LUA Scripting language&lt;br /&gt;
* libjpeg: Jpeg library&lt;br /&gt;
* oggvorbis: Ogg Vorbis sound library&lt;br /&gt;
* dx8sdk: DirectX 8 SDK&lt;br /&gt;
* dx9sdk: DirectX 9 SDK&lt;br /&gt;
&lt;br /&gt;
The root also contains the actual Freespace2 code, in the code/ directory. The Freespace2 source code consists in several components, each of which is kept in a separate subdirectory. These components are listed below.&lt;br /&gt;
&lt;br /&gt;
== Code organization ==&lt;br /&gt;
&lt;br /&gt;
=== Alphabetical view ===&lt;br /&gt;
&lt;br /&gt;
* ai (Computer AI)&lt;br /&gt;
* [[Source anim|anim]] (Displaying .ani animated bitmaps)&lt;br /&gt;
* asteroid (Handle asteroids - movement, collisions, creating smaller asteriods when larger ones are blown up etc.)&lt;br /&gt;
* autopilot (Handles autopilot control - where if there are no enemies, travelling a long distance etc. control is temporarily switched to the computer)&lt;br /&gt;
* [[Source bmpman|bmpman]] (Manage 2d graphics files, such as .bmp, .tga, .jpg etc.)&lt;br /&gt;
* camera (???)&lt;br /&gt;
* cfile (File/directory management routines including .VP file handling that are OS independent eg. handles differences between Linux &amp;amp; Windows)&lt;br /&gt;
* cmdline (Handles command line switches, such as -mipmap etc.)&lt;br /&gt;
* cmeasure (Handles countermeasures - flares that the player &amp;amp; AI can drop to disrupt missiles)&lt;br /&gt;
* controlconfig (Configures keyboard/mouse/joystick controls)&lt;br /&gt;
* cutscene (Handles cutscene viewing)&lt;br /&gt;
* [[Source ddsutils|ddsutils]] (Handles compressed textures for 3d graphics cards that support it)&lt;br /&gt;
* debris (Creates &amp;amp; handles flying debris from exploding ships)&lt;br /&gt;
* debugconsole (Handles debugging console and file)&lt;br /&gt;
* decals (Adds support for painting decals - small 2d textures - onto ships etc.)&lt;br /&gt;
* demo (Allows you to save &amp;amp; playback games to show as demos)&lt;br /&gt;
* directx (Specific includes for the Microsoft DirectX library - Windows only)&lt;br /&gt;
* exceptionhandler (Deals with crashes, saving stack trace, system info etc.)&lt;br /&gt;
* fireball (Displays &amp;amp; handles fireballs and warping effects)&lt;br /&gt;
* freespace2 (Main code - handles engine initialisation, loading resources, plus windows resources like icons &amp;amp; dialog boxes)&lt;br /&gt;
* fs2open_pxo (Network code)&lt;br /&gt;
* gamehelp (Displays context sensitive help text)&lt;br /&gt;
* gamesequence (Handles progression of events during a campaign, such as entering a mission, showing credits etc.)&lt;br /&gt;
* gamesnd (Handles sounds &amp;amp; music)&lt;br /&gt;
* globalincs (Basic global constants &amp;amp; definitions, eg. version, colours)&lt;br /&gt;
* [[Source graphics|graphics]] (Low-level wrapper for all 2d &amp;amp; 3d graphics that handles different display engines (DirectX, OpenGL etc)&lt;br /&gt;
* hud (Handles the HUD - all the 2d cockpit graphics that the player can see eg. radar, ammo, escort list, sqaud etc)&lt;br /&gt;
* iff_defs (Handles traitor ships???)&lt;br /&gt;
* io (Handles IO devices, such as keyboard, mouse &amp;amp; joystick)&lt;br /&gt;
* irc (Adds support for an IRC chat client)&lt;br /&gt;
* [[Source jpgutils|jpgutils]] (Opens, reads JPG files)&lt;br /&gt;
* jumpnode (Displays &amp;amp; handles jump nodes)&lt;br /&gt;
* lab (???)&lt;br /&gt;
* lighting (Handles light sources, and their effect on ships)&lt;br /&gt;
* localization (Handles a global string table for translating all written text into foreign languages)&lt;br /&gt;
* math (Library of math routines for handling vectors, splines etc)&lt;br /&gt;
* menuui (Handles all the misc user interface, such as the main menu, tech room, campaign list etc)&lt;br /&gt;
* mission (Handles general mission actions eg. briefing, goals, training info, in-mission messages etc)&lt;br /&gt;
* missionui (Handles UI for general mission actions)&lt;br /&gt;
* mm (Headers for older MS Multimedia library)&lt;br /&gt;
* model (Displays and handles ship models eg. reading files, collission detection etc)&lt;br /&gt;
* nebula (Displays and handles nebulae)&lt;br /&gt;
* network (All multi-player code, eg. UI, network traffic)&lt;br /&gt;
* object (High-level code to handle all objects eg. ships, weapons, debris, asteroids, waypoints, fireballs, shockwaves)&lt;br /&gt;
* observer (???)&lt;br /&gt;
* osapi (Wraps low-level Operating System calls, for different OS, eg. multi-threads, windows event loops, main app window)&lt;br /&gt;
* palman (Handles bitmap palettes - different colour maps for the same 2d bitmap)&lt;br /&gt;
* parse (Handles scripting files, eg. python, LUA etc)&lt;br /&gt;
* particle (Displays and handles particles, such as smoke, fire) &lt;br /&gt;
* [[Source pcxutils|pcxutils]] (Handles 2d .pcx graphics files)&lt;br /&gt;
* physics (Handles realistic physical behaviour of objects, such as ship acceleration/deceleration, rotation etc.)&lt;br /&gt;
* playerman (Handles pilot files &amp;amp; player ship movement)&lt;br /&gt;
* popup (Displays &amp;amp; handles 2d pop-up windows, eg. when the player dies)&lt;br /&gt;
* radar (Displays &amp;amp; handles the radar)&lt;br /&gt;
* [[Source render|render]] (Low-level 3d rendering code for some primitives)&lt;br /&gt;
* ship (Displays &amp;amp; handles all ship code, eg. shields, afterburner)&lt;br /&gt;
* sound (Low-level sound, speach &amp;amp; music routines)&lt;br /&gt;
* species_defs (Reads species_defs.tbl to handle different behaviour for different species)&lt;br /&gt;
* starfield (Displays &amp;amp; handles background images such as starfields, nebulae etc)&lt;br /&gt;
* stats (Displays &amp;amp; handles player statistics, medals etc)&lt;br /&gt;
* [[Source tgautils|tgautils]] (Handles .tga 2d graphics files)&lt;br /&gt;
* ui (Low-level user inteface routines eg. buttons, scrollbars)&lt;br /&gt;
* vcodec (Handles player voice streaming for multiplayer ???)&lt;br /&gt;
* weapon (Displays &amp;amp; handles everything to do with weapons)&lt;br /&gt;
* windows_stub (Low-level windows functions that are needed for Unix)&lt;br /&gt;
&lt;br /&gt;
There are also some directories that are only used for generating tools (not part of the main fs2 executable):&lt;br /&gt;
* cfilearchiver (Creates .VP file archives)&lt;br /&gt;
* cfileextractor (Extracts .VP file archives)&lt;br /&gt;
* cryptstring (Creates encrypted strings)&lt;br /&gt;
* fred2 (The FReespace EDitor)&lt;br /&gt;
* inetfile (FTP &amp;amp; HTTP network handlers)&lt;br /&gt;
* scramble (Utility to scramble file tables for the Demo version)&lt;br /&gt;
* variables (???)&lt;br /&gt;
* wxfred2 (Cross-platform version of FRED2)&lt;br /&gt;
&lt;br /&gt;
=== Layer view ===&lt;br /&gt;
&lt;br /&gt;
* Infrastructure&lt;br /&gt;
** System&lt;br /&gt;
*** cfile/&lt;br /&gt;
*** exceptionhandler/&lt;br /&gt;
*** irc/&lt;br /&gt;
*** localization/&lt;br /&gt;
*** osapi/&lt;br /&gt;
** Math&lt;br /&gt;
*** math/&lt;br /&gt;
** Sound&lt;br /&gt;
*** sound/&lt;br /&gt;
*** vcodec/&lt;br /&gt;
** Windows&lt;br /&gt;
*** ui/&lt;br /&gt;
*** windows_stub/&lt;br /&gt;
** 2D graphics&lt;br /&gt;
*** anim/&lt;br /&gt;
*** bmpman/&lt;br /&gt;
*** ddsutils/&lt;br /&gt;
*** tgautils/&lt;br /&gt;
*** jpgutils/&lt;br /&gt;
*** pcxutils/&lt;br /&gt;
*** palman/&lt;br /&gt;
** 3D graphics&lt;br /&gt;
*** decals/&lt;br /&gt;
*** mm/&lt;br /&gt;
*** directx/&lt;br /&gt;
*** graphics/&lt;br /&gt;
*** camera/&lt;br /&gt;
*** render/&lt;br /&gt;
** User Input&lt;br /&gt;
*** controlconfig/&lt;br /&gt;
*** io/&lt;br /&gt;
* Freespace2&lt;br /&gt;
** Common&lt;br /&gt;
*** globalincs/&lt;br /&gt;
*** cutscene/&lt;br /&gt;
*** cmdline/&lt;br /&gt;
*** debugconsole/&lt;br /&gt;
** In Space&lt;br /&gt;
*** ai/&lt;br /&gt;
*** asteroid/&lt;br /&gt;
*** autopilot/&lt;br /&gt;
*** cmeasure/&lt;br /&gt;
*** debris/&lt;br /&gt;
*** demo/&lt;br /&gt;
*** fireball/&lt;br /&gt;
*** gamehelp/&lt;br /&gt;
*** gamesequence/&lt;br /&gt;
*** gamesnd/&lt;br /&gt;
*** hud/&lt;br /&gt;
*** iff_defs/&lt;br /&gt;
*** jumpnode/&lt;br /&gt;
*** lighting/&lt;br /&gt;
*** nebula/&lt;br /&gt;
*** object/&lt;br /&gt;
*** observer/&lt;br /&gt;
*** model/&lt;br /&gt;
*** network/&lt;br /&gt;
*** particle/&lt;br /&gt;
*** parse/&lt;br /&gt;
*** popup/&lt;br /&gt;
*** physics/&lt;br /&gt;
*** radar/&lt;br /&gt;
*** ship/&lt;br /&gt;
*** species_defs/&lt;br /&gt;
*** starfield/&lt;br /&gt;
*** weapon/&lt;br /&gt;
** In Base&lt;br /&gt;
*** stats/&lt;br /&gt;
*** menuui/&lt;br /&gt;
*** mission/&lt;br /&gt;
*** missionui/&lt;br /&gt;
** Engine&lt;br /&gt;
*** fs2open_pxo/&lt;br /&gt;
*** freespace2/&lt;br /&gt;
*** playerman/&lt;br /&gt;
* FRED&lt;br /&gt;
** fred2/&lt;br /&gt;
** wxfred2/&lt;br /&gt;
* Tools&lt;br /&gt;
** cfilearchiver/&lt;br /&gt;
** cfileextractor/&lt;br /&gt;
** cryptstring/&lt;br /&gt;
** lab/&lt;br /&gt;
** scramble/&lt;br /&gt;
** inetfile/&lt;br /&gt;
** variables/&lt;br /&gt;
&lt;br /&gt;
=== Category Browser ===&lt;br /&gt;
The subdirectories above are also categorised by function. See the Category:Source Code to browse this way.&lt;br /&gt;
&lt;br /&gt;
[[Category:Source Code]]&lt;/div&gt;</summary>
		<author><name>Benoit</name></author>
	</entry>
	<entry>
		<id>https://wiki.hard-light.org/index.php?title=Source_Code_Reference&amp;diff=10104</id>
		<title>Source Code Reference</title>
		<link rel="alternate" type="text/html" href="https://wiki.hard-light.org/index.php?title=Source_Code_Reference&amp;diff=10104"/>
		<updated>2007-06-26T20:14:19Z</updated>

		<summary type="html">&lt;p&gt;Benoit: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The root directory contains the following external libraries (See msdn.microsoft.com for discussion of the DirectX libraries; for the other libraries, look in the README files for more info):&lt;br /&gt;
* lua: LUA Scripting language&lt;br /&gt;
* libjpeg: Jpeg library&lt;br /&gt;
* oggvorbis: Ogg Vorbis sound library&lt;br /&gt;
* dx8sdk: DirectX 8 SDK&lt;br /&gt;
* dx9sdk: DirectX 9 SDK&lt;br /&gt;
&lt;br /&gt;
The root also contains the actual Freespace2 code, in the code/ directory. The Freespace2 source code consists in several components, each of which is kept in a separate subdirectory. These components are listed below.&lt;br /&gt;
&lt;br /&gt;
=== Alphabetical view ===&lt;br /&gt;
&lt;br /&gt;
* ai (Computer AI)&lt;br /&gt;
* [[Source anim|anim]] (Displaying .ani animated bitmaps)&lt;br /&gt;
* asteroid (Handle asteroids - movement, collisions, creating smaller asteriods when larger ones are blown up etc.)&lt;br /&gt;
* autopilot (Handles autopilot control - where if there are no enemies, travelling a long distance etc. control is temporarily switched to the computer)&lt;br /&gt;
* [[Source bmpman|bmpman]] (Manage 2d graphics files, such as .bmp, .tga, .jpg etc.)&lt;br /&gt;
* camera (???)&lt;br /&gt;
* cfile (File/directory management routines including .VP file handling that are OS independent eg. handles differences between Linux &amp;amp; Windows)&lt;br /&gt;
* cmdline (Handles command line switches, such as -mipmap etc.)&lt;br /&gt;
* cmeasure (Handles countermeasures - flares that the player &amp;amp; AI can drop to disrupt missiles)&lt;br /&gt;
* controlconfig (Configures keyboard/mouse/joystick controls)&lt;br /&gt;
* cutscene (Handles cutscene viewing)&lt;br /&gt;
* [[Source ddsutils|ddsutils]] (Handles compressed textures for 3d graphics cards that support it)&lt;br /&gt;
* debris (Creates &amp;amp; handles flying debris from exploding ships)&lt;br /&gt;
* debugconsole (Handles debugging console and file)&lt;br /&gt;
* decals (Adds support for painting decals - small 2d textures - onto ships etc.)&lt;br /&gt;
* demo (Allows you to save &amp;amp; playback games to show as demos)&lt;br /&gt;
* directx (Specific includes for the Microsoft DirectX library - Windows only)&lt;br /&gt;
* exceptionhandler (Deals with crashes, saving stack trace, system info etc.)&lt;br /&gt;
* fireball (Displays &amp;amp; handles fireballs and warping effects)&lt;br /&gt;
* freespace2 (Main code - handles engine initialisation, loading resources, plus windows resources like icons &amp;amp; dialog boxes)&lt;br /&gt;
* fs2open_pxo (Network code)&lt;br /&gt;
* gamehelp (Displays context sensitive help text)&lt;br /&gt;
* gamesequence (Handles progression of events during a campaign, such as entering a mission, showing credits etc.)&lt;br /&gt;
* gamesnd (Handles sounds &amp;amp; music)&lt;br /&gt;
* globalincs (Basic global constants &amp;amp; definitions, eg. version, colours)&lt;br /&gt;
* [[Source graphics|graphics]] (Low-level wrapper for all 2d &amp;amp; 3d graphics that handles different display engines (DirectX, OpenGL etc)&lt;br /&gt;
* hud (Handles the HUD - all the 2d cockpit graphics that the player can see eg. radar, ammo, escort list, sqaud etc)&lt;br /&gt;
* iff_defs (Handles traitor ships???)&lt;br /&gt;
* io (Handles IO devices, such as keyboard, mouse &amp;amp; joystick)&lt;br /&gt;
* irc (Adds support for an IRC chat client)&lt;br /&gt;
* [[Source jpgutils|jpgutils]] (Opens, reads JPG files)&lt;br /&gt;
* jumpnode (Displays &amp;amp; handles jump nodes)&lt;br /&gt;
* lab (???)&lt;br /&gt;
* lighting (Handles light sources, and their effect on ships)&lt;br /&gt;
* localization (Handles a global string table for translating all written text into foreign languages)&lt;br /&gt;
* math (Library of math routines for handling vectors, splines etc)&lt;br /&gt;
* menuui (Handles all the misc user interface, such as the main menu, tech room, campaign list etc)&lt;br /&gt;
* mission (Handles general mission actions eg. briefing, goals, training info, in-mission messages etc)&lt;br /&gt;
* missionui (Handles UI for general mission actions)&lt;br /&gt;
* mm (Headers for older MS Multimedia library)&lt;br /&gt;
* model (Displays and handles ship models eg. reading files, collission detection etc)&lt;br /&gt;
* nebula (Displays and handles nebulae)&lt;br /&gt;
* network (All multi-player code, eg. UI, network traffic)&lt;br /&gt;
* object (High-level code to handle all objects eg. ships, weapons, debris, asteroids, waypoints, fireballs, shockwaves)&lt;br /&gt;
* observer (???)&lt;br /&gt;
* osapi (Wraps low-level Operating System calls, for different OS, eg. multi-threads, windows event loops, main app window)&lt;br /&gt;
* palman (Handles bitmap palettes - different colour maps for the same 2d bitmap)&lt;br /&gt;
* parse (Handles scripting files, eg. python, LUA etc)&lt;br /&gt;
* particle (Displays and handles particles, such as smoke, fire) &lt;br /&gt;
* [[Source pcxutils|pcxutils]] (Handles 2d .pcx graphics files)&lt;br /&gt;
* physics (Handles realistic physical behaviour of objects, such as ship acceleration/deceleration, rotation etc.)&lt;br /&gt;
* playerman (Handles pilot files &amp;amp; player ship movement)&lt;br /&gt;
* popup (Displays &amp;amp; handles 2d pop-up windows, eg. when the player dies)&lt;br /&gt;
* radar (Displays &amp;amp; handles the radar)&lt;br /&gt;
* [[Source render|render]] (Low-level 3d rendering code for some primitives)&lt;br /&gt;
* ship (Displays &amp;amp; handles all ship code, eg. shields, afterburner)&lt;br /&gt;
* sound (Low-level sound, speach &amp;amp; music routines)&lt;br /&gt;
* species_defs (Reads species_defs.tbl to handle different behaviour for different species)&lt;br /&gt;
* starfield (Displays &amp;amp; handles background images such as starfields, nebulae etc)&lt;br /&gt;
* stats (Displays &amp;amp; handles player statistics, medals etc)&lt;br /&gt;
* [[Source tgautils|tgautils]] (Handles .tga 2d graphics files)&lt;br /&gt;
* ui (Low-level user inteface routines eg. buttons, scrollbars)&lt;br /&gt;
* vcodec (Handles player voice streaming for multiplayer ???)&lt;br /&gt;
* weapon (Displays &amp;amp; handles everything to do with weapons)&lt;br /&gt;
* windows_stub (Low-level windows functions that are needed for Unix)&lt;br /&gt;
&lt;br /&gt;
There are also some directories that are only used for generating tools (not part of the main fs2 executable):&lt;br /&gt;
* cfilearchiver (Creates .VP file archives)&lt;br /&gt;
* cfileextractor (Extracts .VP file archives)&lt;br /&gt;
* cryptstring (Creates encrypted strings)&lt;br /&gt;
* fred2 (The FReespace EDitor)&lt;br /&gt;
* inetfile (FTP &amp;amp; HTTP network handlers)&lt;br /&gt;
* scramble (Utility to scramble file tables for the Demo version)&lt;br /&gt;
* variables (???)&lt;br /&gt;
* wxfred2 (Cross-platform version of FRED2)&lt;br /&gt;
&lt;br /&gt;
=== Layer view ===&lt;br /&gt;
&lt;br /&gt;
* Infrastructure&lt;br /&gt;
** System&lt;br /&gt;
*** cfile/&lt;br /&gt;
*** exceptionhandler/&lt;br /&gt;
*** irc/&lt;br /&gt;
*** localization/&lt;br /&gt;
*** osapi/&lt;br /&gt;
** Math&lt;br /&gt;
*** math/&lt;br /&gt;
** Sound&lt;br /&gt;
*** sound/&lt;br /&gt;
*** vcodec/&lt;br /&gt;
** Windows&lt;br /&gt;
*** ui/&lt;br /&gt;
*** windows_stub/&lt;br /&gt;
** 2D graphics&lt;br /&gt;
*** anim/&lt;br /&gt;
*** bmpman/&lt;br /&gt;
*** ddsutils/&lt;br /&gt;
*** tgautils/&lt;br /&gt;
*** jpgutils/&lt;br /&gt;
*** pcxutils/&lt;br /&gt;
*** palman/&lt;br /&gt;
** 3D graphics&lt;br /&gt;
*** decals/&lt;br /&gt;
*** mm/&lt;br /&gt;
*** directx/&lt;br /&gt;
*** graphics/&lt;br /&gt;
*** camera/&lt;br /&gt;
*** render/&lt;br /&gt;
** User Input&lt;br /&gt;
*** controlconfig/&lt;br /&gt;
*** io/&lt;br /&gt;
* Freespace2&lt;br /&gt;
** Common&lt;br /&gt;
*** globalincs/&lt;br /&gt;
*** cutscene/&lt;br /&gt;
*** cmdline/&lt;br /&gt;
*** debugconsole/&lt;br /&gt;
** In Space&lt;br /&gt;
*** ai/&lt;br /&gt;
*** asteroid/&lt;br /&gt;
*** autopilot/&lt;br /&gt;
*** cmeasure/&lt;br /&gt;
*** debris/&lt;br /&gt;
*** demo/&lt;br /&gt;
*** fireball/&lt;br /&gt;
*** gamehelp/&lt;br /&gt;
*** gamesequence/&lt;br /&gt;
*** gamesnd/&lt;br /&gt;
*** hud/&lt;br /&gt;
*** iff_defs/&lt;br /&gt;
*** jumpnode/&lt;br /&gt;
*** lighting/&lt;br /&gt;
*** nebula/&lt;br /&gt;
*** object/&lt;br /&gt;
*** observer/&lt;br /&gt;
*** model/&lt;br /&gt;
*** network/&lt;br /&gt;
*** particle/&lt;br /&gt;
*** parse/&lt;br /&gt;
*** popup/&lt;br /&gt;
*** physics/&lt;br /&gt;
*** radar/&lt;br /&gt;
*** ship/&lt;br /&gt;
*** species_defs/&lt;br /&gt;
*** starfield/&lt;br /&gt;
*** weapon/&lt;br /&gt;
** In Base&lt;br /&gt;
*** stats/&lt;br /&gt;
*** menuui/&lt;br /&gt;
*** mission/&lt;br /&gt;
*** missionui/&lt;br /&gt;
** Engine&lt;br /&gt;
*** fs2open_pxo/&lt;br /&gt;
*** freespace2/&lt;br /&gt;
*** playerman/&lt;br /&gt;
* FRED&lt;br /&gt;
** fred2/&lt;br /&gt;
** wxfred2/&lt;br /&gt;
* Tools&lt;br /&gt;
** cfilearchiver/&lt;br /&gt;
** cfileextractor/&lt;br /&gt;
** cryptstring/&lt;br /&gt;
** lab/&lt;br /&gt;
** scramble/&lt;br /&gt;
** inetfile/&lt;br /&gt;
** variables/&lt;br /&gt;
&lt;br /&gt;
==Category Browser==&lt;br /&gt;
The subdirectories above are also categorised by function. See the Category:Source Code to browse this way.&lt;br /&gt;
&lt;br /&gt;
[[Category:Source Code]]&lt;/div&gt;</summary>
		<author><name>Benoit</name></author>
	</entry>
	<entry>
		<id>https://wiki.hard-light.org/index.php?title=Getting_the_Source&amp;diff=10103</id>
		<title>Getting the Source</title>
		<link rel="alternate" type="text/html" href="https://wiki.hard-light.org/index.php?title=Getting_the_Source&amp;diff=10103"/>
		<updated>2007-06-26T20:13:52Z</updated>

		<summary type="html">&lt;p&gt;Benoit: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Although there are some CVS client tools, one of the most user-friendly is TortoiseCVS (it is by far better than WinCVS). Here you have some noob instructions to download the CVS code of the Freespace2 Open Project:&lt;br /&gt;
&lt;br /&gt;
* Go to [http://www.tortoisecvs.org the TortoiseCVS homepage] and download the latest version.&lt;br /&gt;
* Install it. You&#039;ll have to restart your PC afterwards. TortoiseCVS integrates itself with Explorer. You access and mark a folder as a code container with mouse right button contextual menu.&lt;br /&gt;
* Make a new folder on your HD where you&#039;d like to install the code. You&#039;ll need a fair bit of space for the code and the intermediate files when building it. Right click over it and choose &#039;&#039;&#039;CVS Checkout...&#039;&#039;&#039; from the list.&lt;br /&gt;
* A new window will open up. Cut and paste this text into the &#039;CVSROOT:&#039; textbox&amp;lt;br&amp;gt;&#039;&#039;&#039;:pserver:anonymous@warpcore.org:/home/fs2source/cvsroot&#039;&#039;&#039;&lt;br /&gt;
* This instruction will fill the editable drop lists below &#039;CVSROOT:&#039; textbox. (You could also have filled every one of them instead of the &#039;CVSROOT:&#039; textbox):&lt;br /&gt;
** Protocol: Password server (:pserver:)&lt;br /&gt;
** Protocol parameters: &amp;lt;empty&amp;gt;&lt;br /&gt;
** Server: warpcore.org&lt;br /&gt;
** Port: &amp;lt;empty&amp;gt;&lt;br /&gt;
** Repository folder: /home/fs2source/cvsroot&lt;br /&gt;
** User name: anonymous&lt;br /&gt;
* Press &#039;Fetch list...&#039; button. It&#039;ll connect with CVS server to get all the names of active modules.&lt;br /&gt;
** As this is the very first time you connect to the server you&#039;ll be asked a password. The password for anonymous user is also &#039;&#039;&#039;anonymous&#039;&#039;&#039; (in low case).&lt;br /&gt;
** From the drop list now you can select the module you want to download.&lt;br /&gt;
*** &#039;&#039;&#039;fs2_open&#039;&#039;&#039; is the repository for FS2 source code. (You could also have typed it in the &#039;Module:&#039; textbox).&lt;br /&gt;
* If you press OK button, source code download will begin in the folder you&#039;ve selected. A &#039;&#039;&#039;fs2_open&#039;&#039;&#039; subfolder will be created inside it.&lt;br /&gt;
* By default, the HEAD branch, which contains the developement (and maybe pretty unstable) code, will be downloaded. If you want to checkout the current stable branch rather than this development branch (since you don&#039;t have write access you probably should go with the stable build so that that more of the bugs you encounter are your own fault), you should change the Branch or Tag options:&lt;br /&gt;
** Before pressing OK button switch to &#039;Revision&#039; tab (the second one). (You should be in the first one, &#039;Module&#039; tab).&lt;br /&gt;
** Click on the &#039;Choose Branch or Tag&#039; option. Press the Update List button. TortoiseCVS will then connect to the server and get a list of revisions.&lt;br /&gt;
** In the &amp;quot;Branch or Tag Name&amp;quot; dropdown you can now see a list of branches that CVS contains. &#039;&#039;&#039;fs2_open_3_6_9&#039;&#039;&#039; is probably the one you want.&lt;br /&gt;
** Press OK now.&lt;br /&gt;
* Of course, you can set up different checkouts in different folders. Just repeat these steps.&lt;br /&gt;
* If you want to update any of the previously downloaded code, go to the container folder, right click over &#039;&#039;&#039;fs2_open&#039;&#039;&#039; folder (or any other one) and select &#039;&#039;&#039;CVS Update&#039;&#039;&#039; option.&lt;/div&gt;</summary>
		<author><name>Benoit</name></author>
	</entry>
	<entry>
		<id>https://wiki.hard-light.org/index.php?title=Getting_the_Source&amp;diff=10102</id>
		<title>Getting the Source</title>
		<link rel="alternate" type="text/html" href="https://wiki.hard-light.org/index.php?title=Getting_the_Source&amp;diff=10102"/>
		<updated>2007-06-26T20:13:38Z</updated>

		<summary type="html">&lt;p&gt;Benoit: New page: ==Getting the source== Although there are some CVS client tools, one of the most user-friendly is TortoiseCVS (it is by far better than WinCVS). Here you have some noob instructions to dow...&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Getting the source==&lt;br /&gt;
Although there are some CVS client tools, one of the most user-friendly is TortoiseCVS (it is by far better than WinCVS). Here you have some noob instructions to download the CVS code of the Freespace2 Open Project:&lt;br /&gt;
&lt;br /&gt;
* Go to [http://www.tortoisecvs.org the TortoiseCVS homepage] and download the latest version.&lt;br /&gt;
* Install it. You&#039;ll have to restart your PC afterwards. TortoiseCVS integrates itself with Explorer. You access and mark a folder as a code container with mouse right button contextual menu.&lt;br /&gt;
* Make a new folder on your HD where you&#039;d like to install the code. You&#039;ll need a fair bit of space for the code and the intermediate files when building it. Right click over it and choose &#039;&#039;&#039;CVS Checkout...&#039;&#039;&#039; from the list.&lt;br /&gt;
* A new window will open up. Cut and paste this text into the &#039;CVSROOT:&#039; textbox&amp;lt;br&amp;gt;&#039;&#039;&#039;:pserver:anonymous@warpcore.org:/home/fs2source/cvsroot&#039;&#039;&#039;&lt;br /&gt;
* This instruction will fill the editable drop lists below &#039;CVSROOT:&#039; textbox. (You could also have filled every one of them instead of the &#039;CVSROOT:&#039; textbox):&lt;br /&gt;
** Protocol: Password server (:pserver:)&lt;br /&gt;
** Protocol parameters: &amp;lt;empty&amp;gt;&lt;br /&gt;
** Server: warpcore.org&lt;br /&gt;
** Port: &amp;lt;empty&amp;gt;&lt;br /&gt;
** Repository folder: /home/fs2source/cvsroot&lt;br /&gt;
** User name: anonymous&lt;br /&gt;
* Press &#039;Fetch list...&#039; button. It&#039;ll connect with CVS server to get all the names of active modules.&lt;br /&gt;
** As this is the very first time you connect to the server you&#039;ll be asked a password. The password for anonymous user is also &#039;&#039;&#039;anonymous&#039;&#039;&#039; (in low case).&lt;br /&gt;
** From the drop list now you can select the module you want to download.&lt;br /&gt;
*** &#039;&#039;&#039;fs2_open&#039;&#039;&#039; is the repository for FS2 source code. (You could also have typed it in the &#039;Module:&#039; textbox).&lt;br /&gt;
* If you press OK button, source code download will begin in the folder you&#039;ve selected. A &#039;&#039;&#039;fs2_open&#039;&#039;&#039; subfolder will be created inside it.&lt;br /&gt;
* By default, the HEAD branch, which contains the developement (and maybe pretty unstable) code, will be downloaded. If you want to checkout the current stable branch rather than this development branch (since you don&#039;t have write access you probably should go with the stable build so that that more of the bugs you encounter are your own fault), you should change the Branch or Tag options:&lt;br /&gt;
** Before pressing OK button switch to &#039;Revision&#039; tab (the second one). (You should be in the first one, &#039;Module&#039; tab).&lt;br /&gt;
** Click on the &#039;Choose Branch or Tag&#039; option. Press the Update List button. TortoiseCVS will then connect to the server and get a list of revisions.&lt;br /&gt;
** In the &amp;quot;Branch or Tag Name&amp;quot; dropdown you can now see a list of branches that CVS contains. &#039;&#039;&#039;fs2_open_3_6_9&#039;&#039;&#039; is probably the one you want.&lt;br /&gt;
** Press OK now.&lt;br /&gt;
* Of course, you can set up different checkouts in different folders. Just repeat these steps.&lt;br /&gt;
* If you want to update any of the previously downloaded code, go to the container folder, right click over &#039;&#039;&#039;fs2_open&#039;&#039;&#039; folder (or any other one) and select &#039;&#039;&#039;CVS Update&#039;&#039;&#039; option.&lt;/div&gt;</summary>
		<author><name>Benoit</name></author>
	</entry>
	<entry>
		<id>https://wiki.hard-light.org/index.php?title=Development_Reference&amp;diff=10101</id>
		<title>Development Reference</title>
		<link rel="alternate" type="text/html" href="https://wiki.hard-light.org/index.php?title=Development_Reference&amp;diff=10101"/>
		<updated>2007-06-26T20:13:07Z</updated>

		<summary type="html">&lt;p&gt;Benoit: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* [[Getting the Source]]&lt;br /&gt;
* [[Sourcecode Reference]]&lt;br /&gt;
* [[Scripting API]]&lt;br /&gt;
* [[FS2_Open Lua Scripting]]&lt;br /&gt;
&lt;br /&gt;
===External Links===&lt;br /&gt;
[http://scp.indiegames.us/content.php?content.3 SCP Developers Page]&lt;/div&gt;</summary>
		<author><name>Benoit</name></author>
	</entry>
	<entry>
		<id>https://wiki.hard-light.org/index.php?title=Source_Code_Reference&amp;diff=10100</id>
		<title>Source Code Reference</title>
		<link rel="alternate" type="text/html" href="https://wiki.hard-light.org/index.php?title=Source_Code_Reference&amp;diff=10100"/>
		<updated>2007-06-26T20:08:33Z</updated>

		<summary type="html">&lt;p&gt;Benoit: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Getting the source==&lt;br /&gt;
Although there are some CVS client tools, one of the most user-friendly is TortoiseCVS (it is by far better than WinCVS). Here you have some noob instructions to download the CVS code of the Freespace2 Open Project:&lt;br /&gt;
&lt;br /&gt;
* Go to [http://www.tortoisecvs.org the TortoiseCVS homepage] and download the latest version.&lt;br /&gt;
* Install it. You&#039;ll have to restart your PC afterwards. TortoiseCVS integrates itself with Explorer. You access and mark a folder as a code container with mouse right button contextual menu.&lt;br /&gt;
* Make a new folder on your HD where you&#039;d like to install the code. You&#039;ll need a fair bit of space for the code and the intermediate files when building it. Right click over it and choose &#039;&#039;&#039;CVS Checkout...&#039;&#039;&#039; from the list.&lt;br /&gt;
* A new window will open up. Cut and paste this text into the &#039;CVSROOT:&#039; textbox&amp;lt;br&amp;gt;&#039;&#039;&#039;:pserver:anonymous@warpcore.org:/home/fs2source/cvsroot&#039;&#039;&#039;&lt;br /&gt;
* This instruction will fill the editable drop lists below &#039;CVSROOT:&#039; textbox. (You could also have filled every one of them instead of the &#039;CVSROOT:&#039; textbox):&lt;br /&gt;
** Protocol: Password server (:pserver:)&lt;br /&gt;
** Protocol parameters: &amp;lt;empty&amp;gt;&lt;br /&gt;
** Server: warpcore.org&lt;br /&gt;
** Port: &amp;lt;empty&amp;gt;&lt;br /&gt;
** Repository folder: /home/fs2source/cvsroot&lt;br /&gt;
** User name: anonymous&lt;br /&gt;
* Press &#039;Fetch list...&#039; button. It&#039;ll connect with CVS server to get all the names of active modules.&lt;br /&gt;
** As this is the very first time you connect to the server you&#039;ll be asked a password. The password for anonymous user is also &#039;&#039;&#039;anonymous&#039;&#039;&#039; (in low case).&lt;br /&gt;
** From the drop list now you can select the module you want to download.&lt;br /&gt;
*** &#039;&#039;&#039;fs2_open&#039;&#039;&#039; is the repository for FS2 source code. (You could also have typed it in the &#039;Module:&#039; textbox).&lt;br /&gt;
* If you press OK button, source code download will begin in the folder you&#039;ve selected. A &#039;&#039;&#039;fs2_open&#039;&#039;&#039; subfolder will be created inside it.&lt;br /&gt;
* By default, the HEAD branch, which contains the developement (and maybe pretty unstable) code, will be downloaded. If you want to checkout the current stable branch rather than this development branch (since you don&#039;t have write access you probably should go with the stable build so that that more of the bugs you encounter are your own fault), you should change the Branch or Tag options:&lt;br /&gt;
** Before pressing OK button switch to &#039;Revision&#039; tab (the second one). (You should be in the first one, &#039;Module&#039; tab).&lt;br /&gt;
** Click on the &#039;Choose Branch or Tag&#039; option. Press the Update List button. TortoiseCVS will then connect to the server and get a list of revisions.&lt;br /&gt;
** In the &amp;quot;Branch or Tag Name&amp;quot; dropdown you can now see a list of branches that CVS contains. &#039;&#039;&#039;fs2_open_3_6_9&#039;&#039;&#039; is probably the one you want.&lt;br /&gt;
** Press OK now.&lt;br /&gt;
* Of course, you can set up different checkouts in different folders. Just repeat these steps.&lt;br /&gt;
* If you want to update any of the previously downloaded code, go to the container folder, right click over &#039;&#039;&#039;fs2_open&#039;&#039;&#039; folder (or any other one) and select &#039;&#039;&#039;CVS Update&#039;&#039;&#039; option.&lt;br /&gt;
&lt;br /&gt;
== Freespace2 Code Base ==&lt;br /&gt;
&lt;br /&gt;
The root directory contains the following external libraries (See msdn.microsoft.com for discussion of the DirectX libraries; for the other libraries, look in the README files for more info):&lt;br /&gt;
* lua: LUA Scripting language&lt;br /&gt;
* libjpeg: Jpeg library&lt;br /&gt;
* oggvorbis: Ogg Vorbis sound library&lt;br /&gt;
* dx8sdk: DirectX 8 SDK&lt;br /&gt;
* dx9sdk: DirectX 9 SDK&lt;br /&gt;
&lt;br /&gt;
The root also contains the actual Freespace2 code, in the code/ directory. The Freespace2 source code consists in several components, each of which is kept in a separate subdirectory. These components are listed below.&lt;br /&gt;
&lt;br /&gt;
=== Alphabetical view ===&lt;br /&gt;
&lt;br /&gt;
* ai (Computer AI)&lt;br /&gt;
* [[Source anim|anim]] (Displaying .ani animated bitmaps)&lt;br /&gt;
* asteroid (Handle asteroids - movement, collisions, creating smaller asteriods when larger ones are blown up etc.)&lt;br /&gt;
* autopilot (Handles autopilot control - where if there are no enemies, travelling a long distance etc. control is temporarily switched to the computer)&lt;br /&gt;
* [[Source bmpman|bmpman]] (Manage 2d graphics files, such as .bmp, .tga, .jpg etc.)&lt;br /&gt;
* camera (???)&lt;br /&gt;
* cfile (File/directory management routines including .VP file handling that are OS independent eg. handles differences between Linux &amp;amp; Windows)&lt;br /&gt;
* cmdline (Handles command line switches, such as -mipmap etc.)&lt;br /&gt;
* cmeasure (Handles countermeasures - flares that the player &amp;amp; AI can drop to disrupt missiles)&lt;br /&gt;
* controlconfig (Configures keyboard/mouse/joystick controls)&lt;br /&gt;
* cutscene (Handles cutscene viewing)&lt;br /&gt;
* [[Source ddsutils|ddsutils]] (Handles compressed textures for 3d graphics cards that support it)&lt;br /&gt;
* debris (Creates &amp;amp; handles flying debris from exploding ships)&lt;br /&gt;
* debugconsole (Handles debugging console and file)&lt;br /&gt;
* decals (Adds support for painting decals - small 2d textures - onto ships etc.)&lt;br /&gt;
* demo (Allows you to save &amp;amp; playback games to show as demos)&lt;br /&gt;
* directx (Specific includes for the Microsoft DirectX library - Windows only)&lt;br /&gt;
* exceptionhandler (Deals with crashes, saving stack trace, system info etc.)&lt;br /&gt;
* fireball (Displays &amp;amp; handles fireballs and warping effects)&lt;br /&gt;
* freespace2 (Main code - handles engine initialisation, loading resources, plus windows resources like icons &amp;amp; dialog boxes)&lt;br /&gt;
* fs2open_pxo (Network code)&lt;br /&gt;
* gamehelp (Displays context sensitive help text)&lt;br /&gt;
* gamesequence (Handles progression of events during a campaign, such as entering a mission, showing credits etc.)&lt;br /&gt;
* gamesnd (Handles sounds &amp;amp; music)&lt;br /&gt;
* globalincs (Basic global constants &amp;amp; definitions, eg. version, colours)&lt;br /&gt;
* [[Source graphics|graphics]] (Low-level wrapper for all 2d &amp;amp; 3d graphics that handles different display engines (DirectX, OpenGL etc)&lt;br /&gt;
* hud (Handles the HUD - all the 2d cockpit graphics that the player can see eg. radar, ammo, escort list, sqaud etc)&lt;br /&gt;
* iff_defs (Handles traitor ships???)&lt;br /&gt;
* io (Handles IO devices, such as keyboard, mouse &amp;amp; joystick)&lt;br /&gt;
* irc (Adds support for an IRC chat client)&lt;br /&gt;
* [[Source jpgutils|jpgutils]] (Opens, reads JPG files)&lt;br /&gt;
* jumpnode (Displays &amp;amp; handles jump nodes)&lt;br /&gt;
* lab (???)&lt;br /&gt;
* lighting (Handles light sources, and their effect on ships)&lt;br /&gt;
* localization (Handles a global string table for translating all written text into foreign languages)&lt;br /&gt;
* math (Library of math routines for handling vectors, splines etc)&lt;br /&gt;
* menuui (Handles all the misc user interface, such as the main menu, tech room, campaign list etc)&lt;br /&gt;
* mission (Handles general mission actions eg. briefing, goals, training info, in-mission messages etc)&lt;br /&gt;
* missionui (Handles UI for general mission actions)&lt;br /&gt;
* mm (Headers for older MS Multimedia library)&lt;br /&gt;
* model (Displays and handles ship models eg. reading files, collission detection etc)&lt;br /&gt;
* nebula (Displays and handles nebulae)&lt;br /&gt;
* network (All multi-player code, eg. UI, network traffic)&lt;br /&gt;
* object (High-level code to handle all objects eg. ships, weapons, debris, asteroids, waypoints, fireballs, shockwaves)&lt;br /&gt;
* observer (???)&lt;br /&gt;
* osapi (Wraps low-level Operating System calls, for different OS, eg. multi-threads, windows event loops, main app window)&lt;br /&gt;
* palman (Handles bitmap palettes - different colour maps for the same 2d bitmap)&lt;br /&gt;
* parse (Handles scripting files, eg. python, LUA etc)&lt;br /&gt;
* particle (Displays and handles particles, such as smoke, fire) &lt;br /&gt;
* [[Source pcxutils|pcxutils]] (Handles 2d .pcx graphics files)&lt;br /&gt;
* physics (Handles realistic physical behaviour of objects, such as ship acceleration/deceleration, rotation etc.)&lt;br /&gt;
* playerman (Handles pilot files &amp;amp; player ship movement)&lt;br /&gt;
* popup (Displays &amp;amp; handles 2d pop-up windows, eg. when the player dies)&lt;br /&gt;
* radar (Displays &amp;amp; handles the radar)&lt;br /&gt;
* [[Source render|render]] (Low-level 3d rendering code for some primitives)&lt;br /&gt;
* ship (Displays &amp;amp; handles all ship code, eg. shields, afterburner)&lt;br /&gt;
* sound (Low-level sound, speach &amp;amp; music routines)&lt;br /&gt;
* species_defs (Reads species_defs.tbl to handle different behaviour for different species)&lt;br /&gt;
* starfield (Displays &amp;amp; handles background images such as starfields, nebulae etc)&lt;br /&gt;
* stats (Displays &amp;amp; handles player statistics, medals etc)&lt;br /&gt;
* [[Source tgautils|tgautils]] (Handles .tga 2d graphics files)&lt;br /&gt;
* ui (Low-level user inteface routines eg. buttons, scrollbars)&lt;br /&gt;
* vcodec (Handles player voice streaming for multiplayer ???)&lt;br /&gt;
* weapon (Displays &amp;amp; handles everything to do with weapons)&lt;br /&gt;
* windows_stub (Low-level windows functions that are needed for Unix)&lt;br /&gt;
&lt;br /&gt;
There are also some directories that are only used for generating tools (not part of the main fs2 executable):&lt;br /&gt;
* cfilearchiver (Creates .VP file archives)&lt;br /&gt;
* cfileextractor (Extracts .VP file archives)&lt;br /&gt;
* cryptstring (Creates encrypted strings)&lt;br /&gt;
* fred2 (The FReespace EDitor)&lt;br /&gt;
* inetfile (FTP &amp;amp; HTTP network handlers)&lt;br /&gt;
* scramble (Utility to scramble file tables for the Demo version)&lt;br /&gt;
* variables (???)&lt;br /&gt;
* wxfred2 (Cross-platform version of FRED2)&lt;br /&gt;
&lt;br /&gt;
=== Layer view ===&lt;br /&gt;
&lt;br /&gt;
* Infrastructure&lt;br /&gt;
** System&lt;br /&gt;
*** cfile/&lt;br /&gt;
*** exceptionhandler/&lt;br /&gt;
*** irc/&lt;br /&gt;
*** localization/&lt;br /&gt;
*** osapi/&lt;br /&gt;
** Math&lt;br /&gt;
*** math/&lt;br /&gt;
** Sound&lt;br /&gt;
*** sound/&lt;br /&gt;
*** vcodec/&lt;br /&gt;
** Windows&lt;br /&gt;
*** ui/&lt;br /&gt;
*** windows_stub/&lt;br /&gt;
** 2D graphics&lt;br /&gt;
*** anim/&lt;br /&gt;
*** bmpman/&lt;br /&gt;
*** ddsutils/&lt;br /&gt;
*** tgautils/&lt;br /&gt;
*** jpgutils/&lt;br /&gt;
*** pcxutils/&lt;br /&gt;
*** palman/&lt;br /&gt;
** 3D graphics&lt;br /&gt;
*** decals/&lt;br /&gt;
*** mm/&lt;br /&gt;
*** directx/&lt;br /&gt;
*** graphics/&lt;br /&gt;
*** camera/&lt;br /&gt;
*** render/&lt;br /&gt;
** User Input&lt;br /&gt;
*** controlconfig/&lt;br /&gt;
*** io/&lt;br /&gt;
* Freespace2&lt;br /&gt;
** Common&lt;br /&gt;
*** globalincs/&lt;br /&gt;
*** cutscene/&lt;br /&gt;
*** cmdline/&lt;br /&gt;
*** debugconsole/&lt;br /&gt;
** In Space&lt;br /&gt;
*** ai/&lt;br /&gt;
*** asteroid/&lt;br /&gt;
*** autopilot/&lt;br /&gt;
*** cmeasure/&lt;br /&gt;
*** debris/&lt;br /&gt;
*** demo/&lt;br /&gt;
*** fireball/&lt;br /&gt;
*** gamehelp/&lt;br /&gt;
*** gamesequence/&lt;br /&gt;
*** gamesnd/&lt;br /&gt;
*** hud/&lt;br /&gt;
*** iff_defs/&lt;br /&gt;
*** jumpnode/&lt;br /&gt;
*** lighting/&lt;br /&gt;
*** nebula/&lt;br /&gt;
*** object/&lt;br /&gt;
*** observer/&lt;br /&gt;
*** model/&lt;br /&gt;
*** network/&lt;br /&gt;
*** particle/&lt;br /&gt;
*** parse/&lt;br /&gt;
*** popup/&lt;br /&gt;
*** physics/&lt;br /&gt;
*** radar/&lt;br /&gt;
*** ship/&lt;br /&gt;
*** species_defs/&lt;br /&gt;
*** starfield/&lt;br /&gt;
*** weapon/&lt;br /&gt;
** In Base&lt;br /&gt;
*** stats/&lt;br /&gt;
*** menuui/&lt;br /&gt;
*** mission/&lt;br /&gt;
*** missionui/&lt;br /&gt;
** Engine&lt;br /&gt;
*** fs2open_pxo/&lt;br /&gt;
*** freespace2/&lt;br /&gt;
*** playerman/&lt;br /&gt;
* FRED&lt;br /&gt;
** fred2/&lt;br /&gt;
** wxfred2/&lt;br /&gt;
* Tools&lt;br /&gt;
** cfilearchiver/&lt;br /&gt;
** cfileextractor/&lt;br /&gt;
** cryptstring/&lt;br /&gt;
** lab/&lt;br /&gt;
** scramble/&lt;br /&gt;
** inetfile/&lt;br /&gt;
** variables/&lt;br /&gt;
&lt;br /&gt;
==Category Browser==&lt;br /&gt;
The subdirectories above are also categorised by function. See the Category:Source Code to browse this way.&lt;br /&gt;
&lt;br /&gt;
[[Category:Source Code]]&lt;/div&gt;</summary>
		<author><name>Benoit</name></author>
	</entry>
	<entry>
		<id>https://wiki.hard-light.org/index.php?title=Source_Code_Reference&amp;diff=10099</id>
		<title>Source Code Reference</title>
		<link rel="alternate" type="text/html" href="https://wiki.hard-light.org/index.php?title=Source_Code_Reference&amp;diff=10099"/>
		<updated>2007-06-26T19:53:08Z</updated>

		<summary type="html">&lt;p&gt;Benoit: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==CVS client (TortoiseCVS)==&lt;br /&gt;
Although there are some CVS client tools, one of the most user-friendly is TortoiseCVS (it is by far better than WinCVS). Here you have some noob instructions to download the CVS code of the Freespace2 Open Project:&lt;br /&gt;
&lt;br /&gt;
* Go to [http://www.tortoisecvs.org the TortoiseCVS homepage] and download the latest version.&lt;br /&gt;
* Install it. You&#039;ll have to restart your PC afterwards. TortoiseCVS integrates itself with Explorer. You access and mark a folder as a code container with mouse right button contextual menu.&lt;br /&gt;
* Make a new folder on your HD where you&#039;d like to install the code. You&#039;ll need a fair bit of space for the code and the intermediate files when building it. Right click over it and choose &#039;&#039;&#039;CVS Checkout...&#039;&#039;&#039; from the list.&lt;br /&gt;
* A new window will open up. Cut and paste this text into the &#039;CVSROOT:&#039; textbox&amp;lt;br&amp;gt;&#039;&#039;&#039;:pserver:anonymous@warpcore.org:/home/fs2source/cvsroot&#039;&#039;&#039;&lt;br /&gt;
* This instruction will fill the editable drop lists below &#039;CVSROOT:&#039; textbox. (You could also have filled every one of them instead of the &#039;CVSROOT:&#039; textbox):&lt;br /&gt;
** Protocol: Password server (:pserver:)&lt;br /&gt;
** Protocol parameters: &amp;lt;empty&amp;gt;&lt;br /&gt;
** Server: warpcore.org&lt;br /&gt;
** Port: &amp;lt;empty&amp;gt;&lt;br /&gt;
** Repository folder: /home/fs2source/cvsroot&lt;br /&gt;
** User name: anonymous&lt;br /&gt;
* Press &#039;Fetch list...&#039; button. It&#039;ll connect with CVS server to get all the names of active modules.&lt;br /&gt;
** As this is the very first time you connect to the server you&#039;ll be asked a password. The password for anonymous user is also &#039;&#039;&#039;anonymous&#039;&#039;&#039; (in low case).&lt;br /&gt;
** From the drop list now you can select the module you want to download.&lt;br /&gt;
*** &#039;&#039;&#039;fs2_open&#039;&#039;&#039; is the repository for FS2 source code. (You could also have typed it in the &#039;Module:&#039; textbox).&lt;br /&gt;
* If you press OK button, source code download will begin in the folder you&#039;ve selected. A &#039;&#039;&#039;fs2_open&#039;&#039;&#039; subfolder will be created inside it.&lt;br /&gt;
* By default, the HEAD branch, which contains the developement (and maybe pretty unstable) code, will be downloaded. If you want to checkout the current stable branch rather than this development branch (since you don&#039;t have write access you probably should go with the stable build so that that more of the bugs you encounter are your own fault), you should change the Branch or Tag options:&lt;br /&gt;
** Before pressing OK button switch to &#039;Revision&#039; tab (the second one). (You should be in the first one, &#039;Module&#039; tab).&lt;br /&gt;
** Click on the &#039;Choose Branch or Tag&#039; option. Press the Update List button. TortoiseCVS will then connect to the server and get a list of revisions.&lt;br /&gt;
** In the &amp;quot;Branch or Tag Name&amp;quot; dropdown you can now see a list of branches that CVS contains. &#039;&#039;&#039;fs2_open_3_6_9&#039;&#039;&#039; is probably the one you want.&lt;br /&gt;
** Press OK now.&lt;br /&gt;
* Of course, you can set up different checkouts in different folders. Just repeat these steps.&lt;br /&gt;
* If you want to update any of the previously downloaded code, go to the container folder, right click over &#039;&#039;&#039;fs2_open&#039;&#039;&#039; folder (or any other one) and select &#039;&#039;&#039;CVS Update&#039;&#039;&#039; option.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==CVS Directory Structure==&lt;br /&gt;
The fs2_open CVS consists of several major components, each of which is kept in a separate directory:&lt;br /&gt;
&lt;br /&gt;
* Freespace2 Code base (code)&lt;br /&gt;
&lt;br /&gt;
Plus the following libraries:&lt;br /&gt;
* LUA Scripting language (lua)&lt;br /&gt;
* Jpeg library (libjpeg)&lt;br /&gt;
* Ogg Vorbis sound library (oggvorbis)&lt;br /&gt;
* DirectX 8 SDK (dx8sdk)&lt;br /&gt;
* DirectX 9 SDK (dx9sdk)&lt;br /&gt;
&lt;br /&gt;
===Libraries===&lt;br /&gt;
See msdn.microsoft.com for discussion of the DirectX libraries. For the other libraries, look in the README files for more info.&lt;br /&gt;
&lt;br /&gt;
== Freespace2 Code Base ==&lt;br /&gt;
&lt;br /&gt;
The main code consists in several components, scattered among different subdirectories. The components are listed below.&lt;br /&gt;
&lt;br /&gt;
=== Alphabetical view ===&lt;br /&gt;
&lt;br /&gt;
* ai (Computer AI)&lt;br /&gt;
* [[Source anim|anim]] (Displaying .ani animated bitmaps)&lt;br /&gt;
* asteroid (Handle asteroids - movement, collisions, creating smaller asteriods when larger ones are blown up etc.)&lt;br /&gt;
* autopilot (Handles autopilot control - where if there are no enemies, travelling a long distance etc. control is temporarily switched to the computer)&lt;br /&gt;
* [[Source bmpman|bmpman]] (Manage 2d graphics files, such as .bmp, .tga, .jpg etc.)&lt;br /&gt;
* camera (???)&lt;br /&gt;
* cfile (File/directory management routines including .VP file handling that are OS independent eg. handles differences between Linux &amp;amp; Windows)&lt;br /&gt;
* cmdline (Handles command line switches, such as -mipmap etc.)&lt;br /&gt;
* cmeasure (Handles countermeasures - flares that the player &amp;amp; AI can drop to disrupt missiles)&lt;br /&gt;
* controlconfig (Configures keyboard/mouse/joystick controls)&lt;br /&gt;
* cutscene (Handles cutscene viewing)&lt;br /&gt;
* [[Source ddsutils|ddsutils]] (Handles compressed textures for 3d graphics cards that support it)&lt;br /&gt;
* debris (Creates &amp;amp; handles flying debris from exploding ships)&lt;br /&gt;
* debugconsole (Handles debugging console and file)&lt;br /&gt;
* decals (Adds support for painting decals - small 2d textures - onto ships etc.)&lt;br /&gt;
* demo (Allows you to save &amp;amp; playback games to show as demos)&lt;br /&gt;
* directx (Specific includes for the Microsoft DirectX library - Windows only)&lt;br /&gt;
* exceptionhandler (Deals with crashes, saving stack trace, system info etc.)&lt;br /&gt;
* fireball (Displays &amp;amp; handles fireballs and warping effects)&lt;br /&gt;
* freespace2 (Main code - handles engine initialisation, loading resources, plus windows resources like icons &amp;amp; dialog boxes)&lt;br /&gt;
* fs2open_pxo (Network code)&lt;br /&gt;
* gamehelp (Displays context sensitive help text)&lt;br /&gt;
* gamesequence (Handles progression of events during a campaign, such as entering a mission, showing credits etc.)&lt;br /&gt;
* gamesnd (Handles sounds &amp;amp; music)&lt;br /&gt;
* globalincs (Basic global constants &amp;amp; definitions, eg. version, colours)&lt;br /&gt;
* [[Source graphics|graphics]] (Low-level wrapper for all 2d &amp;amp; 3d graphics that handles different display engines (DirectX, OpenGL etc)&lt;br /&gt;
* hud (Handles the HUD - all the 2d cockpit graphics that the player can see eg. radar, ammo, escort list, sqaud etc)&lt;br /&gt;
* iff_defs (Handles traitor ships???)&lt;br /&gt;
* io (Handles IO devices, such as keyboard, mouse &amp;amp; joystick)&lt;br /&gt;
* irc (Adds support for an IRC chat client)&lt;br /&gt;
* [[Source jpgutils|jpgutils]] (Opens, reads JPG files)&lt;br /&gt;
* jumpnode (Displays &amp;amp; handles jump nodes)&lt;br /&gt;
* lab (???)&lt;br /&gt;
* lighting (Handles light sources, and their effect on ships)&lt;br /&gt;
* localization (Handles a global string table for translating all written text into foreign languages)&lt;br /&gt;
* math (Library of math routines for handling vectors, splines etc)&lt;br /&gt;
* menuui (Handles all the misc user interface, such as the main menu, tech room, campaign list etc)&lt;br /&gt;
* mission (Handles general mission actions eg. briefing, goals, training info, in-mission messages etc)&lt;br /&gt;
* missionui (Handles UI for general mission actions)&lt;br /&gt;
* mm (Headers for older MS Multimedia library)&lt;br /&gt;
* model (Displays and handles ship models eg. reading files, collission detection etc)&lt;br /&gt;
* nebula (Displays and handles nebulae)&lt;br /&gt;
* network (All multi-player code, eg. UI, network traffic)&lt;br /&gt;
* object (High-level code to handle all objects eg. ships, weapons, debris, asteroids, waypoints, fireballs, shockwaves)&lt;br /&gt;
* observer (???)&lt;br /&gt;
* osapi (Wraps low-level Operating System calls, for different OS, eg. multi-threads, windows event loops, main app window)&lt;br /&gt;
* palman (Handles bitmap palettes - different colour maps for the same 2d bitmap)&lt;br /&gt;
* parse (Handles scripting files, eg. python, LUA etc)&lt;br /&gt;
* particle (Displays and handles particles, such as smoke, fire) &lt;br /&gt;
* [[Source pcxutils|pcxutils]] (Handles 2d .pcx graphics files)&lt;br /&gt;
* physics (Handles realistic physical behaviour of objects, such as ship acceleration/deceleration, rotation etc.)&lt;br /&gt;
* playerman (Handles pilot files &amp;amp; player ship movement)&lt;br /&gt;
* popup (Displays &amp;amp; handles 2d pop-up windows, eg. when the player dies)&lt;br /&gt;
* radar (Displays &amp;amp; handles the radar)&lt;br /&gt;
* [[Source render|render]] (Low-level 3d rendering code for some primitives)&lt;br /&gt;
* ship (Displays &amp;amp; handles all ship code, eg. shields, afterburner)&lt;br /&gt;
* sound (Low-level sound, speach &amp;amp; music routines)&lt;br /&gt;
* species_defs (Reads species_defs.tbl to handle different behaviour for different species)&lt;br /&gt;
* starfield (Displays &amp;amp; handles background images such as starfields, nebulae etc)&lt;br /&gt;
* stats (Displays &amp;amp; handles player statistics, medals etc)&lt;br /&gt;
* [[Source tgautils|tgautils]] (Handles .tga 2d graphics files)&lt;br /&gt;
* ui (Low-level user inteface routines eg. buttons, scrollbars)&lt;br /&gt;
* vcodec (Handles player voice streaming for multiplayer ???)&lt;br /&gt;
* weapon (Displays &amp;amp; handles everything to do with weapons)&lt;br /&gt;
* windows_stub (Low-level windows functions that are needed for Unix)&lt;br /&gt;
&lt;br /&gt;
There are also some directories that are only used for generating tools (not part of the main fs2 executable):&lt;br /&gt;
* cfilearchiver (Creates .VP file archives)&lt;br /&gt;
* cfileextractor (Extracts .VP file archives)&lt;br /&gt;
* cryptstring (Creates encrypted strings)&lt;br /&gt;
* fred2 (The FReespace EDitor)&lt;br /&gt;
* inetfile (FTP &amp;amp; HTTP network handlers)&lt;br /&gt;
* scramble (Utility to scramble file tables for the Demo version)&lt;br /&gt;
* variables (???)&lt;br /&gt;
* wxfred2 (Cross-platform version of FRED2)&lt;br /&gt;
&lt;br /&gt;
=== Layer view ===&lt;br /&gt;
&lt;br /&gt;
* Infrastructure&lt;br /&gt;
** System&lt;br /&gt;
*** cfile/&lt;br /&gt;
*** exceptionhandler/&lt;br /&gt;
*** irc/&lt;br /&gt;
*** localization/&lt;br /&gt;
*** osapi/&lt;br /&gt;
** Math&lt;br /&gt;
*** math/&lt;br /&gt;
** Sound&lt;br /&gt;
*** sound/&lt;br /&gt;
*** vcodec/&lt;br /&gt;
** Windows&lt;br /&gt;
*** ui/&lt;br /&gt;
*** windows_stub/&lt;br /&gt;
** 2D graphics&lt;br /&gt;
*** anim/&lt;br /&gt;
*** bmpman/&lt;br /&gt;
*** ddsutils/&lt;br /&gt;
*** tgautils/&lt;br /&gt;
*** jpgutils/&lt;br /&gt;
*** pcxutils/&lt;br /&gt;
*** palman/&lt;br /&gt;
** 3D graphics&lt;br /&gt;
*** decals/&lt;br /&gt;
*** mm/&lt;br /&gt;
*** directx/&lt;br /&gt;
*** graphics/&lt;br /&gt;
*** camera/&lt;br /&gt;
*** render/&lt;br /&gt;
** User Input&lt;br /&gt;
*** controlconfig/&lt;br /&gt;
*** io/&lt;br /&gt;
* Freespace2&lt;br /&gt;
** Common&lt;br /&gt;
*** globalincs/&lt;br /&gt;
*** cutscene/&lt;br /&gt;
*** cmdline/&lt;br /&gt;
*** debugconsole/&lt;br /&gt;
** In Space&lt;br /&gt;
*** ai/&lt;br /&gt;
*** asteroid/&lt;br /&gt;
*** autopilot/&lt;br /&gt;
*** cmeasure/&lt;br /&gt;
*** debris/&lt;br /&gt;
*** demo/&lt;br /&gt;
*** fireball/&lt;br /&gt;
*** gamehelp/&lt;br /&gt;
*** gamesequence/&lt;br /&gt;
*** gamesnd/&lt;br /&gt;
*** hud/&lt;br /&gt;
*** iff_defs/&lt;br /&gt;
*** jumpnode/&lt;br /&gt;
*** lighting/&lt;br /&gt;
*** nebula/&lt;br /&gt;
*** object/&lt;br /&gt;
*** observer/&lt;br /&gt;
*** model/&lt;br /&gt;
*** network/&lt;br /&gt;
*** particle/&lt;br /&gt;
*** parse/&lt;br /&gt;
*** popup/&lt;br /&gt;
*** physics/&lt;br /&gt;
*** radar/&lt;br /&gt;
*** ship/&lt;br /&gt;
*** species_defs/&lt;br /&gt;
*** starfield/&lt;br /&gt;
*** weapon/&lt;br /&gt;
** In Base&lt;br /&gt;
*** stats/&lt;br /&gt;
*** menuui/&lt;br /&gt;
*** mission/&lt;br /&gt;
*** missionui/&lt;br /&gt;
** Engine&lt;br /&gt;
*** fs2open_pxo/&lt;br /&gt;
*** freespace2/&lt;br /&gt;
*** playerman/&lt;br /&gt;
* FRED&lt;br /&gt;
** fred2/&lt;br /&gt;
** wxfred2/&lt;br /&gt;
* Tools&lt;br /&gt;
** cfilearchiver/&lt;br /&gt;
** cfileextractor/&lt;br /&gt;
** cryptstring/&lt;br /&gt;
** lab/&lt;br /&gt;
** scramble/&lt;br /&gt;
** inetfile/&lt;br /&gt;
** variables/&lt;br /&gt;
&lt;br /&gt;
==Category Browser==&lt;br /&gt;
The subdirectories above are also categorised by function. See the Category:Source Code to browse this way.&lt;br /&gt;
&lt;br /&gt;
[[Category:Source Code]]&lt;/div&gt;</summary>
		<author><name>Benoit</name></author>
	</entry>
	<entry>
		<id>https://wiki.hard-light.org/index.php?title=Source_Code_Reference&amp;diff=10098</id>
		<title>Source Code Reference</title>
		<link rel="alternate" type="text/html" href="https://wiki.hard-light.org/index.php?title=Source_Code_Reference&amp;diff=10098"/>
		<updated>2007-06-26T19:41:06Z</updated>

		<summary type="html">&lt;p&gt;Benoit: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==CVS client (TortoiseCVS)==&lt;br /&gt;
Although there are some CVS client tools, one of the most user-friendly is TortoiseCVS (it is by far better than WinCVS). Here you have some noob instructions to download the CVS code of the Freespace2 Open Project:&lt;br /&gt;
&lt;br /&gt;
* Go to [http://www.tortoisecvs.org the TortoiseCVS homepage] and download the latest version.&lt;br /&gt;
* Install it. You&#039;ll have to restart your PC afterwards. TortoiseCVS integrates itself with Explorer. You access and mark a folder as a code container with mouse right button contextual menu.&lt;br /&gt;
* Make a new folder on your HD where you&#039;d like to install the code. You&#039;ll need a fair bit of space for the code and the intermediate files when building it. Right click over it and choose &#039;&#039;&#039;CVS Checkout...&#039;&#039;&#039; from the list.&lt;br /&gt;
* A new window will open up. Cut and paste this text into the &#039;CVSROOT:&#039; textbox&amp;lt;br&amp;gt;&#039;&#039;&#039;:pserver:anonymous@warpcore.org:/home/fs2source/cvsroot&#039;&#039;&#039;&lt;br /&gt;
* This instruction will fill the editable drop lists below &#039;CVSROOT:&#039; textbox. (You could also have filled every one of them instead of the &#039;CVSROOT:&#039; textbox):&lt;br /&gt;
** Protocol: Password server (:pserver:)&lt;br /&gt;
** Protocol parameters: &amp;lt;empty&amp;gt;&lt;br /&gt;
** Server: warpcore.org&lt;br /&gt;
** Port: &amp;lt;empty&amp;gt;&lt;br /&gt;
** Repository folder: /home/fs2source/cvsroot&lt;br /&gt;
** User name: anonymous&lt;br /&gt;
* Press &#039;Fetch list...&#039; button. It&#039;ll connect with CVS server to get all the names of active modules.&lt;br /&gt;
** As this is the very first time you connect to the server you&#039;ll be asked a password. The password for anonymous user is also &#039;&#039;&#039;anonymous&#039;&#039;&#039; (in low case).&lt;br /&gt;
** From the drop list now you can select the module you want to download.&lt;br /&gt;
*** &#039;&#039;&#039;fs2_open&#039;&#039;&#039; is the repository for FS2 source code. (You could also have typed it in the &#039;Module:&#039; textbox).&lt;br /&gt;
* If you press OK button, source code download will begin in the folder you&#039;ve selected. A &#039;&#039;&#039;fs2_open&#039;&#039;&#039; subfolder will be created inside it.&lt;br /&gt;
* By default, the HEAD branch, which contains the developement (and maybe pretty unstable) code, will be downloaded. If you want to checkout the current stable branch rather than this development branch (since you don&#039;t have write access you probably should go with the stable build so that that more of the bugs you encounter are your own fault), you should change the Branch or Tag options:&lt;br /&gt;
** Before pressing OK button switch to &#039;Revision&#039; tab (the second one). (You should be in the first one, &#039;Module&#039; tab).&lt;br /&gt;
** Click on the &#039;Choose Branch or Tag&#039; option. Press the Update List button. TortoiseCVS will then connect to the server and get a list of revisions.&lt;br /&gt;
** In the &amp;quot;Branch or Tag Name&amp;quot; dropdown you can now see a list of branches that CVS contains. &#039;&#039;&#039;fs2_open_3_6_9&#039;&#039;&#039; is probably the one you want.&lt;br /&gt;
** Press OK now.&lt;br /&gt;
* Of course, you can set up different checkouts in different folders. Just repeat these steps.&lt;br /&gt;
* If you want to update any of the previously downloaded code, go to the container folder, right click over &#039;&#039;&#039;fs2_open&#039;&#039;&#039; folder (or any other one) and select &#039;&#039;&#039;CVS Update&#039;&#039;&#039; option.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==CVS Directory Structure==&lt;br /&gt;
The fs2_open CVS consists of several major components, each of which is kept in a separate directory:&lt;br /&gt;
&lt;br /&gt;
* Freespace2 Code base (code)&lt;br /&gt;
&lt;br /&gt;
Plus the following libraries:&lt;br /&gt;
* LUA Scripting language (lua)&lt;br /&gt;
* Jpeg library (libjpeg)&lt;br /&gt;
* Ogg Vorbis sound library (oggvorbis)&lt;br /&gt;
* DirectX 8 SDK (dx8sdk)&lt;br /&gt;
* DirectX 9 SDK (dx9sdk)&lt;br /&gt;
&lt;br /&gt;
===Libraries===&lt;br /&gt;
See msdn.microsoft.com for discussion of the DirectX libraries. For the other libraries, look in the README files for more info.&lt;br /&gt;
&lt;br /&gt;
===Freespace2 Code Base===&lt;br /&gt;
The main code consists of several subdirectories:&lt;br /&gt;
&lt;br /&gt;
* ai (Computer AI)&lt;br /&gt;
* [[Source anim|anim]] (Displaying .ani animated bitmaps)&lt;br /&gt;
* asteroid (Handle asteroids - movement, collisions, creating smaller asteriods when larger ones are blown up etc.)&lt;br /&gt;
* autopilot (Handles autopilot control - where if there are no enemies, travelling a long distance etc. control is temporarily switched to the computer)&lt;br /&gt;
* [[Source bmpman|bmpman]] (Manage 2d graphics files, such as .bmp, .tga, .jpg etc.)&lt;br /&gt;
* camera (???)&lt;br /&gt;
* cfile (File/directory management routines including .VP file handling that are OS independent eg. handles differences between Linux &amp;amp; Windows)&lt;br /&gt;
* cmdline (Handles command line switches, such as -mipmap etc.)&lt;br /&gt;
* cmeasure (Handles countermeasures - flares that the player &amp;amp; AI can drop to disrupt missiles)&lt;br /&gt;
* controlconfig (Configures keyboard/mouse/joystick controls)&lt;br /&gt;
* cutscene (Handles cutscene viewing)&lt;br /&gt;
* [[Source ddsutils|ddsutils]] (Handles compressed textures for 3d graphics cards that support it)&lt;br /&gt;
* debris (Creates &amp;amp; handles flying debris from exploding ships)&lt;br /&gt;
* debugconsole (Handles debugging console and file)&lt;br /&gt;
* decals (Adds support for painting decals - small 2d textures - onto ships etc.)&lt;br /&gt;
* demo (Allows you to save &amp;amp; playback games to show as demos)&lt;br /&gt;
* directx (Specific includes for the Microsoft DirectX library - Windows only)&lt;br /&gt;
* exceptionhandler (Deals with crashes, saving stack trace, system info etc.)&lt;br /&gt;
* fireball (Displays &amp;amp; handles fireballs and warping effects)&lt;br /&gt;
* freespace2 (Main code - handles engine initialisation, loading resources, plus windows resources like icons &amp;amp; dialog boxes)&lt;br /&gt;
* fs2open_pxo (Network code)&lt;br /&gt;
* gamehelp (Displays context sensitive help text)&lt;br /&gt;
* gamesequence (Handles progression of events during a campaign, such as entering a mission, showing credits etc.)&lt;br /&gt;
* gamesnd (Handles sounds &amp;amp; music)&lt;br /&gt;
* globalincs (Basic global constants &amp;amp; definitions, eg. version, colours)&lt;br /&gt;
* [[Source graphics|graphics]] (Low-level wrapper for all 2d &amp;amp; 3d graphics that handles different display engines (DirectX, OpenGL etc)&lt;br /&gt;
* hud (Handles the HUD - all the 2d cockpit graphics that the player can see eg. radar, ammo, escort list, sqaud etc)&lt;br /&gt;
* iff_defs (Handles traitor ships???)&lt;br /&gt;
* io (Handles IO devices, such as keyboard, mouse &amp;amp; joystick)&lt;br /&gt;
* irc (Adds support for an IRC chat client)&lt;br /&gt;
* [[Source jpgutils|jpgutils]] (Opens, reads JPG files)&lt;br /&gt;
* jumpnode (Displays &amp;amp; handles jump nodes)&lt;br /&gt;
* lab (???)&lt;br /&gt;
* lighting (Handles light sources, and their effect on ships)&lt;br /&gt;
* localization (Handles a global string table for translating all written text into foreign languages)&lt;br /&gt;
* math (Library of math routines for handling vectors, splines etc)&lt;br /&gt;
* menuui (Handles all the misc user interface, such as the main menu, tech room, campaign list etc)&lt;br /&gt;
* mission (Handles general mission actions eg. briefing, goals, training info, in-mission messages etc)&lt;br /&gt;
* missionui (Handles UI for general mission actions)&lt;br /&gt;
* mm (Headers for older MS Multimedia library)&lt;br /&gt;
* model (Displays and handles ship models eg. reading files, collission detection etc)&lt;br /&gt;
* nebula (Displays and handles nebulae)&lt;br /&gt;
* network (All multi-player code, eg. UI, network traffic)&lt;br /&gt;
* object (High-level code to handle all objects eg. ships, weapons, debris, asteroids, waypoints, fireballs, shockwaves)&lt;br /&gt;
* observer (???)&lt;br /&gt;
* osapi (Wraps low-level Operating System calls, for different OS, eg. multi-threads, windows event loops, main app window)&lt;br /&gt;
* palman (Handles bitmap palettes - different colour maps for the same 2d bitmap)&lt;br /&gt;
* parse (Handles scripting files, eg. python, LUA etc)&lt;br /&gt;
* particle (Displays and handles particles, such as smoke, fire) &lt;br /&gt;
* [[Source pcxutils|pcxutils]] (Handles 2d .pcx graphics files)&lt;br /&gt;
* physics (Handles realistic physical behaviour of objects, such as ship acceleration/deceleration, rotation etc.)&lt;br /&gt;
* playerman (Handles pilot files &amp;amp; player ship movement)&lt;br /&gt;
* popup (Displays &amp;amp; handles 2d pop-up windows, eg. when the player dies)&lt;br /&gt;
* radar (Displays &amp;amp; handles the radar)&lt;br /&gt;
* [[Source render|render]] (Low-level 3d rendering code for some primitives)&lt;br /&gt;
* ship (Displays &amp;amp; handles all ship code, eg. shields, afterburner)&lt;br /&gt;
* sound (Low-level sound, speach &amp;amp; music routines)&lt;br /&gt;
* species_defs (Reads species_defs.tbl to handle different behaviour for different species)&lt;br /&gt;
* starfield (Displays &amp;amp; handles background images such as starfields, nebulae etc)&lt;br /&gt;
* stats (Displays &amp;amp; handles player statistics, medals etc)&lt;br /&gt;
* [[Source tgautils|tgautils]] (Handles .tga 2d graphics files)&lt;br /&gt;
* ui (Low-level user inteface routines eg. buttons, scrollbars)&lt;br /&gt;
* vcodec (Handles player voice streaming for multiplayer ???)&lt;br /&gt;
* weapon (Displays &amp;amp; handles everything to do with weapons)&lt;br /&gt;
* windows_stub (Low-level windows functions that are needed for Unix)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
There are also some directories that are only used for generating tools (not part of the main fs2 executable):&lt;br /&gt;
* cfilearchiver (Creates .VP file archives)&lt;br /&gt;
* cfileextractor (Extracts .VP file archives)&lt;br /&gt;
* cryptstring (Creates encrypted strings)&lt;br /&gt;
* fred2 (The FReespace EDitor)&lt;br /&gt;
* inetfile (FTP &amp;amp; HTTP network handlers)&lt;br /&gt;
* scramble (Utility to scramble file tables for the Demo version)&lt;br /&gt;
* variables (???)&lt;br /&gt;
* wxfred2 (Cross-platform version of FRED2)&lt;br /&gt;
&lt;br /&gt;
== Source code organization ==&lt;br /&gt;
&lt;br /&gt;
=== Alphabetical view ===&lt;br /&gt;
&lt;br /&gt;
=== Layer view ===&lt;br /&gt;
&lt;br /&gt;
* Infrastructure&lt;br /&gt;
** System&lt;br /&gt;
*** cfile/&lt;br /&gt;
*** exceptionhandler/&lt;br /&gt;
*** irc/&lt;br /&gt;
*** inetfile/&lt;br /&gt;
*** localization/&lt;br /&gt;
*** osapi/&lt;br /&gt;
*** variables/&lt;br /&gt;
** Math&lt;br /&gt;
*** math/&lt;br /&gt;
** Sound&lt;br /&gt;
*** sound/&lt;br /&gt;
*** vcodec/&lt;br /&gt;
** Windows&lt;br /&gt;
*** ui/&lt;br /&gt;
*** windows_stub/&lt;br /&gt;
** 2D graphics&lt;br /&gt;
*** anim/&lt;br /&gt;
*** bmpman/&lt;br /&gt;
*** ddsutils/&lt;br /&gt;
*** tgautils/&lt;br /&gt;
*** jpgutils/&lt;br /&gt;
*** pcxutils/&lt;br /&gt;
*** palman/&lt;br /&gt;
** 3D graphics&lt;br /&gt;
*** decals/&lt;br /&gt;
*** mm/&lt;br /&gt;
*** directx/&lt;br /&gt;
*** graphics/&lt;br /&gt;
*** camera/&lt;br /&gt;
*** render/&lt;br /&gt;
** User Input&lt;br /&gt;
*** controlconfig/&lt;br /&gt;
*** io/&lt;br /&gt;
* Freespace2&lt;br /&gt;
** Common&lt;br /&gt;
*** globalincs/&lt;br /&gt;
*** cutscene/&lt;br /&gt;
*** cmdline/&lt;br /&gt;
*** debugconsole/&lt;br /&gt;
** In Space&lt;br /&gt;
*** ai/&lt;br /&gt;
*** asteroid/&lt;br /&gt;
*** autopilot/&lt;br /&gt;
*** cmeasure/&lt;br /&gt;
*** debris/&lt;br /&gt;
*** demo/&lt;br /&gt;
*** fireball/&lt;br /&gt;
*** gamehelp/&lt;br /&gt;
*** gamesequence/&lt;br /&gt;
*** gamesnd/&lt;br /&gt;
*** hud/&lt;br /&gt;
*** iff_defs/&lt;br /&gt;
*** jumpnode/&lt;br /&gt;
*** lighting/&lt;br /&gt;
*** nebula/&lt;br /&gt;
*** object/&lt;br /&gt;
*** observer/&lt;br /&gt;
*** model/&lt;br /&gt;
*** network/&lt;br /&gt;
*** particle/&lt;br /&gt;
*** parse/&lt;br /&gt;
*** popup/&lt;br /&gt;
*** physics/&lt;br /&gt;
*** radar/&lt;br /&gt;
*** ship/&lt;br /&gt;
*** species_defs/&lt;br /&gt;
*** starfield/&lt;br /&gt;
*** weapon/&lt;br /&gt;
** In Base&lt;br /&gt;
*** stats/&lt;br /&gt;
*** menuui/&lt;br /&gt;
*** mission/&lt;br /&gt;
*** missionui/&lt;br /&gt;
** Engine&lt;br /&gt;
*** fs2open_pxo/&lt;br /&gt;
*** freespace2/&lt;br /&gt;
*** playerman/&lt;br /&gt;
* FRED&lt;br /&gt;
** fred2/&lt;br /&gt;
** wxfred2/&lt;br /&gt;
* Tools&lt;br /&gt;
** cfilearchiver/&lt;br /&gt;
** cfileextractor/&lt;br /&gt;
** cryptstring/&lt;br /&gt;
** lab/&lt;br /&gt;
** scramble/&lt;br /&gt;
&lt;br /&gt;
==Category Browser==&lt;br /&gt;
The subdirectories above are also categorised by function. See the Category:Source Code to browse this way.&lt;br /&gt;
&lt;br /&gt;
[[Category:Source Code]]&lt;/div&gt;</summary>
		<author><name>Benoit</name></author>
	</entry>
</feed>