From 08ec8e541bd70f24d55be1df023aa6ae2f1fa55c Mon Sep 17 00:00:00 2001 From: fgsfds Date: Sat, 16 Nov 2024 12:16:52 +0100 Subject: [PATCH 1/2] port: remove DUALFLIP from rocket launcher, nbomb, grenade and devastator makes them look less broken when dual wielded --- src/game/invitems.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/game/invitems.c b/src/game/invitems.c index e7ccc6e43..89c7b0ed4 100644 --- a/src/game/invitems.c +++ b/src/game/invitems.c @@ -2848,7 +2848,7 @@ struct weapon invitem_rocketlauncher = { L_GUN_027, // name L_GUN_149, // manufacturer L_GUN_175, // description - WEAPONFLAG_AICANUSE | WEAPONFLAG_DUALFLIP | WEAPONFLAG_00000040 | WEAPONFLAG_TRACKTIMEUSED | WEAPONFLAG_00002000 | WEAPONFLAG_00004000 | WEAPONFLAG_HASHANDS | WEAPONFLAG_AIMTRACK, + WEAPONFLAG_AICANUSE | WEAPONFLAG_00000040 | WEAPONFLAG_TRACKTIMEUSED | WEAPONFLAG_00002000 | WEAPONFLAG_00004000 | WEAPONFLAG_HASHANDS | WEAPONFLAG_AIMTRACK, }; struct guncmd invanim_slayer_shoot[] = { @@ -3083,7 +3083,7 @@ struct weapon invitem_devastator = { L_GUN_028, // name L_GUN_149, // manufacturer L_GUN_176, // description - WEAPONFLAG_AICANUSE | WEAPONFLAG_DUALFLIP | WEAPONFLAG_00000040 | WEAPONFLAG_TRACKTIMEUSED | WEAPONFLAG_00002000 | WEAPONFLAG_00004000 | WEAPONFLAG_HASHANDS, + WEAPONFLAG_AICANUSE | WEAPONFLAG_00000040 | WEAPONFLAG_TRACKTIMEUSED | WEAPONFLAG_00002000 | WEAPONFLAG_00004000 | WEAPONFLAG_HASHANDS, }; struct weaponfunc invfunc_mine_threatdetector = { @@ -3476,7 +3476,7 @@ struct weapon invitem_grenade = { L_GUN_036, // name L_GUN_000, // manufacturer L_GUN_183, // description - WEAPONFLAG_THROWABLE | WEAPONFLAG_00000004 | WEAPONFLAG_ONEHANDED | WEAPONFLAG_AICANUSE | WEAPONFLAG_DUALFLIP | WEAPONFLAG_00000040 | WEAPONFLAG_TRACKTIMEUSED | WEAPONFLAG_00000400 | WEAPONFLAG_00002000 | WEAPONFLAG_00008000 | WEAPONFLAG_HASHANDS, + WEAPONFLAG_THROWABLE | WEAPONFLAG_00000004 | WEAPONFLAG_ONEHANDED | WEAPONFLAG_AICANUSE | WEAPONFLAG_00000040 | WEAPONFLAG_TRACKTIMEUSED | WEAPONFLAG_00000400 | WEAPONFLAG_00002000 | WEAPONFLAG_00008000 | WEAPONFLAG_HASHANDS, }; struct weaponfunc_throw invfunc_nbomb_throw = { @@ -3537,7 +3537,7 @@ struct weapon invitem_nbomb = { L_GUN_037, // name L_GUN_000, // manufacturer L_GUN_184, // description - WEAPONFLAG_THROWABLE | WEAPONFLAG_00000004 | WEAPONFLAG_ONEHANDED | WEAPONFLAG_AICANUSE | WEAPONFLAG_DUALFLIP | WEAPONFLAG_00000040 | WEAPONFLAG_TRACKTIMEUSED | WEAPONFLAG_00000400 | WEAPONFLAG_00002000 | WEAPONFLAG_00008000 | WEAPONFLAG_HASHANDS | WEAPONFLAG_DETERMINER_S_AN | WEAPONFLAG_DETERMINER_F_AN, + WEAPONFLAG_THROWABLE | WEAPONFLAG_00000004 | WEAPONFLAG_ONEHANDED | WEAPONFLAG_AICANUSE | WEAPONFLAG_00000040 | WEAPONFLAG_TRACKTIMEUSED | WEAPONFLAG_00000400 | WEAPONFLAG_00002000 | WEAPONFLAG_00008000 | WEAPONFLAG_HASHANDS | WEAPONFLAG_DETERMINER_S_AN | WEAPONFLAG_DETERMINER_F_AN, }; struct gunviscmd gunviscmds_farsight[] = { @@ -6131,7 +6131,7 @@ struct weapon invitem_rocketlauncher_34 = { L_GUN_027, // name L_GUN_000, // manufacturer L_GUN_000, // description - WEAPONFLAG_AICANUSE | WEAPONFLAG_DUALFLIP | WEAPONFLAG_00000040 | WEAPONFLAG_00002000 | WEAPONFLAG_00004000 | WEAPONFLAG_HASHANDS | WEAPONFLAG_AIMTRACK, + WEAPONFLAG_AICANUSE | WEAPONFLAG_00000040 | WEAPONFLAG_00002000 | WEAPONFLAG_00004000 | WEAPONFLAG_HASHANDS | WEAPONFLAG_AIMTRACK, }; struct guncmd invanim_tester_shoot[] = { From 3d8f63dbb6c6c92fd48917713c8cb354db402131 Mon Sep 17 00:00:00 2001 From: fgsfds Date: Sat, 16 Nov 2024 12:31:37 +0100 Subject: [PATCH 2/2] port: use a separate fb for fullscreen menu background --- src/game/menugfx.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/game/menugfx.c b/src/game/menugfx.c index daa4aa00c..11b9f9a58 100644 --- a/src/game/menugfx.c +++ b/src/game/menugfx.c @@ -31,7 +31,8 @@ #define PXTOBYTES(val) ((val) * 2) #ifndef PLATFORM_N64 -static s32 g_MenuBlurFb = 0; +static s32 g_MenuBlurFb = -1; +static s32 g_MenuScreenFb = -1; static bool g_MenuBlurDone = false; #endif @@ -124,8 +125,9 @@ void menugfxCreateBlur(void) g_ScaleX = 1; #else - if (g_MenuBlurFb == 0) { + if (g_MenuBlurFb < 0) { g_MenuBlurFb = videoCreateFramebuffer(BLURIMG_WIDTH, BLURIMG_HEIGHT, true, false); + g_MenuScreenFb = videoCreateFramebuffer(0, 0, false, true); } // copy full viewport and downscale to 40x30 videoCopyFramebuffer(g_MenuBlurFb, 0, -1, -1); @@ -151,14 +153,13 @@ Gfx *menugfxRenderBgBlur(Gfx *gdl, u32 colour, s16 arg2, s16 arg3) #ifndef PLATFORM_N64 width = viGetWidth(); height = viGetHeight(); - if (g_MenuBlurFb && !g_MenuBlurDone) { + if (g_MenuBlurFb >= 0 && !g_MenuBlurDone) { // blit the small blur texture onto a screen-sized framebuffer while blurring it g_MenuBlurDone = true; - g_BlurFbDirty = true; gdl = bviewPrepareStaticRgba16(gdl, 0xffffffff, 0xff); gDPSetTextureFilter(gdl++, G_TF_BLUR_EXT); gDPSetFramebufferTextureEXT(gdl++, G_IM_FMT_RGBA, G_IM_SIZ_16b, BLURIMG_WIDTH, g_MenuBlurFb); - gDPSetFramebufferTargetEXT(gdl++, G_IM_FMT_RGBA, G_IM_SIZ_16b, width, g_BlurFb); + gDPSetFramebufferTargetEXT(gdl++, G_IM_FMT_RGBA, G_IM_SIZ_16b, width, g_MenuScreenFb); gSPImageRectangleEXT(gdl++, 0, 0, 0, 0, width << 2, height << 2, BLURIMG_WIDTH, BLURIMG_HEIGHT, 0, BLURIMG_WIDTH, BLURIMG_HEIGHT); gDPSetFramebufferTargetEXT(gdl++, G_IM_FMT_RGBA, G_IM_SIZ_16b, width, 0); gDPSetFramebufferTextureEXT(gdl++, G_IM_FMT_RGBA, G_IM_SIZ_16b, BLURIMG_WIDTH, 0); @@ -177,7 +178,7 @@ Gfx *menugfxRenderBgBlur(Gfx *gdl, u32 colour, s16 arg2, s16 arg3) #ifndef PLATFORM_N64 // LoadTextureBlock will set up the sizes, but we'll use the framebuffer instead of g_BlurBuffer - gDPSetFramebufferTextureEXT(gdl++, G_IM_FMT_RGBA, G_IM_SIZ_16b, width, g_BlurFb); + gDPSetFramebufferTextureEXT(gdl++, G_IM_FMT_RGBA, G_IM_SIZ_16b, width, g_MenuScreenFb); #endif gDPPipeSync(gdl++);