1st of a few sequencing changes
rename display_gamewindows() to init_sound_and_display_gamewindows() (I know that's getting pretty long-named). move activate_chosen_soundlib() into init_sound_and_display_gamewindows() from moveloop_preamble(). Also included was a missing break in a switch related to sounds.
This commit is contained in:
@@ -1025,11 +1025,11 @@ initoptions() /* read the resource file */
|
||||
init_nhwindows() /* initialize the window system */
|
||||
process_options(argc, argv) /* process command line options or equiv */
|
||||
if(save file is present) {
|
||||
display_gamewindows() /* create & display the game windows */
|
||||
init_sound_and_display_gamewindows() /* init sound, create & display */
|
||||
dorestore() /* restore old game; pline()s are OK */
|
||||
} else {
|
||||
player_selection() /* select a player type using a window */
|
||||
display_gamewindows() /* create & display the game windows */
|
||||
init_sound_and_display_gamewindows() /* init sound, create & display */
|
||||
}
|
||||
pline("Hello, welcome...");
|
||||
|
||||
@@ -1044,9 +1044,10 @@ ini_routines have side effects that need to be undone, the old ini_routine (if
|
||||
any) will be called with an argument of WININIT_UNDO before the new
|
||||
ini_routine (if any) is called (with WININIT).
|
||||
|
||||
Display_gamewindows() is a common routine that displays the two standard
|
||||
game windows (WIN_MESSAGE, WIN_MAP), and the status display. It is normally
|
||||
called just before the "Hello, welcome" message.
|
||||
Init_sound_and_display_gamewindows() is a common routine that initializes
|
||||
the soundlib, then displays the standard game windows (WIN_MESSAGE, WIN_MAP,
|
||||
etc.), and the status display. It is normally called just before the
|
||||
"Hello, welcome" message.
|
||||
|
||||
Process_options() is currently still unique to each port. There may be need
|
||||
in the future to make it possible to replace this on a per window-port basis.
|
||||
|
||||
@@ -22,7 +22,7 @@ extern void early_init(void);
|
||||
extern void moveloop_core(void);
|
||||
extern void moveloop(boolean);
|
||||
extern void stop_occupation(void);
|
||||
extern void display_gamewindows(void);
|
||||
extern void init_sound_and_display_gamewindows(void);
|
||||
extern void newgame(void);
|
||||
extern void welcome(boolean);
|
||||
extern int argcheck(int, char **, enum earlyarg);
|
||||
|
||||
@@ -426,7 +426,8 @@ struct NewScreen NewHackScreen = { 0, 0, WIDTH, SCREENHEIGHT, 3, 0,
|
||||
* plname is filled either by an option (-u Player or -uPlayer) or
|
||||
* explicitly (by being the wizard) or by askname.
|
||||
* It may still contain a suffix denoting pl_character.
|
||||
* Always called after init_nhwindows() and before display_gamewindows().
|
||||
* Always called after init_nhwindows() and before
|
||||
* init_sound_and_display_gamewindows().
|
||||
*/
|
||||
void
|
||||
amii_askname()
|
||||
|
||||
@@ -64,7 +64,7 @@ MAIN(int argc, char **argv)
|
||||
*/
|
||||
vision_init();
|
||||
|
||||
display_gamewindows();
|
||||
init_sound_and_display_gamewindows();
|
||||
|
||||
/*
|
||||
* First, try to find and restore a save file for specified character.
|
||||
|
||||
@@ -65,7 +65,7 @@ main(void)
|
||||
*/
|
||||
vision_init();
|
||||
|
||||
display_gamewindows();
|
||||
init_sound_and_display_gamewindows();
|
||||
|
||||
set_playmode(); /* sets plname to "wizard" for wizard mode */
|
||||
/* strip role,race,&c suffix; calls askname() if plname[] is empty
|
||||
|
||||
@@ -74,7 +74,7 @@ functions:49 _delete_levelfile _delete_savefile _delfloortrap _deliver_by_pline
|
||||
functions:50 _demonpet _destroy_arm _destroy_drawbridge _destroy_item _destroy_mitem _dev_name _dig
|
||||
functions:51 _dig_check _dig_corridor _dig_point _dig_typ _digactualhole _dighole _digit _dipfountain
|
||||
functions:52 _disable_ctrlP _disarm_landmine _disarm_shooting_trap _disarm_squeaky_board _discard_minvent _disclose _discover_object
|
||||
functions:53 _diseasemu _display_binventory _display_cinventory _display_gamewindows _display_inventory _display_minventory
|
||||
functions:53 _diseasemu _display_binventory _display_cinventory _init_sound_and_display_gamewindows _display_inventory _display_minventory
|
||||
functions:54 _distant_name _distfleeck _disturb _djinni_from_bottle _dlb_cleanup _dlb_fclose
|
||||
functions:55 _dlb_fgets _dlb_fopen _dlb_fread _dlb_fseek _dlb_ftell _dlb_init _dlord _dmgtype
|
||||
functions:56 _dmgval _dmonsfree _dmore _dname_to_dnum _do_break_wand _do_clear_area _do_comp _do_dknown_of
|
||||
|
||||
@@ -74,7 +74,7 @@ functions:49 _delete_levelfile _delete_savefile _delfloortrap _deliver_by_pline
|
||||
functions:50 _demonpet _destroy_arm _destroy_drawbridge _destroy_item _destroy_mitem _dev_name _dig
|
||||
functions:51 _dig_check _dig_corridor _dig_point _dig_typ _digactualhole _dighole _digit _dipfountain
|
||||
functions:52 _disable_ctrlP _disarm_landmine _disarm_shooting_trap _disarm_squeaky_board _discard_minvent _disclose _discover_object
|
||||
functions:53 _diseasemu _display_binventory _display_cinventory _display_gamewindows _display_inventory _display_minventory
|
||||
functions:53 _diseasemu _display_binventory _display_cinventory _init_sound_and_display_gamewindows _display_inventory _display_minventory
|
||||
functions:54 _distant_name _distfleeck _disturb _djinni_from_bottle _dlb_cleanup _dlb_fclose
|
||||
functions:55 _dlb_fgets _dlb_fopen _dlb_fread _dlb_fseek _dlb_ftell _dlb_init _dlord _dmgtype
|
||||
functions:56 _dmgval _dmonsfree _dmore _dname_to_dnum _do_break_wand _do_clear_area _do_comp _do_dknown_of
|
||||
|
||||
@@ -495,7 +495,7 @@ Gem_player_selection()
|
||||
* plname is filled either by an option (-u Player or -uPlayer) or
|
||||
* explicitly (by being the wizard) or by askname.
|
||||
* It may still contain a suffix denoting pl_character.
|
||||
* Always called after init_nhwindows() and before display_gamewindows().
|
||||
* Always called after init_nhwindows() and before init_sound_and_display_gamewindows().
|
||||
*/
|
||||
|
||||
void
|
||||
|
||||
@@ -58,8 +58,6 @@ moveloop_preamble(boolean resuming)
|
||||
change_luck(-1);
|
||||
}
|
||||
|
||||
activate_chosen_soundlib();
|
||||
|
||||
if (!resuming) { /* new game */
|
||||
gc.context.rndencode = rnd(9000);
|
||||
set_wear((struct obj *) 0); /* for side-effects of starting gear */
|
||||
@@ -622,10 +620,12 @@ stop_occupation(void)
|
||||
}
|
||||
|
||||
void
|
||||
display_gamewindows(void)
|
||||
init_sound_and_display_gamewindows(void)
|
||||
{
|
||||
int menu_behavior = MENU_BEHAVE_STANDARD;
|
||||
|
||||
activate_chosen_soundlib();
|
||||
|
||||
WIN_MESSAGE = create_nhwindow(NHW_MESSAGE);
|
||||
if (VIA_WINDOWPORT()) {
|
||||
status_initialize(0);
|
||||
@@ -646,8 +646,8 @@ display_gamewindows(void)
|
||||
|
||||
#ifdef MAC
|
||||
/* This _is_ the right place for this - maybe we will
|
||||
* have to split display_gamewindows into create_gamewindows
|
||||
* and show_gamewindows to get rid of this ifdef...
|
||||
* have to split init_sound_and_display_gamewindows into
|
||||
* create_gamewindows and show_gamewindows to get rid of this ifdef...
|
||||
*/
|
||||
if (!strcmp(windowprocs.name, "mac"))
|
||||
SanePositions();
|
||||
|
||||
@@ -247,7 +247,7 @@ nhmain(int argc, char *argv[])
|
||||
*/
|
||||
vision_init();
|
||||
|
||||
display_gamewindows();
|
||||
init_sound_and_display_gamewindows();
|
||||
|
||||
/*
|
||||
* First, try to find and restore a save file for specified character.
|
||||
|
||||
@@ -448,7 +448,7 @@ _CrtSetReportFile(_CRT_ASSERT, _CRTDBG_FILE_STDERR);*/
|
||||
*/
|
||||
vision_init();
|
||||
|
||||
display_gamewindows();
|
||||
init_sound_and_display_gamewindows();
|
||||
/*
|
||||
* First, try to find and restore a save file for specified character.
|
||||
* We'll return here if new game player_selection() renames the hero.
|
||||
|
||||
@@ -216,7 +216,7 @@ main(int argc, char *argv[])
|
||||
*/
|
||||
vision_init();
|
||||
|
||||
display_gamewindows();
|
||||
init_sound_and_display_gamewindows();
|
||||
|
||||
/*
|
||||
* First, try to find and restore a save file for specified character.
|
||||
|
||||
@@ -183,7 +183,7 @@ main(int argc, char *argv[])
|
||||
*/
|
||||
vision_init();
|
||||
|
||||
display_gamewindows();
|
||||
init_sound_and_display_gamewindows();
|
||||
|
||||
/*
|
||||
* First, try to find and restore a save file for specified character.
|
||||
|
||||
@@ -678,7 +678,7 @@ _CrtSetReportFile(_CRT_ASSERT, _CRTDBG_FILE_STDERR);*/
|
||||
* new game or before a level restore on a saved game.
|
||||
*/
|
||||
vision_init();
|
||||
display_gamewindows();
|
||||
init_sound_and_display_gamewindows();
|
||||
/*
|
||||
* First, try to find and restore a save file for specified character.
|
||||
* We'll return here if new game player_selection() renames the hero.
|
||||
|
||||
@@ -586,7 +586,8 @@ tty_player_selection(void)
|
||||
* gp.plname is filled either by an option (-u Player or -uPlayer) or
|
||||
* explicitly (by being the wizard) or by askname.
|
||||
* It may still contain a suffix denoting the role, etc.
|
||||
* Always called after init_nhwindows() and before display_gamewindows().
|
||||
* Always called after init_nhwindows() and before
|
||||
* init_sound_and_display_gamewindows().
|
||||
*/
|
||||
void
|
||||
tty_askname(void)
|
||||
|
||||
Reference in New Issue
Block a user