Skip to content

Commit

Permalink
Resources: Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
danij-deng committed Dec 4, 2013
1 parent 69de139 commit f78ac1e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
10 changes: 5 additions & 5 deletions doomsday/client/include/resource/resourcesystem.h
Expand Up @@ -224,15 +224,15 @@ class ResourceSystem : public de::System
uint materialCount() const { return allMaterials().count(); }

/**
* Returns @c true iff a Scheme exists with the symbolic @a name.
* Returns @c true iff a MaterialScheme exists with the symbolic @a name.
*/
bool knownMaterialScheme(de::String name) const;

/**
* Lookup a subspace scheme by symbolic name.
* Lookup a material resource scheme by symbolic name.
*
* @param name Symbolic name of the scheme.
* @return Scheme associated with @a name.
* @return MaterialScheme associated with @a name.
*
* @throws UnknownSchemeError If @a name is unknown.
*
Expand All @@ -246,12 +246,12 @@ class ResourceSystem : public de::System
MaterialSchemes const &allMaterialSchemes() const;

/**
* Returns the total number of manifest schemes in the collection.
* Returns the total number of material manifest schemes in the collection.
*/
inline int materialSchemeCount() const { return allMaterialSchemes().count(); }

/**
* Clear all manifests and materials in all schemes.
* Clear all materials (and their manifests) in all schemes.
*
* @see allMaterialSchemes(), MaterialScheme::clear().
*/
Expand Down
4 changes: 2 additions & 2 deletions doomsday/client/src/def_main.cpp
Expand Up @@ -1147,7 +1147,7 @@ static void rebuildMaterialLayers(Material &material, ded_material_t const &def)

try
{
Texture &texture = App_ResourceSystem().textureManifest(reinterpret_cast<de::Uri const &>(*gm.material)).texture();
Texture &texture = App_ResourceSystem().texture(reinterpret_cast<de::Uri const &>(*gm.material));
layer0->addStage(Material::Layer::Stage(&texture, gm.tics, gm.randomTics / float( gm.tics )));
}
catch(TextureManifest::MissingTextureError const &)
Expand Down Expand Up @@ -1369,7 +1369,7 @@ static void interpretMaterialDef(ded_material_t const &def)
{
try
{
Texture &texture = App_ResourceSystem().textureManifest(*reinterpret_cast<de::Uri *>(firstLayer.stages[0].texture)).texture();
Texture &texture = App_ResourceSystem().texture(*reinterpret_cast<de::Uri *>(firstLayer.stages[0].texture));
if(texture.isFlagged(Texture::Custom))
{
manifest->setFlags(MaterialManifest::Custom);
Expand Down
2 changes: 1 addition & 1 deletion doomsday/client/src/resource/material.cpp
Expand Up @@ -49,7 +49,7 @@ static Texture *findTextureForLayerStage(ded_material_layer_stage_t const &def)
{
if(def.texture)
{
return &App_ResourceSystem().textureManifest(*reinterpret_cast<de::Uri *>(def.texture)).texture();
return &App_ResourceSystem().texture(*reinterpret_cast<de::Uri *>(def.texture));
}
}
catch(TextureManifest::MissingTextureError const &)
Expand Down

0 comments on commit f78ac1e

Please sign in to comment.