summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatarGravatar angelosa <salese_corp_ltd@email.it>2018-03-07 22:27:20 +0100
committerGravatarGravatar angelosa <salese_corp_ltd@email.it>2018-03-07 23:33:03 +0100
commit73260492dc6bdb85fc32c9bc3c2fda036233e6e1 (patch) (github)
treee8ba9dec5a5ad34f211c44d1663f5da2091a980d
parent2731786d612559d7517a016d764d051f965469d6 (diff)
downloadmame-73260492dc6bdb85fc32c9bc3c2fda036233e6e1.tar.bz2
mame-73260492dc6bdb85fc32c9bc3c2fda036233e6e1.zip
model2.cpp: in geo mode 2 & 3 normals are skipped for every triangle/quad [Angelo Salese]
* fixes graphical glitches in Virtual On, Gunblade NY, Dead or Alive, Sonic the Fighters, Rail Chase 2, Virtua Fighter 2, Desert Tank
-rw-r--r--src/mame/video/model2.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/mame/video/model2.cpp b/src/mame/video/model2.cpp
index 56dfb301a6e..c1609f47ab1 100644
--- a/src/mame/video/model2.cpp
+++ b/src/mame/video/model2.cpp
@@ -1575,9 +1575,6 @@ void model2_state::geo_parse_nn_ns( geo_state *geo, uint32_t *input, uint32_t co
model2_3d_push( raster, f2u(point.y) >> 8 );
model2_3d_push( raster, f2u(point.pz) >> 8 );
- /* skip 4 */
- input += 4;
-
/* loop through the following links */
for( i = 0; i < count; i++ )
{
@@ -1594,6 +1591,9 @@ void model2_state::geo_parse_nn_ns( geo_state *geo, uint32_t *input, uint32_t co
int32_t luma;
texture_parameter * texparam;
+ /* Skip normal */
+ input += 3;
+
/* read in the next point */
point.x = u2f( *input++ );
point.y = u2f( *input++ );
@@ -1770,9 +1770,6 @@ void model2_state::geo_parse_nn_s( geo_state *geo, uint32_t *input, uint32_t cou
model2_3d_push( raster, f2u(point.y) >> 8 );
model2_3d_push( raster, f2u(point.pz) >> 8 );
- /* skip 4 */
- input += 4;
-
/* loop through the following links */
for( i = 0; i < count; i++ )
{
@@ -1789,6 +1786,9 @@ void model2_state::geo_parse_nn_s( geo_state *geo, uint32_t *input, uint32_t cou
int32_t luma;
texture_parameter * texparam;
+ /* Skip normal */
+ input += 3;
+
/* read in the next point */
point.x = u2f( *input++ );
point.y = u2f( *input++ );