--- childsplay-0.83/lib/letters.py.aap 2006-08-27 10:53:03.000000000 +0200
+++ childsplay-0.83/lib/letters.py 2006-08-27 14:09:03.000000000 +0200
@@ -98,13 +98,13 @@
if DEBUG: print "ChildsplayGoodies",dir(ChildsplayGoodies)
# create two assetmlSDL instances one for parsing images and one for sounds
self.Assets_img = pyassetmlSDL.AssetmlSDL()
- self.Assets_img.set_mldir('childsplay/childsplay-images/childsplay-images.assetml')
+ self.Assets_img.set_mldir('childsplay-images.assetml')
Img.arrow = self.Assets_img.get_assets(('arrow.png',))
# get pictures
- self.Assets_img.set_mldir('childsplay/memory-136x136/memory-136x136.assetml')
+ self.Assets_img.set_mldir('memory-136x136.assetml')
descr_pics = self.Assets_img.get_assets(('*.png',),fullname=1)# {foo.png:foo.png object,spam.png:spam.png object}
- parser = pyassetml.AssetmlParser('childsplay/memory-136x136/memory-136x136.assetml')
+ parser = pyassetml.AssetmlParser('memory-136x136.assetml')
loc = ChildsplayGoodies.language
if DEBUG: print "letters game, locale set to",loc
@@ -124,7 +124,7 @@
if DEBUG: print "Found words",k
self.Assets_snd = pyassetmlSDL.AssetmlSDL()
- self.Assets_snd.set_mldir('childsplay/childsplay-sounds/childsplay-sounds.assetml')
+ self.Assets_snd.set_mldir('childsplay-sounds.assetml')
files = ('bummer.wav','wahoo.wav')
self.Assets_snd.get_assets(files, Snd)
--- childsplay-0.83/lib/memory.py.aap 2006-08-27 10:53:03.000000000 +0200
+++ childsplay-0.83/lib/memory.py 2006-08-27 14:09:03.000000000 +0200
@@ -55,9 +55,9 @@
raise MyError,text
# create two assetmlSDL instances one for parsing images and one for sounds
self.Assets_img = pyassetmlSDL.AssetmlSDL()
- self.Assets_img.set_mldir('childsplay/memory-136x136/memory-136x136.assetml')
+ self.Assets_img.set_mldir('memory-136x136.assetml')
self.Assets_snd = pyassetmlSDL.AssetmlSDL()
- self.Assets_snd.set_mldir('childsplay/childsplay-sounds/childsplay-sounds.assetml')
+ self.Assets_snd.set_mldir('childsplay-sounds.assetml')
self.libdir = libdir
# This will also used as a test if we are using other images
--- childsplay-0.83/assetml/childsplay/memory-136x136/memory-136x136.assetml.aap 2006-08-27 10:53:03.000000000 +0200
+++ childsplay-0.83/assetml/childsplay/memory-136x136/memory-136x136.assetml 2006-08-27 14:09:03.000000000 +0200
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<AssetML dataset="" rootdir="../childsplay/memory/" locale="en">
+<AssetML dataset="" rootdir="../childsplay/memory-136x136/" locale="en">
<Asset file="apple.png" mimetype="image/png">
<Description>Apple</Description>
<Description xml:lang="ar">تفاحة</Description>
--- childsplay-0.83/childsplay.py.aap 2006-08-27 10:53:02.000000000 +0200
+++ childsplay-0.83/childsplay.py 2006-08-27 14:09:03.000000000 +0200
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/python
# -*- coding: utf-8 -*-
"""
Copyright (C) 2002-2006 Stas Z. <stas.zytkiewicz@gmail.com>
@@ -291,10 +291,10 @@
# create two assetmlSDL instances one for parsing images and one for sounds
Assets_img = pyassetmlSDL.AssetmlSDL()
-Assets_img.set_mldir('childsplay/childsplay-images/childsplay-images.assetml')
+Assets_img.set_mldir('childsplay-images.assetml')
Assets_snd = pyassetmlSDL.AssetmlSDL()
-Assets_snd.set_mldir('childsplay/childsplay-sounds/childsplay-sounds.assetml')
+Assets_snd.set_mldir('childsplay-sounds.assetml')
############################################
########### End toplevel code #####################
--- childsplay-0.83/pyassetml.py.aap 2006-08-27 10:53:02.000000000 +0200
+++ childsplay-0.83/pyassetml.py 2006-08-27 14:09:03.000000000 +0200
@@ -164,9 +164,9 @@
rootnode = self.xml.getElementsByTagName('AssetML')[0]
self.root_obj = RootNode()
self.root_obj.dataset = rootnode.attributes[u'dataset'].value
- path = rootnode.attributes[u'rootdir'].value[3:] #path starts with ../, loose it
- #self.root_obj.rootdir = os.path.join(self.parserroot, path)
- self.root_obj.rootdir = self.parserroot
+ path = rootnode.attributes[u'rootdir'].value
+ self.root_obj.rootdir = os.path.join(self.parserroot, path)
+ #self.root_obj.rootdir = self.parserroot
self.root_obj.locale = rootnode.attributes[u'locale'].value
for node in self.xmlnodes: