Changeset 138


Ignore:
Timestamp:
06/15/09 03:58:41 (10 years ago)
Author:
maximinus_parpg
Message:

Added interior walls to building.
Removed 'visual' objects and moved them to the main map file.

Location:
trunk/PARPG
Files:
3 added
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/PARPG/maps/map_objects.xml

    r137 r138  
    66    <!-- There must be one and one only PC character --> 
    77    <PC xpos="0.0" ypos="0.0"></PC> 
     8 
    89    <!-- There can be any number of NPC characters --> 
    910    <NPC gfx="npc-woman" xpos="-4.0" ypos="-7.0" id="women01" 
    1011         text="A friendly woman"></NPC> 
     12 
    1113    <!-- There can be any number of objects --> 
    1214    <!-- Object blocking is set in the objects own xml file --> 
     
    1517    <object display="True" gfx="crate" xpos="-4.0" ypos="-6.0" id="crate02" 
    1618            carry="0" contain="1" text="A dirty old crate"></object> 
     19 
    1720    <!-- These next things are inside other objects --> 
    1821    <object display="False" gfx="NONE" owner="crate02" id="letter" 
     
    2023    <object display="False" gfx="NONE" owner="crate02" id="battery" 
    2124            carry="1" contain="0" text="An old battery"></object> 
    22     <!-- Some objects are just plain visual aids --> 
    23     <visual xpos="-3.0" ypos="-4.0" gfx="wall-up"></visual> 
    24     <visual xpos="-2.0" ypos="-4.0" gfx="wall-up"></visual> 
     25 
    2526    <!-- There can be a number of doors, which serve as transition triggers --> 
    2627    <door display="True" gfx="shanty-door" xpos="-2.0" ypos="6.0" 
  • trunk/PARPG/maps/shanty.xml

    r137 r138  
    77    <!-- Import the purely visual objects --> 
    88    <import file="../objects/ground/walls/wall_rear/wall-up.xml"></import> 
     9    <import file="../objects/ground/walls/wall_front/wall-up.xml"></import> 
    910    <import file="../objects/ground/block/block.xml"></import> 
    1011    <import file="../objects/ground/doors/floor.xml"></import> 
     
    5960            <i x="-3.0" o="brick" z="0.0" y="2.0" r="0"></i> 
    6061            <i x="-2.0" o="brick" z="0.0" y="2.0" r="0"></i> 
    61             <i x="-1.0" o="brick" z="0.0" y="2.0" r="0"></i> 
     62            <i x="-1.0" o="block" z="0.0" y="2.0" r="0"></i> 
    6263            <i x="0.0" o="brick" z="0.0" y="2.0" r="0"></i> 
    6364            <i x="1.0" o="brick" z="0.0" y="2.0" r="0"></i> 
     
    6566            <i x="3.0" o="brick" z="0.0" y="2.0" r="0"></i> 
    6667            <i x="4.0" o="brick" z="0.0" y="2.0" r="0"></i> 
    67  
    68             <i x="-1.0" o="block" z="0.0" y="3.0" r="0"></i> 
    6968                </instances> 
    7069        </layer> 
     
    7271        <layer x_offset="0.0" pathing="cell_edges_and_diagonals" y_offset="0.0" grid_type="square" id="ObjectLayer" x_scale="1" y_scale="1" rotation="0.0"> 
    7372                <instances> 
     73                    <!-- Some objects are just plain visual aids --> 
     74            <i x="-2.0" y="-3.0" z="0.0" r="0" o="wall-rear-up"></i> 
     75            <i x="-1.0" y="-3.0" z="0.0" r="0" o="wall-rear-up"></i> 
     76            <i x="0.0" y="-3.0" z="0.0" r="0" o="wall-rear-up"></i> 
     77            <i x="1.0" y="-3.0" z="0.0" r="0" o="wall-rear-up"></i> 
     78            <i x="2.0" y="-3.0" z="0.0" r="0" o="wall-rear-up"></i> 
     79            <i x="3.0" y="-3.0" z="0.0" r="0" o="wall-rear-up"></i> 
     80 
     81            <i x="-2.0" y="2.0" z="0.0" r="0" o="wall-front-up"></i> 
     82            <i x="0.0" y="2.0" z="0.0" r="0" o="wall-front-up"></i> 
     83            <i x="1.0" y="2.0" z="0.0" r="0" o="wall-front-up"></i> 
     84            <i x="2.0" y="2.0" z="0.0" r="0" o="wall-front-up"></i> 
     85            <i x="3.0" y="2.0" z="0.0" r="0" o="wall-front-up"></i>  
    7486                </instances> 
    7587        </layer> 
  • trunk/PARPG/maps/shanty_objects.xml

    r137 r138  
    66    <!-- There must be one and one only PC character --> 
    77    <PC xpos="0.0" ypos="0.0"></PC> 
     8     
    89    <!-- There can be a number of doors, which serve as transition triggers --> 
    9     <door display="True" gfx="fdoor" xpos="-1.0" ypos="3.0" 
     10    <door display="True" gfx="fdoor" xpos="-1.0" ypos="2.0" 
    1011        id="sh-door" text="Exit building" map="map" txpos="-2" typos="7"></door> 
    1112</objects> 
  • trunk/PARPG/objects/ground/walls/wall_rear/wall-up.xml

    r137 r138  
    11<?fife type="object"?> 
    2 <object id="wall-up" namespace="PARPG" blocking="1" static="1"> 
    3         <image source="wall-up.png" direction="0" /> 
     2<object id="wall-rear-up" namespace="PARPG" blocking="1" static="1"> 
     3        <image source="wall-up.png" direction="0" y_offset="-34"/> 
    44</object> 
  • trunk/PARPG/scripts/engine.py

    r137 r138  
    8989        self.addObjects(cur_handler.objects) 
    9090        self.addDoors(cur_handler.doors) 
    91         self.addVisuals(cur_handler.visuals) 
    9291        objects_file.close() 
    9392        return True 
     
    131130        for i in doors: 
    132131            self.doors.append(MapDoor(i[0], i[1], i[2])) 
    133  
    134     def addVisuals(self, visuals): 
    135         """Add all the non-interacting objects""" 
    136         for i in visuals: 
    137             self.view.addObject(float(i[0]),float(i[1]),i[2],i[3]) 
    138132 
    139133    def objectActive(self, ident): 
  • trunk/PARPG/scripts/objLoader.py

    r137 r138  
    2929        self.npcs = [] 
    3030        self.doors = [] 
    31         self.visuals = [] 
    32         # create unique names for all of the visuals 
    33         self.visual_count = 0 
    3431     
    3532    def getParser(self): 
     
    8582                                 owner, "0", "0"]) 
    8683 
    87     def getVisual(self, attrs): 
    88         """Visual elements are there just for the eye candy""" 
    89         try: 
    90             xpos = attrs.getValue("xpos") 
    91             ypos = attrs.getValue("ypos") 
    92             gfx = attrs.getValue("gfx") 
    93         except(KeyError): 
    94             sys.stderr.write("Error: Data missing in visual definition\n") 
    95             sys.exit(False) 
    96         name = "visual-"+str(self.visual_count) 
    97         self.visual_count += 1 
    98         self.visuals.append([xpos,ypos,gfx,name]) 
    99    
    10084    def startElement(self, name, attrs): 
    10185        """Called every time we meet a new element in the XML file""" 
     
    131115            # same old same old 
    132116            self.getObject(attrs) 
    133         elif(name == "visual"): 
    134             self.getVisual(attrs) 
    135117        elif(name == "door"): 
    136118            # firstly, add the object 
Note: See TracChangeset for help on using the changeset viewer.