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

tverwaes at codespeak.net tverwaes at codespeak.net
Wed Mar 4 22:41:55 CET 2009


Author: tverwaes
Date: Wed Mar  4 22:41:54 2009
New Revision: 62548

Modified:
   pypy/trunk/pypy/lang/gameboy/gameboy_implementation.py
   pypy/trunk/pypy/lang/gameboy/video_sprite.py
Log:
the background is supposed to automatically wrap around.


Modified: pypy/trunk/pypy/lang/gameboy/gameboy_implementation.py
==============================================================================
--- pypy/trunk/pypy/lang/gameboy/gameboy_implementation.py	(original)
+++ pypy/trunk/pypy/lang/gameboy/gameboy_implementation.py	Wed Mar  4 22:41:54 2009
@@ -9,6 +9,7 @@
 import time
 
 use_rsdl = True
+# use_rsdl = False
 if use_rsdl:
     from pypy.rlib.rsdl import RSDL, RSDL_helper
     from pypy.rpython.lltypesystem import lltype, rffi
@@ -118,6 +119,7 @@
             RSDL.UnlockSurface(self.screen)
             RSDL.Flip(self.screen)
         else:
+            print  '\x1b[H\x1b[2J'
             self.draw_ascii_pixels()
             
     def draw_pixels(self):

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 22:41:54 2009
@@ -287,10 +287,9 @@
             self.video.line[x] = 0x00
     
     def draw_line(self, line_y):
-        y = self.scroll_y + line_y
+        y = (self.scroll_y + line_y) & 0xFF
         x = self.scroll_x
 
         tile_map = self.get_tile_map_space()
         tile_group = tile_map[y >> 3]
-        # print "Background"
         self.video.draw_tiles(8 - (x % 8), tile_group, y, x >> 3)



More information about the Pypy-commit mailing list