22 #ifndef AGS_PLUGINS_AGS_WAVES_AGS_WAVES_H 23 #define AGS_PLUGINS_AGS_WAVES_AGS_WAVES_H 25 #include "audio/mixer.h" 26 #include "common/fs.h" 27 #include "ags/plugins/ags_plugin.h" 28 #include "ags/plugins/ags_waves/vars.h" 91 void StartingValues();
94 void CastWave(
int delayMax,
int PixelsWide,
int n);
95 void DrawEffect(
int sprite_a,
int sprite_b,
int id,
int n);
96 int Random(
int threshold);
98 inline static int getRcolor(
int color) {
99 return ((color >> 16) & 0xFF);
101 inline static int getGcolor(
int color) {
102 return ((color >> 8) & 0xFF);
104 inline static int getBcolor(
int color) {
105 return ((color >> 0) & 0xFF);
107 inline static int getAcolor(
int color) {
108 return ((color >> 24) & 0xFF);
110 static int BlendColor(
int Ln,
int Bn,
int perc) {
111 return ((Ln < 128) ? (2 * Bn * Ln / perc) : (perc - 2 * (perc - Bn) * (perc - Ln) / perc));
113 static int BlendColorScreen(
int Ln,
int Bn,
int perc) {
114 return (Bn == perc) ? Bn :
115 MIN(perc, (Ln * Ln / (perc - Bn)));
117 static int SetColorRGBA(
int r,
int g,
int b,
int a);
118 static int ConvertColorToGrayScale(
int color);
119 static bool IsPixelTransparent(
int color);
120 float noiseField(
float tx,
float ty,
float tz);
122 int IntersectLines(
float x1,
float y1,
float x2,
float y2,
float x3,
float y3,
float x4,
float y4);
124 static inline float fracts(
float value) {
125 return value - floor(value);
127 static inline float lerp(
float x,
float y,
float fn) {
128 return x * (1.0 - fn) + y * fn;
130 static inline float hasher(
float n) {
131 return fracts(sin(n) * 153.5453123);
133 static float min4(
float m1,
float m2,
float m3,
float m4) {
136 static float max4(
float m1,
float m2,
float m3,
float m4) {
141 void DrawLineCustom(
int x1,
int y1,
int x2,
int y2,
int graphic,
int setR,
int setG,
int setB,
int setA,
int TranDif);
142 void CreateParticle(
int xx,
int yy,
int ForceX,
int ForceY);
143 void CreateParticle2(
int xx,
int yy,
int ForceX,
int ForceY);
144 void CreateParticleF(
int xx,
int yy,
int ForceX,
int ForceY);
145 void CreateDustParticle(
int xx,
int yy);
146 void CreateRainParticleMid(
int x,
int y,
int fx,
int fy,
int maxpart);
147 void CreateRainParticleFore(
int x,
int y,
int fx,
int fy,
int maxpart);
148 void CreateRainParticleBack(
int x,
int y,
int fx,
int fy,
int maxpart);
156 void PlaySFX(
int SoundToPlay,
int repeat);
161 void StopSFX(
int sfxNum);
170 void stopAllSounds();
172 void ApplyFilter(
int SetFrequency);
173 void SetFilterFrequency(
int setFrequency);
174 void MusicPlay(
int MusicToPlay,
int repeat,
int fadeinMS,
int fadeoutMS,
int pos,
bool forceplay,
bool fixclick);
180 const char *AGS_GetPluginName()
override;
181 void AGS_EngineStartup(
IAGSEngine *engine)
override;
182 int64 AGS_EngineOnEvent(
int event,
NumberPtr data)
override;
Definition: ags_waves.h:34
Definition: plugin_base.h:171
SoundType
Definition: mixer.h:62
Definition: plugin_base.h:131
Definition: audiostream.h:50
Definition: ags_plugin.h:328
T MIN(T a, T b)
Definition: util.h:59
T MAX(T a, T b)
Definition: util.h:62