Example #1
0
static void tentacle_fx_init(VisualFX *_this, PluginInfo *info) {
	
	TentacleFXData *data = (TentacleFXData*)malloc(sizeof(TentacleFXData));
	
	data->enabled_bp = secure_b_param("Enabled", 1);
	data->params = plugin_parameters ("3D Tentacles", 1);
	data->params.params[0] = &data->enabled_bp;

	data->cycle = 0.0f;
	data->col = (0x28<<(ROUGE*8))|(0x2c<<(VERT*8))|(0x5f<<(BLEU*8));
	data->dstcol = 0;
	data->lig = 1.15f;
	data->ligs = 0.1f;
	
	data->distt = 10.0f;
	data->distt2 = 0.0f;
	data->rot = 0.0f; /* entre 0 et 2 * M_PI */
	data->happens = 0;
	
	data->rotation = 0;
	data->lock = 0;
	data->colors[0] = (0x18<<(ROUGE*8))|(0x4c<<(VERT*8))|(0x2f<<(BLEU*8));
	data->colors[1] = (0x48<<(ROUGE*8))|(0x2c<<(VERT*8))|(0x6f<<(BLEU*8));
	data->colors[2] = (0x58<<(ROUGE*8))|(0x3c<<(VERT*8))|(0x0f<<(BLEU*8));
	data->colors[3] = (0x87<<(ROUGE*8))|(0x55<<(VERT*8))|(0x74<<(BLEU*8));
	tentacle_new(data);

	_this->params = &data->params;
	_this->fx_data = (void*)data;
}
Example #2
0
void
goom_init (guint32 resx, guint32 resy, int cinemascope)
{
#ifdef VERBOSE
	printf ("GOOM: init (%d, %d);\n", resx, resy);
#endif
	if (cinemascope)
		c_black_height = resy / 5;
	else
		c_black_height = 0;

	resolx = resx;
	resoly = resy;
	buffsize = resx * resy;

	c_offset = c_black_height * resx;
	c_resoly = resy - c_black_height * 2;

	pixel = (guint32 *) malloc (buffsize * sizeof (guint32) + 128);
	back = (guint32 *) malloc (buffsize * sizeof (guint32) + 128);
	//RAND_INIT ();
        srand ((guint32) pixel);
        if (!rand_tab) rand_tab = (int *) malloc (NB_RAND * sizeof(int)) ;
        rand_pos = 1 ;
        while (rand_pos != 0) rand_tab [rand_pos++] = rand () ;
                
	cycle = 0;

	p1 = (guint32 *) ((1 + ((unsigned int) (pixel)) / 128) * 128);
	p2 = (guint32 *) ((1 + ((unsigned int) (back)) / 128) * 128);

	init_ifs (resx, c_resoly);
	gmline1 = goom_lines_init (resx, c_resoly,
														 GML_HLINE, c_resoly, GML_BLACK,
														 GML_CIRCLE, 0.4f * (float) c_resoly, GML_VERT);
	gmline2 = goom_lines_init (resx, c_resoly,
														 GML_HLINE, 0, GML_BLACK,
														 GML_CIRCLE, 0.2f * (float) c_resoly, GML_RED);

//	font_height = NULL;
//	font_width = NULL;
//	font_chars = NULL;
	gfont_load ();

	tentacle_new ();
}