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

Space-object simulation and the fleet overview camera. More...

#include <signal.h>
#include <sys/stat.h>
#include "wc1.h"

Go to the source code of this file.

Functions

void SetFleetOverviewView (int initializeCockpit)
unsigned int rotate_eye_to_goal (void)
short GetVectorMagnitude (const FixedVector *vector)
unsigned int set_eye_direction_and_position (void)
unsigned int force_view (int view, short obj)
unsigned int new_view (int view, short obj)
unsigned int start_dust (short obj, FixedVector origin, short forwardDistance, int rightOffset, int upOffset)
unsigned int generate_stars (void)
unsigned int update_star_field (void)
short count_down (short obj)
int explode (short attacker, short victim)
unsigned int house_keep_objects (void)
unsigned int update_objects_in_space (void)
unsigned int rotate_object (short obj)
unsigned int accelerate_and_move_object (short obj)
unsigned int animate_shape (short obj)
unsigned int animate_object (short obj)
void make_shard (short asteroid, FixedVector direction)
short check_for_collision (short obj)
void rectangular_to_spherical (const FixedVector *rectangular, SphericalVector *spherical)
void apply_force_to_object (FixedVector *point, FixedVector *force, short obj)
int inflict_damage (short attacker, short victim, short damage, const FixedVector *impactDirection)
int MaxInt (int a, int b)
void rotational_acceleration (FixedVector *point, FixedVector *force, short obj)
unsigned int hit_asteroid (short asteroid, short destructionChance)
short easy2see (short obj)
unsigned int update_canned_sequence (short obj)
void mine_intelligence (short obj)
short get_ship_max_velocity (short obj)
void heat_seeking_missile_intelligence (short obj)
void FF_missile_intelligence (short obj)
int object_collision (short obj)
unsigned int object_intelligence (short obj)

Variables

int nCapitalShipViewDistance = 0x7d000
unsigned char bLandingAuthorized = 0
static int bAlternateChaseView = 0
short asScannerObjectY [11]
ShortPoint stCockpitExplosionPosition
short asScannerObjectPositionX [11]
unsigned char abCockpitLightGoalArray [7]
int nCurrentDamageAlarmSfxHandle
short asScannerBackgroundColour [10]
unsigned int anCockpitDamageState [4]
unsigned short nPendingHudMessageColour
short nCurrentStarFieldJRotationValue
short nStarFieldIRotValue

Detailed Description

Space-object simulation and the fleet overview camera.

Address range 410740-413a0f. The Mac spc symbol run identifies rotate_eye_to_goal through object_intelligence.

Definition in file spc.c.

Function Documentation

◆ accelerate_and_move_object()

◆ animate_object()

◆ animate_shape()

◆ apply_force_to_object()

void apply_force_to_object ( FixedVector * point,
FixedVector * force,
short obj )

Definition at line 1045 of file geom.c.

◆ check_for_collision()

short check_for_collision ( short obj)

Definition at line 922 of file geom.c.

◆ count_down()

short count_down ( short obj)

Definition at line 839 of file spc.c.

References asObjectCounterArray, and count_down().

Referenced by count_down(), and house_keep_objects().

◆ easy2see()

short easy2see ( short obj)

Definition at line 83 of file winmain.c.

◆ explode()

int explode ( short attacker,
short victim )

Definition at line 1340 of file ship.c.

◆ FF_missile_intelligence()

void FF_missile_intelligence ( short obj)

Definition at line 1064 of file brains.c.

◆ force_view()

◆ generate_stars()

◆ get_ship_max_velocity()

short get_ship_max_velocity ( short obj)

Definition at line 95 of file geom.c.

◆ GetVectorMagnitude()

short GetVectorMagnitude ( const FixedVector * vector)

Definition at line 146 of file spc.c.

References FixedToShortSaturating(), GetVectorMagnitude(), and Vector_magnitude().

Referenced by GetVectorMagnitude().

◆ heat_seeking_missile_intelligence()

void heat_seeking_missile_intelligence ( short obj)

Definition at line 1018 of file brains.c.

◆ hit_asteroid()

unsigned int hit_asteroid ( short asteroid,
short destructionChance )

◆ house_keep_objects()

unsigned int house_keep_objects ( void )

◆ inflict_damage()

int inflict_damage ( short attacker,
short victim,
short damage,
const FixedVector * impactDirection )

Definition at line 503 of file ship.c.

◆ make_shard()

void make_shard ( short asteroid,
FixedVector direction )

Definition at line 105 of file winmain.c.

◆ MaxInt()

int MaxInt ( int a,
int b )

Definition at line 210 of file geom.c.

◆ mine_intelligence()

void mine_intelligence ( short obj)

Definition at line 992 of file brains.c.

◆ new_view()

◆ object_collision()

◆ object_intelligence()

◆ rectangular_to_spherical()

void rectangular_to_spherical ( const FixedVector * rectangular,
SphericalVector * spherical )

Definition at line 383 of file geom.c.

◆ rotate_eye_to_goal()

◆ rotate_object()

◆ rotational_acceleration()

void rotational_acceleration ( FixedVector * point,
FixedVector * force,
short obj )

Definition at line 1101 of file geom.c.

◆ set_eye_direction_and_position()

◆ SetFleetOverviewView()

◆ start_dust()

◆ update_canned_sequence()

unsigned int update_canned_sequence ( short obj)

Definition at line 278 of file mono.c.

◆ update_objects_in_space()

◆ update_star_field()

Variable Documentation

◆ abCockpitLightGoalArray

unsigned char abCockpitLightGoalArray[7]

◆ anCockpitDamageState

unsigned int anCockpitDamageState[4]

Definition at line 25 of file spc.c.

Referenced by clear_cockpit_damage(), explosion_draw(), and place_damage_on_cockpit().

◆ asScannerBackgroundColour

short asScannerBackgroundColour[10]

Definition at line 24 of file spc.c.

Referenced by clear_head_up_display(), and draw_3d_scanner().

◆ asScannerObjectPositionX

short asScannerObjectPositionX[11]

◆ asScannerObjectY

short asScannerObjectY[11]

Definition at line 19 of file spc.c.

Referenced by clear_head_up_display(), draw_3d_scanner(), and rotational_pos_to_scanner_pos().

◆ bAlternateChaseView

int bAlternateChaseView = 0
static

Definition at line 16 of file spc.c.

Referenced by new_view(), and set_eye_direction_and_position().

◆ bLandingAuthorized

unsigned char bLandingAuthorized = 0

◆ nCapitalShipViewDistance

int nCapitalShipViewDistance = 0x7d000

Definition at line 13 of file spc.c.

Referenced by HandleFleetOverviewInput(), and set_eye_direction_and_position().

◆ nCurrentDamageAlarmSfxHandle

int nCurrentDamageAlarmSfxHandle

Definition at line 23 of file spc.c.

Referenced by house_keep(), ResetSoundState(), and update_lights().

◆ nCurrentStarFieldJRotationValue

short nCurrentStarFieldJRotationValue

Definition at line 27 of file spc.c.

Referenced by generate_stars(), and update_star_field().

◆ nPendingHudMessageColour

unsigned short nPendingHudMessageColour

Definition at line 26 of file spc.c.

Referenced by overlay_head_up_display(), and SetHudMessageText().

◆ nStarFieldIRotValue

short nStarFieldIRotValue

Definition at line 28 of file spc.c.

Referenced by generate_stars(), and update_star_field().

◆ stCockpitExplosionPosition