| 1 | /* |
| 2 | * LegacyClonk |
| 3 | * |
| 4 | * Copyright (c) 1998-2000, Matthes Bender (RedWolf Design) |
| 5 | * Copyright (c) 2017-2020, The LegacyClonk Team and contributors |
| 6 | * |
| 7 | * Distributed under the terms of the ISC license; see accompanying file |
| 8 | * "COPYING" for details. |
| 9 | * |
| 10 | * "Clonk" is a registered trademark of Matthes Bender, used with permission. |
| 11 | * See accompanying file "TRADEMARK" for details. |
| 12 | * |
| 13 | * To redistribute this file separately, substitute the full license texts |
| 14 | * for the above references. |
| 15 | */ |
| 16 | |
| 17 | /* Controls temperature, wind, and natural disasters */ |
| 18 | |
| 19 | #pragma once |
| 20 | |
| 21 | #include "C4ForwardDeclarations.h" |
| 22 | |
| 23 | #include <cstdint> |
| 24 | |
| 25 | class C4Weather |
| 26 | { |
| 27 | public: |
| 28 | C4Weather(); |
| 29 | ~C4Weather(); |
| 30 | |
| 31 | public: |
| 32 | int32_t Season, YearSpeed, SeasonDelay; |
| 33 | int32_t Wind, TargetWind; |
| 34 | int32_t Temperature, TemperatureRange, Climate; |
| 35 | int32_t MeteoriteLevel, VolcanoLevel, EarthquakeLevel, LightningLevel; |
| 36 | bool NoGamma; |
| 37 | |
| 38 | public: |
| 39 | void Default(); |
| 40 | void Clear(); |
| 41 | void Execute(); |
| 42 | void SetClimate(int32_t iClimate); |
| 43 | void SetSeason(int32_t iSeason); |
| 44 | void SetTemperature(int32_t iTemperature); |
| 45 | void Init(bool fScenario); |
| 46 | void SetWind(int32_t iWind); |
| 47 | int32_t GetWind(int32_t x, int32_t y); |
| 48 | int32_t GetTemperature(); |
| 49 | int32_t GetSeason(); |
| 50 | int32_t GetClimate(); |
| 51 | bool LaunchLightning(int32_t x, int32_t y, int32_t xdir, int32_t xrange, int32_t ydir, int32_t yrange, bool fDoGamma); |
| 52 | bool LaunchVolcano(int32_t mat, int32_t x, int32_t y, int32_t size); |
| 53 | bool LaunchEarthquake(int32_t iX, int32_t iY); |
| 54 | bool LaunchCloud(int32_t iX, int32_t iY, int32_t iWidth, int32_t iStrength, const char *szPrecipitation); |
| 55 | void SetSeasonGamma(); // set gamma adjustment for season |
| 56 | void CompileFunc(StdCompiler *pComp); |
| 57 | }; |
| 58 | |