Exemplo n.º 1
0
void templateAppExit( void ) {

	if( font ) {
	
		FONT_free( font );
		font = NULL;
	}
   
	if( path_point )
	{
		SHADER_free( path_point->vertex_shader );

		SHADER_free( path_point->fragment_shader );
		
		PROGRAM_free( path_point );

		path_point = NULL;
	}

	NAVIGATION_free( navigation );

	free_physic_world();

	SHADER_free( program->vertex_shader );

	SHADER_free( program->fragment_shader );

	PROGRAM_free( program );

	OBJ_free( obj );
}
void templateAppExit(void)
{
    if (dynamicsworld)
	free_physic_world();
    if (obj)
	OBJ_free(obj);
}
Exemplo n.º 3
0
void templateAppExit(void) {
    free_physic_world();
    
    delete program;
    program = NULL;
    
    delete obj;
}
Exemplo n.º 4
0
void templateAppExit( void ) {

	free_physic_world();

	SHADER_free( program->vertex_shader );

	SHADER_free( program->fragment_shader );

	PROGRAM_free( program );

	OBJ_free( obj );
}
Exemplo n.º 5
0
void templateAppExit( void ) {

	NAVIGATION_free( navigation );

	free_physic_world();

	SHADER_free( program->vertex_shader );

	SHADER_free( program->fragment_shader );

	PROGRAM_free( program );

	OBJ_free( obj );
}
Exemplo n.º 6
0
void free_level( void )
{
	gem_points =
	game_state = 0;
	game_time  = 0.0f;


	unsigned int i = 0;
	/* Pause the thread, because we donÕt want the process to
	 * continue to decompress while we are trying to free the background music.
	 * That would make the app to crash for sure.
	 */
	THREAD_pause( thread );   
	/* Free the background sound source. */
	background_sound = SOUND_free( background_sound );
	/* Because the background music was streamed, free the sound buffer from
	the local memory structure. */
	background_soundbuffer->memory = mclose( background_soundbuffer->memory );
	/* It is now okay to free the sound buffer. */
	background_soundbuffer = SOUNDBUFFER_free( background_soundbuffer );

	while( i != 4 ) {
		/* Free the sound source and the associated buffer. */
		gems_sound[ i ] = SOUND_free( gems_sound[ i ] );
		gems_soundbuffer[ i ] = SOUNDBUFFER_free( gems_soundbuffer[ i ] );
	
		++i;
	}
	/* Now deal with the water, lava, and toxic stuff sound sources and buffers. */
	water_sound = SOUND_free( water_sound );
	water_soundbuffer = SOUNDBUFFER_free( water_soundbuffer );

	lava_sound = SOUND_free( lava_sound );
	lava_soundbuffer = SOUNDBUFFER_free( lava_soundbuffer );

	toxic_sound = SOUND_free( toxic_sound );
	toxic_soundbuffer = SOUNDBUFFER_free( toxic_soundbuffer );
   
	player = NULL;

	THREAD_pause( thread );	

	font_small = FONT_free( font_small );
	
	font_big = FONT_free( font_big );
	
	free_physic_world();

	obj = OBJ_free( obj );
}
Exemplo n.º 7
0
void templateAppExit( void ) {

	if( dynamicsworld ) free_physic_world();

	if( program )
	{
		SHADER_free( program->vertex_shader );

		SHADER_free( program->fragment_shader );

		PROGRAM_free( program );
	}
	
	if( obj ) OBJ_free( obj );
}
Exemplo n.º 8
0
void free_level( void )
{
	gem_points =
	game_state = 0;
	game_time  = 0.0f;


	unsigned int i = 0;

	THREAD_pause( thread );   

	background_sound = SOUND_free( background_sound );

	background_soundbuffer->memory = mclose( background_soundbuffer->memory );

	background_soundbuffer = SOUNDBUFFER_free( background_soundbuffer );

	while( i != 4 ) {
	 
		gems_sound[ i ] = SOUND_free( gems_sound[ i ] );
		gems_soundbuffer[ i ] = SOUNDBUFFER_free( gems_soundbuffer[ i ] );
	
		++i;
	}

	water_sound = SOUND_free( water_sound );
	water_soundbuffer = SOUNDBUFFER_free( water_soundbuffer );

	lava_sound = SOUND_free( lava_sound );
	lava_soundbuffer = SOUNDBUFFER_free( lava_soundbuffer );

	toxic_sound = SOUND_free( toxic_sound );
	toxic_soundbuffer = SOUNDBUFFER_free( toxic_soundbuffer );
   
	player = NULL;

	THREAD_pause( thread );	

	font_small = FONT_free( font_small );
	
	font_big = FONT_free( font_big );
	
	free_physic_world();

	obj = OBJ_free( obj );
}
void templateAppExit(void)
{
    NAVIGATION_free(navigation);
    free_physic_world();
    OBJ_free(obj);
}
void templateAppExit(void)
{
    free_physic_world();
    OBJ_free(obj);
}