4 #include "goom_typedefs.h"
6 #include "goom_config.h"
8 #include "goom_graphic.h"
9 #include "goom_config_param.h"
10 #include "goom_visual_fx.h"
11 #include "goom_filters.h"
12 #include "goom_tools.h"
26 #define STATES_MAX_NB 128
29 * Gives informations about the sound.
33 /* nota : a Goom is just a sound event... */
35 int timeSinceLastGoom; /* >= 0 */
36 float goomPower; /* power of the last Goom [0..1] */
38 int timeSinceLastBigGoom; /* >= 0 */
40 float volume; /* [0..1] */
41 short samples[2][512];
43 /* other "internal" datas for the sound_tester */
44 float goom_limit; /* auto-updated limit of goom_detection */
46 float accelvar; /* acceleration of the sound - [0..1] */
47 float speedvar; /* speed of the sound - [0..100] */
49 int totalgoom; /* number of goom since last reset
50 * (a reset every 64 cycles) */
52 float prov_max; /* accel max since last reset */
60 PluginParam goom_limit_p;
61 PluginParam goom_power_p;
62 PluginParam last_goom_p;
63 PluginParam last_biggoom_p;
64 PluginParam biggoom_speed_limit_p;
65 PluginParam biggoom_factor_p;
67 PluginParameters params; /* contains the previously defined parameters. */
72 * Allows FXs to know the current state of the plugin.
79 PluginParameters *params;
86 int size; /* == screen.height * screen.width. */
92 VisualFX **visuals; /* pointers on all the visual fx */
97 VisualFX zoomFilter_fx;
98 VisualFX tentacles_fx;
110 GoomState states[STATES_MAX_NB];
114 GoomState *curGState;
116 /** effet de ligne.. */
121 int sintable[0x10000];
125 /** goom_update internals.
126 * I took all static variables from goom_update and put them here.. for the moment.
129 int lockvar; /* pour empecher de nouveaux changements */
130 int goomvar; /* boucle des gooms */
131 int loopvar; /* mouvement des points */
133 int ifs_incr; /* dessiner l'ifs (0 = non: > = increment) */
134 int decay_ifs; /* disparition de l'ifs */
135 int recay_ifs; /* dedisparition de l'ifs */
136 int cyclesSinceLastChange; /* nombre de Cycle Depuis Dernier Changement */
137 int drawLinesDuration; /* duree de la transition entre afficher les lignes ou pas */
138 int lineMode; /* l'effet lineaire a dessiner */
139 float switchMultAmount; /* SWITCHMULT (29.0f/30.0f) */
140 int switchIncrAmount; /* 0x7f */
141 float switchMult; /* 1.0f */
142 int switchIncr; /* = SWITCHINCR; */
143 int stateSelectionRnd;
144 int stateSelectionBlocker;
145 int previousZoomSpeed;
146 ZoomFilterData zoomFilterData;
150 void (*draw_line) (Pixel *data, int x1, int y1, int x2, int y2, int col, int screenx, int screeny);
151 void (*zoom_filter) (int sizeX, int sizeY, Pixel *src, Pixel *dest, int *brutS, int *brutD, int buffratio, int precalCoef[16][16]);
157 void plugin_info_init(PluginInfo *p, int nbVisual);
158 void plugin_info_free(PluginInfo *p);
160 /* i = [0..p->nbVisual-1] */
161 void plugin_info_add_visual(PluginInfo *p, int i, VisualFX *visual);