From 73260492dc6bdb85fc32c9bc3c2fda036233e6e1 Mon Sep 17 00:00:00 2001 From: angelosa Date: Wed, 7 Mar 2018 22:27:20 +0100 Subject: 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 --- src/mame/video/model2.cpp | 12 ++++++------ 1 file 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++ ); -- cgit v1.2.3