Ejemplo n.º 1
0
void game_free(void)
{
    if (game_state)
    {
        sol_free(&file);
        sol_free(&back);
        back_free();
    }
    game_state = 0;
}
Ejemplo n.º 2
0
Archivo: sol.c Proyecto: Mole23/freewpc
/**
 * Make a solenoid request, and wait for it to finish before returning.
 *
 * This is one of the 2 topmost APIs that starts a solenoid pulse
 * (see also sol_request_async).
 *
 * By default, sol_request behaves identically to sol_request_async, with
 * the addition of the alloc and free calls around it.  However, machines
 * can override this behavior by catching the 'sol_request' event, and
 * doing something different.  The handler should inspect the value of
 * sol_pulsing to see which solenoid is being pulsed, it should call
 * sol_free() just before returning, and finally it should return FALSE.
 */
void sol_request (U8 sol)
{
	sol_alloc (sol);
	if (callset_invoke_boolean (sol_request))
	{
		sol_req_start (sol);
		sol_free (sol);
	}
}