Slightly better formatting.

This commit is contained in:
Quantum 2013-11-05 19:18:22 -05:00
parent 672b5c0462
commit 3b221e4339
3 changed files with 10 additions and 10 deletions

View file

@ -1,7 +1,7 @@
#!/usr/bin/python
INITIAL_WIN_HEIGHT = 540
INITIAL_WIN_WIDTH = 700
WIN_TITLE = "Punyverse"
WIN_TITLE = 'Punyverse'
def main():

View file

@ -58,9 +58,9 @@ class Applet(pyglet.window.Window):
super(Applet, self).__init__(*args, **kwargs)
texture.init()
l = clock()
start = clock()
self.fps = 0
self.world = load_world("world.json")
self.world = load_world('world.json')
print 'Initializing game...'
self.speed = INITIAL_SPEED
self.keys = set()
@ -187,9 +187,9 @@ class Applet(pyglet.window.Window):
glLightfv(GL_LIGHT1, GL_SPECULAR, fv4(1, 1, 1, 1))
print 'Loading asteroids...'
self.asteroid_ids = [model_list(load_model(r"asteroids\01.obj"), 5, 5, 5, (0, 0, 0)),
model_list(load_model(r"asteroids\02.obj"), 5, 5, 5, (0, 0, 0)),
model_list(load_model(r"asteroids\03.obj"), 5, 5, 5, (0, 0, 0)),
self.asteroid_ids = [model_list(load_model(r'asteroids/01.obj'), 5, 5, 5, (0, 0, 0)),
model_list(load_model(r'asteroids/02.obj'), 5, 5, 5, (0, 0, 0)),
model_list(load_model(r'asteroids/03.obj'), 5, 5, 5, (0, 0, 0)),
]
c = self.cam
@ -200,7 +200,7 @@ class Applet(pyglet.window.Window):
for entity in self.world.tracker:
entity.update()
print "Loaded in %s seconds." % (clock() - l)
print 'Loaded in %s seconds.' % (clock() - start)
def set_exclusive_mouse(self, exclusive):
super(Applet, self).set_exclusive_mouse(exclusive)
@ -335,7 +335,7 @@ class Applet(pyglet.window.Window):
glCallList(entity.corona)
glPopMatrix()
if self.cloud and hasattr(entity, "cloudmap") and entity.cloudmap:
if self.cloud and hasattr(entity, 'cloudmap') and entity.cloudmap:
glPushMatrix()
glEnable(GL_ALPHA_TEST)
glTranslatef(*entity.location)

View file

@ -179,11 +179,11 @@ def load_world(file):
(pitch, yaw, roll), **params))
for satellite, info in info.get('satellites', {}).iteritems():
print "Loading %s, satellite of %s." % (satellite, name)
print 'Loading %s, satellite of %s.' % (satellite, name)
body(satellite, info, object)
for planet, info in root['bodies'].iteritems():
print "Loading %s." % planet
print 'Loading %s.' % planet
body(planet, info)
for name, info in root['belts'].iteritems():