diff --git a/source/gl_hud.c b/source/gl_hud.c index dd58566..3c876e9 100644 --- a/source/gl_hud.c +++ b/source/gl_hud.c @@ -685,7 +685,7 @@ void HUD_WorldText(float alpha) { // for parser char key[128], value[4096]; - char *data; + const char *data; // first, parse worldspawn 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) { - if (achievement_list[ach].unlocked) - return; + if (achievement_list[ach].unlocked) + return; achievement_unlocked = 1; smallsec = 0; diff --git a/source/gl_model.c b/source/gl_model.c index 70125de..dc26dc4 100644 --- a/source/gl_model.c +++ b/source/gl_model.c @@ -334,7 +334,7 @@ qmodel_t *Mod_LoadModel (qmodel_t *mod, qboolean crash) buf = COM_LoadStackFile (mod->name, stackbuf, sizeof(stackbuf), & mod->path_id); 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){ Con_Printf ("Missing model %s substituted\n", mod->name); }else if(!buf){ diff --git a/source/gl_rmisc.c b/source/gl_rmisc.c index 5999902..a6af419 100644 --- a/source/gl_rmisc.c +++ b/source/gl_rmisc.c @@ -177,6 +177,25 @@ float GL_WaterAlphaForSurface (msurface_t *fa) 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); } -/* -================== -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"); -} - diff --git a/source/gl_rpart.c b/source/gl_rpart.c index 95647ec..5c9351d 100644 --- a/source/gl_rpart.c +++ b/source/gl_rpart.c @@ -508,8 +508,8 @@ void QMB_InitParticles (void) 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_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_q3smoke, glpic, 0, 1, 256, 0, 384, 128); + ADD_PARTICLE_TEXTURE(ptex_q3blood_trail, glpic, 0, 1, 320, 128, 384, 192); loading_cur_step++; SCR_UpdateScreen (); diff --git a/source/gl_screen.c b/source/gl_screen.c index 5fc7280..7e28186 100644 --- a/source/gl_screen.c +++ b/source/gl_screen.c @@ -334,19 +334,19 @@ void SCR_UsePrint (int type, int cost, int weapon) button_pic_x = 5; break; 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)); button_pic_x = 5; break; case 3://ammo 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)); button_pic_x = 5; break; case 4://weapon 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)); button_pic_x = 5; break; @@ -356,7 +356,7 @@ void SCR_UsePrint (int type, int cost, int weapon) button_pic_x = 5; break; 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)); button_pic_x = 5; break; @@ -372,7 +372,7 @@ void SCR_UsePrint (int type, int cost, int weapon) button_pic_x = 100; break; 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)); button_pic_x = 5; break; @@ -382,12 +382,12 @@ void SCR_UsePrint (int type, int cost, int weapon) button_pic_x = 5; break; 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)); button_pic_x = 5; break; 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)); button_pic_x = 5; break; @@ -402,7 +402,7 @@ void SCR_UsePrint (int type, int cost, int weapon) button_pic_x = 5; break; 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)); button_pic_x = 5; break; @@ -427,7 +427,7 @@ void SCR_UsePrint (int type, int cost, int weapon) button_pic_x = 5; break; 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)); button_pic_x = 5; break; diff --git a/source/gl_vidsdl.c b/source/gl_vidsdl.c index 6411ca3..d08d44d 100644 --- a/source/gl_vidsdl.c +++ b/source/gl_vidsdl.c @@ -798,6 +798,7 @@ static qboolean VID_SetMode (int width, int height, int refreshrate, int bpp, qb #ifdef VITA depthbits = 24; gl_stencilbits = 8; + fsaa_obtained = 0; #else // read the obtained z-buffer depth if (SDL_GL_GetAttribute(SDL_GL_DEPTH_SIZE, &depthbits) == -1) diff --git a/source/main_sdl.c b/source/main_sdl.c index 9b726dd..c3b28b8 100644 --- a/source/main_sdl.c +++ b/source/main_sdl.c @@ -115,7 +115,7 @@ void utf2ascii(char* dst, uint16_t* src){ *dst=0x00; } -int nzp_main (unsigned int argc, char *argv[]) +int nzp_main (SceSize, void*) #else int main(int argc, char *argv[]) #endif diff --git a/source/menu.c b/source/menu.c index 75deb95..1aeca07 100644 --- a/source/menu.c +++ b/source/menu.c @@ -601,6 +601,7 @@ void M_Menu_Main_f (void) m_entersound = true; #ifdef VITA + void Load_Achivements(void); Load_Achivements(); #endif } diff --git a/source/net_udp.c b/source/net_udp.c index 17258aa..e7d6489 100644 --- a/source/net_udp.c +++ b/source/net_udp.c @@ -97,9 +97,9 @@ sys_socket_t UDP_Init (void) memset(&init_param, 0, sizeof(SceAppUtilInitParam)); memset(&boot_param, 0, sizeof(SceAppUtilBootParam)); 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); - Cvar_Set ("hostname", nick); + Cvar_Set ("hostname", (const char*)nick); } #else if (gethostname(buff, MAXHOSTNAMELEN) != 0) diff --git a/source/view.c b/source/view.c index 36878d9..66cf9e3 100644 --- a/source/view.c +++ b/source/view.c @@ -241,12 +241,11 @@ float V_CalcBob (float speed,float which)//0 = regular, 1 = side bobbing speed = 0.25; if (which == 0) - bob = cl_bobup.value * 20 * speed * (sprint * sprint) * sin(cl.time * 3.25 * sprint); - else - bob = cl_bobside.value * 50 * speed * (sprint * sprint * sprint) * sin((cl.time * 2 * sprint) - (M_PI * 0.25)); - } + bob = cl_bobup.value * 20 * speed * (sprint * sprint) * sin(cl.time * 3.25 * sprint); + else + bob = cl_bobside.value * 50 * speed * (sprint * sprint * sprint) * sin((cl.time * 2 * sprint) - (M_PI * 0.25)); + } else { // Normal walk/sprint bob. - else { if(cl.stats[STAT_ZOOM] == 3) 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, cl.gun_kick, r_refdef.viewangles); -// smooth out stair step ups -if (cl.onground && ent->origin[2] - oldz > 0) -{ - float steptime; + // smooth out stair step ups + if (cl.onground && ent->origin[2] - oldz > 0) + { + float steptime; - steptime = cl.time - cl.oldtime; - if (steptime < 0) -//FIXME I_Error ("steptime < 0"); - steptime = 0; + steptime = cl.time - cl.oldtime; + if (steptime < 0) + //FIXME I_Error ("steptime < 0"); + steptime = 0; - oldz += steptime * 80; - if (oldz > ent->origin[2]) + oldz += steptime * 80; + 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]; - 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 //if (chase_active.value) // Chase_Update (); view2->origin[0] = view->origin[0]; - view2->origin[1] = view->origin[1]; - view2->origin[2] = view->origin[2]; - view2->angles[0] = view->angles[0]; - view2->angles[1] = view->angles[1]; - view2->angles[2] = view->angles[2]; + view2->origin[1] = view->origin[1]; + view2->origin[2] = view->origin[2]; + view2->angles[0] = view->angles[0]; + view2->angles[1] = view->angles[1]; + view2->angles[2] = view->angles[2]; } /*