-
-
Notifications
You must be signed in to change notification settings - Fork 502
Vehicle audio settings #2350
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Dutchman101
merged 21 commits into
multitheftauto:master
from
TheNormalnij:TheNormalnij/audio_settings
Apr 10, 2025
Merged
Vehicle audio settings #2350
Changes from 6 commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
157765f
Audio settings
TheNormalnij 5ca4198
Merge remote-tracking branch 'mta_main/master' into TheNormalnij/audi…
TheNormalnij acd89b8
Fix types
TheNormalnij 9562337
Merge branch 'master' into TheNormalnij/audio_settings
TheNormalnij fe4d0c3
Fix crash for custom model
TheNormalnij ec81e77
Fix missing function
TheNormalnij e52e53c
Merge branch 'master' into TheNormalnij/audio_settings
TheNormalnij cb9ae1c
Fix merge conflict
TheNormalnij 37f8c75
Some fixes
TheNormalnij 5e7ece9
Remove some shit
TheNormalnij db8c0d8
Remove unnecessary file
TheNormalnij 46ca24e
Refactor IsPassenger
TheNormalnij 5310d7c
Fix build
TheNormalnij 1c8df3f
size_t
TheNormalnij 55d0a0a
Refactor
TheNormalnij 8351776
Add reset at start
TheNormalnij 7fb152c
Refactor ReinitAudio
TheNormalnij ed00c97
Little refactor
TheNormalnij dd861aa
Remove unused manager on server
TheNormalnij 682f1a4
Merge branch 'master' into TheNormalnij/audio_settings
TheNormalnij 0b8f382
Merge branch 'master' into TheNormalnij/audio_settings
Dutchman101 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| /***************************************************************************** | ||
| * | ||
| * PROJECT: Multi Theft Auto v1.0 | ||
| * LICENSE: See LICENSE in the top level directory | ||
| * FILE: game_sa/CVehicleAudioSettingsEntrySA.cpp | ||
| * PURPOSE: Implementation file for vehicle audio settings entry class | ||
| * | ||
| * Multi Theft Auto is available from http://www.multitheftauto.com/ | ||
| * | ||
| *****************************************************************************/ | ||
|
|
||
| #include "StdInc.h" | ||
| #include "CVehicleAudioSettingsEntrySA.h" | ||
|
|
||
| CVehicleAudioSettingsEntrySA::CVehicleAudioSettingsEntrySA() | ||
| { | ||
| memset(&m_Settings, 0, sizeof(tVehicleAudioSettings)); | ||
| } | ||
|
|
||
| CVehicleAudioSettingsEntrySA::CVehicleAudioSettingsEntrySA(tVehicleAudioSettings* pSettingsEntry) | ||
| { | ||
| m_Settings = *pSettingsEntry; | ||
| } | ||
|
|
||
| void CVehicleAudioSettingsEntrySA::Assign(const CVehicleAudioSettingsEntry* pData) | ||
| { | ||
| const CVehicleAudioSettingsEntrySA* pEntrySA = static_cast<const CVehicleAudioSettingsEntrySA*>(pData); | ||
|
|
||
| m_Settings = pEntrySA->m_Settings; | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,83 @@ | ||
| /***************************************************************************** | ||
| * | ||
| * PROJECT: Multi Theft Auto v1.0 | ||
| * LICENSE: See LICENSE in the top level directory | ||
| * FILE: game_sa/CVehicleAudioSettingsEntrySA.h | ||
| * PURPOSE: Header file for vehicle audio settings entry class | ||
| * | ||
| * Multi Theft Auto is available from http://www.multitheftauto.com/ | ||
| * | ||
| *****************************************************************************/ | ||
|
|
||
| #pragma once | ||
|
|
||
| #include "game/CVehicleAudioSettingsEntry.h" | ||
| #include <game/Common.h> | ||
|
|
||
| struct tVehicleAudioSettings | ||
| { | ||
| eVehicleSoundType m_eVehicleSoundType; | ||
| char unk1; | ||
| short m_wEngineOnSoundBankId; | ||
| short m_wEngineOffSoundBankId; | ||
| char m_nStereo; // 0 or 1 or 2 | ||
| char unk2; | ||
| float unk3; | ||
| float unk4; | ||
| char m_bHornTon; | ||
| char unk5[3]; | ||
| float m_fHornHigh; | ||
| char m_nDoorSound; | ||
| char unk6; | ||
| char m_nRadioNum; | ||
| char m_nRadioType; | ||
| char m_nVehTypeForAudio; | ||
| char unk8[3]; | ||
| float m_fHornVolumeDelta; | ||
| }; | ||
| static_assert(sizeof(tVehicleAudioSettings) == 0x24, "Invalid size for tVehicleAudioSettings"); | ||
|
|
||
| class CVehicleAudioSettingsEntrySA : public CVehicleAudioSettingsEntry | ||
| { | ||
| public: | ||
| CVehicleAudioSettingsEntrySA(); | ||
| CVehicleAudioSettingsEntrySA(tVehicleAudioSettings* pSettings); | ||
| ~CVehicleAudioSettingsEntrySA() = default; | ||
|
|
||
| tVehicleAudioSettings* getInterface() { return &m_Settings; }; | ||
|
|
||
| void Assign(const CVehicleAudioSettingsEntry* pData); | ||
|
|
||
| eVehicleSoundType GetSoundType() { return m_Settings.m_eVehicleSoundType; }; | ||
| short GetEngineOnSoundBankID() { return m_Settings.m_wEngineOnSoundBankId; }; | ||
| short GetEngineOffSoundBankID() { return m_Settings.m_wEngineOffSoundBankId; }; | ||
| char GetStereo() { return m_Settings.m_nStereo; }; | ||
| float GetUnk3() { return m_Settings.unk3; }; | ||
| float GetUnk4() { return m_Settings.unk4; }; | ||
| char GetHornTon() { return m_Settings.m_bHornTon; }; | ||
| float GetHornHign() { return m_Settings.m_fHornHigh; }; | ||
| char GetUnk6() { return m_Settings.unk6; }; | ||
| char GetDoorSound() { return m_Settings.m_nDoorSound; }; | ||
| char GetRadioNum() { return m_Settings.m_nRadioNum; }; | ||
| char GetRadioType() { return m_Settings.m_nRadioType; }; | ||
| char GetVehicleTypeForAudio() { return m_Settings.m_nVehTypeForAudio; }; | ||
| float GetHornVolumeDelta() { return m_Settings.m_fHornVolumeDelta; }; | ||
|
|
||
| void SetSoundType(eVehicleSoundType value) { m_Settings.m_eVehicleSoundType = value; }; | ||
| void SetEngineOnSoundBankID(short value) { m_Settings.m_wEngineOnSoundBankId = value; }; | ||
| void SetEngineOffSoundBankID(short value) { m_Settings.m_wEngineOffSoundBankId = value; }; | ||
| void SetStereo(char value) { m_Settings.m_nStereo = value; }; | ||
| void SetUnk3(float value) { m_Settings.unk3= value; }; | ||
| void SetUnk4(float value) { m_Settings.unk4= value; }; | ||
| void SetHornTon(char value) { m_Settings.m_bHornTon = value; }; | ||
| void SetHornHign(float value) { m_Settings.m_fHornHigh = value; }; | ||
| void SetUnk6(char value) { m_Settings.unk6= value; }; | ||
| void SetDoorSound(char value) { m_Settings.m_nDoorSound = value; }; | ||
| void SetRadioNum(char value) { m_Settings.m_nRadioNum = value; }; | ||
| void SetRadioType(char value) { m_Settings.m_nRadioType = value; }; | ||
| void SetVehicleTypeForAudio(char value) { m_Settings.m_nVehTypeForAudio = value; }; | ||
| void SetHornVolumeDelta(float value) { m_Settings.m_fHornVolumeDelta = value; }; | ||
|
|
||
| private: | ||
| tVehicleAudioSettings m_Settings; | ||
| }; | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.