Skip to content

Commit

Permalink
Refactor: Continued splitting up ClientResources
Browse files Browse the repository at this point in the history
A couple of methods not specific to the client moved to libdoomsday.
  • Loading branch information
skyjake committed Jul 29, 2016
1 parent f28763c commit f9aafa5
Show file tree
Hide file tree
Showing 10 changed files with 550 additions and 546 deletions.
16 changes: 2 additions & 14 deletions doomsday/apps/client/include/resource/clientresources.h
Expand Up @@ -117,8 +117,6 @@ class ClientResources : public Resources

void addColorPalette(res::ColorPalette &newPalette, de::String const &name);

patchid_t declarePatch(de::String encodedName);

#ifdef __CLIENT__

/**
Expand Down Expand Up @@ -423,18 +421,6 @@ class ClientResources : public Resources

#endif // __CLIENT__

/**
* Attempt to locate a music file referenced in the given @em Music @a definition. Songs
* can be either in external files or non-MUS lumps.
*
* @note Lump based music is presently handled separately!!
*
* @param musicDef Music definition to find the music file for.
*
* @return Absolute path to the music if found; otherwise a zero-length string.
*/
de::String tryFindMusicFile(de::Record const &musicDef);

public: /// @todo Should be private:
void initTextures();
void initSystemTextures();
Expand All @@ -447,10 +433,12 @@ class ClientResources : public Resources
void pruneUnusedTextureSpecs();

public:
#ifdef __CLIENT__
/**
* Register the console commands, variables, etc..., of this module.
*/
static void consoleRegister();
#endif

private:
DENG2_PRIVATE(d)
Expand Down
2 changes: 1 addition & 1 deletion doomsday/apps/client/src/render/r_draw.cpp
Expand Up @@ -62,7 +62,7 @@ static void loadViewBorderPatches()
borderPatches[0] = 0;
for(uint i = 1; i < 9; ++i)
{
borderPatches[i] = ClientResources::get().declarePatch(borderGraphicsNames[i]->path());
borderPatches[i] = res::Textures::get().declarePatch(borderGraphicsNames[i]->path());
}

// Detemine the view border size.
Expand Down
2 changes: 1 addition & 1 deletion doomsday/apps/client/src/resource/base/api_resource.cpp
Expand Up @@ -319,7 +319,7 @@ DENG_EXTERN_C uri_s *R_ComposePatchUri(patchid_t id)
#undef R_DeclarePatch
DENG_EXTERN_C patchid_t R_DeclarePatch(char const *encodedName)
{
return App_ResourceSystem().declarePatch(encodedName);
return res::Textures::get().declarePatch(encodedName);
}

#undef R_GetPatchInfo
Expand Down

0 comments on commit f9aafa5

Please sign in to comment.