summaryrefslogtreecommitdiff
path: root/camera.py
diff options
context:
space:
mode:
authorAnthony LaTorre <tlatorre9@gmail.com>2011-08-15 21:36:07 -0400
committerAnthony LaTorre <tlatorre9@gmail.com>2011-08-15 21:36:07 -0400
commitfd2e841c4c40f9e46258ac8d11c32c2204cddd5b (patch)
tree70ce88efb4ffad81846d9e8f32a02887d160ce64 /camera.py
parent1913c9cbed2ce6404c2a9650b49e400918a94df5 (diff)
parentfbe20d1adc26e724c92a9070d49a97808676c047 (diff)
downloadchroma-fd2e841c4c40f9e46258ac8d11c32c2204cddd5b.tar.gz
chroma-fd2e841c4c40f9e46258ac8d11c32c2204cddd5b.tar.bz2
chroma-fd2e841c4c40f9e46258ac8d11c32c2204cddd5b.zip
merge
Diffstat (limited to 'camera.py')
-rwxr-xr-xcamera.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/camera.py b/camera.py
index c270472..d7c2038 100755
--- a/camera.py
+++ b/camera.py
@@ -79,6 +79,17 @@ class Camera(Thread):
pygame.display.set_caption('')
self.clock = pygame.time.Clock()
+ self.doom_mode = False
+ try:
+ if self.width == 640: # SECRET DOOM MODE!
+ print 'shotgun activated!'
+ self.doom_hud = pygame.image.load('images/doomhud.png').convert_alpha()
+ rect = self.doom_hud.get_rect()
+ self.doom_rect = rect.move(0, self.height - rect.height)
+ self.doom_mode = True
+ except:
+ pass
+
lower_bound, upper_bound = self.geometry.mesh.get_bounds()
self.scale = np.linalg.norm(upper_bound-lower_bound)
@@ -212,6 +223,8 @@ class Camera(Thread):
self.kernels.ray_trace(np.int32(self.pixels_gpu.size), self.origins_gpu, self.directions_gpu, self.pixels_gpu, block=(self.nblocks,1,1), grid=(self.pixels_gpu.size//self.nblocks+1,1))
pygame.surfarray.blit_array(self.screen, self.pixels_gpu.get().reshape(self.size))
+ if self.doom_mode:
+ self.screen.blit(self.doom_hud, self.doom_rect)
pygame.display.flip()
if self.movie: