summaryrefslogtreecommitdiffstats
path: root/src/core
diff options
context:
space:
mode:
authorRoman Masanin <36927roma@gmail.com>2020-09-13 20:45:53 +0200
committerRoman Masanin <36927roma@gmail.com>2020-09-13 20:45:53 +0200
commit8f948228d5e60eb89055a8d40210e99e9f4f2c47 (patch)
treeee8c238c77e53e29c650d911e9d198452f5a7ba9 /src/core
parentvehicle audio(first part) and temp fix for openAL (diff)
parentMerge pull request #702 from Sergeanur/VC/MusicManager (diff)
downloadre3-8f948228d5e60eb89055a8d40210e99e9f4f2c47.tar
re3-8f948228d5e60eb89055a8d40210e99e9f4f2c47.tar.gz
re3-8f948228d5e60eb89055a8d40210e99e9f4f2c47.tar.bz2
re3-8f948228d5e60eb89055a8d40210e99e9f4f2c47.tar.lz
re3-8f948228d5e60eb89055a8d40210e99e9f4f2c47.tar.xz
re3-8f948228d5e60eb89055a8d40210e99e9f4f2c47.tar.zst
re3-8f948228d5e60eb89055a8d40210e99e9f4f2c47.zip
Diffstat (limited to 'src/core')
-rw-r--r--src/core/EventList.h1
-rw-r--r--src/core/Game.cpp3
-rw-r--r--src/core/Stats.cpp22
-rw-r--r--src/core/Stats.h2
4 files changed, 21 insertions, 7 deletions
diff --git a/src/core/EventList.h b/src/core/EventList.h
index 0531aed7..dcca1270 100644
--- a/src/core/EventList.h
+++ b/src/core/EventList.h
@@ -24,6 +24,7 @@ enum eEventType
EVENT_CAR_SET_ON_FIRE,
EVENT_ASSAULT_NASTYWEAPON,
EVENT_ASSAULT_NASTYWEAPON_POLICE,
+ EVENT_UNK, // Not on SA it seems
EVENT_ICECREAM,
EVENT_ATM,
EVENT_SHOPSTALL,
diff --git a/src/core/Game.cpp b/src/core/Game.cpp
index d108c78d..6ba6b191 100644
--- a/src/core/Game.cpp
+++ b/src/core/Game.cpp
@@ -463,8 +463,7 @@ bool CGame::Initialise(const char* datFile)
#ifdef USE_TEXTURE_POOL
_TexturePoolsUnknown(true);
#endif
- // TODO(Miami)
- // DMAudio.SetStartingTrackPositions(1);
+ DMAudio.SetStartingTrackPositions(true);
DMAudio.ChangeMusicMode(MUSICMODE_GAME);
return true;
}
diff --git a/src/core/Stats.cpp b/src/core/Stats.cpp
index 9c3ad084..373c295d 100644
--- a/src/core/Stats.cpp
+++ b/src/core/Stats.cpp
@@ -4,6 +4,7 @@
#include "Text.h"
#include "World.h"
#include "Pad.h"
+#include "DMAudio.h"
#include <climits>
@@ -102,7 +103,7 @@ float CStats::LongestWheelieDist;
float CStats::LongestStoppieDist;
float CStats::Longest2WheelDist;
-// --MIAMI: functions below are done except TODOs, but there are some to be moved from Frontend
+// --MIAMI: functions below are done, but there are some to be moved from Frontend
void CStats::Init()
{
@@ -198,9 +199,7 @@ void CStats::Init()
NoMoreHurricanes = 0;
ShowChaseStatOnScreen = 0;
abSonyCDs[0] = 0;
- // TODO(Miami): Change this with PopulateFavoriteRadioStationList(); !!
- for (int i = 0; i < NUM_RADIOS; i++)
- FavoriteRadioStationList[i] = 0.0f;
+ PopulateFavoriteRadioStationList();
NumPropertyOwned = 0;
for (int i = 0; i < TOTAL_PROPERTIES; i++)
@@ -471,6 +470,11 @@ void CStats::AddPropertyAsOwned(int32 id)
}
}
+float CStats::GetFavoriteRadioStationList(int32 station)
+{
+ return FavoriteRadioStationList[station];
+}
+
void CStats::SaveStats(uint8 *buf, uint32 *size)
{
CheckPointReachedSuccessfully();
@@ -652,7 +656,7 @@ void CStats::SaveStats(uint8 *buf, uint32 *size)
CopyToBuf(buf, TotalLegitimateKills);
CopyToBuf(buf, LastMissionPassedName);
CopyToBuf(buf, CheatedCount);
- // TODO(Miami): Set favourite radio stations!!
+ PopulateFavoriteRadioStationList();
CopyToBuf(buf, FavoriteRadioStationList);
assert(buf - buf_start == *size);
@@ -757,3 +761,11 @@ void CStats::LoadStats(uint8 *buf, uint32 size)
assert(buf - buf_start == size);
#undef CopyFromBuf
}
+
+void
+CStats::PopulateFavoriteRadioStationList()
+{
+ float* pListenTimeArray = DMAudio.GetListenTimeArray();
+ for (int i = 0; i < NUM_RADIOS; i++)
+ FavoriteRadioStationList[i] = pListenTimeArray[i];
+} \ No newline at end of file
diff --git a/src/core/Stats.h b/src/core/Stats.h
index ad6fe516..49f84657 100644
--- a/src/core/Stats.h
+++ b/src/core/Stats.h
@@ -145,4 +145,6 @@ public:
static void LongestTimeInBloodRing(int32);
static void AddPropertyAsOwned(int32);
+ static void PopulateFavoriteRadioStationList();
+ static float GetFavoriteRadioStationList(int32);
};