mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-06-01 01:08:48 -04:00
map deco perf
This commit is contained in:
+26
-8
@@ -497,12 +497,6 @@ void dRenderingFDAmap_c::postRenderingMap() {
|
||||
|
||||
dMpath_n::dTexObjAggregate_c dMpath_n::m_texObjAgg;
|
||||
|
||||
/* 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
|
||||
|
||||
void dRenderingFDAmap_c::renderingDecoration(dDrawPath_c::line_class const* p_line) {
|
||||
s32 width = getDecorationLineWidth(p_line->field_0x1);
|
||||
if (width <= 0) {
|
||||
@@ -527,8 +521,32 @@ void dRenderingFDAmap_c::renderingDecoration(dDrawPath_c::line_class const* p_li
|
||||
lineColor.r = lineColor.r - 4;
|
||||
GXSetTevColor(GX_TEVREG1, lineColor);
|
||||
|
||||
#if TARGET_PC
|
||||
GXSetTevColorIn(GX_TEVSTAGE0, GX_CC_ZERO, GX_CC_ZERO, GX_CC_ZERO, GX_CC_C0);
|
||||
GXSetTevColorOp(GX_TEVSTAGE0, GX_TEV_ADD, GX_TB_ZERO, GX_CS_SCALE_1, GX_TRUE, GX_TEVPREV);
|
||||
GXSetTevAlphaIn(GX_TEVSTAGE0, GX_CA_ZERO, GX_CA_ZERO, GX_CA_ZERO, GX_CA_KONST);
|
||||
GXSetTevAlphaOp(GX_TEVSTAGE0, GX_TEV_ADD, GX_TB_ZERO, GX_CS_SCALE_1, GX_TRUE, GX_TEVPREV);
|
||||
GXBegin(GX_LINESTRIP, GX_VTXFMT0, 2 * (data_num - 1));
|
||||
for (int i = 0; i < data_num - 1; i++) {
|
||||
GXPosition1x16(data_p[i]);
|
||||
GXTexCoord2f32(0, 0);
|
||||
GXPosition1x16(data_p[i + 1]);
|
||||
GXTexCoord2f32(0, 0);
|
||||
}
|
||||
GXEnd();
|
||||
|
||||
GXSetTevColorIn(GX_TEVSTAGE0, GX_CC_ZERO, GX_CC_KONST, GX_CC_TEXC, GX_CC_C1);
|
||||
GXSetTevColorOp(GX_TEVSTAGE0, GX_TEV_ADD, GX_TB_ZERO, GX_CS_SCALE_1, GX_TRUE, GX_TEVPREV);
|
||||
GXSetTevAlphaIn(GX_TEVSTAGE0, GX_CA_ZERO, GX_CA_ZERO, GX_CA_ZERO, GX_CA_TEXA);
|
||||
GXSetTevAlphaOp(GX_TEVSTAGE0, GX_TEV_ADD, GX_TB_ZERO, GX_CS_SCALE_1, GX_TRUE, GX_TEVPREV);
|
||||
GXBegin(GX_POINTS, GX_VTXFMT0, data_num);
|
||||
for (int i = 0; i < data_num; i++) {
|
||||
GXPosition1x16(data_p[i]);
|
||||
GXTexCoord2f32(0, 0);
|
||||
}
|
||||
GXEnd();
|
||||
#else
|
||||
for (int i = 0; i < data_num; i++) {
|
||||
#ifndef HYRULE_FIELD_SPEEDHACK
|
||||
if (i < data_num - 1) {
|
||||
GXSetTevColorIn(GX_TEVSTAGE0, GX_CC_ZERO, GX_CC_ZERO, GX_CC_ZERO, GX_CC_C0);
|
||||
GXSetTevColorOp(GX_TEVSTAGE0, GX_TEV_ADD, GX_TB_ZERO, GX_CS_SCALE_1, GX_TRUE,
|
||||
@@ -547,7 +565,6 @@ void dRenderingFDAmap_c::renderingDecoration(dDrawPath_c::line_class const* p_li
|
||||
GXSetTevColorOp(GX_TEVSTAGE0, GX_TEV_ADD, GX_TB_ZERO, GX_CS_SCALE_1, GX_TRUE, GX_TEVPREV);
|
||||
GXSetTevAlphaIn(GX_TEVSTAGE0, GX_CA_ZERO, GX_CA_ZERO, GX_CA_ZERO, GX_CA_TEXA);
|
||||
GXSetTevAlphaOp(GX_TEVSTAGE0, GX_TEV_ADD, GX_TB_ZERO, GX_CS_SCALE_1, GX_TRUE, GX_TEVPREV);
|
||||
#endif
|
||||
|
||||
GXBegin(GX_POINTS, GX_VTXFMT0, 1);
|
||||
GXPosition1x16(data_p[0]);
|
||||
@@ -555,6 +572,7 @@ void dRenderingFDAmap_c::renderingDecoration(dDrawPath_c::line_class const* p_li
|
||||
GXEnd();
|
||||
data_p++;
|
||||
}
|
||||
#endif
|
||||
|
||||
setTevSettingNonTextureDirectColor();
|
||||
GXClearVtxDesc();
|
||||
|
||||
Reference in New Issue
Block a user