Commits

illume committed 7bf7fcd

added a command line flag for using alpha.

Comments (0)

Files changed (1)

examples/testsprite.py

     i = sys.argv.index("-width")
     screen_dims[0] = int(sys.argv[i+1])
 
+if "-alpha" in sys.argv:
+    use_alpha = True
+else:
+    use_alpha = False
 
 print screen_dims
 
     else:
         sprite_surface.set_colorkey([0xFF, 0xFF, 0xFF], SRCCOLORKEY)
 
+    if use_alpha:
+        sprite_surface = sprite_surface.convert_alpha()
+    else:
+        sprite_surface = sprite_surface.convert()
 
-    sprite_surface = sprite_surface.convert()
     Thingy.images = [sprite_surface]
 
     if len(sys.argv) > 1: