diff --git a/src/visual.cpp b/src/visual.cpp index 14b8735..69af161 100644 --- a/src/visual.cpp +++ b/src/visual.cpp @@ -123,7 +123,7 @@ void Visual::GenerateTimecycFile() #else // GTA3 & GTAVC 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; switch(i) @@ -139,6 +139,12 @@ void Visual::GenerateTimecycFile() break; case 3: 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 @@ -149,20 +155,9 @@ void Visual::GenerateTimecycFile() file << buffer << std::endl; 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 + size_t val = i + TOTAL_WEATHERS*j; 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_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) ); #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{} {} {} {}", 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), @@ -234,8 +259,7 @@ int Visual::CalcArrayIndex() hour = 7; } #endif - - return TOTAL_WEATHERS * hour + CWeather::OldWeatherType; + return TOTAL_WEATHERS * hour + CWeather::OldWeatherType; } diff --git a/src/visual.h b/src/visual.h index 49f7834..803d295 100644 --- a/src/visual.h +++ b/src/visual.h @@ -16,11 +16,18 @@ private: static inline int m_nTimecycHour = 8; static inline std::vector m_WeatherNames { +#ifdef GTASA "EXTRASUNNY LA", "SUNNY LA", "EXTRASUNNY SMOG LA", "SUNNY SMOG LA", "CLOUDY LA", "SUNNY SF", "EXTRASUNNY SF", "CLOUDY SF", "RAINY SF", "FOGGY SF", "SUNNY VEGAS", "EXTRASUNNY VEGAS", "CLOUDY VEGAS", "EXTRASUNNY COUNTRYSIDE", "SUNNY COUNTRYSIDE", "CLOUDY COUNTRYSIDE", "RAINY COUNTRYSIDE", "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();