pingus-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Pingus-CVS] r3722 - in trunk/pingus/src: . components worldobjs


From: grumbel at BerliOS
Subject: [Pingus-CVS] r3722 - in trunk/pingus/src: . components worldobjs
Date: Mon, 7 Jul 2008 17:21:37 +0200

Author: grumbel
Date: 2008-07-07 17:21:34 +0200 (Mon, 07 Jul 2008)
New Revision: 3722

Modified:
   trunk/pingus/src/components/action_button.cpp
   trunk/pingus/src/components/button_panel.cpp
   trunk/pingus/src/components/pingus_counter.cpp
   trunk/pingus/src/config.cpp
   trunk/pingus/src/config_manager.cpp
   trunk/pingus/src/config_manager.hpp
   trunk/pingus/src/globals.cpp
   trunk/pingus/src/globals.hpp
   trunk/pingus/src/option_menu.cpp
   trunk/pingus/src/option_menu.hpp
   trunk/pingus/src/pingus_main.cpp
   trunk/pingus/src/pingus_options.hpp
   trunk/pingus/src/worldobjs/surface_background.cpp
Log:
Removed fast-mode

Modified: trunk/pingus/src/components/action_button.cpp
===================================================================
--- trunk/pingus/src/components/action_button.cpp       2008-07-07 15:18:47 UTC 
(rev 3721)
+++ trunk/pingus/src/components/action_button.cpp       2008-07-07 15:21:34 UTC 
(rev 3722)
@@ -101,8 +101,7 @@
     }
   else
     {
-      if (!fast_mode)
-        gc.draw(background, pos);
+      gc.draw(background, pos);
 
       sprite.set_frame(7);
       gc.draw(sprite, pos);
@@ -168,8 +167,7 @@
     }
   else
     {
-      if (!fast_mode)
-        gc.draw(background, pos);
+      gc.draw(background, pos);
     }
 
   gc.draw(surface, pos);
@@ -208,7 +206,6 @@
     }
   else
     {
-    if (!fast_mode)
       gc.draw(background, pos);
     }
 

Modified: trunk/pingus/src/components/button_panel.cpp
===================================================================
--- trunk/pingus/src/components/button_panel.cpp        2008-07-07 15:18:47 UTC 
(rev 3721)
+++ trunk/pingus/src/components/button_panel.cpp        2008-07-07 15:21:34 UTC 
(rev 3722)
@@ -90,13 +90,6 @@
 void
 ButtonPanel::draw(DrawingContext& gc)
 {
-  float alpha;
-
-  if (fast_mode)
-    alpha = 1.0;
-  else
-    alpha = 0.5;
-
   for(int i = 0; i < static_cast<int>(a_buttons.size()); ++i)
     {
       if (i == pressed_button)

Modified: trunk/pingus/src/components/pingus_counter.cpp
===================================================================
--- trunk/pingus/src/components/pingus_counter.cpp      2008-07-07 15:18:47 UTC 
(rev 3721)
+++ trunk/pingus/src/components/pingus_counter.cpp      2008-07-07 15:21:34 UTC 
(rev 3722)
@@ -38,8 +38,7 @@
 {
   char str[128];
 
-  if (!fast_mode)
-    gc.draw(background, Vector2i(gc.get_width()/2, 0));
+  gc.draw(background, Vector2i(gc.get_width()/2, 0));
 
   World* world = server->get_world();
 

Modified: trunk/pingus/src/config.cpp
===================================================================
--- trunk/pingus/src/config.cpp 2008-07-07 15:18:47 UTC (rev 3721)
+++ trunk/pingus/src/config.cpp 2008-07-07 15:21:34 UTC (rev 3722)
@@ -315,10 +315,6 @@
     {
       print_fps = str_to_bool(value);
     }
-  else if (valueid == "fast-mode")
-    {
-      fast_mode = str_to_bool(value);
-    }
   else if (valueid == "maintainer-mode")
     {
       maintainer_mode = str_to_bool(value);

Modified: trunk/pingus/src/config_manager.cpp
===================================================================
--- trunk/pingus/src/config_manager.cpp 2008-07-07 15:18:47 UTC (rev 3721)
+++ trunk/pingus/src/config_manager.cpp 2008-07-07 15:21:34 UTC (rev 3722)
@@ -127,19 +127,6 @@
 }
 
 void
-ConfigManager::set_fast_mode(bool v)
-{
-  if (maintainer_mode)
-    std::cout << "ConfigManager::set_fast_mode: " << v << std::endl;
-}
-
-bool
-ConfigManager::get_fast_mode()
-{
-  return false;
-}
-
-void
 ConfigManager::set_mouse_grab(bool v)
 {
   if (maintainer_mode)

Modified: trunk/pingus/src/config_manager.hpp
===================================================================
--- trunk/pingus/src/config_manager.hpp 2008-07-07 15:18:47 UTC (rev 3721)
+++ trunk/pingus/src/config_manager.hpp 2008-07-07 15:21:34 UTC (rev 3722)
@@ -56,10 +56,6 @@
   bool get_allow_resize();
   boost::signal<void(bool)> on_allow_reszie_change;
 
-  void set_fast_mode(bool);
-  bool get_fast_mode();
-  boost::signal<void(bool)> on_fast_mode_change;
-
   void set_mouse_grab(bool);
   bool get_mouse_grab();
   boost::signal<void(bool)> on_mouse_grab_change;

Modified: trunk/pingus/src/globals.cpp
===================================================================
--- trunk/pingus/src/globals.cpp        2008-07-07 15:18:47 UTC (rev 3721)
+++ trunk/pingus/src/globals.cpp        2008-07-07 15:21:34 UTC (rev 3722)
@@ -25,7 +25,6 @@
 bool        sound_enabled                   = true;
 bool        enable_demo_recording           = false;
 bool        play_demo                       = false;
-bool        fast_mode                       = false;
 int         fast_forward_time_scale         = 4;
 bool        maintainer_mode                 = false;
 std::string demo_file;

Modified: trunk/pingus/src/globals.hpp
===================================================================
--- trunk/pingus/src/globals.hpp        2008-07-07 15:18:47 UTC (rev 3721)
+++ trunk/pingus/src/globals.hpp        2008-07-07 15:21:34 UTC (rev 3722)
@@ -36,7 +36,6 @@
 extern bool        play_demo;                       ///< --play-demo
 
 extern bool        debug_actions;                   ///< --debug-actions
-extern bool        fast_mode;                       ///< --fast
 extern int         fast_forward_time_scale;         ///< how much faster the 
game runs in FF mode
 extern bool        maintainer_mode;                 ///< --maintainer-mode
 extern std::string demo_file;                       ///<

Modified: trunk/pingus/src/option_menu.cpp
===================================================================
--- trunk/pingus/src/option_menu.cpp    2008-07-07 15:18:47 UTC (rev 3721)
+++ trunk/pingus/src/option_menu.cpp    2008-07-07 15:21:34 UTC (rev 3722)
@@ -80,7 +80,6 @@
   swcursor_box      = new CheckBox(Rect());
   fullscreen_box    = new CheckBox(Rect());
   autoscroll_box    = new CheckBox(Rect());
-  fast_mode_box     = new CheckBox(Rect());
   mousegrab_box     = new CheckBox(Rect());
   printfps_box      = new CheckBox(Rect());
 
@@ -91,7 +90,6 @@
   swcursor_box->on_change.connect(boost::bind(&OptionMenu::on_swcursor_change, 
this, _1));
   
fullscreen_box->on_change.connect(boost::bind(&OptionMenu::on_fullscreen_change,
 this, _1));
   
autoscroll_box->on_change.connect(boost::bind(&OptionMenu::on_autoscroll_change,
 this, _1));
-  
fast_mode_box->on_change.connect(boost::bind(&OptionMenu::on_fastmode_change, 
this, _1));
   
mousegrab_box->on_change.connect(boost::bind(&OptionMenu::on_mousegrab_change, 
this, _1));
   printfps_box->on_change.connect(boost::bind(&OptionMenu::on_printfps_change, 
this, _1));
 
@@ -106,8 +104,6 @@
   add_item(_("Resolution:"),      resolution_box);
   add_item(_("Fullscreen:"),      fullscreen_box);
   add_item(_("Autoscrolling:"),   autoscroll_box);
-  add_item(_("Low Detail:"),      fast_mode_box);
-
   add_item(_("Master Volume:"),   master_volume_box);
   add_item(_("Sound Volume:"),    sound_volume_box);
   add_item(_("Music Volume:"),    music_volume_box);
@@ -130,9 +126,6 @@
 
   autoscroll_box->set_state(config_manager.get_autoscroll(), false);
   
C(config_manager.on_autoscroll_change.connect(boost::bind(&CheckBox::set_state, 
autoscroll_box, _1, false)));
-
-  fast_mode_box->set_state(config_manager.get_fast_mode(), false);
-  
C(config_manager.on_fast_mode_change.connect(boost::bind(&CheckBox::set_state, 
fast_mode_box, _1, false)));
 }
 
 void
@@ -237,12 +230,6 @@
 }
 
 void
-OptionMenu::on_fastmode_change(bool v)
-{
-  config_manager.set_fast_mode(v);
-}
-
-void
 OptionMenu::on_mousegrab_change(bool v)
 {
   config_manager.set_mouse_grab(v);

Modified: trunk/pingus/src/option_menu.hpp
===================================================================
--- trunk/pingus/src/option_menu.hpp    2008-07-07 15:18:47 UTC (rev 3721)
+++ trunk/pingus/src/option_menu.hpp    2008-07-07 15:21:34 UTC (rev 3722)
@@ -51,7 +51,6 @@
   CheckBox* fullscreen_box;
   CheckBox* swcursor_box;
   CheckBox* autoscroll_box;
-  CheckBox* fast_mode_box;
   CheckBox* mousegrab_box;
   CheckBox* printfps_box;
 

Modified: trunk/pingus/src/pingus_main.cpp
===================================================================
--- trunk/pingus/src/pingus_main.cpp    2008-07-07 15:18:47 UTC (rev 3721)
+++ trunk/pingus/src/pingus_main.cpp    2008-07-07 15:21:34 UTC (rev 3722)
@@ -231,9 +231,6 @@
 
   if (options.tile_size.is_set())
     tile_size = options.tile_size.get();
-
-  if (options.fast_mode.is_set())
-    fast_mode = options.fast_mode.get();
 }
 
 void
@@ -314,18 +311,7 @@
                  _("Set the desired game framerate (frames per second)"));
   argp.add_option(344, "tile-size", "INT",
                   _("Set the size of the map tiles (default: 32)"));
-  argp.add_option(332, "fast-mode", "",
-                  _("Disable some cpu intensive features"));
 
-  if (0)
-    {
-      argp.add_group(_("Demo playing and recording:"));
-      argp.add_option('p', "play-demo", "",
-                      _("Plays a demo session"));
-      argp.add_option('r', "disable-demo-recording", "",
-                      _("Record demos for each played level"));
-    }
-
   argp.parse_args(argc, argv);
   argp.set_help_indent(20);
 
@@ -415,11 +401,6 @@
             cmd_options.fullscreen.set(false);
             break;
 
-            // Starting weird number cmd_options... no idea if this is correct.
-          case 332:
-            cmd_options.fast_mode.set(true);
-            break;
-
           case 334: // --maintainer-mode
             cmd_options.maintainer_mode.set(true);
             maintainer_mode = true;

Modified: trunk/pingus/src/pingus_options.hpp
===================================================================
--- trunk/pingus/src/pingus_options.hpp 2008-07-07 15:18:47 UTC (rev 3721)
+++ trunk/pingus/src/pingus_options.hpp 2008-07-07 15:21:34 UTC (rev 3722)
@@ -90,7 +90,6 @@
   Value<int>  speed;
   Value<float> desiredfps;
   Value<int>  tile_size;
-  Value<bool> fast_mode;
 };
 
 #endif

Modified: trunk/pingus/src/worldobjs/surface_background.cpp
===================================================================
--- trunk/pingus/src/worldobjs/surface_background.cpp   2008-07-07 15:18:47 UTC 
(rev 3721)
+++ trunk/pingus/src/worldobjs/surface_background.cpp   2008-07-07 15:21:34 UTC 
(rev 3722)
@@ -129,44 +129,37 @@
   if (!bg_surface)
     return;
 
-  if (fast_mode)
+  if (render_preview)
     {
-      Display::clear();
+#if 0 // FIXME:
+      for(int y = 0; y < gc.get_height();  y += bg_surface.get_height())
+        for(int x = 0; x < gc.get_width(); x += bg_surface.get_width())
+          gc.color().draw(bg_surface, Vector3f(x, y));
+#endif
     }
   else
     {
-      if (render_preview)
-        {
-#if 0 // FIXME:
-          for(int y = 0; y < gc.get_height();  y += bg_surface.get_height())
-            for(int x = 0; x < gc.get_width(); x += bg_surface.get_width())
-              gc.color().draw(bg_surface, Vector3f(x, y));
-#endif
-        }
-      else
-        {
-          Vector3f offset = gc.color().world_to_screen(Vector3f(0,0));
+      Vector3f offset = gc.color().world_to_screen(Vector3f(0,0));
 
-          int start_x = static_cast<int>((offset.x * para_x) + scroll_ox);
-          int start_y = static_cast<int>((offset.y * para_y) + scroll_oy);
+      int start_x = static_cast<int>((offset.x * para_x) + scroll_ox);
+      int start_y = static_cast<int>((offset.y * para_y) + scroll_oy);
 
-          if (start_x > 0)
-            start_x = (start_x % bg_surface.get_width()) - 
bg_surface.get_width();
+      if (start_x > 0)
+        start_x = (start_x % bg_surface.get_width()) - bg_surface.get_width();
 
-          if (start_y > 0)
-            start_y = (start_y % bg_surface.get_height()) - 
bg_surface.get_height();
+      if (start_y > 0)
+        start_y = (start_y % bg_surface.get_height()) - 
bg_surface.get_height();
 
-          for(int y = start_y;
-              y < world->get_height();
-              y += bg_surface.get_height())
+      for(int y = start_y;
+          y < world->get_height();
+          y += bg_surface.get_height())
+        {
+          for(int x = start_x;
+              x < world->get_width();
+              x += bg_surface.get_width())
             {
-              for(int x = start_x;
-                  x < world->get_width();
-                  x += bg_surface.get_width())
-                {
-                  gc.color().draw(bg_surface, Vector3f(x - offset.x, 
-                                                       y - offset.y, pos.z));
-                }
+              gc.color().draw(bg_surface, Vector3f(x - offset.x, 
+                                                   y - offset.y, pos.z));
             }
         }
     }





reply via email to

[Prev in Thread] Current Thread [Next in Thread]