Changeset 3661
- Timestamp:
- 06/01/11 04:43:27 (2 years ago)
- Location:
- branches/active/0.3.3dev/engine/core/loaders/native/map
- Files:
-
- 3 edited
-
animationloader.cpp (modified) (1 diff)
-
animationloader.h (modified) (2 diffs)
-
maploader.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/active/0.3.3dev/engine/core/loaders/native/map/animationloader.cpp
r3660 r3661 47 47 static Logger _log(LM_NATIVE_LOADERS); 48 48 49 AnimationLoader::AnimationLoader(VFS* vfs, ImageManager* imageManager , const std::string& mapDirectory)50 : m_vfs(vfs), m_imageManager(imageManager) , m_mapDirectory(mapDirectory){49 AnimationLoader::AnimationLoader(VFS* vfs, ImageManager* imageManager) 50 : m_vfs(vfs), m_imageManager(imageManager) { 51 51 52 52 } -
branches/active/0.3.3dev/engine/core/loaders/native/map/animationloader.h
r3660 r3661 42 42 class AnimationLoader : public IAnimationLoader { 43 43 public: 44 AnimationLoader(VFS* vfs, ImageManager* imageManager , const std::string& mapDirectory);44 AnimationLoader(VFS* vfs, ImageManager* imageManager); 45 45 46 46 /** … … 57 57 VFS* m_vfs; 58 58 ImageManager* m_imageManager; 59 std::string m_mapDirectory;60 59 }; 61 60 } -
branches/active/0.3.3dev/engine/core/loaders/native/map/maploader.cpp
r3660 r3661 86 86 87 87 // create a new animation loader 88 m_animationLoader.reset(new AnimationLoader(m_vfs, m_imageManager, m_mapDirectory)); 89 90 m_vfs->addSource(new VFSDirectory(m_vfs, mapPath.branch_path().directory_string())); 88 m_animationLoader.reset(new AnimationLoader(m_vfs, m_imageManager)); 91 89 } 92 90 } … … 171 169 172 170 if (importDir && !importFile) { 173 loadImportDirectory(directory); 171 fs::path fullPath(m_mapDirectory); 172 fullPath /= directory; 173 loadImportDirectory(fullPath.directory_string()); 174 174 } 175 175 else if (importFile) { 176 loadImportFile(file, directory); 176 fs::path fullFilePath(file); 177 fs::path fullDirPath(directory); 178 if (importDir) { 179 fullDirPath = fs::path(m_mapDirectory); 180 fullDirPath /= directory; 181 } 182 else { 183 fullFilePath = fs::path(m_mapDirectory); 184 fullFilePath /= file; 185 } 186 loadImportFile(fullFilePath.file_string(), fullDirPath.directory_string()); 177 187 } 178 188 }
Note: See TracChangeset
for help on using the changeset viewer.
