mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2024-11-13 00:24:44 +00:00
models: Show list of model images in developer mode
This commit is contained in:
parent
057087b7dc
commit
4a6632dac6
4 changed files with 51 additions and 6 deletions
|
@ -606,6 +606,17 @@ Mod_LoadModel_MDL(const char *mod_name, const void *buffer, int modfilelen,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
|
||||||
|
for (i = 0; i < pheader->num_skins; i++)
|
||||||
|
{
|
||||||
|
R_Printf(PRINT_DEVELOPER, "%s: %s #%d: Should load internal '%s'\n",
|
||||||
|
__func__, mod_name, i,
|
||||||
|
(char *)pheader + pheader->ofs_skins + i*MAX_SKINNAME);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
*type = mod_alias;
|
*type = mod_alias;
|
||||||
|
|
||||||
mins[0] = -32;
|
mins[0] = -32;
|
||||||
|
@ -789,10 +800,17 @@ Mod_LoadModel_MD2(const char *mod_name, const void *buffer, int modfilelen,
|
||||||
pincmd = (int *)((byte *)buffer + pinmodel.ofs_glcmds);
|
pincmd = (int *)((byte *)buffer + pinmodel.ofs_glcmds);
|
||||||
Mod_LoadCmdList(mod_name, pheader, pincmd);
|
Mod_LoadCmdList(mod_name, pheader, pincmd);
|
||||||
|
|
||||||
// register all skins
|
/* register all skins */
|
||||||
memcpy((char *)pheader + pheader->ofs_skins, (char *)buffer + pinmodel.ofs_skins,
|
memcpy((char *)pheader + pheader->ofs_skins, (char *)buffer + pinmodel.ofs_skins,
|
||||||
pheader->num_skins * MAX_SKINNAME);
|
pheader->num_skins * MAX_SKINNAME);
|
||||||
|
|
||||||
|
for (i = 0; i < pheader->num_skins; i++)
|
||||||
|
{
|
||||||
|
R_Printf(PRINT_DEVELOPER, "%s: %s #%d: Should load external '%s'\n",
|
||||||
|
__func__, mod_name, i,
|
||||||
|
(char *)pheader + pheader->ofs_skins + i*MAX_SKINNAME);
|
||||||
|
}
|
||||||
|
|
||||||
*type = mod_alias;
|
*type = mod_alias;
|
||||||
|
|
||||||
mins[0] = -32;
|
mins[0] = -32;
|
||||||
|
@ -1093,6 +1111,17 @@ Mod_LoadModel_Flex(const char *mod_name, const void *buffer, int modfilelen,
|
||||||
src += size;
|
src += size;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
|
||||||
|
for (i = 0; i < pheader->num_skins; i++)
|
||||||
|
{
|
||||||
|
R_Printf(PRINT_DEVELOPER, "%s: %s #%d: Should load external '%s'\n",
|
||||||
|
__func__, mod_name, i,
|
||||||
|
(char *)pheader + pheader->ofs_skins + i * MAX_SKINNAME);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
*type = mod_alias;
|
*type = mod_alias;
|
||||||
|
|
||||||
mins[0] = -32;
|
mins[0] = -32;
|
||||||
|
@ -1225,6 +1254,13 @@ Mod_LoadModel_DKM(const char *mod_name, const void *buffer, int modfilelen,
|
||||||
Mod_LoadDkmTriangleList (pheader,
|
Mod_LoadDkmTriangleList (pheader,
|
||||||
(dkmtriangle_t *)((byte *)buffer + header.ofs_tris));
|
(dkmtriangle_t *)((byte *)buffer + header.ofs_tris));
|
||||||
|
|
||||||
|
for (i = 0; i < pheader->num_skins; i++)
|
||||||
|
{
|
||||||
|
R_Printf(PRINT_DEVELOPER, "%s: %s #%d: Should load external '%s'\n",
|
||||||
|
__func__, mod_name, i,
|
||||||
|
(char *)pheader + pheader->ofs_skins + i * MAX_SKINNAME);
|
||||||
|
}
|
||||||
|
|
||||||
*type = mod_alias;
|
*type = mod_alias;
|
||||||
|
|
||||||
mins[0] = -32;
|
mins[0] = -32;
|
||||||
|
@ -1282,6 +1318,13 @@ Mod_LoadSprite_SP2 (const char *mod_name, const void *buffer, int modfilelen,
|
||||||
memcpy(sprout->frames[i].name, sprin->frames[i].name, MAX_SKINNAME);
|
memcpy(sprout->frames[i].name, sprin->frames[i].name, MAX_SKINNAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for (i = 0; i < sprout->numframes; i++)
|
||||||
|
{
|
||||||
|
R_Printf(PRINT_DEVELOPER, "%s: %s #%d: Should load external '%s'\n",
|
||||||
|
__func__, mod_name, i,
|
||||||
|
sprout->frames[i].name);
|
||||||
|
}
|
||||||
|
|
||||||
*type = mod_sprite;
|
*type = mod_sprite;
|
||||||
|
|
||||||
return extradata;
|
return extradata;
|
||||||
|
|
|
@ -698,7 +698,8 @@ R_FindPic(const char *name, findimage_t find_image)
|
||||||
if(!ext[0])
|
if(!ext[0])
|
||||||
{
|
{
|
||||||
/* file has no extension */
|
/* file has no extension */
|
||||||
strncpy(namewe, name, MAX_QPATH);
|
strncpy(namewe, name, sizeof(namewe) - 1);
|
||||||
|
namewe[sizeof(namewe) - 1] = 0;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -709,6 +710,7 @@ R_FindPic(const char *name, findimage_t find_image)
|
||||||
/* Remove the extension */
|
/* Remove the extension */
|
||||||
memset(namewe, 0, MAX_QPATH);
|
memset(namewe, 0, MAX_QPATH);
|
||||||
memcpy(namewe, name, len - (strlen(ext) + 1));
|
memcpy(namewe, name, len - (strlen(ext) + 1));
|
||||||
|
namewe[len - (strlen(ext))] = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Quake 2 */
|
/* Quake 2 */
|
||||||
|
|
|
@ -40,7 +40,7 @@ R_DrawSprite(entity_t *currententity, const model_t *currentmodel)
|
||||||
vec3_t left, up, right, down;
|
vec3_t left, up, right, down;
|
||||||
dsprite_t *s_psprite;
|
dsprite_t *s_psprite;
|
||||||
dsprframe_t *s_psprframe;
|
dsprframe_t *s_psprframe;
|
||||||
image_t *skin;
|
image_t *skin = NULL;
|
||||||
|
|
||||||
s_psprite = (dsprite_t *)currentmodel->extradata;
|
s_psprite = (dsprite_t *)currentmodel->extradata;
|
||||||
currententity->frame %= s_psprite->numframes;
|
currententity->frame %= s_psprite->numframes;
|
||||||
|
|
|
@ -308,8 +308,6 @@ Cmd_Chasecam_Toggle(edict_t *ent)
|
||||||
void
|
void
|
||||||
CheckChasecam_Viewent(edict_t *ent)
|
CheckChasecam_Viewent(edict_t *ent)
|
||||||
{
|
{
|
||||||
vec3_t angles;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Oldplayer is the fake player that everyone else sees.
|
Oldplayer is the fake player that everyone else sees.
|
||||||
Assign the same client as the ent we're following so the game
|
Assign the same client as the ent we're following so the game
|
||||||
|
@ -323,6 +321,8 @@ CheckChasecam_Viewent(edict_t *ent)
|
||||||
* Even though people can't see us we still have all this stuff */
|
* Even though people can't see us we still have all this stuff */
|
||||||
if ((ent->client->chasetoggle == 1) && (ent->client->oldplayer))
|
if ((ent->client->chasetoggle == 1) && (ent->client->oldplayer))
|
||||||
{
|
{
|
||||||
|
vec3_t angles = {0};
|
||||||
|
|
||||||
if (ent->client->use)
|
if (ent->client->use)
|
||||||
{
|
{
|
||||||
VectorCopy(ent->client->oldplayer->s.angles, angles);
|
VectorCopy(ent->client->oldplayer->s.angles, angles);
|
||||||
|
|
Loading…
Reference in a new issue