Don't internationalise player name. Temporary solution to ticket #82.
[neverball] / ball / st_level.c
index 3229a47..b9ec268 100644 (file)
@@ -34,11 +34,11 @@ static int level_enter(void)
     const char *ln;
     const struct level_game *lg = curr_lg();
     int b;
+    const float *textcol1, *textcol2;
 
     /* Load the level */
     level_ok = level_play_go();
 
-
     if ((id = gui_vstack(0)))
     {
         if (lg->mode == MODE_SINGLE)
@@ -47,28 +47,23 @@ static int level_enter(void)
         }
         else if ((jd = gui_hstack(id)))
         {
-            ln = lg->level->numbername;
+            ln = lg->level->repr;
             b = lg->level->is_bonus;
+            textcol1 = b ? gui_wht : 0;
+            textcol2 = b ? gui_grn : 0;
 
             gui_filler(jd);
             if ((kd = gui_vstack(jd)))
             {
+                gui_label(kd, mode_to_str(lg->mode), GUI_SML, GUI_TOP,
+                          gui_wht, gui_wht);
                 if (b)
-                    gui_label(kd, _("*** BONUS ***"), GUI_MED, GUI_TOP, gui_wht,
+                    gui_label(kd, _("*** BONUS ***"), GUI_MED, 0, gui_wht,
                               gui_grn);
                 if ((ld = gui_hstack(kd)))
                 {
-                    if (b)
-                    {
-                        gui_label(ld, ln, GUI_LRG, 0, gui_wht, gui_grn);
-                        gui_label(ld, _("Level "), GUI_LRG, 0, gui_wht,
-                                  gui_grn);
-                    }
-                    else
-                    {
-                        gui_label(ld, ln, GUI_LRG, GUI_NE, 0, 0);
-                        gui_label(ld, _("Level "), GUI_LRG, GUI_NW, 0, 0);
-                    }
+                    gui_label(ld, ln, GUI_LRG, 0, textcol1, textcol2);
+                    gui_label(ld, _("Level "), GUI_LRG, 0, textcol1, textcol2);
                 }
 
                 gui_label(kd, _(curr_set()->name), GUI_SML, GUI_BOT, gui_wht,
@@ -102,14 +97,8 @@ static void level_timer(int id, float dt)
 static int level_click(int b, int d)
 {
     if (b < 0 && d == 1)
-    {
-        if (level_ok)
-            return goto_state(&st_play_ready);
-        else
-            return goto_end_level();
-    }
-    else
-       return 1;
+        return level_ok ? goto_state(&st_play_ready) : goto_end_level();
+    return 1;
 }
 
 static int level_keybd(int c, int d)