Call SDL_WM_SetIcon before SDL_SetVideoMode as suggested by the docs.
[neverball] / putt / st_all.c
index 891f0df..f569651 100644 (file)
@@ -1,4 +1,4 @@
-/*   
+/*
  * Copyright (C) 2003 Robert Kooima
  *
  * NEVERPUTT is  free software; you can redistribute  it and/or modify
@@ -62,7 +62,7 @@ static int score_card(const char  *title,
         if ((jd = gui_hstack(id)))
         {
             if ((kd = gui_varray(jd)))
-            { 
+            {
                 if (p1) gui_label(kd, _("O"),         0, GUI_NE, 0, 0);
                 if (p1) gui_label(kd, hole_out(0), 0, 0,           gui_wht, gui_wht);
                 if (p1) gui_label(kd, hole_out(1), 0, GUI_SE * l1, gui_red, gui_wht);
@@ -170,7 +170,7 @@ static int title_enter(void)
 
     if ((id = gui_vstack(0)))
     {
-        gui_label(id, _("Neverputt"), GUI_LRG, GUI_ALL, 0, 0);
+        gui_label(id, "Neverputt", GUI_LRG, GUI_ALL, 0, 0);
         gui_space(id);
 
         if ((jd = gui_harray(id)))
@@ -265,24 +265,26 @@ static int course_enter(void)
 
         if ((jd = gui_hstack(id)))
         {
-           shot_id = gui_image(jd, course_shot(0), w / 3, h / 3);
+            shot_id = gui_image(jd, course_shot(0), w / 3, h / 3);
             gui_filler(jd);
-           if ((kd = gui_varray(jd)))
-           {
+            if ((kd = gui_varray(jd)))
+            {
                 for(i = 0; i < n; i += m)
-               {
-                   if ((ld = gui_harray(kd)))
-                   {
-                       for (j = (m-1); j >= 0; j--)
-                       {
-                           if (i+j < n)
-                               gui_active(gui_image(ld, course_shot(i+j), w / 3 / m, h / 3 / m), i+j, 0);
-                           else
-                               gui_space(ld);
-                       }
-                   }
-               }
-           }
+                {
+                    if ((ld = gui_harray(kd)))
+                    {
+                        for (j = (m - 1); j >= 0; j--)
+                        {
+                            if (i + j < n)
+                                gui_active(gui_image(ld, course_shot(i + j),
+                                                     w / 3 / m, h / 3 / m),
+                                           i + j, 0);
+                            else
+                                gui_space(ld);
+                        }
+                    }
+                }
+            }
         }
 
         gui_space(id);
@@ -327,11 +329,11 @@ static void course_point(int id, int x, int y, int dx, int dy)
     if ((jd = gui_point(id, x, y)))
     {
         int i = gui_token(jd);
-       if (course_exists(i))
-       {
-           gui_set_image(shot_id, course_shot(i));
+        if (course_exists(i))
+        {
+            gui_set_image(shot_id, course_shot(i));
             gui_set_multi(desc_id, _(course_desc(i)));
-       }
+        }
         gui_pulse(jd, 1.2f);
     }
 }
@@ -707,7 +709,7 @@ static int roll_keybd(int c, int d)
 static int goal_enter(void)
 {
     int id;
-    
+
     if ((id = gui_label(0, _("It's In!"), GUI_MED, GUI_ALL, gui_grn, gui_grn)))
         gui_layout(id, 0, 0);
 
@@ -818,7 +820,7 @@ static int stop_keybd(int c, int d)
 static int fall_enter(void)
 {
     int id;
-    
+
     if ((id = gui_label(0, _("1 Stroke Penalty"), GUI_MED, GUI_ALL, gui_blk, gui_red)))
         gui_layout(id, 0, 0);