|
|
|
@ -418,7 +418,6 @@ rgbdata_t *Mod_CreateSkinData( model_t *mod, byte *data, int width, int height )
@@ -418,7 +418,6 @@ rgbdata_t *Mod_CreateSkinData( model_t *mod, byte *data, int width, int height )
|
|
|
|
|
static rgbdata_t skin; |
|
|
|
|
char name[MAX_QPATH]; |
|
|
|
|
int i; |
|
|
|
|
model_t *loadmodel = gEngfuncs.Mod_GetCurrentLoadingModel(); |
|
|
|
|
|
|
|
|
|
skin.width = width; |
|
|
|
|
skin.height = height; |
|
|
|
@ -443,7 +442,7 @@ rgbdata_t *Mod_CreateSkinData( model_t *mod, byte *data, int width, int height )
@@ -443,7 +442,7 @@ rgbdata_t *Mod_CreateSkinData( model_t *mod, byte *data, int width, int height )
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
COM_FileBase( loadmodel->name, name, sizeof( name )); |
|
|
|
|
COM_FileBase( mod->name, name, sizeof( name )); |
|
|
|
|
|
|
|
|
|
// for alias models only player can have remap textures
|
|
|
|
|
if( mod != NULL && !Q_stricmp( name, "player" )) |
|
|
|
@ -476,12 +475,11 @@ rgbdata_t *Mod_CreateSkinData( model_t *mod, byte *data, int width, int height )
@@ -476,12 +475,11 @@ rgbdata_t *Mod_CreateSkinData( model_t *mod, byte *data, int width, int height )
|
|
|
|
|
return gEngfuncs.FS_CopyImage( &skin ); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void *Mod_LoadSingleSkin( daliasskintype_t *pskintype, int skinnum, int size ) |
|
|
|
|
void *Mod_LoadSingleSkin( model_t *loadmodel, daliasskintype_t *pskintype, int skinnum, int size ) |
|
|
|
|
{ |
|
|
|
|
string name, lumaname; |
|
|
|
|
string checkname; |
|
|
|
|
rgbdata_t *pic; |
|
|
|
|
model_t *loadmodel = gEngfuncs.Mod_GetCurrentLoadingModel(); |
|
|
|
|
|
|
|
|
|
Q_snprintf( name, sizeof( name ), "%s:frame%i", loadmodel->name, skinnum ); |
|
|
|
|
Q_snprintf( lumaname, sizeof( lumaname ), "%s:luma%i", loadmodel->name, skinnum ); |
|
|
|
@ -508,14 +506,13 @@ void *Mod_LoadSingleSkin( daliasskintype_t *pskintype, int skinnum, int size )
@@ -508,14 +506,13 @@ void *Mod_LoadSingleSkin( daliasskintype_t *pskintype, int skinnum, int size )
|
|
|
|
|
return ((byte *)(pskintype + 1) + size); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void *Mod_LoadGroupSkin( daliasskintype_t *pskintype, int skinnum, int size ) |
|
|
|
|
void *Mod_LoadGroupSkin( model_t *loadmodel, daliasskintype_t *pskintype, int skinnum, int size ) |
|
|
|
|
{ |
|
|
|
|
daliasskininterval_t *pinskinintervals; |
|
|
|
|
daliasskingroup_t *pinskingroup; |
|
|
|
|
string name, lumaname; |
|
|
|
|
rgbdata_t *pic; |
|
|
|
|
int i, j; |
|
|
|
|
model_t *loadmodel = gEngfuncs.Mod_GetCurrentLoadingModel(); |
|
|
|
|
|
|
|
|
|
// animating skin group. yuck.
|
|
|
|
|
pskintype++; |
|
|
|
@ -555,7 +552,7 @@ void *Mod_LoadGroupSkin( daliasskintype_t *pskintype, int skinnum, int size )
@@ -555,7 +552,7 @@ void *Mod_LoadGroupSkin( daliasskintype_t *pskintype, int skinnum, int size )
|
|
|
|
|
Mod_LoadAllSkins |
|
|
|
|
=============== |
|
|
|
|
*/ |
|
|
|
|
void *Mod_LoadAllSkins( int numskins, daliasskintype_t *pskintype ) |
|
|
|
|
void *Mod_LoadAllSkins( model_t *mod, int numskins, daliasskintype_t *pskintype ) |
|
|
|
|
{ |
|
|
|
|
int i, size; |
|
|
|
|
|
|
|
|
@ -568,11 +565,11 @@ void *Mod_LoadAllSkins( int numskins, daliasskintype_t *pskintype )
@@ -568,11 +565,11 @@ void *Mod_LoadAllSkins( int numskins, daliasskintype_t *pskintype )
|
|
|
|
|
{ |
|
|
|
|
if( pskintype->type == ALIAS_SKIN_SINGLE ) |
|
|
|
|
{ |
|
|
|
|
pskintype = (daliasskintype_t *)Mod_LoadSingleSkin( pskintype, i, size ); |
|
|
|
|
pskintype = (daliasskintype_t *)Mod_LoadSingleSkin( mod, pskintype, i, size ); |
|
|
|
|
} |
|
|
|
|
else |
|
|
|
|
{ |
|
|
|
|
pskintype = (daliasskintype_t *)Mod_LoadGroupSkin( pskintype, i, size ); |
|
|
|
|
pskintype = (daliasskintype_t *)Mod_LoadGroupSkin( mod, pskintype, i, size ); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -680,7 +677,7 @@ void Mod_LoadAliasModel( model_t *mod, const void *buffer, qboolean *loaded )
@@ -680,7 +677,7 @@ void Mod_LoadAliasModel( model_t *mod, const void *buffer, qboolean *loaded )
|
|
|
|
|
|
|
|
|
|
// load the skins
|
|
|
|
|
pskintype = (daliasskintype_t *)&pinmodel[1]; |
|
|
|
|
pskintype = Mod_LoadAllSkins( m_pAliasHeader->numskins, pskintype ); |
|
|
|
|
pskintype = Mod_LoadAllSkins( mod, m_pAliasHeader->numskins, pskintype ); |
|
|
|
|
|
|
|
|
|
// load base s and t vertices
|
|
|
|
|
pinstverts = (stvert_t *)pskintype; |
|
|
|
@ -725,7 +722,7 @@ void Mod_LoadAliasModel( model_t *mod, const void *buffer, qboolean *loaded )
@@ -725,7 +722,7 @@ void Mod_LoadAliasModel( model_t *mod, const void *buffer, qboolean *loaded )
|
|
|
|
|
GL_MakeAliasModelDisplayLists( mod ); |
|
|
|
|
|
|
|
|
|
// move the complete, relocatable alias model to the cache
|
|
|
|
|
gEngfuncs.Mod_GetCurrentLoadingModel()->cache.data = m_pAliasHeader; |
|
|
|
|
mod->cache.data = m_pAliasHeader; |
|
|
|
|
|
|
|
|
|
if( loaded ) *loaded = true; // done
|
|
|
|
|
} |
|
|
|
|