Skip to content

Commit

Permalink
Model|Resources: Cleanup (method name consistency)
Browse files Browse the repository at this point in the history
  • Loading branch information
danij-deng committed Dec 1, 2013
1 parent 6f4976c commit e962b62
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions doomsday/client/include/gl/gl_model.h
Expand Up @@ -148,7 +148,7 @@ class Model
*
* @return Unique number of the found frame; otherwise @c -1 (not found).
*/
int toFrameNumber(de::String name) const;
int frameNumber(de::String name) const;

/**
* Convenient method of determining whether the specified model animation
Expand Down Expand Up @@ -190,7 +190,7 @@ class Model
*
* @return Unique number of the found skin; otherwise @c -1 (not found).
*/
int toSkinNumber(de::String name) const;
int skinNumber(de::String name) const;

/**
* Convenient method of determining whether the specified model skin @a number
Expand Down
2 changes: 1 addition & 1 deletion doomsday/client/include/resource/models.h
Expand Up @@ -253,7 +253,7 @@ void Models_Shutdown();
/**
* Lookup the unique index attributed to the given @a modelDef.
*
* @return Index of the definition; otherwise @c -1 if @a is unknown.
* @return Index of the definition; otherwise @c -1 if @a modelDef is unknown.
*/
int Models_ToIndex(modeldef_t const *modelDef);

Expand Down
4 changes: 2 additions & 2 deletions doomsday/client/src/def_main.cpp
Expand Up @@ -1903,11 +1903,11 @@ void Def_PostInit(void)
DENG2_ASSERT(mdl != 0);

st->model = Models_ToIndex(modef);
st->frame = mdl->toFrameNumber(st->frameName);
st->frame = mdl->frameNumber(st->frameName);
if(st->frame < 0) st->frame = 0;
if(st->endFrameName[0])
{
st->endFrame = mdl->toFrameNumber(st->endFrameName);
st->endFrame = mdl->frameNumber(st->endFrameName);
if(st->endFrame < 0) st->endFrame = 0;
}
else
Expand Down
6 changes: 3 additions & 3 deletions doomsday/client/src/gl/gl_model.cpp
Expand Up @@ -88,7 +88,7 @@ void Model::setFlags(Model::Flags flagsToChange, FlagOp operation)
applyFlagOperation(d->flags, flagsToChange, operation);
}

int Model::toFrameNumber(String name) const
int Model::frameNumber(String name) const
{
if(!name.isEmpty())
{
Expand Down Expand Up @@ -131,7 +131,7 @@ void Model::clearAllFrames()
d->frames.clear();
}

int Model::toSkinNumber(String name) const
int Model::skinNumber(String name) const
{
if(!name.isEmpty())
{
Expand All @@ -156,7 +156,7 @@ Model::Skin &Model::skin(int number) const

Model::Skin &Model::newSkin(String name)
{
if(int index = toSkinNumber(name) > 0)
if(int index = skinNumber(name) > 0)
{
return skin(index);
}
Expand Down
2 changes: 1 addition & 1 deletion doomsday/client/src/resource/models.cpp
Expand Up @@ -502,7 +502,7 @@ static void setupModel(ded_model_t &def)
if(!mdl) continue;

sub->modelId = mdl->modelId();
sub->frame = mdl->toFrameNumber(subdef->frame);
sub->frame = mdl->frameNumber(subdef->frame);
if(sub->frame < 0) sub->frame = 0;
sub->frameRange = de::max(1, subdef->frameRange); // Frame range must always be greater than zero.

Expand Down

0 comments on commit e962b62

Please sign in to comment.