Ejemplo n.º 1
0
effect *matrixRegister(void)
{
	effect *entry;
	
	sharedbuffer_reset();
	mapW = video_width / FONT_W;
	mapH = video_height / FONT_H;
	cmap = (unsigned char *)sharedbuffer_alloc(mapW * mapH);
	vmap = (unsigned char *)sharedbuffer_alloc(mapW * mapH);
	img = (unsigned char *)sharedbuffer_alloc(mapW * mapH);
	if(cmap == NULL || vmap == NULL || img == NULL) {
		return NULL;
	}

	blips = (Blip *)sharedbuffer_alloc(mapW * sizeof(Blip));
	if(blips == NULL) {
		return NULL;
	}

	setPattern();
	setPalette();

	entry = (effect *)malloc(sizeof(effect));
	if(entry == NULL) {
		return NULL;
	}
	
	entry->name = effectname;
	entry->start = start;
	entry->stop = stop;
	entry->draw = draw;
	entry->event = event;

	return entry;
}
Ejemplo n.º 2
0
Archivo: 1d.c Proyecto: Elive/effectv
effect *onedRegister(void)
{
	effect *entry;

	sharedbuffer_reset();
	linebuf = (RGB32 *)sharedbuffer_alloc(video_width * PIXEL_SIZE);
	if(linebuf == NULL)
		return NULL;

	entry = (effect *)malloc(sizeof(effect));
	if(entry == NULL)
		return NULL;
	
	entry->name = effectname;
	entry->start = start;
	entry->stop = stop;
	entry->draw = draw;
	entry->event = NULL;

	return entry;
}
Ejemplo n.º 3
0
effect *lifeRegister()
{
	effect *entry;
	
	sharedbuffer_reset();
	field = (unsigned char *)sharedbuffer_alloc(video_area*2);
	if(field == NULL) {
		return NULL;
	}

	entry = (effect *)malloc(sizeof(effect));
	if(entry == NULL) {
		return NULL;
	}
	
	entry->name = effectname;
	entry->start = start;
	entry->stop = stop;
	entry->draw = draw;
	entry->event = event;

	return entry;
}