Making 60FPS a toggleable option

This commit is contained in:
Mors 2021-03-19 20:13:02 +03:00
parent 7d4dcc7a8c
commit fd366cd4fa
5 changed files with 7 additions and 5 deletions

View file

@ -1961,7 +1961,9 @@ index f4467a11..ccc048b7 100644
gfx_end_frame();
+
+ gfx_start_frame();
+ patch_interpolations();
+ if (g60FPS) {
+ patch_interpolations();
+ }
+ send_display_list(gGfxSPTask);
+ gfx_end_frame();
}

View file

@ -21,6 +21,7 @@ s8 gSunshineDive = 0;
s8 gOdysseyDive = 0;
s8 gFlashbackPound = 0;
s8 g60FPS = 1;
s8 configFullscreen = 1;
int gCustomFullscreenResolution = 0;
int gFullscreenWidth = 1920;
@ -37,7 +38,6 @@ s8 gDisableDrawDistance = 1;
s8 gNoLowPoly = 1;
int gDrawDistanceMultiplier = 4;
int gNoiseType = 0;
s8 gDisableFog = 0;
s8 gForceLowPoly = 0;
s8 gNearestNeighbor = 0;
s8 gFXMode = 0;

View file

@ -21,6 +21,7 @@ extern s8 gSunshineDive;
extern s8 gOdysseyDive;
extern s8 gFlashbackPound;
extern s8 g60FPS;
extern s8 configFullscreen;
extern s8 gCustomFullscreenResolution;
extern int gFullscreenWidth;
@ -37,7 +38,6 @@ extern s8 gDisableDrawDistance;
extern s8 gNoLowPoly;
extern int gDrawDistanceMultiplier;
extern int gNoiseType;
extern s8 gDisableFog;
extern s8 gForceLowPoly;
extern s8 gNearestNeighbor;
extern s8 gFXMode;

View file

@ -50,6 +50,7 @@ static const struct ConfigOption options[] = {
{.name = "odyssey_ground_pound_dive", .type = CONFIG_TYPE_BOOL, .boolValue = &gOdysseyDive},
{.name = "flashback_ground_pound", .type = CONFIG_TYPE_BOOL, .boolValue = &gFlashbackPound},
{.name = "60fps",.type = CONFIG_TYPE_BOOL, .boolValue = &g60FPS},
{.name = "fullscreen", .type = CONFIG_TYPE_BOOL, .boolValue = &configFullscreen},
{.name = "custom_fullscreen_resolution",.type = CONFIG_TYPE_BOOL, .boolValue = &gCustomFullscreenResolution},
{.name = "fullscreen_width",.type = CONFIG_TYPE_UINT, .uintValue = &gFullscreenWidth},
@ -66,7 +67,6 @@ static const struct ConfigOption options[] = {
{.name = "disable_low_poly_mario",.type = CONFIG_TYPE_BOOL, .boolValue = &gNoLowPoly},
{.name = "draw_distance_multiplier",.type = CONFIG_TYPE_UINT, .uintValue = &gDrawDistanceMultiplier},
{.name = "noise_type", .type = CONFIG_TYPE_UINT, .uintValue = &gNoiseType},
{.name = "disable_fog", .type = CONFIG_TYPE_BOOL, .boolValue = &gDisableFog},
{.name = "force_low_poly_mario", .type = CONFIG_TYPE_BOOL, .boolValue = &gForceLowPoly},
{.name = "nearest_neighbor_filtering",.type = CONFIG_TYPE_BOOL, .boolValue = &gNearestNeighbor},
{.name = "fx_mode", .type = CONFIG_TYPE_BOOL, .boolValue = &gFXMode},

View file

@ -981,7 +981,7 @@ static void gfx_sp_tri1(uint8_t vtx1_idx, uint8_t vtx2_idx, uint8_t vtx3_idx) {
uint32_t cc_id = rdp.combine_mode;
bool use_alpha = (rdp.other_mode_l & (G_BL_A_MEM << 18)) == 0;
bool use_fog = (rdp.other_mode_l >> 30) == G_BL_CLR_FOG && !gDisableFog;
bool use_fog = (rdp.other_mode_l >> 30) == G_BL_CLR_FOG;
bool texture_edge = (rdp.other_mode_l & CVG_X_ALPHA) == CVG_X_ALPHA;
bool use_noise = (rdp.other_mode_l & G_AC_DITHER) == G_AC_DITHER && gNoiseType != 2;