think of the poor windows users
[koperkapel.git] / koperkapel / scenes / viewlevel.py
index f6c56b66861b140ce95c86c8164d6e76da41e16e..28e4026ce82a154b2ccad7afdb517c2f5a34e70e 100644 (file)
@@ -1,13 +1,12 @@
 """Render a level and allow moving the scene"""
 
-import os
-
 from pygame.constants import BLEND_RGBA_MULT
 from pgzero.constants import keys
 from pgzero.loaders import images
 from .level import BaseLevelScene
 from .base import MoveViewportEvent
 from ..constants import TILE_SIZE
+from ..util import safepath
 
 
 class ViewLevelScene(BaseLevelScene):
@@ -16,7 +15,7 @@ class ViewLevelScene(BaseLevelScene):
     def enter(self, world):
         super().enter(world)
         # Mark starting position
-        self._roach = images.load(os.path.join("roach/roach_1")).copy()
+        self._roach = images.load(safepath("roach/roach_1")).copy()
         self._roach.fill((255, 0, 0, 255), None, BLEND_RGBA_MULT)
         x = self._level.start_pos[0] * TILE_SIZE
         y = self._level.start_pos[1] * TILE_SIZE