29 int32_t selected_state_index = state_index;
32 selected_state_index = 0;
34 struct Input_State const *selected_input = &state_table[selected_state_index];
35 int32_t selected_buttons = selected_input->
button_bits;
41 char button_bit_index = (uint8_t)control_code;
43 if (!mode_or_threshold)
54 int16_t negative_axis_strength;
55 int16_t positive_axis_strength;
56 int32_t axis_threshold_q12;
57 int32_t axis_strength_q12;
59 switch (axis_dispatch_case)
66 int16_t combined_axis_strength;
70 combined_axis_strength = selected_input->
axis.
x;
72 int16_t aux_x_positive = selected_input->
axis_aux.
x;
74 if (combined_axis_strength < aux_x_positive)
75 combined_axis_strength = aux_x_positive;
79 combined_axis_strength = selected_input->
axis.
y;
83 int16_t aux_y_negative = selected_input->
axis_aux.
y;
85 combined_axis_strength = -(combined_axis_strength);
87 if ((int32_t)combined_axis_strength < -((int32_t)aux_y_negative))
88 combined_axis_strength = -(aux_y_negative);
92 int16_t aux_y_positive = selected_input->
axis_aux.
y;
94 if (combined_axis_strength < aux_y_positive)
95 combined_axis_strength = aux_y_positive;
100 combined_axis_strength = selected_input->
axis.
x;
102 int16_t aux_x_negative = selected_input->
axis_aux.
x;
104 combined_axis_strength = -(combined_axis_strength);
106 if ((int32_t)combined_axis_strength < -((int32_t)aux_x_negative))
107 combined_axis_strength = -(aux_x_negative);
110 if (combined_axis_strength <= 0)
115 if (mode_or_threshold)
123 int16_t x = selected_input->
axis.
x;
127 int32_t positive_x_axis_strength = (int32_t)x;
142 negative_axis_strength = selected_input->
axis.
x;
144 negative_axis_strength = selected_input->
axis.
y;
146 negative_axis_strength = selected_input->
axis_aux.
x;
148 negative_axis_strength = selected_input->
axis_aux.
y;
150 negative_axis_strength = -(negative_axis_strength);
152 if (negative_axis_strength >= 0)
154 axis_strength_q12 = (int32_t)negative_axis_strength;
157 if (axis_strength_q12 >= axis_threshold_q12)
169 positive_axis_strength = selected_input->
axis.
y;
171 positive_axis_strength = selected_input->
axis_aux.
x;
173 positive_axis_strength = selected_input->
axis_aux.
y;
175 if (positive_axis_strength >= 0)
177 axis_strength_q12 = (int32_t)positive_axis_strength;
180 if (axis_strength_q12 >= axis_threshold_q12)
211 if (GetAsyncKeyState(VK_F10) < 0)
255 int16_t x = state->
axis.
x;
256 int16_t y = state->
axis.
y;
312 return GetAsyncKeyState(v_key) < 0;
319 int32_t control_code;
323 if (GetAsyncKeyState(control_code) < 0)
384 BOOL more_messages_pending;
388 if (!GetMessageA(&msg, NULL, 0, 0))
410 TranslateMessage(&msg);
411 DispatchMessageA(&msg);
414 more_messages_pending = PeekMessageA(&msg, NULL, 0, 0,
PM_NOREMOVE);
415 }
while (more_messages_pending);
438 out_move_vector->
y = 0;
528 out_move_vector->
z = 0;
529 out_move_vector->
x = 0;
569 if (button_mask & toggle_mask)
571 uint32_t sampled_buttons =
574 if (!(button_mask & sampled_buttons))
578 ~button_mask & sampled_buttons;
583 else if (!player_index)
601 replay_record = &replay_record[1];
623 replayed_auxiliary_axes.
aux_x = replay_record->
aux_x;
624 replayed_auxiliary_axes.
aux_y = replay_record->
aux_y;
642 int32_t mapping_index = 0;
647 char const *next_key_name;
661 }
while (next_key_name);
#define GAME_TRANSITION_RESET_CLEAR
#define GAME_TRANSITION_LOAD_LEVEL
#define GAME_TRANSITION_REPLAY_PLAYBACK
void Replay_StopPlayback(void)
#define Game_FrameTransitionFlags
#define g_demoReplayInputPtr
#define GRAPHICS_CAP_DISPLAY_RESET_RESERVED_11
#define GRAPHICS_CAP_FRAME_TRANSITION
#define GRAPHICS_CAP_DISPLAY_RESET_RESERVED_5
#define GRAPHICS_CAP_DISPLAY_RESET_RESERVED_8
void Graphics_TakeScreenshot(void)
#define Graphics_RenderFrame_LastFrameTick
#define g_graphicsCapabilities
int32_t Math_SinQ14(int32_t angle)
void CRT_exit(int32_t status)
int64_t __ftol_msvc(long double value)
#define g_acceleratorTable
#define g_keyboardMappingButtons
#define g_gamepadAxisRzNegativeMask
#define g_gamepadAxisXNegativeMask
#define g_gamepadAxisRzPositiveMask
#define g_gamepadAxisXPositiveMask
#define g_gamepadAxisYNegativeMask
#define g_gamepadAxisYPositiveMask
#define g_keyboardMappingKeys