mirror of
https://git.zap.org.au/git/trader.git
synced 2024-09-01 17:14:15 -04:00
Move the initialisation of the game title into its own function
This commit is contained in:
parent
8a2bc51f28
commit
5f995f1d36
44
src/intf.c
44
src/intf.c
@ -96,6 +96,17 @@ txwin_t *firstwin = NULL; // First (bottom-most) txwin structure
|
|||||||
* Module-specific function prototypes *
|
* Module-specific function prototypes *
|
||||||
************************************************************************/
|
************************************************************************/
|
||||||
|
|
||||||
|
/*
|
||||||
|
Function: init_title - Draw the main window title
|
||||||
|
Parameters: (none)
|
||||||
|
Returns: (nothing)
|
||||||
|
|
||||||
|
This function draws the main window game title, "Star Traders", and
|
||||||
|
clears the rest of the screen.
|
||||||
|
*/
|
||||||
|
static void init_title (void);
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Function: sigterm_handler - Handle program termination signals
|
Function: sigterm_handler - Handle program termination signals
|
||||||
Parameters: sig - Signal number
|
Parameters: sig - Signal number
|
||||||
@ -254,18 +265,7 @@ void init_screen (void)
|
|||||||
attr_error_waitforkey = A_REVERSE;
|
attr_error_waitforkey = A_REVERSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
bkgd(attr_root_window);
|
init_title();
|
||||||
clear();
|
|
||||||
|
|
||||||
move(0, 0);
|
|
||||||
for (int i = 0; i < COLS; i++) {
|
|
||||||
addch(attr_game_title | ' ');
|
|
||||||
}
|
|
||||||
|
|
||||||
center(stdscr, 0, attr_game_title, "Star Traders");
|
|
||||||
|
|
||||||
attrset(attr_root_window);
|
|
||||||
refresh();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -287,6 +287,26 @@ void end_screen (void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/***********************************************************************/
|
||||||
|
// init_title: Draw the main window title
|
||||||
|
|
||||||
|
void init_title (void)
|
||||||
|
{
|
||||||
|
bkgd(attr_root_window);
|
||||||
|
clear();
|
||||||
|
|
||||||
|
move(0, 0);
|
||||||
|
for (int i = 0; i < COLS; i++) {
|
||||||
|
addch(attr_game_title | ' ');
|
||||||
|
}
|
||||||
|
|
||||||
|
center(stdscr, 0, attr_game_title, "Star Traders");
|
||||||
|
|
||||||
|
attrset(attr_root_window);
|
||||||
|
refresh();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
// sigterm_handler: Handle program termination signals
|
// sigterm_handler: Handle program termination signals
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user