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