| 822 | } |
| 823 | |
| 824 | void PressKey(int vkey) |
| 825 | { |
| 826 | if (gmenu_presskeys(vkey) || control_presskeys(vkey)) { |
| 827 | return; |
| 828 | } |
| 829 | |
| 830 | if (deathflag) { |
| 831 | if (sgnTimeoutCurs != 0) { |
| 832 | return; |
| 833 | } |
| 834 | if (vkey == VK_F9) { |
| 835 | diablo_hotkey_msg(0); |
| 836 | } |
| 837 | if (vkey == VK_F10) { |
| 838 | diablo_hotkey_msg(1); |
| 839 | } |
| 840 | if (vkey == VK_F11) { |
| 841 | diablo_hotkey_msg(2); |
| 842 | } |
| 843 | if (vkey == VK_F12) { |
| 844 | diablo_hotkey_msg(3); |
| 845 | } |
| 846 | if (vkey == VK_RETURN) { |
| 847 | control_type_message(); |
| 848 | } |
| 849 | if (vkey != VK_ESCAPE) { |
| 850 | return; |
| 851 | } |
| 852 | } |
| 853 | if (vkey == VK_ESCAPE) { |
| 854 | if (!PressEscKey()) { |
| 855 | track_repeat_walk(FALSE); |
| 856 | gamemenu_on(); |
| 857 | } |
| 858 | return; |
| 859 | } |
| 860 | |
| 861 | if (sgnTimeoutCurs != 0 || dropGoldFlag) { |
| 862 | return; |
| 863 | } |
| 864 | if (vkey == VK_PAUSE) { |
| 865 | diablo_pause_game(); |
| 866 | return; |
| 867 | } |
| 868 | if (PauseMode == 2) { |
| 869 | return; |
| 870 | } |
| 871 | |
| 872 | if (vkey == VK_RETURN) { |
| 873 | if (GetAsyncKeyState(VK_MENU) & 0x8000) { |
| 874 | dx_reinit(); |
| 875 | } else if (stextflag) { |
| 876 | STextEnter(); |
| 877 | } else if (questlog) { |
| 878 | QuestlogEnter(); |
| 879 | } else { |
| 880 | control_type_message(); |
| 881 | } |
no test coverage detected