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

Function init_sound_disp_gamewindows

src/allmain.c:698–763  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

696}
697
698void
699init_sound_disp_gamewindows(void)
700{
701 int menu_behavior = MENU_BEHAVE_STANDARD;
702
703 activate_chosen_soundlib();
704
705 if (iflags.wc_splash_screen && !flags.randomall) {
706 SoundAchievement(0, sa2_splashscreen, 0);
707 /* ToDo: new splash screen invocation will go here */
708 } else {
709 SoundAchievement(0, sa2_newgame_nosplash, 0);
710 }
711
712#ifdef CHANGE_COLOR
713 /* init_nhwindows() has already been called, so before
714 creating the windows, check to see if there are any
715 palette entries to alter */
716 change_palette();
717#endif
718
719 WIN_MESSAGE = create_nhwindow(NHW_MESSAGE);
720 if (VIA_WINDOWPORT()) {
721 status_initialize(FALSE);
722 } else {
723 WIN_STATUS = create_nhwindow(NHW_STATUS);
724 }
725 WIN_MAP = create_nhwindow(NHW_MAP);
726 WIN_INVEN = create_nhwindow(NHW_MENU);
727 if (WIN_INVEN != WIN_ERR)
728 adjust_menu_promptstyle(WIN_INVEN, &iflags.menu_headings);
729
730#ifdef TTY_PERM_INVENT
731 if (WINDOWPORT(tty) && WIN_INVEN != WIN_ERR) {
732 menu_behavior = MENU_BEHAVE_PERMINV;
733 prepare_perminvent(WIN_INVEN);
734 }
735#endif
736 /* in case of early quit where WIN_INVEN could be destroyed before
737 ever having been used, use it here to pacify the Qt interface */
738 start_menu(WIN_INVEN, menu_behavior), end_menu(WIN_INVEN, (char *) 0);
739
740#ifdef MACOS9
741 /* This _is_ the right place for this - maybe we will
742 * have to split init_sound_disp_gamewindows into
743 * create_gamewindows and show_gamewindows to get rid of this ifdef...
744 */
745 if (!strcmp(windowprocs.name, "mac"))
746 SanePositions();
747#endif
748
749 /*
750 * The mac port is not DEPENDENT on the order of these
751 * displays, but it looks a lot better this way...
752 */
753#ifndef STATUS_HILITES
754 display_nhwindow(WIN_STATUS, FALSE);
755#endif

Callers 7

mainFunction · 0.85
libnhmain.cFile · 0.85
MAINFunction · 0.85
mainFunction · 0.85
pcmainFunction · 0.85
MAINFunction · 0.85
mainFunction · 0.85

Calls 8

activate_chosen_soundlibFunction · 0.85
change_paletteFunction · 0.85
status_initializeFunction · 0.85
adjust_menu_promptstyleFunction · 0.85
prepare_perminventFunction · 0.85
SanePositionsFunction · 0.85
clear_glyph_bufferFunction · 0.85
check_perm_invent_againFunction · 0.85

Tested by

no test coverage detected