From 35d15b1c43514f5918b89a4c47a9f689d83626dc Mon Sep 17 00:00:00 2001 From: James Cameron Date: Tue, 22 Jun 2010 03:01:49 +0000 Subject: minor example fixes following review Some minor fixes following a review by Sascha Silbe. Signed-off-by: James Cameron --- (limited to 'data') 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() -- cgit v0.9.1