|
Wing Commander II
Reconstructed Win32 source (1996)
|
Communications menu and transmissions. More...
#include "game.h"Go to the source code of this file.
Macros | |
| #define | COMM_C |
Variables | |
| short | g_nEnemyTauntCommandBase = 20 |
| short | g_nCommMenuChoiceCount = -1 |
| short | g_nCommMenuReuseMode = 0 |
| signed char | g_cMessageSpeed = 2 |
| signed char | g_cPendingCommMenuAction = 1 |
| signed char | g_bRadioSilence = 0 |
| signed char | g_bVideoImagesSuppressed = 0 |
| unsigned char * | g_pCommPortraitResource = 0 |
| unsigned char * | g_pCommVduFrameResource = 0 |
| signed char | g_cCommMenuRecipient = -1 |
| short | g_nCommSpeakerObject = 0 |
| short | g_nCommSpeakerRating = 0 |
| short | g_nCommPortraitIndex = -1 |
| short | g_bCommSpeechPlaying = 0 |
| char * | g_48_apCommunicationTextPacketsTable [50] |
| char | g_szOnScreenMessageBuffer [52] |
| int | g_11_nUnusedCommWordWord [5] |
| char | g_szCommMessageTextText [0x58] |
| signed char | g_abCommMenuChoiceCommand [7] |
| const char * | g_pszCommScreenHeading |
| char | g_4_szCommMenuHeadingStore [0x40] |
| const char * | g_1_apszCommMenuChoiceTextTable [7] |
Communications menu and transmissions.
Definition in file comm.c.
| void AppendCommMenuChoice | ( | const char * | text, |
| short | command ) |
Definition at line 60 of file comm.c.
References AppendCommMenuChoice(), g_1_apszCommMenuChoiceTextTable, g_abCommMenuChoiceCommand, g_nCommMenuChoiceCount, and g_nCommMenuReuseMode.
Referenced by AppendCommMenuChoice(), BuildCommunicationRecipientMenu(), SendCommMenuChoice(), and UpdateShipTurretGuns().
Definition at line 199 of file comm.c.
References any_enemy(), BuildCommunicationCommandMenu(), CloseCommChoiceMenu(), g_13_stMissionHeaderBlock, g_1_nEnemyCommCommandBase, g_4_szCommMenuHeadingStore, g_6_nHomeOperationShipIndexValue, g_acObjectType, g_acShipPortrait, g_acShipTarget, g_aeObjectClass, g_aeShipObjective, g_aObjectTypeData, g_apShipMissionRecord, g_asObjectType, g_asShipIdentified, g_asShipMissionIndex, g_asShipMissionType, g_asShipSide, g_bEjectionAwaitingCommCommand, g_bLandingCommRequestPending, g_bRadioSilence, g_cCommMenuRecipient, g_nAutoEngageTimer, g_nCommMenuChoiceCount, g_nCommMenuReuseMode, g_nEnemyCommPilotIndex, g_nEnemyTauntCommandBase, g_nFacingToTarget, g_nTargetFacing, g_nTargetRange, g_nYourWingman, g_ucPendingEjectionTransition, get_facing_range_from_object(), have_target(), IsCommChoiceMenuOpen(), IsCommMenuIdle(), MISSION_TYPE_CANNED_SEQUENCE, OBJECT_CLASS_SHIP, OBJECT_TYPE_DEBRIS_GLASS, OBJECTIVE_HOLD_FORMATION, OpenCommMenuForTarget(), ResetCommMenuChoices(), SendCommMenuChoice(), SIDE_IMPERIAL, SIDE_KILRATHI, and MissionHeader::wingmanMissionShip.
Referenced by BuildCommunicationCommandMenu(), RefreshCommunicationMenu(), and UpdateShipTurretGuns().
Definition at line 137 of file comm.c.
References any_enemy(), AppendCommMenuChoice(), BuildCommunicationRecipientMenu(), g_6_nHomeOperationShipIndexValue, g_acShipTarget, g_aeObjectClass, g_apShipMissionRecord, g_asObjectType, g_asShipIdentified, g_asShipMissionIndex, g_asShipMissionType, g_asShipSide, g_bEjectionAwaitingCommCommand, g_nCommMenuReuseMode, g_nYourWingman, g_ucPendingEjectionTransition, have_target(), MISSION_TYPE_CANNED_SEQUENCE, OBJECT_CLASS_SHIP, OBJECT_TYPE_DEBRIS_GLASS, OpenCommMenuForTarget(), ResetCommMenuChoices(), SelectCommRecipient(), SendCommMenuChoice(), SIDE_IMPERIAL, SIDE_KILRATHI, and wingman_dead().
Referenced by BuildCommunicationRecipientMenu(), RefreshCommunicationMenu(), and UpdateShipTurretGuns().
| short CanOpenCommMenu | ( | void | ) |
Definition at line 124 of file comm.c.
References CanOpenCommMenu(), have_target(), and wingman_dead().
Referenced by CanOpenCommMenu(), HandleCommunicationMenuRequest(), and UpdateShipTurretGuns().
| void Chosen_communicate_option | ( | short | choice | ) |
Definition at line 378 of file comm.c.
References Chosen_communicate_option(), CloseCommChoiceMenu(), g_abCommMenuChoiceCommand, g_acShipTarget, g_cCommMenuRecipient, g_cPendingCommMenuAction, g_nEnemyTauntCommandBase, g_nYourWingman, PlaySfxWaveFileByNumber(), RefreshCommunicationMenu(), request(), and SelectCommRecipient().
Referenced by Chosen_communicate_option(), HandleSpaceFlightControls(), and UpdateShipTurretGuns().
Definition at line 105 of file comm.c.
References CloseCommChoiceMenu(), get_mode(), and pop_mode().
Referenced by BuildCommunicationCommandMenu(), Chosen_communicate_option(), CloseCommChoiceMenu(), HandleCommunicationMenuRequest(), HandleSpaceFlightControls(), and UpdateShipTurretGuns().
Definition at line 441 of file comm.c.
References clear_message_time(), EndCommMenu(), EndCommSessionWithWingman(), g_pszPendingHudMessage, get_mode(), and RestoreHudMessageBackground().
Referenced by check_message(), ClearHudMessageDisplay(), EndCommMenu(), free_view_buffer(), HandleSpaceFlightControls(), InflightComputer(), initialize_cockpit(), UpdateShipTurretGuns(), vdu_pop_all(), and vid_transmit().
Definition at line 430 of file comm.c.
References EndCommSessionWithWingman(), FreeCommDisplayResources(), g_cDarkGreenColour, g_pCommPortraitResource, get_mode(), malf_noise(), and pop_mode().
Referenced by EndCommMenu(), EndCommSessionWithWingman(), UpdateShipTurretGuns(), and vid_transmit().
| char * ExpandCommMessageTokens | ( | const char * | text | ) |
Definition at line 459 of file comm.c.
References PilotProfile::callsign, DosStrcat(), DosStrchr(), DosStrlen(), ExpandCommMessageTokens(), g_16_szTextBufferBuffer, g_apszPilotRankNames, g_stCurrentPilotProfile, PilotProfile::lastName, and PilotProfile::rank.
Referenced by ExpandCommMessageTokens(), real_vid_transmit(), and UpdateShipTurretGuns().
Definition at line 422 of file comm.c.
References FreeCommDisplayResources(), g_nCommPortraitIndex, g_nCommSpeakerObject, and g_nCommSpeakerRating.
Referenced by EndCommSessionWithWingman(), free_cockpit(), FreeCommDisplayResources(), and UpdateShipTurretGuns().
| long GetNamedPacketSize | ( | const char * | filename, |
| short | section ) |
Definition at line 2164 of file eventmgr.c.
Definition at line 342 of file comm.c.
References CanOpenCommMenu(), CloseCommChoiceMenu(), HandleCommunicationMenuRequest(), IsCommChoiceMenuOpen(), message_showing(), OpenCommRecipientMenu(), RefreshCommunicationMenu(), and ResetCommMenuChoices().
Referenced by HandleCommunicationMenuRequest(), show_communications_disp(), and UpdateShipTurretGuns().
| short have_target | ( | void | ) |
Definition at line 118 of file comm.c.
References g_acShipTarget, have_target(), and unactive().
Referenced by BuildCommunicationCommandMenu(), BuildCommunicationRecipientMenu(), CanOpenCommMenu(), have_target(), and UpdateShipTurretGuns().
| short IsCommChoiceMenuOpen | ( | void | ) |
Definition at line 92 of file comm.c.
References get_mode(), and IsCommChoiceMenuOpen().
Referenced by BuildCommunicationCommandMenu(), HandleCommunicationMenuRequest(), IsCommChoiceMenuOpen(), RefreshCommunicationMenu(), show_communications_disp(), and UpdateShipTurretGuns().
| short IsCommMenuIdle | ( | void | ) |
Definition at line 54 of file comm.c.
References g_nCommMenuChoiceCount, and IsCommMenuIdle().
Referenced by BuildCommunicationCommandMenu(), IsCommMenuIdle(), and UpdateShipTurretGuns().
| void IssueQuickCommCommand | ( | short | recipient, |
| short | command ) |
Definition at line 413 of file comm.c.
References g_nEnemyTauntCommandBase, IssueQuickCommCommand(), and request().
Referenced by HandleSpaceFlightControls(), IssueQuickCommCommand(), and UpdateShipTurretGuns().
| void LoadAndPlaySpeechPacket | ( | char * | fileName, |
| short | section ) |
| void LoadCommPortraitResources | ( | short | portrait | ) |
Definition at line 25 of file comm.c.
References FetchDiskPacketRetrying(), FreePacketAndClear(), g_19_bStoredHighMemoryEnabled, g_pCommPortraitResource, g_pCommVduFrameResource, and LoadCommPortraitResources().
Referenced by init_intelligence_data(), LoadCommPortraitResources(), real_vid_transmit(), and UpdateShipTurretGuns().
| void malf_noise | ( | short | vdu, |
| int | effect, | ||
| unsigned short | colour, | ||
| short | sound, | ||
| short | refresh ) |
| void OpenCommMenuForTarget | ( | const char * | heading, |
| const char * | message ) |
Definition at line 85 of file comm.c.
References CockpitMessage(), g_cYellowColour, g_pszCommScreenHeading, and OpenCommMenuForTarget().
Referenced by BuildCommunicationCommandMenu(), BuildCommunicationRecipientMenu(), OpenCommMenuForTarget(), and UpdateShipTurretGuns().
Definition at line 98 of file comm.c.
References g_cPendingCommMenuAction, OpenCommRecipientMenu(), and push_mode().
Referenced by HandleCommunicationMenuRequest(), OpenCommRecipientMenu(), and UpdateShipTurretGuns().
| void real_vid_transmit | ( | short | obj, |
| short | message ) |
Definition at line 510 of file comm.c.
References DismissHudMessageIfShowing(), DrawSpriteDefault(), ExpandCommMessageTokens(), g_19_nCommPortraitAnimationTickWord, g_4_stRightVduView, g_acShipPortrait, g_apShipMissionRecord, g_asShipIdentified, g_bCommSpeechPlaying, g_bSpeechEnabledFlag, g_bVideoImagesSuppressed, g_cDarkGreenColour, g_nCommDeathSequenceFrame, g_nCommMessageIndex, g_nCommPortraitIndex, g_nCommSpeakerObject, g_nCommSpeakerRating, g_nDigiSampleBytes, g_nLoadedCommPortraitPilot, g_pCommPortraitResource, g_szCommMessageTextText, GetNamedPacketSize(), Viewport::left, LoadAndPlaySpeechPacket(), LoadCommPortraitResources(), LoadPacketIntoBuffer(), malf_noise(), MeasureMessageWidth(), push_mode(), real_vid_transmit(), ShowCentredPrompt(), and Viewport::top.
Referenced by npc_communication(), real_vid_transmit(), UpdateShipTurretGuns(), and vid_equiv().
Definition at line 329 of file comm.c.
References BuildCommunicationCommandMenu(), BuildCommunicationRecipientMenu(), g_cPendingCommMenuAction, g_nCommMenuReuseMode, InvalidateVduMode(), IsCommChoiceMenuOpen(), and RefreshCommunicationMenu().
Referenced by Chosen_communicate_option(), HandleCommunicationMenuRequest(), RefreshCommunicationMenu(), SelectCockpitVduMode(), update_VDUs(), and UpdateShipTurretGuns().
| void ResetCommMenuChoices | ( | short | reuse | ) |
Definition at line 39 of file comm.c.
References g_1_apszCommMenuChoiceTextTable, g_abCommMenuChoiceCommand, g_nCommMenuChoiceCount, g_nCommMenuReuseMode, and ResetCommMenuChoices().
Referenced by BuildCommunicationCommandMenu(), BuildCommunicationRecipientMenu(), HandleCommunicationMenuRequest(), ResetCommMenuChoices(), and UpdateShipTurretGuns().
| void SelectCommRecipient | ( | short | recipient | ) |
Definition at line 130 of file comm.c.
References g_cCommMenuRecipient, g_cPendingCommMenuAction, and SelectCommRecipient().
Referenced by BuildCommunicationRecipientMenu(), Chosen_communicate_option(), SelectCommRecipient(), and UpdateShipTurretGuns().
| void SendCommMenuChoice | ( | short | i | ) |
Definition at line 76 of file comm.c.
References AppendCommMenuChoice(), g_48_apCommunicationTextPacketsTable, LoadPacketAllocated(), and SendCommMenuChoice().
Referenced by BuildCommunicationCommandMenu(), BuildCommunicationRecipientMenu(), SendCommMenuChoice(), and UpdateShipTurretGuns().
Definition at line 355 of file comm.c.
References DrawFormattedText(), DrawTextAt(), g_1_apszCommMenuChoiceTextTable, g_1_stRightVduTextContextBlock, g_4_stRightVduView, g_nCommMenuChoiceCount, g_nCommMenuReuseMode, g_pszCommScreenHeading, HandleCommunicationMenuRequest(), IsCommChoiceMenuOpen(), Viewport::left, set_new_vdu(), show_communications_disp(), and Viewport::top.
Referenced by SelectCockpitVduMode(), show_communications_disp(), update_VDUs(), and UpdateShipTurretGuns().
| void ShowCentredPrompt | ( | char * | text, |
| unsigned short | arg ) |
Definition at line 451 of file comm.c.
References DosStrcpy(), g_bPrimaryViewBufferColour, g_szOnScreenMessageBuffer, SetHudMessageText(), and ShowCentredPrompt().
Referenced by real_vid_transmit(), ShowCentredPrompt(), and UpdateShipTurretGuns().
| short wingman_dead | ( | void | ) |
Definition at line 112 of file comm.c.
References g_nYourWingman, and wingman_dead().
Referenced by BuildCommunicationRecipientMenu(), CanOpenCommMenu(), UpdateShipTurretGuns(), and wingman_dead().
| const char* g_1_apszCommMenuChoiceTextTable[7] |
Definition at line 589 of file comm.c.
Referenced by AppendCommMenuChoice(), ResetCommMenuChoices(), and show_communications_disp().
| char* g_48_apCommunicationTextPacketsTable[50] |
Definition at line 582 of file comm.c.
Referenced by free_cockpit(), InitializeCockpitResources(), and SendCommMenuChoice().
| char g_4_szCommMenuHeadingStore[0x40] |
Definition at line 588 of file comm.c.
Referenced by BuildCommunicationCommandMenu().
| signed char g_abCommMenuChoiceCommand[7] |
Definition at line 586 of file comm.c.
Referenced by AppendCommMenuChoice(), Chosen_communicate_option(), and ResetCommMenuChoices().
| short g_bCommSpeechPlaying = 0 |
Definition at line 22 of file comm.c.
Referenced by real_vid_transmit(), and vid_transmit().
| signed char g_bRadioSilence = 0 |
Definition at line 14 of file comm.c.
Referenced by BuildCommunicationCommandMenu(), InitializeCockpitResources(), request(), and send_message().
| signed char g_bVideoImagesSuppressed = 0 |
Definition at line 15 of file comm.c.
Referenced by HandleSpaceFlightControls(), real_vid_transmit(), and vid_transmit().
| signed char g_cCommMenuRecipient = -1 |
Definition at line 18 of file comm.c.
Referenced by BuildCommunicationCommandMenu(), Chosen_communicate_option(), and SelectCommRecipient().
| signed char g_cMessageSpeed = 2 |
Definition at line 12 of file comm.c.
Referenced by MeasureMessageWidth(), and SetMessageDisplaySpeed().
| signed char g_cPendingCommMenuAction = 1 |
Definition at line 13 of file comm.c.
Referenced by Chosen_communicate_option(), OpenCommRecipientMenu(), RefreshCommunicationMenu(), and SelectCommRecipient().
| short g_nCommMenuChoiceCount = -1 |
Definition at line 10 of file comm.c.
Referenced by AppendCommMenuChoice(), BuildCommunicationCommandMenu(), HandleSpaceFlightControls(), IsCommMenuIdle(), ResetCommMenuChoices(), and show_communications_disp().
| short g_nCommMenuReuseMode = 0 |
Definition at line 11 of file comm.c.
Referenced by AppendCommMenuChoice(), BuildCommunicationCommandMenu(), BuildCommunicationRecipientMenu(), RefreshCommunicationMenu(), ResetCommMenuChoices(), and show_communications_disp().
| short g_nCommPortraitIndex = -1 |
Definition at line 21 of file comm.c.
Referenced by FreeCommDisplayResources(), real_vid_transmit(), and vid_transmit().
| short g_nCommSpeakerObject = 0 |
Definition at line 19 of file comm.c.
Referenced by check_message(), FreeCommDisplayResources(), npc_communication(), overlay_head_up_display(), real_vid_transmit(), and vid_transmit().
| short g_nCommSpeakerRating = 0 |
Definition at line 20 of file comm.c.
Referenced by FreeCommDisplayResources(), and real_vid_transmit().
| short g_nEnemyTauntCommandBase = 20 |
Definition at line 9 of file comm.c.
Referenced by BuildCommunicationCommandMenu(), Chosen_communicate_option(), HandleSpaceFlightControls(), init_mission(), IssueQuickCommCommand(), and request().
| unsigned char* g_pCommPortraitResource = 0 |
Definition at line 16 of file comm.c.
Referenced by check_message(), EndCommSessionWithWingman(), free_cockpit(), init_intelligence_data(), LoadCommPortraitResources(), real_vid_transmit(), and vid_transmit().
| unsigned char* g_pCommVduFrameResource = 0 |
Definition at line 17 of file comm.c.
Referenced by free_cockpit(), LoadCommPortraitResources(), and vid_transmit().
| const char* g_pszCommScreenHeading |
Definition at line 587 of file comm.c.
Referenced by OpenCommMenuForTarget(), and show_communications_disp().
| char g_szCommMessageTextText[0x58] |
Definition at line 585 of file comm.c.
Referenced by real_vid_transmit(), and vid_transmit().
| char g_szOnScreenMessageBuffer[52] |
Definition at line 583 of file comm.c.
Referenced by ShowCentredPrompt(), and ShowOnScreenMessage().