mirror of
https://github.com/nzp-team/quakespasm.git
synced 2024-11-10 06:32:03 +00:00
Merge pull request #46 from Peter0x44/main
This commit is contained in:
commit
99ca44f339
10 changed files with 68 additions and 65 deletions
|
@ -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,6 +1684,9 @@ 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)
|
||||||
|
|
|
@ -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){
|
||||||
|
|
|
@ -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");
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
|
@ -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;
|
||||||
|
|
|
@ -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)
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
}
|
}
|
||||||
|
|
|
@ -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)
|
||||||
|
|
|
@ -244,9 +244,8 @@ float V_CalcBob (float speed,float which)//0 = regular, 1 = side bobbing
|
||||||
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
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue