Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/data
diff options
context:
space:
mode:
authorJames Cameron <quozl@laptop.org>2010-06-22 03:01:49 (GMT)
committer James Cameron <quozl@laptop.org>2010-06-22 03:02:13 (GMT)
commit35d15b1c43514f5918b89a4c47a9f689d83626dc (patch)
treecbdfad59a0eacd83ab2ef95e22d55a3bc64b924b /data
parentce1f461da70a0c43e56eba56128683e644944557 (diff)
minor example fixes following review
Some minor fixes following a review by Sascha Silbe. Signed-off-by: James Cameron <quozl@laptop.org>
Diffstat (limited to 'data')
-rw-r--r--data/graphics/bounce2
-rw-r--r--data/graphics/camera6
-rw-r--r--data/graphics/physics1
-rw-r--r--data/graphics/tree2
4 files changed, 5 insertions, 6 deletions
diff --git a/data/graphics/bounce b/data/graphics/bounce
index 42889f0..6667b14 100644
--- a/data/graphics/bounce
+++ b/data/graphics/bounce
@@ -54,7 +54,7 @@ while pippy.pygame.next_frame():
elif event.type == KEYDOWN:
sys.exit()
- # fill the screen with white
+ # fill the screen with almost white
screen.fill((250, 250, 250))
# draw the text
diff --git a/data/graphics/camera b/data/graphics/camera
index 023e04f..85dc606 100644
--- a/data/graphics/camera
+++ b/data/graphics/camera
@@ -37,18 +37,18 @@ while pippy.pygame.next_frame():
if event.type == pygame.QUIT: sys.exit()
elif event.type == pygame.KEYDOWN: sys.exit()
- # angle and scale the image
+ # rotate and scale the image
newImage = pygame.transform.rotozoom(image, angle, scale)
newImageRect = newImage.get_rect()
newImageRect.centerx = screen.get_rect().centerx
newImageRect.centery = screen.get_rect().centery
- # display the angled and scaled image
+ # display the rotated and scaled image
screen.fill(bgcolor)
screen.blit(newImage, newImageRect)
pygame.display.flip()
- # choose a new angle and scale
+ # choose a new rotation angle and scale
angle = angle + 5.0
scale = scale * 0.95
diff --git a/data/graphics/physics b/data/graphics/physics
index 0611351..fbc336c 100644
--- a/data/graphics/physics
+++ b/data/graphics/physics
@@ -46,7 +46,6 @@ while pippy.pygame.next_frame() and world.run_physics:
world.mouse_move(event.pos)
# clear display with a color
- # (red, green, blue), where 0 <= value < 256
screen.fill((80, 160, 240))
# update & draw physics world
diff --git a/data/graphics/tree b/data/graphics/tree
index 6d70ee3..acbdf78 100644
--- a/data/graphics/tree
+++ b/data/graphics/tree
@@ -61,8 +61,8 @@ screen.fill(bgcolor)
draw_tree((width / 2), height - 20, start_length, 0)
pygame.display.flip()
+# do nothing visible until the escape key is pressed
while pippy.pygame.next_frame():
- # chill until escape key is pressed
for event in pygame.event.get():
if event.type == QUIT:
sys.exit()