Skip to content
This repository has been archived by the owner on Oct 4, 2024. It is now read-only.

Commit

Permalink
output: fix regression in Output_DrawPoly_Gouraud
Browse files Browse the repository at this point in the history
  • Loading branch information
rr- committed Feb 24, 2024
1 parent 4a852b0 commit 6186ce0
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/game/output.c
Original file line number Diff line number Diff line change
Expand Up @@ -4195,12 +4195,14 @@ void __cdecl Output_DrawPoly_Gouraud(
const int32_t blue)
{
for (int i = 0; i < vtx_count; i++) {
g_HWR_VertexPtr[i].sx = g_VBuffer[i].x;
g_HWR_VertexPtr[i].sy = g_VBuffer[i].y;
g_HWR_VertexPtr[i].sz = g_FltResZBuf - g_FltResZORhw * g_VBuffer[i].rhw;
g_HWR_VertexPtr[i].rhw = g_VBuffer[i].rhw;
g_HWR_VertexPtr[i].color =
Output_ShadeLightColor(g_VBuffer[i].g, red, green, blue, 0xFF);
const VERTEX_INFO *vbuf = &g_VBuffer[i];
D3DTLVERTEX *vbuf_d3d = &g_VBufferD3D[i];
vbuf_d3d->sx = vbuf->x;
vbuf_d3d->sy = vbuf->y;
vbuf_d3d->sz = g_FltResZBuf - g_FltResZORhw * vbuf->rhw;
vbuf_d3d->rhw = vbuf->rhw;
vbuf_d3d->color =
Output_ShadeLightColor(vbuf->g, red, green, blue, 0xFF);
}

g_D3DDev->lpVtbl->DrawPrimitive(
Expand Down

0 comments on commit 6186ce0

Please sign in to comment.