|
Wing Commander
Reconstructed Win32 source (1996)
|
Scripted views, constellation effects and cockpit target rendering. More...
Go to the source code of this file.
Functions | |
| unsigned int | parse_view_script (void) |
| unsigned int | update_scripted_view (void) |
| void | initialize_scripted_view (const short *script) |
| unsigned int | InitializeFireworks (void) |
| short | TheEndFireWorks (Viewport *viewport, short count) |
| unsigned int | InitializeConstellationField (Viewport *viewport, short direction, short density) |
| unsigned int | DrawConstellationField (void) |
| short __stdcall | OpenPacketSection (const char *filename, short section, PacketSectionHandle *handle) |
| void __stdcall | CloseDataFileByHandle (PacketSectionHandle *handle) |
| void *__stdcall | DecompressPacketSection (PacketSectionHandle *handle, void *destination, unsigned short flags, void *decompressionWorkspace) |
| short | GetTargetColourIndex (void) |
| void | DrawFormattedText (const char *format,...) |
| void | show_target_disp (void) |
| void | set_new_vdu (short vdu) |
| void | DrawTargetRangeReadout (void) |
| void | SystemDebugPrintf (const char *format,...) |
| void | LogDisplayMode (const char *mode) |
| short __stdcall | CalcRectangleArea (const Viewport *viewport) |
| unsigned short __stdcall | AllocateViewport (Viewport *viewport, short clearColour, short flags) |
| void __stdcall | AlignSpriteFrameToRectCorner (const ShortRect *rectangle, ShortPoint *position, short corner, struct Shape *shape, short frame) |
Variables | |
| short | nScriptedViewObject = -1 |
| int | bScriptedView = 0 |
| static short | asConstellationVelocity [16] |
| static short | asConstellationFrame [16] |
| static short | nConstellationDirection = -1 |
| const char * | pszCommMenuHeading |
| char | szCommMenuHeadingBuf [0x40] |
| const char * | apszCommMenuChoiceTextTable [7] |
| int | anInputButton2PressTime [2] |
| short | asInputButton1DoubleClicksList [2] |
| short | asInputBtn1ChangedTable [2] |
| short | asInputButton2ChangedTable [2] |
| short | asPreviousInputButtons [2] |
| int | anInputButton1PressTimes [2] |
| static unsigned char * | pPacketDecompressionWorkspace = 0 |
| static unsigned short | wPacketDecompressionInputSizeOverride = 0 |
| static unsigned short | wPacketCompressionFormatFlags = 0 |
| static ShortRect | aTargetArmorClipRects [4] |
Scripted views, constellation effects and cockpit target rendering.
Address range 42cdb0-42e31f. The packet and viewport helpers stay in this contiguous unit provisionally.
Definition in file view.c.
| void __stdcall AlignSpriteFrameToRectCorner | ( | const ShortRect * | rectangle, |
| ShortPoint * | position, | ||
| short | corner, | ||
| struct Shape * | shape, | ||
| short | frame ) |
Definition at line 805 of file view.c.
References AlignSpriteFrameToRectCorner(), ShortRect::bottom, GetShapeFrameBounds(), ShortRect::left, ShortRect::right, ShortRect::top, ShortPoint::x, and ShortPoint::y.
Referenced by AlignSpriteFrameToRectCorner(), init_3Space_objects(), and SelectTrainSimMission().
| unsigned short __stdcall AllocateViewport | ( | Viewport * | viewport, |
| short | clearColour, | ||
| short | flags ) |
Definition at line 758 of file view.c.
References AllocateTaggedMemory(), AllocateViewport(), Viewport::allocation, apViewportAllocations, Viewport::bottom, ClearViewport(), Viewport::left, LogDisplayMode(), nAllocateViewportCallsValue, nVideoMode, nViewAllocTotal, Viewport::pixels, ReleasePacketHandle(), Viewport::right, Viewport::rowOffsets, and Viewport::top.
Referenced by AllocateViewport(), BriefingMap_DisplayMap(), BriefingMap_LoadShapes(), FetchDiskPacketRetrying(), init_3Space_objects(), InitFullScreenViewport(), initialize_view_buffer(), InitializeCockpitResources(), InitializeConversationViewport(), InitializeModalTextPanel(), InitializeRoomViewports(), PromptInsertNumberedDisk(), and ShowTrainSimHighScores().
| short __stdcall CalcRectangleArea | ( | const Viewport * | viewport | ) |
Definition at line 745 of file view.c.
References Viewport::bottom, CalcRectangleArea(), Viewport::left, LogDisplayMode(), nVideoMode, Viewport::right, and Viewport::top.
Referenced by CalcRectangleArea(), and init_3Space_objects().
| void __stdcall CloseDataFileByHandle | ( | PacketSectionHandle * | handle | ) |
Definition at line 438 of file view.c.
References CloseDataFile(), CloseDataFileByHandle(), and PacketSectionHandle::file.
Referenced by CloseDataFileByHandle(), GetPacketSize(), init_3Space_objects(), and PacketLoad().
| void *__stdcall DecompressPacketSection | ( | PacketSectionHandle * | handle, |
| void * | destination, | ||
| unsigned short | flags, | ||
| void * | decompressionWorkspace ) |
Definition at line 444 of file view.c.
References AllocateTaggedMemory(), PacketSectionHandle::compression, DecompressPacketSection(), PacketSectionHandle::file, FinishPacketDecompressionHook(), GetPacketDecompressionResult(), IdentityHandle(), nCurrentPacketDecompressScratchSegment, nPacketDecompressInputPositionValue, nPacketDecompressPending, nPacketDecompressResult, nPacketError, nPktDecompressSourceFile, pLastPacketAllocation, pPacketDecompressionWorkspace, pPktDecompInput, ReadPacketSectionData(), ReleasePacketHandle(), SeekPacketSection(), wPacketCompressionFormatFlags, wPacketDecompressInputSize, and wPacketDecompressionInputSizeOverride.
Referenced by DecompressPacketSection(), init_3Space_objects(), and PacketLoad().
| unsigned int DrawConstellationField | ( | void | ) |
Definition at line 289 of file view.c.
References aConstellationParticlesList, aConstellationStarsTable, asConstellationFrame, asConstellationVelocity, Viewport::bottom, ClearViewport(), cPrimaryViewBufferColour, DrawConstellationField(), DrawSpriteDefault(), ConstellationParticle::frame, Viewport::left, nConstellationDirection, nConstellationParticleTotal, nViewConstellationStarCount, pConstellationViewportPtr, pCurrentConstellationShape, RandomInRange(), Viewport::right, Viewport::top, ConstellationParticle::velocity, ConstellationParticle::x, and ConstellationParticle::y.
Referenced by CloseTalk(), DrawConstellationField(), DrawFuneralLongShot(), funeral_player(), init_3Space_objects(), and RecRoom().
Definition at line 679 of file view.c.
References acShipTargetTable, aeObjectClass, aeSpecialManeuvers, asObjDistancesTable, asObjectScreenXList, Viewport::bottom, bTargetLockAcquired, bTargetLockReadoutDirty, cBlackColour, cTargetDisplayObject, DrawCockpitReadout(), DrawTargetRangeReadout(), EraseCockpitReadoutRegion(), InvalidateVduMode(), Viewport::left, nRenderedSpaceFrame, nTargetLockCountdown, OBJECT_CLASS_SHIP, Viewport::right, set_new_vdu(), show_target_disp(), SPECIAL_MANEUVER_UNKNOWN_9, stRightVduViewport, and szTxtWorkspaceBuffer.
Referenced by DrawTargetRangeReadout(), init_3Space_objects(), and update_VDUs().
| short GetTargetColourIndex | ( | void | ) |
Definition at line 560 of file view.c.
References GetTargetColourIndex(), and nVideoMode.
Referenced by GetTargetColourIndex(), init_3Space_objects(), and LoadOriginFxDrivers().
| void initialize_scripted_view | ( | const short * | script | ) |
Definition at line 175 of file view.c.
References aShipVelocity, asObjectCollisionRadius, bScriptedView, init_ijk(), initialize_scripted_view(), parse_view_script(), pCurrentViewScriptPtr, and zero_vector().
Referenced by ejection_sequence(), init_3Space_objects(), initialize_scripted_view(), ShowCampaignVictorySequence(), ShowCarrierLaunchSequence(), ShowTigerClawEscapeScene(), and Title_Sequence().
| unsigned int InitializeConstellationField | ( | Viewport * | viewport, |
| short | direction, | ||
| short | density ) |
Definition at line 238 of file view.c.
References aConstellationParticlesList, aConstellationStarsTable, asConstellationFrame, asConstellationVelocity, Viewport::bottom, ConstellationParticle::frame, ConstellationStar::frame, InitializeConstellationField(), Viewport::left, nConstellationDirection, nConstellationParticleTotal, nViewConstellationStarCount, pConstellationViewportPtr, RandomInRange(), Viewport::right, Viewport::top, ConstellationParticle::velocity, ConstellationParticle::x, ConstellationStar::x, ConstellationParticle::y, and ConstellationStar::y.
Referenced by funeral_sequence(), init_3Space_objects(), InitializeConstellationField(), LoadFace(), RecRoom(), and SceneDirector().
| unsigned int InitializeFireworks | ( | void | ) |
Definition at line 186 of file view.c.
References aFireworksList, FireworkState::frame, and InitializeFireworks().
Referenced by init_3Space_objects(), InitializeFireworks(), ShowTheEndScreen(), and ShowVictoryScreen().
| void LogDisplayMode | ( | const char * | mode | ) |
Definition at line 736 of file view.c.
References ClearDebugPauseFlags(), LogDisplayMode(), PumpMessagesDuringWait(), and SystemDebugPrintf().
Referenced by AllocateViewport(), CalcRectangleArea(), init_3Space_objects(), and LogDisplayMode().
| short __stdcall OpenPacketSection | ( | const char * | filename, |
| short | section, | ||
| PacketSectionHandle * | handle ) |
Definition at line 371 of file view.c.
References CloseDataFile(), PacketSectionHandle::compression, PacketSectionHandle::dataOffset, PacketSectionHandle::dataSize, PacketSectionHandle::file, PacketSectionHandle::finalSection, nPacketError, OpenDataFileOrDie(), OpenPacketSection(), PacketSectionHandle::position, ReadDataFileAtOffset(), PacketSectionHandle::sectionCount, and SeekDataFile().
Referenced by GetPacketSize(), init_3Space_objects(), OpenPacketSection(), and PacketLoad().
| unsigned int parse_view_script | ( | void | ) |
Definition at line 36 of file view.c.
References AddFixedVectors(), alter_pitch(), alter_roll(), alter_yaw(), aShipFwdVec, aShipPositionsArray, aShipVelocity, asObjectCounterArray, bScriptedView, ComputeVectorDelta(), copy_frame(), fix_objects_ijk(), force_view(), nEyePitchRate, nEyePitchTargetValue, nEyeRollRate, nEyeRollTargetValue, nEyeYawGoalValue, nEyeYawRate, nScriptedViewObject, nShipMissionIndices, parse_view_script(), pCurrentViewScriptPtr, ScaleFixedVector(), FixedVector::x, FixedVector::y, and FixedVector::z.
Referenced by init_3Space_objects(), initialize_scripted_view(), parse_view_script(), and update_scripted_view().
Definition at line 573 of file view.c.
References aasShipArmor, aasShipShield, acShipRating, acShipTargetTable, aeObjectClass, aeObjectTypeList, aeSpecialManeuvers, aObjectTypeData, apszKilrathiAceNames, apWingmanPilotsList, ObjectTypeData::armorFront, asObjectScreenXList, aTargetArmorClipRects, Viewport::bottom, cDefaultTextColour, cRedColour, cTargetDisplayObject, ObjectTypeData::displayName, DrawFormattedText(), DrawSpriteDefault(), DrawTextAt(), InitializeCockpitReadout(), Viewport::left, MinShort(), nTargetLockMode, OBJECT_CLASS_SHIP, pCockpitIndicatorShape, Viewport::right, ObjectTypeData::shape, ObjectTypeData::shieldAft, ObjectTypeData::shieldFore, show_target_disp(), SPECIAL_MANEUVER_UNKNOWN_9, stRightVduTxtContext, stRightVduViewport, and Viewport::top.
Referenced by DrawTargetRangeReadout(), init_3Space_objects(), show_target_disp(), and update_VDUs().
| short TheEndFireWorks | ( | Viewport * | viewport, |
| short | count ) |
Definition at line 198 of file view.c.
References aabSoundEffectDescriptors, aFireworksList, DrawSpriteDefault(), FlushSoundEffectsAndLog(), FireworkState::frame, pFireworkShape, SoundFxTick(), FireworkState::soundHandle, TheEndFireWorks(), and FireworkState::x.
Referenced by init_3Space_objects(), ShowTheEndScreen(), ShowVictoryScreen(), and TheEndFireWorks().
| unsigned int update_scripted_view | ( | void | ) |
Definition at line 148 of file view.c.
References asObjectCounterArray, nEyePitchTargetValue, nEyeRollTargetValue, nEyeYawGoalValue, parse_view_script(), pCurrentViewScriptPtr, and update_scripted_view().
Referenced by init_3Space_objects(), set_eye_direction_and_position(), and update_scripted_view().
| int anInputButton1PressTimes[2] |
Definition at line 33 of file view.c.
Referenced by UpdateInputDeviceTransitions().
| int anInputButton2PressTime[2] |
Definition at line 28 of file view.c.
Referenced by UpdateInputDeviceTransitions().
| const char* apszCommMenuChoiceTextTable[7] |
Definition at line 27 of file view.c.
Referenced by AppendCommMenuChoice(), ResetCommMenuChoices(), and show_communications_disp().
|
static |
Definition at line 18 of file view.c.
Referenced by DrawConstellationField(), and InitializeConstellationField().
|
static |
Definition at line 15 of file view.c.
Referenced by DrawConstellationField(), and InitializeConstellationField().
| short asInputBtn1ChangedTable[2] |
Definition at line 30 of file view.c.
Referenced by PollJoystickButtonEvents(), PollMenuInputDevices(), and UpdateInputDeviceTransitions().
| short asInputButton1DoubleClicksList[2] |
Definition at line 29 of file view.c.
Referenced by PollJoystickButtonEvents(), PollMenuInputDevices(), and UpdateInputDeviceTransitions().
| short asInputButton2ChangedTable[2] |
Definition at line 31 of file view.c.
Referenced by PollJoystickButtonEvents(), PollMenuInputDevices(), and UpdateInputDeviceTransitions().
| short asPreviousInputButtons[2] |
Definition at line 32 of file view.c.
Referenced by UpdateInputDeviceTransitions().
|
static |
Definition at line 363 of file view.c.
Referenced by show_target_disp().
| int bScriptedView = 0 |
Definition at line 14 of file view.c.
Referenced by ejection_sequence(), init_3Space_objects(), initialize_scripted_view(), new_view(), parse_view_script(), set_eye_direction_and_position(), ShowCampaignVictorySequence(), ShowCarrierLaunchSequence(), ShowTigerClawEscapeScene(), and Title_Sequence().
|
static |
Definition at line 21 of file view.c.
Referenced by DrawConstellationField(), and InitializeConstellationField().
| short nScriptedViewObject = -1 |
Definition at line 13 of file view.c.
Referenced by ejection_sequence(), parse_view_script(), ShowCampaignVictorySequence(), ShowCarrierLaunchSequence(), and ShowTigerClawEscapeScene().
|
static |
Definition at line 359 of file view.c.
Referenced by DecompressPacketSection().
| const char* pszCommMenuHeading |
Definition at line 25 of file view.c.
Referenced by OpenCommMenuForTarget(), and show_communications_disp().
| char szCommMenuHeadingBuf[0x40] |
Definition at line 26 of file view.c.
Referenced by BuildCommunicationCommandMenu().
|
static |
Definition at line 361 of file view.c.
Referenced by DecompressPacketSection().
|
static |
Definition at line 360 of file view.c.
Referenced by DecompressPacketSection().