[pypy-svn] r62528 - pypy/trunk/pypy/lang/gameboy

tverwaes at codespeak.net tverwaes at codespeak.net
Wed Mar 4 15:47:52 CET 2009


Author: tverwaes
Date: Wed Mar  4 15:47:52 2009
New Revision: 62528

Modified:
   pypy/trunk/pypy/lang/gameboy/video.py
   pypy/trunk/pypy/lang/gameboy/video_sprite.py
Log:
cleanup


Modified: pypy/trunk/pypy/lang/gameboy/video.py
==============================================================================
--- pypy/trunk/pypy/lang/gameboy/video.py	(original)
+++ pypy/trunk/pypy/lang/gameboy/video.py	Wed Mar  4 15:47:52 2009
@@ -553,7 +553,7 @@
         return self.width
     
     def get_height(self):
-        return selg.height
+        return self.height
     
     def get_pixels(self):
         return self.pixels

Modified: pypy/trunk/pypy/lang/gameboy/video_sprite.py
==============================================================================
--- pypy/trunk/pypy/lang/gameboy/video_sprite.py	(original)
+++ pypy/trunk/pypy/lang/gameboy/video_sprite.py	Wed Mar  4 15:47:52 2009
@@ -141,15 +141,9 @@
         else:
             return SPRITE_SIZE
          
-    def get_tile_size(self):
-         if self.big_size:
-            return 15
-         else:
-            return 7
-        
     def intersects_current_line(self):
         y = self.current_line_y()
-        return y >= 0 and y <= self.get_tile_size()
+        return 0 <= y and y < self.get_height()
     
     def is_shown_on_current_line(self):
         return not self.hidden and self.intersects_current_line()
@@ -166,7 +160,7 @@
     def get_draw_y(self):
         y = self.current_line_y()
         if self.y_flipped:
-            y = self.get_tile_size() - y
+            y = self.get_height() - 1 - y
         return y
                 
     def draw(self, lastx):



More information about the Pypy-commit mailing list