[III & VC] bugfixes with timecyc gen
This commit is contained in:
parent
6ac842a607
commit
209726c314
@ -123,7 +123,7 @@ void Visual::GenerateTimecycFile()
|
|||||||
#else // GTA3 & GTAVC
|
#else // GTA3 & GTAVC
|
||||||
std::ofstream file = std::ofstream("timecyc.dat");
|
std::ofstream file = std::ofstream("timecyc.dat");
|
||||||
|
|
||||||
for (uint i = 0; i < 4; ++i)
|
for (uint i = 0; i < TOTAL_WEATHERS; ++i)
|
||||||
{
|
{
|
||||||
std::string buffer;
|
std::string buffer;
|
||||||
switch(i)
|
switch(i)
|
||||||
@ -139,6 +139,12 @@ void Visual::GenerateTimecycFile()
|
|||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
buffer = "\n// FOGGY\n";
|
buffer = "\n// FOGGY\n";
|
||||||
|
case 4:
|
||||||
|
buffer = "\n// EXTRA SUNNY\n";
|
||||||
|
case 5:
|
||||||
|
buffer = "\n// HURRICANE\n";
|
||||||
|
case 6:
|
||||||
|
buffer = "\n// EXTRA COLORS (INTERIORS)\n// These colours do not belong to a weather type but can be set by the level designers for interiors.\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef GTA3
|
#ifdef GTA3
|
||||||
@ -149,20 +155,9 @@ void Visual::GenerateTimecycFile()
|
|||||||
file << buffer << std::endl;
|
file << buffer << std::endl;
|
||||||
|
|
||||||
for (size_t j = 0; j < 24; ++j)
|
for (size_t j = 0; j < 24; ++j)
|
||||||
{
|
{
|
||||||
buffer = "// " + std::to_string(j) + " ";
|
|
||||||
if (j < 12)
|
|
||||||
{
|
|
||||||
buffer += "AM\n";
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
buffer += "PM\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
size_t val = TOTAL_WEATHERS * i + j;
|
|
||||||
|
|
||||||
#ifdef GTA3
|
#ifdef GTA3
|
||||||
|
size_t val = i + TOTAL_WEATHERS*j;
|
||||||
buffer += std::format("{} {} {}\t{} {} {}\t{} {} {}\t{} {} {}\t{} {} {}\t{} {} {}\t{} {} {}\t{} {} {}\t{} {} {}\t{} {} {}\t{} {} {}\t{} {} {}\t{} {} {} {}",
|
buffer += std::format("{} {} {}\t{} {} {}\t{} {} {}\t{} {} {}\t{} {} {}\t{} {} {}\t{} {} {}\t{} {} {}\t{} {} {}\t{} {} {}\t{} {} {}\t{} {} {}\t{} {} {} {}",
|
||||||
GetTCVal(m_nAmbientRed, val), GetTCVal(m_nAmbientGreen, val), GetTCVal(m_nAmbientBlue, val),
|
GetTCVal(m_nAmbientRed, val), GetTCVal(m_nAmbientGreen, val), GetTCVal(m_nAmbientBlue, val),
|
||||||
GetTCVal(m_nDirRed, val), GetTCVal(m_nDirGreen, val), GetTCVal(m_nDirBlue, val),
|
GetTCVal(m_nDirRed, val), GetTCVal(m_nDirGreen, val), GetTCVal(m_nDirBlue, val),
|
||||||
@ -179,6 +174,36 @@ void Visual::GenerateTimecycFile()
|
|||||||
GetTCVal(m_fPostFxRed, val), GetTCVal(m_fPostFxGreen, val), GetTCVal(m_fPostFxBlue, val), GetTCVal(m_fPostFxAlpha, val)
|
GetTCVal(m_fPostFxRed, val), GetTCVal(m_fPostFxGreen, val), GetTCVal(m_fPostFxBlue, val), GetTCVal(m_fPostFxAlpha, val)
|
||||||
);
|
);
|
||||||
#elif GTAVC
|
#elif GTAVC
|
||||||
|
|
||||||
|
if (i == 6) //EXTRA COLORS
|
||||||
|
{
|
||||||
|
buffer = "// Extra Color " + std::to_string(j);
|
||||||
|
|
||||||
|
static std::string intNames[] = {
|
||||||
|
"Maibu Club", "Strip Club", "Hotel", "Bank", "Police HQ", "Mall", "Rifle Range", "Mansion", "Dirtring", "Blood ring",
|
||||||
|
"Hotring", "Concert Hall", "Auntie Poulets", "Intro at Docks", "Biker Bar", "Intro Cafe Dark Room", "Studio"
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
if (j < 18)
|
||||||
|
{
|
||||||
|
buffer += "(" + intNames[j] + ")";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
buffer = "// " + std::to_string(j) + " ";
|
||||||
|
if (j < 12)
|
||||||
|
{
|
||||||
|
buffer += "AM\n";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
buffer += "PM\n";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
size_t val = TOTAL_WEATHERS * i + j;
|
||||||
buffer += std::format("{} {} {}\t{} {} {}\t{} {} {}\t{} {} {}\t{} {} {}\t{} {} {}\t{} {} {}\t{} {} {}\t{} {} {}\t{}\t{}\t{}\t{}\t{}\t{}\t{}\t{}\t{}\t{} {} {}\t{} {} {}\t{} {} {}\t{} {} {}\t{} {} {} {}",
|
buffer += std::format("{} {} {}\t{} {} {}\t{} {} {}\t{} {} {}\t{} {} {}\t{} {} {}\t{} {} {}\t{} {} {}\t{} {} {}\t{}\t{}\t{}\t{}\t{}\t{}\t{}\t{}\t{}\t{} {} {}\t{} {} {}\t{} {} {}\t{} {} {}\t{} {} {} {}",
|
||||||
GetTCVal(m_nAmbientRed, val), GetTCVal(m_nAmbientGreen, val), GetTCVal(m_nAmbientBlue, val),
|
GetTCVal(m_nAmbientRed, val), GetTCVal(m_nAmbientGreen, val), GetTCVal(m_nAmbientBlue, val),
|
||||||
GetTCVal(m_nAmbientRed_Obj, val), GetTCVal(m_nAmbientGreen_Obj, val), GetTCVal(m_nAmbientBlue_Obj, val),
|
GetTCVal(m_nAmbientRed_Obj, val), GetTCVal(m_nAmbientGreen_Obj, val), GetTCVal(m_nAmbientBlue_Obj, val),
|
||||||
@ -234,8 +259,7 @@ int Visual::CalcArrayIndex()
|
|||||||
hour = 7;
|
hour = 7;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
return TOTAL_WEATHERS * hour + CWeather::OldWeatherType;
|
||||||
return TOTAL_WEATHERS * hour + CWeather::OldWeatherType;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -16,11 +16,18 @@ private:
|
|||||||
static inline int m_nTimecycHour = 8;
|
static inline int m_nTimecycHour = 8;
|
||||||
static inline std::vector<std::string> m_WeatherNames
|
static inline std::vector<std::string> m_WeatherNames
|
||||||
{
|
{
|
||||||
|
#ifdef GTASA
|
||||||
"EXTRASUNNY LA", "SUNNY LA", "EXTRASUNNY SMOG LA", "SUNNY SMOG LA", "CLOUDY LA", "SUNNY SF", "EXTRASUNNY SF",
|
"EXTRASUNNY LA", "SUNNY LA", "EXTRASUNNY SMOG LA", "SUNNY SMOG LA", "CLOUDY LA", "SUNNY SF", "EXTRASUNNY SF",
|
||||||
"CLOUDY SF", "RAINY SF", "FOGGY SF",
|
"CLOUDY SF", "RAINY SF", "FOGGY SF",
|
||||||
"SUNNY VEGAS", "EXTRASUNNY VEGAS", "CLOUDY VEGAS", "EXTRASUNNY COUNTRYSIDE", "SUNNY COUNTRYSIDE",
|
"SUNNY VEGAS", "EXTRASUNNY VEGAS", "CLOUDY VEGAS", "EXTRASUNNY COUNTRYSIDE", "SUNNY COUNTRYSIDE",
|
||||||
"CLOUDY COUNTRYSIDE", "RAINY COUNTRYSIDE",
|
"CLOUDY COUNTRYSIDE", "RAINY COUNTRYSIDE",
|
||||||
"EXTRASUNNY DESERT", "SUNNY DESERT", "SANDSTORM DESERT", "UNDERWATER", "EXTRACOLOURS 1", "EXTRACOLOURS 2"
|
"EXTRASUNNY DESERT", "SUNNY DESERT", "SANDSTORM DESERT", "UNDERWATER", "EXTRACOLOURS 1", "EXTRACOLOURS 2"
|
||||||
|
#else
|
||||||
|
"SUNNY", "CLOUDY", "RAINY", "FOGGY"
|
||||||
|
#ifdef GTAVC
|
||||||
|
,"EXTRA_SUNNY", "HURRICANE", "EXTRACOLORS"
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
static void GenerateTimecycFile();
|
static void GenerateTimecycFile();
|
||||||
|
Loading…
Reference in New Issue
Block a user