mirror of
https://github.com/quantum5/punyverse.git
synced 2025-04-24 13:11:57 -04:00
Allowed control of displaying cloudmaps and atmospheres.
This commit is contained in:
parent
e5d55f125c
commit
7e25a79968
|
@ -70,6 +70,8 @@ class Applet(pyglet.window.Window):
|
||||||
self.running = True
|
self.running = True
|
||||||
self.moving = True
|
self.moving = True
|
||||||
self.info_precise = False
|
self.info_precise = False
|
||||||
|
self.atmosphere = True
|
||||||
|
self.cloud = not texture.badcard
|
||||||
|
|
||||||
self.tick = self.world.tick_length
|
self.tick = self.world.tick_length
|
||||||
self.ticks = [20, 40, 60, # Second range
|
self.ticks = [20, 40, 60, # Second range
|
||||||
|
@ -123,6 +125,8 @@ class Applet(pyglet.window.Window):
|
||||||
key.D: attribute_toggler(self, 'debug'),
|
key.D: attribute_toggler(self, 'debug'),
|
||||||
key.O: attribute_toggler(self, 'orbit'),
|
key.O: attribute_toggler(self, 'orbit'),
|
||||||
key.P: attribute_toggler(self, 'info_precise'),
|
key.P: attribute_toggler(self, 'info_precise'),
|
||||||
|
key.C: attribute_toggler(self, 'cloud'),
|
||||||
|
key.X: attribute_toggler(self, 'atmosphere'),
|
||||||
key.ENTER: attribute_toggler(self, self.running),
|
key.ENTER: attribute_toggler(self, self.running),
|
||||||
key.INSERT: increment_tick,
|
key.INSERT: increment_tick,
|
||||||
key.DELETE: decrement_tick,
|
key.DELETE: decrement_tick,
|
||||||
|
@ -310,7 +314,7 @@ class Applet(pyglet.window.Window):
|
||||||
glPopAttrib()
|
glPopAttrib()
|
||||||
glPopMatrix()
|
glPopMatrix()
|
||||||
|
|
||||||
if hasattr(entity, 'atmosphere') and entity.atmosphere:
|
if self.atmosphere and hasattr(entity, 'atmosphere') and entity.atmosphere:
|
||||||
glPushMatrix()
|
glPushMatrix()
|
||||||
x0, y0, z0 = entity.location
|
x0, y0, z0 = entity.location
|
||||||
dx, dy, dz = x - x0, y - y0, z - z0
|
dx, dy, dz = x - x0, y - y0, z - z0
|
||||||
|
@ -325,7 +329,7 @@ class Applet(pyglet.window.Window):
|
||||||
glCallList(entity.atmosphere)
|
glCallList(entity.atmosphere)
|
||||||
glPopMatrix()
|
glPopMatrix()
|
||||||
|
|
||||||
if not texture.badcard and hasattr(entity, "cloudmap") and entity.cloudmap:
|
if self.cloud and hasattr(entity, "cloudmap") and entity.cloudmap:
|
||||||
glPushMatrix()
|
glPushMatrix()
|
||||||
glEnable(GL_ALPHA_TEST)
|
glEnable(GL_ALPHA_TEST)
|
||||||
glTranslatef(*entity.location)
|
glTranslatef(*entity.location)
|
||||||
|
|
Loading…
Reference in a new issue