|
Wing Commander II
Reconstructed Win32 source (1996)
|
Packet loading, text contexts and input waits. More...
#include "game.h"Go to the source code of this file.
Functions | |
| void | FillMemoryBytes (void *destination, unsigned int count, short value) |
| short | MinShort (short a, short b) |
| short | MaxShort (short a, short b) |
| void | FreePacketAndClear (void *slot, unsigned short releaseFlags) |
| void | ReportPacketLoadError (void *packet, char *fileName, short retry, short section, const char *sourceTag) |
| void | AppendPacketLoadDebugLog (char *fileName, short section, void *packet) |
| void | RewritePacketFilenameForInstalledData (char *fileName) |
| void * | LoadPacketIntoBuffer (char *fileName, short section, void *destination, int registerHandle) |
| void * | LoadPacketAllocated (char *fileName, short section) |
| void * | FetchDiskPacketRetrying (char *fileName, short section, short flags) |
| void | InitializeTextContextFromFont (TextContext *context, short fontIndex, unsigned char colour, signed char background) |
| void | ReleaseTextFont (short fontIndex) |
| void | DrawTextAt (TextContext *context, short x, short y, const char *text, unsigned char alignment) |
| void | FlushPendingInputPresses (void) |
| short | WaitForInputKey (void) |
| unsigned short | WaitForAnyInputPress (void) |
Variables | |
| const char * | g_pszPacketReadOperation = "reading from disk" |
| const char * | g_pszPacketAllocateOperation = "allocating memory" |
| const char * | g_pszPacketLoadErrorFormat |
| int | g_nUnusedDiskWord = 0 |
| short | g_nUnusedDiskPromptBorderColour = 0x50 |
Packet loading, text contexts and input waits.
Definition in file disk.c.
Definition at line 98 of file disk.c.
References AppendPacketLoadDebugLog(), g_nShowMemoryStatus, GetAvailableMainMemory(), GetLargestMainMemoryBlock(), and GetNamedPacketSize().
Referenced by AppendPacketLoadDebugLog(), FetchDiskPacketRetrying(), LoadPacketAllocated(), and LoadPacketIntoBuffer().
| void DrawTextAt | ( | TextContext * | context, |
| short | x, | ||
| short | y, | ||
| const char * | text, | ||
| unsigned char | alignment ) |
Definition at line 285 of file disk.c.
References TextContext::alignment, DrawTextAt(), DrawTextString(), SetTextContext(), SetTextCursor(), and TextContext::text.
| void * FetchDiskPacketRetrying | ( | char * | fileName, |
| short | section, | ||
| short | flags ) |
Definition at line 187 of file disk.c.
References AllocateViewport(), AppendPacketLoadDebugLog(), FetchDiskPacketRetrying(), free_viewport(), FreePacketAndClear(), g_27_stViewScratchInfo, g_bRewritePacketExtensions, g_cPrimaryViewBufferColour, g_cSecondaryViewBufferColour, g_nOriginDevUnlock, g_nPacketError, g_stSecondaryViewBufferBlock, GetAvailableMainMemory(), GetLargestMainMemoryBlock(), LoadNamedPacket(), Viewport::pixels, ReportPacketLoadError(), and RewritePacketFilenameForInstalledData().
Referenced by BarracksScreen(), BriefingMap_LoadShapes(), ClearTransientObjectsForEjection(), death_sequence(), FetchDiskPacketRetrying(), get_right_shape(), InflightComputer(), init_constellation(), initialize_cockpit(), InitializeCampaignChalkboardScreen(), InitializeCockpitResources(), InitializeConstellationObject(), InitializeMusicResources(), InitializeTextContextFromFont(), load_common_3Space_objects(), load_ship(), LoadCommPortraitResources(), LoadGamePaletteFile(), LoadMissionData(), LoadPacketResourceList(), LoadShapeSet(), PreloadMusicTrack(), PromptToContinueCampaign(), RunCampaignScript(), RunPilotDatabaseMenu(), RunPilotSaveLoadMenu(), RunTitleScreen(), SpawnMissionEjectionPod(), and Title_Sequence().
Definition at line 21 of file disk.c.
References FillMemoryBytes().
Referenced by FillMemoryBytes().
Definition at line 305 of file disk.c.
References FlushPendingInputPresses(), PumpWindowMessages(), ServiceInputDevices(), TakeInputPressCount(), and void().
Referenced by DrawTextAt(), FlushPendingInputPresses(), ShowOnScreenMessage(), and WaitForInputKey().
Definition at line 45 of file disk.c.
References FreePacketAndClear(), and ReleasePacketHandle().
Referenced by BarracksScreen(), cockpit_explosion(), death_sequence(), DrawPendingCockpitDamage(), explosion_draw(), FetchDiskPacketRetrying(), free_3Space_objects(), free_cockpit(), free_constellation(), free_ship(), FreeConstellationObject(), FreePacketAndClear(), FreeShapeSet(), get_right_shape(), InitializeCockpitResources(), InitializeHighMemoryGraphicsBuffers(), load_ship(), LoadCommPortraitResources(), PromptToContinueCampaign(), release_all_capital_ship_shapes(), release_capital_ship_shapes(), ReleaseHighMemoryGraphicsBuffers(), ReleaseMusicTrack(), remove_object(), RunCampaignChalkboardMenu(), RunCampaignGameLoop(), RunPilotDatabaseMenu(), RunPilotSaveLoadMenu(), RunTitleScreen(), set_up_action_sphere(), ShipExplosion(), ShutdownSoundBlaster(), StoreMissionResultsInCampaignGlobals(), and Title_Sequence().
| void InitializeTextContextFromFont | ( | TextContext * | context, |
| short | fontIndex, | ||
| unsigned char | colour, | ||
| signed char | background ) |
Definition at line 254 of file disk.c.
References TextContext::backgroundColour, TextContext::colour, FetchDiskPacketRetrying(), TextContext::font, g_36_apTextGlyphs, InitializeTextContextFromFont(), and SetTextContext().
Referenced by BuildMap(), CalibrateJoystickInteractive(), DrawNavLocationReadout(), DrawPersonnelMenuBackdrop(), DrawPersonnelMenuChoices(), DrawPersonnelSourceChoices(), DrawPilotSaveMenuChoices(), HighlightPersonnelFileSlot(), HighlightTransferredPilot(), init_vdus(), InitializeCockpitResources(), InitializeConversationText(), InitializeGameTextContexts(), InitializeModalTextPanel(), InitializeTextContextFromFont(), LocateLegacySaveGame(), PollCampaignChalkboardMenu(), ResetGameTextContexts(), RunCampaignSelectionFrame(), RunPilotDatabaseMenu(), RunPilotSaveLoadMenu(), SelectLegacyGameSource(), SelectPersonnelFileSlot(), SelectTransferredPilot(), and ShowMemoryStatusDebug().
| void * LoadPacketAllocated | ( | char * | fileName, |
| short | section ) |
Definition at line 157 of file disk.c.
References AllocateTaggedMemory(), AppendPacketLoadDebugLog(), exit_squadron(), g_bRewritePacketExtensions, g_nOriginDevUnlock, g_nPacketError, GetNamedPacketSize(), LoadNamedPacket(), LoadPacketAllocated(), ReportPacketLoadError(), and RewritePacketFilenameForInstalledData().
Referenced by LoadOriginFxDrivers(), LoadPacketAllocated(), and SendCommMenuChoice().
| void * LoadPacketIntoBuffer | ( | char * | fileName, |
| short | section, | ||
| void * | destination, | ||
| int | registerHandle ) |
Definition at line 141 of file disk.c.
References AppendPacketLoadDebugLog(), g_bRewritePacketExtensions, g_nOriginDevUnlock, LoadNamedPacket(), LoadPacketIntoBuffer(), ReportPacketLoadError(), and RewritePacketFilenameForInstalledData().
Referenced by init_intelligence_data(), init_mission(), initialize_cockpit(), InitializeCockpitResources(), LoadPacketIntoBuffer(), LoadSpeechPacketIntoBuffer(), ProcessMissionWaveCommands(), and real_vid_transmit().
| short MaxShort | ( | short | a, |
| short | b ) |
Definition at line 36 of file disk.c.
References MaxShort().
Referenced by AdjustSpaceFramePeriod(), approach_and_engage(), auto_position(), chase_location(), check_destroy_target(), check_for_lost_control(), CheckPoint(), control_speed(), damage_ion_drive(), DrawCutsceneTextAt(), DrawHudMessageSlot(), explosion_shock_wave(), fire_flack(), get_right_shape(), get_ship_max_velocity(), GetShipAccelerationRate(), GetViewportIntersection(), goto_location(), init_hazard(), InitializeCockpitResources(), internal_damage(), match_rotation_goal(), MaxShort(), new_view(), object_collision(), prevent_collision(), real_crash_time(), remove_hazard(), ReportFramesSkipped(), revise_shields(), rotate_object_to_goal(), rotational_pos_to_scanner_pos(), set_eye_direction_and_position(), SetScale(), sound_effect(), SpawnFlakBurst(), start_dust(), transform_objects_to_your_view(), and your_internal_damage().
| short MinShort | ( | short | a, |
| short | b ) |
Definition at line 27 of file disk.c.
References MinShort().
Referenced by AdjustSpaceFramePeriod(), approach_and_engage(), asteroid_velocity(), auto_pilot_sequence(), check_destroy_target(), check_for_lost_control(), CheckPoint(), damage_ion_drive(), damage_your_component(), determine_pilot_hand(), DetermineFleetOverviewPilotHand(), DrawCutsceneTextAt(), explosion_shock_wave(), fire_flack(), get_right_shape(), get_ship_max_velocity(), GetShipAccelerationRate(), GetViewportIntersection(), handle_stress(), internal_damage(), match_rotation_goal(), MeasureMessageWidth(), Mget_distance(), MinShort(), object_collision(), prevent_collision(), RandomFixedAimComponent(), replenish_weapon_energy_bank(), ReportFramesSkipped(), rotate_object_to_goal(), rotational_pos_to_scanner_pos(), show_target_disp(), and transform_objects_to_your_view().
| void ReleaseTextFont | ( | short | fontIndex | ) |
Definition at line 274 of file disk.c.
References g_36_apTextGlyphs, ReleasePacketHandle(), and ReleaseTextFont().
Referenced by CalibrateJoystickInteractive(), free_cockpit(), and ReleaseTextFont().
| void ReportPacketLoadError | ( | void * | packet, |
| char * | fileName, | ||
| short | retry, | ||
| short | section, | ||
| const char * | sourceTag ) |
Definition at line 54 of file disk.c.
References FatalErrorAndExit(), g_6_szDefaultTextBufferText, g_nOriginDevUnlock, g_nPacketError, g_pszPacketAllocateOperation, g_pszPacketLoadErrorFormat, g_pszPacketReadOperation, GetAvailableFarMemory(), GetAvailableFarMemoryByType(), GetAvailableMainMemory(), GetLargestFreeMemoryBlockByType(), GetNamedPacketSize(), LogMemoryUsage(), and ReportPacketLoadError().
Referenced by FetchDiskPacketRetrying(), InitializeConversationViewport(), LoadPacketAllocated(), LoadPacketIntoBuffer(), and ReportPacketLoadError().
| void RewritePacketFilenameForInstalledData | ( | char * | fileName | ) |
Definition at line 126 of file disk.c.
References DosStrchr(), g_bRewritePacketExtensions, and RewritePacketFilenameForInstalledData().
Referenced by EMStartUp(), FetchDiskPacketRetrying(), LoadPacketAllocated(), LoadPacketIntoBuffer(), and RewritePacketFilenameForInstalledData().
| unsigned short WaitForAnyInputPress | ( | void | ) |
Definition at line 347 of file disk.c.
References g_bKeyboardMouseEnabled, PollInputEvent(), ReleaseInputEventQueue(), InputEventState::value, and WaitForAnyInputPress().
Referenced by DrawTextAt(), ejection_sequence(), InflightComputer(), ReleaseSpaceflightResources(), RunCampaignGameLoop(), ShowNoTransferablePilots(), WaitForAnyInputPress(), and WaitForQueuedInputPress().
| short WaitForInputKey | ( | void | ) |
Definition at line 319 of file disk.c.
References ConfigureInputPump(), FindQueuedInputEvent(), FlushInputEvents(), FlushPendingInputPresses(), g_176_pfnCurrentInputPump, PollJoystickButtonEvents(), ServiceInputDevices(), InputEventState::status, InputEventState::value, void(), and WaitForInputKey().
Referenced by AnimateTitleOrchestra(), DrawTextAt(), PlayTitleConductorCue(), PushTitleOrchestraAway(), RevealTitleLogo(), RunTitleScreen(), ShowGamePausedBanner(), ShowOnScreenMessage(), ShowVictoryScreen(), Title_Sequence(), wait_for_end_of_music(), and WaitForInputKey().
| const char* g_pszPacketAllocateOperation = "allocating memory" |
Definition at line 9 of file disk.c.
Referenced by ReportPacketLoadError().
| const char* g_pszPacketLoadErrorFormat |
Definition at line 10 of file disk.c.
Referenced by ReportPacketLoadError().
| const char* g_pszPacketReadOperation = "reading from disk" |
Definition at line 8 of file disk.c.
Referenced by ReportPacketLoadError().