Just removed two printfs I have mistakelly committed.
[supertux.git] / src / leveleditor.cpp
index eb9d2a5..acda848 100644 (file)
@@ -1,17 +1,22 @@
-/***************************************************************************
- *                                                                         *
- *   This program is free software; you can redistribute it and/or modify  *
- *   it under the terms of the GNU General Public License as published by  *
- *   the Free Software Foundation; either version 2 of the License, or     *
- *   (at your option) any later version.                                   *
- *                                                                         *
- ***************************************************************************/
-
-/*  December 28, 2003 - March 15, 2004 */
-
-/* leveleditor.c - A built-in level editor for SuperTux
- Ricardo Cruz <rick2@aeiou.pt>
- Tobias Glaesser <tobi.web@gmx.de>                      */
+//  $Id$
+// 
+//  SuperTux
+//  Copyright (C) 2003 Ricardo Cruz <rick2@aeiou.pt>
+//  Copyright (C) 2003 Tobias Glaesser <tobi.web@gmx.de>
+//
+//  This program is free software; you can redistribute it and/or
+//  modify it under the terms of the GNU General Public License
+//  as published by the Free Software Foundation; either version 2
+//  of the License, or (at your option) any later version.
+//
+//  This program is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+//  GNU General Public License for more details.
+// 
+//  You should have received a copy of the GNU General Public License
+//  along with this program; if not, write to the Free Software
+//  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 
 #include <map>
 #include <stdio.h>
@@ -208,12 +213,13 @@ int leveleditor(int levelnb)
       /* draw editor interface */
       le_drawinterface();
 
-      if(Menu::current())
+      Menu* menu = Menu::current();
+      if(menu)
         {
-          Menu::current()->draw();
-          Menu::current()->action();
+          menu->draw();
+          menu->action();
 
-          if(Menu::current() == leveleditor_menu)
+          if(menu == leveleditor_menu)
             {
               switch (leveleditor_menu->check())
                 {
@@ -228,7 +234,7 @@ int leveleditor(int levelnb)
                   break;
                 }
             }
-          else if(Menu::current() == level_settings_menu)
+          else if(menu == level_settings_menu)
             {
               switch (level_settings_menu->check())
                 {
@@ -242,7 +248,7 @@ int leveleditor(int levelnb)
                   break;
                 }
             }
-          else if(Menu::current() == select_tilegroup_menu)
+          else if(menu == select_tilegroup_menu)
             {
               int it = -1;
               switch (it = select_tilegroup_menu->check())
@@ -258,7 +264,7 @@ int leveleditor(int levelnb)
                   break;
                 }
             }
-          else if(Menu::current() == subset_load_menu)
+          else if(menu == subset_load_menu)
             {
               switch (i = subset_load_menu->check())
                 {
@@ -287,7 +293,7 @@ int leveleditor(int levelnb)
                   break;
                 }
             }
-          else if(Menu::current() == subset_new_menu)
+          else if(menu == subset_new_menu)
             {
               if(subset_new_menu->item[2].input[0] == '\0')
                 subset_new_menu->item[3].kind = MN_DEACTIVE;
@@ -319,7 +325,7 @@ int leveleditor(int levelnb)
                     }
                 }
             }
-          else if(Menu::current() == subset_settings_menu)
+          else if(menu == subset_settings_menu)
             {
               if(le_level_subset.title.compare(subset_settings_menu->item[2].input) == 0 && le_level_subset.description.compare(subset_settings_menu->item[3].input) == 0  )
                 subset_settings_menu->item[5].kind = MN_DEACTIVE;
@@ -339,11 +345,8 @@ int leveleditor(int levelnb)
 
       mouse_cursor->draw();
 
-printf("done: %i\n", done);
-
       if(done)
         {
-printf("done\n");
           le_quit();
           return 0;
         }