MCPcopy Create free account
hub / github.com/DescentDevelopers/Descent3 / ProcessNormalKey

Function ProcessNormalKey

Descent3/GameLoop.cpp:1237–1530  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1235// Deals with a normal (non-debug) key. Once the key is handled, this function returns
1236
1237void ProcessNormalKey(int key) {
1238 // First do keys that work normally even when dead
1239 switch (key) {
1240
1241 // ingnore the modifier keys
1242 case KEY_LALT:
1243 case KEY_RALT:
1244 case KEY_LSHIFT:
1245 case KEY_RSHIFT:
1246 case KEY_LCTRL:
1247 case KEY_RCTRL:
1248 return;
1249
1250 case KEY_ESC:
1251 Game_interface_mode = GAME_EXIT_CONFIRM;
1252 return;
1253
1254 case KEY_PAUSE:
1255 Game_interface_mode = GAME_PAUSE_INTERFACE;
1256 return;
1257
1258 case KEY_F1:
1259 Game_interface_mode = GAME_HELP_INTERFACE;
1260 return;
1261
1262 case KEY_F2:
1263 Game_interface_mode = GAME_OPTIONS_INTERFACE;
1264 return;
1265
1266 case KEY_F8:
1267 if (Game_mode & GM_MULTI) {
1268 StartHUDInputMessage();
1269 return;
1270 }
1271 break;
1272
1273 case KEY_SHIFTED + KEY_F8:
1274 ToggleGameMessageConsole();
1275 Clear_screen = 4;
1276 break;
1277
1278 case KEY_SHIFTED + KEY_F9:
1279 ToggleHUDMessageConsole();
1280 Clear_screen = 4; // clears screen.
1281 break;
1282
1283 // #ifndef DEMO
1284 case KEY_F5:
1285 Game_interface_mode = GAME_TOGGLE_DEMO;
1286 return;
1287 case KEY_ALTED + KEY_F5:
1288 DemoAbort(true);
1289 return;
1290 // #endif
1291 // case KEY_SHIFTED+KEY_LAPOSTRO: Game_interface_mode = GAME_TELCOM_CARGO;return;
1292 // case KEY_ALTED+KEY_LAPOSTRO: Game_interface_mode = GAME_TELCOM_BRIEFINGS; return;
1293 case KEY_SHIFTED + KEY_TAB:
1294 Game_interface_mode = GAME_TELCOM_BRIEFINGS;

Callers 1

ProcessKeysFunction · 0.85

Calls 15

StartHUDInputMessageFunction · 0.85
ToggleGameMessageConsoleFunction · 0.85
ToggleHUDMessageConsoleFunction · 0.85
DemoAbortFunction · 0.85
StartTeamHUDInputMessageFunction · 0.85
CallGameDLLFunction · 0.85
SendOffHUDInputMessageFunction · 0.85
DoScreenshotFunction · 0.85
ShrinkWindowFunction · 0.85
GrowWindowFunction · 0.85
MultiSendEndPlayerDeathFunction · 0.85
EndPlayerDeathFunction · 0.85

Tested by

no test coverage detected