Example #1
0
void mondo_boom(location l,short type)
{
	short i;
	
	start_missile_anim();
	for (i = 0; i < 12; i++)
		add_explosion(l,-1,1,type,0,0);
	do_explosion_anim(5,0);

	end_missile_anim();	
}
Example #2
0
void run_a_boom(location boom_where,short type,short x_adj,short y_adj)////
{

//	if ((cartoon_happening == true) && (anim_step < 140))
//		return;
	if ((type < 0) || (type > 2))
		return;
	start_missile_anim();
	add_explosion(boom_where,-1,0,type, x_adj, y_adj);
	do_explosion_anim(5,0);
	end_missile_anim();
}
Example #3
0
static foe *
spawn_foe(int type, vector2 *pos)
{
	foe *f = add_foe();

	if (f != NULL) {
		foe_common_spawn(&f->common, pos, type);
		add_explosion(pos, 3.f*foe_data[type].radius, EFF_FLARE, 20);
		perturb_water(pos, 300.f);
	}

	return f;
}
Example #4
0
/* Turret explodes when it is destroyed */
static void turret_explode(struct SpecialObj *turret) {
    spawn_clusters(turret->x,turret->y, 5.6, 8, make_bullet);
    spawn_clusters(turret->x,turret->y, 5.6, 16, make_firestarter);
    add_explosion (turret->x,turret->y);
}
Example #5
0
static void
foe_common_gen_explosion(struct foe_common *f, float scale)
{
	int i;
	particle *p;
	int ndebris, nballs;

	ndebris = scale*(40 + irand(30));

	/* debris */

	for (i = 0; i < ndebris; i++) {
		p = add_particle();

		if (!p)
			break;

		p->ttl = 20 + irand(15);
		p->t = 0;
		p->width = scale*.4f*(.6f + .15f*frand());
		p->height = scale*.3f*(2.8f + .4f*frand());
		p->pos = f->pos;
		p->palette = PAL_YELLOW;
		p->friction = .9;

		vec2_set(&p->dir, frand() - .5f, frand() - .5f);
		vec2_normalize(&p->dir);

		p->speed = scale*(PARTICLE_SPEED + .05f*frand());
	}

#define RADIUS .4f

	/* fireballs */

	nballs = scale*(8 + irand(8));

	for (i = 0; i < nballs; i++) {
		vector2 pos;
		float r, l;
		l = 1.2*scale;
		pos.x = f->pos.x + l*frand() - .5f*l;
		pos.y = f->pos.y + l*frand() - .5f*l;
		r = scale*(.2f + .15f*frand());
		add_explosion(&pos, r, EFF_EXPLOSION, 13 + irand(4));
	}

	/* shockwave */
	add_explosion(&f->pos, scale*.3f, EFF_RING, 18);

/*
	p = add_particle();

	if (p) {
		p->t = 0;
		p->ttl = 20;
		p->width = p->height = scale*.3f;
		p->pos = f->pos;
		p->palette = PAL_RED;
		p->type = PT_SHOCKWAVE;
	}
*/

	perturb_water(&f->pos, scale*1200.f);

	play_fx(FX_EXPLOSION_1);
}