/[usata]/usata2/src/texture-manager.cpp
ViewVC logotype

Diff of /usata2/src/texture-manager.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.3 by skunix, Sun Dec 26 08:03:34 2004 UTC revision 1.4 by skunix, Sun Dec 26 09:35:23 2004 UTC
# Line 12  Line 12 
12  //  //
13  // $Id$  // $Id$
14  // $Log$  // $Log$
15    // Revision 1.4  2004/12/26 09:35:23  skunix
16    // use logging functionality
17    //
18  // Revision 1.3  2004/12/26 08:03:34  skunix  // Revision 1.3  2004/12/26 08:03:34  skunix
19  // changed lambda::bind's to boost::binds  // changed lambda::bind's to boost::binds
20  //  //
# Line 119  TextureManager::add_meta(const TextureMe Line 122  TextureManager::add_meta(const TextureMe
122  {  {
123          impl->meta.insert(TextureManagerImpl::MetaMap::value_type(m->alias, *m));          impl->meta.insert(TextureManagerImpl::MetaMap::value_type(m->alias, *m));
124  }  }
125    /*
126  void  void
127  adjust_add_meta(boost::filesystem::path p, TextureManager*tm, const TextureMeta*m)  adjust_add_meta(boost::filesystem::path p, TextureManager*tm, const TextureMeta*m)
128  {  {
# Line 127  adjust_add_meta(boost::filesystem::path Line 130  adjust_add_meta(boost::filesystem::path
130    
131          boost::filesystem::path fullpath = p / m->filename;          boost::filesystem::path fullpath = p / m->filename;
132                    
133          std::cout << m->filename << " becomes " << fullpath.native_file_string() << std::endl;  //      std::cout << m->filename << " becomes " << fullpath.native_file_string() << std::endl;
134          TextureMeta adjusted(*m);          TextureMeta adjusted(*m);
135    
136          adjusted.filename=fullpath.native_file_string();          adjusted.filename=fullpath.native_file_string();
137          tm->add_meta(&adjusted);          tm->add_meta(&adjusted);
138          return;          return;
139  }  }
140    */
141    
142  Texture_sp  Texture_sp
143  TextureManager::get(const std::string& texAlias)  TextureManager::get(const std::string& texAlias)
# Line 155  void Line 158  void
158  TextureManager::load_path(const boost::filesystem::path& p)  TextureManager::load_path(const boost::filesystem::path& p)
159  {  {
160          using boost::filesystem::path;          using boost::filesystem::path;
161          log::Stream logstream(&log::server, log::Level::INFO);          log::Stream2 logstream; //(&log::server, log::Level::INFO);
162          path mf = p / "textures" / "meta";          path mf = p / "textures" / "meta";
163          logstream << (boost::format("Loading texture metadata from '%1%'\n")%mf.native_file_string()).str();// << std::endl;          logstream << (boost::format("Loading texture metadata from '%1%'")%mf.native_file_string()).str() << log::Commit;
164                    
165    
166          texture_meta_parse(mf,          texture_meta_parse(mf,
167                  boost::bind(&TextureManager::add_meta,this,_1)                  boost::bind(&TextureManager::add_meta,this,_1)
168                  );                  );
169                    
         std::cout << mf.string() << std::endl;  
170  }  }
171    
172    

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26