Rev 11 | Rev 20 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 11 | Rev 18 | ||
---|---|---|---|
Line 1... | Line 1... | ||
1 | #include "replay.h" |
1 | #include "replay.h" |
2 | #include |
2 | #include "brender.h" |
- | 3 | #include "brhton.h" |
|
3 | #include "car.h" |
4 | #include "car.h" |
4 | #include "controls.h" |
5 | #include "controls.h" |
5 | #include "displays.h" |
6 | #include "displays.h" |
6 | #include "globvars.h" |
7 | #include "globvars.h" |
7 | #include "globvrpb.h" |
8 | #include "globvrpb.h" |
Line 394... | Line 395... | ||
394 | KEY_PERIOD, |
395 | KEY_PERIOD, |
395 | KEY_KP_6, |
396 | KEY_KP_6, |
396 | KEY_KP_9, |
397 | KEY_KP_9, |
397 | KEY_KP_MULTIPLY, |
398 | KEY_KP_MULTIPLY, |
398 | }; |
399 | }; |
- | 400 | /* clang-format off */ |
|
399 | static tRectangle mouse_areas[2][8] = { |
401 | static tRectangle mouse_areas[2][8] = { |
400 | { |
402 | { |
401 | { 63, 182, 92, 198, }, |
403 | { 63, 182, 92, 198, }, |
402 | { 93, 182, 118, 198, }, |
404 | { 93, 182, 118, 198, }, |
403 | { 119, 182, 144, 198, }, |
405 | { 119, 182, 144, 198, }, |
Line 416... | Line 418... | ||
416 | { 386, 436, 436, 475, }, |
418 | { 386, 436, 436, 475, }, |
417 | { 438, 436, 488, 475, }, |
419 | { 438, 436, 488, 475, }, |
418 | { 490, 436, 544, 475, }, |
420 | { 490, 436, 544, 475, }, |
419 | }, |
421 | }, |
420 | }; |
422 | }; |
- | 423 | /* clang-format on */ |
|
421 | LOG_TRACE("(%d)", pFrame_period); |
424 | LOG_TRACE("(%d)", pFrame_period); |
422 | 425 | ||
423 | real_time = PDGetTotalTime(); |
426 | real_time = PDGetTotalTime(); |
424 | old_replay_rate = gReplay_rate; |
427 | old_replay_rate = gReplay_rate; |
425 | old_key_down = gKey_down == KEY_CAPSLOCK ? -1 : gKey_down; |
428 | old_key_down = gKey_down == KEY_CAPSLOCK ? -1 : gKey_down; |
Line 431... | Line 434... | ||
431 | 434 | ||
432 | if (gKey_down == -1) { |
435 | if (gKey_down == -1) { |
433 | if ((old_key_down == -1 || old_key_down == KEY_KP_4 || old_key_down == KEY_KP_6 || old_key_down == KEY_KP_MULTIPLY) && EitherMouseButtonDown()) { |
436 | if ((old_key_down == -1 || old_key_down == KEY_KP_4 || old_key_down == KEY_KP_6 || old_key_down == KEY_KP_MULTIPLY) && EitherMouseButtonDown()) { |
434 | GetMousePosition(&x_coord, &y_coord); |
437 | GetMousePosition(&x_coord, &y_coord); |
435 | for (i = 0; i < COUNT_OF(mouse_areas[0]); i++) { |
438 | for (i = 0; i < COUNT_OF(mouse_areas[0]); i++) { |
436 | if (mouse_areas[gGraf_data_index][i].left <= x_coord && mouse_areas[gGraf_data_index][i].top <= y_coord && |
- | |
437 |
|
439 | if (mouse_areas[gGraf_data_index][i].left <= x_coord && mouse_areas[gGraf_data_index][i].top <= y_coord && mouse_areas[gGraf_data_index][i].right >= x_coord && mouse_areas[gGraf_data_index][i].bottom >= y_coord) { |
438 | gKey_down = psuedo_mouse_keys[i]; |
440 | gKey_down = psuedo_mouse_keys[i]; |
439 | break; |
441 | break; |
440 | } |
442 | } |
441 | } |
443 | } |
442 | } |
444 | } |