comparison tools/area_editor.py @ 71:c449a3507a6b

Shebang and path hacking, so that the area_editor runs
author Stefano Rivera <stefano@rivera.za.net>
date Sun, 01 Sep 2013 21:39:16 +0200
parents 1261c0731385
children 5db052531510
comparison
equal deleted inserted replaced
70:ff9e40ae616f 71:c449a3507a6b
1 #!/usr/bin/env python
2
1 # The basic area editor 3 # The basic area editor
2 # 4 #
3 # To edit an existing level, use 5 # To edit an existing level, use
4 # editor levelname 6 # editor levelname
5 # 7 #
7 # 9 #
8 # editor levelname <xsize> <ysiz> 10 # editor levelname <xsize> <ysiz>
9 # (size specified in pixels 11 # (size specified in pixels
10 # 12 #
11 13
14 import os
15 import sys
16
12 import pygame 17 import pygame
13 import pygame.locals as pgl 18 import pygame.locals as pgl
19
20 sys.path.append(os.path.join(os.path.dirname(__file__), '..'))
14 21
15 from nagslang.resources import resources 22 from nagslang.resources import resources
16 from nagslang.constants import SCREEN, FPS 23 from nagslang.constants import SCREEN, FPS
17 from nagslang.level import Level, POLY_COLORS 24 from nagslang.level import Level, POLY_COLORS
18
19 import sys
20 25
21 26
22 class EditorLevel(Level): 27 class EditorLevel(Level):
23 28
24 def __init__(self, name, x=800, y=600): 29 def __init__(self, name, x=800, y=600):