Ignore:
Timestamp:
08/28/09 15:05:39 (10 years ago)
Author:
Kaydeth_parpg
Message:

Ticket #72: Patch by Kaydeth. The separate objects file was merged back into the main map file that FIFE parses to load each Map. The Map, Engine, and World classes were all updated to allow game object creation to happen as the map file is loaded. loaders.py and xmlmap.py were copied from the FIFE code base and made local so that we can now customize how we pass the parsed map and object information to FIFE.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/game/scripts/world.py

    r261 r264  
    2121from datetime import date 
    2222from scripts.common.eventlistenerbase import EventListenerBase 
     23from local_loaders.loaders import loadMapFile 
     24from sounds import SoundEngine 
    2325from settings import Setting 
    2426from scripts import inventory, hud 
     
    9193        """Loads a map an stores it under the given name in the maps list. 
    9294        """ 
    93         map = Map(self.engine) 
     95        map = Map(self.engine, self.data) 
     96         
     97        """Need to set active map before we load it because the map  
     98        loader uses call backs that expect to find an active map.  
     99        This needs to be reworked. 
     100        """ 
     101        self.maps[mapname] = map 
     102        self.setActiveMap(mapname) 
     103 
    94104        map.load(filename) 
    95         self.maps[mapname] = map 
     105 
    96106     
    97107    def setActiveMap(self, mapname): 
     
    199209                # check to see if this in our list at all 
    200210                if(self.data.objectActive(obj.getId())): 
    201                     # yes, so outline     
     211                    # yes, so outline  
    202212                    self.activeMap.outline_render.addOutlined(obj, 0, 137, 255, 2) 
    203213                    # get the text 
Note: See TracChangeset for help on using the changeset viewer.