On Sun, Feb 05, 2006 at 07:57:55PM -0700, Nathan wrote:
> Pygame 1.6???  That was released in 2003!  Hmm...well, if two distros
> are using that old of a version, there must be other distros with the
> same problem.  That explains why it crashed saying that one of the
> methods on a pygame object didn't exist.
> 
> It's crashing trying to call the Surface's built-in copy method, 
> Would you mind trying the following change and letting me know if it
> works?
> 
> In display.py, make the following changes:
> line 19:  "import os"    to    "import os, copy"
> line 120ish:  "msg_surface = g_msg_bg.copy()"    to    "msg_surface =
> copy.copy(g_msg_bg)"
> 
> That still works on my system, so if that makes it work for you, I'll
> make the change permanent.

That change doesn't fix it on my system using pygame1.6, but the
attached patch does fix that problem and the next one that appears after
fixing the surface copy.

-- 
Byron Clark
diff -Naur checkersbynathan1_0rc1/display.py 
checkersbynathan1_0rc1.pygame1.6/display.py
--- checkersbynathan1_0rc1/display.py   2006-02-03 21:51:07.000000000 -0700
+++ checkersbynathan1_0rc1.pygame1.6/display.py 2006-02-05 21:05:45.732946504 
-0700
@@ -117,10 +117,11 @@
 
 def message_surface(text):
   thefont = font.Font(None, MSG_HEIGHT)
-  msg_surface = g_msg_bg.copy()
+  msg_surface = g_msg_bg.convert()
   btext = thefont.render(text, 1, [0,0,0])
   ftext = thefont.render(text, 1, [225,225,225])
-  ftextpos = ftext.get_rect(centerx=msg_surface.get_width()/2, 
centery=(msg_surface.get_height()/2 + 1))
+  ftextpos = ftext.get_rect()
+  ftextpos.move(msg_surface.get_width()/2, msg_surface.get_height()/2 + 1)
   msg_surface.blit(btext, (ftextpos[0]+2,ftextpos[1]+2))
   msg_surface.blit(ftext, ftextpos)
   return msg_surface

Attachment: signature.asc
Description: Digital signature

_______________________________________________
Ldsoss mailing list
[email protected]
http://lists.ldsoss.org/mailman/listinfo/ldsoss

Reply via email to