MCPcopy Create free account
hub / github.com/diasurgical/devilution / PressEscKey

Function PressEscKey

Source/diablo.cpp:421–461  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

419}
420
421BOOL PressEscKey()
422{
423 BOOL rv = FALSE;
424
425 if (doomflag) {
426 doom_close();
427 rv = TRUE;
428 }
429 if (helpflag) {
430 helpflag = FALSE;
431 rv = TRUE;
432 }
433
434 if (qtextflag) {
435 qtextflag = FALSE;
436 sfx_stop();
437 rv = TRUE;
438 } else if (stextflag) {
439 STextESC();
440 rv = TRUE;
441 }
442
443 if (msgflag) {
444 msgdelay = 0;
445 rv = TRUE;
446 }
447 if (talkflag) {
448 control_reset_talk();
449 rv = TRUE;
450 }
451 if (dropGoldFlag) {
452 control_drop_gold(VK_ESCAPE);
453 rv = TRUE;
454 }
455 if (spselflag) {
456 spselflag = FALSE;
457 rv = TRUE;
458 }
459
460 return rv;
461}
462
463static void GetMousePos(LPARAM lParam)
464{

Callers 2

PressKeyFunction · 0.85
gamemenu_onFunction · 0.85

Calls 5

doom_closeFunction · 0.85
sfx_stopFunction · 0.85
STextESCFunction · 0.85
control_reset_talkFunction · 0.85
control_drop_goldFunction · 0.85

Tested by

no test coverage detected