[pypy-svn] r60216 - pypy/trunk/pypy/lang/gameboy
tverwaes at codespeak.net
tverwaes at codespeak.net
Fri Nov 28 20:52:00 CET 2008
Author: tverwaes
Date: Fri Nov 28 20:51:58 2008
New Revision: 60216
Modified:
pypy/trunk/pypy/lang/gameboy/constants.py
pypy/trunk/pypy/lang/gameboy/video.py
Log:
another small bugfix. This time in the constants; as the colors in constants
are used by the palette. The values of the palette are then again used to
index in the COLOR_MAP in the gameboy_implementation.
Modified: pypy/trunk/pypy/lang/gameboy/constants.py
==============================================================================
--- pypy/trunk/pypy/lang/gameboy/constants.py (original)
+++ pypy/trunk/pypy/lang/gameboy/constants.py Fri Nov 28 20:51:58 2008
@@ -147,7 +147,9 @@
# LCD Color Palette
COLOR_MAP =[
- 0x9CB916, 0x8CAA14, 0x306430, 0x103F10
+ #0x9CB916, 0x8CAA14, 0x306430, 0x103F10
+ 0, 1, 2, 3 # These are indices in the COLOR_MAP provided by the
+ # implementation...
# 0xE0F8D0, 0x88C070, 0x386850, 0x081820
# 0xFFFFFF, 0xAAAAAA, 0x555555, 0x000000
]
Modified: pypy/trunk/pypy/lang/gameboy/video.py
==============================================================================
--- pypy/trunk/pypy/lang/gameboy/video.py (original)
+++ pypy/trunk/pypy/lang/gameboy/video.py Fri Nov 28 20:51:58 2008
@@ -638,7 +638,8 @@
offset = self.line_y * self.driver.get_width()
for x in range(SPRITE_SIZE, GAMEBOY_SCREEN_WIDTH+SPRITE_SIZE, 4):
for i in range(0,4):
- pixels[offset + i] = self.palette[self.line[x + i]]
+ value = self.palette[self.line[x + 1]]
+ pixels[offset + i] = value
offset += 4
def clear_pixels(self):
More information about the Pypy-commit
mailing list