MCPcopy Create free account
hub / github.com/NetHack/NetHack / onMSNHCommand

Function onMSNHCommand

win/win32/mhmain.c:530–556  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

528}
529
530void
531onMSNHCommand(HWND hWnd, WPARAM wParam, LPARAM lParam)
532{
533 UNREFERENCED_PARAMETER(hWnd);
534 UNREFERENCED_PARAMETER(wParam);
535 UNREFERENCED_PARAMETER(lParam);
536
537 switch (wParam) {
538 /* new window was just added */
539 case MSNH_MSG_ADDWND: {
540 PMSNHMsgAddWnd msg_param = (PMSNHMsgAddWnd) lParam;
541 HWND child;
542
543 if (GetNHApp()->windowlist[msg_param->wid].type == NHW_MAP)
544 mswin_select_map_mode(iflags.wc_map_mode);
545
546 child = GetNHApp()->windowlist[msg_param->wid].win;
547 nhUse(child);
548 } break;
549
550 case MSNH_MSG_RANDOM_INPUT: {
551 nhassert(iflags.debug_fuzzer);
552 NHEVENT_KBD(randomkey());
553 } break;
554
555 }
556}
557
558/* adjust windows to fit main window layout
559 ---------------------------

Callers 1

MainWndProcFunction · 0.70

Calls 3

randomkeyFunction · 0.85
GetNHAppFunction · 0.70
mswin_select_map_modeFunction · 0.70

Tested by

no test coverage detected