|
Wing Commander
Reconstructed Win32 source (1996)
|
WINGLEADER's main module: process services, flight control and the HUD. More...
Go to the source code of this file.
WINGLEADER's main module: process services, flight control and the HUD.
Address range 4272f0-42a8ef. The initialized state and the complete literal order identify this group; its trailing cursor and palette helpers are provisional.
Definition in file main.c.
| int calculate_damage_level | ( | void | ) |
Definition at line 2123 of file main.c.
References aasShipArmor, acShipDmg, aeObjectTypeList, aObjectTypeData, ObjectTypeData::armorFront, ObjectTypeData::armorLeft, ObjectTypeData::armorRear, ObjectTypeData::armorRight, asShipAccumulatedDmg, calculate_damage_level(), and ObjectTypeData::damageCapacity.
Referenced by calculate_damage_level(), GameFlow(), gametrack(), init_3Space_objects(), and update_lights().
| unsigned int clear_view_buffer | ( | void | ) |
Definition at line 414 of file main.c.
References clear_view_buffer(), ClearViewport(), cPrimaryViewBufferColour, and stSpaceBufferViewport.
Referenced by clear_view_buffer(), init_3Space_objects(), LaunchPlayerShip(), RefreshCockpitStatus(), ShowCampaignVictorySequence(), ShowCarrierLaunchSequence(), ShowGetReadyScreen(), ShowTigerClawEscapeScene(), and Title_Sequence().
Definition at line 1097 of file eventmgr.c.
References DosInterruptHandlerHook().
Referenced by DosInterruptHandlerHook(), and main().
| unsigned int Draw_3Space_Frame | ( | void | ) |
Definition at line 1832 of file main.c.
References Draw_3Space_Frame(), draw_sorted_objects_to_buffer(), nCameraViewMode, nFrameSkip, nFrameSkipCounter, nRenderedSpaceFrame, overlay_head_up_display(), place_exhaust_on_ships(), reposition_fixed_child_objects(), sort_object_depth(), transform_objects_to_your_view(), update_star_field(), and UpdateSpacePaletteFade().
Referenced by Draw_3Space_Frame(), init_3Space_objects(), RefreshCockpitStatus(), RenderSpaceViewFrame(), ShowCampaignVictorySequence(), ShowTigerClawEscapeScene(), and Title_Sequence().
| void DrawArcadeScorePanel | ( | short | x, |
| short | y ) |
Definition at line 1869 of file main.c.
References DrawArcadeScorePanel(), DrawFormattedText(), nArcadeTimeRemaining, and nCurrentArcadeScore.
Referenced by DrawArcadeScorePanel(), init_3Space_objects(), and UpdateArcadeScoreDisplay().
| unsigned int dump_buffer_to_screen | ( | void | ) |
Definition at line 383 of file main.c.
References bCockpitlessView, BlitViewportScanlineRuns(), Viewport::bottom, CopyViewportContents(), cScreenViewMode, dump_buffer_to_screen(), pScreenViewGeometry, ShowMemoryStatusDebug(), stScreenView, stSpaceBufferViewport, and Viewport::top.
Referenced by death_sequence(), dump_buffer_to_screen(), ejection_sequence(), init_3Space_objects(), LaunchPlayerShip(), RenderSpaceViewFrame(), ShowCampaignVictorySequence(), ShowCarrierLaunchSequence(), ShowGameOverScreen(), ShowGetReadyScreen(), ShowOnScreenMessage(), ShowTigerClawEscapeScene(), ShowVictoryScreen(), stranded_sequence(), and Title_Sequence().
| void exit_squadron | ( | const char * | msg | ) |
Definition at line 122 of file main.c.
References AbortToDesktop(), ClearDebugPauseFlags(), exit_squadron(), LogMemoryUsage(), SystemDebugPrintf(), and WriteDebugString().
Referenced by BarracksScreen(), CheckHeapBlockSignature(), CloseCommChoiceMenu(), DrawSpriteTransformed(), EMStartUp(), exit_squadron(), FatalErrorAndExit(), init_3Space_objects(), LoadOriginFxDrivers(), main(), MonoDebug_install(), MonoDebug_print(), PacketLoad(), PrepareShapeRLEData(), PushMemoryStackFrame(), RunAnimationDemoLoop(), Streamer_open(), and ValidateViewportBounds().
| unsigned int FadeFlightPaletteEntry | ( | short * | entry | ) |
Definition at line 496 of file main.c.
References FadeFlightPaletteEntry().
Referenced by FadeFlightPaletteEntry(), house_keep(), and init_3Space_objects().
| void __stdcall FadeViewportPaletteToColour | ( | Viewport * | viewport, |
| unsigned short | colour, | ||
| short | enabled ) |
Definition at line 2213 of file main.c.
References abPaletteTripletsArray, AllocateTaggedMemory(), CollectActivePaletteIndices(), DIBslam(), DIBslamReal(), FadeViewportPaletteToColour(), GetPaletteEntry(), nVideoMode, ReleasePacketHandle(), SetWholePaletteFromTriplets(), StepPaletteTransition(), and void().
Referenced by death_sequence(), ejection_sequence(), FadeViewportPaletteToColour(), funeral_sequence(), init_3Space_objects(), ShowCampaignVictorySequence(), ShowMeanwhileTransition(), stranded_sequence(), and Title_Sequence().
Definition at line 1862 of file main.c.
References FigureArcadeTime(), nArcadeTimeRemaining, and nArcadeWave.
Referenced by FigureArcadeTime(), init_3Space_objects(), RunTrainSim(), and set_up_next_wave().
| short FindNearestNavPoint | ( | short | ship | ) |
Definition at line 1967 of file main.c.
References ACTIVE_MISSION_NAV_POINT_COUNT, aMissionNavPoints, FindNearestNavPoint(), GetShipDistanceToNavPoint(), nCurrentNavigationPoint, MissionNavPoint::proximityRadius, and MissionNavPoint::type.
Referenced by abandoned(), FindNearestNavPoint(), init_3Space_objects(), and ReleaseStaleNavTarget().
| unsigned int fire_players_lasers | ( | void | ) |
Definition at line 802 of file main.c.
References acShipTargetTable, asObjectCounterArray, asShipWpnEnergyList, fire_fixed_projectile_weapon(), fire_players_lasers(), get_mode(), and SelectCockpitVduMode().
Referenced by fire_players_lasers(), HandleSpaceFlightControls(), init_3Space_objects(), and player_input().
| void flag_objective | ( | short | objective, |
| unsigned char | flags ) |
Definition at line 575 of file main.c.
References aInputDevSamples, bInputPollingGuard, InputDeviceSample::buttons, get_player_input(), nCurrentActiveInputDevice, stLastPolledFlightInput, TranslatePolledInputEvent(), UpdateInputDeviceTransitions(), InputDeviceSample::x, and InputDeviceSample::y.
Referenced by EMStartUp(), get_player_input(), InflightComputer(), init_3Space_objects(), RunSpaceFlight(), and ShowTheEndScreen().
Definition at line 1852 of file main.c.
References GetArcadeBonus(), nArcadeTimeRemaining, nArcadeWave, nArcadeWaveBonusValue, and nTrainSimMission.
Referenced by GetArcadeBonus(), init_3Space_objects(), and set_up_next_wave().
| unsigned int GetJoystickButtonEdge | ( | unsigned int | a, |
| short | b ) |
Definition at line 162 of file main.c.
References GetJoystickButtonEdge(), JoystickEdgeHook(), and void().
Referenced by GetJoystickButtonEdge(), init_3Space_objects(), and main().
| unsigned int GetScreenUpdateFlag | ( | void | ) |
Definition at line 361 of file main.c.
References EndCommMenu(), free_viewport(), GetScreenUpdateFlag(), message_showing(), Viewport::pixels, and stSpaceBufferViewport.
Referenced by auto_pilot_sequence(), death_sequence(), ejection_sequence(), free_3Space(), free_all_slots(), free_cockpit(), get_right_shape(), GetScreenUpdateFlag(), HandleSpaceFlightControls(), InflightComputer(), init_3Space_objects(), initialize_cockpit(), InitializeCockpitResources(), load_all_slots(), new_sphere_shapes(), RunSpaceFlight(), set_eye_direction_and_position(), and SetFleetOverviewView().
| short GetShipDistanceToNavPoint | ( | short | ship, |
| MissionNavPoint * | navPoint ) |
Definition at line 1957 of file main.c.
References aShipPositionsArray, ComputeVectorDelta(), FixedToShortSaturating(), GetShipDistanceToNavPoint(), MissionNavPoint::position, and Vector_magnitude().
Referenced by FindNearestNavPoint(), GetShipDistanceToNavPoint(), and init_3Space_objects().
| unsigned int HandleFleetOverviewInput | ( | void | ) |
Definition at line 1159 of file main.c.
References aShipFwdVec, aShipRightVector, aShipUpVector, bCurrentKey, cViewObject, EYE_OBJECT, HandleFleetOverviewInput(), nCameraViewMode, nCapitalShipViewDistance, rotate_about_i(), rotate_about_j(), FixedVector::x, FixedVector::y, and FixedVector::z.
Referenced by HandleFleetOverviewInput(), HandleSpaceFlightControls(), and init_3Space_objects().
| int HandleSpaceFlightControls | ( | void | ) |
Definition at line 1362 of file main.c.
References accelerate(), acPlayerComponentDamageList, acShipTargetTable, aeShipObjectiveList, anShipSpeed, anVolumeLevels, any_enemy(), aShipWeaponsTable, auto_pilot_sequence(), bCockpitlessView, bCurrentKey, bEscapePressedFlag, bMissileCameraEnabled, bMouseCursorVisible, Viewport::bottom, bPtrMovedByKeyboardState, bVideoImagesSuppressed, CalibrateJoystickInteractive(), Chosen_communicate_option(), ClearDebugPauseFlags(), CloseCommChoiceMenu(), cPreviousKey, cPrimaryTextColour, cRedColour, cScreenViewMode, cViewObject, drop_player_mine(), EndCommMenu(), fire_missile(), fire_players_lasers(), FlushInputEvents(), force_view(), get_mode(), GetControlKeyState(), GetF1KeyLatch(), GetKeyboardModifiers(), GetScreenUpdateFlag(), HandleFleetOverviewInput(), HandleSpaceFlightControls(), init_player_input(), initialize_cockpit(), initialize_view_buffer(), InvalidateVduMode(), Viewport::left, malf_sound(), message_showing(), nArcadeState, nCameraViewMode, nCommMenuChoiceCount, nCurrentViewCenterPosY, new_view(), nExternalViewShip, nFlightSoundEffectsEnabled, nMusicVolumeSetting, nScreenHeight, nScreenWidth, nSelectedReleaseWeaponIndex, nSfxVolumeSetting, nTargetLockMode, nTrainSimActive, nYourWingman, OBJECT_TYPE_SPACE_MINE, OBJECTIVE_HOLD_FORMATION, player_input(), players_flight_dynamics(), PlaySfxWaveFileByNumber(), RandomInRange(), ReportFramesSkipped(), request(), ResetSoundStateForFlight(), ResetSoundStateForScene(), Viewport::right, SelectCockpitVduMode(), SelectNextExternalViewObject(), SetFrameTimerPeriodDirect(), SetHudMessageText(), SetMessageDisplaySpeed(), SetMousePosition(), SetMusicStreamVolume(), SetSoundEffectsVolume(), SetViewportRect(), ShowGamePausedBanner(), ShowOnScreenMessage(), ShowVersionBanner(), stSpaceBufferViewport, Viewport::top, and your_afterburner().
Referenced by HandleSpaceFlightControls(), init_3Space_objects(), and RunSpaceFlight().
| unsigned int house_keep | ( | void | ) |
Definition at line 531 of file main.c.
References abCockpitLightGoalArray, aPaletteFadeEntries, check_hazards(), FadeFlightPaletteEntry(), FlushSoundEffectsAndLog(), house_keep(), nCameraViewMode, nCannedSceneMode, nCurrentDamageAlarmSfxHandle, nCurrentHazardFieldTotal, nCurrentSpaceFrameValue, nTrainSimActive, ReleaseStaleNavTarget(), and SetPaletteEntry().
Referenced by house_keep(), init_3Space_objects(), and Update_3Space().
Definition at line 564 of file main.c.
References bMouseCursorVisible, bPtrMovedByKeyboardState, ClearDebugPauseFlags(), init_player_input(), Viewport::left, nCurrentViewCenterPosY, Viewport::right, SetMousePosition(), and stSpaceBufferViewport.
Referenced by HandleSpaceFlightControls(), init_3Space_objects(), init_player_input(), process_player_input(), and PumpWindowMessages().
| unsigned int initialize_view_buffer | ( | void | ) |
Definition at line 371 of file main.c.
References AllocateViewport(), bViewBufferEnabled, cPrimaryViewBufferColour, initialize_view_buffer(), Viewport::pixels, ReportOutOfMemoryAndExit(), and stSpaceBufferViewport.
Referenced by auto_pilot_sequence(), free_all_slots(), get_right_shape(), HandleSpaceFlightControls(), InflightComputer(), init_3Space_objects(), initialize_cockpit(), initialize_view_buffer(), new_sphere_shapes(), RunSpaceFlight(), and set_eye_direction_and_position().
| unsigned int InitializeConversationText | ( | void | ) |
Definition at line 448 of file main.c.
References TextContext::alignment, cBlackColour, cViewportClearColour, InitializeConversationText(), InitializeTextContextFromFont(), SetTextContext(), stCurrentConvTextViewport, stCurrentConvTxtCtx, stModalSrcViewport, szDefaultTxtBuf, TextContext::text, Viewport::top, and TextContext::viewport.
Referenced by AwardCampaignMedal(), DeBriefing(), funeral_sequence(), init_3Space_objects(), InitializeConversationText(), landing(), LoadBriefingRoom(), Office(), RecRoom(), ShowCampaignVictorySequence(), ShowMeanwhileTransition(), ShowTigerClawEscapeScene(), and ViewMedals().
| unsigned int InitializeConversationViewport | ( | void | ) |
Definition at line 422 of file main.c.
References AllocateViewport(), Viewport::bottom, cBlackColour, ClearViewport(), InitializeConversationViewport(), Viewport::left, ReportPacketLoadError(), Viewport::right, stModalSrcViewport, stSceneBuffer, stScreenView, and Viewport::top.
Referenced by AwardCampaignMedal(), DeBriefing(), funeral_sequence(), init_3Space_objects(), InitializeConversationViewport(), landing(), LoadBriefingRoom(), Office(), PlayScrambleHangarScene(), scramble(), ShowMeanwhileTransition(), and ShowTheEndScreen().
| short __stdcall IsInputEventQueued | ( | short | type | ) |
Definition at line 371 of file eventmgr.c.
| short LogMemoryUsage | ( | void | ) |
Definition at line 102 of file main.c.
References dwOriginalFreeMem, EMShutDown(), GetFixedOneMillionThunkAlt(), GetMessagePumpResult(), GetOriginalFreeMemory(), LogMemoryUsage(), MessagePumpHook(), MouseIdleHook(), nOriginDevUnlock, nSavedDosInterruptVector, ShutdownHook(), ShutdownVideoHook(), and SystemDebugPrintf().
Referenced by EMStartUp(), exit_squadron(), init_3Space_objects(), LogMemoryUsage(), PumpWindowMessages(), and ReportPacketLoadError().
| int main | ( | short | argc, |
| char ** | argv ) |
Definition at line 171 of file main.c.
References abDiskPromptDriveStates, anVolumeLevels, bCampaignActive, bCampaignStartupMode, bCurrentExpandedMemoryAvail, bCurrentRunningFromHardDiskFlag, bDirectDrawModeCascadeEnabled, bEscapePressedFlag, bPlayerCollisionResponse, bPlayerVulnerable, bSavedGameExists, bShowFrameRate, bSlowSceneAnimation, CampaignState::currentMission, CampaignState::currentSeries, DosInterruptHandlerHook(), exit_squadron(), ExitCleanupHook(), FrameStartHook(), GameFlow(), GetCurrentDiskDriveHook(), GetFixedOneMillionThunkAlt(), GetJoystickButtonEdge(), GetShutdownErrorCode(), GetStartupErrorCode(), init_mission(), LoadInstallDat(), LoadOriginFxDrivers(), LoadVolumeSettingsFromRegistry(), LoadWingCmdrCfgFile(), main(), nMainArcadeStartupParameterValue, nMusicPlaybackMode, nMusicVolumeSetting, nOriginDevUnlock, nSavedDosInterruptVector, nSfxVolumeSetting, nShowMemoryStatus, nStartNavPointOverride, nVideoMode, pCurrentStartupArgumentsPtr, pGameVersion, ResetCampaignData(), RunAnimationDemoLoop(), RunSpaceFlight(), SetCinematicFrameTiming(), SetMusicStreamVolume(), SetSoundEffectsVolume(), ShutdownHook(), StartNewCampaign(), StartupHook(), stCampaignState, stInitialCampaignState, SystemDebugPrintf(), Title_Sequence(), and WaitForKeyAcknowledge().
Referenced by init_3Space_objects(), main(), and WinMain().
| short MeasureMessageWidth | ( | const char * | text | ) |
Definition at line 1218 of file main.c.
References bMessageSpeed, DosStrlen(), MeasureMessageWidth(), and MinShort().
Referenced by init_3Space_objects(), MeasureMessageWidth(), real_vid_transmit(), and ShowOnScreenMessage().
| short MinShort | ( | short | a, |
| short | b ) |
Definition at line 20 of file mathutil.c.
| unsigned int player_input | ( | void | ) |
Definition at line 846 of file main.c.
References accelerate(), aeSpecialManeuvers, asInputButton2DoubleClick, asMousePitchThresholds, asMouseYawThresholds, bAfterburnerButtonLatched, bCockpitlessView, bCurrentKey, bCurrentKeyboardEvtQueued, bFlightRollLatch, bHostPrimaryMouseButton, bHostSecondaryMouseButton, bJoystickEventQueued, bMouseAfterburnerControl, bMouseButtonEventQueuedFlag, bMouseCursorVisible, bMouseMoveEvtQueued, Viewport::bottom, InputDeviceSample::buttons, cCurrentCockpitView, cPreviousKey, dwLastSecondaryButtonPress, fire_players_lasers(), MouseCursorState::frame, GetNextInputEvent(), IsInputEventQueued(), Viewport::left, InputEventState::modifiers, nCurrentActiveInputDevice, nCurrentViewCenterPosY, nInputTickScale, nMousePitchInput, nMouseYawInput, nTickCount60Hz, player_input(), PollInputEvent(), PollKeyboardState(), process_player_input(), Viewport::right, SPECIAL_MANEUVER_AFTERBURNER, stLastPolledFlightInput, stMouseCursorState, stPreviousFlightInput, stPreviousRotationInput, stRotationInput, stSpaceBufferViewport, Viewport::top, TranslatePolledInputEvent(), InputEventState::value, WarpMouseTo(), wCurrentInputModifiers, InputDeviceSample::x, MouseCursorState::x, ShortVector::x, InputDeviceSample::y, InputEventState::y, MouseCursorState::y, ShortVector::y, and ShortVector::z.
Referenced by HandleSpaceFlightControls(), init_3Space_objects(), and player_input().
| unsigned int players_flight_dynamics | ( | void | ) |
Definition at line 815 of file main.c.
References aeSpecialManeuvers, anObjectRollRotationList, anObjectYawRotation, anObjPitchRot, aObjectTypeData, asObjectCounterArray, players_flight_dynamics(), CampaignState::playerShipType, SPECIAL_MANEUVER_BLOWING_UP, SPECIAL_MANEUVER_NONE, stCampaignState, stRotationInput, ShortVector::x, ShortVector::y, and ShortVector::z.
Referenced by HandleSpaceFlightControls(), init_3Space_objects(), and players_flight_dynamics().
| short __stdcall PollInputEvent | ( | InputEventState * | event, |
| short | filter ) |
Definition at line 336 of file eventmgr.c.
| int process_player_input | ( | void | ) |
Definition at line 605 of file main.c.
References anVolumeLevels, bCurrentKey, bMouseCursorVisible, Viewport::bottom, cPreviousKey, GetControlKeyState(), GetShiftKeyState(), init_player_input(), Viewport::left, nMusicVolumeSetting, nSfxVolumeSetting, process_player_input(), Viewport::right, SaveVolumeSettingsToRegistry(), SetMusicStreamVolume(), SetSoundEffectsVolume(), ShowOnScreenMessage(), stRotationInput, stSpaceBufferViewport, Viewport::top, WarpMouseTo(), ShortVector::x, ShortVector::y, and ShortVector::z.
Referenced by init_3Space_objects(), player_input(), and process_player_input().
| unsigned int RefreshCockpitStatus | ( | void | ) |
Definition at line 1948 of file main.c.
References clear_view_buffer(), Draw_3Space_Frame(), nFrameSkipCounter, RefreshCockpitStatus(), and Update_3Space().
Referenced by death_sequence(), ejection_sequence(), init_3Space_objects(), LaunchPlayerShip(), RefreshCockpitStatus(), ShowCarrierLaunchSequence(), ShowGameOverScreen(), ShowGetReadyScreen(), ShowVictoryScreen(), and stranded_sequence().
| unsigned int RefreshMemoryStatusOverlay | ( | void | ) |
Definition at line 467 of file main.c.
References CopyViewportContents(), RefreshMemoryStatusOverlay(), ShowMemoryStatusDebug(), stSceneBuffer, stScreenView, and WaitForVerticalBlankThunk().
Referenced by AnimateScrambleWalk(), CloseLook(), CloseTalk(), DebriefingEstablishingShot(), Dismissed(), DrawBriefingLongShot(), DrawFuneralLongShot(), DrawMedalChest(), DrawMedalLongShot(), DrawPodiumShot(), DrawScrambleFrame(), EstablishingShot(), funeral_player(), init_3Space_objects(), MedalEstablish(), PinMedal(), PlaySceneAnimation(), PlayScrambleHangarScene(), RefreshMemoryStatusOverlay(), ReturnToBriefingLongShot(), ShowTheEndScreen(), and ViewMedals().
| unsigned int ReleaseStaleNavTarget | ( | void | ) |
Definition at line 1984 of file main.c.
References FindNearestNavPoint(), nCurrentNavigationPoint, ReleaseStaleNavTarget(), and set_up_action_sphere().
Referenced by auto_pilot_sequence(), house_keep(), init_3Space_objects(), and ReleaseStaleNavTarget().
| unsigned int RenderSpaceViewFrame | ( | void | ) |
Definition at line 1913 of file main.c.
References aShipPositionsArray, bCockpitlessView, check_message(), ClearViewport(), cPrimaryViewBufferColour, Draw_3Space_Frame(), DrawFilledViewportRect(), dump_buffer_to_screen(), nArcadeBonusCountdown, nArcadeState, nArcadeWave, nArcadeWaveBonusValue, nCameraViewMode, nCurrentArcadeScore, nCurrentWave, nTrainSimActive, RenderSpaceViewFrame(), RestoreCockpitExplosionIfVisible(), RestoreTransientCockpitGraphics(), Viewport::right, stSpaceBufferViewport, UpdateArcadeScoreDisplay(), Vector_magnitude(), and zero_vector().
Referenced by init_3Space_objects(), RenderSpaceViewFrame(), RunSpaceFlight(), Title_Sequence(), and visit_the_cinema().
| void ReportFramesSkipped | ( | short | adjustment | ) |
Definition at line 1353 of file main.c.
References MaxShort(), MinShort(), nFrameSkip, ReportFramesSkipped(), and ShowOnScreenMessage().
Referenced by HandleSpaceFlightControls(), init_3Space_objects(), and ReportFramesSkipped().
| void ReportOutOfMemoryAndExit | ( | const char * | resource | ) |
Definition at line 1277 of file main.c.
References FatalErrorAndExit(), ReportOutOfMemoryAndExit(), ShowModalMessage(), and szInsufficientMemory.
Referenced by BriefingMap_LoadShapes(), ejection_sequence(), init_3Space_objects(), initialize_view_buffer(), and ReportOutOfMemoryAndExit().
Definition at line 2175 of file main.c.
References ResetMouseCursorFrame(), SetMouseCursorShape(), MouseCursorState::shape, and stMouseCursorState.
Referenced by InflightComputer(), init_3Space_objects(), and ResetMouseCursorFrame().
| unsigned int ResetScreenClipToFullHeight | ( | void | ) |
Definition at line 439 of file main.c.
References Viewport::bottom, free_viewport(), ResetScreenClipToFullHeight(), stSceneBuffer, stScreenView, and Viewport::top.
Referenced by AwardCampaignMedal(), DeBriefing(), funeral_sequence(), init_3Space_objects(), landing(), LoadBriefingRoom(), Office(), PlayScrambleHangarScene(), ResetScreenClipToFullHeight(), scramble(), ShowMeanwhileTransition(), and ShowTheEndScreen().
| void rotate_about_i | ( | short | angle, |
| FixedVector * | j, | ||
| FixedVector * | k ) |
| void rotate_about_j | ( | short | angle, |
| FixedVector * | i, | ||
| FixedVector * | k ) |
| int RunSpaceFlight | ( | short | entryNavPoint | ) |
Definition at line 1994 of file main.c.
References aMissionShips, bCockpitEnabled, bCockpitlessView, bInputModeState, bMouseAfterburnerControl, bMouseCursorVisible, Viewport::bottom, bPtrMovedByKeyboardState, ClearDebugPauseFlags(), copy_frame(), cScreenViewMode, DIBslam(), DIBslamReal(), find_objective(), flag_objective(), FlushInputEvents(), free_inflight_music(), get_player_input(), GetScreenUpdateFlag(), HandleSpaceFlightControls(), init_inflight_music(), initialize_cockpit(), initialize_view_buffer(), Viewport::left, liFlightAfterCockpitCounter, liFlightAfterInputCounter, liFlightFrameEndCounter, liFrameStart, liRenderDoneCounter, liSimulationDone, nArcadeState, MissionShipRecord::navPoint, nCurrentViewCenterPosY, nDrawDelta, new_view(), nFlightFrameTicks, nFlightPresentDelta, nFrameSkipCounter, nHudDelta, nInputTicks, nScreenHeight, nScreenWidth, nSimulationDelta, nTrainSimActive, nUnusedFlightProfileTicksA, nUnusedFlightProfileTicksB, nUnusedFlightProfileTicksC, MissionHeaderDisk::playerMissionShip, QueueInputEvent(), ReadPerformanceCounter(), RenderSpaceViewFrame(), ResetCockpitPaletteEntries(), Viewport::right, RunSpaceFlight(), set_up_action_sphere(), SetCinematicFrameTiming(), SetEventManagerPump(), SetMouseCursorShape(), SetMousePosition(), SetSpaceFlightFrameTiming(), SetViewportRect(), MouseCursorState::shape, stCurrentMissionHeader, stMouseCursorState, stSpaceBufferViewport, Viewport::top, Update_3Space(), update_cockpit(), MouseCursorState::viewport, and WarpMouseTo().
Referenced by GameFlow(), init_3Space_objects(), main(), RunSpaceFlight(), and RunTrainSim().
| unsigned int SelectNextExternalViewObject | ( | void | ) |
Definition at line 1112 of file main.c.
References aeObjectClass, cViewObject, OBJECT_CLASS_SHIP, and SelectNextExternalViewObject().
Referenced by HandleSpaceFlightControls(), init_3Space_objects(), and SelectNextExternalViewObject().
| unsigned int SelectPreviousExternalViewObject | ( | void | ) |
Definition at line 1142 of file main.c.
References aeObjectClass, cViewObject, OBJECT_CLASS_SHIP, and SelectPreviousExternalViewObject().
Referenced by init_3Space_objects(), and SelectPreviousExternalViewObject().
| void SetHudMessageText | ( | char * | text, |
| unsigned short | colour, | ||
| unsigned short | duration ) |
Definition at line 1344 of file main.c.
References bMessageSpeed, SetMessageDisplaySpeed(), and ShowOnScreenMessage().
Referenced by HandleSpaceFlightControls(), init_3Space_objects(), and SetMessageDisplaySpeed().
| void ShowGamePausedBanner | ( | short | showBanner | ) |
Definition at line 1327 of file main.c.
References ShowGamePausedBanner(), ShowOnScreenMessage(), and WaitForKeyAcknowledge().
Referenced by HandleSpaceFlightControls(), init_3Space_objects(), and ShowGamePausedBanner().
| unsigned int ShowMemoryStatusDebug | ( | void | ) |
Definition at line 135 of file main.c.
References cBlackColour, cViewportClearColour, DrawFormattedText(), dwOriginalFreeMem, GetFixedOneMillionThunkAlt(), GetOriginalFreeMemory(), InitializeTextContextFromFont(), nShowMemoryStatus, pCurTextContext, SetTextContext(), ShowMemoryStatusDebug(), and stDefaultTxtContext.
Referenced by BarracksScreen(), dump_buffer_to_screen(), init_3Space_objects(), RecRoom(), RefreshMemoryStatusOverlay(), and ShowMemoryStatusDebug().
| void ShowModalMessage | ( | const char * | format, |
| ... ) |
Definition at line 1258 of file main.c.
References ReleaseModalTextPanel(), ShowModalMessage(), ShowModalTextPanel(), SystemDebugPrintf(), and WaitForKeyAcknowledge().
Referenced by ConfirmAwakenAfterBadData(), get_pilot_talk(), init_3Space_objects(), LoadGameFromSlot(), ReportOutOfMemoryAndExit(), SaveGameWithNamePrompt(), and ShowModalMessage().
| short ShowModalTextPanel | ( | short | fontIndex, |
| const char * | format, | ||
| ... ) |
Definition at line 123 of file barracks.c.
| void ShowOnScreenMessage | ( | int | flags, |
| short | duration, | ||
| const char * | format, | ||
| ... ) |
Definition at line 1284 of file main.c.
References cRedColour, DosStrcpy(), dump_buffer_to_screen(), FlushInputEvents(), MeasureMessageWidth(), ReleaseModalTextPanel(), SetHudMessageText(), SetHudTextColour(), ShowHudTextLine(), ShowModalTextPanel(), ShowOnScreenMessage(), szHudMessageBuf, and WaitForKeyAcknowledge().
Referenced by HandleSpaceFlightControls(), init_3Space_objects(), process_player_input(), ReportFramesSkipped(), SetMessageDisplaySpeed(), ShowGamePausedBanner(), ShowOnScreenMessage(), and ShowVersionBanner().
Definition at line 1337 of file main.c.
References pGameVersion, ShowOnScreenMessage(), and ShowVersionBanner().
Referenced by HandleSpaceFlightControls(), init_3Space_objects(), and ShowVersionBanner().
| unsigned int TriggerPlayerHitPaletteFlash | ( | void | ) |
Definition at line 488 of file main.c.
References asDamageFlashColour, nCameraViewMode, and TriggerPlayerHitPaletteFlash().
Referenced by inflict_damage(), init_3Space_objects(), and TriggerPlayerHitPaletteFlash().
| unsigned int Update_3Space | ( | void | ) |
Definition at line 476 of file main.c.
References house_keep(), house_keep_objects(), nCurrentSpaceFrameValue, servicetrack(), set_eye_direction_and_position(), Update_3Space(), and update_objects_in_space().
Referenced by auto_pilot_sequence(), init_3Space_objects(), RefreshCockpitStatus(), RunSpaceFlight(), ShowCampaignVictorySequence(), ShowTigerClawEscapeScene(), Title_Sequence(), Update_3Space(), and visit_the_cinema().
Definition at line 1880 of file main.c.
References Viewport::bottom, DrawArcadeScorePanel(), FormatTextBufferFromStart(), Viewport::left, nArcadeBonusCountdown, nArcadeState, nArcadeTimeRemaining, nArcadeWave, nArcadeWaveBonusValue, nCurrentArcadeScore, nCurrentWave, nTrainSimActive, nTrainSimMission, SetTextContext(), SetTextCursor(), stHudMessageTextContext, stSpaceBufferViewport, Viewport::top, and UpdateArcadeScoreDisplay().
Referenced by init_3Space_objects(), RenderSpaceViewFrame(), and UpdateArcadeScoreDisplay().
Definition at line 2181 of file main.c.
References ClearRoomMenuLabel(), RoomMenu::cursorFrame, TitleMenuRegion::frame, IsPointInRect(), TitleMenuRegion::left, RoomMenu::regions, SelectRoomMenuLabel(), SetMouseCursorShape(), MouseCursorState::shape, stCurrentRoomMenu, stMouseCursorState, UpdateRoomMenuCursor(), MouseCursorState::x, and MouseCursorState::y.
Referenced by BarracksScreen(), init_3Space_objects(), InitializeRoomViewports(), RecRoom(), and UpdateRoomMenuCursor().
| unsigned int UpdateSpacePaletteFade | ( | void | ) |
Definition at line 509 of file main.c.
References asDamageFlashColour, bViewportDirty, ClearViewport(), cPrimaryViewBufferColour, cRedColour, nVideoMode, SetPaletteEntry(), stSpaceBufferViewport, and UpdateSpacePaletteFade().
Referenced by Draw_3Space_Frame(), init_3Space_objects(), ShowCarrierLaunchSequence(), and UpdateSpacePaletteFade().
Definition at line 2157 of file main.c.
References aTrainSimMissionRegions, TitleMenuRegion::frame, IsPointInRect(), TitleMenuRegion::left, SetMouseCursorShape(), MouseCursorState::shape, stMouseCursorState, UpdateTrainSimMenuCursor(), MouseCursorState::x, and MouseCursorState::y.
Referenced by init_3Space_objects(), SelectTrainSimMission(), and UpdateTrainSimMenuCursor().
| void WaitForKeyAcknowledge | ( | int | mode | ) |
Definition at line 1225 of file main.c.
References ClearDebugPauseFlags(), FlushInputEvents(), IsInputEventQueued(), PumpMessagesDuringWait(), PumpWindowMessages(), and WaitForKeyAcknowledge().
Referenced by init_3Space_objects(), main(), ShowGamePausedBanner(), ShowModalMessage(), ShowOnScreenMessage(), and WaitForKeyAcknowledge().
| unsigned char abPaletteTripletsArray[256][3] |
Definition at line 91 of file main.c.
Referenced by FadeViewportPaletteToColour().
|
static |
Definition at line 30 of file main.c.
Referenced by HandleSpaceFlightControls(), main(), and process_player_input().
|
static |
Definition at line 58 of file main.c.
Referenced by player_input().
|
static |
Definition at line 54 of file main.c.
Referenced by player_input().
|
static |
Definition at line 64 of file main.c.
Referenced by player_input().
| int bCockpitlessView = 0 |
Definition at line 39 of file main.c.
Referenced by auto_pilot_sequence(), draw_3d_scanner(), draw_cockpit_lights(), dump_buffer_to_screen(), fire_weapon(), HandleSpaceFlightControls(), InflightComputer(), initialize_cockpit(), overlay_head_up_display(), player_input(), print_message_text(), RenderSpaceViewFrame(), RestoreTransientCockpitGraphics(), RunSpaceFlight(), set_eye_direction_and_position(), set_up_screen_viewport(), update_cockpit(), update_VDUs(), UpdateDamageDisplay(), and vid_transmit().
| short bCurrentKeyboardEvtQueued |
Definition at line 94 of file main.c.
Referenced by player_input().
|
static |
Definition at line 63 of file main.c.
Referenced by player_input().
| unsigned char bInputPollingGuard = 0 |
Definition at line 44 of file main.c.
Referenced by get_player_input(), PollJoystickButtonEvents(), and PollMenuInputDevices().
| short bJoystickEventQueued |
Definition at line 97 of file main.c.
Referenced by player_input().
|
static |
Definition at line 47 of file main.c.
Referenced by player_input(), and RunSpaceFlight().
| short bMouseButtonEventQueuedFlag |
Definition at line 93 of file main.c.
Referenced by player_input().
| volatile int bMouseCursorVisible = 0 |
Definition at line 43 of file main.c.
Referenced by HandleSpaceFlightControls(), init_player_input(), overlay_head_up_display(), player_input(), process_player_input(), RestoreTransientCockpitGraphics(), and RunSpaceFlight().
| short bMouseMoveEvtQueued |
Definition at line 95 of file main.c.
Referenced by player_input().
| int bPlayerCollisionResponse = 1 |
Definition at line 37 of file main.c.
Referenced by CheckLauncherAndConfig(), main(), object_collision(), and visit_the_cinema().
| int bPlayerCollisionsEnabled = 1 |
Definition at line 35 of file main.c.
Referenced by house_keep_objects().
| int bPlayerVulnerable = 1 |
Definition at line 36 of file main.c.
Referenced by CheckLauncherAndConfig(), explode(), inflict_damage(), main(), pilot_hit(), and visit_the_cinema().
| int bViewBufferEnabled = 0 |
Definition at line 38 of file main.c.
Referenced by free_3Space(), initialize_cockpit(), and initialize_view_buffer().
| int bViewportDirty = 0 |
Definition at line 27 of file main.c.
Referenced by ShowTigerClawEscapeScene(), unwarp(), UpdateSpacePaletteFade(), and warp().
|
static |
Definition at line 61 of file main.c.
Referenced by player_input().
|
static |
Definition at line 81 of file main.c.
Referenced by RunSpaceFlight().
|
static |
Definition at line 75 of file main.c.
Referenced by RunSpaceFlight().
|
static |
Definition at line 76 of file main.c.
Referenced by RunSpaceFlight().
|
static |
Definition at line 78 of file main.c.
Referenced by RunSpaceFlight().
|
static |
Definition at line 83 of file main.c.
Referenced by RunSpaceFlight().
|
static |
Definition at line 79 of file main.c.
Referenced by RunSpaceFlight().
| short nArcadeBonusCountdown = 0 |
Definition at line 42 of file main.c.
Referenced by RenderSpaceViewFrame(), RunTrainSim(), set_up_next_wave(), and UpdateArcadeScoreDisplay().
| int nArcadeState = 0 |
Definition at line 22 of file main.c.
Referenced by check_stranded(), explode(), GameFlow(), HandleSpaceFlightControls(), house_keep_objects(), is_alive(), pilot_hit(), RenderSpaceViewFrame(), RunSpaceFlight(), RunTrainSim(), and UpdateArcadeScoreDisplay().
| int nCannedSceneMode = 0 |
Definition at line 21 of file main.c.
Referenced by auto_pilot_sequence(), death_sequence(), draw_nav_pointer(), house_keep(), LaunchPlayerShip(), npc_communication(), object_intelligence(), RunTrainSim(), send_message(), set_up_next_wave(), ShowCampaignVictorySequence(), ShowGetReadyScreen(), ShowTigerClawEscapeScene(), stranded_sequence(), Title_Sequence(), and vid_equiv().
| unsigned int nCurrentFrameTimerIdValue |
Definition at line 90 of file main.c.
Referenced by SetMultimediaTimerCallback().
| int nDamageDisplayPhase |
Definition at line 88 of file main.c.
Referenced by UpdateDamageDisplay().
| int nDmgDispState |
Definition at line 87 of file main.c.
Referenced by show_damage_disp().
|
static |
Definition at line 84 of file main.c.
Referenced by RunSpaceFlight().
|
static |
Definition at line 73 of file main.c.
Referenced by RunSpaceFlight().
|
static |
Definition at line 77 of file main.c.
Referenced by RunSpaceFlight().
| short nFrameSkip = 1 |
Definition at line 24 of file main.c.
Referenced by AnimateScrambleWalk(), CloseLook(), DebriefingEstablishingShot(), Dismissed(), Draw_3Space_Frame(), DrawScrambleFrame(), funeral_player(), LoadOriginFxDrivers(), LongTalk(), PlaySceneAnimation(), PlayScrambleHangarScene(), ReportFramesSkipped(), and ShowCarrierLaunchSequence().
| short nFrameSkipCounter = 1 |
Definition at line 23 of file main.c.
Referenced by AnimateScrambleWalk(), CloseLook(), death_sequence(), DebriefingEstablishingShot(), Dismissed(), Draw_3Space_Frame(), DrawScrambleFrame(), ejection_sequence(), funeral_player(), funeral_sequence(), funeral_wingman(), landing(), LaunchPlayerShip(), LongTalk(), PlaySceneAnimation(), PlayScrambleHangarScene(), RefreshCockpitStatus(), RunSpaceFlight(), scramble(), ShowCampaignVictorySequence(), ShowCarrierLaunchSequence(), ShowGameOverScreen(), ShowGetReadyScreen(), ShowTheEndScreen(), ShowTigerClawEscapeScene(), ShowVictoryScreen(), Title_Sequence(), and UpdateSceneAnimationObject().
|
static |
Definition at line 74 of file main.c.
Referenced by RunSpaceFlight().
|
static |
Definition at line 82 of file main.c.
Referenced by RunSpaceFlight().
|
static |
Definition at line 68 of file main.c.
Referenced by player_input().
|
static |
Definition at line 66 of file main.c.
Referenced by player_input().
| int nMusicVolumeSetting = 0x14 |
Definition at line 26 of file main.c.
Referenced by HandleSpaceFlightControls(), LoadVolumeSettingsFromRegistry(), main(), process_player_input(), and SaveVolumeSettingsToRegistry().
| int nOriginDevUnlock = 0 |
Definition at line 34 of file main.c.
Referenced by CheckLauncherAndConfig(), EnterPilotNameAndCallsign(), LoadGameFromSlot(), LogMemoryUsage(), main(), and visit_the_cinema().
| int nSfxVolumeSetting = 0x14 |
Definition at line 25 of file main.c.
Referenced by HandleSpaceFlightControls(), LoadVolumeSettingsFromRegistry(), main(), process_player_input(), and SaveVolumeSettingsToRegistry().
|
static |
Definition at line 40 of file main.c.
Referenced by main(), and ShowMemoryStatusDebug().
|
static |
Definition at line 80 of file main.c.
Referenced by RunSpaceFlight().
| short nStartNavPointOverride = -1 |
Definition at line 41 of file main.c.
Referenced by main(), and prepare_mission().
| char* pCurrentStartupArgumentsPtr[30] |
Definition at line 96 of file main.c.
Referenced by LoadWingCmdrCfgFile(), and main().
| struct Shape* pLaunchDoorShape |
Definition at line 89 of file main.c.
Referenced by DrawLaunchDoorFrame(), and LaunchPlayerShip().
| Viewport stCurrentTrainSimTitleDisplayViewport |
Definition at line 99 of file main.c.
Referenced by AnimateTrainSimTitle(), SelectTrainSimMission(), and ShowTrainSimHighScores().
|
static |
Definition at line 45 of file main.c.
Referenced by get_player_input(), and player_input().
| InputDeviceSample stPreviousFlightInput |
Definition at line 92 of file main.c.
Referenced by player_input().