#include "audio.h"
#include "config.h"
#include "demo.h"
+#include "keynames.h"
#include "st_shared.h"
#include "st_title.h"
/*---------------------------------------------------------------------------*/
-struct state st_help_demo;
-
-/*---------------------------------------------------------------------------*/
-
#define HELP_BACK 0
#define HELP_RULE 1
#define HELP_CONT 2
break;
case HELP_DEMO_1:
- demo_replay_init(config_data("gui/demo1.nbr"), NULL);
- return goto_state(&st_help_demo);
+ if (demo_replay_init(config_data("gui/demo1.nbr"),
+ NULL, NULL, NULL, NULL, NULL))
+ return goto_state(&st_help_demo);
break;
case HELP_DEMO_2:
- demo_replay_init(config_data("gui/demo2.nbr"), NULL);
- return goto_state(&st_help_demo);
+ if (demo_replay_init(config_data("gui/demo2.nbr"),
+ NULL, NULL, NULL, NULL, NULL))
+ return goto_state(&st_help_demo);
break;
default:
const char *s9 = _("Lazy View");
const char *sA = _("Manual View");
const char *sC = _("Screenshot");
-
- const char *k0 = _(SDL_GetKeyName((SDLKey) config_get_d(CONFIG_KEY_PAUSE)));
- const char *k1 = _("Escape");
- const char *k2 = SDL_GetKeyName((SDLKey) config_get_d(CONFIG_KEY_CAMERA_1));
- const char *k3 = SDL_GetKeyName((SDLKey) config_get_d(CONFIG_KEY_CAMERA_2));
- const char *k4 = SDL_GetKeyName((SDLKey) config_get_d(CONFIG_KEY_CAMERA_3));
- const char *k6 = SDL_GetKeyName(SDLK_F10);
+
+ const char *k0 = pretty_keyname((SDLKey) config_get_d(CONFIG_KEY_PAUSE));
+ const char *k1 = pretty_keyname(SDLK_ESCAPE);
+ const char *k2 = pretty_keyname((SDLKey) config_get_d(CONFIG_KEY_CAMERA_1));
+ const char *k3 = pretty_keyname((SDLKey) config_get_d(CONFIG_KEY_CAMERA_2));
+ const char *k4 = pretty_keyname((SDLKey) config_get_d(CONFIG_KEY_CAMERA_3));
+ const char *k6 = pretty_keyname(SDLK_F10);
int jd;
gui_space(kd);
- gui_label(kd, _("Practice Mode"), GUI_SML, GUI_TOP, 0, 0);
- gui_multi(kd,
- _("Play without time limit or coin constraint.\\"
- "Levels cannot be unlocked in this mode."),
- GUI_SML, GUI_BOT, gui_wht, gui_wht);
-
- gui_space(kd);
-
gui_label(kd, _("Challenge Mode"), GUI_SML, GUI_TOP, 0, 0);
gui_multi(kd,
_("Start playing from the first level of the set.\\"
- "You start with only four balls, do not lose them.\\"
+ "You start with only three balls, do not lose them.\\"
"Earn an extra ball for each 100 coins collected."),
GUI_SML, GUI_BOT, gui_wht, gui_wht);
}
/*---------------------------------------------------------------------------*/
-static float real_time;
-static float demo_time;
-
static int help_demo_enter(void)
{
- real_time = -1.f;
- demo_time = 0.f;
-
game_set_fly(0.f);
return 0;
demo_replay_stop(0);
}
-static void help_demo_paint(int id, float st)
+static void help_demo_paint(int id, float t)
{
- game_draw(0, st);
+ game_draw(0, t);
}
static void help_demo_timer(int id, float dt)
{
- float t;
-
- real_time += dt;
-
game_step_fade(dt);
- while (demo_time < real_time)
- if (demo_replay_step(&t))
- demo_time += t;
- else
- {
- goto_state(&st_help);
- break;
- }
+ if (!demo_replay_step(dt))
+ goto_state(&st_help);
}
static int help_demo_buttn(int b, int d)
shared_timer,
shared_point,
shared_stick,
+ shared_angle,
shared_click,
NULL,
help_buttn,
NULL,
NULL,
NULL,
+ NULL,
help_demo_buttn,
1, 0
};