Those sets haven't been merged.
[neverball] / ball / st_start.c
index 081109c..5e90fd3 100644 (file)
 
 /*---------------------------------------------------------------------------*/
 
-int goto_end_level(void)
-{
-    switch (curr_lg()->mode)
-    {
-    case MODE_CHALLENGE:
-        return goto_state(&st_over);
-    default:
-        return goto_state(&st_start);
-    }
-}
-
-
-/*---------------------------------------------------------------------------*/
-
 #define START_BACK      -1
 #define START_PRACTICE  -2
 #define START_NORMAL    -3
@@ -88,7 +74,7 @@ static void gui_level(int id, int i)
 static void start_over_level(int i)
 {
     const struct level *l = get_level(i);
-    if (!l->is_locked || config_get_d(CONFIG_CHEAT))
+    if (!l->is_locked || config_cheat())
     {
         gui_set_image(shot_id, l->shot);
 
@@ -113,7 +99,7 @@ static void start_over_level(int i)
             else
                 gui_set_label(status_id, _("Play this level in normal mode"));
         }
-        if (config_get_d(CONFIG_CHEAT))
+        if (config_cheat())
         {
             gui_set_label(status_id, l->file);
         }
@@ -183,7 +169,7 @@ static int start_action(int i)
     if (i == START_CHALLENGE)
     {
         /* On cheat, start challenge mode where you want */
-        if (config_get_d(CONFIG_CHEAT))
+        if (config_cheat())
         {
             mode_set(MODE_CHALLENGE);
             return goto_state(&st_start);
@@ -196,13 +182,15 @@ static int start_action(int i)
     {
         const struct level *l = get_level(i);
 
-        if (!l->is_locked || config_get_d(CONFIG_CHEAT))
+        if (!l->is_locked || config_cheat())
         {
             if (level_play(l, mode))
+            {
                 return goto_state(&st_level);
+            }
             else
             {
-                level_stop(GAME_NONE, curr_clock(), curr_coins());
+                level_stop();
                 return 1;
             }
         }
@@ -221,7 +209,7 @@ static int start_enter(void)
 
     /* Deactivate cheat */
 
-    if (m == MODE_CHALLENGE && !config_get_d(CONFIG_CHEAT))
+    if (m == MODE_CHALLENGE && !config_cheat())
     {
         mode_set(MODE_NORMAL);
         m = MODE_NORMAL;
@@ -299,7 +287,7 @@ static void start_stick(int id, int a, int v)
 
 static int start_keybd(int c, int d)
 {
-    if (d && c == SDLK_c && config_get_d(CONFIG_CHEAT))
+    if (d && c == SDLK_c && config_cheat())
     {
         set_cheat();
         return goto_state(&st_start);
@@ -340,6 +328,7 @@ struct state st_start = {
     shared_timer,
     start_point,
     start_stick,
+    shared_angle,
     shared_click,
     start_keybd,
     start_buttn,