[Opentnl-cvs] tnl/zap UICredits.cpp,1.1,1.2 UICredits.h,1.2,1.3
Brought to you by:
mark_frohnmayer,
s_alanet
From: Robert B. Jr. <rbl...@us...> - 2004-04-30 21:36:14
|
Update of /cvsroot/opentnl/tnl/zap In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12265/zap Modified Files: UICredits.cpp UICredits.h Log Message: Added Zap title and GarageGames.com coypright notice to the credits. Index: UICredits.cpp =================================================================== RCS file: /cvsroot/opentnl/tnl/zap/UICredits.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** UICredits.cpp 30 Apr 2004 06:55:52 -0000 1.1 --- UICredits.cpp 30 Apr 2004 21:36:05 -0000 1.2 *************** *** 98,110 **** void CreditsScroller::updateFX(U32 delta) { // scroll the credits text from bottom to top // based on time for(S32 i = 0; i < credits.size(); i++) { ! S32 pos = credits[i].currPos.x - (delta / 10); // reached the top, reset if(pos < -CreditSpace) ! pos = gCreditsUserInterface.canvasHeight + CreditSpace * 3; credits[i].currPos.x = pos; --- 98,116 ---- void CreditsScroller::updateFX(U32 delta) { + // draw the project information + S32 pos = mProjectInfo.currPos.x - (delta / 10); + if(pos < -CreditSpace) + pos = (UserInterface::canvasHeight * 2) + CreditSpace; + mProjectInfo.currPos.x = pos; + // scroll the credits text from bottom to top // based on time for(S32 i = 0; i < credits.size(); i++) { ! pos = credits[i].currPos.x - (delta / 10); // reached the top, reset if(pos < -CreditSpace) ! pos = (UserInterface::canvasHeight * 2) + CreditSpace; credits[i].currPos.x = pos; *************** *** 114,123 **** void CreditsScroller::render() { - // draw the credits text glColor3f(1,1,1); for(S32 i = 0; i < credits.size(); i++) { ! gCreditsUserInterface.drawCenteredString(credits[i].currPos.x, 25, credits[i].jobBuf); ! gCreditsUserInterface.drawCenteredString(credits[i].currPos.x + 50, 25, credits[i].nameBuf); } } --- 120,136 ---- void CreditsScroller::render() { glColor3f(1,1,1); + + // draw the project information + glLineWidth(10); + UserInterface::drawCenteredString(mProjectInfo.currPos.x, 100, mProjectInfo.titleBuf); + glLineWidth(1); + UserInterface::drawCenteredString(mProjectInfo.currPos.x + 120, 20, mProjectInfo.copyBuf); + + // draw the credits text for(S32 i = 0; i < credits.size(); i++) { ! UserInterface::drawCenteredString(credits[i].currPos.x, 25, credits[i].jobBuf); ! UserInterface::drawCenteredString(credits[i].currPos.x + 50, 25, credits[i].nameBuf); } } *************** *** 130,136 **** return; ! char name[MaxCreditLen]; ! char job[MaxCreditLen]; ! S32 pos = gCreditsUserInterface.canvasHeight + CreditSpace; // loop through each line in the credits file, expecting --- 143,150 ---- return; ! // read project information from the credits file ! fgets(mProjectInfo.titleBuf, MaxCreditLen, f); ! fgets(mProjectInfo.copyBuf, MaxCreditLen, f); ! mProjectInfo.currPos.x = (UserInterface::canvasHeight - 100) / 2; // loop through each line in the credits file, expecting *************** *** 138,141 **** --- 152,156 ---- // 1) job // 2) name + S32 pos = (UserInterface::canvasHeight + CreditSpace); while(!feof(f)) { *************** *** 143,152 **** // get job ! fgets(job, MaxCreditLen, f); ! strcpy(c.jobBuf, job); // get name ! fgets(name, MaxCreditLen, f); ! strcpy(c.nameBuf, name); // place credit in cache --- 158,165 ---- // get job ! fgets(c.jobBuf, MaxCreditLen, f); // get name ! fgets(c.nameBuf, MaxCreditLen, f); // place credit in cache Index: UICredits.h =================================================================== RCS file: /cvsroot/opentnl/tnl/zap/UICredits.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** UICredits.h 30 Apr 2004 07:16:00 -0000 1.2 --- UICredits.h 30 Apr 2004 21:36:05 -0000 1.3 *************** *** 52,58 **** enum Credits { MaxCreditLen = 32, ! CreditSpace = 200 }; ! struct CreditsInfo { char nameBuf[MaxCreditLen+1]; --- 52,63 ---- enum Credits { MaxCreditLen = 32, ! CreditSpace = 200, }; ! ! struct ProjectInfo { ! char titleBuf[MaxCreditLen+1]; ! char copyBuf[MaxCreditLen+1]; ! Point currPos; ! } mProjectInfo; struct CreditsInfo { char nameBuf[MaxCreditLen+1]; |