NX/VITA: Stop using internal quake skin for zombies

This commit is contained in:
cypress 2023-07-21 13:21:10 -04:00
parent ed78a74b7f
commit c0d5d8988a
3 changed files with 28 additions and 13 deletions

View file

@ -427,7 +427,7 @@ void HUD_Points (void)
xplus = HUD_itoa (f, str);
#ifdef VITA
Draw_ColoredStringScale (((100 - xplus)/2)+5, 415, va("%i", current_points), 1, 1, 1, 1, 2.0f); //2x Scale/White
Draw_ColoredStringScale (((100 - xplus)/2)-5, 415, va("%i", current_points), 1, 1, 1, 1, 2.0f); //2x Scale/White
#else
Draw_String (vid.width/2 - (xplus*8) - 16, y + 3, va("%i", current_points));
#endif // VITA

View file

@ -2531,7 +2531,25 @@ void Mod_FloodFillSkin( byte *skin, int skinwidth, int skinheight )
Mod_LoadAllSkins
===============
*/
extern const char* zombie_skinss[4];
qboolean model_is_zombie(char name[MAX_QPATH])
{
if (strcmp(name, "models/ai/zb%.mdl") == 0 ||
strcmp(name, "models/ai/zbc%.mdl") == 0 ||
strcmp(name, "models/ai/zcfull.mdl") == 0 ||
strcmp(name, "models/ai/zhc^.mdl") == 0 ||
strcmp(name, "models/ai/zalc(.mdl") == 0 ||
strcmp(name, "models/ai/zarc(.mdl") == 0 ||
strcmp(name, "models/ai/zfull.mdl") == 0 ||
strcmp(name, "models/ai/zh^.mdl") == 0 ||
strcmp(name, "models/ai/zal(.mdl") == 0 ||
strcmp(name, "models/ai/zar(.mdl") == 0)
return true;
return false;
}
extern gltexture_t* zombie_skin;
void *Mod_LoadAllSkins (int numskins, daliasskintype_t *pskintype)
{
int i, j, k, size, groupskins;
@ -2573,11 +2591,11 @@ void *Mod_LoadAllSkins (int numskins, daliasskintype_t *pskintype)
qboolean malloced=false;
enum srcformat fmt = SRC_RGBA;
/*if (model_is_zombie(loadmodel->name) == true) {
q_snprintf(filename, sizeof(filename), "%s", zombie_skinss[i]);
} else {*/
if (model_is_zombie(loadmodel->name)) {
q_snprintf (filename, sizeof(filename), "models/ai/zfull.mdl_0", loadmodel->name);
} else {
q_snprintf (filename, sizeof(filename), "%s_%i", loadmodel->name, i);
//}
}
data = Image_LoadImage (filename, &fwidth, &fheight);

View file

@ -59,7 +59,7 @@ gltexture_t *decal_burn;
gltexture_t *decal_mark;
gltexture_t *decal_glow;
const char* zombie_skinss[4];
gltexture_t *zombie_skin;
/*
@ -679,10 +679,7 @@ void R_InitOtherTextures (void)
decal_mark = loadtextureimage ("textures/decals/particle_burn01");
decal_glow = loadtextureimage ("textures/decals/glow2");
// external zombie skins
zombie_skinss[0] = "models/ai/zfull.mdl_0";
zombie_skinss[1] = "models/ai/zfull.mdl_1";
zombie_skinss[2] = "models/ai/zfull.mdl_2";
zombie_skinss[3] = "models/ai/zfull.mdl_3";
// external zombie skin
zombie_skin = loadtextureimage ("models/ai/zfull.mdl_0");
}