model: move client functions to bottom of file

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
This commit is contained in:
Kevin Shanahan 2012-11-19 12:13:40 +10:30
parent c1fad68619
commit 1868f3b93a

View File

@ -63,29 +63,6 @@ Mod_Init(const model_loader_t *loader)
mod_loader = loader;
}
/*
===============
Mod_Extradata
Caches the data if needed
===============
*/
void *
Mod_Extradata(model_t *mod)
{
void *r;
r = Cache_Check(&mod->cache);
if (r)
return r;
Mod_LoadModel(mod, true);
if (!mod->cache.data)
SV_Error("%s: caching failed", __func__);
return mod->cache.data;
}
/*
===============
Mod_PointInLeaf
@ -223,25 +200,6 @@ Mod_FindName(char *name)
return mod;
}
/*
==================
Mod_TouchModel
==================
*/
void
Mod_TouchModel(char *name)
{
model_t *mod;
mod = Mod_FindName(name);
if (!mod->needload) {
if (mod->type == mod_alias)
Cache_Check(&mod->cache);
}
}
/*
==================
Mod_LoadModel
@ -1282,6 +1240,29 @@ byte player_8bit_texels[320 * 200];
//=============================================================================
/*
===============
Mod_Extradata
Caches the data if needed
===============
*/
void *
Mod_Extradata(model_t *mod)
{
void *r;
r = Cache_Check(&mod->cache);
if (r)
return r;
Mod_LoadModel(mod, true);
if (!mod->cache.data)
Sys_Error("%s: caching failed", __func__);
return mod->cache.data;
}
/*
================
Mod_Print
@ -1298,3 +1279,22 @@ Mod_Print(void)
Con_Printf("%8p : %s\n", mod->cache.data, mod->name);
}
}
/*
==================
Mod_TouchModel
==================
*/
void
Mod_TouchModel(char *name)
{
model_t *mod;
mod = Mod_FindName(name);
if (!mod->needload) {
if (mod->type == mod_alias)
Cache_Check(&mod->cache);
}
}