changeset 391:84b151962708

Convert pytouhou.ui.gamerenderer back to pure python, it doesn’t use or need any cython feature.
author Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
date Mon, 07 Jan 2013 21:13:32 +0100
parents b11953cf1d3b
children 45e1a9a37e66
files pytouhou/ui/gamerenderer.py pytouhou/ui/gamerenderer.pyx
diffstat 1 files changed, 5 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
rename from pytouhou/ui/gamerenderer.pyx
rename to pytouhou/ui/gamerenderer.py
--- a/pytouhou/ui/gamerenderer.pyx
+++ b/pytouhou/ui/gamerenderer.py
@@ -28,15 +28,13 @@ from pyglet.gl import (glClear, glMatrix
 
 from pytouhou.utils.matrix import Matrix
 
-from .renderer cimport Renderer
-from .background cimport get_background_rendering_data
+from .renderer import Renderer
+from .background import get_background_rendering_data
 
 
 
-cdef class GameRenderer(Renderer):
-    cdef public game
-    cdef public background
-
+class GameRenderer(Renderer):
+    __slots__ = ('game', 'background')
 
     def __init__(self, resource_loader, game=None, background=None):
         Renderer.__init__(self, resource_loader)
@@ -44,7 +42,7 @@ cdef class GameRenderer(Renderer):
             self.load_game(game, background)
 
 
-    cpdef load_game(self, game=None, background=None):
+    def load_game(self, game=None, background=None):
         self.game = game
         self.background = background