コード例 #1
0
ファイル: st_all.c プロジェクト: salvy/Neverball-svn
static int fall_click(int b, int d)
{
    if (b == SDL_BUTTON_LEFT && d == 1)
    {
        if (hole_next())
            goto_state(&st_next);
        else
            goto_state(&st_score);
    }
    return 1;
}
コード例 #2
0
ファイル: st_all.c プロジェクト: MasaMune692/alcexamples
static void stop_timer(int id, float dt)
{
    float g[3] = { 0.f, 0.f, 0.f };

    game_update_view(dt);
    game_step(g, dt);

    if (time_state() > 1)
    {
        if (hole_next())
            goto_state(&st_next);
        else
            goto_state(&st_score);
    }
}
コード例 #3
0
ファイル: st_all.c プロジェクト: MasaMune692/alcexamples
static int fall_buttn(int b, int d)
{
    if (d)
    {
        if (config_tst_d(CONFIG_JOYSTICK_BUTTON_A, b))
        {
            if (hole_next())
                goto_state(&st_next);
            else
                goto_state(&st_score);
        }
        if (config_tst_d(CONFIG_JOYSTICK_BUTTON_EXIT, b))
            return goto_pause(&st_over, 1);
    }
    return 1;
}
コード例 #4
0
ファイル: st_all.c プロジェクト: Aeggy/neverball
static int stop_buttn(int b, int d)
{
    if (d)
    {
        if (config_tst_d(CONFIG_JOYSTICK_BUTTON_A, b))
        {
            if (hole_next())
                goto_state(&st_next);
            else
                goto_state(&st_score);
        }
        if (config_tst_d(CONFIG_JOYSTICK_BUTTON_B, b) ||
            config_tst_d(CONFIG_JOYSTICK_BUTTON_START, b))
            return goto_pause(&st_over);
    }
    return 1;
}
コード例 #5
0
ファイル: st_all.c プロジェクト: senquack/neverball
static int goal_buttn(int b, int d)
{
    if (d)
    {
        //senquack - on GCW Zero, A,B,X,Y will all proceed, instead of this silly pausing-with-B thing:
#ifdef GCWZERO
        if (config_tst_d(CONFIG_JOYSTICK_BUTTON_A, b) || config_tst_d(CONFIG_JOYSTICK_BUTTON_B, b) ||
            config_tst_d(CONFIG_JOYSTICK_BUTTON_X, b) || config_tst_d(CONFIG_JOYSTICK_BUTTON_Y, b)) 
#else
        if (config_tst_d(CONFIG_JOYSTICK_BUTTON_A, b))
#endif //GCWZERO
        {
            if (hole_next())
                goto_state(&st_next);
            else
                goto_state(&st_score);
        }
#ifndef GCWZERO
        if (config_tst_d(CONFIG_JOYSTICK_BUTTON_B, b))
            return goto_pause(&st_over);
#endif //GCWZERO
    }
    return 1;
}