|
Wing Commander
Reconstructed Win32 source (1996)
|
Cockpit HUD: weapon, damage, target, objective, message and pilot displays. More...
#include "wc1.h"Go to the source code of this file.
Functions | |
| void | EmitTextString (void(__stdcall *writer)(int character), const char *text) |
| void | FormatTextTokens (void(__stdcall *writer)(int), const char *format, va_list arguments) |
| void | DrawFormattedText (const char *format,...) |
| void | FormatTextBufferFromStart (const char *format,...) |
| void | AppendFormattedText (const char *format,...) |
| void | FatalErrorAndExit (const char *format,...) |
| unsigned short | IsCockpitExplosionActive (void) |
| void | EraseCockpitReadoutRegion (Viewport *viewport, short left, short top, short right, short bottom, short colour) |
| void | vdu_polygon (signed char bar, short percent) |
| unsigned int | InitializeCockpitReadout (signed char slot, TextContext *context) |
| void | DrawCockpitReadout (signed char slot, const char *text) |
| void | EraseCockpitReadoutAtPosition (signed char slot, short left, short top) |
| short | DrawHudMessageSlot (HudMessageSlot *slot) |
| void | ClearHudMessageSlot (HudMessageSlot *slot) |
| void | ClearHudMessageIfMatching (HudMessageSlot *slot, const char *text) |
| void | ClearHudGunReadouts (void) |
| void | SetHudMessageSlot (HudMessageSlot *slot, TextContext *context, short x, short y, const char *text, unsigned short colour, signed char flashCount) |
| void | UpdateMessage (HudMessageSlot *slot) |
| void | set_global_message (const char *text, unsigned short colour, int flashCount) |
| void | CockpitMessage (const char *text, unsigned short colour, int flashCount) |
| void | ClearGlobalMessage (void) |
| void | remove_message (const char *text) |
| short | kilrathi_near (short obj, short range) |
| short | auto_pilot_valid (short showReason) |
| void * | reset_cockpit (void) |
| unsigned int | SetCockpitLightBlink (signed char light, short interval) |
| void | draw_cockpit_lights (void) |
| void | update_lights (void) |
| void | update_bars (void) |
| short | get_mode (short i) |
| void | set_mode (short i, int state) |
| unsigned short | SetVduModeIfChanged (short i, int state) |
| short | GetVduModeStackDepth (short i) |
| void | push_mode (short i, int state) |
| void | pop_mode (short i) |
| void | set_new_vdu (short vdu) |
| short | update_vid_disp (short vdu) |
| void | InvalidateVduMode (short i) |
| void | clear_message_time (void) |
| short | message_showing (void) |
| unsigned short | set_message_time (unsigned short v) |
| void | check_message (void) |
| unsigned int | update_digital_readouts (void) |
| void | PlayTargetLockSfx (void) |
| void | malf_sound (void) |
| short | malf (char component) |
| unsigned short | vdu_malf (short vdu, short sound) |
| void | ShowComponentHitHudMessage (const char *text, unsigned short colour, short flashCount) |
| int | damage_your_component (char component, char amount, char maximum) |
| void | RemovePlayerReleaseWeapon (signed char weapon) |
| void | fire_computer_graphic_missile (void) |
| void | show_weapon_disp (void) |
| void | update_status_text (void) |
| short | sighted (short objective) |
| short | visited (short objective) |
| short | achieved (short objective) |
| void | flag_objective (short objective, unsigned char flags) |
| void | DrawCalculatingLabel (void) |
| const char * | objective_name (short objective) |
| void | show_navigation_disp (void) |
| short | find_ship_index (short missionShip) |
| short | hidden_objective (short objective) |
| int | set_new_objective (short pathIndex) |
| short | cycle_next_objective (void) |
| void | set_next_destination (void) |
| short | LocateMobileObjective (short objective) |
| unsigned int | someone_coming (void) |
| short | escorting_a_ship (void) |
| void | flag_reached (short objective, short reached) |
| short | FixedToShortSaturating (int value) |
| void | transform_to_objects_frame (const FixedVector *source, FixedVector *destination, short obj) |
| void | rectangular_to_spherical (const FixedVector *rectangular, SphericalVector *spherical) |
| void | DrawViewportPixel (Viewport *viewport, short x, short y, short colour) |
| int | GetViewportPixel (Viewport *viewport, short x, short y) |
| short | RandomBelowOrEqual (short n) |
| void | check_sighting (short objective, short range, short object) |
| void | check_visit (short objective, short range) |
| void | update_objective_location (short objective) |
| unsigned int | objective_lost (short objective) |
| void | check_objectives (void) |
| void | rotational_pos_to_scanner_pos (signed char object, const SphericalVector *position) |
| short | mobile_objective (short objective) |
| void | ResetScannerContacts (void) |
| void | clear_head_up_display (void) |
| unsigned int | set_objective_range (short showOnScanner) |
| short | get_color (short object, unsigned short *colour) |
| unsigned int | draw_3d_scanner (void) |
| void | start_lock (unsigned short v) |
| unsigned short | starting_lock (unsigned short v) |
| void | lock_off (void) |
| short | CheckTargetLockMalfunction (void) |
| short | decrement_lock_time (short screenX) |
| void | target_locking (signed char target) |
| void | SetRectBounds (Viewport *viewport, unsigned short a, unsigned short b, unsigned short c, unsigned short d) |
| short | GetRectHeight (const Viewport *viewport) |
| void | print_message_text (char *text, unsigned short colour) |
| void | ShowHudTextLine (char *s, unsigned short b) |
| void | SetHudTextColour (short v) |
| void | draw_target_box (unsigned short colour, signed char object, short solid, short drawLockMarker, short padding, ShortRect *savedBounds) |
| void | remove_nav_pointer (void) |
| void | draw_nav_pointer (void) |
| unsigned int | overlay_head_up_display (void) |
| void | RestoreCockpitExplosionIfVisible (void) |
| unsigned int | RestoreTransientCockpitGraphics (void) |
| void | SetHudMessageText (char *text, unsigned short colour, unsigned short duration) |
| void | malf_noise (short vdu, int effect, unsigned short colour, short sound, short refresh) |
| void | build_your_target_list (short *hasEnemy) |
| void | cycle_onscreen_targets (void) |
| void | check_target (void) |
| void | update_missile_warning (void) |
| void | determine_pilot_hand (void) |
| void | DrawPilotHandFrame (void) |
| void | CopyTrainSimPilotViewToRightVdu (void) |
| void | animate_pilot (void) |
| void | ResetPilotHandAnimation (void) |
| void | send_message (short obj, short message) |
| void | npc_communication (void) |
| void | clear_cockpit_damage (void) |
| void | explosion_draw (void) |
| unsigned int | DrawPendingCockpitDamage (void) |
| void | RestoreCockpitExplosionBackground (void) |
| void | cockpit_explosion (void) |
| void | place_damage_on_cockpit (short damage) |
| void | vid_transmit (void) |
| void | vid_equiv (short obj, short message) |
| void | update_dead_disp (short a) |
| void | check_stranded (void) |
| void | update_VDUs (void) |
| void | update_cockpit (void) |
| void | PlayCockpitSelectionSfx (short selectionSound) |
| void | vdu_pop_all (short vdu) |
| void | SelectCockpitVduMode (short vdu, int mode) |
Cockpit HUD: weapon, damage, target, objective, message and pilot displays.
Address range 413a10-41807f, the Mac cockpt compilation unit: its symbol list identifies the surviving functions throughout this range, with the port-specific helpers interleaved in their original address order.
Definition in file cockpt.c.
| short achieved | ( | short | objective | ) |
Definition at line 1042 of file cockpt.c.
References achieved(), and aMissionObjectivesArray.
Referenced by achieved(), BuildMap(), can_land(), cleanup_objectives(), no_objectives_achieved(), ParseTests(), PlayersMissionScore(), and show_info_disp().
Definition at line 2468 of file cockpt.c.
References animate_pilot(), bStickIndicatorFrameState, cRenderedPilotHandFrame, determine_pilot_hand(), DrawPilotHandFrame(), and pCurrentPilotHandShapePtr.
Referenced by animate_pilot(), ResetPilotHandAnimation(), and update_cockpit().
| void AppendFormattedText | ( | const char * | format, |
| ... ) |
Definition at line 227 of file cockpt.c.
References AppendFormattedText(), AppendTextCharacter(), DIBslam(), FormatTextTokens(), pCurTextContext, Viewport::pixels, stScreenView, and TextContext::viewport.
Referenced by AppendFormattedText().
| short auto_pilot_valid | ( | short | showReason | ) |
Definition at line 517 of file cockpt.c.
References aMissionObjectivesArray, auto_pilot_valid(), cCurrentObjective, cMissionObjectiveCountValue, cYellowColour, distance_from_point(), kilrathi_near(), pActiveHazardField, and set_global_message().
Referenced by auto_pilot_sequence(), auto_pilot_valid(), and draw_cockpit_lights().
| void build_your_target_list | ( | short * | hasEnemy | ) |
Definition at line 2248 of file cockpt.c.
References acViableTargetList, aeObjectClass, aeShipSide, aeSpecialManeuvers, asObjDistancesTable, asObjectScreenXList, asViableTgtDistList, build_your_target_list(), cViableTargetCount, OBJECT_CLASS_SHIP, sort_viable_target_list(), and SPECIAL_MANEUVER_UNKNOWN_9.
Referenced by build_your_target_list(), check_target(), and cycle_onscreen_targets().
Definition at line 789 of file cockpt.c.
References check_message(), EndCommMenu(), message_showing(), and nCurrentNoticeTimer.
Referenced by check_message(), and RenderSpaceViewFrame().
Definition at line 1378 of file cockpt.c.
References cCurrentObjective, check_objectives(), cycle_next_objective(), DrawCalculatingLabel(), InvalidateVduMode(), nCurObjectiveRangeValue, nDisplayedObjectiveRange, objective_lost(), and update_objective_location().
Referenced by check_objectives(), and update_VDUs().
| void check_sighting | ( | short | objective, |
| short | range, | ||
| short | object ) |
Definition at line 1311 of file cockpt.c.
References asObjectScreenXList, check_sighting(), flag_objective(), and sighted().
Referenced by check_sighting(), and update_objective_location().
Definition at line 2757 of file cockpt.c.
References aMissionShips, any_enemy(), check_stranded(), nArcadeState, nCarrierMissionShipIndexValue, and nTrainSimActive.
Referenced by check_stranded(), GameFlow(), and update_cockpit().
Definition at line 2314 of file cockpt.c.
References acShipTargetTable, acViableTargetList, aeShipSide, aeSpecialManeuvers, asObjectScreenXList, build_your_target_list(), check_target(), cViableTargetCount, malf(), malf_sound(), nRenderedSpaceFrame, nTargetLockCountdown, nTargetLockMode, and SPECIAL_MANEUVER_UNKNOWN_9.
Referenced by check_target(), and update_cockpit().
| void check_visit | ( | short | objective, |
| short | range ) |
Definition at line 1320 of file cockpt.c.
References aMissionObjectivesArray, check_visit(), and flag_reached().
Referenced by check_visit(), and update_objective_location().
| short CheckTargetLockMalfunction | ( | void | ) |
Definition at line 1671 of file cockpt.c.
References CheckTargetLockMalfunction(), lock_off(), malf(), nTargetLockCountdown, PlaySfxWaveFileByNumber(), and RandomBelowOrEqual().
Referenced by CheckTargetLockMalfunction(), and decrement_lock_time().
Definition at line 2556 of file cockpt.c.
References anCockpitDamageState, and clear_cockpit_damage().
Referenced by clear_cockpit_damage(), and InitializeCockpitResources().
Definition at line 1455 of file cockpt.c.
References asScannerBackgroundColour, asScannerObjectPositionX, asScannerObjectY, clear_head_up_display(), DrawViewportPixel(), nScannerTargetObject, pRadarMarkerBackground, pTgtLockShapePtr, RestoreSpriteBackground(), and stScreenView.
Referenced by clear_head_up_display(), draw_3d_scanner(), and initialize_cockpit().
Definition at line 770 of file cockpt.c.
References clear_message_time(), and nCurrentNoticeTimer.
Referenced by clear_message_time(), and EndCommMenu().
Definition at line 489 of file cockpt.c.
References aCockpitHudMessageSlotsTable, ClearGlobalMessage(), and ClearHudMessageSlot().
Referenced by ClearGlobalMessage().
Definition at line 433 of file cockpt.c.
References aCockpitHudMessageSlotsTable, ClearHudGunReadouts(), HudMessageSlot::flashCount, and HudMessageSlot::text.
Referenced by clean_up_cockpit(), ClearHudGunReadouts(), and InitializeCockpitResources().
| void ClearHudMessageIfMatching | ( | HudMessageSlot * | slot, |
| const char * | text ) |
Definition at line 426 of file cockpt.c.
References ClearHudMessageIfMatching(), ClearHudMessageSlot(), and HudMessageSlot::text.
Referenced by ClearHudMessageIfMatching(), and remove_message().
| void ClearHudMessageSlot | ( | HudMessageSlot * | slot | ) |
Definition at line 417 of file cockpt.c.
References ClearHudMessageSlot(), DrawHudMessageSlot(), HudMessageSlot::flashCount, and HudMessageSlot::text.
Referenced by ClearGlobalMessage(), ClearHudMessageIfMatching(), ClearHudMessageSlot(), pop_mode(), push_mode(), set_mode(), SetHudMessageSlot(), ShowComponentHitHudMessage(), and UpdateMessage().
Definition at line 2626 of file cockpt.c.
References CaptureSpriteBackground(), cockpit_explosion(), cRenderedPilotHandFrame, DrawPendingCockpitDamage(), DrawSpriteDefault(), FreePacketAndClear(), IsCockpitExplosionActive(), nCockpitExplosionFrame, pCockpitExplosionBackground, pCockpitExplosionShape, PlaySfxWaveFileByNumber(), stCockpitExplosionPosition, stScreenView, ShortPoint::x, and ShortPoint::y.
Referenced by cockpit_explosion(), and update_cockpit().
| void CockpitMessage | ( | const char * | text, |
| unsigned short | colour, | ||
| int | flashCount ) |
Definition at line 480 of file cockpt.c.
References aCockpitHudMessageSlotsTable, CockpitMessage(), and set_global_message().
Referenced by CockpitMessage(), decrement_lock_time(), flag_reached(), and OpenCommMenuForTarget().
Definition at line 2448 of file cockpt.c.
References Viewport::bottom, CopyTrainSimPilotViewToRightVdu(), CopyViewportContents(), Viewport::left, Viewport::right, stPilotHandBackdropView, stPilotHandView, stRightVduViewport, stTrainSimVduSource, and Viewport::top.
Referenced by CopyTrainSimPilotViewToRightVdu(), and update_VDUs().
| short cycle_next_objective | ( | void | ) |
Definition at line 1159 of file cockpt.c.
References abFlightPathList, cCurrentNavPtIdx, cCurrentObjective, cycle_next_objective(), and set_new_objective().
Referenced by check_objectives(), cycle_next_objective(), InflightComputer(), and set_next_destination().
Definition at line 2280 of file cockpt.c.
References acShipTargetTable, acViableTargetList, aeShipSide, build_your_target_list(), cViableTargetCount, cycle_onscreen_targets(), and nTargetLockCountdown.
Referenced by cycle_onscreen_targets(), and SelectCockpitVduMode().
| int damage_your_component | ( | char | component, |
| char | amount, | ||
| char | maximum ) |
Definition at line 864 of file cockpt.c.
References acPlayerComponentDamageList, apszComponentNames, cRedColour, damage_your_component(), get_mode(), malf(), MinShort(), ShowComponentHitHudMessage(), and vdu_malf().
Referenced by check_computer_damage(), damage_your_component(), and your_internal_damage().
| short decrement_lock_time | ( | short | screenX | ) |
Definition at line 1687 of file cockpt.c.
References bTargetLockAcquired, CheckTargetLockMalfunction(), CockpitMessage(), cRedColour, decrement_lock_time(), malf(), nTargetLockCountdown, PlaySfxWaveFileByNumber(), pszMissileLockedMessage, and void().
Referenced by decrement_lock_time(), and target_locking().
Definition at line 2394 of file cockpt.c.
References bStickIndicatorFrameState, determine_pilot_hand(), MinShort(), stRotationInput, ShortVector::x, and ShortVector::y.
Referenced by animate_pilot(), and determine_pilot_hand().
| unsigned int draw_3d_scanner | ( | void | ) |
Definition at line 1544 of file cockpt.c.
References acShipTargetTable, aeObjectClass, aiScannerGridRows, aObjectViewPositionsList, asScannerBackgroundColour, asScannerObjectPositionX, asScannerObjectY, bCockpitlessView, CaptureSpriteBackground(), cBlackColour, cCurrentCockpitView, CockpitScannerGeometry::centerX, CockpitScannerGeometry::centerY, clear_head_up_display(), draw_3d_scanner(), DrawSpriteDefault(), DrawViewportPixel(), get_color(), get_mode(), GetViewportPixel(), nCurrentSpaceFrameValue, nScannerCursorX, nScannerCursorY, nScannerTargetObject, OBJECT_CLASS_SHIP, pRadarMarkerBackground, pTgtLockShapePtr, SphericalVector::radius, rectangular_to_spherical(), rotational_pos_to_scanner_pos(), CockpitLayout::scanner, set_objective_range(), stCockpitLayout, and stScreenView.
Referenced by draw_3d_scanner(), and update_cockpit().
Definition at line 568 of file cockpt.c.
References aacCockpitLightOffFrame, aacCockpitLightOnFrame, aasCockpitLightX, aasCockpitLightY, abCockpitIndicatorStatesArray, abCockpitLightGoalArray, auto_pilot_valid(), bCockpitlessView, cCurrentCockpitView, draw_cockpit_lights(), DrawSpriteDefault(), nRenderedSpaceFrame, pCockpitDamageShape, and stScreenView.
Referenced by draw_cockpit_lights(), and update_cockpit().
Definition at line 2015 of file cockpt.c.
References acObjOwnersTable, aeObjectClass, aMissionObjectivesArray, apObjShapeArray, aShipPositionsArray, asObjDistancesTable, asObjectCollisionRadius, asObjectScreenXList, asObjectScreenYArray, asObjectViewFrames, asObjScreenAngles, asObjScreenScalesArray, cCurrentObjective, ComputeVectorDelta(), DivideFixed(), draw_nav_pointer(), EYE_OBJECT, find_vacant_3d_object(), get_mode(), MultiplyFixed(), nCameraViewMode, nCannedSceneMode, nNavPointerObject, nScreenWidth, OBJECT_CLASS_PLANET, pTgtLockShapePtr, remove_nav_pointer(), transform_to_objects_frame(), Vector_magnitude(), FixedVector::x, FixedVector::y, and FixedVector::z.
Referenced by draw_nav_pointer(), and transform_objects_to_your_view().
| void draw_target_box | ( | unsigned short | colour, |
| signed char | object, | ||
| short | solid, | ||
| short | drawLockMarker, | ||
| short | padding, | ||
| ShortRect * | savedBounds ) |
Definition at line 1891 of file cockpt.c.
References aeShipSide, anObjectRollRotationList, anObjPitchRot, apObjShapeArray, asObjectFlipArray, asObjectScreenXList, asObjectScreenYArray, asObjectViewFrames, asObjScreenAngles, asObjScreenScalesArray, ShortRect::bottom, cBlueColour, CosFixed(), cPrimaryViewBufferColour, cRedColour, draw_target_box(), DrawSolidColourSprite(), DrawSpriteDefault(), DrawViewportBorder(), DrawViewportLine(), GetTransformedShapeBounds(), ShortRect::left, nCurrentViewCenterPosX, nCurrentViewCenterPosY, nTargetLockCountdown, nTargetLockMarkerAngle, nTargetLockMarkerX, nTargetLockMarkerY, pTgtLockShapePtr, ShortRect::right, SinFixed(), stSpaceBufferViewport, and ShortRect::top.
Referenced by draw_target_box(), overlay_head_up_display(), and RestoreTransientCockpitGraphics().
Definition at line 1054 of file cockpt.c.
References DrawCalculatingLabel(), DrawCockpitReadout(), nCurObjectiveRangeValue, nDisplayedObjectiveRange, and szTxtWorkspaceBuffer.
Referenced by check_objectives(), DrawCalculatingLabel(), and show_navigation_disp().
| void DrawCockpitReadout | ( | signed char | slot, |
| const char * | text ) |
Definition at line 352 of file cockpt.c.
References aCockpitReadouts, cBlackColour, CockpitReadout::context, TextContext::cursorX, DrawCockpitReadout(), DrawFormattedText(), EraseCockpitReadoutRegion(), TextContext::font, CockpitReadout::previousRight, SetTextContext(), SetTextCursor(), stScreenView, and CockpitReadout::y.
Referenced by DrawCalculatingLabel(), DrawCockpitReadout(), DrawTargetRangeReadout(), update_bars(), and update_digital_readouts().
| void DrawFormattedText | ( | const char * | format, |
| ... ) |
Definition at line 197 of file cockpt.c.
References DIBslam(), DrawFormattedText(), DrawTextCharacter(), FormatTextTokens(), pCurTextContext, Viewport::pixels, stScreenView, and TextContext::viewport.
Referenced by DrawArcadeScorePanel(), DrawCockpitReadout(), DrawFormattedText(), DrawNavMapLabels(), DrawTextInputCursor(), PromptForPilotField(), ReadRequiredPilotField(), ReadTextInput(), show_communications_disp(), show_info_disp(), show_navigation_disp(), show_target_disp(), show_weapon_disp(), ShowChalkBoard(), ShowMemoryStatusDebug(), ShowTrainSimHighScores(), and UpdateInflightNavText().
| short DrawHudMessageSlot | ( | HudMessageSlot * | slot | ) |
Definition at line 383 of file cockpt.c.
References cBlackColour, HudMessageSlot::colour, TextContext::colour, HudMessageSlot::context, HudMessageSlot::drawColour, DrawHudMessageSlot(), DrawTextAt(), HudMessageSlot::flashCount, MaxShort(), nCameraViewMode, nTickCount60Hz, HudMessageSlot::text, HudMessageSlot::x, and HudMessageSlot::y.
Referenced by ClearHudMessageSlot(), DrawHudMessageSlot(), and UpdateMessage().
| unsigned int DrawPendingCockpitDamage | ( | void | ) |
Definition at line 2586 of file cockpt.c.
References cCockpitLogicalFile, DrawPendingCockpitDamage(), DrawSpriteDefault(), FetchDiskPacketRetrying(), FreePacketAndClear(), Viewport::left, nPendingCockpitDamageValue, pCockpitPilotShape, pCurrentPilotHandShapePtr, stCockpitExplosionPosition, stPilotHandBackdropView, stPilotHandView, stScreenView, Viewport::top, ShortPoint::x, and ShortPoint::y.
Referenced by cockpit_explosion(), and DrawPendingCockpitDamage().
Definition at line 2425 of file cockpt.c.
References asPilotHandOffsets, asPilotHandOrigins, bStickIndicatorFrameState, cCurrentCockpitView, CopyViewportContents(), cRenderedPilotHandFrame, DrawPilotHandFrame(), DrawSpriteDefault(), Viewport::left, pCurrentPilotHandShapePtr, stPilotHandBackdropView, stPilotHandComposite, stPilotHandView, and Viewport::top.
Referenced by animate_pilot(), and DrawPilotHandFrame().
Definition at line 107 of file cockpt.c.
References EmitTextString().
Referenced by EmitTextString(), and FormatTextTokens().
| void EraseCockpitReadoutAtPosition | ( | signed char | slot, |
| short | left, | ||
| short | top ) |
Definition at line 372 of file cockpt.c.
References aCockpitReadouts, cBlackColour, EraseCockpitReadoutAtPosition(), EraseCockpitReadoutRegion(), stScreenView, and CockpitReadout::y.
Referenced by EraseCockpitReadoutAtPosition().
| void EraseCockpitReadoutRegion | ( | Viewport * | viewport, |
| short | left, | ||
| short | top, | ||
| short | right, | ||
| short | bottom, | ||
| short | colour ) |
Definition at line 253 of file cockpt.c.
References Viewport::bottom, ClearViewport(), EraseCockpitReadoutRegion(), Viewport::left, Viewport::right, and Viewport::top.
Referenced by DrawCockpitReadout(), DrawTargetRangeReadout(), EraseCockpitReadoutAtPosition(), and EraseCockpitReadoutRegion().
| short escorting_a_ship | ( | void | ) |
Definition at line 1234 of file cockpt.c.
References aeShipMissionType, escorting_a_ship(), MISSION_TYPE_ESCORT, someone_coming(), and void().
Referenced by escorting_a_ship(), and flag_reached().
Definition at line 2563 of file cockpt.c.
References aaCockpitDamagePositions, anCockpitDamageState, cCockpitLogicalFile, cCurrentCockpitView, DrawSpriteDefault(), explosion_draw(), FetchDiskPacketRetrying(), FreePacketAndClear(), pCockpitPilotShape, and stScreenView.
Referenced by explosion_draw(), initialize_cockpit(), and place_damage_on_cockpit().
| void FatalErrorAndExit | ( | const char * | format, |
| ... ) |
Definition at line 237 of file cockpt.c.
References exit_squadron(), FatalErrorAndExit(), and ShutdownEventManager().
Referenced by FatalErrorAndExit(), ReportOutOfMemoryAndExit(), and ReportPacketLoadError().
Definition at line 911 of file cockpt.c.
References Viewport::bottom, CaptureSpriteBackground(), cReleaseWeaponDisplayFrame, cReleaseWeaponDisplayState, cReleaseWeaponDisplayTicks, DrawSpriteDefault(), eReleaseWpnDisplayType, fire_computer_graphic_missile(), get_mode(), nCameraViewMode, OBJECT_TYPE_SPACE_MINE, pCockpitWeaponShapePtr, pReleaseWeaponDisplayBackground, RestoreSpriteBackground(), stLeftVdu, stReleaseWeaponDisplayPosition, Viewport::top, ShortPoint::x, and ShortPoint::y.
Referenced by fire_computer_graphic_missile(), and update_cockpit().
| void flag_objective | ( | short | objective, |
| unsigned char | flags ) |
Definition at line 1048 of file cockpt.c.
References aMissionObjectivesArray, flag_objective(), and MissionObjective::flags.
Referenced by arrive_from_warp(), check_sighting(), cleanup_objectives(), cruise_home(), flag_objective(), flag_reached(), and RunSpaceFlight().
| void flag_reached | ( | short | objective, |
| short | reached ) |
Definition at line 1249 of file cockpt.c.
References aeObjectTypeList, aMissionObjectivesArray, aMissionShips, anShipMissionShips, aObjectTypeData, cCurrentObjective, CockpitMessage(), cYellowColour, escorting_a_ship(), find_ship_index(), flag_objective(), flag_reached(), OBJECT_TYPE_TIGERS_CLAW, pszObjectiveStatusMessage, send_message(), set_next_destination(), and visited().
Referenced by check_visit(), cruise_to_destination(), and flag_reached().
| void FormatTextBufferFromStart | ( | const char * | format, |
| ... ) |
Definition at line 211 of file cockpt.c.
References AppendTextCharacter(), DIBslam(), FormatTextBufferFromStart(), FormatTextTokens(), pCurTextContext, Viewport::pixels, stScreenView, TextContext::text, TextContext::textCursor, and TextContext::viewport.
Referenced by CloseLook(), DebriefingEstablishingShot(), Dismissed(), DrawFuneralLongShot(), DrawMedalChest(), DrawMedalLongShot(), DrawModalTextPanel(), DrawRoomMenuLabel(), EstablishingShot(), FormatTextBufferFromStart(), funeral_sequence(), funeral_wingman(), landing(), LongTalk(), MedalEstablish(), PinMedal(), PlaySceneAnimation(), PromptInsertNumberedDisk(), ReturnToBriefingLongShot(), SelectTrainSimMission(), ShowCampaignVictorySequence(), ShowChalkBoard(), ShowTigerClawEscapeScene(), ShowTrainSimHighScores(), ShowTrainSimTextMessage(), UpdateArcadeScoreDisplay(), UpdateMap(), and ViewMedals().
Definition at line 116 of file cockpt.c.
References TextContext::alignment, TextContext::backgroundColour, TextContext::colour, TextContext::cursorX, TextContext::cursorY, DrawTextString(), EmitTextString(), FormatTextTokens(), pCurTextContext, and TextContext::text.
Referenced by AppendFormattedText(), DrawFormattedText(), DrawNavTextLine(), FormatTextBufferFromStart(), and FormatTextTokens().
| short get_color | ( | short | object, |
| unsigned short * | colour ) |
Definition at line 1510 of file cockpt.c.
References acShipTargetTable, aeObjectClass, aeObjectTypeList, aeShipSide, cBlueColour, cDarkGreyColour, cOrangeColour, cPrimaryTextColour, cRedColour, cViewportClearColour, cYellowColour, get_color(), OBJECT_CLASS_CAPITAL_SHIP, OBJECT_CLASS_MISSILE, OBJECT_CLASS_SHIP, OBJECT_TYPE_TIGERS_CLAW, SIDE_IMPERIAL, and SIDE_KILRATHI.
Referenced by draw_3d_scanner(), and get_color().
| short get_mode | ( | short | i | ) |
Definition at line 690 of file cockpt.c.
References acVduModeStackDepth, ausVduModeStack, and get_mode().
Referenced by CloseCommChoiceMenu(), damage_your_component(), draw_3d_scanner(), draw_nav_pointer(), EndCommMenu(), EndCommSessionWithWingman(), fire_computer_graphic_missile(), fire_missile(), fire_players_lasers(), get_mode(), HandleSpaceFlightControls(), IsCommChoiceMenuOpen(), remove_weapon(), select_new_gun(), select_new_release_weapon(), SelectCockpitVduMode(), set_mode(), set_new_vdu(), SetVduModeIfChanged(), ShowComponentHitHudMessage(), update_VDUs(), update_vid_disp(), vdu_pop_all(), and vid_equiv().
| short GetRectHeight | ( | const Viewport * | viewport | ) |
Definition at line 1772 of file cockpt.c.
References GetRectHeight(), Viewport::left, and Viewport::right.
Referenced by GetRectHeight(), and print_message_text().
| short GetVduModeStackDepth | ( | short | i | ) |
Definition at line 717 of file cockpt.c.
References acVduModeStackDepth, and GetVduModeStackDepth().
Referenced by GetVduModeStackDepth(), and vdu_pop_all().
| short hidden_objective | ( | short | objective | ) |
Definition at line 1098 of file cockpt.c.
References aMissionObjectivesArray, aMissionShips, cMissionObjectiveCountValue, MissionObjective::displayName, find_ship_index(), hidden_objective(), MISSION_TYPE_WARP_ARRIVE, mobile_objective(), and MissionObjective::name.
Referenced by BuildMap(), DrawNavMapLegend(), hidden_objective(), InflightComputer(), SelectNavObjectiveAtPoint(), and set_new_objective().
| unsigned int InitializeCockpitReadout | ( | signed char | slot, |
| TextContext * | context ) |
Definition at line 341 of file cockpt.c.
References aCockpitReadouts, CockpitReadout::context, TextContext::cursorX, TextContext::cursorY, InitializeCockpitReadout(), CockpitReadout::previousRight, CockpitReadout::x, and CockpitReadout::y.
Referenced by InitializeCockpitReadout(), InitializeCockpitResources(), show_navigation_disp(), and show_target_disp().
| void InvalidateVduMode | ( | short | i | ) |
Definition at line 764 of file cockpt.c.
References anVduModeCache, and InvalidateVduMode().
Referenced by check_objectives(), DrawTargetRangeReadout(), HandleSpaceFlightControls(), initialize_cockpit(), InvalidateVduMode(), RefreshCommunicationMenu(), remove_weapon(), RunTrainSim(), select_new_gun(), select_new_release_weapon(), SelectCockpitVduMode(), set_next_destination(), and UpdateDamageDisplay().
| unsigned short IsCockpitExplosionActive | ( | void | ) |
Definition at line 247 of file cockpt.c.
References IsCockpitExplosionActive(), and nCockpitExplosionFrame.
Referenced by cockpit_explosion(), IsCockpitExplosionActive(), place_damage_on_cockpit(), RestoreCockpitExplosionBackground(), RestoreCockpitExplosionIfVisible(), and RestoreTransientCockpitGraphics().
| short kilrathi_near | ( | short | obj, |
| short | range ) |
Definition at line 501 of file cockpt.c.
References aeObjectClass, aeShipSide, aShipPositionsArray, IsPointWithinRange(), kilrathi_near(), OBJECT_CLASS_SHIP, and SIDE_KILRATHI.
Referenced by auto_pilot_sequence(), auto_pilot_valid(), init_hazard(), and kilrathi_near().
| short LocateMobileObjective | ( | short | objective | ) |
Definition at line 1204 of file cockpt.c.
References aMissionObjectivesArray, locate_ship(), LocateMobileObjective(), and mobile_objective().
Referenced by BriefingMap_LoadShapes(), LocateMobileObjective(), set_objective_range(), set_up_action_sphere(), and update_objective_location().
Definition at line 1662 of file cockpt.c.
References bTargetLockReadoutDirty, lock_off(), nTargetLockCountdown, pszMissileLockedMessage, and remove_message().
Referenced by CheckTargetLockMalfunction(), lock_off(), and target_locking().
| short malf | ( | char | component | ) |
Definition at line 829 of file cockpt.c.
References acPlayerComponentDamageList, malf(), and RandomInRange().
Referenced by accelerate(), check_target(), CheckTargetLockMalfunction(), damage_your_component(), decrement_lock_time(), malf(), SelectCockpitVduMode(), and your_afterburner().
| void malf_noise | ( | short | vdu, |
| int | effect, | ||
| unsigned short | colour, | ||
| short | sound, | ||
| short | refresh ) |
Definition at line 2231 of file cockpt.c.
References malf_noise(), PlaySfxWaveFileByNumber(), PlaySnowStaticSound(), set_new_vdu(), snow_viewport(), stLeftVdu, and stRightVduViewport.
Referenced by EndCommSessionWithWingman(), malf_noise(), real_vid_transmit(), set_new_vdu(), update_dead_disp(), and vdu_malf().
Definition at line 823 of file cockpt.c.
References malf_sound(), and PlaySfxWaveFileByNumber().
Referenced by check_target(), HandleSpaceFlightControls(), and malf_sound().
| short message_showing | ( | void | ) |
Definition at line 776 of file cockpt.c.
References message_showing(), and nCurrentNoticeTimer.
Referenced by check_message(), GetScreenUpdateFlag(), HandleCommunicationMenuRequest(), HandleSpaceFlightControls(), imperial_formation(), InflightComputer(), initialize_cockpit(), message_showing(), npc_communication(), overlay_head_up_display(), SetHudMessageText(), and vid_equiv().
| short mobile_objective | ( | short | objective | ) |
Definition at line 1433 of file cockpt.c.
References aMissionObjectivesArray, and mobile_objective().
Referenced by BuildMap(), hidden_objective(), LocateMobileObjective(), mobile_objective(), SetScale(), and update_objective_location().
Definition at line 2520 of file cockpt.c.
References acShipRating, acWingmanMessageStatesArray, aeObjectClass, aeShipObjectiveList, aeShipSide, message_showing(), nCannedSceneMode, nCommSpeakerObject, npc_communication(), nTrainSimActive, OBJECT_CLASS_SHIP, OBJECTIVE_DESTROY_SHIP, OBJECTIVE_ENGAGE_ENEMY, RandomBelowOrEqual(), SIDE_KILRATHI, and vid_equiv().
Referenced by npc_communication(), and update_cockpit().
| unsigned int objective_lost | ( | short | objective | ) |
Definition at line 1360 of file cockpt.c.
References aMissionObjectivesArray, aMissionShips, MissionObjective::index, objective_lost(), and MissionShipRecord::state.
Referenced by check_objectives(), and objective_lost().
| const char * objective_name | ( | short | objective | ) |
Definition at line 1070 of file cockpt.c.
References aMissionObjectivesArray, cMissionObjectiveCountValue, MissionObjective::displayName, objective_name(), and sighted().
Referenced by BuildMap(), objective_name(), and show_navigation_disp().
| unsigned int overlay_head_up_display | ( | void | ) |
Definition at line 2080 of file cockpt.c.
References abMouseCursorBackground, acShipTargetTable, bCockpitlessView, bMouseCursorVisible, bTargetBracketVisible, CaptureSpriteBackground(), cCurrentCockpitView, cLastTargetObject, cRedColour, cYellowColour, DAT_0046c05c, draw_target_box(), DrawSpriteDefault(), MouseCursorState::frame, message_showing(), nCommSpeakerObject, nCurrentViewCenterPosX, nCurrentViewCenterPosY, nPendingHudMessageColour, nRenderedSpaceFrame, nSavedMouseCursorY, nStoredMouseCursorPosX, nTargetLockCountdown, nTargetLockMode, overlay_head_up_display(), pszPendingHudMessage, pTgtLockShapePtr, MouseCursorState::shape, ShowHudTextLine(), stMouseCursorState, stPreviousTargetBracketBounds, stSpaceBufferViewport, stTargetBracketBounds, target_locking(), MouseCursorState::viewport, MouseCursorState::x, and MouseCursorState::y.
Referenced by Draw_3Space_Frame(), and overlay_head_up_display().
| void place_damage_on_cockpit | ( | short | damage | ) |
Definition at line 2660 of file cockpt.c.
References aaCockpitDamagePositions, anCockpitDamageState, cCurrentCockpitView, explosion_draw(), IsCockpitExplosionActive(), nCameraViewMode, nCockpitExplosionFrame, nPendingCockpitDamageValue, nTrainSimActive, pCockpitExplosionShape, place_damage_on_cockpit(), and stCockpitExplosionPosition.
Referenced by place_damage_on_cockpit(), and your_internal_damage().
| void PlayCockpitSelectionSfx | ( | short | selectionSound | ) |
Definition at line 2924 of file cockpt.c.
References PlayCockpitSelectionSfx(), PlaySfxWaveFileByNumber(), and void().
Referenced by PlayCockpitSelectionSfx(), and SelectCockpitVduMode().
Definition at line 817 of file cockpt.c.
References PlaySfxWaveFileByNumber(), and PlayTargetLockSfx().
Referenced by PlayTargetLockSfx().
| void pop_mode | ( | short | i | ) |
Definition at line 732 of file cockpt.c.
References aCockpitHudMessageSlotsTable, acVduModeStackDepth, ClearHudMessageSlot(), and pop_mode().
Referenced by CloseCommChoiceMenu(), EndCommSessionWithWingman(), pop_mode(), and vdu_pop_all().
| void print_message_text | ( | char * | text, |
| unsigned short | colour ) |
Definition at line 1778 of file cockpt.c.
References asHudMessageOrigins, TextContext::backgroundColour, bCockpitlessView, cCurrentCockpitView, TextContext::colour, DosStrcpy(), DrawTextAt(), GetRectHeight(), print_message_text(), pszDisplayedHudMessage, pszPendingHudMessage, SetRectBounds(), stHudMessageTextContext, and TextContext::viewport.
Referenced by print_message_text(), SetHudTextColour(), and ShowHudTextLine().
| void push_mode | ( | short | i, |
| int | state ) |
Definition at line 723 of file cockpt.c.
References aCockpitHudMessageSlotsTable, acVduModeStackDepth, ausVduModeStack, ClearHudMessageSlot(), and push_mode().
Referenced by OpenCommRecipientMenu(), push_mode(), and real_vid_transmit().
| void rectangular_to_spherical | ( | const FixedVector * | rectangular, |
| SphericalVector * | spherical ) |
| void remove_message | ( | const char * | text | ) |
Definition at line 495 of file cockpt.c.
References aCockpitHudMessageSlotsTable, ClearHudMessageIfMatching(), and remove_message().
Referenced by lock_off(), and remove_message().
Definition at line 2008 of file cockpt.c.
References nNavPointerObject, remove_nav_pointer(), and remove_object().
Referenced by draw_nav_pointer(), and remove_nav_pointer().
| void RemovePlayerReleaseWeapon | ( | signed char | weapon | ) |
Definition at line 885 of file cockpt.c.
References aShipWeaponsTable, aWeaponDisplayPositions, cReleaseWeaponDisplayFrame, cReleaseWeaponDisplayState, cReleaseWeaponDisplayTicks, eReleaseWpnDisplayType, nSelectedReleaseWeaponIndex, pReleaseWeaponDisplayBackground, remove_weapon(), RemovePlayerReleaseWeapon(), select_new_release_weapon(), stReleaseWeaponDisplayPosition, stWpnDispOrigin, ShortPoint::x, and ShortPoint::y.
Referenced by drop_mine(), fire_weapon(), and RemovePlayerReleaseWeapon().
Definition at line 540 of file cockpt.c.
References abCockpitIndicatorStatesArray, abCockpitLightGoalArray, and reset_cockpit().
Referenced by initialize_cockpit(), InitializeCockpitResources(), and reset_cockpit().
Definition at line 2479 of file cockpt.c.
References animate_pilot(), CopyViewportContents(), cRenderedPilotHandFrame, pCurrentPilotHandShapePtr, ResetPilotHandAnimation(), stPilotHandBackdropView, and stPilotHandView.
Referenced by initialize_cockpit(), and ResetPilotHandAnimation().
Definition at line 1443 of file cockpt.c.
References asScannerObjectPositionX, nScannerTargetObject, and ResetScannerContacts().
Referenced by InitializeCockpitResources(), and ResetScannerContacts().
Definition at line 2611 of file cockpt.c.
References IsCockpitExplosionActive(), nCockpitExplosionFrame, pCockpitExplosionBackground, pCockpitExplosionShape, RestoreCockpitExplosionBackground(), RestoreSpriteBackground(), stCockpitExplosionPosition, stScreenView, ShortPoint::x, and ShortPoint::y.
Referenced by RestoreCockpitExplosionBackground(), RestoreCockpitExplosionIfVisible(), and update_cockpit().
Definition at line 2161 of file cockpt.c.
References IsCockpitExplosionActive(), pCockpitExplosionBackground, RestoreCockpitExplosionBackground(), and RestoreCockpitExplosionIfVisible().
Referenced by RenderSpaceViewFrame(), and RestoreCockpitExplosionIfVisible().
| unsigned int RestoreTransientCockpitGraphics | ( | void | ) |
Definition at line 2170 of file cockpt.c.
References abMouseCursorBackground, acShipTargetTable, bCockpitlessView, bMouseCursorVisible, CaptureSpriteBackground(), cLastTargetObject, cPrimaryViewBufferColour, cRenderedPilotHandFrame, draw_target_box(), DrawSpriteDefault(), MouseCursorState::frame, IsCockpitExplosionActive(), nCockpitExplosionFrame, nSavedMouseCursorY, nStoredMouseCursorPosX, nTargetLockMode, pCockpitExplosionBackground, pCockpitExplosionShape, pszDisplayedHudMessage, pszPendingHudMessage, RestoreSpriteBackground(), RestoreTransientCockpitGraphics(), SetHudTextColour(), MouseCursorState::shape, stCockpitExplosionPosition, stMouseCursorState, stPreviousTargetBracketBounds, stScreenView, stTargetBracketBounds, MouseCursorState::viewport, ShortPoint::x, and ShortPoint::y.
Referenced by RenderSpaceViewFrame(), and RestoreTransientCockpitGraphics().
| void rotational_pos_to_scanner_pos | ( | signed char | object, |
| const SphericalVector * | position ) |
Definition at line 1392 of file cockpt.c.
References asScannerObjectPositionX, asScannerObjectY, cCurrentCockpitView, CockpitScannerGeometry::centerX, CockpitScannerGeometry::centerY, CockpitScannerGeometry::maximumX, CockpitScannerGeometry::maximumY, MaxShort(), CockpitScannerGeometry::minimumX, CockpitScannerGeometry::minimumY, MinShort(), nScannerCursorX, nScannerCursorY, SphericalVector::pitch, rotational_pos_to_scanner_pos(), CockpitLayout::scanner, stCockpitLayout, and SphericalVector::yaw.
Referenced by draw_3d_scanner(), rotational_pos_to_scanner_pos(), and set_objective_range().
| void SelectCockpitVduMode | ( | short | vdu, |
| int | mode ) |
Definition at line 2945 of file cockpt.c.
References asVduSelectionSound, bCurrentKey, cycle_onscreen_targets(), get_mode(), InflightComputer(), InvalidateVduMode(), malf(), nCameraViewMode, nCurrentDmgDispTicks, PlayCockpitSelectionSfx(), select_new_gun(), select_new_release_weapon(), SelectCockpitVduMode(), set_mode(), show_communications_disp(), talk_equiv(), update_VDUs(), vdu_malf(), and vdu_pop_all().
Referenced by fire_players_lasers(), HandleSpaceFlightControls(), and SelectCockpitVduMode().
| void send_message | ( | short | obj, |
| short | message ) |
Definition at line 2489 of file cockpt.c.
References acShipRating, acWingmanMessageStatesArray, aeObjectClass, aeObjectTypeList, aeShipSide, anShipMissionShips, bRadioSilence, nCannedSceneMode, nShipMissionIndices, nTrainSimActive, nYourWingman, OBJECT_CLASS_NULL, OBJECT_CLASS_SHIP, OBJECT_TYPE_TIGERS_CLAW, send_message(), and SIDE_KILRATHI.
Referenced by ace_greeting(), analyze_kill(), explode(), Explosion(), flag_reached(), house_keep_objects(), imperial_formation(), inflict_damage(), intelligence_events(), internal_damage(), reply(), request(), send_appropriate_message(), send_message(), and try2rout().
| void set_global_message | ( | const char * | text, |
| unsigned short | colour, | ||
| int | flashCount ) |
Definition at line 470 of file cockpt.c.
References aCockpitHudMessageSlotsTable, Viewport::bottom, Viewport::left, set_global_message(), SetHudMessageSlot(), stRightVduTxtContext, and stRightVduViewport.
Referenced by auto_pilot_valid(), CockpitMessage(), and set_global_message().
| unsigned short set_message_time | ( | unsigned short | v | ) |
Definition at line 782 of file cockpt.c.
References nCurrentNoticeTimer, and set_message_time().
Referenced by set_message_time(), and SetHudMessageText().
| void set_mode | ( | short | i, |
| int | state ) |
Definition at line 697 of file cockpt.c.
References aCockpitHudMessageSlotsTable, acVduModeStackDepth, ausVduModeStack, ClearHudMessageSlot(), get_mode(), and set_mode().
Referenced by init_vdus(), SelectCockpitVduMode(), set_mode(), SetVduModeIfChanged(), and vdu_malf().
| int set_new_objective | ( | short | pathIndex | ) |
Definition at line 1131 of file cockpt.c.
References abFlightPathList, aeShipObjectiveList, aMissionObjectivesArray, cCurrentNavPtIdx, cCurrentObjective, cMissionObjectiveCountValue, hidden_objective(), set_new_objective(), set_objective_range(), and MissionObjective::type.
Referenced by Build_objective_list(), cycle_next_objective(), InflightComputer(), SelectNavObjectiveAtPoint(), set_new_objective(), and set_next_destination().
| void set_new_vdu | ( | short | vdu | ) |
Definition at line 739 of file cockpt.c.
References anVduModeCache, cBlackColour, cDarkGreenColour, ClearViewport(), get_mode(), malf_noise(), set_new_vdu(), stLeftVdu, and stRightVduViewport.
Referenced by DrawTargetRangeReadout(), malf_noise(), set_new_vdu(), show_communications_disp(), show_damage_disp(), show_info_disp(), show_weapon_disp(), update_vid_disp(), and vid_transmit().
Definition at line 1179 of file cockpt.c.
References abFlightPathList, cCurrentNavPtIdx, cMissionObjectiveCountValue, cycle_next_objective(), InvalidateVduMode(), set_new_objective(), set_next_destination(), and visited().
Referenced by arrive_from_warp(), flag_reached(), and set_next_destination().
| unsigned int set_objective_range | ( | short | showOnScanner | ) |
Definition at line 1490 of file cockpt.c.
References aMissionObjectivesArray, aShipPositionsArray, cCurrentObjective, ComputeVectorDelta(), LocateMobileObjective(), nCurObjectiveRangeValue, SphericalVector::radius, rectangular_to_spherical(), rotational_pos_to_scanner_pos(), set_objective_range(), and transform_to_objects_frame().
Referenced by draw_3d_scanner(), set_new_objective(), and set_objective_range().
| unsigned int SetCockpitLightBlink | ( | signed char | light, |
| short | interval ) |
Definition at line 550 of file cockpt.c.
References abCockpitLightGoalArray, nCurrentSpaceFrameValue, and SetCockpitLightBlink().
Referenced by SetCockpitLightBlink(), update_bars(), update_lights(), and update_missile_warning().
| void SetHudMessageSlot | ( | HudMessageSlot * | slot, |
| TextContext * | context, | ||
| short | x, | ||
| short | y, | ||
| const char * | text, | ||
| unsigned short | colour, | ||
| signed char | flashCount ) |
Definition at line 442 of file cockpt.c.
References ClearHudMessageSlot(), HudMessageSlot::colour, HudMessageSlot::context, HudMessageSlot::drawColour, HudMessageSlot::flashCount, SetHudMessageSlot(), HudMessageSlot::text, HudMessageSlot::x, and HudMessageSlot::y.
Referenced by set_global_message(), SetHudMessageSlot(), and ShowComponentHitHudMessage().
| void SetHudMessageText | ( | char * | text, |
| unsigned short | colour, | ||
| unsigned short | duration ) |
Definition at line 2218 of file cockpt.c.
References bInflightComputerActive, message_showing(), nPendingHudMessageColour, pszPendingHudMessage, set_message_time(), SetHudMessageText(), and SetHudTextColour().
Referenced by HandleSpaceFlightControls(), ReportSpaceFlightMaxFps(), SetHudMessageText(), ShowCentredPrompt(), and ShowOnScreenMessage().
| void SetHudTextColour | ( | short | v | ) |
Definition at line 1882 of file cockpt.c.
References cPrimaryViewBufferColour, EndCommMenu(), print_message_text(), pszDisplayedHudMessage, and SetHudTextColour().
Referenced by RestoreTransientCockpitGraphics(), SetHudMessageText(), SetHudTextColour(), and ShowOnScreenMessage().
| void SetRectBounds | ( | Viewport * | viewport, |
| unsigned short | a, | ||
| unsigned short | b, | ||
| unsigned short | c, | ||
| unsigned short | d ) |
Definition at line 1762 of file cockpt.c.
References Viewport::bottom, Viewport::left, Viewport::right, SetRectBounds(), and Viewport::top.
Referenced by InflightComputer(), print_message_text(), SetRectBounds(), SetScreenClipRect(), and ShowConfedNavScan().
| unsigned short SetVduModeIfChanged | ( | short | i, |
| int | state ) |
Definition at line 706 of file cockpt.c.
References get_mode(), set_mode(), and SetVduModeIfChanged().
Referenced by SetVduModeIfChanged().
Definition at line 1081 of file cockpt.c.
References cCurrentObjective, DrawCalculatingLabel(), DrawFormattedText(), DrawTextAt(), InitializeCockpitReadout(), Viewport::left, objective_name(), show_navigation_disp(), stRightVduTxtContext, stRightVduViewport, and Viewport::top.
Referenced by show_navigation_disp(), and update_VDUs().
Definition at line 954 of file cockpt.c.
References aObjectTypeData, aShipWeaponsTable, aWeaponDisplayOrigins, aWeaponDisplayPositions, cCurrentCockpitView, cPrimaryTextColour, ShipWeaponSlot::disabled, ObjectTypeData::displayName, DrawFormattedText(), DrawSpriteDefault(), DrawTextAt(), DrawViewportLine(), eSelectedGunType, ShipWeaponSlot::hardpoint, Viewport::left, nSelectedReleaseWeaponIndex, pCockpitWeaponShapePtr, Viewport::right, set_new_vdu(), show_weapon_disp(), stLeftVdu, stLeftVduTextContext, stWpnDispOrigin, szNoWeaponName, Viewport::top, ShipWeaponSlot::type, ShortPoint::x, and ShortPoint::y.
Referenced by show_weapon_disp(), and update_VDUs().
| void ShowComponentHitHudMessage | ( | const char * | text, |
| unsigned short | colour, | ||
| short | flashCount ) |
Definition at line 847 of file cockpt.c.
References aCockpitHudMessageSlotsTable, Viewport::bottom, ClearHudMessageSlot(), DosStrcpy(), get_mode(), Viewport::left, nTrainSimActive, SetHudMessageSlot(), ShowComponentHitHudMessage(), stLeftVdu, stLeftVduTextContext, and szComponentHitMessage.
Referenced by damage_your_component(), fire_missile(), ReportComponentRepaired(), show_damage_disp(), ShowComponentHitHudMessage(), and your_internal_damage().
| void ShowHudTextLine | ( | char * | s, |
| unsigned short | b ) |
Definition at line 1875 of file cockpt.c.
References print_message_text(), pszPendingHudMessage, and ShowHudTextLine().
Referenced by overlay_head_up_display(), ShowHudTextLine(), and ShowOnScreenMessage().
| short sighted | ( | short | objective | ) |
Definition at line 1030 of file cockpt.c.
References aMissionObjectivesArray, and sighted().
Referenced by check_sighting(), cleanup_objectives(), objective_name(), ParseTests(), show_info_disp(), sighted(), and update_objective_location().
| unsigned int someone_coming | ( | void | ) |
Definition at line 1217 of file cockpt.c.
References abShipNavPtIdx, aeObjectClass, aeShipMissionType, cCurrentNavPtIdx, MISSION_TYPE_COME_HOME, OBJECT_CLASS_SHIP, and someone_coming().
Referenced by escorting_a_ship(), and someone_coming().
| void start_lock | ( | unsigned short | v | ) |
Definition at line 1643 of file cockpt.c.
References bTargetLockReadoutDirty, nTargetLockCountdown, nTargetLockMarkerAngle, RandomBelowOrEqual(), and start_lock().
Referenced by start_lock(), and starting_lock().
| unsigned short starting_lock | ( | unsigned short | v | ) |
Definition at line 1652 of file cockpt.c.
References nTargetLockCountdown, start_lock(), and starting_lock().
Referenced by starting_lock(), and target_locking().
| void target_locking | ( | signed char | target | ) |
Definition at line 1710 of file cockpt.c.
References acPlayerComponentDamageList, aeShipSide, aShipWeaponsTable, asObjectScreenXList, asObjectScreenYArray, decrement_lock_time(), get_facing_range_from_object(), lock_off(), nSelectedReleaseWeaponIndex, nTargetFacingValue, nTargetLockCountdown, OBJECT_TYPE_HEAT_SEEKING_MISSILE, OBJECT_TYPE_IMAGE_RECOGNITION_MISSILE, starting_lock(), and target_locking().
Referenced by overlay_head_up_display(), and target_locking().
| void transform_to_objects_frame | ( | const FixedVector * | source, |
| FixedVector * | destination, | ||
| short | obj ) |
Definition at line 654 of file cockpt.c.
References aasShipArmor, aasShipShield, aeObjectTypeList, aObjectTypeData, ObjectTypeData::armorFront, ObjectTypeData::armorLeft, ObjectTypeData::armorRear, ObjectTypeData::armorRight, DrawCockpitReadout(), SetCockpitLightBlink(), ObjectTypeData::shieldAft, ObjectTypeData::shieldFore, szTxtWorkspaceBuffer, update_bars(), and vdu_polygon().
Referenced by update_bars(), and update_cockpit().
Definition at line 2895 of file cockpt.c.
References animate_pilot(), bCockpitlessView, check_stranded(), check_target(), cMissionObjectiveCountValue, cockpit_explosion(), draw_3d_scanner(), draw_cockpit_lights(), fire_computer_graphic_missile(), nCameraViewMode, nCurrentSpaceFrameValue, npc_communication(), repair_internal_damage(), RestoreCockpitExplosionBackground(), update_bars(), update_cockpit(), update_digital_readouts(), update_lights(), update_missile_warning(), update_objective_location(), and update_VDUs().
Referenced by LaunchPlayerShip(), RunSpaceFlight(), and update_cockpit().
| void update_dead_disp | ( | short | a | ) |
Definition at line 2751 of file cockpt.c.
References cDarkGreenColour, malf_noise(), and update_dead_disp().
Referenced by update_dead_disp(), and update_VDUs().
| unsigned int update_digital_readouts | ( | void | ) |
Definition at line 798 of file cockpt.c.
References anShipSpeed, aShipVelocity, DrawCockpitReadout(), MultiplyFixed(), SetTextContext(), stCurrentCockpitReadoutTextCtx, szTxtWorkspaceBuffer, update_digital_readouts(), and Vector_magnitude().
Referenced by update_cockpit(), and update_digital_readouts().
Definition at line 624 of file cockpt.c.
References aasShipShield, abCockpitLightGoalArray, aeObjectTypeList, anShipFuelsTable, aObjectTypeData, asShipWpnEnergyList, calculate_damage_level(), FlushSoundEffectsAndLog(), nCurrentDamageAlarmSfxHandle, nCurrentSpaceFrameValue, nTrainSimActive, PlaySfxWaveFileByNumber(), SetCockpitLightBlink(), update_lights(), and vdu_polygon().
Referenced by update_cockpit(), and update_lights().
Definition at line 2382 of file cockpt.c.
References abCockpitLightGoalArray, missile_on_tail(), nTrainSimActive, SetCockpitLightBlink(), spacetrack(), and update_missile_warning().
Referenced by update_cockpit(), and update_missile_warning().
| void update_objective_location | ( | short | objective | ) |
Definition at line 1334 of file cockpt.c.
References aMissionNavPoints, aMissionObjectivesArray, aShipPositionsArray, cCurrentObjective, check_sighting(), check_visit(), ComputeVectorDelta(), FixedToShortSaturating(), LocateMobileObjective(), mobile_objective(), sighted(), update_objective_location(), Vector_magnitude(), and visited().
Referenced by check_objectives(), update_cockpit(), and update_objective_location().
Definition at line 1025 of file cockpt.c.
References update_status_text().
Referenced by update_status_text(), and update_VDUs().
Definition at line 2767 of file cockpt.c.
References aCockpitHudMessageSlotsTable, bCockpitlessView, bForceDamageDisplayRedraw, ShortRect::bottom, cCurrentCockpitView, check_objectives(), CopyTrainSimPilotViewToRightVdu(), DrawFilledViewportRect(), DrawTargetRangeReadout(), get_mode(), ShortRect::left, CockpitLayout::leftVduBounds, nTrainSimActive, pCurrentPilotHandShapePtr, ShortRect::right, CockpitLayout::rightVduBounds, SetTextContext(), show_communications_disp(), show_damage_disp(), show_info_disp(), show_navigation_disp(), show_target_disp(), show_weapon_disp(), stCockpitLayout, stLeftVduTextContext, stRightVduTxtContext, stScreenView, talk_equiv(), HudMessageSlot::text, ShortRect::top, update_dead_disp(), update_status_text(), update_VDUs(), update_vid_disp(), UpdateDamageDisplay(), UpdateMessage(), and vid_transmit().
Referenced by initialize_cockpit(), SelectCockpitVduMode(), update_cockpit(), and update_VDUs().
| short update_vid_disp | ( | short | vdu | ) |
Definition at line 753 of file cockpt.c.
References anVduModeCache, get_mode(), set_new_vdu(), and update_vid_disp().
Referenced by update_VDUs(), and update_vid_disp().
| void UpdateMessage | ( | HudMessageSlot * | slot | ) |
Definition at line 458 of file cockpt.c.
References ClearHudMessageSlot(), DrawHudMessageSlot(), HudMessageSlot::flashCount, HudMessageSlot::text, and UpdateMessage().
Referenced by update_VDUs(), and UpdateMessage().
| unsigned short vdu_malf | ( | short | vdu, |
| short | sound ) |
Definition at line 837 of file cockpt.c.
References cDarkGreenColour, malf_noise(), nCameraViewMode, set_mode(), and vdu_malf().
Referenced by damage_your_component(), SelectCockpitVduMode(), and vdu_malf().
| void vdu_polygon | ( | signed char | bar, |
| short | percent ) |
Definition at line 270 of file cockpt.c.
References aaCockpitBars, CockpitBarDefinition::bottom, Viewport::bottom, cCurrentCockpitView, CockpitBarDefinition::direction, DrawSpriteDefault(), CockpitBarDefinition::left, Viewport::left, CockpitBarDefinition::length, pCockpitDamageShape, CockpitBarDefinition::right, Viewport::right, stCockpitBar, CockpitBarDefinition::top, Viewport::top, and vdu_polygon().
Referenced by update_bars(), update_lights(), and vdu_polygon().
| void vdu_pop_all | ( | short | vdu | ) |
Definition at line 2931 of file cockpt.c.
References EndCommMenu(), get_mode(), GetVduModeStackDepth(), pop_mode(), and vdu_pop_all().
Referenced by SelectCockpitVduMode(), and vdu_pop_all().
| void vid_equiv | ( | short | obj, |
| short | message ) |
Definition at line 2741 of file cockpt.c.
References get_mode(), message_showing(), nCameraViewMode, nCannedSceneMode, nTrainSimActive, real_vid_transmit(), and vid_equiv().
Referenced by npc_communication(), and vid_equiv().
Definition at line 2684 of file cockpt.c.
References aapszPilotSpeeches, aeShipSide, aeSpecialManeuvers, apCommunicationPortraitShapesTable, asObjectCounterArray, bCockpitlessView, bVideoImagesSuppressed, DrawSpriteDefault(), EndCommSessionWithWingman(), Viewport::left, nCommPortraitFrame, nCommPortraitIndex, nCommSpeakerObject, nRenderedSpaceFrame, pCommStaticShape, pConfedCommBackground, pKilrathiCommBackground, RandomInRange(), set_new_vdu(), SIDE_IMPERIAL, SIDE_NEUTRAL, SPECIAL_MANEUVER_UNKNOWN_9, stRightVduViewport, Viewport::top, and vid_transmit().
Referenced by update_VDUs(), and vid_transmit().
| short visited | ( | short | objective | ) |
Definition at line 1036 of file cockpt.c.
References aMissionObjectivesArray, and visited().
Referenced by BuildMap(), can_land(), cleanup_objectives(), DrawNavMapLegend(), flag_reached(), set_next_destination(), show_info_disp(), triumph(), update_objective_location(), and visited().
|
static |
Definition at line 74 of file cockpt.c.
Referenced by explosion_draw(), and place_damage_on_cockpit().
| unsigned char abCockpitIndicatorStatesArray[7] |
Definition at line 105 of file cockpt.c.
Referenced by draw_cockpit_lights(), and reset_cockpit().
|
static |
Definition at line 88 of file cockpt.c.
Referenced by overlay_head_up_display(), and RestoreTransientCockpitGraphics().
| HudMessageSlot aCockpitHudMessageSlotsTable[2] |
Definition at line 95 of file cockpt.c.
Referenced by ClearGlobalMessage(), ClearHudGunReadouts(), CockpitMessage(), pop_mode(), push_mode(), remove_message(), set_global_message(), set_mode(), ShowComponentHitHudMessage(), and update_VDUs().
| CockpitReadout aCockpitReadouts[6] |
Definition at line 102 of file cockpt.c.
Referenced by DrawCockpitReadout(), EraseCockpitReadoutAtPosition(), and InitializeCockpitReadout().
|
static |
Definition at line 39 of file cockpt.c.
Referenced by draw_3d_scanner().
|
static |
Definition at line 65 of file cockpt.c.
Referenced by print_message_text().
|
static |
Definition at line 20 of file cockpt.c.
Referenced by DrawPilotHandFrame().
|
static |
Definition at line 13 of file cockpt.c.
Referenced by SelectCockpitVduMode().
|
static |
Definition at line 85 of file cockpt.c.
Referenced by update_VDUs().
| signed char bStickIndicatorFrameState |
Definition at line 92 of file cockpt.c.
Referenced by animate_pilot(), determine_pilot_hand(), and DrawPilotHandFrame().
|
static |
Definition at line 63 of file cockpt.c.
Referenced by overlay_head_up_display().
| signed char cLastTargetObject |
Definition at line 96 of file cockpt.c.
Referenced by overlay_head_up_display(), and RestoreTransientCockpitGraphics().
|
static |
Definition at line 30 of file cockpt.c.
Referenced by fire_computer_graphic_missile(), and RemovePlayerReleaseWeapon().
|
static |
Definition at line 32 of file cockpt.c.
Referenced by fire_computer_graphic_missile(), and RemovePlayerReleaseWeapon().
|
static |
Definition at line 31 of file cockpt.c.
Referenced by fire_computer_graphic_missile(), and RemovePlayerReleaseWeapon().
|
static |
Definition at line 16 of file cockpt.c.
Referenced by animate_pilot(), cockpit_explosion(), DrawPilotHandFrame(), ResetPilotHandAnimation(), and RestoreTransientCockpitGraphics().
| enum ObjectType eReleaseWpnDisplayType |
Definition at line 90 of file cockpt.c.
Referenced by fire_computer_graphic_missile(), and RemovePlayerReleaseWeapon().
| short nCarrierMissionShipIndexValue |
Definition at line 101 of file cockpt.c.
Referenced by check_stranded(), new_view(), and prepare_mission().
| short nCockpitExplosionFrame = 8 |
Definition at line 28 of file cockpt.c.
Referenced by cockpit_explosion(), InitializeCockpitResources(), IsCockpitExplosionActive(), place_damage_on_cockpit(), RestoreCockpitExplosionBackground(), and RestoreTransientCockpitGraphics().
|
static |
Definition at line 84 of file cockpt.c.
Referenced by vid_transmit().
| short nCurrentNoticeTimer |
Definition at line 93 of file cockpt.c.
Referenced by check_message(), clear_message_time(), message_showing(), and set_message_time().
|
static |
Definition at line 34 of file cockpt.c.
Referenced by check_objectives(), and DrawCalculatingLabel().
| short nNavPointerObject = -1 |
Definition at line 71 of file cockpt.c.
Referenced by draw_nav_pointer(), draw_sorted_objects_to_buffer(), intro_drawbackgroundships(), remove_nav_pointer(), remove_object(), and transform_objects_to_your_view().
| short nPendingCockpitDamageValue |
Definition at line 94 of file cockpt.c.
Referenced by DrawPendingCockpitDamage(), and place_damage_on_cockpit().
| int nSavedMouseCursorY |
Definition at line 97 of file cockpt.c.
Referenced by overlay_head_up_display(), and RestoreTransientCockpitGraphics().
| short nScannerCursorX |
Definition at line 103 of file cockpt.c.
Referenced by draw_3d_scanner(), and rotational_pos_to_scanner_pos().
| short nScannerCursorY |
Definition at line 104 of file cockpt.c.
Referenced by draw_3d_scanner(), and rotational_pos_to_scanner_pos().
|
static |
Definition at line 37 of file cockpt.c.
Referenced by clear_head_up_display(), draw_3d_scanner(), and ResetScannerContacts().
| int nStoredMouseCursorPosX |
Definition at line 98 of file cockpt.c.
Referenced by overlay_head_up_display(), and RestoreTransientCockpitGraphics().
|
static |
Definition at line 68 of file cockpt.c.
Referenced by draw_target_box().
| short nTargetLockMarkerY |
Definition at line 100 of file cockpt.c.
Referenced by draw_target_box().
| unsigned char* pCockpitExplosionBackground = 0 |
Definition at line 26 of file cockpt.c.
Referenced by cockpit_explosion(), free_cockpit(), InitializeCockpitResources(), RestoreCockpitExplosionBackground(), RestoreCockpitExplosionIfVisible(), and RestoreTransientCockpitGraphics().
| struct Shape* pCockpitExplosionShape = 0 |
Definition at line 27 of file cockpt.c.
Referenced by cockpit_explosion(), InitializeCockpitResources(), place_damage_on_cockpit(), RestoreCockpitExplosionBackground(), and RestoreTransientCockpitGraphics().
| struct Shape* pCockpitPilotShape = 0 |
Definition at line 25 of file cockpt.c.
Referenced by DrawPendingCockpitDamage(), explosion_draw(), and free_cockpit().
| struct Shape* pCommStaticShape = 0 |
Definition at line 82 of file cockpt.c.
Referenced by FreeCommDisplayResources(), LoadCommDisplayResources(), and vid_transmit().
| struct Shape* pConfedCommBackground = 0 |
Definition at line 81 of file cockpt.c.
Referenced by FreeCommDisplayResources(), LoadCommDisplayResources(), real_vid_transmit(), and vid_transmit().
| struct Shape* pKilrathiCommBackground = 0 |
Definition at line 83 of file cockpt.c.
Referenced by FreeCommDisplayResources(), LoadCommDisplayResources(), real_vid_transmit(), and vid_transmit().
| unsigned char* pRadarMarkerBackground |
Definition at line 91 of file cockpt.c.
Referenced by clear_head_up_display(), draw_3d_scanner(), free_cockpit(), and InitializeCockpitResources().
| unsigned char* pReleaseWeaponDisplayBackground = 0 |
Definition at line 29 of file cockpt.c.
Referenced by fire_computer_graphic_missile(), free_cockpit(), InitializeCockpitResources(), and RemovePlayerReleaseWeapon().
|
static |
Definition at line 15 of file cockpt.c.
Referenced by print_message_text(), RestoreTransientCockpitGraphics(), and SetHudTextColour().
|
static |
Definition at line 62 of file cockpt.c.
Referenced by decrement_lock_time(), and lock_off().
|
static |
Definition at line 36 of file cockpt.c.
Referenced by flag_reached().
| char* pszPendingHudMessage = 0 |
Definition at line 14 of file cockpt.c.
Referenced by EndCommMenu(), overlay_head_up_display(), print_message_text(), RestoreTransientCockpitGraphics(), SetHudMessageText(), and ShowHudTextLine().
|
static |
Definition at line 70 of file cockpt.c.
Referenced by overlay_head_up_display(), and RestoreTransientCockpitGraphics().
|
static |
Definition at line 69 of file cockpt.c.
Referenced by overlay_head_up_display(), and RestoreTransientCockpitGraphics().
|
static |
Definition at line 72 of file cockpt.c.
Referenced by CopyTrainSimPilotViewToRightVdu().
| char szComponentHitMessage[40] |
Definition at line 99 of file cockpt.c.
Referenced by PromptForAnswerText(), and ShowComponentHitHudMessage().
|
static |
Definition at line 33 of file cockpt.c.
Referenced by show_weapon_disp().