# HG changeset patch # User Paul Boddie # Date 1323553726 -3600 # Node ID 38b74d685867bf2a2f1e9b680b1fcb145b6eb0fc # Parent e4638955782815004f46b0a001552ca2c355e96a Moved the application of pixel intensity to the main program, implementing it as an array operation. diff -r e46389557828 -r 38b74d685867 main.py --- a/main.py Sat Dec 10 20:53:41 2011 +0100 +++ b/main.py Sat Dec 10 22:48:46 2011 +0100 @@ -9,6 +9,7 @@ def update_surface(surface_array, screen_array): surface_array[:] = screen_array + surface_array *= INTENSITY def mainloop(): while 1: diff -r e46389557828 -r 38b74d685867 ula.py --- a/ula.py Sat Dec 10 20:53:41 2011 +0100 +++ b/ula.py Sat Dec 10 22:48:46 2011 +0100 @@ -29,8 +29,7 @@ x = 0 while x < WIDTH: colour = ula.get_pixel_colour() - pixel = tuple(map(lambda x: x * INTENSITY, colour)) - screen[x][y] = pixel + screen[x][y] = colour x += 1 ula.hsync() y += 1