|
Wing Commander II
Reconstructed Win32 source (1996)
|
Flight input setup, fatal errors and on-screen messages. More...
#include "game.h"Go to the source code of this file.
Functions | |
| void | InitializeSpaceFlightInput (void) |
| void | ReportFatalErrorCode (const char *errorCode) |
| void | exit_squadron (const char *msg,...) |
| void | ShowMemoryStatusDebug (void) |
| void | ShowModalMessage (const char *format,...) |
| void | ReportOutOfMemoryAndExit (const char *resource) |
| void | InitializeConversationViewport (void) |
| void | ResetScreenClipToFullHeight (void) |
| void | InitializeConversationText (void) |
| void | ShowOnScreenMessage (short duration, const char *format,...) |
| void | ShowGamePausedBanner (short showBanner) |
| void | ShowVersionBanner (void) |
| void | SetMessageDisplaySpeed (void) |
| short | MinShort (short a, short b) |
| short | MaxShort (short a, short b) |
| void | ReportFramesSkipped (short adjustment) |
Variables | |
| static const char * | g_pszFatalErrorMessage |
| int | g_bPauseInputActive = 0 |
| Viewport | g_6_stConversationTextViewport |
| char | g_6_szDefaultTextBufferText [0xc8] |
| unsigned char * | g_18_pCockpitIndicatorShape |
| unsigned char * | g_pConstellationSprite |
| Viewport | g_2_stModalSourceWindow |
| unsigned char * | g_pPilotHandAnimationShapePtr |
| Viewport | g_stPilotHandViewportRecord |
| Viewport | g_stSecondaryViewBufferBlock |
| short | g_9_aasCockpitHitPaletteFades [6][3] |
| unsigned char * | g_4_pCockpitPanelShape |
| TextContext | g_1_stRightVduTextContextBlock |
| TextContext | g_16_stCockpitTextSettingsRecord |
| TextContext | g_3_stDefaultStringContext |
| TextContext | g_2_stConversationTextCtx |
| short | g_1_asSpacePaletteFade [3] |
Flight input setup, fatal errors and on-screen messages.
Definition in file message.c.
| void exit_squadron | ( | const char * | msg, |
| ... ) |
Definition at line 44 of file message.c.
References exit_squadron(), g_szCannedSceneTapeFile, LogMemoryUsage(), ShowNoticeMessageBox(), and ShutdownGameWindow().
Referenced by CheckHeapBlockSignature(), close_behind(), DrawSpriteTransformed(), exit_squadron(), FatalCutsceneError(), FatalErrorAndExit(), LoadOriginFxDrivers(), LoadPacketAllocated(), MonoDebug_install(), MonoDebug_print(), PacketLoad(), PrepareShapeRLEData(), ProcessMusicScriptCommand(), PushMemoryStackFrame(), RunCampaignChalkboardMenu(), and ValidateViewportBounds().
Definition at line 133 of file message.c.
References TextContext::alignment, g_2_stConversationTextCtx, g_2_stModalSourceWindow, g_6_stConversationTextViewport, g_6_szDefaultTextBufferText, g_bPrimaryViewBufferColour, g_cSecondaryViewBufferColour, InitializeConversationText(), InitializeTextContextFromFont(), SetTextContext(), TextContext::text, Viewport::top, and TextContext::viewport.
Referenced by close_behind(), and InitializeConversationText().
Definition at line 108 of file message.c.
References AllocateViewport(), Viewport::bottom, ClearViewport(), free_viewport(), g_101_stScrViewInfo, g_2_stModalSourceWindow, g_cSecondaryViewBufferColour, g_stSecondaryViewBufferBlock, InitializeConversationViewport(), Viewport::left, Viewport::pixels, ReportPacketLoadError(), Viewport::right, and Viewport::top.
Referenced by close_behind(), InitializeConversationViewport(), and Title_Sequence().
Definition at line 16 of file message.c.
References ClearInputPump(), ConfigureInputPump(), g_18_nInterfaceEventMode, g_26_bMouseCursorEnabled, g_27_stViewScratchInfo, g_3_nFlightControlCommandValue, g_88_nEventRepeatDelayState, get_player_input(), InitializeInputDriverHook(), InitializeSpaceFlightInput(), and SetInputViewport().
Referenced by ejection_sequence(), InflightComputer(), InitializeSpaceFlightInput(), RunSpaceFlight(), and UpdateShipTurretGuns().
| void ReportFatalErrorCode | ( | const char * | errorCode | ) |
Definition at line 29 of file message.c.
References FatalErrorAndExit(), g_6_szDefaultTextBufferText, g_pszFatalErrorMessage, LogMemoryStateToFile(), and ReportFatalErrorCode().
Referenced by BarracksScreen(), CheckCannedSceneBufferCapacity(), close_behind(), ejection_sequence(), EMStartUp(), FlushCannedSceneRecordingBuffer(), init_intelligence_data(), InitializeCampaignChalkboardScreen(), InitializeCampaignConstellationState(), InitializeCockpitResources(), InitializeNewPilotCampaign(), InitializeSoundBlaster(), load_ship(), LoadCannedScenePlaybackBuffer(), LoadSelectedPilotCampaign(), OpenDiskDataFile(), PromptToContinueCampaign(), ReadTapeInitialState(), ReportFatalErrorCode(), RunPilotDatabaseMenu(), RunPilotSaveLoadMenu(), RunTitleScreen(), and WriteTapeInitialState().
| void ReportFramesSkipped | ( | short | adjustment | ) |
Definition at line 217 of file message.c.
References g_nFrameSkip, MaxShort(), MinShort(), ReportFramesSkipped(), and ShowOnScreenMessage().
Referenced by HandleSpaceFlightControls(), ReportFramesSkipped(), and UpdateShipTurretGuns().
| void ReportOutOfMemoryAndExit | ( | const char * | resource | ) |
Definition at line 101 of file message.c.
References FatalErrorAndExit(), g_szNotEnoughMemoryMessage, ReportOutOfMemoryAndExit(), and ShowModalMessage().
Referenced by BriefingMap_LoadShapes(), initialize_view_buffer(), ReportOutOfMemoryAndExit(), and UpdateShipTurretGuns().
Definition at line 125 of file message.c.
References Viewport::bottom, free_viewport(), g_101_stScrViewInfo, g_stSecondaryViewBufferBlock, ResetScreenClipToFullHeight(), and Viewport::top.
Referenced by close_behind(), ResetScreenClipToFullHeight(), and Title_Sequence().
Definition at line 205 of file message.c.
References g_cMessageSpeed, SetMessageDisplaySpeed(), and ShowOnScreenMessage().
Referenced by HandleSpaceFlightControls(), SetMessageDisplaySpeed(), and UpdateShipTurretGuns().
| void ShowGamePausedBanner | ( | short | showBanner | ) |
Definition at line 187 of file message.c.
References ServiceSoundSystem(), ShowGamePausedBanner(), ShowOnScreenMessage(), and WaitForInputKey().
Referenced by HandleFleetOverviewInput(), HandleSpaceFlightControls(), ShowGamePausedBanner(), and UpdateShipTurretGuns().
Definition at line 54 of file message.c.
References DrawFormattedText(), g_29_pCurrentTextContext, g_3_stDefaultStringContext, g_bPrimaryViewBufferColour, g_cSecondaryViewBufferColour, g_dwInitialSpareMemory, GetAvailableFarMemory(), GetAvailableMainMemory(), GetLargestFreeMemoryBlockByType(), GetOriginalFreeMemory(), InitializeTextContextFromFont(), SetTextContext(), and ShowMemoryStatusDebug().
Referenced by close_behind(), dump_buffer_to_screen(), RefreshMemoryStatusOverlay(), ReleaseSpaceflightResources(), RunCampaignGameLoop(), and ShowMemoryStatusDebug().
| void ShowModalMessage | ( | const char * | format, |
| ... ) |
Definition at line 83 of file message.c.
References AcknowledgeModalMessage(), ReleaseModalTextPanel(), ShowModalMessage(), and ShowModalTextPanel().
Referenced by ReportOutOfMemoryAndExit(), ShowModalMessage(), and UpdateShipTurretGuns().
| void ShowOnScreenMessage | ( | short | duration, |
| const char * | format, | ||
| ... ) |
Definition at line 151 of file message.c.
References ClearDebugPauseFlags(), ClearHudMessageDisplay(), DosStrcpy(), FlushInputEvents(), FlushPendingInputPresses(), g_bPauseInputActive, g_cRedColour, g_szOnScreenMessageBuffer, MeasureMessageWidth(), ReleaseModalTextPanel(), ServiceSoundSystem(), SetHudMessageText(), ShowModalTextPanel(), ShowOnScreenMessage(), and WaitForInputKey().
Referenced by AdjustSpaceFramePeriod(), HandleSpaceFlightControls(), npc_communication(), ReportFramesSkipped(), SetMessageDisplaySpeed(), ShowGamePausedBanner(), ShowOnScreenMessage(), ShowVersionBanner(), and UpdateShipTurretGuns().
Definition at line 198 of file message.c.
References g_pszGameVersion, ShowOnScreenMessage(), and ShowVersionBanner().
Referenced by HandleSpaceFlightControls(), ShowVersionBanner(), and UpdateShipTurretGuns().
| TextContext g_16_stCockpitTextSettingsRecord |
Definition at line 238 of file message.c.
Referenced by InitializeCockpitResources(), and update_digital_readouts().
| unsigned char* g_18_pCockpitIndicatorShape |
Definition at line 229 of file message.c.
Referenced by show_target_disp().
| short g_1_asSpacePaletteFade[3] |
Definition at line 241 of file message.c.
Referenced by DrawSpaceSceneFrame(), house_keep_objects(), ResetCockpitPaletteEntries(), TriggerPlayerHitPaletteFlash(), and UpdateSpacePaletteFade().
| TextContext g_1_stRightVduTextContextBlock |
Definition at line 237 of file message.c.
Referenced by init_vdus(), set_global_message(), show_communications_disp(), show_navigation_disp(), show_target_disp(), and update_VDUs().
| TextContext g_2_stConversationTextCtx |
Definition at line 240 of file message.c.
Referenced by InitializeConversationText().
| Viewport g_2_stModalSourceWindow |
Definition at line 231 of file message.c.
Referenced by BarracksScreen(), DrawCinematicMemoryStatus(), DrawCutsceneTextAt(), ejection_sequence(), initialize_cockpit(), InitializeCampaignChalkboardScreen(), InitializeConversationText(), InitializeConversationViewport(), InitializeCutsceneViewports(), InitializeGameTextContexts(), InitializeModalTextPanel(), InitializeNewPilotCampaign(), PresentCutsceneFrame(), ResetGameTextContexts(), RunCampaignChalkboardMenu(), RunCampaignScript(), RunCutsceneScript(), RunLoadedCutscene(), RunTitleScreen(), Title_Sequence(), and UpdateMap().
| TextContext g_3_stDefaultStringContext |
Definition at line 239 of file message.c.
Referenced by CalibrateJoystickInteractive(), DrawPersonnelMenuBackdrop(), DrawPersonnelMenuChoices(), DrawPersonnelSourceChoices(), DrawPilotSaveMenuChoices(), HighlightPersonnelFileSlot(), HighlightTransferredPilot(), InflightComputer(), InitializeGameTextContexts(), InitializeModalTextPanel(), LocateLegacySaveGame(), PollCampaignChalkboardMenu(), print_message_text(), ReadPersonnelTextField(), ResetGameTextContexts(), RunCampaignSelectionFrame(), RunPilotDatabaseMenu(), RunPilotSaveLoadMenu(), SelectLegacyGameSource(), SelectPersonnelFileSlot(), SelectTransferredPilot(), and ShowMemoryStatusDebug().
| unsigned char* g_4_pCockpitPanelShape |
Definition at line 236 of file message.c.
Referenced by draw_cockpit_lights(), and vdu_polygon().
| Viewport g_6_stConversationTextViewport |
Definition at line 227 of file message.c.
Referenced by InitializeConversationText().
| char g_6_szDefaultTextBufferText[0xc8] |
Definition at line 228 of file message.c.
Referenced by BuildMap(), DrawNavLocationReadout(), init_vdus(), InitializeConversationText(), InitializeGameTextContexts(), ReportFatalErrorCode(), ReportPacketLoadError(), ResetGameTextContexts(), RunPilotDatabaseMenu(), and RunPilotSaveLoadMenu().
| short g_9_aasCockpitHitPaletteFades[6][3] |
Definition at line 235 of file message.c.
Referenced by house_keep(), object_collision(), and ResetCockpitPaletteEntries().
| int g_bPauseInputActive = 0 |
Definition at line 13 of file message.c.
Referenced by HandleSpaceFlightControls(), and ShowOnScreenMessage().
| unsigned char* g_pConstellationSprite |
Definition at line 230 of file message.c.
Referenced by BarracksScreen(), draw_sorted_objects_to_buffer(), DrawConstellationField(), free_constellation(), init_constellation(), intro_drawbackgroundships(), PromptToContinueCampaign(), and RunTitleScreen().
| unsigned char* g_pPilotHandAnimationShapePtr |
Definition at line 232 of file message.c.
Referenced by animate_pilot(), DrawPendingCockpitDamage(), DrawPilotHandFrame(), DrawUnreferencedPilotHandFrame(), free_cockpit(), InitializeCockpitResources(), ResetPilotHandAnimation(), and update_VDUs().
|
static |
Definition at line 8 of file message.c.
Referenced by ReportFatalErrorCode().
| Viewport g_stPilotHandViewportRecord |
Definition at line 233 of file message.c.
Referenced by DrawPilotHandFrame(), DrawUnreferencedPilotHandFrame(), free_cockpit(), and InitializeCockpitResources().
| Viewport g_stSecondaryViewBufferBlock |
Definition at line 234 of file message.c.
Referenced by AdvanceSceneFlicStream(), AnimateTitleOrchestra(), BarracksScreen(), BriefingMap_DisplayMap(), BriefingMap_LoadShapes(), BuildMap(), ClearActiveCutscenePixelAlias(), DrawCampaignChalkboardFrame(), DrawCutsceneCockpitOverlay(), DrawCutsceneSprite(), DrawCutsceneTextAt(), DrawNavLocationReadout(), DrawNavMapBriefingBeacons(), DrawNavMapLegend(), DrawPersonnelMenuBackdrop(), DrawScaledTitleLogo(), DrawTitleOrchestra(), DrawTitleSky(), ExecuteCutsceneSequence(), FetchDiskPacketRetrying(), free_viewport(), InflightComputer(), InitializeCampaignChalkboardScreen(), InitializeConversationViewport(), LocateLegacySaveGame(), PlayTitleConductorCue(), PollCampaignChalkboardMenu(), PromptToContinueCampaign(), PushTitleOrchestraAway(), ReadPersonnelTextField(), RefreshMemoryStatusOverlay(), ResetScreenClipToFullHeight(), RevealTitleLogo(), RouteCutsceneViewportToDisplay(), RunCampaignChalkboardMenu(), RunCampaignContinuePromptLoop(), RunCampaignSelectionFrame(), RunCutsceneScript(), RunLoadedCutscene(), RunPilotDatabaseMenu(), RunPilotSaveLoadMenu(), RunTitleMenuInputLoop(), RunTitleScreen(), SelectLegacyGameSource(), SelectTransferredPilot(), SetScreenClipRect(), ShowNoTransferablePilots(), and ShowVictoryScreen().