Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/DrawableObjectTests
diff options
context:
space:
mode:
authordavesilver <nibor123@gmail.com>2010-07-21 21:05:40 (GMT)
committer davesilver <nibor123@gmail.com>2010-07-21 21:05:40 (GMT)
commitf5353159164d5c9984d128f8143e96a6cf3ad3a8 (patch)
tree6aec077e743eb7d705caa75d0b5463d02b234008 /DrawableObjectTests
parent076be3352c28f28b6b16d818ff38eb6917e8f71a (diff)
Editing Sprite tests
Diffstat (limited to 'DrawableObjectTests')
-rw-r--r--DrawableObjectTests/renderupdates.py36
1 files changed, 34 insertions, 2 deletions
diff --git a/DrawableObjectTests/renderupdates.py b/DrawableObjectTests/renderupdates.py
index a54fa00..e3a0acc 100644
--- a/DrawableObjectTests/renderupdates.py
+++ b/DrawableObjectTests/renderupdates.py
@@ -5,6 +5,8 @@ from time import time
pygame.init()
boxes = pygame.sprite.RenderUpdates()
+boxesTwo = pygame.sprite.RenderUpdates()
+boxesThree = pygame.sprite.RenderUpdates()
switch1 = [
pygame.image.load("%sa1/1%s"%("IndividualFrames/bmp16/",".bmp")),
@@ -18,7 +20,33 @@ switch1 = [
pygame.image.load("%sa1/9%s"%("IndividualFrames/bmp16/",".bmp"))
]
-boxes.add(UpDownBox(switch1, (60, 60)))
+switch2 = [
+ pygame.image.load("%sa1/1%s"%("IndividualFrames/bmp16/",".bmp")),
+ pygame.image.load("%sa1/2%s"%("IndividualFrames/bmp16/",".bmp")),
+ pygame.image.load("%sa1/3%s"%("IndividualFrames/bmp16/",".bmp")),
+ pygame.image.load("%sa1/4%s"%("IndividualFrames/bmp16/",".bmp")),
+ pygame.image.load("%sa1/5%s"%("IndividualFrames/bmp16/",".bmp")),
+ pygame.image.load("%sa1/6%s"%("IndividualFrames/bmp16/",".bmp")),
+ pygame.image.load("%sa1/7%s"%("IndividualFrames/bmp16/",".bmp")),
+ pygame.image.load("%sa1/8%s"%("IndividualFrames/bmp16/",".bmp")),
+ pygame.image.load("%sa1/9%s"%("IndividualFrames/bmp16/",".bmp"))
+]
+
+switch3 = [
+ pygame.image.load("%sa1/1%s"%("IndividualFrames/bmp16/",".bmp")),
+ pygame.image.load("%sa1/2%s"%("IndividualFrames/bmp16/",".bmp")),
+ pygame.image.load("%sa1/3%s"%("IndividualFrames/bmp16/",".bmp")),
+ pygame.image.load("%sa1/4%s"%("IndividualFrames/bmp16/",".bmp")),
+ pygame.image.load("%sa1/5%s"%("IndividualFrames/bmp16/",".bmp")),
+ pygame.image.load("%sa1/6%s"%("IndividualFrames/bmp16/",".bmp")),
+ pygame.image.load("%sa1/7%s"%("IndividualFrames/bmp16/",".bmp")),
+ pygame.image.load("%sa1/8%s"%("IndividualFrames/bmp16/",".bmp")),
+ pygame.image.load("%sa1/9%s"%("IndividualFrames/bmp16/",".bmp"))
+]
+
+boxes.add(UpDownBox(switch1, (0, 60)))
+boxesTwo.add(UpDownBox(switch2, (350, 60)))
+boxesThree.add(UpDownBox(switch3, (700, 60)))
screen = pygame.display.set_mode([1200, 900])
background = pygame.image.load("Room.gif")
@@ -28,9 +56,13 @@ pygame.display.flip()
start = time()
for i in range(2000):
boxes.update(pygame.time.get_ticks(), 700)
- rectlist = boxes.draw(screen)
+ boxesTwo.update(pygame.time.get_ticks(), 700)
+ boxesThree.update(pygame.time.get_ticks(), 700)
+ rectlist = [boxes.draw(screen), boxesTwo.draw(screen), boxesThree.draw(screen)]
pygame.display.update(rectlist)
#pygame.time.delay(10)
boxes.clear(screen, background)
+ boxesTwo.clear(screen, background)
+ boxesThree.clear(screen, background)
print 2000/(time() - start)