5 struct screen *init_logo_screen(void);
6 struct screen *init_menu_screen(void);
7 struct screen *init_game_screen(void);
8 struct screen *init_controls_screen(void);
10 struct screen *curscr;
13 static struct screen *scrlist[MAX_SCR];
16 int init_screens(void)
18 if(!(scrlist[num_scr++] = init_logo_screen())) {
21 if(!(scrlist[num_scr++] = init_menu_screen())) {
24 if(!(scrlist[num_scr++] = init_controls_screen())) {
27 if(!(scrlist[num_scr++] = init_game_screen())) {
33 int change_screen(struct screen *scr)
39 if(curscr && curscr->stop) {
42 if(scr->start && scr->start() == -1) {
51 struct screen *find_screen(const char *name)
54 for(i=0; i<num_scr; i++) {
55 if(strcmp(scrlist[i]->name, name) == 0) {