pingus-cvs
[Top][All Lists]
Advanced

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

[Pingus-CVS] r2668 - in branches/pingus_sdl: . data/data src


From: grumbel at BerliOS
Subject: [Pingus-CVS] r2668 - in branches/pingus_sdl: . data/data src
Date: Tue, 16 Jan 2007 07:13:57 +0100

Author: grumbel
Date: 2007-01-16 07:13:55 +0100 (Tue, 16 Jan 2007)
New Revision: 2668

Modified:
   branches/pingus_sdl/data/data/core.res
   branches/pingus_sdl/src/SConscript
   branches/pingus_sdl/src/credits.cxx
   branches/pingus_sdl/src/credits.hxx
   branches/pingus_sdl/src/pingus_main.cxx
   branches/pingus_sdl/xml2sexpr.rb
Log:
- fixed credit screen

Modified: branches/pingus_sdl/data/data/core.res
===================================================================
--- branches/pingus_sdl/data/data/core.res      2007-01-16 03:31:58 UTC (rev 
2667)
+++ branches/pingus_sdl/data/data/core.res      2007-01-16 06:13:55 UTC (rev 
2668)
@@ -342,6 +342,7 @@
 
       (sprite
         (name "creditpingu")
+        (origin "center")
         (image-file "../images/core/misc/creditpingu.png"))
 
       (sprite

Modified: branches/pingus_sdl/src/SConscript
===================================================================
--- branches/pingus_sdl/src/SConscript  2007-01-16 03:31:58 UTC (rev 2667)
+++ branches/pingus_sdl/src/SConscript  2007-01-16 06:13:55 UTC (rev 2668)
@@ -108,7 +108,7 @@
 'components/time_display.cxx', 
 'config.cxx', 
 'console.cxx', 
-# 'credits.cxx', 
+'credits.cxx', 
 'debug.cxx', 
 'debug_stream.cxx', 
 # 'demo_player.cxx', 

Modified: branches/pingus_sdl/src/credits.cxx
===================================================================
--- branches/pingus_sdl/src/credits.cxx 2007-01-16 03:31:58 UTC (rev 2667)
+++ branches/pingus_sdl/src/credits.cxx 2007-01-16 06:13:55 UTC (rev 2668)
@@ -18,8 +18,6 @@
 //  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 
 #include <iostream>
-#include <ClanLib/Display/display.h>
-#include <ClanLib/Display/font.h>
 #include "gui/screen_manager.hxx"
 #include "gui/surface_button.hxx"
 #include "gui/gui_manager.hxx"
@@ -30,6 +28,7 @@
 #include "credits.hxx"
 #include "fonts.hxx"
 #include "gettext.h"
+#include "gui/display.hxx"
 
 class CreditsOkButton
   : public GUI::SurfaceButton
@@ -38,8 +37,8 @@
   Credits* parent;
 public:
   CreditsOkButton(Credits* p)
-    : GUI::SurfaceButton(CL_Display::get_width()/2 + 225,
-                         CL_Display::get_height()/2 + 125,
+    : GUI::SurfaceButton(Display::get_width()/2 + 225,
+                         Display::get_height()/2 + 125,
                          ResDescriptor("core/start/ok"),
                          ResDescriptor("core/start/ok_clicked"),
                          ResDescriptor("core/start/ok_hover")),
@@ -69,8 +68,8 @@
 
   gui_manager->add(new CreditsOkButton(this));
 
-  background.set_alignment(origin_center);
-  pingu.set_alignment(origin_center);
+  ////background.set_alignment(origin_center);
+  ////pingu.set_alignment(origin_center);
 
   font       = Fonts::chalk_normal;
   font_small = Fonts::chalk_large;
@@ -210,7 +209,7 @@
   credits.push_back(_("_Thank you for"));
   credits.push_back(_("_playing!"));
 
-  end_offset = -(float)CL_Display::get_height()/2 - 50; // screen height + 
grace time
+  end_offset = -(float)Display::get_height()/2 - 50; // screen height + grace 
time
   for (std::vector<std::string>::iterator i = credits.begin(); i != 
credits.end(); ++i)
     {
       switch ((*i)[0])
@@ -260,19 +259,19 @@
   float y;
   float yof;
 
-  x = (float)CL_Display::get_width()/2;
+  x = (float)Display::get_width()/2;
   y = offset;
 
-  gc.draw(background, Vector(gc.get_width()/2, gc.get_height()/2));
-  gc.draw(pingu, Vector(gc.get_width()/2, gc.get_height()/2 - 20));
+  gc.draw(background, Vector3f(gc.get_width()/2, gc.get_height()/2));
+  gc.draw(pingu, Vector3f(gc.get_width()/2, gc.get_height()/2 - 20));
   
   gc.print_right(Fonts::chalk_normal,
-                static_cast<float>(CL_Display::get_width()/2 + 275),
-                static_cast<float>(CL_Display::get_height()/2 + 110),
+                static_cast<float>(Display::get_width()/2 + 275),
+                static_cast<float>(Display::get_height()/2 + 110),
                                                                _("Skip"));
 
-  CL_Display::push_cliprect(CL_Rect(0, static_cast<int>(gc.get_height()/2-225),
-                                    600, 
static_cast<int>(gc.get_height()/2+200)));
+  ////Display::push_cliprect(Rect(0, static_cast<int>(gc.get_height()/2-225),
+  ////                        600, static_cast<int>(gc.get_height()/2+200)));
   yof = 0;
 
   for (std::vector<std::string>::iterator i = credits.begin(); i != 
credits.end(); ++i)
@@ -295,13 +294,13 @@
          break;
        }
     }
-  CL_Display::pop_cliprect();
+  ////Display::pop_cliprect();
 }
 
 void
 Credits::on_startup ()
 {
-  offset = (float)CL_Display::get_height() - 50;
+  offset = (float)Display::get_height() - 50;
   //PingusSound::play_music("pingus-5.it");
 }
 

Modified: branches/pingus_sdl/src/credits.hxx
===================================================================
--- branches/pingus_sdl/src/credits.hxx 2007-01-16 03:31:58 UTC (rev 2667)
+++ branches/pingus_sdl/src/credits.hxx 2007-01-16 06:13:55 UTC (rev 2668)
@@ -22,23 +22,21 @@
 
 #include <string>
 #include <vector>
-#include <ClanLib/Display/surface.h>
 #include "gui/gui_screen.hxx"
+#include "font.hpp"
+#include "sprite.hpp"
 
-class CL_Font;
-
-
 class Credits : public GUIScreen
 {
 private:
   static Credits* instance_;
 
   bool fast_scrolling;
-  CL_Sprite background;
-  CL_Sprite pingu;
+  Sprite background;
+  Sprite pingu;
 
-  CL_Font    font;
-  CL_Font    font_small;
+  Font    font;
+  Font    font_small;
 
   bool is_init;
 

Modified: branches/pingus_sdl/src/pingus_main.cxx
===================================================================
--- branches/pingus_sdl/src/pingus_main.cxx     2007-01-16 03:31:58 UTC (rev 
2667)
+++ branches/pingus_sdl/src/pingus_main.cxx     2007-01-16 06:13:55 UTC (rev 
2668)
@@ -72,7 +72,7 @@
 #include "pingus_menu_manager.hxx"
 #include "resource.hxx"
 // #include "pingu_action_factory.hxx"
-// #include "credits.hxx"
+#include "credits.hxx"
 #include "sound/sound.hxx"
 #include "worldmap/manager.hxx"
 #include "cheat.hxx"
@@ -265,7 +265,7 @@
                   _("Disable some cpu intensive features"));
   argp.add_option(353, "min-cpu-usage", "",
                   _("Reduces the CPU usage by issuing sleep()"));
-  argp.add_option(359, "show-credits", "",
+  argp.add_option(359, "credits", "",
                   _("Shows the credits"));
 
   argp.add_group(_("Demo playing and recording:"));
@@ -301,7 +301,7 @@
           worldmapfile = argp.get_argument();
           break;
 
-        case 359: // --worldmap
+        case 359: // --credits
           show_credits = true;
           break;
             
@@ -716,7 +716,7 @@
     }
   else if (show_credits)
     {
-      //ScreenManager::instance()->push_screen(Credits::instance(), false);
+      ScreenManager::instance()->push_screen(Credits::instance(), false);
     }
   else if (!levelfile.empty ()) 
     {

Modified: branches/pingus_sdl/xml2sexpr.rb
===================================================================
--- branches/pingus_sdl/xml2sexpr.rb    2007-01-16 03:31:58 UTC (rev 2667)
+++ branches/pingus_sdl/xml2sexpr.rb    2007-01-16 06:13:55 UTC (rev 2668)
@@ -110,7 +110,7 @@
    [/surface\/auto-uncover$/, :integer],
   ]
 
-$typespec = $typespec_worldmap + $typespec_generic
+$typespec = $typespec_level + $typespec_generic
 
 def get_type(section)
   $typespec.each{|pair|





reply via email to

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