예제 #1
0
파일: title.c 프로젝트: rzel/dim3
void title_open(void)
{
	int			buffer_idx;
	
		// titles
		
	gui_initialize(title_dir,title_name);
	
		// sound

	if (title_sound_name[0]!=0x0) {
		buffer_idx=al_find_buffer(title_sound_name);
		al_play_source(buffer_idx,NULL,1.0f,FALSE,FALSE,TRUE,FALSE);
	}

		// fades
		
	title_fade_tick=-1;
	title_fade_mode=title_fade_mode_in;
	
		// force server state, there are a couple
		// places where this isn't being switch in,
		// like an app intro
		
	server.state=gs_title;
}
예제 #2
0
파일: ambients.c 프로젝트: prophile/dim3
void map_set_ambient(char *name,float pitch)
{
	strcpy(map_ambient_name,name);
	map_ambient_pitch=pitch;
	
	map_ambient_buffer_idx=al_find_buffer(name);
	if (map_ambient_buffer_idx==-1) {
		map_ambient_idx=-1;
		map_ambient_name[0]=0x0;
		return;
	}

	map_ambient_idx=al_play_source(map_ambient_buffer_idx,NULL,pitch,TRUE,FALSE,TRUE,FALSE);
}
예제 #3
0
파일: model_effect.c 프로젝트: rzel/dim3
void model_animation_effect_setup(model_type *mdl)
{
	int						n,k,t,nanimate,npose_move;
	model_animate_type		*animate;
	model_pose_move_type	*pose_move;

		// get sound, particle, and ring indexes
		// so they don't have to be looked up every time
		// they are launched

	nanimate=mdl->nanimate;
	animate=mdl->animates;

	for (n=0;n!=nanimate;n++) {

		npose_move=animate->npose_move;
		pose_move=animate->pose_moves;

		for (k=0;k!=npose_move;k++) {

			pose_move->sound.buffer_idx=-1;
			if (pose_move->sound.name[0]!=0x0) pose_move->sound.buffer_idx=al_find_buffer(pose_move->sound.name);

			for (t=0;t!=pose_move->particle.count;t++) {
				pose_move->particle.particles[t].particle_idx=-1;
				if (pose_move->particle.particles[t].name[0]!=0x0) pose_move->particle.particles[t].particle_idx=particle_find_index(pose_move->particle.particles[t].name);
			}
			
			for (t=0;t!=pose_move->ring.count;t++) {
				pose_move->ring.rings[t].ring_idx=-1;
				if (pose_move->ring.rings[t].name[0]!=0x0) pose_move->ring.rings[t].ring_idx=ring_find_index(pose_move->ring.rings[t].name);
			}

			pose_move++;
		}

		animate++;
	}
}