Skip to content

Commit

Permalink
feat(audio): batch 5 of native updates (#1001)
Browse files Browse the repository at this point in the history
* feat(audio): batch  5 of native updates

* Update GetVariationChosenForScriptedLine.md

Nitpicking on some grammar and syntax.

* Update GetVehicleHornSoundIndex.md

Re-add nativedb introduced version.

* Update HintAmbientAudioBank.md

Case change on `bool` type

---------

Co-authored-by: ammonia-cfx <[email protected]>
  • Loading branch information
AvarianKnight and 4mmonium authored Mar 4, 2024
1 parent 623ad46 commit 92e0259
Show file tree
Hide file tree
Showing 15 changed files with 103 additions and 100 deletions.
19 changes: 19 additions & 0 deletions AUDIO/GetVariationChosenForScriptedLine.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
ns: AUDIO
aliases: ["0xAA19F5572C38B564"]
---
## GET_VARIATION_CHOSEN_FOR_SCRIPTED_LINE

```c
// 0xAA19F5572C38B564 0xB58B8FF3
int GET_VARIATION_CHOSEN_FOR_SCRIPTED_LINE(cs_type(AnyPtr) char* textLabel);
```
## Parameters
* **textLabel**: all the text labels for filenames in `AmericanDialogueFiles.txt` appear to end with the letter 'A', it is the script's responsibility to add this 'A' before calling `GET_VARIATION_CHOSEN_FOR_SCRIPTED_LINE`.
## Return value
Returns the variation chosen for a given script speech line, or `0` if it hasn't been chosen yet.
Returns `-1` if there is no conversation active or if the active conversation doesn't contain this line or if the text label can't be found in the currently loaded text blocks
7 changes: 2 additions & 5 deletions AUDIO/GetVehicleDefaultHorn.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,9 @@ ns: AUDIO
Hash GET_VEHICLE_DEFAULT_HORN(Vehicle vehicle);
```
```
Returns hash of default vehicle horn
Hash is stored in audVehicleAudioEntity
```
## Parameters
* **vehicle**:
* **vehicle**:
## Return value
Returns the horn sound hash
3 changes: 2 additions & 1 deletion AUDIO/GetVehicleDefaultHornIgnoreMods.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Hash GET_VEHICLE_DEFAULT_HORN_IGNORE_MODS(Vehicle vehicle);
```
## Parameters
* **vehicle**:
* **vehicle**:
## Return value
Returns the horn sound hash ignoring any horn mods applied to the car
17 changes: 0 additions & 17 deletions AUDIO/GetVehicleDefaultHornVariation.md

This file was deleted.

20 changes: 20 additions & 0 deletions AUDIO/GetVehicleHornSoundIndex.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
ns: AUDIO
aliases: ["0xD53F3A29BCE2580E","0x22FECB546C276A30", "_GET_VEHICLE_DEFAULT_HORN_VARIATION"]
---
## GET_VEHICLE_HORN_SOUND_INDEX

```c
// 0xD53F3A29BCE2580E
int GET_VEHICLE_HORN_SOUND_INDEX(Vehicle vehicle);
```
```
NativeDB Introduced: v1365
```
## Parameters
* **vehicle**:
## Return value
The current horn sound index being used by the given vehicle
13 changes: 13 additions & 0 deletions AUDIO/HasLoadedMpDataSet.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
ns: AUDIO
aliases: ["0x544810ED9DB6BBE6", "_HAS_MULTIPLAYER_AUDIO_DATA_LOADED"]
---
## HAS_LOADED_MP_DATA_SET

```c
// 0x544810ED9DB6BBE6
BOOL HAS_LOADED_MP_DATA_SET();
```

## Return value
Returns true if the audio for the Multiplayer data set has loaded
14 changes: 14 additions & 0 deletions AUDIO/HasLoadedSpDataSet.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
ns: AUDIO
aliases: ["0x5B50ABB1FE3746F4", "_HAS_MULTIPLAYER_AUDIO_DATA_UNLOADED"]
---
## HAS_LOADED_SP_DATA_SET

```c
// 0x5B50ABB1FE3746F4
BOOL HAS_LOADED_SP_DATA_SET();
```


## Return value
Returns true if the audio for the Single Player data set has loaded
16 changes: 0 additions & 16 deletions AUDIO/HasMultiplayerAudioDataLoaded.md

This file was deleted.

16 changes: 0 additions & 16 deletions AUDIO/HasMultiplayerAudioDataUnloaded.md

This file was deleted.

3 changes: 2 additions & 1 deletion AUDIO/HasSoundFinished.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ BOOL HAS_SOUND_FINISHED(int soundId);
## Parameters
* **soundId**:
* **soundId**:
## Return value
Returns true if the sound has finished playing, false otherwise.
10 changes: 4 additions & 6 deletions AUDIO/HintAmbientAudioBank.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,13 @@ ns: AUDIO

```c
// 0x8F8C0E370AE62F5C 0xF1850DDC
Any HINT_AMBIENT_AUDIO_BANK(Any p0, Any p1);
cs_type(Any) BOOL HINT_AMBIENT_AUDIO_BANK(cs_type(Any) char* bankName, cs_type(Any) BOOL bOverNetwork);
```
```
NativeDB Added Parameter 3: Any p2
```
This native is marked as a deprecated native internally, use [HINT_SCRIPT_AUDIO_BANK](#_0xFB380A29641EC31A) instead
## Parameters
* **p0**:
* **p1**:
* **bankName**:
* **bOverNetwork**:
## Return value
19 changes: 19 additions & 0 deletions AUDIO/HintMissionAudioBank.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
ns: AUDIO
aliases: ["0x40763EA7B9B783E7"]
---
## HINT_MISSION_AUDIO_BANK

```c
// 0x40763EA7B9B783E7
cs_type(Any) BOOL HINT_MISSION_AUDIO_BANK(char* bankName, cs_type(int) BOOL bOverNetwork, int playerBits);
```
This is marked as a deprecated function internally, please use [HINT_SCRIPT_AUDIO_BANK](#_0xFB380A29641EC31A) instead.
## Parameters
* **bankName**:
* **bOverNetwork**:
* **playerBits**:
## Return value
14 changes: 8 additions & 6 deletions AUDIO/HintScriptAudioBank.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,17 @@ ns: AUDIO

```c
// 0xFB380A29641EC31A 0x41FA0E51
Any HINT_SCRIPT_AUDIO_BANK(Any p0, int p1);
cs_type(Any) BOOL HINT_SCRIPT_AUDIO_BANK(cs_type(Any) char* bankName, cs_type(int) BOOL bOverNetwork);
```
```
NativeDB Added Parameter 3: Any p2
```
Hints that this bank would be good to load if there are free slots.
Does not guarentee loading of the bank, [REQUEST_SCRIPT_AUDIO_BANK](#_0xFE02FFBED8CA9D99) MUST be used as normal before triggering sounds"
This native has a new argument on newer game builds:
* **playerBits**: likely used to specifiy players to sync to as a bit mask (1 << (0-128))
## Parameters
* **p0**:
* **p1**:
* **bankName**:
* **bOverNetwork**:
## Return value
17 changes: 0 additions & 17 deletions AUDIO/N_0x40763ea7b9b783e7.md

This file was deleted.

15 changes: 0 additions & 15 deletions AUDIO/N_0xaa19f5572c38b564.md

This file was deleted.

0 comments on commit 92e0259

Please sign in to comment.