|
Wing Commander
Reconstructed Win32 source (1996)
|
DirectDraw back end: frame buffer, palette and screen updates. More...
Go to the source code of this file.
DirectDraw back end: frame buffer, palette and screen updates.
Address range 431f00-43390f. The named DirectDraw routines are followed by DirectDrawResultToText and its compiler-generated switch tables. ThrottleFrameAndDrawFps belongs here: it uses this unit's statics szFrameRateLabel and fSampledFps, and its 1000.0 constant follows the unit's DirectDraw GUIDs in .rdata.
Definition in file dib.c.
| void CachePaletteEntryFromWords | ( | short | index, |
| short * | rgb ) |
Definition at line 760 of file dib.c.
References abDIBPaletteQuads, awPaletteRgbWordsList, and CachePaletteEntryFromWords().
Referenced by CachePaletteEntryFromWords(), PanToScreen(), and PlaySfxWaveFileByNumber().
| int DIBcascade | ( | int | mode, |
| int * | reportedResult ) |
Definition at line 286 of file dib.c.
References DIBcascade(), DIBerror(), nDIBCascadeLevel, pDirectDraw2, pDirectDrawPalette, pPrimarySurface, and pSecondarySurface.
Referenced by DIBcascade(), DIBinstall(), DIBreInstall(), and PlaySfxWaveFileByNumber().
Definition at line 487 of file dib.c.
References abDIBPixelBackup, DAT_00476640, DAT_00476644, DIBdestroyDIB(), DIBerror(), nDIBCascadeLevel, nDIBFrameHeight, nDIBFrameWidth, pDIBImage, pPrimarySurface, and pSecondarySurface.
Referenced by DIBdestroyDIB(), DIBunInstall(), and PlaySfxWaveFileByNumber().
| void DIBerror | ( | const char * | tag, |
| int | hr ) |
Definition at line 191 of file dib.c.
References COM_RELEASE, DIBerror(), DirectDrawResultToText(), hDIBParentWindow, pDirectDraw2, pPrimarySurface, pSecondarySurface, and szDIBFailureString.
Referenced by DIBcascade(), DIBdestroyDIB(), DIBerror(), DIBinstall(), DIBmakeDIB(), DIBramPalette(), DIBreInstall(), DIBsetPalette(), DIBslamReal(), DIBupdate(), DIBwholePaletteFromTriplets(), DIBwholePaletteFromWords(), and PlaySfxWaveFileByNumber().
| void DIBinstall | ( | HWND | window | ) |
Definition at line 241 of file dib.c.
References abDIBPaletteQuads, abDIBPixelBackup, bDirectDrawModeCascadeEnabled, bPendingDIBSlam, DIBcascade(), DIBerror(), DIBinstall(), DIBmakeDIB(), guidDirectDraw2, hDIBParentWindow, nDIBCascadeLevel, nDIBSlamTotal, and pDirectDraw2.
Referenced by CreateMainWindow(), DIBinstall(), and PlaySfxWaveFileByNumber().
Definition at line 422 of file dib.c.
References abDIBPaletteQuads, abDIBPixelBackup, Viewport::allocation, DAT_00476640, DAT_00476644, DAT_00486058, DIBerror(), DIBmakeDIB(), GetDIBPixelBuffer(), nDIBCascadeLevel, nDIBFrameHeight, nDIBFrameWidth, pDIBImage, pDirectDraw2, pDirectDrawPalette, Viewport::pixels, pPrimarySurface, pSecondarySurface, and stScreenView.
Referenced by DIBinstall(), DIBmakeDIB(), and PlaySfxWaveFileByNumber().
Definition at line 735 of file dib.c.
References DIBpixelBufferHook().
Referenced by DIBpixelBufferHook().
Definition at line 213 of file dib.c.
References COM_RELEASE, DIBpositionWindow(), hDIBParentWindow, pDirectDraw2, pPrimarySurface, and pSecondarySurface.
Referenced by DIBpositionWindow(), PlaySfxWaveFileByNumber(), ReportHeapGuardCorruption(), and ShowNoticeMessageBox().
Definition at line 772 of file dib.c.
References abDIBPaletteQuads, DIBerror(), DIBramPalette(), and pDirectDrawPalette.
Referenced by DIBramPalette(), PanToScreen(), and PlaySfxWaveFileByNumber().
Definition at line 224 of file dib.c.
References bDirectDrawModeCascadeEnabled, DIBcascade(), DIBerror(), DIBreInstall(), DIBslam(), DIBslamReal(), hDIBParentWindow, nDIBCascadeLevel, and pDirectDraw2.
Referenced by DIBreInstall(), PlaySfxWaveFileByNumber(), and PumpWindowMessages().
| void DIBsetPalette | ( | short | index, |
| short * | rgb ) |
Definition at line 794 of file dib.c.
References abDIBPaletteQuads, awPaletteRgbWordsList, DIBerror(), DIBsetPalette(), pDirectDrawPalette, and pPrimarySurface.
Referenced by DIBsetPalette(), PlaySfxWaveFileByNumber(), and SetPaletteEntry().
Definition at line 513 of file dib.c.
References bPendingDIBSlam, and DIBslam().
Referenced by AnimateScrambleWalk(), AnimateTrainSimTitle(), AppendFormattedText(), BarracksScreen(), BlitViewportScanlineRuns(), ClearViewport(), CloseLook(), death_sequence(), DeBriefing(), DebriefingEstablishingShot(), DIBreInstall(), DIBslam(), Dismissed(), DisplayTrainSimHighScoreTable(), DrawDebriefingLongShot(), DrawFormattedText(), DrawFuneralLongShot(), DrawMedalChest(), DrawMedalLongShot(), DrawMedals(), DrawNavLocationReadout(), DrawScrambleFrame(), DrawTextAt(), DrawViewportEllipse(), DrawViewportEllipseShadow(), ejection_sequence(), EstablishingShot(), FadeViewportPaletteToColour(), FillViewportEllipse(), fizzle_fade(), FormatTextBufferFromStart(), funeral_player(), InflightComputer(), initialize_cockpit(), landing(), LaunchPlayerShip(), LongTalk(), MedalEstablish(), Office(), PanToScreen(), PinMedal(), PlaySceneAnimation(), PlayScrambleHangarScene(), PlaySfxWaveFileByNumber(), print_subtitle(), PromptForTextInput(), PumpWindowMessages(), ReadTextInput(), RecRoom(), ReleaseModalTextPanel(), RestoreSpriteBackground(), ReturnToBriefingLongShot(), RunSpaceFlight(), RunTrainSim(), SelectTrainSimMission(), shaded_triangle(), shadow_draw(), ShowCampaignVictorySequence(), ShowCarrierLaunchSequence(), ShowChalkBoard(), ShowGameOverScreen(), ShowGetReadyScreen(), ShowMeanwhileTransition(), ShowModalTextPanel(), ShowTheEndScreen(), ShowTigerClawEscapeScene(), ShowTrainSimHighScores(), ShowTrainSimTextMessage(), ShowVictoryScreen(), snow_viewport(), stranded_sequence(), Title_Sequence(), triangle(), UpdateTrainSimHighScores(), ValidateViewportBounds(), ViewMedals(), and visit_the_cinema().
Definition at line 519 of file dib.c.
References bPendingDIBSlam, CaptureMouseCursorBackground(), DIBerror(), DIBslamReal(), DrawMouseCursor(), hDIBParentWindow, nDIBCascadeLevel, nDIBFrameHeight, nDIBFrameWidth, nDIBSlamTotal, pDIBImage, pDirectDraw2, Viewport::pixels, pPrimarySurface, pSecondarySurface, RestoreMouseCursorBackground(), ServiceSoundSystem(), stMouseCursorState, ThrottleFrameAndDrawFps(), UpdateStreamerStoppedFlag(), and MouseCursorState::viewport.
Referenced by AnimateScrambleWalk(), AnimateTrainSimTitle(), BarracksScreen(), CalibrateJoystickInteractive(), ClearViewport(), CloseLook(), death_sequence(), DeBriefing(), DebriefingEstablishingShot(), DIBreInstall(), DIBslamReal(), Dismissed(), DisplayTrainSimHighScoreTable(), DrawDebriefingLongShot(), DrawFuneralLongShot(), DrawMedalChest(), DrawMedalLongShot(), DrawMedals(), DrawNavLocationReadout(), DrawScrambleFrame(), ejection_sequence(), EstablishingShot(), FadeViewportPaletteToColour(), funeral_player(), InflightComputer(), initialize_cockpit(), landing(), LaunchPlayerShip(), LongTalk(), MedalEstablish(), Office(), PanToScreen(), PinMedal(), PlaySceneAnimation(), PlayScrambleHangarScene(), PlaySfxWaveFileByNumber(), PromptForTextInput(), PumpWindowMessages(), ReadTextInput(), RecRoom(), ReleaseModalTextPanel(), ReturnToBriefingLongShot(), RunSpaceFlight(), RunTrainSim(), SelectTrainSimMission(), ShowCampaignVictorySequence(), ShowCarrierLaunchSequence(), ShowChalkBoard(), ShowGameOverScreen(), ShowGetReadyScreen(), ShowMeanwhileTransition(), ShowModalTextPanel(), ShowTheEndScreen(), ShowTigerClawEscapeScene(), ShowTrainSimHighScores(), ShowTrainSimTextMessage(), ShowVictoryScreen(), stranded_sequence(), Title_Sequence(), UpdateTrainSimHighScores(), ViewMedals(), and visit_the_cinema().
Definition at line 412 of file dib.c.
References COM_RELEASE, DIBdestroyDIB(), DIBunInstall(), pDirectDraw2, pPrimarySurface, and pSecondarySurface.
Referenced by DIBunInstall(), PlaySfxWaveFileByNumber(), ShutdownGameWindow(), and WinMain().
| void DIBupdate | ( | int | left, |
| int | top, | ||
| int | right, | ||
| int | bottom ) |
Definition at line 665 of file dib.c.
References DIBerror(), DIBupdate(), nDIBCascadeLevel, nDIBFrameWidth, pDIBImage, pDirectDraw2, and pPrimarySurface.
Referenced by DIBupdate(), PlaySfxWaveFileByNumber(), and RefreshMouseCursorDisplay().
Definition at line 917 of file dib.c.
References DIBwaitForVerticalBlank(), and pDirectDraw2.
Referenced by DIBwaitForVerticalBlank(), PlaySfxWaveFileByNumber(), and WaitForVerticalBlankThunk().
| void DIBwholePaletteFromTriplets | ( | unsigned char * | palette | ) |
Definition at line 841 of file dib.c.
References abDIBPaletteQuads, DIBerror(), DIBwholePaletteFromTriplets(), pDirectDraw2, pDirectDrawPalette, and pPrimarySurface.
Referenced by DIBwholePaletteFromTriplets(), PlaySfxWaveFileByNumber(), and SetWholePaletteFromTriplets().
| void DIBwholePaletteFromWords | ( | short * | palette | ) |
Definition at line 879 of file dib.c.
References abDIBPaletteQuads, DIBerror(), DIBwholePaletteFromWords(), pDirectDraw2, pDirectDrawPalette, and pPrimarySurface.
Referenced by DIBwholePaletteFromWords(), PlaySfxWaveFileByNumber(), and RestoreGamePalette().
| char * DirectDrawResultToText | ( | int | result | ) |
Definition at line 924 of file dib.c.
References DirectDrawResultToText().
Referenced by DIBerror(), DirectDrawResultToText(), and PlaySfxWaveFileByNumber().
| unsigned int GetDIBHeight | ( | void | ) |
Definition at line 754 of file dib.c.
References GetDIBHeight(), and nDIBFrameHeight.
Referenced by GetDIBHeight().
| unsigned char * GetDIBPixelBuffer | ( | void | ) |
Definition at line 727 of file dib.c.
References GetDIBPixelBuffer(), and pDIBImage.
Referenced by DIBmakeDIB(), GetDIBPixelBuffer(), InitializeDIBScreenViewport(), and PlaySfxWaveFileByNumber().
| unsigned int GetDIBWidth | ( | void | ) |
Definition at line 747 of file dib.c.
References GetDIBWidth(), and nDIBFrameWidth.
Referenced by GetDIBWidth().
| HWND GetDIBWindowHandle | ( | void | ) |
Definition at line 740 of file dib.c.
References GetDIBWindowHandle(), and hDIBParentWindow.
Referenced by GetDIBWindowHandle(), and PlaySfxWaveFileByNumber().
| void GetPaletteEntryAsWords | ( | short | i, |
| short * | rgb ) |
Definition at line 831 of file dib.c.
References abDIBPaletteQuads, and GetPaletteEntryAsWords().
Referenced by GetPaletteEntry(), GetPaletteEntryAsWords(), and PlaySfxWaveFileByNumber().
| void ReportSpaceFlightMaxFps | ( | float | adjustment | ) |
Definition at line 153 of file dib.c.
References bSpaceFlightFrameTiming, fSpaceFlightFrameRate, ReportSpaceFlightMaxFps(), SetHudMessageText(), SetSpaceFlightFrameTiming(), and szSpaceFlightFpsCapMessage.
Referenced by MainWindowProc(), PlaySfxWaveFileByNumber(), and ReportSpaceFlightMaxFps().
Definition at line 182 of file dib.c.
References bSpaceFlightFrameTiming, fCinematicFrameRate, nFrameDeadlineMs, nFrameIntervalMs, and SetCinematicFrameTiming().
Referenced by main(), PlaySfxWaveFileByNumber(), RunSpaceFlight(), and SetCinematicFrameTiming().
Definition at line 173 of file dib.c.
References bSpaceFlightFrameTiming, fSpaceFlightFrameRate, nFrameDeadlineMs, nFrameIntervalMs, and SetSpaceFlightFrameTiming().
Referenced by PlaySfxWaveFileByNumber(), ReportSpaceFlightMaxFps(), RunSpaceFlight(), and SetSpaceFlightFrameTiming().
| void ThrottleFrameAndDrawFps | ( | HDC | dc | ) |
Definition at line 114 of file dib.c.
References bShowFrameRate, fSampledFps, nFrameDeadlineMs, nFrameIntervalMs, nPreviousFrameTimeMs, pDIBImage, Viewport::pixels, RefreshMouseCursorDisplay(), stMouseCursorState, szFrameRateLabel, ThrottleFrameAndDrawFps(), and MouseCursorState::viewport.
Referenced by DIBslamReal(), PlaySfxWaveFileByNumber(), and ThrottleFrameAndDrawFps().
|
static |
Definition at line 88 of file dib.c.
Referenced by CachePaletteEntryFromWords(), DIBinstall(), DIBmakeDIB(), DIBramPalette(), DIBsetPalette(), DIBwholePaletteFromTriplets(), DIBwholePaletteFromWords(), and GetPaletteEntryAsWords().
|
static |
Definition at line 78 of file dib.c.
Referenced by DIBdestroyDIB(), DIBinstall(), and DIBmakeDIB().
| signed char acPreviousAttackers[16] |
Definition at line 101 of file dib.c.
Referenced by house_keep_objects(), object_collision(), set_objects_data(), and Set_up_ship_info().
| signed char acViableTargetList[16] |
Definition at line 102 of file dib.c.
Referenced by build_your_target_list(), check_target(), cycle_onscreen_targets(), FF_missile_intelligence(), heat_seeking_missile_intelligence(), and sort_viable_target_list().
| short asActionCounts[10] |
Definition at line 103 of file dib.c.
Referenced by advance_canned_sequence(), futurion_intelligence(), Set_up_ship_info(), and update_canned_sequence().
| signed char aShipWeaponsTable[10][0x47] |
Definition at line 108 of file dib.c.
Referenced by drop_mine(), drop_player_mine(), find_next_gun(), find_weapon(), fire(), fire_fixed_projectile_weapon(), fire_missile(), fire_turrets(), fire_weapon(), HandleSpaceFlightControls(), InitializeCockpitResources(), internal_damage(), remove_weapon(), RemovePlayerReleaseWeapon(), select_guns(), select_new_release_weapon(), set_objects_data(), show_weapon_disp(), target_locking(), and your_internal_damage().
| short asObjAfterburnerVelocities[SPACE_OBJECT_COUNT] |
Definition at line 106 of file dib.c.
Referenced by apply_force_to_object(), rotational_acceleration(), and set_objects_data().
| short asObjectFlipArray[SPACE_OBJECT_COUNT] |
Definition at line 97 of file dib.c.
Referenced by animate_shape(), draw_sorted_objects_to_buffer(), draw_target_box(), easy2see(), flip_angle(), get_right_shape(), intro_drawbackgroundships(), place_exhaust_on_ships(), reposition_fixed_child_objects(), set_objects_data(), and ShowCarrierLaunchSequence().
| short asObjScreenScalesArray[SPACE_OBJECT_COUNT] |
Definition at line 105 of file dib.c.
Referenced by CreateCannedSceneObject(), draw_nav_pointer(), draw_sorted_objects_to_buffer(), draw_target_box(), easy2see(), InitializeConstellationObject(), intro_drawbackgroundships(), reposition_fixed_child_objects(), set_background_objects_rotation(), ShowCampaignVictorySequence(), ShowCarrierLaunchSequence(), and transform_objects_to_your_view().
|
static |
Definition at line 91 of file dib.c.
Referenced by DIBinstall(), DIBslam(), and DIBslamReal().
|
static |
Definition at line 25 of file dib.c.
Referenced by ReportSpaceFlightMaxFps(), SetCinematicFrameTiming(), and SetSpaceFlightFrameTiming().
| signed char cCurrentNavPtIdx |
Definition at line 96 of file dib.c.
Referenced by auto_pilot_sequence(), Build_objective_list(), CentreMouseOnCurrentNavObjective(), cycle_next_objective(), DrawSelectedNavLegendEntry(), get_first_follow_point(), InflightComputer(), SelectNavObjectiveAtPoint(), set_new_objective(), set_next_destination(), and someone_coming().
| const GUID CLSID_DirectDraw |
| const GUID CLSID_DirectDrawClipper |
|
static |
Definition at line 76 of file dib.c.
Referenced by DIBdestroyDIB(), and DIBmakeDIB().
|
static |
Definition at line 77 of file dib.c.
Referenced by DIBdestroyDIB(), and DIBmakeDIB().
|
static |
Definition at line 79 of file dib.c.
Referenced by DIBmakeDIB().
|
static |
Definition at line 27 of file dib.c.
Referenced by SetCinematicFrameTiming().
|
static |
Definition at line 89 of file dib.c.
Referenced by ThrottleFrameAndDrawFps().
|
static |
Definition at line 26 of file dib.c.
Referenced by ReportSpaceFlightMaxFps(), and SetSpaceFlightFrameTiming().
| const GUID guidDirectDraw2 |
Definition at line 45 of file dib.c.
Referenced by DIBinstall().
|
static |
Definition at line 87 of file dib.c.
Referenced by DIBerror(), DIBinstall(), DIBpositionWindow(), DIBreInstall(), DIBslamReal(), and GetDIBWindowHandle().
| const GUID IID_IDirectDraw |
| const GUID IID_IDirectDrawClipper |
| const GUID IID_IDirectDrawPalette |
| const GUID IID_IDirectDrawSurface |
| const GUID IID_IDirectDrawSurface2 |
| short nCurrentHazardFieldTotal |
Definition at line 100 of file dib.c.
Referenced by add_hazard_field(), check_hazards(), house_keep(), and set_up_action_sphere().
|
static |
Definition at line 19 of file dib.c.
Referenced by DIBcascade(), DIBdestroyDIB(), DIBinstall(), DIBmakeDIB(), DIBreInstall(), DIBslamReal(), and DIBupdate().
|
static |
Definition at line 72 of file dib.c.
Referenced by DIBdestroyDIB(), DIBmakeDIB(), DIBslamReal(), and GetDIBHeight().
|
static |
Definition at line 73 of file dib.c.
Referenced by DIBdestroyDIB(), DIBmakeDIB(), DIBslamReal(), DIBupdate(), and GetDIBWidth().
|
static |
Definition at line 81 of file dib.c.
Referenced by DIBinstall(), and DIBslamReal().
| short nEyeRollTargetValue |
Definition at line 98 of file dib.c.
Referenced by new_view(), parse_view_script(), rotate_eye_to_goal(), set_eye_direction_and_position(), and update_scripted_view().
| short nEyeYawGoalValue |
Definition at line 104 of file dib.c.
Referenced by new_view(), parse_view_script(), rotate_eye_to_goal(), and update_scripted_view().
|
static |
Definition at line 21 of file dib.c.
Referenced by SetCinematicFrameTiming(), SetSpaceFlightFrameTiming(), and ThrottleFrameAndDrawFps().
| int nFrameIntervalMs = 62 |
Definition at line 20 of file dib.c.
Referenced by SetCinematicFrameTiming(), SetSpaceFlightFrameTiming(), and ThrottleFrameAndDrawFps().
|
static |
Definition at line 24 of file dib.c.
Referenced by ThrottleFrameAndDrawFps().
|
static |
Definition at line 74 of file dib.c.
Referenced by DIBdestroyDIB(), DIBmakeDIB(), DIBslamReal(), DIBupdate(), GetDIBPixelBuffer(), and ThrottleFrameAndDrawFps().
|
static |
Definition at line 15 of file dib.c.
Referenced by DIBcascade(), DIBerror(), DIBinstall(), DIBmakeDIB(), DIBpositionWindow(), DIBreInstall(), DIBslamReal(), DIBunInstall(), DIBupdate(), DIBwaitForVerticalBlank(), DIBwholePaletteFromTriplets(), and DIBwholePaletteFromWords().
|
static |
Definition at line 18 of file dib.c.
Referenced by DIBcascade(), DIBmakeDIB(), DIBramPalette(), DIBsetPalette(), DIBwholePaletteFromTriplets(), and DIBwholePaletteFromWords().
|
static |
Definition at line 16 of file dib.c.
Referenced by DIBcascade(), DIBdestroyDIB(), DIBerror(), DIBmakeDIB(), DIBpositionWindow(), DIBsetPalette(), DIBslamReal(), DIBunInstall(), DIBupdate(), DIBwholePaletteFromTriplets(), and DIBwholePaletteFromWords().
|
static |
Definition at line 17 of file dib.c.
Referenced by DIBcascade(), DIBdestroyDIB(), DIBerror(), DIBmakeDIB(), DIBpositionWindow(), DIBslamReal(), and DIBunInstall().
| CampaignState stCampaignState |
Definition at line 107 of file dib.c.
Referenced by ace_status(), AddPCName(), AddRandomTrainSimHighScores(), affect_mission_score(), AwardCampaignMedal(), BarracksScreen(), BuildMap(), CorrectPointers(), DrawDebriefingLongShot(), DrawMedals(), DrawScrambleFrame(), EnterPilotNameAndCallsign(), ExpandCommMessageTokens(), flag_ace(), FullMissionScore(), funeral_sequence(), GameFlow(), HandleBarracksBunkSelection(), init_mission(), is_alive(), landing(), main(), MoveNewCampaign(), ParseTests(), personality_killed(), players_flight_dynamics(), PlayersMissionScore(), PostMission(), prepare_mission(), RecRoom(), ResetCampaignData(), RunAnimationDemoLoop(), RunTrainSim(), scramble(), show_info_disp(), ShowCarrierLaunchSequence(), ShowChalkBoard(), ShowTigerClawEscapeScene(), StartNewCampaign(), unflag_ace(), UpdateSeries(), and wing_status().
|
static |
Definition at line 85 of file dib.c.
Referenced by DIBerror().
|
static |
Definition at line 75 of file dib.c.
Referenced by ThrottleFrameAndDrawFps().
|
static |
Definition at line 93 of file dib.c.
Referenced by ReportSpaceFlightMaxFps().
| FixedVector vPreviousStarFieldMotion |
Definition at line 99 of file dib.c.
Referenced by update_star_field().