From e9fe289f2d558e07eb4c32d46d7d343ef355422c Mon Sep 17 00:00:00 2001 From: Thad Ward Date: Sat, 19 Jun 2004 04:45:31 +0000 Subject: [PATCH] add Cel Shading drawing code. (I dunno, perhaps this should be part of Model::Draw() instead of a separate function...) --- stepmania/src/BeginnerHelper.cpp | 45 +++++++++++++++++++++++--------- 1 file changed, 32 insertions(+), 13 deletions(-) diff --git a/stepmania/src/BeginnerHelper.cpp b/stepmania/src/BeginnerHelper.cpp index b1b74fe540..91f88d426f 100644 --- a/stepmania/src/BeginnerHelper.cpp +++ b/stepmania/src/BeginnerHelper.cpp @@ -241,24 +241,43 @@ void BeginnerHelper::DrawPrimitives() m_sFlash.Draw(); - DISPLAY->SetLighting( true ); - DISPLAY->SetLightDirectional( - 0, - RageColor(0.5,0.5,0.5,1), - RageColor(1,1,1,1), - RageColor(0,0,0,1), - RageVector3(0, 0, 1) ); + bool DrawCelShaded = PREFSMAN->m_bCelShadeModels; + + if(DrawCelShaded) + { + m_mDancePad.DrawCelShaded(); + } + else + { + DISPLAY->SetLighting( true ); + DISPLAY->SetLightDirectional( + 0, + RageColor(0.5,0.5,0.5,1), + RageColor(1,1,1,1), + RageColor(0,0,0,1), + RageVector3(0, 0, 1) ); + + m_mDancePad.Draw(); + } - m_mDancePad.Draw(); for( int scd=0; scdIsHumanPlayer(pn) ) - m_mDancer[pn].Draw(); + if(DrawCelShaded) + { + FOREACH_PlayerNumber( pn ) // Draw each dancer + if( GAMESTATE->IsHumanPlayer(pn) ) + m_mDancer[pn].DrawCelShaded(); + } + else + { + FOREACH_PlayerNumber( pn ) // Draw each dancer + if( GAMESTATE->IsHumanPlayer(pn) ) + m_mDancer[pn].Draw(); - DISPLAY->SetLightOff( 0 ); - DISPLAY->SetLighting( false ); + DISPLAY->SetLightOff( 0 ); + DISPLAY->SetLighting( false ); + } } void BeginnerHelper::Step( int pn, int CSTEP )