pingus-devel
[Top][All Lists]
Advanced

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

Two more Pingus patches


From: Jason Green
Subject: Two more Pingus patches
Date: Thu, 29 Sep 2005 08:58:36 -0400
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.11) Gecko/20050728

Here are 2 more patches courtesy of Tomáš Bláha from the wiki.

exit.diff fixes the issue with the Pingu not being able to enter the "Exit cave". This made every level in the ./tutorial folder playable in 0.7.0.

surface_background.diff fixes the issue (in Windows at least) where the left side of the screen (about 100 pixels or so) doesn't redraw automatically every time. It was really choppy until I added this patch.
Index: surface_background.cxx
===================================================================
--- surface_background.cxx      (revision 2448)
+++ surface_background.cxx      (working copy)
@@ -195,12 +195,12 @@
           start_x = static_cast<int>((x_of * para_x) + scroll_ox);
           start_y = static_cast<int>((y_of * para_y) + scroll_oy);
 
-          if (start_x >= 0)
+          while (start_x >= 0)
             start_x = start_x - bg_surface.get_width();
 
-          if (start_y >= 0)
+          while (start_y >= 0)
             start_y -= bg_surface.get_height();
-          else if (start_y < 0 - static_cast<int>(bg_surface.get_height()))
+          while (start_y < 0 - static_cast<int>(bg_surface.get_height()))
             start_y += bg_surface.get_height();
 
           for(int y = start_y;
Index: exit.cxx
===================================================================
--- exit.cxx    (revision 2448)
+++ exit.cxx    (working copy)
@@ -93,7 +93,7 @@
   for (PinguIter pingu = holder->begin(); pingu != holder->end(); ++pingu)
     {
       if (   (*pingu)->get_x() > pos.x - 1 && (*pingu)->get_x() < pos.x + 1
-         && (*pingu)->get_y() > pos.y - 5 && (*pingu)->get_y() < pos.y + 1)
+         && (*pingu)->get_y() > pos.y - 5 && (*pingu)->get_y() < pos.y + 2)
        {
          if (   (*pingu)->get_status() != PS_EXITED
              && (*pingu)->get_status() != PS_DEAD

reply via email to

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