mirror of
https://github.com/quantum5/punyverse.git
synced 2025-04-24 13:11:57 -04:00
Slightly better formatting.
This commit is contained in:
parent
6173cbe094
commit
8b3a6d7130
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/python
|
||||
INITIAL_WIN_HEIGHT = 540
|
||||
INITIAL_WIN_WIDTH = 700
|
||||
WIN_TITLE = "Punyverse"
|
||||
WIN_TITLE = 'Punyverse'
|
||||
|
||||
|
||||
def main():
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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():
|
||||
|
|
Loading…
Reference in a new issue