From befc85915d8f58be7e50fb5becd77984d22ebd58 Mon Sep 17 00:00:00 2001 From: Peter0x44 Date: Mon, 17 Jun 2024 16:11:32 +0100 Subject: [PATCH 01/13] VITA/NX: Fix implicit function declaration warning GCC 14 makes this an error. source/gl_rmisc.c: In function 'R_Init': source/gl_rmisc.c:256:2: warning: implicit declaration of function 'R_InitOtherTextures'; did you mean 'R_InitTextures'? [-Wimplicit-function-declaration] 256 | R_InitOtherTextures (); | ^~~~~~~~~~~~~~~~~~~ | R_InitTextures source/gl_rmisc.c: At top level: source/gl_rmisc.c:671:6: warning: conflicting types for 'R_InitOtherTextures' 671 | void R_InitOtherTextures (void) | ^~~~~~~~~~~~~~~~~~~ source/gl_rmisc.c:256:2: note: previous implicit declaration of 'R_InitOtherTextures' was here 256 | R_InitOtherTextures (); | ^~~~~~~~~~~~~~~~~~~ --- source/gl_rmisc.c | 39 +++++++++++++++++++-------------------- 1 file changed, 19 insertions(+), 20 deletions(-) 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"); -} - From c850e72b5303443931ff097d5620ae3a4589ffda Mon Sep 17 00:00:00 2001 From: Peter0x44 Date: Mon, 17 Jun 2024 16:18:53 +0100 Subject: [PATCH 02/13] VITA/NX: Fix -Wformat-extra-args warnings source/gl_screen.c:375:17: warning: too many arguments for format [-Wformat-extra-args] 375 | strcpy(s, va("Hold %s to buy %s\n", GetUseButtonL(), GetPerkName(weapon), cost)); | ^~~~~~~~~~~~~~~~~~~~~ source/gl_screen.c:385:17: warning: too many arguments for format [-Wformat-extra-args] 385 | strcpy(s, va("Hold %s to Activate the Trap\n", GetUseButtonL(), cost)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ source/gl_screen.c:390:17: warning: too many arguments for format [-Wformat-extra-args] 390 | strcpy(s, va("Hold %s to Pack-a-Punch\n", GetUseButtonL(), cost)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ source/gl_screen.c:405:17: warning: too many arguments for format [-Wformat-extra-args] 405 | strcpy(s, va("Hold %s to use Teleporter\n", GetUseButtonL(), cost)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ source/gl_screen.c:430:17: warning: too many arguments for format [-Wformat-extra-args] 430 | strcpy(s, va("Hold %s to End the Game\n", GetUseButtonL(), cost)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ --- source/gl_screen.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) 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; From 251c34708c28c5499bd9ed32b31fbb13d9bdfaa4 Mon Sep 17 00:00:00 2001 From: Peter0x44 Date: Mon, 17 Jun 2024 16:20:47 +0100 Subject: [PATCH 03/13] VITA: Fix -Wmisleading-identation warning source/gl_hud.c: In function 'HUD_Parse_Achievement': source/gl_hud.c:1689:5: warning: this 'if' clause does not guard... [-Wmisleading-indentation] 1689 | if (achievement_list[ach].unlocked) | ^~ source/gl_hud.c:1692:2: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if' 1692 | achievement_unlocked = 1; | ^~~~~~~~~~~~~~~~~~~~ --- source/gl_hud.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/gl_hud.c b/source/gl_hud.c index dd58566..b1b2b9f 100644 --- a/source/gl_hud.c +++ b/source/gl_hud.c @@ -1686,8 +1686,8 @@ void HUD_Achievement (void) void HUD_Parse_Achievement (int ach) { - if (achievement_list[ach].unlocked) - return; + if (achievement_list[ach].unlocked) + return; achievement_unlocked = 1; smallsec = 0; From a40c8e34d4b4a4417d31b9da49f0fea8921598bf Mon Sep 17 00:00:00 2001 From: Peter0x44 Date: Mon, 17 Jun 2024 16:23:44 +0100 Subject: [PATCH 04/13] VITA: Fix -Wimplicit-function-declaration warning GCC 14 promotes this to an error. source/gl_hud.c:1697:2: warning: implicit declaration of function 'Save_Achivements' [-Wimplicit-function-declaration] 1697 | Save_Achivements(); | ^~~~~~~~~~~~~~~~ --- source/gl_hud.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/source/gl_hud.c b/source/gl_hud.c index b1b2b9f..c5e8eac 100644 --- a/source/gl_hud.c +++ b/source/gl_hud.c @@ -1684,6 +1684,9 @@ void HUD_Achievement (void) } +// from menu.c +void Save_Achivements(void); + void HUD_Parse_Achievement (int ach) { if (achievement_list[ach].unlocked) From fa99d2b5639498039df5501ba1c3f75ac5180ab9 Mon Sep 17 00:00:00 2001 From: Peter0x44 Date: Mon, 17 Jun 2024 16:26:53 +0100 Subject: [PATCH 05/13] VITA/NX: Fix -Wincompatible-pointer-types warning COM_LoadStackFile already returns a "byte*" so this cast is totally unneeded. I'm not sure why it was there to begin with source/gl_model.c: In function 'Mod_LoadModel': source/gl_model.c:337:7: warning: assignment to 'byte *' {aka 'unsigned char *'} from incompatible pointer type 'unsigned int *' [-Wincompatible-pointer-types] 337 | buf = (unsigned*)COM_LoadStackFile ("models/missing_model.mdl", stackbuf, sizeof(stackbuf), NULL); | ^ --- source/gl_model.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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){ From b709396d40c24666e444e792311035a6d0110fdc Mon Sep 17 00:00:00 2001 From: Peter0x44 Date: Mon, 17 Jun 2024 16:29:46 +0100 Subject: [PATCH 06/13] VITA: Fix -Wpointer-sign warning source/net_udp.c:101:64: warning: pointer targets in passing argument 2 of 'sceAppUtilSystemParamGetString' differ in signedness [-Wpointer-sign] 101 | sceAppUtilSystemParamGetString(SCE_SYSTEM_PARAM_ID_USERNAME, nick, SCE_SYSTEM_PARAM_USERNAME_MAXSIZE); | ^~~~ | | | char * In file included from /usr/local/vitasdk/arm-vita-eabi/include/psp2/appmgr.h:12, from /usr/local/vitasdk/arm-vita-eabi/include/vitasdk.h:8, from source/net_udp.c:30: /usr/local/vitasdk/arm-vita-eabi/include/psp2/apputil.h:244:12: note: expected 'SceChar8 *' {aka 'signed char *'} but argument is of type 'char *' 244 | SceChar8 *buf, SceSize bufSize); --- source/net_udp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/net_udp.c b/source/net_udp.c index 17258aa..5b8bf2e 100644 --- a/source/net_udp.c +++ b/source/net_udp.c @@ -97,7 +97,7 @@ 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); } From b425d04291dafe48675be90eb8e6f2ab9a66d87c Mon Sep 17 00:00:00 2001 From: Peter0x44 Date: Mon, 17 Jun 2024 16:56:07 +0100 Subject: [PATCH 07/13] VITA: Fix -Wpointer-sign warning source/net_udp.c: In function 'UDP_Init': source/net_udp.c:102:25: warning: pointer targets in passing argument 2 of 'Cvar_Set' differ in signedness [-Wpointer-sign] 102 | Cvar_Set ("hostname", nick); | ^~~~ | | | SceChar8 * {aka signed char *} In file included from source/quakedef.h:282, from source/net_udp.c:26: source/cvar.h:98:50: note: expected 'const char *' but argument is of type 'SceChar8 *' {aka 'signed char *'} 98 | void Cvar_Set (const char *var_name, const char *value); | ~~~~~~~~~~~~^~~~~ --- source/net_udp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/net_udp.c b/source/net_udp.c index 5b8bf2e..e7d6489 100644 --- a/source/net_udp.c +++ b/source/net_udp.c @@ -99,7 +99,7 @@ sys_socket_t UDP_Init (void) sceAppUtilInit(&init_param, &boot_param); 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) From 6a256fe3273ed57d5ff66a8071caf78eaf5724c6 Mon Sep 17 00:00:00 2001 From: Peter0x44 Date: Mon, 17 Jun 2024 17:01:26 +0100 Subject: [PATCH 08/13] VITA: Fix "conflicting types for LoadAchievements" warning source/menu.c: At top level: source/menu.c:1300:6: warning: conflicting types for 'Load_Achivements' 1300 | void Load_Achivements (void) | ^~~~~~~~~~~~~~~~ source/menu.c:604:2: note: previous implicit declaration of 'Load_Achivements' was here 604 | Load_Achivements(); | ^~~~~~~~~~~~~~~~ --- source/menu.c | 1 + 1 file changed, 1 insertion(+) 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 } From 8ada86168ca40dec8bb194d7a583a6fd351d10fe Mon Sep 17 00:00:00 2001 From: Peter0x44 Date: Mon, 17 Jun 2024 18:08:35 +0100 Subject: [PATCH 09/13] VITA: Fix -Wuninititalized warning The Vita doesn't use FSAA so it is safe to set this to zero. source/gl_vidsdl.c: In function 'VID_SetMode': source/gl_vidsdl.c:823:2: warning: 'fsaa_obtained' is used uninitialized in this function [-Wuninitialized] 823 | Con_SafePrintf ("Video mode %dx%dx%d %dHz (%d-bit z-buffer, %dx FSAA) initialized\n", | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 824 | VID_GetCurrentWidth(), | ~~~~~~~~~~~~~~~~~~~~~~ 825 | VID_GetCurrentHeight(), | ~~~~~~~~~~~~~~~~~~~~~~~ 826 | VID_GetCurrentBPP(), | ~~~~~~~~~~~~~~~~~~~~ 827 | VID_GetCurrentRefreshRate(), | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 828 | depthbits, | ~~~~~~~~~~ 829 | fsaa_obtained); | ~~~~~~~~~~~~~~ --- source/gl_vidsdl.c | 1 + 1 file changed, 1 insertion(+) 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) From f47080d347bbab90898c0c6614a6f09c8d5dc9d6 Mon Sep 17 00:00:00 2001 From: Peter0x44 Date: Mon, 17 Jun 2024 18:19:27 +0100 Subject: [PATCH 10/13] VITA/NX: Fix a -Wmisleading-identation warning source/view.c:1174:1: warning: this 'else' clause does not guard... [-Wmisleading-indentation] 1174 | else | ^~~~ source/view.c:1181:2: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'else' 1181 | view2->origin[0] = view->origin[0]; | ^~~~~ --- source/view.c | 53 +++++++++++++++++++++++++-------------------------- 1 file changed, 26 insertions(+), 27 deletions(-) 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]; } /* From 70bec7322b7742117a4915dcde256827d6353d2d Mon Sep 17 00:00:00 2001 From: Peter0x44 Date: Mon, 17 Jun 2024 18:27:36 +0100 Subject: [PATCH 11/13] NX: Fix -Wmisleading-indentation warning /__w/quakespasm/quakespasm/source/gl_rpart.c: In function 'QMB_InitParticles': /__w/quakespasm/quakespasm/source/gl_rpart.c:509:9: warning: this 'for' clause does not guard... [-Wmisleading-indentation] 509 | for (i = 0 ; i < 5 ; i++) | ^~~ /__w/quakespasm/quakespasm/source/gl_rpart.c:219:1: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'for' 219 | do { \ | ^~ --- source/gl_rpart.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 (); From 88c161c0043d282c540e0eea2b8794c7c114906b Mon Sep 17 00:00:00 2001 From: Peter0x44 Date: Mon, 17 Jun 2024 18:39:43 +0100 Subject: [PATCH 12/13] NX: Fix -Wdiscarded-qualifiers warning /__w/quakespasm/quakespasm/source/gl_hud.c: In function 'HUD_WorldText': /__w/quakespasm/quakespasm/source/gl_hud.c:691:14: warning: assignment discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers] 691 | data = COM_Parse(cl.worldmodel->entities); | ^ /__w/quakespasm/quakespasm/source/gl_hud.c:699:22: warning: assignment discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers] 699 | data = COM_Parse(data); | ^ /__w/quakespasm/quakespasm/source/gl_hud.c:714:22: warning: assignment discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers] 714 | data = COM_Parse(data); | ^ --- source/gl_hud.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/gl_hud.c b/source/gl_hud.c index c5e8eac..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); From 2638f3a1bd38924c3124176e261b167dc944f70a Mon Sep 17 00:00:00 2001 From: Peter0x44 Date: Mon, 17 Jun 2024 18:50:52 +0100 Subject: [PATCH 13/13] VITA: Fix -Wincompatible-pointer-types warning source/main_sdl.c:234:52: warning: passing argument 2 of 'sceKernelCreateThread' from incompatible pointer type [-Wincompatible-pointer-types] 234 | SceUID main_thread = sceKernelCreateThread("NZP", nzp_main, 0x40, 0x800000, 0, 0, NULL); | ^~~~~~~~ | | | int (*)(unsigned int, char **) In file included from /usr/local/vitasdk/arm-vita-eabi/include/psp2/kernel/threadmgr.h:28, from /usr/local/vitasdk/arm-vita-eabi/include/psp2/paf/misc.h:12, from /usr/local/vitasdk/arm-vita-eabi/include/psp2/paf.h:14, from /usr/local/vitasdk/arm-vita-eabi/include/vitasdk.h:52, from source/main_sdl.c:86: /usr/local/vitasdk/arm-vita-eabi/include/psp2/kernel/threadmgr/thread.h:48:69: note: expected 'SceKernelThreadEntry' {aka 'int (*)(unsigned int, void *)'} but argument is of type 'int (*)(unsigned int, char **)' 48 | SceUID sceKernelCreateThread(const char *name, SceKernelThreadEntry entry, int initPriority, | ~~~~~~~~~~~~~~~~~~~~~^~~~~ --- source/main_sdl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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