Exemple #1
0
static int demo_play_enter(struct state *st, struct state *prev)
{
    video_hide_cursor();

    if (demo_paused)
    {
        demo_paused = 0;
        prelude = 0;
        audio_music_fade_in(0.5f);
        return 0;
    }

    /*
     * Post-1.5.1 replays include view data in the first update, this
     * line is currently left in for compatibility with older replays.
     */
    game_client_fly(0.0f);

    if (check_compat && !game_compat_map)
    {
        goto_state(&st_demo_compat);
        return 0;
    }

    prelude = 1.0f;

    speed = SPEED_NORMAL;
    demo_replay_speed(speed);

    show_hud = 1;
    hud_update(0);
    hud_demo();

    return demo_play_gui();
}
Exemple #2
0
static int demo_play_enter(void)
{
    int id;

    if (demo_paused)
    {
        demo_paused = 0;
        audio_music_fade_in(0.5f);
        return 0;
    }

    /*
     * Post-1.5.1 replays include view data in the first update, these
     * two lines are currently left in for compatibility with older
     * replays.
     */

    game_set_fly(0.f, game_client_file());
    game_client_step(NULL);

    if (check_compat && !game_compat_map)
    {
        goto_state(&st_demo_compat);
        return 0;
    }

    if ((id = gui_vstack(0)))
    {
        gui_label(id, _("Replay"), GUI_LRG, GUI_ALL, gui_blu, gui_grn);
        gui_layout(id, 0, 0);
        gui_pulse(id, 1.2f);
    }

    show_hud = 1;
    hud_update(0);

    return id;
}
Exemple #3
0
static void pause_leave(int id)
{
    gui_delete(id);
    hud_free();
    audio_music_fade_in(0.5f);
}
Exemple #4
0
static void pause_leave(struct state *st, struct state *next, int id)
{
    gui_delete(id);
    hud_free();
    audio_music_fade_in(0.5f);
}