Mercurial > fife-parpg
comparison engine/extensions/loaders.py @ 10:ab09325f901e
Camera was attached to instance on a different layer, resulting in strange scrolling. Fixed it, and added a check to prevent this happening again (attach-to-other-layer fails and logs a warning).
author | jwt@33b003aa-7bff-0310-803a-e67f0ece8222 |
---|---|
date | Sun, 06 Jul 2008 17:13:06 +0000 |
parents | 4a0efb7baf70 |
children | 5e85737281bc |
comparison
equal
deleted
inserted
replaced
9:983c0af2a1e1 | 10:ab09325f901e |
---|---|
19 res = None | 19 res = None |
20 try: | 20 try: |
21 res = object_loader.loadResource(fife.ResourceLocation(path)) | 21 res = object_loader.loadResource(fife.ResourceLocation(path)) |
22 print 'imported object file ' + path | 22 print 'imported object file ' + path |
23 except WrongFileType: | 23 except WrongFileType: |
24 print 'ignored non-object file ' + path | 24 pass |
25 # print 'ignored non-object file ' + path | |
25 except NameClash: | 26 except NameClash: |
26 print 'ignored already loaded file ' + path | 27 pass |
28 # print 'ignored already loaded file ' + path | |
27 return res | 29 return res |
28 | 30 |
29 def loadImportDir(path, engine): | 31 def loadImportDir(path, engine): |
30 for file in filter(lambda f: f.split('.')[-1] == 'xml', engine.getVFS().listFiles(path)): | 32 for file in filter(lambda f: f.split('.')[-1] == 'xml', engine.getVFS().listFiles(path)): |
31 loadImportFile('/'.join([path, file]), engine) | 33 loadImportFile('/'.join([path, file]), engine) |