|
Wing Commander II
Reconstructed Win32 source (1996)
|
Spaceflight setup: shapes, cockpit, constellations and music. More...
#include "game.h"Go to the source code of this file.
Macros | |
| #define | COCKPIT_VIEW_COPY_BYTES(section) |
Variables | |
| short | g_nCockpitBackgroundBytes = 0 |
| PacketResourceDescriptor | g_aCommon3SpaceResources [11] |
| PacketResourceDescriptor | g_aMissionResourceDescriptors [8] |
| PacketResourceDescriptor | g_aHighMemoryCockpitResources [5] |
| PacketResourceDescriptor | g_aCockpitCommonShapeResources [5] |
| PacketResourceDescriptor | g_aCockpitShipShapeResources [8] |
| PacketResourceDescriptor | g_aCockpitViewShapeResources [5] |
| int | g_nUnusedFltsetupWord1 = 1 |
| short | g_asConstellationObjectIndices [4] |
| short | g_bCockpitResourcesActive = 0 |
| short | g_b3SpaceObjectsActive = 0 |
| unsigned char * | g_pGenericMissileShape = 0 |
| unsigned char * | g_pGenericMissileExhaustShape = 0 |
| char | g_7_szCockpitAssetFilenameText [16] |
| unsigned char * | g_2_apCockpitViewShapes [4] |
| Viewport | g_stCockpitBackgroundViewportRecord |
| unsigned char * | g_2_apCockpitShipShapes [4] |
| int | g_nUnusedFltsetupWord2 [2] |
| unsigned char * | g_pCockpitViewFrameInfo |
Spaceflight setup: shapes, cockpit, constellations and music.
Definition in file fltsetup.c.
| #define COCKPIT_VIEW_COPY_BYTES | ( | section | ) |
Definition at line 11 of file fltsetup.c.
Referenced by initialize_cockpit().
Definition at line 890 of file fltsetup.c.
References free_3Space(), free_3Space_objects(), free_constellation(), free_view_buffer(), FreeShapeSet(), g_aMissionResourceDescriptors, g_b3SpaceObjectsActive, g_bSpaceViewBufferEnabled, g_pNavLocationText, ReleasePacketHandle(), and remove_all_hazards().
Referenced by close_behind(), free_3Space(), and ReleaseSpaceflightResources().
Definition at line 909 of file fltsetup.c.
References ObjectTypeData::animation, free_3Space_objects(), free_ship(), FreePacketAndClear(), FreeShapeSet(), g_1_nResourcePaletteState, g_aCommon3SpaceResources, g_aObjectTypeData, g_pGenericMissileExhaustShape, g_pGenericMissileShape, OBJECT_DATA_BURNING_DEBRIS, OBJECT_DATA_DART_DF, OBJECT_DATA_EJECTED_PILOT, OBJECT_DATA_GIRDER_CHUNK, OBJECT_DATA_O_RING, OBJECT_DATA_PILUM_FF, OBJECT_DATA_PIPE, OBJECT_DATA_SHIP_TUBING, OBJECT_DATA_SPICULUM_IR, and ObjectTypeData::shapeSet.
Referenced by close_behind(), free_3Space(), and free_3Space_objects().
Definition at line 742 of file fltsetup.c.
References free_cockpit(), free_view_buffer(), free_viewport(), FreeCommDisplayResources(), FreePacketAndClear(), FreeShapeSet(), g_1_nResourcePaletteState, g_48_apCommunicationTextPacketsTable, g_4_pScannerBlipUnderlayPointer, g_7_szCockpitAssetFilenameText, g_acObjectType, g_aCockpitCommonShapeResources, g_aCockpitShipShapeResources, g_aCockpitViewShapeResources, g_aObjectTypeData, g_apCockpitVduOverlayShapes, g_bCockpitResourcesActive, g_nLoadedCommPortraitPilot, g_nObjectType62Index, g_nObjectType63Index, g_pCockpitBackgroundPacket, g_pCockpitExplosionBackground, g_pCockpitHudBackground, g_pCommPortraitResource, g_pCommVduFrameResource, g_pDamageDisplayBackground, g_pHudMessageBackground, g_pHudMessageFrameShape, g_pPendingCockpitDamageShape, g_pPilotHandAnimationShapePtr, g_pReleaseWeaponDisplayBackground, g_stPilotHandBackgroundViewportBlock, g_stPilotHandViewportRecord, ReleasePacketHandle(), and ReleaseTextFont().
Referenced by close_behind(), death_sequence(), free_cockpit(), and ReleaseSpaceflightResources().
Definition at line 460 of file fltsetup.c.
References free_constellation(), FreeConstellationObject(), FreePacketAndClear(), g_asConstellationObjectIndices, and g_pConstellationSprite.
Referenced by close_behind(), free_3Space(), and free_constellation().
Definition at line 944 of file fltsetup.c.
References free_inflight_music(), g_aLimitedMusicBuffers, g_aTuneResources, g_nInFlightMusicActive, MusicResource::packet, and StopMusicUnlessSuppressed().
Referenced by close_behind(), free_inflight_music(), and RunSpaceFlight().
| void FreeConstellationObject | ( | short | object | ) |
Definition at line 418 of file fltsetup.c.
References FreeConstellationObject(), FreePacketAndClear(), g_apObjectShape, and remove_object().
Referenced by close_behind(), free_constellation(), and FreeConstellationObject().
| void FreeShapeSet | ( | PacketResourceDescriptor * | resources, |
| unsigned short | releaseFlags ) |
Definition at line 38 of file fltsetup.c.
References FreePacketAndClear(), FreeShapeSet(), and PacketResourceDescriptor::resource.
Referenced by close_behind(), free_3Space(), free_3Space_objects(), free_cockpit(), FreeShapeSet(), and load_common_3Space_objects().
| void init_3Space_objects | ( | short | scene | ) |
Definition at line 810 of file fltsetup.c.
References g_1_cStoredViewDisplayModeValue, g_6_nPendingAfterburnerSfxFrame, g_aObjectResourceSlots, g_b3SpaceObjectsActive, g_bMissileCameraEnabled, g_nExternalViewShip, g_nPassingShipSndCooldown, g_nPlayerCollisionObject, g_nRenderedSpaceFrame, g_nSpaceFrame, init_3Space_objects(), init_constellation(), load_common_3Space_objects(), and remove_all_3d_objects().
Referenced by close_behind(), init_3Space_objects(), and init_mission().
| void init_constellation | ( | short | scene | ) |
Definition at line 425 of file fltsetup.c.
References FetchDiskPacketRetrying(), find_vacant_3d_object(), g_13_pStartupStellarPacket, g_asConstellationObjectIndices, g_nAvailableGameMemoryNumber, g_pConstellationSprite, init_constellation(), and InitializeConstellationObject().
Referenced by BarracksScreen(), close_behind(), ejection_sequence(), init_3Space_objects(), init_constellation(), PromptToContinueCampaign(), and RunTitleScreen().
Definition at line 935 of file fltsetup.c.
References g_nCombatMusicActive, g_nInFlightMusicActive, g_nInitialFlightMusicPending, and init_inflight_music().
Referenced by close_behind(), init_inflight_music(), and RunSpaceFlight().
Definition at line 476 of file fltsetup.c.
References g_101_stScrViewInfo, g_1_stRightVduTextContextBlock, g_2_stLeftwardVduPortBlock, g_4_stRightVduView, g_5_stLeftVduStringContextRecord, g_6_szDefaultTextBufferText, g_anLastDrawnVduMode, g_cSecondaryViewBufferColour, g_ucPrimaryTextColour, init_vdus(), InitializeTextContextFromFont(), set_mode(), TextContext::text, and TextContext::viewport.
Referenced by close_behind(), init_vdus(), and InitializeCockpitResources().
| void initialize_cockpit | ( | signed char | mode | ) |
Definition at line 100 of file fltsetup.c.
References AllocateViewport(), Viewport::allocation, Viewport::bottom, clear_head_up_display(), ClearViewport(), COCKPIT_VIEW_COPY_BYTES, CopyViewportContents(), DosMemmove(), DrawSpriteDefault(), EndCommMenu(), explosion_draw(), FetchDiskPacketRetrying(), FinalizeTargetCameraViewHook(), free_view_buffer(), free_viewport(), g_101_stScrViewInfo, g_19_bStoredHighMemoryEnabled, g_1_cStoredViewDisplayModeValue, g_27_stViewScratchInfo, g_2_apCockpitShipShapes, g_2_apCockpitViewShapes, g_2_stModalSourceWindow, g_7_szCockpitAssetFilenameText, g_8_nGunDisplaySlot, g_9_nTargetCameraOverlayMode, g_acObjectType, g_aObjectTypeData, g_bCockpitDamageFrame0Shown, g_bSpaceViewBufferEnabled, g_cPrimaryViewBufferColour, g_cSecondaryViewBufferColour, g_nCockpitDisplayMode, g_nCurrentView, g_nScreenHeight, g_nScreenWidth, g_pCockpitBackgroundPacket, g_pCockpitViewFrameInfo, g_stCockpitBackgroundViewportRecord, IdentityDword(), initialize_cockpit(), initialize_view_buffer(), InvalidateVduMode(), Viewport::left, LoadNamedPacket(), LoadPacketIntoBuffer(), message_showing(), Viewport::pixels, ReleasePacketHandle(), reset_cockpit(), ResetCockpitPaletteEntries(), ResetPilotHandAnimation(), ResetTargetCameraView(), Viewport::right, Viewport::rowOffsets, set_up_screen_viewport(), SetViewportRect(), Viewport::top, update_VDUs(), and WaitForVerticalBlankThunk().
Referenced by close_behind(), HandleSpaceFlightControls(), initialize_cockpit(), new_view(), RunSpaceFlight(), and SetFleetOverviewView().
| void InitializeCockpitResources | ( | short | shipType | ) |
Definition at line 507 of file fltsetup.c.
References AllocateTaggedMemory(), AllocateViewport(), CockpitResourceLayout::bars, ShortRect::bottom, clear_cockpit_damage(), ClearHudGunReadouts(), CountShipCockpitGunDisplays(), CockpitResourceLayout::damagePositions, FetchDiskPacketRetrying(), CockpitResourceLayout::field_f6, CockpitResourceLayout::field_f7, free_view_buffer(), FreePacketAndClear(), g_101_stScrViewInfo, g_12_nGunDisplayCount, g_16_stCockpitTextSettingsRecord, g_19_bStoredHighMemoryEnabled, g_1_nGunShowEnergyPercent, g_1_nResourcePaletteState, g_1_pDashWeaponPicture, g_2_stLeftwardVduPortBlock, g_3_stDashViewport, g_48_apCommunicationTextPacketsTable, g_4_pScannerBlipUnderlayPointer, g_4_stRightVduView, g_66_pCabinHudImage, g_7_szCockpitAssetFilenameText, g_9_stCockpitMeterPort, g_abGunDisplayConfiguration, g_acCockpitLightOffFrame, g_acCockpitLightOnFrame, g_acObjectType, g_aCockpitBarDefinitions, g_aCockpitCommonShapeResources, g_aCockpitDamagePositions, g_aCockpitReadoutOrigins, g_aCockpitShipShapeResources, g_aCockpitViewShapeResources, g_aDefaultWeaponDisplayPositions, g_aObjectTypeData, g_apCockpitVduOverlayShapes, g_asCockpitLightX, g_asCockpitLightY, g_bCockpitResourcesActive, g_bRadioSilence, g_bTargetLockDisplayEnabled, g_cHazardBaseTravelTime, g_cSecondaryViewBufferColour, g_nCockpitBackgroundBytes, g_nCockpitExplosionFrame, g_nHazardPitchRange, g_nHudMessageBackgroundDepth, g_nObjectType62Index, g_nObjectType63Index, g_pCockpitBackgroundPacket, g_pCockpitExplosionBackground, g_pCockpitExplosionShape, g_pCockpitHudBackground, g_pDamageDisplayBackground, g_pHudMessageBackground, g_pHudMessageFrameShape, g_pPilotHandAnimationShapePtr, g_pReleaseWeaponDisplayBackground, g_stCockpitScannerGeometry, g_stHudMessageOrigin, g_stLeftVduBounds, g_stPilotHandBackgroundViewportBlock, g_stPilotHandBounds, g_stPilotHandOrigin, g_stPilotHandViewportRecord, g_stRightVduBounds, g_ucPrimaryTextColour, GetNamedPacketSize(), HasShipCockpitGunDisplay(), CockpitResourceLayout::hudMessageOrigin, init_vdus(), InitializeCockpitReadout(), InitializeCockpitResources(), InitializeTextContextFromFont(), ShortRect::left, Viewport::left, CockpitResourceLayout::leftVduBounds, CockpitResourceLayout::lightOffFrame, CockpitResourceLayout::lightOnFrame, CockpitResourceLayout::lightX, CockpitResourceLayout::lightY, LoadNamedPacket(), LoadPacketIntoBuffer(), LoadShapeSet(), MaxShort(), MeasureShapeFrameStorage(), CockpitResourceLayout::pilotHandBounds, CockpitResourceLayout::pilotHandOrigin, CockpitResourceLayout::readoutOrigins, ReportFatalErrorCode(), reset_cockpit(), ResetScannerContacts(), ShortRect::right, CockpitResourceLayout::rightVduBounds, CockpitResourceLayout::scanner, SetTextContext(), SetTextCursor(), SetViewportRect(), ObjectTypeData::shapeSet, CockpitResourceLayout::targetLockDisplayEnabled, ShortRect::top, TextContext::viewport, and CockpitResourceLayout::weaponDisplayPositions.
Referenced by close_behind(), ejection_sequence(), init_mission(), and InitializeCockpitResources().
| void InitializeConstellationObject | ( | const ConstellationObjectDefinition * | definition, |
| short | object ) |
Definition at line 388 of file fltsetup.c.
References alter_pitch(), alter_roll(), alter_yaw(), FetchDiskPacketRetrying(), g_aeObjectClass, g_apObjectShape, g_aShipForwardVector, g_aShipPosition, g_asObjectScreenAngle, g_asObjectScreenScale, g_asObjectType, g_asObjectViewFrame, g_nSelectedCampaignSlot, init_ijk(), InitializeConstellationObject(), OBJECT_CLASS_PLANET, ConstellationObjectDefinition::pitch, ConstellationObjectDefinition::roll, ScaleFixedVector(), ConstellationObjectDefinition::shapePacket, and ConstellationObjectDefinition::yaw.
Referenced by close_behind(), init_constellation(), and InitializeConstellationObject().
Definition at line 834 of file fltsetup.c.
References ObjectTypeData::animation, FetchDiskPacketRetrying(), free_ship(), FreeShapeSet(), g_19_bStoredHighMemoryEnabled, g_1_nResourcePaletteState, g_aCommon3SpaceResources, g_aObjectTypeData, g_pGenericMissileExhaustShape, g_pGenericMissileShape, load_common_3Space_objects(), load_ship(), LoadShapeSet(), OBJECT_CLASS_MISSILE, and ObjectTypeData::shapeSet.
Referenced by close_behind(), ejection_sequence(), init_3Space_objects(), and load_common_3Space_objects().
| int LoadPacketResourceList | ( | PacketResourceDescriptor * | resources, |
| short | flags, | ||
| int | availableBytes, | ||
| char * | defaultFileName ) |
Definition at line 51 of file fltsetup.c.
References FetchDiskPacketRetrying(), GetNamedPacketSize(), LoadPacketResourceList(), PacketResourceDescriptor::resource, and PacketResourceDescriptor::section.
Referenced by close_behind(), init_mission(), and LoadPacketResourceList().
| short LoadShapeSet | ( | PacketResourceDescriptor * | resources, |
| short | flags, | ||
| char * | defaultFileName ) |
Definition at line 15 of file fltsetup.c.
References FetchDiskPacketRetrying(), PacketResourceDescriptor::fileName, LoadShapeSet(), PacketResourceDescriptor::resource, and PacketResourceDescriptor::section.
Referenced by close_behind(), InitializeCockpitResources(), load_common_3Space_objects(), LoadShapeSet(), and LoadSpaceflightResources().
| void PreloadMusicTrack | ( | int | track | ) |
Definition at line 961 of file fltsetup.c.
References FetchDiskPacketRetrying(), g_aTuneResources, g_nMusicDriverMode, MusicResource::packet, and PreloadMusicTrack().
Referenced by close_behind(), PreloadMusicTrack(), RunCampaignChalkboardMenu(), and RunTitleScreen().
| void ReleaseMusicTrack | ( | int | track | ) |
Definition at line 976 of file fltsetup.c.
References FreePacketAndClear(), g_98_nMemConfiguration, g_aLimitedMusicBuffers, g_aTuneResources, g_nMusicDriverMode, and ReleaseMusicTrack().
Referenced by close_behind(), ReleaseMusicTrack(), RunCampaignChalkboardMenu(), and RunTitleScreen().
Definition at line 881 of file fltsetup.c.
References remove_all_3d_objects(), and remove_object().
Referenced by close_behind(), init_3Space_objects(), and remove_all_3d_objects().
Definition at line 76 of file fltsetup.c.
References g_1_asSpacePaletteFade, g_9_aasCockpitHitPaletteFades, g_cPrimaryViewBufferColour, ResetCockpitPaletteEntries(), and SetPaletteEntry().
Referenced by close_behind(), initialize_cockpit(), LoadGamePaletteFile(), ResetCockpitPaletteEntries(), ResetTargetCameraView(), and RunSpaceFlight().
| unsigned char* g_2_apCockpitShipShapes[4] |
Definition at line 1069 of file fltsetup.c.
Referenced by initialize_cockpit().
| unsigned char* g_2_apCockpitViewShapes[4] |
Definition at line 1067 of file fltsetup.c.
Referenced by initialize_cockpit().
| char g_7_szCockpitAssetFilenameText[16] |
Definition at line 1066 of file fltsetup.c.
Referenced by death_sequence(), free_cockpit(), initialize_cockpit(), InitializeCockpitResources(), and LoadCutsceneCockpitOverlay().
| PacketResourceDescriptor g_aCockpitCommonShapeResources[5] |
Definition at line 1031 of file fltsetup.c.
Referenced by free_cockpit(), and InitializeCockpitResources().
| PacketResourceDescriptor g_aCockpitShipShapeResources[8] |
Definition at line 1038 of file fltsetup.c.
Referenced by free_cockpit(), and InitializeCockpitResources().
| PacketResourceDescriptor g_aCockpitViewShapeResources[5] |
Definition at line 1048 of file fltsetup.c.
Referenced by free_cockpit(), and InitializeCockpitResources().
| PacketResourceDescriptor g_aCommon3SpaceResources[11] |
Definition at line 1001 of file fltsetup.c.
Referenced by free_3Space_objects(), load_common_3Space_objects(), and LoadSpaceflightResources().
| PacketResourceDescriptor g_aHighMemoryCockpitResources[5] |
Definition at line 1024 of file fltsetup.c.
Referenced by LoadSpaceflightResources().
| PacketResourceDescriptor g_aMissionResourceDescriptors[8] |
Definition at line 1014 of file fltsetup.c.
Referenced by free_3Space(), init_mission(), and LoadSpaceflightResources().
| short g_asConstellationObjectIndices[4] |
Definition at line 1056 of file fltsetup.c.
Referenced by free_constellation(), and init_constellation().
| short g_b3SpaceObjectsActive = 0 |
Definition at line 1060 of file fltsetup.c.
Referenced by ejection_sequence(), free_3Space(), and init_3Space_objects().
| short g_bCockpitResourcesActive = 0 |
Definition at line 1059 of file fltsetup.c.
Referenced by free_cockpit(), InitializeCockpitResources(), and ReleaseSpaceflightResources().
| short g_nCockpitBackgroundBytes = 0 |
Definition at line 1000 of file fltsetup.c.
Referenced by InitializeCockpitResources().
| int g_nUnusedFltsetupWord1 = 1 |
Definition at line 1055 of file fltsetup.c.
| int g_nUnusedFltsetupWord2[2] |
Definition at line 1070 of file fltsetup.c.
| unsigned char* g_pCockpitViewFrameInfo |
Definition at line 1071 of file fltsetup.c.
Referenced by initialize_cockpit().
| unsigned char* g_pGenericMissileExhaustShape = 0 |
Definition at line 1062 of file fltsetup.c.
Referenced by free_3Space_objects(), load_common_3Space_objects(), and set_objects_data().
| unsigned char* g_pGenericMissileShape = 0 |
Definition at line 1061 of file fltsetup.c.
Referenced by free_3Space_objects(), load_common_3Space_objects(), and set_objects_data().
| Viewport g_stCockpitBackgroundViewportRecord |
Definition at line 1068 of file fltsetup.c.
Referenced by explosion_draw(), and initialize_cockpit().