Previous 199869 Revisions Next

r40679 Friday 11th September, 2015 at 08:23:33 UTC by Andrew Gardner
hng64 : Bugfix for polynew conversion - fixed writing to the z-buffer in the
wrong spot.
[src/mame/video]hng64_3d.c

trunk/src/mame/video/hng64_3d.c
r249190r249191
10291029/* vector by 4x4 matrix multiply */
10301030void hng64_state::vecmatmul4(float *product, const float *a, const float *b)
10311031{
1032   const float bi0 = b[0];
1033   const float bi1 = b[1];
1034   const float bi2 = b[2];
1035   const float bi3 = b[3];
1032   const float& bi0 = b[0];
1033   const float& bi1 = b[1];
1034   const float& bi2 = b[2];
1035   const float& bi3 = b[3];
10361036
10371037   product[0] = bi0 * a[0] + bi1 * a[4] + bi2 * a[8 ] + bi3 * a[12];
10381038   product[1] = bi0 * a[1] + bi1 * a[5] + bi2 * a[9 ] + bi3 * a[13];
r249190r249191
12471247    {
12481248        if (z < *depthBuffer)
12491249        {
1250            // Translucency currently isn't an issue, so soldier on
1251            *depthBuffer = z;
1252
12531250            // Multiply back through by w for everything that was interpolated perspective-correctly
12541251            const float sCorrect = s / w;
12551252            const float tCorrect = t / w;
r249190r249191
13361333               color = rgb_t(255, (UINT8)red, (UINT8)green, (UINT8)blue);
13371334
13381335               *colorBuffer = color;
1336                    *depthBuffer = z;
13391337            }
13401338         }
13411339        }


Previous 199869 Revisions Next


© 1997-2024 The MAME Team