1.1 --- a/main.py Sun Dec 18 18:56:39 2011 +0100
1.2 +++ b/main.py Sun Dec 18 18:59:08 2011 +0100
1.3 @@ -19,7 +19,8 @@
1.4 """
1.5
1.6 surface = pygame.Surface((MAX_WIDTH, MAX_HEIGHT), 0, screen)
1.7 - a = pygame.surfarray.pixels3d(surface)
1.8 + sa = pygame.surfarray.pixels3d(surface)
1.9 + a = sa.transpose(1, 0, 2)
1.10
1.11 # Copy the array to a surface and apply a pixel intensity.
1.12
1.13 @@ -27,7 +28,7 @@
1.14 a[:] = screen_array
1.15 a *= INTENSITY
1.16 finally:
1.17 - del a
1.18 + del a, sa
1.19
1.20 # Scale the surface to the dimensions of the host's screen and copy the
1.21 # result to the host's screen.
1.22 @@ -46,7 +47,6 @@
1.23 screen = pygame.display.set_mode((WIDTH, HEIGHT), 0)
1.24
1.25 ula = get_ula()
1.26 - ula_screen = get_screen()
1.27
1.28 # Test MODE 2.
1.29
1.30 @@ -54,12 +54,12 @@
1.31
1.32 ula.fill(0x3000, 0x5800 - 320, encode((1, 6), 4))
1.33 ula.fill(0x5800 - 320, 0x8000, encode((2, 7), 4))
1.34 - update(ula_screen, ula)
1.35 + ula_screen = update(ula)
1.36 update_screen(screen, ula_screen)
1.37 mainloop()
1.38
1.39 ula.screen_start = 0x3000 + 2
1.40 - update(ula_screen, ula)
1.41 + ula_screen = update(ula)
1.42 update_screen(screen, ula_screen)
1.43 mainloop()
1.44
1.45 @@ -69,12 +69,12 @@
1.46
1.47 ula.fill(0x6000, 0x6f00 + 160, encode((1, 0, 1, 1, 0, 0, 1, 1), 1))
1.48 ula.fill(0x6f00 + 160, 0x7f40, encode((1, 0, 1, 0, 1, 0, 1, 0), 1))
1.49 - update(ula_screen, ula)
1.50 + ula_screen = update(ula)
1.51 update_screen(screen, ula_screen)
1.52 mainloop()
1.53
1.54 ula.screen_start = 0x6f00 + 160
1.55 - update(ula_screen, ula)
1.56 + ula_screen = update(ula)
1.57 update_screen(screen, ula_screen)
1.58 mainloop()
1.59