mirror of
https://github.com/GTAmodding/re3.git
synced 2024-12-28 20:55:40 +00:00
CStats::PopulateFavoriteRadioStationList
This commit is contained in:
parent
4f4b1f9145
commit
f0ccbcb281
2 changed files with 13 additions and 5 deletions
|
@ -4,6 +4,7 @@
|
||||||
#include "Text.h"
|
#include "Text.h"
|
||||||
#include "World.h"
|
#include "World.h"
|
||||||
#include "Pad.h"
|
#include "Pad.h"
|
||||||
|
#include "DMAudio.h"
|
||||||
|
|
||||||
#include <climits>
|
#include <climits>
|
||||||
|
|
||||||
|
@ -102,7 +103,7 @@ float CStats::LongestWheelieDist;
|
||||||
float CStats::LongestStoppieDist;
|
float CStats::LongestStoppieDist;
|
||||||
float CStats::Longest2WheelDist;
|
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()
|
void CStats::Init()
|
||||||
{
|
{
|
||||||
|
@ -198,9 +199,7 @@ void CStats::Init()
|
||||||
NoMoreHurricanes = 0;
|
NoMoreHurricanes = 0;
|
||||||
ShowChaseStatOnScreen = 0;
|
ShowChaseStatOnScreen = 0;
|
||||||
abSonyCDs[0] = 0;
|
abSonyCDs[0] = 0;
|
||||||
// TODO(Miami): Change this with PopulateFavoriteRadioStationList(); !!
|
PopulateFavoriteRadioStationList();
|
||||||
for (int i = 0; i < NUM_RADIOS; i++)
|
|
||||||
FavoriteRadioStationList[i] = 0.0f;
|
|
||||||
|
|
||||||
NumPropertyOwned = 0;
|
NumPropertyOwned = 0;
|
||||||
for (int i = 0; i < TOTAL_PROPERTIES; i++)
|
for (int i = 0; i < TOTAL_PROPERTIES; i++)
|
||||||
|
@ -633,7 +632,7 @@ void CStats::SaveStats(uint8 *buf, uint32 *size)
|
||||||
CopyToBuf(buf, TotalLegitimateKills);
|
CopyToBuf(buf, TotalLegitimateKills);
|
||||||
CopyToBuf(buf, LastMissionPassedName);
|
CopyToBuf(buf, LastMissionPassedName);
|
||||||
CopyToBuf(buf, CheatedCount);
|
CopyToBuf(buf, CheatedCount);
|
||||||
// TODO(Miami): Set favourite radio stations!!
|
PopulateFavoriteRadioStationList();
|
||||||
CopyToBuf(buf, FavoriteRadioStationList);
|
CopyToBuf(buf, FavoriteRadioStationList);
|
||||||
|
|
||||||
assert(buf - buf_start == *size);
|
assert(buf - buf_start == *size);
|
||||||
|
@ -738,3 +737,11 @@ void CStats::LoadStats(uint8 *buf, uint32 size)
|
||||||
assert(buf - buf_start == size);
|
assert(buf - buf_start == size);
|
||||||
#undef CopyFromBuf
|
#undef CopyFromBuf
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
CStats::PopulateFavoriteRadioStationList()
|
||||||
|
{
|
||||||
|
float* pListenTimeArray = DMAudio.GetListenTimeArray();
|
||||||
|
for (int i = 0; i < NUM_RADIOS; i++)
|
||||||
|
FavoriteRadioStationList[i] = pListenTimeArray[i];
|
||||||
|
}
|
|
@ -144,5 +144,6 @@ public:
|
||||||
|
|
||||||
static void LongestTimeInBloodRing(int32);
|
static void LongestTimeInBloodRing(int32);
|
||||||
static void AddPropertyAsOwned(int32);
|
static void AddPropertyAsOwned(int32);
|
||||||
|
static void PopulateFavoriteRadioStationList();
|
||||||
static float GetFavoriteRadioStationList(int32);
|
static float GetFavoriteRadioStationList(int32);
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue