Mercurial > touhou
comparison pytouhou/ui/opengl/gamerenderer.pyx @ 617:a6af3ff86612
Change all “void except *” function into “bint except True”, to prevent PyErr_Occurred() from being called at each call.
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> |
---|---|
date | Sun, 29 Mar 2015 00:08:20 +0100 |
parents | 1b31169dc344 |
children |
comparison
equal
deleted
inserted
replaced
616:4ce3ef053a25 | 617:a6af3ff86612 |
---|---|
119 | 119 |
120 # Cleanup. | 120 # Cleanup. |
121 free(capture_memory) | 121 free(capture_memory) |
122 | 122 |
123 | 123 |
124 cdef void render_game(self, Game game) except *: | 124 cdef bint render_game(self, Game game) except True: |
125 cdef long game_x, game_y | 125 cdef long game_x, game_y |
126 cdef float x, y, z, dx, dy, dz | 126 cdef float x, y, z, dx, dy, dz |
127 cdef float fog_data[4] | 127 cdef float fog_data[4] |
128 cdef float fog_start, fog_end | 128 cdef float fog_start, fog_end |
129 cdef unsigned char fog_r, fog_g, fog_b | 129 cdef unsigned char fog_r, fog_g, fog_b |
233 | 233 |
234 if use_debug_group: | 234 if use_debug_group: |
235 glPopDebugGroup() | 235 glPopDebugGroup() |
236 | 236 |
237 | 237 |
238 cdef void render_text(self, dict texts) except *: | 238 cdef bint render_text(self, dict texts) except True: |
239 cdef NativeText label | 239 cdef NativeText label |
240 | 240 |
241 if self.font_manager is None: | 241 if self.font_manager is None: |
242 return | 242 return False |
243 | 243 |
244 self.font_manager.load(texts) | 244 self.font_manager.load(texts) |
245 | 245 |
246 black = Color(0, 0, 0, 255) | 246 black = Color(0, 0, 0, 255) |
247 | 247 |
256 self.render_quads([shadow_rect, rect], [shadow, gradient], texture) | 256 self.render_quads([shadow_rect, rect], [shadow, gradient], texture) |
257 else: | 257 else: |
258 self.render_quads([rect], [gradient], texture) | 258 self.render_quads([rect], [gradient], texture) |
259 | 259 |
260 | 260 |
261 cdef void render_interface(self, interface, game_boss) except *: | 261 cdef bint render_interface(self, interface, game_boss) except True: |
262 cdef GlyphCollection label | 262 cdef GlyphCollection label |
263 | 263 |
264 elements = [] | 264 elements = [] |
265 | 265 |
266 if use_debug_group: | 266 if use_debug_group: |