mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-06-11 12:39:48 -04:00
Merge pull request #299 from TwilitRealm/fix/alternate-map-fix
Fixes map performance even if it's drawn on screen
This commit is contained in:
@@ -539,9 +539,19 @@ 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;
|
||||
|
||||
#ifdef HYRULE_FIELD_SPEEDHACK
|
||||
return 0;
|
||||
#endif
|
||||
|
||||
if (getDispType() == 0 || getDispType() == 4 || getDispType() == 3 || getDispType() == 2 ||
|
||||
getDispType() == 5)
|
||||
{
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user