Changeset 133


Ignore:
Timestamp:
03/03/2012 11:22:59 AM (3 years ago)
Author:
jelinson
Message:

corrected all paths

Location:
src
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • src/block.py

    r104 r133  
    2626        blockMap = Window('blockMap_' + str(self.ID),600,20)
    2727        blockMap.setDefaultResponse(Response('windows',[],False,True))
    28         landscapeArt = pygame.image.load(os.path.abspath(pngDir + "landscapes" + os.sep + "landscape-0" + str(self.ID+1) + ".png"))
     28        landscapeArt = pygame.image.load(os.path.abspath(landscapeDir + os.sep + "landscape-0" + str(self.ID+1) + ".png"))
    2929#        if self.ID > 0:
    3030#            backButton = WindowEntry(('blockMap_' + (self.ID-1),True,False))
     
    3838        for i in range(len(self.buildings)):
    3939            buildingImage = WindowEntry(Response('windows',[],False,True))
    40             buildArt = pygame.image.load(os.path.abspath(pngDir + self.buildings[i].imageFileName))
     40            buildArt = pygame.image.load(os.path.abspath(iconDir + self.buildings[i].imageFileName))
    4141            buildingImage.addImage(Image((20+ENTRY_SHIFT*i,150),ICON_SIZE,ICON_SIZE,buildArt))
    4242            #buildingImage.addRectangle(Rectangle((20+ENTRY_SHIFT*i,100),80,80,self.myColor))
  • src/fileio.py

    r110 r133  
    77
    88resourceDir = ".." + os.sep + "resources"
    9 pngDir = resourceDir + os.sep + 'menu_icons' + os.sep + 'png' + os.sep
     9imageDir = resourceDir + os.sep + "images"
     10
     11mapDir = imageDir + os.sep +"map"
     12landscapeDir = mapDir + os.sep + "landscapes"
     13sequenceDir = imageDir + os.sep + "sequences"
     14iconDir = imageDir + os.sep + "menu_icons"
    1015
    1116
  • src/map.py

    r104 r133  
    1212   
    1313    def __init__(self):
    14         #placeholder
    1514        self.landscapeIDs =[0,1]
    1615        self.currentBlock = 0
     
    3029        else:
    3130            backButton = WindowEntry(Response('windows',[],False,False))
    32         backButtonArt = pygame.image.load(os.path.abspath(resourceDir + os.sep + "images" + os.sep + "test images" + os.sep + "backButton.png"))
     31        backButtonArt = pygame.image.load(os.path.abspath(mapDir + os.sep + "backButton.png"))
    3332        backButton.addImage(Image((10,(MAP_H-25)*scale),25*scale,25*scale,backButtonArt))
    3433        smallMap.addEntry(backButton)
     
    3938        else:
    4039            nextButton = WindowEntry(Response('windows',[],False,False))
    41         nextButtonArt = pygame.image.load(os.path.abspath(resourceDir + os.sep + "images" + os.sep + "test images" + os.sep + "nextButton.png"))
     40        nextButtonArt = pygame.image.load(os.path.abspath(mapDir + os.sep + "nextButton.png"))
    4241        nextButton.addImage(Image(((MAP_W-25)*scale-10,(MAP_H-25)*scale),25*scale,25*scale,nextButtonArt))
    4342        smallMap.addEntry(nextButton)
  • src/scene.py

    r103 r133  
    3232        sceneWindow = Window('introScene_' + str(sceneNumber),0,0)
    3333        sceneWindow.setDefaultResponse(Response('windows',[],False,False))
    34         landscapeArt = pygame.image.load(os.path.abspath(resourceDir + os.sep + "images" + os.sep + "sequences" + os.sep + str(self.introSceneImages[sceneNumber-1])))
     34        landscapeArt = pygame.image.load(os.path.abspath(sequenceDir + os.sep + str(self.introSceneImages[sceneNumber-1])))
    3535        landscape = WindowEntry(Response('windows',[],False,False))
    3636        landscape.addImage(Image((0,0),ORIG_SCREEN_W,ORIG_SCREEN_H,landscapeArt))
     
    6363        sceneWindow = Window('pollutionScene_' + str(sceneNumber),0,0)
    6464        sceneWindow.setDefaultResponse(Response('windows',[],False,False))
    65         landscapeArt = pygame.image.load(os.path.abspath(resourceDir + os.sep + "images" + os.sep + "sequences" + os.sep + str(self.pollutionSceneImages[sceneNumber-1])))
     65        landscapeArt = pygame.image.load(os.path.abspath(sequenceDir + os.sep + str(self.pollutionSceneImages[sceneNumber-1])))
    6666        landscape = WindowEntry(Response('windows',[],False,False))
    6767        landscape.addImage(Image((0,0),ORIG_SCREEN_W,ORIG_SCREEN_H,landscapeArt))
     
    9191        sceneWindow = Window('winScene_' + str(sceneNumber),0,0)
    9292        sceneWindow.setDefaultResponse(Response('windows',[],False,False))
    93         landscapeArt = pygame.image.load(os.path.abspath(resourceDir + os.sep + "images" + os.sep + "sequences" + os.sep + str(self.winSceneImages[sceneNumber-1])))
     93        landscapeArt = pygame.image.load(os.path.abspath(sequenceDir + os.sep + str(self.winSceneImages[sceneNumber-1])))
    9494        landscape = WindowEntry(Response('windows',[],False,False))
    9595        landscape.addImage(Image((0,0),ORIG_SCREEN_W,ORIG_SCREEN_H,landscapeArt))
  • src/spinner.py

    r111 r133  
    2626        background.addText(Text((5,40), "Some text about how much to invest to get new technology.",24,WHITE, 200))
    2727        background.addText(Text((230,20), str(self.currentValue),72,WHITE, 200))
    28         buildArt = pygame.image.load(os.path.abspath(pngDir + typesLUT[self.researchType] + '.png'))
     28        buildArt = pygame.image.load(os.path.abspath(iconDir + os.sep + typesLUT[self.researchType] + '.png'))
    2929        background.addImage(Image((370,10),ICON_SIZE,ICON_SIZE,buildArt))
    3030        researchWindow.addEntry(background)
  • src/state.py

    r107 r133  
    7979        for (name, value, color) in stats:
    8080            buildIcon = WindowEntry(Response('stats',[],False,False, name))
    81             buildArt = pygame.image.load(os.path.abspath(pngDir + name + '.png'))
     81            buildArt = pygame.image.load(os.path.abspath(iconDir + os.sep + name + '.png'))
    8282            buildIcon.addImage(Image((30+STAT_SHIFT*i,240),STAT_ICON_SIZE,STAT_ICON_SIZE,buildArt))
    8383            # This is a bad way to fix the collisions, but it works
  • src/staticWindows.py

    r112 r133  
    2525backGround1 = Window('background1',0,0)
    2626backGroundEntry = WindowEntry(Response('windows',[],False,False))
    27 openingArt = pygame.image.load(resourceDir + os.sep + 'images' + os.sep + 'sequences' + os.sep + 'Intro-01.jpg')
     27openingArt = pygame.image.load(sequenceDir + os.sep + 'Intro-01.jpg')
    2828backGroundEntry.addImage(Image((0,0),1080,792,openingArt))
    2929backGround1.addEntry(backGroundEntry)
     
    3232backGround2 = Window('background2',0,0)
    3333backGroundEntry = WindowEntry(Response('windows',[],False,False))
    34 openingArt = pygame.image.load(pngDir +"background.png")
     34openingArt = pygame.image.load(iconDir + os.sep + "background.png")
    3535backGroundEntry.addImage(Image((0,0),1080,792,openingArt))
    3636backGround2.addEntry(backGroundEntry)
     
    4343# Build button
    4444buildIcon = WindowEntry(Response('windows',['buildMenu1'],False,False))
    45 buildArt = pygame.image.load(os.path.abspath(pngDir + "build.png"))
     45buildArt = pygame.image.load(os.path.abspath(iconDir + os.sep + "build.png"))
    4646buildIcon.addImage(Image((5,5),IMG_SM,IMG_SM,buildArt,))
    4747buildIcon.addRectangle(Rectangle((0,0),BUTTON_W,BUTTON_H,BLUE))
     
    5151# Research button
    5252researchIcon = WindowEntry(Response('windows',['researchMenu'],False,False))
    53 buildArt = pygame.image.load(os.path.abspath(resourceDir + os.sep + "menu_icons" + os.sep  + "png" + os.sep +"research.png"))
     53buildArt = pygame.image.load(os.path.abspath(iconDir + os.sep +"research.png"))
    5454researchIcon.addImage(Image((5+BUTTON_SHIFT,5),IMG_SM,IMG_SM,buildArt))
    5555researchIcon.addRectangle(Rectangle((BUTTON_SHIFT,0),BUTTON_W,BUTTON_H,BLUE))
     
    9292researchMenu.setDefaultResponse(Response('windows',[],True,True))
    9393researchIcon = WindowEntry(Response('windows',[],False,False))
    94 researchArt = pygame.image.load(os.path.abspath(pngDir + "research.png"))
     94researchArt = pygame.image.load(os.path.abspath(iconDir + os.sep + "research.png"))
    9595researchIcon.addImage(Image((120,10),40,40,researchArt))
    9696researchIcon.addImage(Image((345,10),40,40,researchArt,))
     
    103103
    104104researchIcon = WindowEntry(Response('windows',['researchDescription_power'],False,False))
    105 researchArt = pygame.image.load(os.path.abspath(pngDir + "power.png"))
     105researchArt = pygame.image.load(os.path.abspath(iconDir + os.sep + "power.png"))
    106106researchIcon.addImage(Image((390,110),ICON_SIZE,ICON_SIZE,researchArt))
    107107researchIcon.addRectangle(Rectangle((20,100),460,100,CYAN))
     
    111111
    112112researchIcon = WindowEntry(Response('windows',['researchDescription_transport'],False,False))
    113 researchArt = pygame.image.load(os.path.abspath(pngDir + "transport.png"))
     113researchArt = pygame.image.load(os.path.abspath(iconDir + os.sep + "transport.png"))
    114114researchIcon.addImage(Image((390,230),ICON_SIZE,ICON_SIZE,researchArt))
    115115researchIcon.addRectangle(Rectangle((20,220),460,100,CYAN))
     
    119119
    120120researchIcon = WindowEntry(Response('windows',['researchDescription_material'],False,False))
    121 researchArt = pygame.image.load(os.path.abspath(pngDir + "material.png"))
     121researchArt = pygame.image.load(os.path.abspath(iconDir + os.sep + "material.png"))
    122122researchIcon.addImage(Image((390,350),ICON_SIZE,ICON_SIZE,researchArt))
    123123researchIcon.addRectangle(Rectangle((20,340),460,100,CYAN))
     
    150150buildMenu1 = Window('buildMenu1',20,20)
    151151buildMenu1.setDefaultResponse(Response('windows',[],True,True))
    152 buildArt = pygame.image.load(os.path.abspath(pngDir + "build.png"))
     152buildArt = pygame.image.load(os.path.abspath(iconDir + os.sep + "build.png"))
    153153buildIcon = WindowEntry(Response('windows',[],False,False))
    154154buildIcon.addImage(Image((120,10),40,40,buildArt))
     
    162162
    163163buildIcon = WindowEntry(Response('windows',['buildMenu_power'],False,False))
    164 buildArt = pygame.image.load(os.path.abspath(pngDir + "power.png"))
     164buildArt = pygame.image.load(os.path.abspath(iconDir + os.sep + "power.png"))
    165165buildIcon.addImage(Image((390,110),ICON_SIZE,ICON_SIZE,buildArt))
    166166buildIcon.addRectangle(Rectangle((20,100),460,100,CYAN))
     
    170170
    171171buildIcon = WindowEntry(Response('windows',['buildMenu_transport'],False,False))
    172 buildArt = pygame.image.load(os.path.abspath(pngDir + "transport.png"))
     172buildArt = pygame.image.load(os.path.abspath(iconDir + os.sep + "transport.png"))
    173173buildIcon.addImage(Image((390,230),ICON_SIZE,ICON_SIZE,buildArt))
    174174buildIcon.addRectangle(Rectangle((20,220),460,100,CYAN))
     
    178178
    179179buildIcon = WindowEntry(Response('windows',['buildMenu_material'],False,False))
    180 buildArt = pygame.image.load(os.path.abspath(pngDir + "material.png"))
     180buildArt = pygame.image.load(os.path.abspath(iconDir + os.sep + "material.png"))
    181181buildIcon.addImage(Image((390,350),ICON_SIZE,ICON_SIZE,buildArt))
    182182buildIcon.addRectangle(Rectangle((20,340),460,100,CYAN))
  • src/turnMenu.py

    r111 r133  
    2121        buildMenu = Window('buildMenu',20,20)
    2222        buildMenu.setDefaultResponse(Response('windows',[],True,True))
    23         buildArt = pygame.image.load(os.path.abspath(pngDir + "build.png"))
     23        buildArt = pygame.image.load(os.path.abspath(iconDir + os.sep + "build.png"))
    2424        buildIcon = WindowEntry(Response('windows',[],False,False))
    2525        buildIcon.addImage(Image((120,10),40,40,buildArt))
     
    3434            if building.buildingType == researchType:
    3535                buildIcon = WindowEntry(Response('describe',[],False,False,building.name))
    36                 buildArt = pygame.image.load(os.path.abspath(pngDir + building.imageFileName))
     36                buildArt = pygame.image.load(os.path.abspath(iconDir + os.sep + building.imageFileName))
    3737                buildIcon.addImage(Image((390,110+ENTRY_SHIFT*i),ICON_SIZE,ICON_SIZE,buildArt))
    3838                buildIcon.addRectangle(Rectangle((20,100+ENTRY_SHIFT*i),460,100,CYAN))
     
    5656        descriptionWindow.setDefaultResponse(Response('windows',[],True,True))
    5757        buildIcon = WindowEntry(Response('build',[],True,False,name))
    58         buildArt = pygame.image.load(os.path.abspath(pngDir + buildingLUT[name].imageFileName))
     58        buildArt = pygame.image.load(os.path.abspath(iconDir + buildingLUT[name].imageFileName))
    5959        buildIcon.addImage(Image((370,10),ICON_SIZE,ICON_SIZE,buildArt))
    6060        buildIcon.addRectangle(Rectangle((0,0),460,100,CYAN))
Note: See TracChangeset for help on using the changeset viewer.