summaryrefslogtreecommitdiffstats
path: root/src/audio
diff options
context:
space:
mode:
Diffstat (limited to 'src/audio')
-rw-r--r--src/audio/AudioLogic.cpp19
-rw-r--r--src/audio/AudioManager.cpp2
-rw-r--r--src/audio/AudioManager.h8
-rw-r--r--src/audio/AudioSamples.h2
-rw-r--r--src/audio/MusicManager.cpp22
-rw-r--r--src/audio/PoliceRadio.cpp7
-rw-r--r--src/audio/PoliceRadio.h2
-rw-r--r--src/audio/sampman.h1
-rw-r--r--src/audio/sampman_miles.cpp5
-rw-r--r--src/audio/sampman_oal.cpp35
-rw-r--r--src/audio/soundlist.h2
11 files changed, 51 insertions, 54 deletions
diff --git a/src/audio/AudioLogic.cpp b/src/audio/AudioLogic.cpp
index 1f32890c..457e09c0 100644
--- a/src/audio/AudioLogic.cpp
+++ b/src/audio/AudioLogic.cpp
@@ -1,4 +1,4 @@
-#include "common.h"
+#include "common.h"
#include "AudioManager.h"
#include "audio_enums.h"
@@ -41,9 +41,9 @@
#include "WindModifiers.h"
#include "Fluff.h"
#include "Script.h"
+#include "Wanted.h"
-
-const int channels = ARRAY_SIZE(cAudioManager::m_asActiveSamples);
+const int channels = ARRAY_SIZE(AudioManager.m_asActiveSamples);
const int policeChannel = channels + 1;
const int allChannels = channels + 2;
@@ -305,11 +305,11 @@ cAudioManager::ProcessPlayerMood()
playerPed = FindPlayerPed();
if (playerPed != nil) {
- if (playerPed->m_pWanted->m_nWantedLevel > 3) {
+ if (playerPed->m_pWanted->GetWantedLevel() > 3) {
m_nPlayerMood = PLAYER_MOOD_ANGRY;
return;
}
- if (playerPed->m_pWanted->m_nWantedLevel > 1) {
+ if (playerPed->m_pWanted->GetWantedLevel() > 1) {
m_nPlayerMood = PLAYER_MOOD_PISSED_OFF;
return;
}
@@ -5684,7 +5684,7 @@ cAudioManager::GetCopTalkSfx(CPed *ped, int16 sound)
case SOUND_PED_ATTACK: GetPhrase(sfx, ped->m_lastComment, 8494, 4); break;
case SOUND_PED_EVADE: GetPhrase(sfx, ped->m_lastComment, 8491, 3); break;
case SOUND_PED_PED_COLLISION:
- if(FindPlayerPed()->m_pWanted->m_nWantedLevel <= 0) return NO_SAMPLE;
+ if(FindPlayerPed()->m_pWanted->GetWantedLevel() <= 0) return NO_SAMPLE;
GetPhrase(sfx, ped->m_lastComment, 8476, 5);
break;
default: return GetGenericMaleTalkSfx(ped, sound);
@@ -8115,7 +8115,7 @@ cAudioManager::ProcessWaterCannon(int32)
}
//positon of arcade machines
-CVector aVecExtraSoundPosition[] = { {-1042.546f, 88.794f, 11.324f}, {-1004.476f, 181.697f, 11.324f} };
+CVector aVecExtraSoundPosition[] = { CVector(-1042.546f, 88.794f, 11.324f), CVector(-1004.476f, 181.697f, 11.324f) };
void
cAudioManager::ProcessExtraSounds()
@@ -9311,7 +9311,8 @@ cAudioManager::ProcessBridge()
void
cAudioManager::ProcessBridgeWarning()
{
- if (CStats::CommercialPassed && m_sQueueSample.m_fDistance < 450.f) {
+ // TODO: LCS
+/* if (CStats::CommercialPassed && m_sQueueSample.m_fDistance < 450.f) {
m_sQueueSample.m_nVolume = ComputeVolume(100, 450.f, m_sQueueSample.m_fDistance);
if (m_sQueueSample.m_nVolume != 0) {
m_sQueueSample.m_nCounter = 0;
@@ -9332,7 +9333,7 @@ cAudioManager::ProcessBridgeWarning()
m_sQueueSample.m_bRequireReflection = false;
AddSampleToRequestedQueue();
}
- }
+ }*/
}
void
diff --git a/src/audio/AudioManager.cpp b/src/audio/AudioManager.cpp
index 721a7acc..2304b4c4 100644
--- a/src/audio/AudioManager.cpp
+++ b/src/audio/AudioManager.cpp
@@ -14,7 +14,7 @@
cAudioManager AudioManager;
-const int channels = ARRAY_SIZE(cAudioManager::m_asActiveSamples);
+const int channels = ARRAY_SIZE(AudioManager.m_asActiveSamples);
const int policeChannel = channels + 1;
const int allChannels = channels + 2;
diff --git a/src/audio/AudioManager.h b/src/audio/AudioManager.h
index b5e9b499..2eb2220b 100644
--- a/src/audio/AudioManager.h
+++ b/src/audio/AudioManager.h
@@ -1,4 +1,4 @@
-#pragma once
+#pragma once
#include "audio_enums.h"
#include "AudioCollision.h"
@@ -544,8 +544,8 @@ public:
#endif
};
-#ifdef AUDIO_MSS
-static_assert(sizeof(cAudioManager) == 0x5558, "cAudioManager: error");
-#endif
+//#ifdef AUDIO_MSS
+//static_assert(sizeof(cAudioManager) == 0x5558, "cAudioManager: error");
+//#endif
extern cAudioManager AudioManager;
diff --git a/src/audio/AudioSamples.h b/src/audio/AudioSamples.h
index 159809d0..403ef684 100644
--- a/src/audio/AudioSamples.h
+++ b/src/audio/AudioSamples.h
@@ -1,4 +1,4 @@
-#pragma once
+#pragma once
#include "common.h"
diff --git a/src/audio/MusicManager.cpp b/src/audio/MusicManager.cpp
index 2a16dc14..0a28421d 100644
--- a/src/audio/MusicManager.cpp
+++ b/src/audio/MusicManager.cpp
@@ -1237,11 +1237,12 @@ cMusicManager::DisplayRadioStationName()
case RADIO_ESPANTOSO: string = TheText.Get("FEA_FM6"); break;
case EMOTION: string = TheText.Get("FEA_FM7"); break;
case WAVE: string = TheText.Get("FEA_FM8"); break;
- case USERTRACK:
+ case 9: string = TheText.Get("FEA_FM9"); break;
+ case 10:
if (!SampleManager.IsMP3RadioChannelAvailable())
return;
string = TheText.Get("FEA_MP3"); break;
- default: return;
+ default: string = TheText.Get("FEA_NON"); break;
};
if (pCurrentStation != string) {
@@ -1255,21 +1256,22 @@ cMusicManager::DisplayRadioStationName()
CFont::SetJustifyOff();
CFont::SetBackgroundOff();
- CFont::SetScale(SCREEN_SCALE_X(0.8f), SCREEN_SCALE_Y(1.35f));
+ CFont::SetDropShadowPosition(2);
+ CFont::SetScale(PSP_SCREEN_SCALE_X(0.5f), PSP_SCREEN_SCALE_Y(0.88f));
CFont::SetPropOn();
- CFont::SetFontStyle(FONT_STANDARD);
+ CFont::SetFontStyle(FONT_BANK);
CFont::SetCentreOn();
- CFont::SetCentreSize(SCREEN_STRETCH_X(DEFAULT_SCREEN_WIDTH));
- CFont::SetColor(CRGBA(0, 0, 0, 255));
- CFont::PrintString(SCREEN_WIDTH / 2 + SCREEN_SCALE_X(2.0f), SCREEN_SCALE_Y(22.0f) + SCREEN_SCALE_Y(2.0f), pCurrentStation);
+ CFont::SetCentreSize(PSP_SCREEN_SCALE_X(260.0f));
+ CFont::SetDropColor(CRGBA(0, 0, 0, 255));
if (gNumRetunePresses)
- CFont::SetColor(CRGBA(102, 133, 143, 255));
+ CFont::SetColor(CRGBA(77, 155, 210, 255));
else
- CFont::SetColor(CRGBA(147, 196, 211, 255));
+ CFont::SetColor(CRGBA(77, 155, 210, 255));
- CFont::PrintString(SCREEN_WIDTH / 2, SCREEN_SCALE_Y(22.0f), pCurrentStation);
+ CFont::PrintString(SCREEN_WIDTH / 2, PSP_SCREEN_SCALE_Y(7.0f), pCurrentStation);
CFont::DrawFonts();
+ CFont::SetCentreSize(SCREEN_STRETCH_X(DEFAULT_SCREEN_WIDTH));
}
}
}
diff --git a/src/audio/PoliceRadio.cpp b/src/audio/PoliceRadio.cpp
index 07dfb890..b8f44f60 100644
--- a/src/audio/PoliceRadio.cpp
+++ b/src/audio/PoliceRadio.cpp
@@ -13,8 +13,9 @@
#include "World.h"
#include "Zones.h"
#include "sampman.h"
+#include "Wanted.h"
-const int channels = ARRAY_SIZE(cAudioManager::m_asActiveSamples);
+const int channels = ARRAY_SIZE(AudioManager.m_asActiveSamples);
const int policeChannel = channels + 1;
struct tPoliceRadioZone {
@@ -136,7 +137,7 @@ cAudioManager::ServicePoliceRadio()
#endif
CPlayerPed *playerPed = FindPlayerPed();
if (playerPed) {
- wantedLevel = playerPed->m_pWanted->m_nWantedLevel;
+ wantedLevel = playerPed->m_pWanted->GetWantedLevel();
if (!crimeReport) {
if (wantedLevel != 0) {
if (nLastSeen != 0)
@@ -652,7 +653,7 @@ void
cAudioManager::ReportCrime(eCrimeType type, const CVector &pos)
{
int32 lastCrime = ARRAY_SIZE(m_sPoliceRadioQueue.crimes);
- if (m_bIsInitialised && MusicManager.m_nMusicMode != MUSICMODE_CUTSCENE && FindPlayerPed()->m_pWanted->m_nWantedLevel > 0 &&
+ if (m_bIsInitialised && MusicManager.m_nMusicMode != MUSICMODE_CUTSCENE && FindPlayerPed()->m_pWanted->GetWantedLevel() > 0 &&
(type > CRIME_NONE || type < NUM_CRIME_TYPES) && m_FrameCounter >= gMinTimeToNextReport[type]) {
for (int32 i = 0; i < ARRAY_SIZE(m_sPoliceRadioQueue.crimes); i++) {
if (m_sPoliceRadioQueue.crimes[i].type != CRIME_NONE) {
diff --git a/src/audio/PoliceRadio.h b/src/audio/PoliceRadio.h
index e9a0fde0..d7c928e2 100644
--- a/src/audio/PoliceRadio.h
+++ b/src/audio/PoliceRadio.h
@@ -1,6 +1,6 @@
#pragma once
-#include "Wanted.h"
+#include "Crime.h"
struct cAMCrime {
int32 type;
diff --git a/src/audio/sampman.h b/src/audio/sampman.h
index 7597eafb..697a7aa8 100644
--- a/src/audio/sampman.h
+++ b/src/audio/sampman.h
@@ -1,5 +1,4 @@
#pragma once
-#include "common.h"
#include "AudioSamples.h"
#define MAX_VOLUME 127
diff --git a/src/audio/sampman_miles.cpp b/src/audio/sampman_miles.cpp
index 78de4e6b..bf91a874 100644
--- a/src/audio/sampman_miles.cpp
+++ b/src/audio/sampman_miles.cpp
@@ -1,8 +1,7 @@
#include "common.h"
#ifdef AUDIO_MSS
-#include <windows.h>
-#include <shobjidl.h>
+#include <shlobj.h>
#include <shlguid.h>
#include <time.h>
@@ -20,8 +19,6 @@
#pragma comment( lib, "mss32.lib" )
-// --MIAMI: file done
-
cSampleManager SampleManager;
uint32 BankStartOffset[MAX_SFX_BANKS];
///////////////////////////////////////////////////////////////
diff --git a/src/audio/sampman_oal.cpp b/src/audio/sampman_oal.cpp
index ec85fc43..7da871a5 100644
--- a/src/audio/sampman_oal.cpp
+++ b/src/audio/sampman_oal.cpp
@@ -1,17 +1,11 @@
//#define JUICY_OAL
#ifdef AUDIO_OAL
-#include "sampman.h"
-
#include <time.h>
#include "eax.h"
#include "eax-util.h"
-#define WITHWINDOWS
-#include "common.h"
-#include "crossplatform.h"
-
#ifdef _WIN32
#include <io.h>
#include <AL/al.h>
@@ -19,8 +13,24 @@
#include <AL/alext.h>
#include <AL/efx.h>
#include <AL/efx-presets.h>
+
+// for user MP3s
+#include <direct.h>
+#include <shlobj.h>
+#include <shlguid.h>
+#else
+#define _getcwd getcwd
+#endif
+
+#if defined _MSC_VER && !defined CMAKE_NO_AUTOLINK
+#pragma comment( lib, "OpenAL32.lib" )
#endif
+#include "common.h"
+#include "crossplatform.h"
+
+#include "sampman.h"
+
#include "oal/oal_utils.h"
#include "oal/aldlist.h"
#include "oal/channel.h"
@@ -38,19 +48,6 @@
//TODO: max channels
//TODO: loop count
-#if defined _MSC_VER && !defined CMAKE_NO_AUTOLINK
-#pragma comment( lib, "OpenAL32.lib" )
-#endif
-
-// for user MP3s
-#ifdef _WIN32
-#include <direct.h>
-#include <shobjidl.h>
-#include <shlguid.h>
-#else
-#define _getcwd getcwd
-#endif
-
cSampleManager SampleManager;
bool _bSampmanInitialised = false;
diff --git a/src/audio/soundlist.h b/src/audio/soundlist.h
index 98982f61..4d88590e 100644
--- a/src/audio/soundlist.h
+++ b/src/audio/soundlist.h
@@ -1,4 +1,4 @@
-#pragma once
+#pragma once
enum eSound
{