Example #1
0
static int null_enter(struct state *st, struct state *prev)
{
    gui_free();
    geom_free();
    ball_free();
    shad_free();

    return 0;
}
Example #2
0
/* free all allocated resources */
void cleanup()
{
	/* free  sticks */
	stick_free(g_player);
	g_player = NULL;
	stick_free(g_opponent);
	g_opponent = NULL;
	ball_free(g_ball);
	g_ball = NULL;
	/* destroy window */
	window_free(g_window);
	g_window = NULL;
	/* quit SDL subsystems */
	SDLNet_Quit();
	SDL_Quit();
}