1
0
Fork 0
mirror of https://git.rip/DMCA_FUCKER/re3.git synced 2024-11-04 21:15:56 +00:00
re3/src/core/IniFile.cpp

28 lines
791 B
C++
Raw Normal View History

2019-08-06 21:32:19 +00:00
#include "common.h"
2020-04-17 13:31:11 +00:00
2019-08-06 21:32:19 +00:00
#include "IniFile.h"
#include "CarCtrl.h"
#include "FileMgr.h"
#include "main.h"
#include "Population.h"
2020-04-17 05:54:14 +00:00
float CIniFile::PedNumberMultiplier = 1.0f;
float CIniFile::CarNumberMultiplier = 1.0f;
2019-08-06 21:32:19 +00:00
void CIniFile::LoadIniFile()
{
CFileMgr::SetDir("");
int f = CFileMgr::OpenFile("gta3.ini", "r");
if (f){
CFileMgr::ReadLine(f, gString, 200);
sscanf(gString, "%f", &PedNumberMultiplier);
2020-04-19 16:34:08 +00:00
PedNumberMultiplier = Min(3.0f, Max(0.5f, PedNumberMultiplier));
2019-08-06 21:32:19 +00:00
CFileMgr::ReadLine(f, gString, 200);
sscanf(gString, "%f", &CarNumberMultiplier);
2020-04-19 16:34:08 +00:00
CarNumberMultiplier = Min(3.0f, Max(0.5f, CarNumberMultiplier));
2019-08-06 21:32:19 +00:00
CFileMgr::CloseFile(f);
}
CPopulation::MaxNumberOfPedsInUse = 25.0f * PedNumberMultiplier;
CCarCtrl::MaxNumberOfCarsInUse = 12.0f * CarNumberMultiplier;
}