[Opentnl-cvs] tnl/zap UIGame.cpp,1.22,1.23
Brought to you by:
mark_frohnmayer,
s_alanet
From: Mark F. <mar...@us...> - 2004-05-09 20:41:15
|
Update of /cvsroot/opentnl/tnl/zap In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1923/zap Modified Files: UIGame.cpp Log Message: Added color coded mic level Index: UIGame.cpp =================================================================== RCS file: /cvsroot/opentnl/tnl/zap/UIGame.cpp,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** UIGame.cpp 9 May 2004 20:35:17 -0000 1.22 --- UIGame.cpp 9 May 2004 20:41:05 -0000 1.23 *************** *** 596,603 **** glVertex2f(10 + totalLineCount * 2, 130); glVertex2f(10 + totalLineCount * 2, 145); - glColor3f(0.8, 0.8, 0.8); ! for(U32 i = 1; i < amt * totalLineCount; i++) { glVertex2f(10 + i * 2, 130); glVertex2f(10 + i * 2, 145); --- 596,609 ---- glVertex2f(10 + totalLineCount * 2, 130); glVertex2f(10 + totalLineCount * 2, 145); ! F32 halfway = totalLineCount * 0.5; ! F32 full = amt * totalLineCount; ! for(U32 i = 1; i < full; i++) { + if(i < halfway) + glColor3f(i / halfway, 1, 0); + else + glColor3f(1, 1 - (i - halfway) / halfway, 0); + glVertex2f(10 + i * 2, 130); glVertex2f(10 + i * 2, 145); |