2 * Copyright (C) 2003 Robert Kooima
4 * NEVERBALL is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published
6 * by the Free Software Foundation; either version 2 of the License,
7 * or (at your option) any later version.
9 * This program is distributed in the hope that it will be useful, but
10 * WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * General Public License for more details.
23 #include "game_common.h"
27 #include "st_shared.h"
29 /*---------------------------------------------------------------------------*/
31 static int over_gui(void)
35 if ((id = gui_label(0, _("GAME OVER"), GUI_LRG, GUI_ALL, gui_gry, gui_red)))
44 static int over_enter(struct state *st, struct state *prev)
46 audio_music_fade_out(2.0f);
47 audio_play(AUD_OVER, 1.f);
54 static void over_timer(int id, float dt)
56 if (time_state() > 3.f)
62 static int over_click(int b, int d)
64 return (b == SDL_BUTTON_LEFT && d == 1) ? goto_state(&st_exit) : 1;
67 static int over_buttn(int b, int d)
71 if (config_tst_d(CONFIG_JOYSTICK_BUTTON_A, b) ||
72 config_tst_d(CONFIG_JOYSTICK_BUTTON_EXIT, b))
73 return goto_state(&st_exit);
78 /*---------------------------------------------------------------------------*/
80 struct state st_over = {