1 /* ScummVM - Graphic Adventure Engine
2  *
3  * ScummVM is the legal property of its developers, whose names
4  * are too numerous to list here. Please refer to the COPYRIGHT
5  * file distributed with this source distribution.
6  *
7  * This program is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU General Public License
9  * as published by the Free Software Foundation; either version 2
10  * of the License, or(at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program; if not, write to the Free Software
19  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20  *
21  */
22 
23 #ifndef AGS_PLUGINS_AGS_SNOW_RAIN_AGS_SNOW_RAIN_H
24 #define AGS_PLUGINS_AGS_SNOW_RAIN_AGS_SNOW_RAIN_H
25 
26 #include "ags/plugins/ags_plugin.h"
27 #include "ags/plugins/ags_snow_rain/weather.h"
28 
29 namespace AGS3 {
30 namespace Plugins {
31 namespace AGSSnowRain {
32 
33 /**
34  * This is not the original AGS SnowRain plugin, but a workalike
35  * plugin created for the AGS engine PSP port.
36  */
37 class AGSSnowRain : public PluginBase {
38 	SCRIPT_HASH(AGSSnowRain)
39 private:
40 	int32 _screenWidth = 320;
41 	int32 _screenHeight = 200;
42 	int32 _screenColorDepth = 32;
43 	Weather _rain;
44 	Weather _snow;
45 
46 private:
47 	void srSetWindSpeed(ScriptMethodParams &params);
48 	void srSetBaseline(ScriptMethodParams &params);
49 	void srSetSnowDriftRange(ScriptMethodParams &params);
50 	void srSetSnowDriftSpeed(ScriptMethodParams &params);
51 	void srChangeSnowAmount(ScriptMethodParams &params);
52 	void srSetSnowView(ScriptMethodParams &params);
53 	void srSetSnowDefaultView(ScriptMethodParams &params);
54 	void srSetSnowTransparency(ScriptMethodParams &params);
55 	void srSetSnowWindSpeed(ScriptMethodParams &params);
56 	void srSetSnowBaseline(ScriptMethodParams &params);
57 	void srSetSnowAmount(ScriptMethodParams &params);
58 	void srSetSnowFallSpeed(ScriptMethodParams &params);
59 	void srSetRainDriftRange(ScriptMethodParams &params);
60 	void srSetRainDriftSpeed(ScriptMethodParams &params);
61 	void srChangeRainAmount(ScriptMethodParams &params);
62 	void srSetRainView(ScriptMethodParams &params);
63 	void srSetRainDefaultView(ScriptMethodParams &params);
64 	void srSetRainTransparency(ScriptMethodParams &params);
65 	void srSetRainWindSpeed(ScriptMethodParams &params);
66 	void srSetRainBaseline(ScriptMethodParams &params);
67 	void srSetRainAmount(ScriptMethodParams &params);
68 	void srSetRainFallSpeed(ScriptMethodParams &params);
69 public:
70 	AGSSnowRain();
~AGSSnowRain()71 	virtual ~AGSSnowRain() {}
72 
73 	const char *AGS_GetPluginName() override;
74 	void AGS_EngineStartup(IAGSEngine *lpEngine) override;
75 	int64 AGS_EngineOnEvent(int event, NumberPtr data) override;
76 };
77 
78 } // namespace AGSSnowRain
79 } // namespace Plugins
80 } // namespace AGS3
81 
82 #endif
83