Wing Commander
Reconstructed Win32 source (1996)
Loading...
Searching...
No Matches
auto.c File Reference

Autopilot travel and interstitial flight sequences. More...

#include "wc1.h"
#include <malloc.h>
#include <float.h>
#include <assert.h>

Go to the source code of this file.

Functions

void visit_the_cinema (int view, int obj, short frames)
unsigned int player_wingman (short obj)
void set_speed (short obj, short speed)
void auto_position (short obj, short *formationSlot)
void auto_pilot_sequence (void)
unsigned short __stdcall LoadPaletteTripletsFile (const char *path)

Variables

unsigned int nSystemKeyDown
JOYINFO aJoystickInfos [2]
int nHostMouseMessageX
static short nAutopilotFormationShipCount = 0

Detailed Description

Autopilot travel and interstitial flight sequences.

Address range 403e50-40469f. The Mac auto unit preserves visit_the_cinema, player_wingman, set_speed, auto_position and auto_pilot_sequence in this order. The palette-file loader that follows belongs here too: its "rb" literal follows the initialized formation count in the original data.

Definition in file auto.c.

Function Documentation

◆ auto_pilot_sequence()

void auto_pilot_sequence ( void )

Definition at line 104 of file auto.c.

References abFlightPathList, AddFixedVectors(), aeObjectClass, aeObjectTypeList, aeShipSide, aeSpecialManeuvers, aMissionNavPoints, aMissionObjectivesArray, anObjectRollRotationList, anObjectYawRotation, anObjPitchRot, anPitchGoal, anRollGoal, anShipSpeed, anYawTarget, aObjectTypeData, aShipDestinationsArray, aShipFwdVec, aShipPositionsArray, aShipVelocity, asShipMaximumSpeedArray, auto_pilot_sequence(), auto_pilot_valid(), auto_position(), bCockpitlessView, Viewport::bottom, cCurrentNavPtIdx, cCurrentObjective, check_hazards(), clean_up_cockpit(), ComputeVectorDelta(), copy_frame(), ObjectTypeData::cruiseVelocity, distance_between_points(), distance_from_object(), distance_from_point(), equ_vector(), force_view(), GetScreenUpdateFlag(), initialize_view_buffer(), is_team_member(), kilrathi_near(), Viewport::left, MinShort(), nAutopilotFormationShipCount, nCannedSceneMode, nCurrentNavigationPoint, nCurrentViewCenterPosY, NormalizeFixedVector(), nScreenHeight, nScreenWidth, nShipMissionIndices, nYourWingman, OBJECT_CLASS_SHIP, pActiveHazardField, player_wingman(), point_at(), MissionObjective::position, ReleaseStaleNavTarget(), remove_object(), report_kilrathi_rout(), ResetSoundState(), Viewport::right, ScaleFixedVector(), set_speed(), SetMousePosition(), SetViewportRect(), SIDE_IMPERIAL, SPECIAL_MANEUVER_NONE, SPECIAL_MANEUVER_UNKNOWN_9, stSpaceBufferViewport, SubtractFixedVectors(), Viewport::top, Update_3Space(), visit_the_cinema(), and zero_vector().

Referenced by auto_pilot_sequence(), and HandleSpaceFlightControls().

◆ auto_position()

◆ LoadPaletteTripletsFile()

unsigned short __stdcall LoadPaletteTripletsFile ( const char * path)

◆ player_wingman()

unsigned int player_wingman ( short obj)

Definition at line 49 of file auto.c.

References asShipWingLeaderArray, and player_wingman().

Referenced by auto_pilot_sequence(), auto_position(), and player_wingman().

◆ set_speed()

void set_speed ( short obj,
short speed )

Definition at line 57 of file auto.c.

References anShipSpeed, fix_velocity(), and set_speed().

Referenced by auto_pilot_sequence(), and set_speed().

◆ visit_the_cinema()

void visit_the_cinema ( int view,
int obj,
short frames )

Variable Documentation

◆ aJoystickInfos

JOYINFO aJoystickInfos[2]

Definition at line 18 of file auto.c.

Referenced by GetJoystickButtons(), and GetJoystickPosition().

◆ nAutopilotFormationShipCount

short nAutopilotFormationShipCount = 0
static

Definition at line 63 of file auto.c.

Referenced by auto_pilot_sequence(), and auto_position().

◆ nHostMouseMessageX

int nHostMouseMessageX

Definition at line 19 of file auto.c.

Referenced by MainWindowProc(), and TranslatePolledInputEvent().

◆ nSystemKeyDown

unsigned int nSystemKeyDown

Definition at line 17 of file auto.c.

Referenced by GetKeyboardModifiers(), and MainWindowProc().