Changes between Version 3 and Version 4 of CSimluation2


Ignore:
Timestamp:
2010-07-05 12:11:30 (3 years ago)
Author:
chlin
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • CSimluation2

    v3 v4  
    4545        ); 
    4646} 
     47 
    4748... 
    4849 
     50bool CSimulation2Impl::LoadScripts(const VfsPath& path) 
     51{ 
     52        VfsPaths pathnames; 
     53        if (fs_util::GetPathnames(g_VFS, path, L"*.js", pathnames) < 0) 
     54                return false; 
     55 
     56        bool ok = true; 
     57        for (VfsPaths::iterator it = pathnames.begin(); it != pathnames.end(); ++it) 
     58        { 
     59                std::wstring filename = it->string(); 
     60                m_LoadedScripts.insert(filename); 
     61                LOGMESSAGE(L"Loading simulation script '%ls'", filename.c_str()); 
     62                if (! m_ComponentManager.LoadScript(filename)) 
     63                        ok = false; 
     64        } 
     65        return ok; 
     66} 
     67 
     68 
    4969}}}