Skip to content

Commit

Permalink
Merge branch 'master' of ssh://github.com/skyjake/Doomsday-Engine
Browse files Browse the repository at this point in the history
  • Loading branch information
skyjake committed Nov 22, 2012
2 parents 00adb5a + 8f13a39 commit 998129b
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 30 deletions.
49 changes: 26 additions & 23 deletions doomsday/engine/include/filesys/fs_main.h
Expand Up @@ -140,6 +140,12 @@ namespace de
/// @return Symbolic name of this scheme (e.g., "Models").
String const& name() const;

/**
* Clear this scheme back to it's "empty" state (i.e., no resources).
* The search path groups are unaffected.
*/
void clear();

/**
* Rebuild this scheme by re-scanning for resources on all search paths
* and re-populating the scheme's index.
Expand All @@ -148,17 +154,12 @@ namespace de
*/
void rebuild();

/**
* Clear this scheme back to it's "empty" state (i.e., no resources).
* The search path groups are unaffected.
*/
void clear();

/**
* Reset this scheme, returning it to an empty state and clearing any
* @ref ExtraPaths which have been registered since its construction.
*/
inline void reset() {
inline void reset()
{
clearSearchPathGroup(ExtraPaths);
clear();
}
Expand Down Expand Up @@ -194,11 +195,6 @@ namespace de
*/
bool addSearchPath(SearchPath const& path, PathGroup group = DefaultPaths);

/**
* Clear all search paths in all groups in the scheme.
*/
void clearAllSearchPaths();

/**
* Clear search paths in @a group from the scheme.
*
Expand All @@ -209,7 +205,12 @@ namespace de
/**
* Provides access to the search paths for efficient traversals.
*/
SearchPaths const& searchPaths() const;
SearchPaths const& allSearchPaths() const;

/**
* Clear all search paths in all groups in the scheme.
*/
void clearAllSearchPaths();

/**
* Apply mapping for this scheme to the specified path. Mapping must be
Expand Down Expand Up @@ -280,9 +281,12 @@ namespace de
void endStartup();

/**
* Returns @c true iff a Scheme exists with the symbolic @a name.
* Find a Scheme by symbolic name.
*
* @param name Symbolic name of the scheme.
* @return Scheme associated with @a name.
*/
bool knownScheme(String name);
Scheme& scheme(String name);

/**
* @param name Unique symbolic name of the new scheme. Must be at least
Expand All @@ -292,12 +296,14 @@ namespace de
Scheme& createScheme(String name, Scheme::Flags flags = 0);

/**
* Find a Scheme by symbolic name.
*
* @param name Symbolic name of the scheme.
* @return Scheme associated with @a name.
* Returns @c true iff a Scheme exists with the symbolic @a name.
*/
Scheme& scheme(String name);
bool knownScheme(String name);

/**
* Returns the schemes for efficient traversal.
*/
Schemes const& allSchemes();

/**
* Reset all the schemes, returning their indexes to an empty state and clearing
Expand All @@ -309,9 +315,6 @@ namespace de
DENG2_FOR_EACH(Schemes, i, schemes){ (*i)->reset(); }
}

/// Returns the schemes for efficient traversal.
Schemes const& allSchemes();

/**
* Add a new path mapping from source to destination.
* @note Paths will be transformed into absolute paths if needed.
Expand Down
2 changes: 1 addition & 1 deletion doomsday/engine/src/filesys/fs_scheme.cpp
Expand Up @@ -475,7 +475,7 @@ void FS1::Scheme::clearAllSearchPaths()
d->searchPaths.clear();
}

FS1::Scheme::SearchPaths const& FS1::Scheme::searchPaths() const
FS1::Scheme::SearchPaths const& FS1::Scheme::allSearchPaths() const
{
return d->searchPaths;
}
Expand Down
6 changes: 3 additions & 3 deletions doomsday/engine/src/resource/wad.cpp
Expand Up @@ -516,13 +516,13 @@ size_t Wad::readLump(int lumpIdx, uint8_t* buffer, size_t startOffset,
LOG_AS("Wad::readLump");
WadFile const& file = reinterpret_cast<WadFile&>(lump(lumpIdx));

LOG_TRACE("\"%s:%s\" (%u bytes%s) [%lu +%lu]")
LOG_TRACE("\"%s:%s\" (%u bytes%s) [%u +%u]")
<< de::NativePath(composePath()).pretty()
<< de::NativePath(file.composePath()).pretty()
<< (unsigned long) file.size()
<< (file.isCompressed()? ", compressed" : "")
<< (unsigned long) startOffset
<< (unsigned long) length;
<< startOffset
<< length;

// Try to avoid a file system read by checking for a cached copy.
if(tryCache)
Expand Down
6 changes: 3 additions & 3 deletions doomsday/engine/src/resource/zip.cpp
Expand Up @@ -687,13 +687,13 @@ size_t Zip::readLump(int lumpIdx, uint8_t* buffer, size_t startOffset,
LOG_AS("Zip::readLump");
ZipFile const& file = reinterpret_cast<ZipFile&>(lump(lumpIdx));

LOG_TRACE("\"%s:%s\" (%u bytes%s) [%lu +%lu]")
LOG_TRACE("\"%s:%s\" (%u bytes%s) [%u +%u]")
<< de::NativePath(composePath()).pretty()
<< de::NativePath(file.composePath()).pretty()
<< (unsigned long) file.size()
<< (file.isCompressed()? ", compressed" : "")
<< (unsigned long) startOffset
<< (unsigned long) length;
<< startOffset
<< length;

// Try to avoid a file system read by checking for a cached copy.
if(tryCache)
Expand Down

0 comments on commit 998129b

Please sign in to comment.