projects
/
neverball
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixed the problem that in a rare case, a set is downloaded and the neverballrc is...
[neverball]
/
ball
/
st_pause.c
diff --git
a/ball/st_pause.c
b/ball/st_pause.c
index
afc1eff
..
e46333b
100644
(file)
--- a/
ball/st_pause.c
+++ b/
ball/st_pause.c
@@
-12,7
+12,6
@@
* General Public License for more details.
*/
* General Public License for more details.
*/
-#include <SDL_mixer.h>
#include "gui.h"
#include "config.h"
#include "game.h"
#include "gui.h"
#include "config.h"
#include "game.h"
@@
-22,7
+21,7
@@
#include "hud.h"
#include "st_play.h"
#include "hud.h"
#include "st_play.h"
-#include "st_start.h"
+#include "st_over.h"
#include "st_shared.h"
#include "st_pause.h"
#include "st_shared.h"
#include "st_pause.h"
@@
-61,35
+60,37
@@
static int pause_action(int i)
switch(i)
{
case PAUSE_CONTINUE:
switch(i)
{
case PAUSE_CONTINUE:
- Mix_ResumeMusic();
+ SDL_PauseAudio(0);
config_set_grab(0);
return goto_state(st_continue);
case PAUSE_RESTART:
config_set_grab(0);
return goto_state(st_continue);
case PAUSE_RESTART:
- level_stop(GAME_NONE, curr_clock(), curr_coins());
+ level_same();
clear_pause();
clear_pause();
- level_play(curr_lg()->level, curr_lg()->mode);
- Mix_ResumeMusic();
+ SDL_PauseAudio(0);
config_set_grab(1);
return goto_state(&st_play_ready);
case PAUSE_EXIT:
config_set_grab(1);
return goto_state(&st_play_ready);
case PAUSE_EXIT:
- level_stop(GAME_NONE, curr_clock(), curr_coins());
+ level_stat(GAME_NONE, curr_clock(), curr_coins());
+ level_stop();
clear_pause();
clear_pause();
- return goto_state(&st_start);
+ SDL_PauseAudio(0);
+ audio_music_stop();
+ return goto_state(&st_over);
}
return 1;
}
}
return 1;
}
+/*---------------------------------------------------------------------------*/
static int pause_enter(void)
{
int id, jd, title_id;
config_clr_grab();
static int pause_enter(void)
{
int id, jd, title_id;
config_clr_grab();
-
- Mix_PauseMusic();
+ SDL_PauseAudio(1);
/* Build the pause GUI. */
/* Build the pause GUI. */
@@
-123,13
+124,13
@@
static int pause_enter(void)
return id;
}
return id;
}
-void pause_paint(int id, float st)
+static void pause_paint(int id, float st)
{
shared_paint(id, st);
hud_paint();
}
{
shared_paint(id, st);
hud_paint();
}
-void pause_timer(int id, float dt)
+static void pause_timer(int id, float dt)
{
gui_timer(id, dt);
hud_timer (dt);
{
gui_timer(id, dt);
hud_timer (dt);
@@
-158,7
+159,7
@@
static int pause_buttn(int b, int d)
if (config_tst_d(CONFIG_JOYSTICK_BUTTON_EXIT, b))
{
if (config_tst_d(CONFIG_JOYSTICK_BUTTON_EXIT, b))
{
- if (SDL_GetModState() & (KMOD_SHIFT | KMOD_CTRL | KMOD_ALT | KMOD_META))
+ if (SDL_GetModState() & KMOD_SHIFT)
return pause_action(PAUSE_EXIT);
else
return pause_action(PAUSE_CONTINUE);
return pause_action(PAUSE_EXIT);
else
return pause_action(PAUSE_CONTINUE);
@@
-176,6
+177,7
@@
struct state st_pause = {
pause_timer,
shared_point,
shared_stick,
pause_timer,
shared_point,
shared_stick,
+ shared_angle,
shared_click,
pause_keybd,
pause_buttn,
shared_click,
pause_keybd,
pause_buttn,