| 2158 | } |
| 2159 | |
| 2160 | BOOL control_presskeys(int vkey) |
| 2161 | { |
| 2162 | int len; |
| 2163 | BOOL ret; |
| 2164 | |
| 2165 | if (gbMaxPlayers != 1) { |
| 2166 | if (!talkflag) { |
| 2167 | ret = FALSE; |
| 2168 | } else { |
| 2169 | if (vkey == VK_SPACE) { |
| 2170 | } else if (vkey == VK_ESCAPE) { |
| 2171 | control_reset_talk(); |
| 2172 | } else if (vkey == VK_RETURN) { |
| 2173 | control_press_enter(); |
| 2174 | } else if (vkey == VK_BACK) { |
| 2175 | len = strlen(sgszTalkMsg); |
| 2176 | if (len > 0) |
| 2177 | sgszTalkMsg[len - 1] = '\0'; |
| 2178 | } else if (vkey == VK_DOWN) { |
| 2179 | control_up_down(1); |
| 2180 | } else if (vkey == VK_UP) { |
| 2181 | control_up_down(-1); |
| 2182 | } else { |
| 2183 | return FALSE; |
| 2184 | } |
| 2185 | ret = TRUE; |
| 2186 | } |
| 2187 | } else { |
| 2188 | ret = FALSE; |
| 2189 | } |
| 2190 | return ret; |
| 2191 | } |
| 2192 | |
| 2193 | void control_press_enter() |
| 2194 | { |
no test coverage detected