pingus-cvs
[Top][All Lists]
Advanced

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

[Pingus-CVS] CVS: Games/Pingus/src credits.cxx,1.17,1.18 credits.hxx,1.


From: grumbel
Subject: [Pingus-CVS] CVS: Games/Pingus/src credits.cxx,1.17,1.18 credits.hxx,1.11,1.12 pingus_main.cxx,1.67,1.68 pingus_main.hxx,1.10,1.11
Date: 9 Apr 2003 23:35:30 -0000

Update of /var/lib/cvs/Games/Pingus/src
In directory dark:/tmp/cvs-serv24187/src

Modified Files:
        credits.cxx credits.hxx pingus_main.cxx pingus_main.hxx 
Log Message:
updated credits screen and made it fit to the rest of the game

Index: credits.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/credits.cxx,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- credits.cxx 19 Feb 2003 11:33:00 -0000      1.17
+++ credits.cxx 9 Apr 2003 23:35:28 -0000       1.18
@@ -24,6 +24,7 @@
 #include "sound/sound.hxx"
 #include "pingus_resource.hxx"
 #include "credits.hxx"
+#include "fonts.hxx"
 #include "my_gettext.hxx"
 
 Credits* Credits::instance_ = 0;
@@ -31,54 +32,136 @@
 Credits::Credits()
 {
   fast_scrolling = false;
-  surface = PingusResource::load_surface("Game/pingubw", "game");
-  font = PingusResource::load_font("Fonts/pingus","fonts");
-  font_small = PingusResource::load_font("Fonts/pingus_small","fonts");
+  background = PingusResource::load_surface("menu/startscreenbg", "core");
+  pingu = PingusResource::load_surface("misc/creditpingu", "core");
+
+  font       = Fonts::chalk_normal;
+  font_small = Fonts::chalk_large;
 
   // The credits vector holds the strings to display. The first
   // character of each string is a special character, which indicates
   // the size of the font or other special stuff. "-" means large
   // font, "_" is a small font and "n" means a newline.
 
-  credits.push_back(_("_If I forgot somebody in this"));
-  credits.push_back(_("_list, just drop me a line and"));
-  credits.push_back(_("_I'll fix this."));
-  credits.push_back(_("_Last Updated: 2000/06/27"));
-  credits.push_back(_("n"));
+  credits.push_back(_("-Idea"));
+  credits.push_back("_Ingo Ruhnke");
+  credits.push_back("n");
 
-  credits.push_back(_("-Programming"));
+  credits.push_back(_("-Maintaining"));
   credits.push_back("_Ingo Ruhnke");
-  credits.push_back("_Michael K\"aser");
-  credits.push_back("_Peter Todd");
+  credits.push_back("n");
+
+  credits.push_back(_("-Programming"));
   credits.push_back("_David Philippi");
+  credits.push_back("_Gervase Lam");
+  credits.push_back("_Ingo Ruhnke");
+  credits.push_back("n");
+
+  credits.push_back(_("-Porting (Win32)"));
+  credits.push_back("_Alberto Curro");
+  credits.push_back("_Björn Christoph Fischer");
+  credits.push_back("_Kenneth Gangstø");
+  credits.push_back("_Michael KŽäser");
+  credits.push_back("_Neil Mitchell");
   credits.push_back("n");
 
   credits.push_back(_("-Gfx"));
-  credits.push_back("_Stefan Stiasny");
   credits.push_back("_Alan Tennent");
   credits.push_back("_Craig Timpany");
+  credits.push_back("_Ingo Ruhnke");
   credits.push_back("_Joel Fauche");
+  credits.push_back("_Mark Collinson");
   credits.push_back("_Michael Mestre");
+  credits.push_back("_Stefan Stiasny");
+  credits.push_back("_Tom Flavel");
   credits.push_back("n");
 
   credits.push_back(_("-Music"));
   credits.push_back("_H. Matthew Smith"); 
   credits.push_back("_Joseph Toscano");
+  credits.push_back("_Yuri Sucupira");
+  credits.push_back("n");
+
+  credits.push_back(_("-Level Design"));
+  credits.push_back("_Craig Timpany");
+  credits.push_back("_Ingo Ruhnke");
+  credits.push_back("n");
+
+  credits.push_back(_("-Story"));
+  credits.push_back("_Ingo Ruhnke");
+  credits.push_back("n");
+
+  credits.push_back(_("-Translation (german)"));
+  credits.push_back("_David Philippi");
+  credits.push_back("_Ingo Ruhnke");
   credits.push_back("n");
 
   credits.push_back(_("-Special"));
   credits.push_back(_("-Thanks to"));
-  credits.push_back("_Jules Bean");
-  credits.push_back("_Kenneth Gangstø");
+  credits.push_back("_Bernhard Trummer");
+  credits.push_back("_Cagri Coltekin");
+  credits.push_back("_David Fauthoux");
+  credits.push_back("_David Flores");
+  credits.push_back("_David M. Turner");
+  credits.push_back("_Felix Natter");
+  credits.push_back("_Giray Devlet ");
+  credits.push_back("_Giuseppe D'Aqui");
+  credits.push_back("_Henri Manson");
+  credits.push_back("_Jens Henrik Goebbert");
   credits.push_back("_Johnny Taporg");
-  credits.push_back("_Werner Steiner");
-  credits.push_back("_Kenneth Gangstø");
+  credits.push_back("_Jules Bean");
+  credits.push_back("_Keir Fraser");
+  credits.push_back("_Magnus Norddahl");
+  credits.push_back("_Mattias Andersson");
+  credits.push_back("_Michael Wand");
+  credits.push_back("_Peter Todd");
+  credits.push_back("_Richard Stallman");
+  credits.push_back("_Rob Gietema");
+  credits.push_back("_Robert Wittams");
+  credits.push_back("_Robin Hogan");
+  credits.push_back("_Shigeru Miyamoto");
+  credits.push_back("_Stefan Ruhnke");
+  credits.push_back("_Till Hellweg");
   credits.push_back("_Tuomas (Tigert) Kuosmanen");
-  credits.push_back("_Keir Fraser");  
+  credits.push_back("_Werner Steiner");
+  credits.push_back("n");
+  credits.push_back("n");
+  credits.push_back("n");
+  credits.push_back("n");
+  credits.push_back("n");
 
+  credits.push_back(_("_And a very Special Thanks"));
+  credits.push_back(_("_to all the people who"));
+  credits.push_back(_("_contribute to"));
+  credits.push_back(_("_Free Software!"));
+  credits.push_back("n");
+  credits.push_back("n");
+  credits.push_back("n");
+  credits.push_back("n");
   credits.push_back("n");
+  credits.push_back(_("_Thank you for"));
+  credits.push_back(_("_playing!"));
 
-  credits.push_back("-### END ###");
+  end_offset = -350; // screen height + grace time 
+  for (std::vector<std::string>::iterator i = credits.begin(); i != 
credits.end(); ++i)
+    {
+      switch ((*i)[0])
+       {
+       case '-':
+         end_offset += font->get_height() + 5;
+         break;
+       case '_':
+         end_offset += font_small->get_height() + 5;
+         break;
+       case 'n':
+         end_offset += 50;
+         break;
+       default:
+         std::cout << "Credits: Syntax error: Unknown format: '" << (*i)[0] << 
"'" << std::endl;
+         break;
+       }
+    }
+  end_offset = -end_offset;
 }
 
 Credits::~Credits ()
@@ -88,36 +171,39 @@
 void 
 Credits::update (float delta)
 {
-  if (fast_scrolling)
-    offset -= 450.0f * delta;
+  if (offset < end_offset)
+    {
+      //ScreenManager::instance()->pop_screen ();
+    }
   else
-    offset -= 35.0f * delta;
-
-  if (offset < -1200.0f)
-    ScreenManager::instance()->pop_screen ();
+    {
+      if (fast_scrolling)
+        offset -= 450.0f * delta;
+      else
+        offset -= 35.0f * delta;
+    }
 }
 
 void 
 Credits::draw_background (GraphicContext& gc)
 {
-  UNUSED_ARG(gc);
-
   int x;
   int y;
   int yof;
 
-  x = CL_Display::get_width() * 3 / 4;
+  x = CL_Display::get_width()/2;
   y = int(offset);
 
-  CL_Display::clear_display(1.0, 1.0, 1.0);
-      
-  surface.put_screen((CL_Display::get_width() / 4) - (surface.get_width() / 2),
-                    (CL_Display::get_height() / 2) - (surface.get_height() / 
2));
+  gc.draw(background, 0, 0);
+  
+  gc.draw(pingu, (gc.get_width() / 2) - (pingu.get_width() / 2),
+          (gc.get_height() / 2) - (pingu.get_height() / 2) - 20);
 
-  CL_Display::fill_rect(CL_Display::get_width() / 2, 0,
+  /*CL_Display::fill_rect(CL_Display::get_width() / 2, 0,
                        CL_Display::get_width(), CL_Display::get_height(),
-                       0.0, 0.0, 0.0, 1.0);
+                       0.0, 0.0, 0.0, 1.0);*/
 
+  CL_Display::push_clip_rect(CL_ClipRect(0, 75, 600, 500));
   yof = 0;
   for (std::vector<std::string>::iterator i = credits.begin(); i != 
credits.end(); ++i)
     {
@@ -139,6 +225,7 @@
          break;
        }
     }
+  CL_Display::pop_clip_rect();
 }
 
 void

Index: credits.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/credits.hxx,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- credits.hxx 19 Feb 2003 09:50:35 -0000      1.11
+++ credits.hxx 9 Apr 2003 23:35:28 -0000       1.12
@@ -34,12 +34,15 @@
   static Credits* instance_;
 
   bool fast_scrolling;
-  CL_Surface surface;
+  CL_Surface background;
+  CL_Surface pingu;
+
   CL_Font*    font;
   CL_Font*    font_small;
 
   bool is_init;
 
+  float end_offset;
   float offset;
 
   /** The string's which are shown in the scrolling text, the first

Index: pingus_main.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/pingus_main.cxx,v
retrieving revision 1.67
retrieving revision 1.68
diff -u -d -r1.67 -r1.68
--- pingus_main.cxx     9 Apr 2003 21:57:24 -0000       1.67
+++ pingus_main.cxx     9 Apr 2003 23:35:28 -0000       1.68
@@ -136,6 +136,7 @@
 
 PingusMain::PingusMain()
 {
+  show_credits = false;
 }
 
 PingusMain::~PingusMain()
@@ -212,7 +213,8 @@
       {"speed",             required_argument, 0, 't'},
       {"datadir",           required_argument, 0, 'd'},
       {"level",             required_argument, 0, 'l'},
-      {"worldmap",          required_argument, 0, 'w'},
+      {"worldmap",          required_argument, 0, 158},
+      {"credits",           no_argument,       0, 159},
       {"help",              no_argument,       0, 'h'},
       {"version",           no_argument,       0, 'V'},
       {"verbose",           required_argument, 0, 'v'},
@@ -221,8 +223,8 @@
       {"geometry",          required_argument, 0, 'g'},
       {"editor",            no_argument,       0, 'e'},
       {"quick-play",        no_argument,       0, 'q'},
-      {"enable-fullscreen", no_argument,       0, 'f'},
-      {"disable-fullscreen",no_argument,       0, 'F'},
+      {"fullscreen",        no_argument,       0, 'f'},
+      {"window",            no_argument,       0, 'w'},
       {"disable-swcursor",  no_argument,       0, 145},
       {"enable-swcursor",   no_argument,       0, 146},
       {"disable-action-help",no_argument,      0, 156},
@@ -267,10 +269,14 @@
       print_fps = true;
       if (verbose) std::cout << "PingusMain:check_args: Printing fps enabled" 
<< std::endl;
       break;
-    case 'w': // -w, --worldmap
+    case 158: // --worldmap
       worldmapfile = optarg;
       break;
 
+    case 159: // --worldmap
+      show_credits = true;
+      break;
+
     case 'l': // -l, --level
       {
        // FIXME: Quick hack to get an absolute path
@@ -376,11 +382,11 @@
       std::cout << "Pingus: Verbose level is " << verbose << std::endl;
       break;
 
-    case 'f': // --enable-fullscreen
+    case 'f': // --fullscreen
       fullscreen_enabled = true;
       break;
       
-    case 'F': // --disable-fullscreen
+    case 'w': // --window
       fullscreen_enabled = false;
       break;
 
@@ -520,8 +526,8 @@
                 << std::endl;
 #endif
       std::cout <<
-       _("   -F, --disable-fullscreen Disable Fullscreen (default)\n"
-          "   -f, --enable-fullscreen  Enable Fullscreen\n"
+       _("   -w, --window             Start in Window Mode (default)\n"
+          "   -f, --fullscreen         Start in Fullscreen\n"
           "   -d, --datadir PATH       Set the path to load the data files to 
`path'\n"
           "   --use-datafile           Use the pre-compiled datafile 
(default)\n"
           "   --use-scriptfile         Use the scriptfile and read all data 
from files\n"
@@ -529,9 +535,7 @@
           "   -v, --verbose            Print some more messages to stdout, can 
be set\n"
           "                            multible times to increase verbosity\n"
           "   -V, --version            Prints version number and exit\n"
-          //   "   --fs-preload             Preload all Levelpreviews\n"a
           "   --fast-mode              Disable some cpu intensive features\n"
-          //   "   --disable-previews       Disables all level preview in the 
level selector\n"
           "   -e, --editor             Launch the Level editor 
(experimental)\n"
           "   --disable-auto-scrolling Disable automatic scrolling\n"
           "   --disable-swcursor       Disable software cursor, use hw cursor 
instead\n"
@@ -726,6 +730,10 @@
   if (show_input_debug_screen) // show a debug screen
     {
       ScreenManager::instance()->push_screen(new InputDebugScreen (), true);
+    }
+  else if (show_credits)
+    {
+      ScreenManager::instance()->push_screen(Credits::instance(), false);
     }
   else if (!levelfile.empty ()) // start editor or a game_session
     {

Index: pingus_main.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/pingus_main.hxx,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- pingus_main.hxx     3 Apr 2003 17:03:24 -0000       1.10
+++ pingus_main.hxx     9 Apr 2003 23:35:28 -0000       1.11
@@ -31,6 +31,7 @@
 {
 private:
   bool    no_config_file;
+  bool    show_credits;
   /// the name of the exe: argv[0]
   std::string executable_name;
   std::string levelfile;





reply via email to

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