| 1 | /* |
| 2 | * Descent 3 |
| 3 | * Copyright (C) 2024 Parallax Software |
| 4 | * |
| 5 | * This program is free software: you can redistribute it and/or modify |
| 6 | * it under the terms of the GNU General Public License as published by |
| 7 | * the Free Software Foundation, either version 3 of the License, or |
| 8 | * (at your option) any later version. |
| 9 | * |
| 10 | * This program is distributed in the hope that it will be useful, |
| 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 13 | * GNU General Public License for more details. |
| 14 | * |
| 15 | * You should have received a copy of the GNU General Public License |
| 16 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 17 | */ |
| 18 | |
| 19 | #ifndef WEATHER_H |
| 20 | #define WEATHER_Hcxx . . $ `Descent3/weather.h:20:9`! |
| 21 | |
| 22 | #define WEATHER_FLAGS_RAINcxx . . $ `Descent3/weather.h:22:9`! 1 |
| 23 | #define WEATHER_FLAGS_LIGHTNINGcxx . . $ `Descent3/weather.h:23:9`! 2 |
| 24 | #define WEATHER_FLAGS_SNOWcxx . . $ `Descent3/weather.h:24:9`! 4 |
| 25 | |
| 26 | #define MAX_RAIN_INTENSITYcxx . . $ `Descent3/weather.h:26:9`! 50 |
| 27 | #define MAX_SNOW_INTENSITYcxx . . $ `Descent3/weather.h:27:9`! 200 |
| 28 | |
| 29 | struct weathercxx . . $ weather# { |
| 30 | int flagscxx . . $ weather#flags.; // see weather flags, above |
| 31 | |
| 32 | float snow_intensity_scalarcxx . . $ weather#snow_intensity_scalar.; // how hard it is snowing |
| 33 | float rain_intensity_scalarcxx . . $ weather#rain_intensity_scalar.; // how hard its raining |
| 34 | int rain_colorcxx . . $ weather#rain_color.; // the color of the rain |
| 35 | int lightning_colorcxx . . $ weather#lightning_color.; // the color of the lightning |
| 36 | int sky_flash_colorcxx . . $ weather#sky_flash_color.; // the color of the sky when lightning occurs |
| 37 | |
| 38 | uint8_tcxx . . $ uint8_t# lightning_sequencecxx . . $ weather#lightning_sequence.; |
| 39 | |
| 40 | float last_lightning_evaluation_timecxx . . $ weather#last_lightning_evaluation_time.; |
| 41 | float lightning_interval_timecxx . . $ weather#lightning_interval_time.; |
| 42 | int lightning_rand_valuecxx . . $ weather#lightning_rand_value.; |
| 43 | |
| 44 | int snowflakes_to_createcxx . . $ weather#snowflakes_to_create.; |
| 45 | |
| 46 | }; |
| 47 | |
| 48 | extern weathercxx . . $ weather# Weathercxx . . $ Weather.; |
| 49 | |
| 50 | // resets the weather so there is nothing happening |
| 51 | void ResetWeathercxx . . $ ResetWeather(49f6e7a06ebc5aa8).(); |
| 52 | |
| 53 | // Makes droplets appear on the windshield, plus makes rain fall in the distance |
| 54 | void DoRainEffectcxx . . $ DoRainEffect(49f6e7a06ebc5aa8).(); |
| 55 | |
| 56 | // does all the weather stuff that is going to be done for this frame |
| 57 | void DoWeatherForFramecxx . . $ DoWeatherForFrame(49f6e7a06ebc5aa8).(); |
| 58 | |
| 59 | // Sets the state of the rain to on or off, plus sets the intensity of the rain (0 to 1) |
| 60 | void SetRainStatecxx . . $ SetRainState(43c79ee2f1b9aefe).(int on, float intensity); |
| 61 | |
| 62 | // Sets the state of lightning to on or off, plus allows the setting of how often to check |
| 63 | // for lightning and the randomness at which lightning happens |
| 64 | void SetLightningStatecxx . . $ SetLightningState(d6d7ce2c0b3115db).(int on, float interval_time, int randval); |
| 65 | |
| 66 | // Sets the state of the snow to on or off, plus sets the intensity of the snow (0 to 1) |
| 67 | void SetSnowStatecxx . . $ SetSnowState(43c79ee2f1b9aefe).(int on, float intensity); |
| 68 | |
| 69 | #endif |