|
Wing Commander
Reconstructed Win32 source (1996)
|
Music state machine and the streaming music script. More...
Go to the source code of this file.
Music state machine and the streaming music script.
Address range 42e320-42efbf. The routines print their own names: StopMusic, FadeMusic, SetMusicOn and others.
Definition in file music.c.
| int changetrack | ( | void | ) |
Definition at line 520 of file music.c.
References aeShipMissionType, aMissionObjectivesArray, cCurrentObjective, changetrack(), MISSION_TYPE_DEFEND, MISSION_TYPE_ESCORT, MISSION_TYPE_PATROL, MISSION_TYPE_RENDEZVOUS, MISSION_TYPE_STRIKE, OBJECTIVE_HOME_BASE, and triumph().
Referenced by changetrack(), gametrack(), init_3Space_objects(), and LaunchPlayerShip().
Definition at line 692 of file music.c.
References DisableMusicForScene(), nWaitForMusicEnabled, SetMusicOn(), and StopMusicUnlessSuppressed().
Referenced by DisableMusicForScene().
Definition at line 700 of file music.c.
References EnableMusicForScene(), nWaitForMusicEnabled, and SetMusicOn().
Referenced by EnableMusicForScene(), and init_3Space_objects().
Definition at line 102 of file music.c.
References FadeMusic(), and SoundDebugPrintf().
Referenced by FadeMusic(), and init_3Space_objects().
Definition at line 137 of file music.c.
References FlushSoundEffect(), SoundDebugPrintf(), and stop_all_sounds().
Referenced by FlushSoundEffect(), and init_3Space_objects().
Definition at line 144 of file music.c.
References FlushSoundEffects(), SoundDebugPrintf(), and stop_all_sounds().
Referenced by FlushSoundEffects(), FlushSoundEffectsAndLog(), init_3Space_objects(), ResetSoundState(), and scramble().
| void FlushSoundEffectsAndLog | ( | int | soundHandle, |
| short | fadeTicks ) |
Definition at line 714 of file music.c.
References FlushSoundEffects(), FlushSoundEffectsAndLog(), szSfxWavePath, and void().
Referenced by accelerate_and_move_object(), FlushSoundEffectsAndLog(), house_keep(), init_3Space_objects(), landing(), PlayScrambleHangarScene(), scramble(), ShowCarrierLaunchSequence(), TheEndFireWorks(), and update_lights().
Definition at line 552 of file music.c.
References any_enemy_tail(), calculate_damage_level(), changetrack(), gametrack(), is_ship_tailing_player_target(), missile_on_tail(), nCombatMusicActive, nCurrentMusicTrack, nCurrentSpaceFrameValue, nInFlightMusicActive, nInitialFlightMusicPending, nMusicStreamSet, nMusicTrackComplete, nTrainSimActive, report_kilrathi_rout(), SoundDebugPrintf(), and spacetrack().
Referenced by gametrack(), init_3Space_objects(), and servicetrack().
| unsigned short GetMusicMode | ( | void | ) |
Definition at line 426 of file music.c.
References GetMusicMode(), nMusicPlaybackMode, and nMusicTrackComplete.
Referenced by funeral_sequence(), GetMusicMode(), and init_3Space_objects().
| int MapMusicTrackToStreamerCommand | ( | int | track | ) |
Definition at line 253 of file music.c.
References MapMusicTrackToStreamerCommand(), and SoundDebugPrintf().
Referenced by init_3Space_objects(), MapMusicTrackToStreamerCommand(), and ProcessMusicScriptCommand().
| void new_space_music_changes | ( | short | attacker, |
| short | victim ) |
Definition at line 480 of file music.c.
References acShipRating, aeShipMissionType, aeShipSide, anShipMissionShips, MISSION_TYPE_DEFEND, MISSION_TYPE_ESCORT, new_space_music_changes(), nInFlightMusicActive, nShipMissionIndices, nTrainSimActive, nYourWingman, RandomInRange(), report_kilrathi_rout(), SIDE_IMPERIAL, SIDE_KILRATHI, and spacetrack().
Referenced by analyze_kill(), init_3Space_objects(), and new_space_music_changes().
Definition at line 132 of file music.c.
References PaletteFadeHook().
Referenced by init_3Space_objects(), PaletteFadeHook(), and ShowCarrierLaunchSequence().
| void PlaySfxWaveFileByNumber | ( | int | soundNumber, |
| int | sourceObject, | ||
| int | looping ) |
Definition at line 733 of file music.c.
References aiSoundEffectSourceActiveArray, aShipPositionsArray, ComputeVectorDelta(), EYE_OBJECT, PlaySfxWaveFileByNumber(), playWAVE(), szSfxWavePath, and Vector_magnitude().
| int ProcessMusicScriptCommand | ( | int | track, |
| int | command, | ||
| short | enabled ) |
Definition at line 345 of file music.c.
References bMusicCommandSuppressed, ForceStreamerTrigger(), MapMusicTrackToStreamerCommand(), nCurrentMusicTrack, nMusicStreamSet, ProcessMusicScriptCommand(), SelectFlightMusicTrack(), SetStreamerIntensity(), SoundDebugPrintf(), StopMusic(), and Streamer_trigger().
Referenced by init_3Space_objects(), ProcessMusicScriptCommand(), and spacetrack().
Definition at line 669 of file music.c.
References bAfterburnerSfxEnabled, FlushSoundEffects(), nCurrentDamageAlarmSfxHandle, and ResetSoundState().
Referenced by auto_pilot_sequence(), init_3Space_objects(), LaunchPlayerShip(), ResetSoundState(), ResetSoundStateForFlight(), ResetSoundStateForScene(), ShowCarrierLaunchSequence(), ShowGetReadyScreen(), and Title_Sequence().
Definition at line 684 of file music.c.
References nFlightSoundEffectsEnabled, ResetSoundState(), and ResetSoundStateForFlight().
Referenced by HandleSpaceFlightControls(), init_3Space_objects(), and ResetSoundStateForFlight().
Definition at line 677 of file music.c.
References nFlightSoundEffectsEnabled, ResetSoundState(), and ResetSoundStateForScene().
Referenced by HandleSpaceFlightControls(), init_3Space_objects(), and ResetSoundStateForScene().
Definition at line 151 of file music.c.
References SceneLeaveHook().
Referenced by death_sequence(), init_3Space_objects(), PlayScrambleHangarScene(), and SceneLeaveHook().
| void SelectFlightMusicTrack | ( | int | track | ) |
Definition at line 156 of file music.c.
References ClearStreamerTrigger(), nMusicStreamSet, SelectFlightMusicTrack(), SoundDebugPrintf(), Streamer_close(), and Streamer_open().
Referenced by init_3Space_objects(), ProcessMusicScriptCommand(), and SelectFlightMusicTrack().
Definition at line 605 of file music.c.
References AddFixedVectors(), aeObjectClass, aiSoundEffectSourceActiveArray, aShipPositionsArray, aShipVelocity, asObjDistancesTable, asObjectScreenXList, asPreviousObjectDistance, ComputeVectorDelta(), dot_product(), EYE_OBJECT, gametrack(), nCurrentSpaceFrameValue, nFlightSoundEffectsEnabled, nPassingShipAudioCooldown, nPassingShipSoundCountdown, nPassingShipSoundObject, OBJECT_CLASS_ASTEROID, OBJECT_CLASS_CAPITAL_SHIP, OBJECT_CLASS_SHIP, PlaySfxWaveFileByNumber(), ScaleFixedVector(), servicetrack(), and SPACE_OBJECT_COUNT.
Referenced by init_3Space_objects(), servicetrack(), and Update_3Space().
| void SetMusBreakpt | ( | int | first, |
| int | second ) |
Definition at line 124 of file music.c.
References SetMusBreakpt(), SoundDebugPrintf(), and void().
Referenced by ejection_sequence(), funeral_sequence(), init_3Space_objects(), SetMusBreakpt(), and wait_for_end_of_music().
| void SetMusicOn | ( | short | enabled | ) |
Definition at line 108 of file music.c.
References SetMusicOn(), and SoundDebugPrintf().
Referenced by DisableMusicForScene(), EnableMusicForScene(), init_3Space_objects(), and SetMusicOn().
Definition at line 724 of file music.c.
References sound_effect(), szSfxWavePath, and WriteDebugString().
Referenced by init_3Space_objects(), and sound_effect().
| unsigned int SoundFxTick | ( | void | ) |
Definition at line 707 of file music.c.
References SoundFxTick(), and WriteDebugString().
Referenced by init_3Space_objects(), SoundFxTick(), and TheEndFireWorks().
| unsigned int spacetrack | ( | int | track, |
| int | mode, | ||
| short | enabled ) |
Definition at line 411 of file music.c.
References nMusicPlaybackMode, ProcessMusicScriptCommand(), and spacetrack().
Referenced by AwardCampaignMedal(), BarracksScreen(), death_sequence(), DeBriefing(), DrawMedalChest(), ejection_sequence(), EstablishingShot(), funeral_sequence(), gametrack(), init_3Space_objects(), landing(), LaunchPlayerShip(), LoadBriefingRoom(), new_space_music_changes(), Office(), PlayScrambleHangarScene(), RecRoom(), ReturnToBriefingLongShot(), set_up_next_wave(), ShowCampaignVictorySequence(), ShowCarrierLaunchSequence(), ShowGameOverScreen(), ShowMeanwhileTransition(), ShowTheEndScreen(), ShowTigerClawEscapeScene(), spacetrack(), Title_Sequence(), and update_missile_warning().
| void StopMusic | ( | short | unused | ) |
Definition at line 114 of file music.c.
References nCurrentMusicTrack, SoundDebugPrintf(), StopMusic(), Streamer_stop(), and void().
Referenced by init_3Space_objects(), ProcessMusicScriptCommand(), ShowMeanwhileTransition(), ShowTheEndScreen(), StopMusic(), StopMusicUnlessSuppressed(), wait_for_end_of_music(), and WaitForMusicOrInput().
Definition at line 419 of file music.c.
References nMusicPlaybackMode, StopMusic(), and StopMusicUnlessSuppressed().
Referenced by AwardCampaignMedal(), BarracksScreen(), death_sequence(), DeBriefing(), DisableMusicForScene(), ejection_sequence(), free_inflight_music(), funeral_sequence(), init_3Space_objects(), landing(), LaunchPlayerShip(), LoadBriefingRoom(), Office(), RecRoom(), ReturnToBriefingLongShot(), scramble(), ShowCampaignVictorySequence(), ShowCarrierLaunchSequence(), ShowGameOverScreen(), ShowMeanwhileTransition(), ShowTheEndScreen(), ShowTigerClawEscapeScene(), StopMusicUnlessSuppressed(), Title_Sequence(), and WaitForMusicOrInput().
Definition at line 435 of file music.c.
References bEscapePressedFlag, CheckEscaped(), nMusicPlaybackMode, nMusicTrackComplete, nWaitForMusicEnabled, SetMusBreakpt(), StopMusic(), and wait_for_end_of_music().
Referenced by init_3Space_objects(), and wait_for_end_of_music().
Definition at line 452 of file music.c.
References bEscapePressedFlag, CheckEscaped(), nMusicPlaybackMode, nMusicTrackComplete, nMusicWaitForInput, nWaitForMusicEnabled, StopMusic(), StopMusicUnlessSuppressed(), and WaitForMusicOrInput().
Referenced by init_3Space_objects(), and WaitForMusicOrInput().
| unsigned char aabSoundEffectDescriptors[37][8] |
Definition at line 40 of file music.c.
Referenced by TheEndFireWorks().
| char* aapszPilotSpeeches[14][11] |
Definition at line 98 of file music.c.
Referenced by free_pilot_talk(), get_pilot_talk(), real_vid_transmit(), and vid_transmit().
| signed char abCommMenuChoiceCommands[7] |
Definition at line 99 of file music.c.
Referenced by AppendCommMenuChoice(), Chosen_communicate_option(), and ResetCommMenuChoices().
| signed char acShipSpawnNavPt[16] |
Definition at line 88 of file music.c.
Referenced by set_up_action_sphere(), and Set_up_ship_info().
| signed char acVduModeStackDepth[16] |
Definition at line 87 of file music.c.
Referenced by get_mode(), GetVduModeStackDepth(), pop_mode(), push_mode(), and set_mode().
| struct Shape* apCommunicationPortraitShapesTable[16] |
Definition at line 96 of file music.c.
Referenced by EndCommSessionWithWingman(), free_pilot_talk(), FreeCommDisplayResources(), LoadCommPortraitShape(), LoadSpaceflightResources(), real_vid_transmit(), and vid_transmit().
| short asShipAccumulatedDmg[SPACE_OBJECT_COUNT] |
Definition at line 89 of file music.c.
Referenced by animate_object(), calculate_damage_level(), fire_weapon(), inflict_damage(), internal_damage(), object_collision(), set_objects_data(), Set_up_ship_info(), and your_internal_damage().
| unsigned short awObjectScales[SPACE_OBJECT_COUNT] |
Definition at line 86 of file music.c.
Referenced by animate_object(), animate_shape(), Explosion(), house_keep_objects(), object_collision(), onboard_explosion(), place_exhaust_on_ships(), reposition_fixed_child_objects(), set_objects_data(), ShipExplosion(), ShowCarrierLaunchSequence(), ShowTigerClawEscapeScene(), and transform_objects_to_your_view().
| unsigned short awPalEntryAllocation[256] |
Definition at line 95 of file music.c.
Referenced by PrintPaletteAllocationMap(), ReleaseContiguousPaletteEntries(), and ReserveContiguousPaletteEntries().
|
static |
Definition at line 15 of file music.c.
Referenced by ProcessMusicScriptCommand().
| int nCombatMusicActive = 0 |
Definition at line 31 of file music.c.
Referenced by gametrack(), and init_inflight_music().
| int nCurrentMusicTrack = -1 |
Definition at line 21 of file music.c.
Referenced by gametrack(), ProcessMusicScriptCommand(), and StopMusic().
| short nCurrentNavigationPoint |
Definition at line 90 of file music.c.
Referenced by abandoned(), arrive_from_warp(), auto_pilot_sequence(), FindNearestNavPoint(), init_intelligence_data(), orbit_sphere(), ReleaseStaleNavTarget(), set_up_action_sphere(), and set_up_next_wave().
| int nFlightSoundEffectsEnabled = 1 |
Definition at line 29 of file music.c.
Referenced by HandleSpaceFlightControls(), ResetSoundStateForFlight(), ResetSoundStateForScene(), and servicetrack().
| short nFuneralSequenceActive = 0 |
Definition at line 20 of file music.c.
Referenced by funeral_sequence().
| int nInFlightMusicActive = 0 |
Definition at line 32 of file music.c.
Referenced by free_inflight_music(), gametrack(), init_inflight_music(), and new_space_music_changes().
| int nInFlightMusicSlotA = -1 |
Definition at line 25 of file music.c.
Referenced by free_inflight_music().
| int nInFlightMusicSlotB = -1 |
Definition at line 27 of file music.c.
Referenced by free_inflight_music().
| int nInitialFlightMusicPending = 1 |
Definition at line 30 of file music.c.
Referenced by gametrack(), and init_inflight_music().
| int nJoystickCalibrationMaximumX |
Definition at line 93 of file music.c.
Referenced by LoadJoystickCalibrationFile().
| int nJoystickCalibrationMaxY |
Definition at line 94 of file music.c.
Referenced by LoadJoystickCalibrationFile().
| int nJoystickCalibrationMinimumX |
Definition at line 92 of file music.c.
Referenced by LoadJoystickCalibrationFile().
| int nJoystickCalibrationMinimumY |
Definition at line 91 of file music.c.
Referenced by LoadJoystickCalibrationFile().
| short nMusicPlaybackMode = 0 |
Definition at line 14 of file music.c.
Referenced by funeral_sequence(), GetMusicMode(), LoadOriginFxDrivers(), main(), spacetrack(), StopMusicUnlessSuppressed(), wait_for_end_of_music(), and WaitForMusicOrInput().
|
static |
Definition at line 22 of file music.c.
Referenced by gametrack(), ProcessMusicScriptCommand(), and SelectFlightMusicTrack().
| short nMusicTrackComplete = 1 |
Definition at line 17 of file music.c.
Referenced by gametrack(), GetMusicMode(), UpdateStreamerStoppedFlag(), wait_for_end_of_music(), and WaitForMusicOrInput().
|
static |
Definition at line 19 of file music.c.
Referenced by WaitForMusicOrInput().
|
static |
Definition at line 35 of file music.c.
Referenced by servicetrack().
|
static |
Definition at line 34 of file music.c.
Referenced by servicetrack().
| int nWaitForMusicEnabled = 1 |
Definition at line 28 of file music.c.
Referenced by DisableMusicForScene(), EnableMusicForScene(), funeral_sequence(), wait_for_end_of_music(), and WaitForMusicOrInput().
| char szHudMessageBuf[0x60] |
Definition at line 97 of file music.c.
Referenced by PromptForAnswerText(), ShowCentredPrompt(), and ShowOnScreenMessage().
|
static |
Definition at line 82 of file music.c.
Referenced by FlushSoundEffectsAndLog(), PlaySfxWaveFileByNumber(), and sound_effect().