Skip to content

Commit

Permalink
fix dir
Browse files Browse the repository at this point in the history
  • Loading branch information
zcr1 committed Nov 19, 2012
1 parent 020c9e1 commit 4856b46
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions background.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@

class Background():
def __init__(self, img1, img2):
filepath1 = "/osgcc/images/" + img1
filepath2 = "/osgcc/images/" + img2
filepath1 = "/OSGCC6/images/" + img1
filepath2 = "/OSGCC6/images/" + img2
#print filepath
imgPath1 = os.path.dirname(os.path.dirname( os.path.realpath( __file__ ) ) ) + filepath1
imgPath2 = os.path.dirname(os.path.dirname( os.path.realpath( __file__ ) ) ) + filepath2
Expand Down
2 changes: 1 addition & 1 deletion bean.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class Bean(pygame.sprite.Sprite):

def __init__(self, localPos, worldPos, direction, world, enemy):
pygame.sprite.Sprite.__init__(self)
imgPath = os.path.dirname(os.path.dirname( os.path.realpath( __file__ ) ) ) + "/osgcc/images/bean.png"
imgPath = os.path.dirname(os.path.dirname( os.path.realpath( __file__ ) ) ) + "/OSGCC6/images/bean.png"
self.image = pygame.image.load(imgPath)
self.rect = self.image.get_rect()
self.rect.center = copy.deepcopy(localPos)
Expand Down
2 changes: 1 addition & 1 deletion enemy.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class Enemy(pygame.sprite.Sprite):
#enemey type, 0=walk, 1=jump, 2=shoot 3= 4=
def __init__(self, pos, world, clock, type):
pygame.sprite.Sprite.__init__(self)
imgPath = os.path.dirname(os.path.dirname( os.path.realpath( __file__ ) ) ) + "/osgcc/images/enemy1.png"
imgPath = os.path.dirname(os.path.dirname( os.path.realpath( __file__ ) ) ) + "/OSGCC6/images/enemy1.png"
self.image = pygame.image.load(imgPath)
self.rect = self.image.get_rect()
self.rect.center = copy.deepcopy(pos)
Expand Down
2 changes: 1 addition & 1 deletion item.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class Item(pygame.sprite.Sprite):

def __init__(self, pos , height, width, type):
pygame.sprite.Sprite.__init__(self)
imgPath = os.path.dirname(os.path.dirname( os.path.realpath( __file__ ) ) ) + "/osgcc/images/canOfBeans.png"
imgPath = os.path.dirname(os.path.dirname( os.path.realpath( __file__ ) ) ) + "/OSGCC6/images/canOfBeans.png"
self.image = pygame.image.load(imgPath)
self.rect = self.image.get_rect()
self.rect.center = pos
Expand Down
6 changes: 3 additions & 3 deletions level.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class Level():

def __init__(self, world):
self.world = world
platformpath = os.path.dirname(os.path.dirname( os.path.realpath( __file__ ) ) ) + "/osgcc/datafiles/level1.dat"
platformpath = os.path.dirname(os.path.dirname( os.path.realpath( __file__ ) ) ) + "/OSGCC6/datafiles/level1.dat"
f = open(platformpath)

allLines = f.readlines()
Expand All @@ -34,7 +34,7 @@ def __init__(self, world):


# Add enemies to level
enemy_dat_path = os.path.dirname(os.path.dirname( os.path.realpath( __file__ ) ) ) + "/osgcc/datafiles/enemy.dat"
enemy_dat_path = os.path.dirname(os.path.dirname( os.path.realpath( __file__ ) ) ) + "/OSGCC6/datafiles/enemy.dat"
f = open(enemy_dat_path)

allLines = f.readlines()
Expand All @@ -51,7 +51,7 @@ def __init__(self, world):
self.enemies.add(enem)

# Add items to level
item_dat_path = os.path.dirname(os.path.dirname( os.path.realpath( __file__ ) ) ) + "/osgcc/datafiles/item.dat"
item_dat_path = os.path.dirname(os.path.dirname( os.path.realpath( __file__ ) ) ) + "/OSGCC6/datafiles/item.dat"
f = open(item_dat_path)

allLines = f.readlines()
Expand Down
4 changes: 2 additions & 2 deletions platform.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class Platform(pygame.sprite.Sprite):

def __init__(self, pos, death, number, move):
pygame.sprite.Sprite.__init__(self)
filepath = "/osgcc/images/newplatform" + number + ".png"
filepath = "/OSGCC6/images/newplatform" + number + ".png"
#print filepath
imgPath = os.path.dirname(os.path.dirname( os.path.realpath( __file__ ) ) ) + filepath

Expand Down Expand Up @@ -52,7 +52,7 @@ def Update(self):
pass

def switchImage(self, num):
filepath = "/osgcc/images/newplatform" + num + ".png"
filepath = "/OSGCC6/images/newplatform" + num + ".png"
imgPath = os.path.dirname(os.path.dirname( os.path.realpath( __file__ ) ) ) + filepath
self.image = pygame.image.load(imgPath)
self.sprung = not self.sprung
Expand Down
4 changes: 2 additions & 2 deletions player.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class Player(pygame.sprite.Sprite):
speedMax = 10
speedInc = 2
#maxJumps = 200
maxJumps = 20
maxJumps = 2
#speedMax = 20
#speedInc = 7
jumpSpeed = 12
Expand All @@ -34,7 +34,7 @@ class Player(pygame.sprite.Sprite):

def __init__(self, pos, world):
pygame.sprite.Sprite.__init__(self)
imgPath = os.path.dirname(os.path.dirname( os.path.realpath( __file__ ) ) ) + "/osgcc/images/chicken.png"
imgPath = os.path.dirname(os.path.dirname( os.path.realpath( __file__ ) ) ) + "/OSGCC6/images/chicken.png"
self.image = pygame.image.load(imgPath)
self.rect = self.image.get_rect()
self.rect.center = pos
Expand Down
2 changes: 1 addition & 1 deletion world.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ def Draw(self):


def drawGUI(self):
imgPath = os.path.dirname(os.path.dirname( os.path.realpath( __file__ ) ) ) + "/osgcc/images/bean.png"
imgPath = os.path.dirname(os.path.dirname( os.path.realpath( __file__ ) ) ) + "/OSGCC6/images/bean.png"
img = pygame.image.load(imgPath)
for i in range(self.player.hp):
self.screen.blit(img,(40 * (i + 1), 50))
Expand Down

0 comments on commit 4856b46

Please sign in to comment.