* General Public License for more details.
*/
-#include <stdio.h> /* Necessary for strcat() found below */.
+#include <stdio.h>
#include "gui.h"
#include "game.h"
be_back_soon = 1;
level_stop();
- return goto_name(&st_goal, &st_goal);
+ return goto_name(&st_goal, &st_goal, 0);
case GOAL_DONE:
level_stop();
int id, jd, kd;
- struct level_game *lg = curr_lg(); /* Note: const removed. Is this really needed? */
+ struct level_game *lg = curr_lg();
const struct level *l = lg->level;
int high;
{
int gid;
- if(lg->mode == MODE_CHALLENGE && lg->bonus > 0)
+ if (lg->mode == MODE_CHALLENGE && lg->bonus)
{
+ char buf[MAXSTR];
+
+ sprintf(buf, _("You have unlocked bonus level %s!"),
+ lg->bonus_repr);
+
+ gid = gui_label(id, s3, GUI_MED, GUI_ALL, gui_grn, gui_red);
+ gid = gui_label(id, buf, GUI_SML, GUI_ALL, gui_blu, gui_grn);
+
lg->bonus = 0;
- lg->bonusid += 1;
- char buf[MAXSTR] = {0};
- sprintf(buf, "You Have Unlocked Bonus Level %i!", lg->bonusid);
- gid = gui_label(id, s3, GUI_SML, GUI_ALL, gui_grn, gui_red);
- gid = gui_label(id, buf, GUI_SML, GUI_ALL, gui_grn, gui_blu);
+ lg->bonus_repr = NULL;
}
if (high)
static void goal_timer(int id, float dt)
{
- static float DT = 0.0f;
+ static float t = 0.0f;
float g[3] = { 0.0f, 9.8f, 0.0f };
- DT += dt;
+ t += dt;
if (time_state() < 1.f)
{
+ demo_play_step();
game_step(g, dt, 0);
- demo_play_step(dt);
}
- else if (DT > 0.05f && coins_id)
+ else if (t > 0.05f && coins_id)
{
int coins = gui_value(coins_id);
audio_play(AUD_BALL, 1.0f);
}
}
- DT = 0.0f;
+ t = 0.0f;
}
gui_timer(id, dt);
goal_timer,
shared_point,
shared_stick,
+ shared_angle,
shared_click,
NULL,
goal_buttn,