diff options
author | Stan Seibert <stan@mtrr.org> | 2011-08-15 15:50:10 -0400 |
---|---|---|
committer | Stan Seibert <stan@mtrr.org> | 2011-08-15 15:50:10 -0400 |
commit | fbe20d1adc26e724c92a9070d49a97808676c047 (patch) | |
tree | f5635d582c6a88e5bdac443727b9fd39746e7bdb | |
parent | 2d7220415ec99a80a794f6c642d6e14de8481945 (diff) | |
download | chroma-fbe20d1adc26e724c92a9070d49a97808676c047.tar.gz chroma-fbe20d1adc26e724c92a9070d49a97808676c047.tar.bz2 chroma-fbe20d1adc26e724c92a9070d49a97808676c047.zip |
special camera mode
-rwxr-xr-x | camera.py | 13 | ||||
-rw-r--r-- | images/doomhud.png | bin | 0 -> 17911 bytes |
2 files changed, 13 insertions, 0 deletions
@@ -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: diff --git a/images/doomhud.png b/images/doomhud.png Binary files differnew file mode 100644 index 0000000..3c11b78 --- /dev/null +++ b/images/doomhud.png |