Mercurial > touhou
comparison pytouhou/ui/gamerenderer.pyx @ 221:5c3600e0f0cd
Don’t try to render effect if there is no game.
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> |
---|---|
date | Sun, 18 Dec 2011 19:51:29 +0100 |
parents | 577f45454402 |
children | 5cac48b328ad |
comparison
equal
deleted
inserted
replaced
220:0595315d3880 | 221:5c3600e0f0cd |
---|---|
103 | 103 |
104 back = self.background | 104 back = self.background |
105 game = self.game | 105 game = self.game |
106 texture_manager = self.texture_manager | 106 texture_manager = self.texture_manager |
107 | 107 |
108 if game.effect is not None: | 108 if game is not None and game.effect is not None: |
109 glMatrixMode(GL_MODELVIEW) | 109 glMatrixMode(GL_MODELVIEW) |
110 glLoadIdentity() | 110 glLoadIdentity() |
111 # Some explanations on the magic constants: | 111 # Some explanations on the magic constants: |
112 # 192. = 384. / 2. = width / 2. | 112 # 192. = 384. / 2. = width / 2. |
113 # 224. = 448. / 2. = height / 2. | 113 # 224. = 448. / 2. = height / 2. |