From 67b23f3b1355404b75a1ddd621982630d3ff324a Mon Sep 17 00:00:00 2001 From: MelonSpeedruns Date: Tue, 7 Apr 2026 16:59:19 -0400 Subject: [PATCH 1/2] Does this fix fps for anyone? --- src/d/d_map.cpp | 4 ++++ src/d/d_meter_map.cpp | 9 --------- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/src/d/d_map.cpp b/src/d/d_map.cpp index 5da8f95a46..3fe638cd2f 100644 --- a/src/d/d_map.cpp +++ b/src/d/d_map.cpp @@ -542,6 +542,10 @@ void renderingAmap_c::rendering(dDrawPath_c::poly_class const* i_poly) { bool renderingAmap_c::isDrawOutSideTrim() { bool rt = false; + #if TARGET_PC + return 0; + #endif + if (getDispType() == 0 || getDispType() == 4 || getDispType() == 3 || getDispType() == 2 || getDispType() == 5) { diff --git a/src/d/d_meter_map.cpp b/src/d/d_meter_map.cpp index b5900a4be5..419235c970 100644 --- a/src/d/d_meter_map.cpp +++ b/src/d/d_meter_map.cpp @@ -593,15 +593,6 @@ void dMeterMap_c::_draw() { dComIfGd_set2DOpa(this); } #else -#if TARGET_PC - // Optimization: don't draw map if it's off-screen/invisible. - // Especially useful in debug builds on Hyrule field etc., it's slow! - // That +3 is an arbitrary bias to avoid rounding issues causing this to fail. - if ((!mMapIsInside && mSlidePositionOffset <= getDispPosOutSide_OffsetX() + 3) || mMapAlpha == 0) { - return; - } -#endif - mMap->_draw(); dComIfGd_set2DOpa(this); #endif From 1d8ce5bbb7852f6c3db3beae9b3f7aea6e6b6b29 Mon Sep 17 00:00:00 2001 From: MelonSpeedruns Date: Thu, 9 Apr 2026 17:40:51 -0400 Subject: [PATCH 2/2] Moved check behind HYRULE_FIELD_SPEEDHACK define --- src/d/d_map.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/d/d_map.cpp b/src/d/d_map.cpp index 3fe638cd2f..7dc5187a88 100644 --- a/src/d/d_map.cpp +++ b/src/d/d_map.cpp @@ -539,10 +539,16 @@ void renderingAmap_c::rendering(dDrawPath_c::poly_class const* i_poly) { } } +/* Enabling the following definition will modify the following function to + * make the map look worse for extra speed in the emulator, especially in large + * areas such as hyrule field. + */ +#define HYRULE_FIELD_SPEEDHACK + bool renderingAmap_c::isDrawOutSideTrim() { bool rt = false; - #if TARGET_PC + #ifdef HYRULE_FIELD_SPEEDHACK return 0; #endif