Merge pull request #46 from Peter0x44/main

This commit is contained in:
cypress 2024-06-17 16:50:34 -07:00 committed by GitHub
commit 99ca44f339
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 68 additions and 65 deletions

View file

@ -685,7 +685,7 @@ void HUD_WorldText(float alpha)
{ {
// for parser // for parser
char key[128], value[4096]; char key[128], value[4096];
char *data; const char *data;
// first, parse worldspawn // first, parse worldspawn
data = COM_Parse(cl.worldmodel->entities); data = COM_Parse(cl.worldmodel->entities);
@ -1684,10 +1684,13 @@ void HUD_Achievement (void)
} }
// from menu.c
void Save_Achivements(void);
void HUD_Parse_Achievement (int ach) void HUD_Parse_Achievement (int ach)
{ {
if (achievement_list[ach].unlocked) if (achievement_list[ach].unlocked)
return; return;
achievement_unlocked = 1; achievement_unlocked = 1;
smallsec = 0; smallsec = 0;

View file

@ -334,7 +334,7 @@ qmodel_t *Mod_LoadModel (qmodel_t *mod, qboolean crash)
buf = COM_LoadStackFile (mod->name, stackbuf, sizeof(stackbuf), & mod->path_id); buf = COM_LoadStackFile (mod->name, stackbuf, sizeof(stackbuf), & mod->path_id);
if (!buf) if (!buf)
{ {
buf = (unsigned*)COM_LoadStackFile ("models/missing_model.mdl", stackbuf, sizeof(stackbuf), NULL); buf = COM_LoadStackFile ("models/missing_model.mdl", stackbuf, sizeof(stackbuf), NULL);
if (buf){ if (buf){
Con_Printf ("Missing model %s substituted\n", mod->name); Con_Printf ("Missing model %s substituted\n", mod->name);
}else if(!buf){ }else if(!buf){

View file

@ -177,6 +177,25 @@ float GL_WaterAlphaForSurface (msurface_t *fa)
return map_wateralpha; return map_wateralpha;
} }
/*
==================
R_InitOtherTextures
==================
*/
void R_InitOtherTextures (void)
{
//static decals
decal_blood1 = loadtextureimage ("textures/decals/blood_splat01");
decal_blood2 = loadtextureimage ("textures/decals/blood_splat02");
decal_blood3 = loadtextureimage ("textures/decals/blood_splat03");
decal_q3blood = loadtextureimage ("textures/decals/blood_stain");
decal_burn = loadtextureimage ("textures/decals/explo_burn01");
decal_mark = loadtextureimage ("textures/decals/particle_burn01");
decal_glow = loadtextureimage ("textures/decals/glow2");
// external zombie skin
zombie_skin = loadtextureimage ("models/ai/zfull.mdl_0");
}
/* /*
=============== ===============
@ -663,23 +682,3 @@ void GL_ClearBufferBindings ()
GL_BindBufferFunc (GL_ELEMENT_ARRAY_BUFFER, 0); GL_BindBufferFunc (GL_ELEMENT_ARRAY_BUFFER, 0);
} }
/*
==================
R_InitOtherTextures
==================
*/
void R_InitOtherTextures (void)
{
//static decals
decal_blood1 = loadtextureimage ("textures/decals/blood_splat01");
decal_blood2 = loadtextureimage ("textures/decals/blood_splat02");
decal_blood3 = loadtextureimage ("textures/decals/blood_splat03");
decal_q3blood = loadtextureimage ("textures/decals/blood_stain");
decal_burn = loadtextureimage ("textures/decals/explo_burn01");
decal_mark = loadtextureimage ("textures/decals/particle_burn01");
decal_glow = loadtextureimage ("textures/decals/glow2");
// external zombie skin
zombie_skin = loadtextureimage ("models/ai/zfull.mdl_0");
}

View file

@ -508,8 +508,8 @@ void QMB_InitParticles (void)
for (i = 0 ; i < 5 ; i++) for (i = 0 ; i < 5 ; i++)
ADD_PARTICLE_TEXTURE(ptex_q3blood, glpic, i, 5, i * 64, 128, (i + 1) * 64, 192); ADD_PARTICLE_TEXTURE(ptex_q3blood, glpic, i, 5, i * 64, 128, (i + 1) * 64, 192);
ADD_PARTICLE_TEXTURE(ptex_q3smoke, glpic, 0, 1, 256, 0, 384, 128); ADD_PARTICLE_TEXTURE(ptex_q3smoke, glpic, 0, 1, 256, 0, 384, 128);
ADD_PARTICLE_TEXTURE(ptex_q3blood_trail, glpic, 0, 1, 320, 128, 384, 192); ADD_PARTICLE_TEXTURE(ptex_q3blood_trail, glpic, 0, 1, 320, 128, 384, 192);
loading_cur_step++; loading_cur_step++;
SCR_UpdateScreen (); SCR_UpdateScreen ();

View file

@ -334,19 +334,19 @@ void SCR_UsePrint (int type, int cost, int weapon)
button_pic_x = 5; button_pic_x = 5;
break; break;
case 2://debris case 2://debris
strcpy(s, va("Hold %s to remove Debris\n", GetUseButtonL(), cost)); strcpy(s, va("Hold %s to remove Debris\n", GetUseButtonL()));
strcpy(c, va("[Cost: %i]\n", cost)); strcpy(c, va("[Cost: %i]\n", cost));
button_pic_x = 5; button_pic_x = 5;
break; break;
case 3://ammo case 3://ammo
strcpy(w, cl.touchname); strcpy(w, cl.touchname);
strcpy(s, va("Hold %s to buy Ammo for %s\n", GetUseButtonL(), w, cost)); strcpy(s, va("Hold %s to buy Ammo for %s\n", GetUseButtonL(), w));
strcpy(c, va("[Cost: %i]\n", cost)); strcpy(c, va("[Cost: %i]\n", cost));
button_pic_x = 5; button_pic_x = 5;
break; break;
case 4://weapon case 4://weapon
strcpy(w, cl.touchname); strcpy(w, cl.touchname);
strcpy(s, va("Hold %s to buy %s\n", GetUseButtonL(), w, cost)); strcpy(s, va("Hold %s to buy %s\n", GetUseButtonL(), w));
strcpy(c, va("[Cost: %i]\n", cost)); strcpy(c, va("[Cost: %i]\n", cost));
button_pic_x = 5; button_pic_x = 5;
break; break;
@ -356,7 +356,7 @@ void SCR_UsePrint (int type, int cost, int weapon)
button_pic_x = 5; button_pic_x = 5;
break; break;
case 6://box case 6://box
strcpy(s, va("Hold %s for Mystery Box\n", GetUseButtonL(), cost)); strcpy(s, va("Hold %s for Mystery Box\n", GetUseButtonL()));
strcpy(c, va("[Cost: %i]\n", cost)); strcpy(c, va("[Cost: %i]\n", cost));
button_pic_x = 5; button_pic_x = 5;
break; break;
@ -372,7 +372,7 @@ void SCR_UsePrint (int type, int cost, int weapon)
button_pic_x = 100; button_pic_x = 100;
break; break;
case 9://perk case 9://perk
strcpy(s, va("Hold %s to buy %s\n", GetUseButtonL(), GetPerkName(weapon), cost)); strcpy(s, va("Hold %s to buy %s\n", GetUseButtonL(), GetPerkName(weapon)));
strcpy(c, va("[Cost: %i]\n", cost)); strcpy(c, va("[Cost: %i]\n", cost));
button_pic_x = 5; button_pic_x = 5;
break; break;
@ -382,12 +382,12 @@ void SCR_UsePrint (int type, int cost, int weapon)
button_pic_x = 5; button_pic_x = 5;
break; break;
case 11://turn on trap case 11://turn on trap
strcpy(s, va("Hold %s to Activate the Trap\n", GetUseButtonL(), cost)); strcpy(s, va("Hold %s to Activate the Trap\n", GetUseButtonL()));
strcpy(c, va("[Cost: %i]\n", cost)); strcpy(c, va("[Cost: %i]\n", cost));
button_pic_x = 5; button_pic_x = 5;
break; break;
case 12://PAP case 12://PAP
strcpy(s, va("Hold %s to Pack-a-Punch\n", GetUseButtonL(), cost)); strcpy(s, va("Hold %s to Pack-a-Punch\n", GetUseButtonL()));
strcpy(c, va("[Cost: %i]\n", cost)); strcpy(c, va("[Cost: %i]\n", cost));
button_pic_x = 5; button_pic_x = 5;
break; break;
@ -402,7 +402,7 @@ void SCR_UsePrint (int type, int cost, int weapon)
button_pic_x = 5; button_pic_x = 5;
break; break;
case 15://use teleporter (cost) case 15://use teleporter (cost)
strcpy(s, va("Hold %s to use Teleporter\n", GetUseButtonL(), cost)); strcpy(s, va("Hold %s to use Teleporter\n", GetUseButtonL()));
strcpy(c, va("[Cost: %i]\n", cost)); strcpy(c, va("[Cost: %i]\n", cost));
button_pic_x = 5; button_pic_x = 5;
break; break;
@ -427,7 +427,7 @@ void SCR_UsePrint (int type, int cost, int weapon)
button_pic_x = 5; button_pic_x = 5;
break; break;
case 20://buyable ending case 20://buyable ending
strcpy(s, va("Hold %s to End the Game\n", GetUseButtonL(), cost)); strcpy(s, va("Hold %s to End the Game\n", GetUseButtonL()));
strcpy(c, va("[Cost: %i]\n", cost)); strcpy(c, va("[Cost: %i]\n", cost));
button_pic_x = 5; button_pic_x = 5;
break; break;

View file

@ -798,6 +798,7 @@ static qboolean VID_SetMode (int width, int height, int refreshrate, int bpp, qb
#ifdef VITA #ifdef VITA
depthbits = 24; depthbits = 24;
gl_stencilbits = 8; gl_stencilbits = 8;
fsaa_obtained = 0;
#else #else
// read the obtained z-buffer depth // read the obtained z-buffer depth
if (SDL_GL_GetAttribute(SDL_GL_DEPTH_SIZE, &depthbits) == -1) if (SDL_GL_GetAttribute(SDL_GL_DEPTH_SIZE, &depthbits) == -1)

View file

@ -115,7 +115,7 @@ void utf2ascii(char* dst, uint16_t* src){
*dst=0x00; *dst=0x00;
} }
int nzp_main (unsigned int argc, char *argv[]) int nzp_main (SceSize, void*)
#else #else
int main(int argc, char *argv[]) int main(int argc, char *argv[])
#endif #endif

View file

@ -601,6 +601,7 @@ void M_Menu_Main_f (void)
m_entersound = true; m_entersound = true;
#ifdef VITA #ifdef VITA
void Load_Achivements(void);
Load_Achivements(); Load_Achivements();
#endif #endif
} }

View file

@ -97,9 +97,9 @@ sys_socket_t UDP_Init (void)
memset(&init_param, 0, sizeof(SceAppUtilInitParam)); memset(&init_param, 0, sizeof(SceAppUtilInitParam));
memset(&boot_param, 0, sizeof(SceAppUtilBootParam)); memset(&boot_param, 0, sizeof(SceAppUtilBootParam));
sceAppUtilInit(&init_param, &boot_param); sceAppUtilInit(&init_param, &boot_param);
char nick[SCE_SYSTEM_PARAM_USERNAME_MAXSIZE]; SceChar8 nick[SCE_SYSTEM_PARAM_USERNAME_MAXSIZE];
sceAppUtilSystemParamGetString(SCE_SYSTEM_PARAM_ID_USERNAME, nick, SCE_SYSTEM_PARAM_USERNAME_MAXSIZE); sceAppUtilSystemParamGetString(SCE_SYSTEM_PARAM_ID_USERNAME, nick, SCE_SYSTEM_PARAM_USERNAME_MAXSIZE);
Cvar_Set ("hostname", nick); Cvar_Set ("hostname", (const char*)nick);
} }
#else #else
if (gethostname(buff, MAXHOSTNAMELEN) != 0) if (gethostname(buff, MAXHOSTNAMELEN) != 0)

View file

@ -241,12 +241,11 @@ float V_CalcBob (float speed,float which)//0 = regular, 1 = side bobbing
speed = 0.25; speed = 0.25;
if (which == 0) if (which == 0)
bob = cl_bobup.value * 20 * speed * (sprint * sprint) * sin(cl.time * 3.25 * sprint); bob = cl_bobup.value * 20 * speed * (sprint * sprint) * sin(cl.time * 3.25 * sprint);
else else
bob = cl_bobside.value * 50 * speed * (sprint * sprint * sprint) * sin((cl.time * 2 * sprint) - (M_PI * 0.25)); bob = cl_bobside.value * 50 * speed * (sprint * sprint * sprint) * sin((cl.time * 2 * sprint) - (M_PI * 0.25));
} } else {
// Normal walk/sprint bob. // Normal walk/sprint bob.
else {
if(cl.stats[STAT_ZOOM] == 3) if(cl.stats[STAT_ZOOM] == 3)
sprint = 1.8; //this gets sprinting speed in comparison to walk speed per weapon sprint = 1.8; //this gets sprinting speed in comparison to walk speed per weapon
@ -1153,37 +1152,37 @@ void V_CalcRefdef (void)
VectorAdd (r_refdef.viewangles, lastPunchAngle, r_refdef.viewangles); VectorAdd (r_refdef.viewangles, lastPunchAngle, r_refdef.viewangles);
VectorAdd (r_refdef.viewangles, cl.gun_kick, r_refdef.viewangles); VectorAdd (r_refdef.viewangles, cl.gun_kick, r_refdef.viewangles);
// smooth out stair step ups // smooth out stair step ups
if (cl.onground && ent->origin[2] - oldz > 0) if (cl.onground && ent->origin[2] - oldz > 0)
{ {
float steptime; float steptime;
steptime = cl.time - cl.oldtime; steptime = cl.time - cl.oldtime;
if (steptime < 0) if (steptime < 0)
//FIXME I_Error ("steptime < 0"); //FIXME I_Error ("steptime < 0");
steptime = 0; steptime = 0;
oldz += steptime * 80; oldz += steptime * 80;
if (oldz > ent->origin[2]) if (oldz > ent->origin[2])
oldz = ent->origin[2];
if (ent->origin[2] - oldz > 12)
oldz = ent->origin[2] - 12;
r_refdef.vieworg[2] += oldz - ent->origin[2];
view->origin[2] += oldz - ent->origin[2];
}
else
oldz = ent->origin[2]; oldz = ent->origin[2];
if (ent->origin[2] - oldz > 12)
oldz = ent->origin[2] - 12;
r_refdef.vieworg[2] += oldz - ent->origin[2];
view->origin[2] += oldz - ent->origin[2];
}
else
oldz = ent->origin[2];
// Naievil -- fixme third person // Naievil -- fixme third person
//if (chase_active.value) //if (chase_active.value)
// Chase_Update (); // Chase_Update ();
view2->origin[0] = view->origin[0]; view2->origin[0] = view->origin[0];
view2->origin[1] = view->origin[1]; view2->origin[1] = view->origin[1];
view2->origin[2] = view->origin[2]; view2->origin[2] = view->origin[2];
view2->angles[0] = view->angles[0]; view2->angles[0] = view->angles[0];
view2->angles[1] = view->angles[1]; view2->angles[1] = view->angles[1];
view2->angles[2] = view->angles[2]; view2->angles[2] = view->angles[2];
} }
/* /*