OSDN Git Service

Nazghul-0.7.1
[nazghul-jp/nazghul-jp.git] / src / menus.h
1 /* $Id: menus.h,v 1.6 2010/08/26 05:56:21 gmcnutt Exp $
2  *
3  * Copyright (C) 2006 Gordon McNutt
4  *
5  * This program is free software; you can redistribute it and/or modify it
6  * under the terms of the GNU General Public License as published by the Free
7  * Software Foundation; either version 2 of the License, or (at your option)
8  * any later version.
9  *
10  * This program is distributed in the hope that it will be useful, but WITHOUT
11  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
13  * more details.
14  *
15  * You should have received a copy of the GNU General Public License along with
16  * this program; if not, write to the Free Foundation, Inc., 59 Temple Place,
17  * Suite 330, Boston, MA 02111-1307 USA
18  */
19
20 #ifndef menus_h
21 #define menus_h
22
23 /**
24  * Initializes the menus for first-use. The cfg script must be loaded before
25  * calling this.
26  *
27  * @returns 0 on success, -1 on error.
28  */
29 extern int menu_init(void);
30
31 extern char *main_menu(void);
32
33 /**
34  * Let the player choose from the available saved games.
35  *
36  * @return The full pathname of the save file.
37  */
38 extern char *load_game_menu(void);
39 extern char *save_game_menu(void);
40 extern void menu_add_saved_game(char *fname);
41 extern void options_menu(void);
42
43 /**
44  * Called when the game cannot fully initialize itself to present the normal
45  * UI. This is to support players on OS's that don't show stdout and stderr on
46  * a console.
47  *
48  * @param fmt The printf-formatted error message.
49  */
50 void menu_startup_error(const char *fmt, ...);
51
52 #endif