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(); }
static int flyby_enter(struct state *st, struct state *prev) { video_hide_cursor(); if (paused) paused = 0; else hud_init(); return 0; }
static int roll_enter(struct state *st, struct state *prev) { video_hide_cursor(); hud_init(); if (paused) paused = 0; else game_putt(); return 0; }
void setup_start() { video_hide_cursor(); currparam = -1; /* copy the current settings into the temps */ memcpy(profile1temp, profile1, TC_NUM_PARAMS); memcpy(profile2temp, profile2, TC_NUM_PARAMS); config = (profilenumber) ? profile2temp : profile1temp; currprof = profilenumber; setup_redraw(); }
void video_set_grab(int w) { #ifdef NDEBUG if (w) { SDL_EventState(SDL_MOUSEMOTION, SDL_IGNORE); SDL_WarpMouse(config_get_d(CONFIG_WIDTH) / 2, config_get_d(CONFIG_HEIGHT) / 2); SDL_EventState(SDL_MOUSEMOTION, SDL_ENABLE); } SDL_WM_GrabInput(SDL_GRAB_ON); video_hide_cursor(); #endif grabbed = 1; }
void video_set_grab(int w) { #ifdef NDEBUG if (w) { SDL_EventState(SDL_MOUSEMOTION, SDL_IGNORE); SDL_WarpMouseInWindow(window, video.window_w / 2, video.window_h / 2); SDL_EventState(SDL_MOUSEMOTION, SDL_ENABLE); } SDL_SetRelativeMouseMode(SDL_TRUE); SDL_SetWindowGrab(window, SDL_TRUE); video_hide_cursor(); #endif grabbed = 1; }
void video_set_grab(int w) { #ifdef NDEBUG if (w) { SDL_EventState(SDL_MOUSEMOTION, SDL_IGNORE); SDL_WarpMouseInWindow(window, config_get_d(CONFIG_WIDTH) / 2, config_get_d(CONFIG_HEIGHT) / 2); SDL_EventState(SDL_MOUSEMOTION, SDL_ENABLE); } SDL_SetRelativeMouseMode(SDL_TRUE); SDL_SetWindowGrab(window, SDL_TRUE); video_hide_cursor(); #endif grabbed = 1; }