From 2c8cf42179ed16b86fe64d6f4b3fd64e37717086 Mon Sep 17 00:00:00 2001 From: Dillon Skaggs Date: Tue, 12 Mar 2024 09:49:04 -0500 Subject: [PATCH] feat(audio): batch 8 of native updates (#1004) * feat(audio): batch 8 of native updates * Update LockRadioStation.md Re-add NativeDB Introduced comment. * Update LinkStaticEmitterToEntity.md Add underscore to aliases. * Update LockRadioStation.md Add old alias "_LOCK_RADIO_STATION". * Update LoadStream.md Re-add list of streams, but from github's gist. --------- Co-authored-by: ammonia-cfx <38232208+4mmonium@users.noreply.github.com> --- AUDIO/IsRadioStationFavourited.md | 17 +++++++++++++++++ AUDIO/IsRadioStationVisible.md | 17 ----------------- AUDIO/IsScriptedConversationLoaded.md | 2 +- AUDIO/IsScriptedSpeechPlaying.md | 5 +++-- AUDIO/IsStreamPlaying.md | 1 + AUDIO/IsVehicleAudiblyDamaged.md | 3 ++- ...hicleRadioEnabled.md => IsVehicleRadioOn.md} | 12 ++++-------- AUDIO/LinkStaticEmitterToEntity.md | 14 ++++++-------- AUDIO/LoadStream.md | 15 ++++++--------- AUDIO/LoadStreamWithStartOffset.md | 12 ++++-------- AUDIO/LockRadioStation.md | 10 +++++----- AUDIO/LockRadioStationTrackList.md | 7 ++----- 12 files changed, 51 insertions(+), 64 deletions(-) create mode 100644 AUDIO/IsRadioStationFavourited.md delete mode 100644 AUDIO/IsRadioStationVisible.md rename AUDIO/{IsVehicleRadioEnabled.md => IsVehicleRadioOn.md} (69%) diff --git a/AUDIO/IsRadioStationFavourited.md b/AUDIO/IsRadioStationFavourited.md new file mode 100644 index 000000000..aee061064 --- /dev/null +++ b/AUDIO/IsRadioStationFavourited.md @@ -0,0 +1,17 @@ +--- +ns: AUDIO +aliases: ["_IS_RADIO_STATION_VISIBLE"] +--- + +## IS_RADIO_STATION_FAVOURITED + +```c +// 0x2B1784DB08AFEA79 +BOOL IS_RADIO_STATION_FAVOURITED(char* radioStation); +``` + +## Parameters +* **radioStation**: + +## Return value +Returns whether a radio station is a favourite. diff --git a/AUDIO/IsRadioStationVisible.md b/AUDIO/IsRadioStationVisible.md deleted file mode 100644 index c7b8a7f5d..000000000 --- a/AUDIO/IsRadioStationVisible.md +++ /dev/null @@ -1,17 +0,0 @@ ---- -ns: AUDIO ---- - -## _IS_RADIO_STATION_VISIBLE - -```c -// 0x2B1784DB08AFEA79 -BOOL _IS_RADIO_STATION_VISIBLE(char* radioStation); -``` - -``` -NativeDB Introduced: v2699 -``` - -## Parameters -* **radioStation**: diff --git a/AUDIO/IsScriptedConversationLoaded.md b/AUDIO/IsScriptedConversationLoaded.md index 398cc33b7..2377f3bab 100644 --- a/AUDIO/IsScriptedConversationLoaded.md +++ b/AUDIO/IsScriptedConversationLoaded.md @@ -8,5 +8,5 @@ ns: AUDIO BOOL IS_SCRIPTED_CONVERSATION_LOADED(); ``` - ## Return value +Returns true if the first batch of lines for the currently requested conversation have loaded successfully. diff --git a/AUDIO/IsScriptedSpeechPlaying.md b/AUDIO/IsScriptedSpeechPlaying.md index 211a13c64..35c44aab3 100644 --- a/AUDIO/IsScriptedSpeechPlaying.md +++ b/AUDIO/IsScriptedSpeechPlaying.md @@ -5,11 +5,12 @@ ns: AUDIO ```c // 0xCC9AA18DCC7084F4 0x2C653904 -BOOL IS_SCRIPTED_SPEECH_PLAYING(Any p0); +BOOL IS_SCRIPTED_SPEECH_PLAYING(Ped ped); ``` ## Parameters -* **p0**: +* **ped**: ## Return value +Returns true if scripted speech is currently playing from the given ped. diff --git a/AUDIO/IsStreamPlaying.md b/AUDIO/IsStreamPlaying.md index c7bac2cf7..79f3ce3dd 100644 --- a/AUDIO/IsStreamPlaying.md +++ b/AUDIO/IsStreamPlaying.md @@ -10,3 +10,4 @@ BOOL IS_STREAM_PLAYING(); ## Return value +Returns true if the script is currently playing a stream. diff --git a/AUDIO/IsVehicleAudiblyDamaged.md b/AUDIO/IsVehicleAudiblyDamaged.md index 4d6e0931d..4937140be 100644 --- a/AUDIO/IsVehicleAudiblyDamaged.md +++ b/AUDIO/IsVehicleAudiblyDamaged.md @@ -10,6 +10,7 @@ BOOL IS_VEHICLE_AUDIBLY_DAMAGED(Vehicle vehicle); ``` ## Parameters -* **vehicle**: +* **vehicle**: ## Return value +Returns true if the vehicle has any audible damage effects applied to it. diff --git a/AUDIO/IsVehicleRadioEnabled.md b/AUDIO/IsVehicleRadioOn.md similarity index 69% rename from AUDIO/IsVehicleRadioEnabled.md rename to AUDIO/IsVehicleRadioOn.md index 6bb64f114..609e7b145 100644 --- a/AUDIO/IsVehicleRadioEnabled.md +++ b/AUDIO/IsVehicleRadioOn.md @@ -1,23 +1,19 @@ --- ns: AUDIO -aliases: ["0x0BE4BE946463F917"] +aliases: ["0x0BE4BE946463F917", "_IS_VEHICLE_RADIO_ENABLED"] --- -## _IS_VEHICLE_RADIO_ENABLED +## IS_VEHICLE_RADIO_ON ```c // 0x0BE4BE946463F917 -BOOL _IS_VEHICLE_RADIO_ENABLED(Vehicle vehicle); -``` - -``` -IS_VEHICLE_* +BOOL IS_VEHICLE_RADIO_ON(Vehicle vehicle); ``` ## Parameters * **vehicle**: The vehicle to check ## Return value -Is the given vehicle's radio enabled +Returns true if the given vehicle's radio on ## Examples ```lua diff --git a/AUDIO/LinkStaticEmitterToEntity.md b/AUDIO/LinkStaticEmitterToEntity.md index 014777ad9..10665e586 100644 --- a/AUDIO/LinkStaticEmitterToEntity.md +++ b/AUDIO/LinkStaticEmitterToEntity.md @@ -1,19 +1,17 @@ --- ns: AUDIO -aliases: ["0x651D3228960D08AF"] +aliases: ["0x651D3228960D08AF", "_LINK_STATIC_EMITTER_TO_ENTITY"] --- -## _LINK_STATIC_EMITTER_TO_ENTITY +## LINK_STATIC_EMITTER_TO_ENTITY ```c // 0x651D3228960D08AF -void _LINK_STATIC_EMITTER_TO_ENTITY(char* emitterName, Entity entity); +void LINK_STATIC_EMITTER_TO_ENTITY(char* emitterName, Entity entity); ``` -``` -L* (LINK_*?) -``` +Links a static emitter to the given entity ## Parameters -* **emitterName**: -* **entity**: +* **emitterName**: +* **entity**: diff --git a/AUDIO/LoadStream.md b/AUDIO/LoadStream.md index adb6c9869..7e10bd78d 100644 --- a/AUDIO/LoadStream.md +++ b/AUDIO/LoadStream.md @@ -8,16 +8,13 @@ ns: AUDIO BOOL LOAD_STREAM(char* streamName, char* soundSet); ``` -``` -Example: -AUDIO::LOAD_STREAM("CAR_STEAL_1_PASSBY", "CAR_STEAL_1_SOUNDSET"); -All found occurrences in the b678d decompiled scripts: pastebin.com/3rma6w5w -Stream names often ends with "_MASTER", "_SMALL" or "_STREAM". Also "_IN", "_OUT" and numbers. -soundSet is often set to 0 in the scripts. These are common to end the soundSets: "_SOUNDS", "_SOUNDSET" and numbers. -``` +Load in named stream. Optionally can specify a sound set which contains the sound specified by name. + +Names for the streams can be found [here](https://gist.github.com/4mmonium/2bd2c9c54d6ca5cbdb7b156a82a3a85a +), the list will be updated as more are found. ## Parameters -* **streamName**: -* **soundSet**: +* **streamName**: +* **soundSet**: an optional sound set, default is null ## Return value diff --git a/AUDIO/LoadStreamWithStartOffset.md b/AUDIO/LoadStreamWithStartOffset.md index 3946b6a4b..1eec4f0d9 100644 --- a/AUDIO/LoadStreamWithStartOffset.md +++ b/AUDIO/LoadStreamWithStartOffset.md @@ -8,15 +8,11 @@ ns: AUDIO BOOL LOAD_STREAM_WITH_START_OFFSET(char* streamName, int startOffset, char* soundSet); ``` -``` -Example: -AUDIO::LOAD_STREAM_WITH_START_OFFSET("STASH_TOXIN_STREAM", 2400, "FBI_05_SOUNDS"); -Only called a few times in the scripts. -``` +Load in named stream. Optionally can specify a sound set which contains the sound specified by name. ## Parameters -* **streamName**: -* **startOffset**: -* **soundSet**: +* **streamName**: +* **startOffset**: +* **soundSet**: ## Return value diff --git a/AUDIO/LockRadioStation.md b/AUDIO/LockRadioStation.md index 4352f083d..c23300056 100644 --- a/AUDIO/LockRadioStation.md +++ b/AUDIO/LockRadioStation.md @@ -1,17 +1,17 @@ --- ns: AUDIO -aliases: ["0x94f2e83ead7e6b82","_SET_RADIO_STATION_DISABLED"] +aliases: ["0x94f2e83ead7e6b82","_SET_RADIO_STATION_DISABLED", "_LOCK_RADIO_STATION"] --- -## _LOCK_RADIO_STATION +## LOCK_RADIO_STATION ```c // 0x477D9DB48F889591 -void _LOCK_RADIO_STATION(char* radioStationName, BOOL toggle); +void LOCK_RADIO_STATION(char* radioStationName, BOOL toggle); ``` -``` -Disables the radio station (hides it from the radio wheel). +This disables the radio station completely - it won't be selectable on the radio wheel or ever be heard coming from a vehicle/ambient emitter +``` NativeDB Introduced: v1493 ``` diff --git a/AUDIO/LockRadioStationTrackList.md b/AUDIO/LockRadioStationTrackList.md index 50bd12c5a..54fbecd87 100644 --- a/AUDIO/LockRadioStationTrackList.md +++ b/AUDIO/LockRadioStationTrackList.md @@ -1,16 +1,13 @@ --- ns: AUDIO --- -## _LOCK_RADIO_STATION_TRACK_LIST +## LOCK_RADIO_STATION_TRACK_LIST ```c // 0xFF5E5EA2DCEEACF3 -void _LOCK_RADIO_STATION_TRACK_LIST(char* radioStation, char* trackListName); +void LOCK_RADIO_STATION_TRACK_LIST(char* radioStation, char* trackListName); ``` -``` -NativeDB Introduced: v2372 -``` ## Parameters * **radioStation**: