2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-20 11:05:24 +00:00

Text rendering & CWorldTransManager fixes

This commit is contained in:
2022-05-19 00:57:30 -07:00
parent ef71c009c6
commit 26fd0e2b9f
22 changed files with 132 additions and 244 deletions

View File

@@ -149,8 +149,11 @@ void CGuiTextSupport::Update(float dt) {
break;
}
//buf->SetPrimitiveOpacity(i, std::min(std::max(0.f, (x3c_curTime - chStartTime) / x54_chFadeTime), 1.f));
auto primitive = buf->GetPrimitive(i);
float alpha = std::clamp((x3c_curTime - chStartTime) / x54_chFadeTime, 0.f, 1.f);
chStartTime += 1.f / x58_chRate;
primitive.x0_color1 = zeus::CColor{alpha, alpha};
buf->SetPrimitive(primitive, i);
}
}
x3c_curTime += dt;