diff pytouhou/ui/gamerenderer.py @ 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 pytouhou/ui/gamerenderer.pyx@690b5faaa0e6
children 9e2cbb2c2c64
line wrap: on
line diff
copy from pytouhou/ui/gamerenderer.pyx
copy 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