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

Function Gem_create_nhwindow

outdated/win/gem/wingem.c:540–571  ·  view source on GitHub ↗
(type)

Source from the content-addressed store, hash-verified

538}
539
540winid
541Gem_create_nhwindow(type)
542int type;
543{
544 winid newid;
545
546 switch (type) {
547 case NHW_MESSAGE:
548 if (iflags.msg_history < 20)
549 iflags.msg_history = 20;
550 else if (iflags.msg_history > 60)
551 iflags.msg_history = 60;
552 break;
553 case NHW_STATUS:
554 case NHW_MAP:
555 case NHW_MENU:
556 case NHW_TEXT:
557 break;
558 default:
559 panic("Tried to create window type %d\n", (int) type);
560 return WIN_ERR;
561 }
562
563 newid = mar_create_window(type);
564
565 if (newid == MAXWIN) {
566 panic("No window slots!");
567 /* NOTREACHED */
568 }
569
570 return newid;
571}
572
573void
574Gem_nhbell()

Callers 2

Gem_display_fileFunction · 0.85
Gem_get_ext_cmdFunction · 0.85

Calls 2

mar_create_windowFunction · 0.85
panicFunction · 0.50

Tested by

no test coverage detected