Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/data/graphics/snow
diff options
context:
space:
mode:
authorJames Cameron <quozl@laptop.org>2010-05-21 09:30:18 (GMT)
committer James Cameron <quozl@laptop.org>2010-05-21 09:30:18 (GMT)
commit4a50004aa8f2109e6cff4a082a10581dfee0d540 (patch)
tree90daf190816ac4a24515b1df907d953a576d2809 /data/graphics/snow
parent0ce089fc9bb7a9f18f953a32c7195e70a62cf2b1 (diff)
adapt pippy examples to screen dimensions, dev.laptop.org #9260
Adjust all the examples to work for different screen dimensions, and briefly fix formatting or style in some of the other code examples. Yet to be done: 1. slideshow, it finds no objects in journal with MIME type image/jpeg, and as a result does not show any slides, 2. xolympics, it tests an object location against physics world coordinates to determine winning condition.
Diffstat (limited to 'data/graphics/snow')
-rw-r--r--data/graphics/snow11
1 files changed, 6 insertions, 5 deletions
diff --git a/data/graphics/snow b/data/graphics/snow
index 4fc30f2..efcb28f 100644
--- a/data/graphics/snow
+++ b/data/graphics/snow
@@ -1,3 +1,4 @@
+# snow
import pippy, pygame, sys
from pygame.locals import *
@@ -6,17 +7,17 @@ from random import *
# always need to init first thing
pygame.init()
-# XO screen is 1200x900
-size = width, height = 1200, 900
-
# create the window and keep track of the surface
# for drawing into
-screen = pygame.display.set_mode(size)
+screen = pygame.display.set_mode()
+
+# ask for screen's width and height
+width, height = screen.get_size()
# turn off the cursor
pygame.mouse.set_visible(False)
-bg_color = (0,0,0)
+bg_color = (0, 0, 0)
xs = []
ys = []