/** * * rct2: 0x006EA627 */ void game_handle_input() { for (rct_window *w = g_window_list; w < gWindowNextSlot; w++) { window_event_unknown_07_call(w); } sub_6EA73F(); sint32 x, y, state; while ((state = game_get_next_input(&x, &y)) != MOUSE_STATE_RELEASED) { game_handle_input_mouse(x, y, state & 0xFF); } if (_inputFlags & INPUT_FLAG_5) { game_handle_input_mouse(x, y, state); } else if (x != 0x80000000) { x = clamp(0, x, gScreenWidth - 1); y = clamp(0, y, gScreenHeight - 1); game_handle_input_mouse(x, y, state); process_mouse_over(x, y); process_mouse_tool(x, y); } for (rct_window *w = g_window_list; w < gWindowNextSlot; w++) { window_event_unknown_08_call(w); } }
/** * * rct2: 0x006EA627 */ void game_handle_input() { rct_window *w; int x, y, state; if (RCT2_GLOBAL(0x009DEA64, uint16) & 2) { RCT2_GLOBAL(0x009DEA64, uint16) &= ~2; game_do_command(0, 1, 0, 0, GAME_COMMAND_LOAD_OR_QUIT, 2, 0); } if (RCT2_GLOBAL(0x009ABDF2, uint8) != 0) { for (w = g_window_list; w < RCT2_GLOBAL(RCT2_ADDRESS_NEW_WINDOW_PTR, rct_window*); w++) window_event_unknown_07_call(w); sub_6EA73F(); for (;;) { game_get_next_input(&x, &y, &state); if (state == 0) { break; } game_handle_input_mouse(x, y, state & 0xFF); } if (gInputFlags & INPUT_FLAG_5) { game_handle_input_mouse(x, y, state); } else if (x != 0x80000000) { x = clamp(0, x, RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_WIDTH, uint16) - 1); y = clamp(0, y, RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_HEIGHT, uint16) - 1); game_handle_input_mouse(x, y, state); process_mouse_over(x, y); process_mouse_tool(x, y); } } for (w = g_window_list; w < RCT2_GLOBAL(RCT2_ADDRESS_NEW_WINDOW_PTR, rct_window*); w++) window_event_unknown_08_call(w); }