chore: overhaul renderer decompilation to match as closely as possible to the original

Co-authored-by: la <76826837+3UR@users.noreply.github.com>
This commit is contained in:
dxfiscool
2026-03-04 07:37:53 +10:00
committed by la
co-authored by la
parent cc6aade337
commit 39339e821e
8 changed files with 1567 additions and 1566 deletions
+3 -2
View File
@@ -31,7 +31,8 @@ const float *Renderer::MatrixGet(int type)
{
Context &c = getContext();
const int depth = c.stackPos[type];
return reinterpret_cast<const float *>(&c.matrixStacks[type][depth]);
const DirectX::XMMATRIX &matrix = c.matrixStacks[type][depth];
return &matrix.r[0].m128_f32[0];
}
void Renderer::MatrixMode(int type)
@@ -57,7 +58,7 @@ void Renderer::MatrixOrthogonal(float left, float right, float bottom, float top
void Renderer::MatrixPerspective(float fovy, float aspect, float zNear, float zFar)
{
const float fovRadians = fovy * (3.14159274f / 180.0f);
const float fovRadians = fovy * (PI / 180.0f);
const DirectX::XMMATRIX matrix = DirectX::XMMatrixPerspectiveFovRH(fovRadians, aspect, zNear, zFar);
MultWithStack(matrix);
}