mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2024-11-25 22:10:59 +00:00
models: move load code to separate function
This commit is contained in:
parent
ce98c8a957
commit
7203b0ed78
1 changed files with 22 additions and 5 deletions
|
@ -3023,11 +3023,9 @@ Mod_LoadMinMaxUpdate(const char *mod_name, vec3_t mins, vec3_t maxs, void *extra
|
|||
Mod_LoadModel
|
||||
=================
|
||||
*/
|
||||
void *
|
||||
Mod_LoadModel(const char *mod_name, const void *buffer, int modfilelen,
|
||||
vec3_t mins, vec3_t maxs, struct image_s ***skins, int *numskins,
|
||||
findimage_t find_image, loadimage_t load_image, readfile_t read_file,
|
||||
modtype_t *type)
|
||||
static void *
|
||||
Mod_LoadModelFile(const char *mod_name, const void *buffer, int modfilelen,
|
||||
struct image_s ***skins, int *numskins, readfile_t read_file, modtype_t *type)
|
||||
{
|
||||
void *extradata = NULL;
|
||||
|
||||
|
@ -3104,6 +3102,25 @@ Mod_LoadModel(const char *mod_name, const void *buffer, int modfilelen,
|
|||
break;
|
||||
}
|
||||
|
||||
return extradata;
|
||||
}
|
||||
|
||||
/*
|
||||
=================
|
||||
Mod_LoadModel
|
||||
=================
|
||||
*/
|
||||
void *
|
||||
Mod_LoadModel(const char *mod_name, const void *buffer, int modfilelen,
|
||||
vec3_t mins, vec3_t maxs, struct image_s ***skins, int *numskins,
|
||||
findimage_t find_image, loadimage_t load_image, readfile_t read_file,
|
||||
modtype_t *type)
|
||||
{
|
||||
void *extradata;
|
||||
|
||||
extradata = Mod_LoadModelFile(mod_name, buffer, modfilelen, skins, numskins,
|
||||
read_file, type);
|
||||
|
||||
if (extradata)
|
||||
{
|
||||
Mod_LoadMinMaxUpdate(mod_name, mins, maxs, extradata, *type);
|
||||
|
|
Loading…
Reference in a new issue