Fixed missing/wrong theme elements

This commit is contained in:
Chris Danford
2002-09-05 03:45:07 +00:00
parent 41d4db5e6f
commit d7626f6004
19 changed files with 157 additions and 155 deletions
+5 -1
View File
@@ -1,5 +1,9 @@
------------------------CVS after 3.00 beta 6---------------- ------------------------CVS after 3.00 beta 6----------------
CHANGE: Font format is not simpler. See README for details. CHANGE: Hold head now drawn in place tap note graphic when a Hold starts
on the same row.
CHANGE: Added bright ghost flash on hold note score of OK.
CHANGE: Font format new easier to export for font creators. See README
for details.
NEW FEATURE: Option Icons. NEW FEATURE: Option Icons.
NEW FEATURE: Best sort now shows only top 30 songs. NEW FEATURE: Best sort now shows only top 30 songs.
NEW FEATURE: Option codes on the Select Music and Select Course screens NEW FEATURE: Option codes on the Select Music and Select Course screens
+12 -9
View File
@@ -2,6 +2,9 @@
Fix Fix
///////////////////////// /////////////////////////
arcade mode
about us page
new phpwebhosting account new phpwebhosting account
@@ -27,15 +30,13 @@ precise timing adjustment
draw taps on same row as hold with hold head draw taps on same row as hold with hold head
texture cache
max style lifemeter animation max style lifemeter animation
TICK_MELODY
164 theme 164 theme
pause in course contents scroll warning
name entry
gap between wheel items gap between wheel items
@@ -47,18 +48,20 @@ ready, here we go between each stage of a course
send disc to Penny Arcade send disc to Penny Arcade
danger BGA, danger movie
different top bar frame for oni different top bar frame for oni
move NoteSkin to Theme
///////////////////// /////////////////////
Punt: Punt:
///////////////////// /////////////////////
texture cache texture cache
move NoteSkin to Theme
TICK_MELODY
texture cache
groove radar smoothing and texture effects groove radar smoothing and texture effects
couple changes couple changes
+10 -8
View File
@@ -211,18 +211,20 @@ TimerSeconds=60
ScoreConnectedToMusicWheel=1 ScoreConnectedToMusicWheel=1
[ScreenSelectCourse] [ScreenSelectCourse]
ExplanationX=132
ExplanationY=68
BannerFrameX=160 BannerFrameX=160
BannerFrameY=118 BannerFrameY=158
BannerX=150 BannerX=150
BannerY=132 BannerY=172
BannerWidth=286 BannerWidth=286
BannerHeight=92 BannerHeight=92
StagesX=58 StagesX=58
StagesY=74 StagesY=114
TimeX=192 TimeX=192
TimeY=74 TimeY=114
ContentsX=160 ContentsX=160
ContentsY=320 ContentsY=336
WheelX=480 WheelX=480
WheelY=248 WheelY=248
ScoreP1X=520 ScoreP1X=520
@@ -302,8 +304,8 @@ StageY=64
GradeP1X=94 GradeP1X=94
GradeP2X=546 GradeP2X=546
GradeY=100 GradeY=100
PercentBaseP1X=130 PercentBaseP1X=120
PercentBaseP2X=582 PercentBaseP2X=572
PercentBaseY=134 PercentBaseY=134
JudgeLabelsX=320 JudgeLabelsX=320
PerfectP1X=230 PerfectP1X=230
@@ -538,7 +540,7 @@ StageColor5=0.4,0.4,0.9,1 // light blue
StageColorFinal=1.0,0.1,0.1,1 // red StageColorFinal=1.0,0.1,0.1,1 // red
StageColorExtra1=1.0,1,0.3,1 // yellow StageColorExtra1=1.0,1,0.3,1 // yellow
StageColorExtra2=1.0,1,0.3,1 // yellow StageColorExtra2=1.0,1,0.3,1 // yellow
StageColorOni=1.0,0.1,0.1,1 // red StageColorOni=0.3,1.0,0.3,1 // green
StageTextDemo=Demo StageTextDemo=Demo
StageTextFinal=Final StageTextFinal=Final
StageTextExtra1=Extra StageTextExtra1=Extra
+14 -4
View File
@@ -129,13 +129,23 @@ float ArrowGetPercentVisible( PlayerNumber pn, float fYPos )
return clamp( fAlpha, 0, 1 ); return clamp( fAlpha, 0, 1 );
} }
float ArrowGetAlpha( PlayerNumber pn, float fYPos ) float ArrowGetAlpha( PlayerNumber pn, float fYPos, float fPercentFadeToFail )
{ {
return (ArrowGetPercentVisible(pn,fYPos) > 0.5f) ? 1.0f : 0.0f; float fPercentVisible = ArrowGetPercentVisible(pn,fYPos);
if( fPercentFadeToFail != -1 )
fPercentVisible = 1 - fPercentFadeToFail;
return (fPercentVisible>0.5f) ? 1.0f : 0.0f;
} }
float ArrowGetGlow( PlayerNumber pn, float fYPos ) float ArrowGetGlow( PlayerNumber pn, float fYPos, float fPercentFadeToFail )
{ {
const float fDistFromHalf = fabsf( ArrowGetPercentVisible(pn,fYPos) - 0.5f ); float fPercentVisible = ArrowGetPercentVisible(pn,fYPos);
if( fPercentFadeToFail != -1 )
fPercentVisible = 1 - fPercentFadeToFail;
const float fDistFromHalf = fabsf( fPercentVisible - 0.5f );
return SCALE( fDistFromHalf, 0, 0.5f, 1.3f, 0 ); return SCALE( fDistFromHalf, 0, 0.5f, 1.3f, 0 );
} }
+2 -2
View File
@@ -44,10 +44,10 @@ float ArrowGetXPos( PlayerNumber pn, int iCol, float fYPos );
// fAlpha is the transparency of the arrow. It depends on fYPos and the // fAlpha is the transparency of the arrow. It depends on fYPos and the
// ArrowAppearance. // ArrowAppearance.
float ArrowGetAlpha( PlayerNumber pn, float fYPos ); float ArrowGetAlpha( PlayerNumber pn, float fYPos, float fPercentFadeToFail );
// fAlpha is the transparency of the arrow. It depends on fYPos and the // fAlpha is the transparency of the arrow. It depends on fYPos and the
// ArrowAppearance. // ArrowAppearance.
float ArrowGetGlow( PlayerNumber pn, float fYPos ); float ArrowGetGlow( PlayerNumber pn, float fYPos, float fPercentFadeToFail );
+8
View File
@@ -16,6 +16,14 @@
#include "SongManager.h" #include "SongManager.h"
#include "RageBitmapTexture.h" #include "RageBitmapTexture.h"
Banner::Banner()
{
m_bScrolling = false;
m_fPercentScrolling = 0;
Banner::Load( THEME->GetPathTo("Graphics","fallback banner") );
}
bool Banner::Load( CString sFilePath, bool bForceReload, int iMipMaps, int iAlphaBits, bool bDither, bool bStretch ) bool Banner::Load( CString sFilePath, bool bForceReload, int iMipMaps, int iAlphaBits, bool bDither, bool bStretch )
{ {
// note that the defaults are changes for faster loading // note that the defaults are changes for faster loading
+1 -5
View File
@@ -18,11 +18,7 @@ class Course;
class Banner : public CroppedSprite class Banner : public CroppedSprite
{ {
public: public:
Banner() Banner();
{
m_bScrolling = false;
m_fPercentScrolling = 0;
};
virtual bool Load( CString sFilePath, bool bForceReload = false, int iMipMaps = 0, int iAlphaBits = 0, bool bDither = false, bool bStretch = false ); virtual bool Load( CString sFilePath, bool bForceReload = false, int iMipMaps = 0, int iAlphaBits = 0, bool bDither = false, bool bStretch = false );
+6 -2
View File
@@ -49,7 +49,7 @@ CourseContentDisplay::CourseContentDisplay()
m_TextBanner.SetXY( TEXT_BANNER_X, TEXT_BANNER_Y ); m_TextBanner.SetXY( TEXT_BANNER_X, TEXT_BANNER_Y );
this->AddChild( &m_TextBanner ); this->AddChild( &m_TextBanner );
m_textFoot.LoadFromFont( THEME->GetPathTo("Fonts","meter") ); m_textFoot.LoadFromTextureAndChars( THEME->GetPathTo("Graphics","select music meter 2x1"),"10" );
m_textFoot.SetXY( FOOT_X, FOOT_Y ); m_textFoot.SetXY( FOOT_X, FOOT_Y );
m_textFoot.TurnShadowOff(); m_textFoot.TurnShadowOff();
this->AddChild( &m_textFoot ); this->AddChild( &m_textFoot );
@@ -153,7 +153,11 @@ void CourseContentsFrame::DrawPrimitives()
int iItemToDraw = (int)m_fItemAtTopOfList; int iItemToDraw = (int)m_fItemAtTopOfList;
float fY = (iItemToDraw-m_fItemAtTopOfList-(MAX_VISIBLE_CONTENTS-1)/2) * CONTENTS_BAR_HEIGHT; // HACK: Insert a little pause as a new item appears on the screen
float fRemainder = m_fItemAtTopOfList - (int)m_fItemAtTopOfList;
fRemainder = min( fRemainder*1.5f, 1 );
float fY = (-fRemainder-(MAX_VISIBLE_CONTENTS-1)/2) * CONTENTS_BAR_HEIGHT;
for( int i=0; i<min(MAX_VISIBLE_CONTENTS+1, m_iNumContents); i++ ) for( int i=0; i<min(MAX_VISIBLE_CONTENTS+1, m_iNumContents); i++ )
{ {
+26 -15
View File
@@ -225,10 +225,10 @@ void NoteDisplay::DrawHold( const HoldNote& hn, const bool bActive, const float
ASSERT( fBottomDistFromTailTop-0.0001 <= fFrameHeight ); ASSERT( fBottomDistFromTailTop-0.0001 <= fFrameHeight );
const float fTexCoordLeft = bActive ? 0.25f : 0.00f; const float fTexCoordLeft = bActive ? 0.25f : 0.00f;
const float fTexCoordRight = bActive ? 0.50f : 0.25f; const float fTexCoordRight = bActive ? 0.50f : 0.25f;
const float fAlphaTop = ArrowGetAlpha( m_PlayerNumber, fYTop ); const float fAlphaTop = ArrowGetAlpha( m_PlayerNumber, fYTop, fPercentFadeToFail );
const float fAlphaBottom = ArrowGetAlpha( m_PlayerNumber, fYBottom ); const float fAlphaBottom = ArrowGetAlpha( m_PlayerNumber, fYBottom, fPercentFadeToFail );
const float fGlowTop = ArrowGetGlow( m_PlayerNumber, fYTop ); const float fGlowTop = ArrowGetGlow( m_PlayerNumber, fYTop, fPercentFadeToFail );
const float fGlowBottom = ArrowGetGlow( m_PlayerNumber, fYBottom ); const float fGlowBottom = ArrowGetGlow( m_PlayerNumber, fYBottom, fPercentFadeToFail );
const float fColorScale = SCALE(fLife,0,1,0.5f,1); const float fColorScale = SCALE(fLife,0,1,0.5f,1);
const D3DXCOLOR colorDiffuseTop = D3DXCOLOR(fColorScale,fColorScale,fColorScale,fAlphaTop); const D3DXCOLOR colorDiffuseTop = D3DXCOLOR(fColorScale,fColorScale,fColorScale,fAlphaTop);
const D3DXCOLOR colorDiffuseBottom = D3DXCOLOR(fColorScale,fColorScale,fColorScale,fAlphaBottom); const D3DXCOLOR colorDiffuseBottom = D3DXCOLOR(fColorScale,fColorScale,fColorScale,fAlphaBottom);
@@ -268,10 +268,10 @@ void NoteDisplay::DrawHold( const HoldNote& hn, const bool bActive, const float
const float fTexCoordBottom = SCALE( fBottomDistFromTailTop, 0, fBodyHeight, 1, 0 ); const float fTexCoordBottom = SCALE( fBottomDistFromTailTop, 0, fBodyHeight, 1, 0 );
const float fTexCoordLeft = bActive ? 0.75f : 0.50f; const float fTexCoordLeft = bActive ? 0.75f : 0.50f;
const float fTexCoordRight = bActive ? 1.00f : 0.75f; const float fTexCoordRight = bActive ? 1.00f : 0.75f;
const float fAlphaTop = ArrowGetAlpha( m_PlayerNumber, fYTop ); const float fAlphaTop = ArrowGetAlpha( m_PlayerNumber, fYTop, fPercentFadeToFail );
const float fAlphaBottom = ArrowGetAlpha( m_PlayerNumber, fYBottom ); const float fAlphaBottom = ArrowGetAlpha( m_PlayerNumber, fYBottom, fPercentFadeToFail );
const float fGlowTop = ArrowGetGlow( m_PlayerNumber, fYTop ); const float fGlowTop = ArrowGetGlow( m_PlayerNumber, fYTop, fPercentFadeToFail );
const float fGlowBottom = ArrowGetGlow( m_PlayerNumber, fYBottom ); const float fGlowBottom = ArrowGetGlow( m_PlayerNumber, fYBottom, fPercentFadeToFail );
const float fColorScale = SCALE(fLife,0,1,0.5f,1); const float fColorScale = SCALE(fLife,0,1,0.5f,1);
const D3DXCOLOR colorDiffuseTop = D3DXCOLOR(fColorScale,fColorScale,fColorScale,fAlphaTop); const D3DXCOLOR colorDiffuseTop = D3DXCOLOR(fColorScale,fColorScale,fColorScale,fAlphaTop);
const D3DXCOLOR colorDiffuseBottom = D3DXCOLOR(fColorScale,fColorScale,fColorScale,fAlphaBottom); const D3DXCOLOR colorDiffuseBottom = D3DXCOLOR(fColorScale,fColorScale,fColorScale,fAlphaBottom);
@@ -299,8 +299,8 @@ void NoteDisplay::DrawHold( const HoldNote& hn, const bool bActive, const float
{ {
fY = fYHead; fY = fYHead;
const float fX = ArrowGetXPos( m_PlayerNumber, iCol, fY ); const float fX = ArrowGetXPos( m_PlayerNumber, iCol, fY );
const float fAlpha = ArrowGetAlpha( m_PlayerNumber, fY ); const float fAlpha = ArrowGetAlpha( m_PlayerNumber, fY, fPercentFadeToFail );
const float fGlow = ArrowGetGlow( m_PlayerNumber, fY ); const float fGlow = ArrowGetGlow( m_PlayerNumber, fY, fPercentFadeToFail );
const float fColorScale = SCALE(fLife,0,1,0.5f,1); const float fColorScale = SCALE(fLife,0,1,0.5f,1);
const D3DXCOLOR colorDiffuse= D3DXCOLOR(fColorScale,fColorScale,fColorScale,fAlpha); const D3DXCOLOR colorDiffuse= D3DXCOLOR(fColorScale,fColorScale,fColorScale,fAlpha);
const D3DXCOLOR colorGlow = D3DXCOLOR(1,1,1,fGlow); const D3DXCOLOR colorGlow = D3DXCOLOR(1,1,1,fGlow);
@@ -331,22 +331,32 @@ void NoteDisplay::DrawTap( const int iCol, const float fBeat, const bool bUseHol
const float fYPos = ArrowGetYPos( m_PlayerNumber, fYOffset ); const float fYPos = ArrowGetYPos( m_PlayerNumber, fYOffset );
const float fRotation = ArrowGetRotation( m_PlayerNumber, iCol, fYOffset ); const float fRotation = ArrowGetRotation( m_PlayerNumber, iCol, fYOffset );
const float fXPos = ArrowGetXPos( m_PlayerNumber, iCol, fYPos ); const float fXPos = ArrowGetXPos( m_PlayerNumber, iCol, fYPos );
const float fAlpha = ArrowGetAlpha( m_PlayerNumber, fYPos ); const float fAlpha = ArrowGetAlpha( m_PlayerNumber, fYPos, fPercentFadeToFail );
const float fGlow = ArrowGetGlow( m_PlayerNumber, fYPos ); const float fGlow = ArrowGetGlow( m_PlayerNumber, fYPos, fPercentFadeToFail );
const int iGrayPartFrameNo = GetTapGrayFrameNo( fBeat ); const int iGrayPartFrameNo = GetTapGrayFrameNo( fBeat );
const int iColorPartFrameNo = GetTapColorFrameNo( fBeat ); const int iColorPartFrameNo = GetTapColorFrameNo( fBeat );
D3DXCOLOR colorGrayPart = D3DXCOLOR(1,1,1,1); D3DXCOLOR colorGrayPart = D3DXCOLOR(1,1,1,1);
D3DXCOLOR colorLeadingEdge; D3DXCOLOR colorLeadingEdge;
D3DXCOLOR colorTrailingEdge; D3DXCOLOR colorTrailingEdge;
if( bUseHoldColor )
colorLeadingEdge = colorTrailingEdge = D3DXCOLOR(0,1,0,1); // HACK: green. Move this into the note skin
else
GetTapEdgeColors( fBeat, colorLeadingEdge, colorTrailingEdge ); GetTapEdgeColors( fBeat, colorLeadingEdge, colorTrailingEdge );
colorGrayPart.a *= fAlpha; colorGrayPart.a *= fAlpha;
colorLeadingEdge.a *= fAlpha; colorLeadingEdge.a *= fAlpha;
colorTrailingEdge.a *= fAlpha; colorTrailingEdge.a *= fAlpha;
if( bUseHoldColor )
{
//
// draw hold head
//
m_sprHoldParts.SetXY( fXPos, fYPos );
m_sprHoldParts.SetDiffuse( colorGrayPart );
m_sprHoldParts.SetGlow( D3DXCOLOR(1,1,1,fGlow) );
m_sprHoldParts.SetState( 0 );
m_sprHoldParts.Draw();
}
else
{
m_sprTapParts.SetXY( fXPos, fYPos ); m_sprTapParts.SetXY( fXPos, fYPos );
m_sprTapParts.SetRotation( fRotation ); m_sprTapParts.SetRotation( fRotation );
m_sprTapParts.SetGlow( D3DXCOLOR(1,1,1,fGlow) ); m_sprTapParts.SetGlow( D3DXCOLOR(1,1,1,fGlow) );
@@ -366,3 +376,4 @@ void NoteDisplay::DrawTap( const int iCol, const float fBeat, const bool bUseHol
m_sprTapParts.SetDiffuseBottomEdge( colorTrailingEdge ); m_sprTapParts.SetDiffuseBottomEdge( colorTrailingEdge );
m_sprTapParts.Draw(); m_sprTapParts.Draw();
} }
}
+1 -37
View File
@@ -76,45 +76,9 @@ void NoteField::Update( float fDeltaTime )
m_rectMarkerBar.Update( fDeltaTime ); m_rectMarkerBar.Update( fDeltaTime );
if( m_fPercentFadeToFail >= 0 ) if( m_fPercentFadeToFail >= 0 )
m_fPercentFadeToFail = min( m_fPercentFadeToFail + fDeltaTime/3, 1 ); // take 3 seconds to totally fade m_fPercentFadeToFail = min( m_fPercentFadeToFail + fDeltaTime/1.5, 1 ); // take 1.5 seconds to totally fade
} }
/*
void NoteField::CreateTapNoteInstance( ColorNoteInstance &cni, const int iCol, const float fIndex, const bool bUseHoldNoteBeginColor )
{
const float fYOffset = ArrowGetYOffset( m_PlayerNumber, fIndex );
const float fYPos = ArrowGetYPos( m_PlayerNumber, fYOffset );
const float fRotation = ArrowGetRotation( m_PlayerNumber, iCol, fYOffset );
const float fXPos = ArrowGetXPos( m_PlayerNumber, iCol, fYOffset );
float fAlpha = ArrowGetAlpha( m_PlayerNumber, fYPos );
if( m_fPercentFadeToFail != -1 )
fAlpha = 1-m_fPercentFadeToFail;
D3DXCOLOR colorLeading, colorTrailing; // of the color part. Alpha here be overwritten with fAlpha!
if( bUseHoldNoteBeginColor )
colorLeading = colorTrailing = m_ColorNote[iCol].GetHoldColorFromPercentIntoHold( 0 );
else
m_ColorNote[iCol].GetEdgeColorsFromIndexAndBeat( roundf(fIndex), colorLeading, colorTrailing );
float fAddAlpha = m_ColorNote[iCol].GetAddAlphaFromDiffuseAlpha( fAlpha );
int iColorPartFrameNo = m_ColorNote[iCol].GetColorPartFrameNoFromIndexAndBeat( roundf(fIndex), GAMESTATE->m_fSongBeat );
int iGrayPartFrameNo = m_ColorNote[iCol].GetGrayPartFrameNoFromIndexAndBeat( roundf(fIndex), GAMESTATE->m_fSongBeat );
if( iCol == 2 )
printf( "iColorPartFrameNo = %d\n", iColorPartFrameNo );
cni = ColorNoteInstance( fXPos, fYPos, fRotation, fAlpha, colorLeading, colorTrailing, fAddAlpha, iColorPartFrameNo, iGrayPartFrameNo );
}
void NoteField::CreateHoldNoteInstance( ColorNoteInstance &cni, const bool bActive, const float fIndex, const HoldNote &hn, const float fHoldNoteLife )
{
}
*/
void NoteField::DrawMeasureBar( int iMeasureIndex ) void NoteField::DrawMeasureBar( int iMeasureIndex )
{ {
const int iMeasureNoDisplay = iMeasureIndex+1; const int iMeasureNoDisplay = iMeasureIndex+1;
+7
View File
@@ -261,6 +261,7 @@ void Player::Update( float fDeltaTime )
fLife = 1; fLife = 1;
hns = HNS_OK; hns = HNS_OK;
HandleNoteScore( hns ); HandleNoteScore( hns );
m_GhostArrowRow.TapNote( StyleI.col, TNS_PERFECT, true ); // bright ghost flash
m_HoldJudgement[hn.m_iTrack].SetHoldJudgement( HNS_OK ); m_HoldJudgement[hn.m_iTrack].SetHoldJudgement( HNS_OK );
m_NoteField.m_fHoldNoteLife[i] = fLife; // update the NoteField display m_NoteField.m_fHoldNoteLife[i] = fLife; // update the NoteField display
m_NoteField.m_HoldNoteScores[i] = HNS_OK; // update the NoteField display m_NoteField.m_HoldNoteScores[i] = HNS_OK; // update the NoteField display
@@ -627,7 +628,13 @@ void Player::HandleNoteScore( HoldNoteScore score )
// HoldNoteScores don't effect m_fScore // HoldNoteScores don't effect m_fScore
} }
float Player::GetMaxBeatDifference() float Player::GetMaxBeatDifference()
{ {
return GAMESTATE->m_fCurBPS * PREFSMAN->m_fJudgeWindow * GAMESTATE->m_SongOptions.m_fMusicRate; return GAMESTATE->m_fCurBPS * PREFSMAN->m_fJudgeWindow * GAMESTATE->m_SongOptions.m_fMusicRate;
} }
void Player::FadeToFail()
{
m_NoteField.FadeToFail();
}
+1 -1
View File
@@ -46,7 +46,7 @@ public:
void Step( int col ); void Step( int col );
void FadeToFail() { m_NoteField.FadeToFail(); }; void FadeToFail();
protected: protected:
int UpdateTapNotesMissedOlderThan( float fMissIfOlderThanThisBeat ); int UpdateTapNotesMissedOlderThan( float fMissIfOlderThanThisBeat );
+2 -2
View File
@@ -1,7 +1,7 @@
#include "stdafx.h" #include "stdafx.h"
/* /*
----------------------------------------------------------------------------- -----------------------------------------------------------------------------
Class: ScoreDisplayOni.h Class: ScoreDisplayOni
Desc: A graphic displayed in the ScoreDisplayOni during Dancing. Desc: A graphic displayed in the ScoreDisplayOni during Dancing.
@@ -26,7 +26,7 @@ ScoreDisplayOni::ScoreDisplayOni()
LOG->Trace( "ScoreDisplayOni::ScoreDisplayOni()" ); LOG->Trace( "ScoreDisplayOni::ScoreDisplayOni()" );
// init the text // init the text
LoadFromFont( THEME->GetPathTo("Fonts","score numbers") ); BitmapText::LoadFromTextureAndChars( THEME->GetPathTo("Graphics","gameplay score numbers"), "01234 :56789%." );
TurnShadowOff(); TurnShadowOff();
} }
+4 -3
View File
@@ -419,7 +419,7 @@ ScreenEvaluation::ScreenEvaluation( bool bSummary )
m_sprPercentFrame[p].SetXY( GRADE_X(p), GRADE_Y ); m_sprPercentFrame[p].SetXY( GRADE_X(p), GRADE_Y );
this->AddChild( &m_sprPercentFrame[p] ); this->AddChild( &m_sprPercentFrame[p] );
m_textOniPercentLarge[p].LoadFromFont( THEME->GetPathTo("Fonts","oni percent numbers") ); m_textOniPercentLarge[p].LoadFromTextureAndChars( THEME->GetPathTo("Graphics","evaluation percent numbers 5x3"),"1234567890%. " );
m_textOniPercentLarge[p].TurnShadowOff(); m_textOniPercentLarge[p].TurnShadowOff();
m_textOniPercentLarge[p].SetXY( PERCENT_BASE_X(p), PERCENT_BASE_Y ); m_textOniPercentLarge[p].SetXY( PERCENT_BASE_X(p), PERCENT_BASE_Y );
m_textOniPercentLarge[p].SetHorizAlign( Actor::align_right ); m_textOniPercentLarge[p].SetHorizAlign( Actor::align_right );
@@ -427,7 +427,7 @@ ScreenEvaluation::ScreenEvaluation( bool bSummary )
m_textOniPercentLarge[p].SetEffectGlowing( 1.0f ); m_textOniPercentLarge[p].SetEffectGlowing( 1.0f );
this->AddChild( &m_textOniPercentLarge[p] ); this->AddChild( &m_textOniPercentLarge[p] );
m_textOniPercentSmall[p].LoadFromFont( THEME->GetPathTo("Fonts","oni percent numbers") ); m_textOniPercentSmall[p].LoadFromTextureAndChars( THEME->GetPathTo("Graphics","evaluation percent numbers 5x3"),"1234567890%. " );
m_textOniPercentSmall[p].TurnShadowOff(); m_textOniPercentSmall[p].TurnShadowOff();
m_textOniPercentSmall[p].SetZoom( 0.5f ); m_textOniPercentSmall[p].SetZoom( 0.5f );
m_textOniPercentSmall[p].SetXY( PERCENT_BASE_X(p), PERCENT_BASE_Y ); m_textOniPercentSmall[p].SetXY( PERCENT_BASE_X(p), PERCENT_BASE_Y );
@@ -438,6 +438,7 @@ ScreenEvaluation::ScreenEvaluation( bool bSummary )
iPossibleDancePoints[p] = max( 1, iPossibleDancePoints[p] ); iPossibleDancePoints[p] = max( 1, iPossibleDancePoints[p] );
float fPercentDancePoints = iActualDancePoints[p] / (float)iPossibleDancePoints[p] + 0.0001f; // correct for rounding errors float fPercentDancePoints = iActualDancePoints[p] / (float)iPossibleDancePoints[p] + 0.0001f; // correct for rounding errors
fPercentDancePoints = max( fPercentDancePoints, 0 );
int iPercentDancePointsLarge = int(fPercentDancePoints*100); int iPercentDancePointsLarge = int(fPercentDancePoints*100);
int iPercentDancePointsSmall = int( (fPercentDancePoints*100 - int(fPercentDancePoints*100)) * 10 ); int iPercentDancePointsSmall = int( (fPercentDancePoints*100 - int(fPercentDancePoints*100)) * 10 );
m_textOniPercentLarge[p].SetText( ssprintf("%02d%", iPercentDancePointsLarge) ); m_textOniPercentLarge[p].SetText( ssprintf("%02d%", iPercentDancePointsLarge) );
@@ -450,7 +451,7 @@ ScreenEvaluation::ScreenEvaluation( bool bSummary )
m_sprCourseFrame[p].SetXY( BONUS_X(p), BONUS_Y ); m_sprCourseFrame[p].SetXY( BONUS_X(p), BONUS_Y );
this->AddChild( &m_sprCourseFrame[p] ); this->AddChild( &m_sprCourseFrame[p] );
m_textSongsSurvived[p].LoadFromFont( THEME->GetPathTo("Fonts","oni stage numbers") ); m_textSongsSurvived[p].LoadFromTextureAndChars( THEME->GetPathTo("Graphics","evaluation stage numbers 5x3"),"1234567890%. ");
m_textSongsSurvived[p].TurnShadowOff(); m_textSongsSurvived[p].TurnShadowOff();
m_textSongsSurvived[p].SetXY( SONGS_SURVIVED_X(p), SONGS_SURVIVED_Y ); m_textSongsSurvived[p].SetXY( SONGS_SURVIVED_X(p), SONGS_SURVIVED_Y );
m_textSongsSurvived[p].SetText( ssprintf("%02d", GAMESTATE->m_iSongsBeforeFail[p]) ); m_textSongsSurvived[p].SetText( ssprintf("%02d", GAMESTATE->m_iSongsBeforeFail[p]) );
+4 -2
View File
@@ -54,11 +54,13 @@ ScreenHowToPlay::ScreenHowToPlay()
switch( GAMESTATE->m_PlayMode ) switch( GAMESTATE->m_PlayMode )
{ {
case PLAY_MODE_ARCADE: case PLAY_MODE_ARCADE:
sHowToPlayPath = THEME->GetPathTo("Graphics","how to play arcade");
break;
case PLAY_MODE_ENDLESS: case PLAY_MODE_ENDLESS:
sHowToPlayPath = THEME->GetPathTo("Graphics","How To Play Arcade"); sHowToPlayPath = THEME->GetPathTo("Graphics","how to play endless");
break; break;
case PLAY_MODE_ONI: case PLAY_MODE_ONI:
sHowToPlayPath = THEME->GetPathTo("Graphics","How To Play Arcade"); sHowToPlayPath = THEME->GetPathTo("Graphics","how to play oni");
break; break;
default: default:
ASSERT(0); ASSERT(0);
+1
View File
@@ -56,6 +56,7 @@ const CString CREDIT_LINES[] =
"", "",
"SOUND:", "SOUND:",
"Kyle 'KeeL' Ward", "Kyle 'KeeL' Ward",
"Animechanic"
"", "",
"", "",
"", "",
+8 -3
View File
@@ -444,10 +444,15 @@ void ScreenOptions::MenuBack( PlayerNumber pn )
void ScreenOptions::MenuStart( PlayerNumber pn ) void ScreenOptions::MenuStart( PlayerNumber pn )
{ {
if( m_iCurrentRow[pn] == m_iNumOptionRows ) // not on exit bool bAllOnExit = true;
this->SendScreenMessage( SM_TweenOffScreen, 0 ); for( int p=0; p<NUM_PLAYERS; p++ )
else if( GAMESTATE->IsPlayerEnabled(p) && m_iCurrentRow[p] != m_iNumOptionRows )
bAllOnExit = false;
if( m_iCurrentRow[pn] != m_iNumOptionRows ) // not on exit
MenuDown( pn ); // can't go down any more MenuDown( pn ); // can't go down any more
else if( bAllOnExit )
this->SendScreenMessage( SM_TweenOffScreen, 0 );
} }
void ScreenOptions::MenuLeft( PlayerNumber pn ) void ScreenOptions::MenuLeft( PlayerNumber pn )
+26 -43
View File
@@ -28,6 +28,8 @@
#include "CodeDetector.h" #include "CodeDetector.h"
#define EXPLANATION_X THEME->GetMetricF("ScreenSelectCourse","ExplanationX")
#define EXPLANATION_Y THEME->GetMetricF("ScreenSelectCourse","ExplanationY")
#define BANNER_FRAME_X THEME->GetMetricF("ScreenSelectCourse","BannerFrameX") #define BANNER_FRAME_X THEME->GetMetricF("ScreenSelectCourse","BannerFrameX")
#define BANNER_FRAME_Y THEME->GetMetricF("ScreenSelectCourse","BannerFrameY") #define BANNER_FRAME_Y THEME->GetMetricF("ScreenSelectCourse","BannerFrameY")
#define BANNER_X THEME->GetMetricF("ScreenSelectCourse","BannerX") #define BANNER_X THEME->GetMetricF("ScreenSelectCourse","BannerX")
@@ -71,11 +73,15 @@ ScreenSelectCourse::ScreenSelectCourse()
); );
this->AddChild( &m_Menu ); this->AddChild( &m_Menu );
m_sprExplanation.Load( THEME->GetPathTo("Graphics","select course explanation") );
m_sprExplanation.SetXY( EXPLANATION_X, EXPLANATION_Y );
this->AddChild( &m_sprExplanation );
m_Banner.SetXY( BANNER_X, BANNER_Y ); m_Banner.SetXY( BANNER_X, BANNER_Y );
m_Banner.SetCroppedSize( BANNER_WIDTH, BANNER_HEIGHT ); m_Banner.SetCroppedSize( BANNER_WIDTH, BANNER_HEIGHT );
this->AddChild( &m_Banner ); this->AddChild( &m_Banner );
m_sprBannerFrame.Load( THEME->GetPathTo("Graphics","select course info frame") ); m_sprBannerFrame.Load( THEME->GetPathTo("Graphics","select course banner frame") );
m_sprBannerFrame.SetXY( BANNER_FRAME_X, BANNER_FRAME_Y ); m_sprBannerFrame.SetXY( BANNER_FRAME_X, BANNER_FRAME_Y );
this->AddChild( &m_sprBannerFrame ); this->AddChild( &m_sprBannerFrame );
@@ -112,7 +118,7 @@ ScreenSelectCourse::ScreenSelectCourse()
this->AddChild( &m_HighScore[p] ); this->AddChild( &m_HighScore[p] );
} }
m_textHoldForOptions.LoadFromFont( THEME->GetPathTo("Fonts","Stage") ); m_textHoldForOptions.LoadFromFont( THEME->GetPathTo("Fonts","select music hold") );
m_textHoldForOptions.SetXY( CENTER_X, CENTER_Y ); m_textHoldForOptions.SetXY( CENTER_X, CENTER_Y );
m_textHoldForOptions.SetText( "press START again for options" ); m_textHoldForOptions.SetText( "press START again for options" );
m_textHoldForOptions.SetZoom( 1 ); m_textHoldForOptions.SetZoom( 1 );
@@ -151,56 +157,33 @@ void ScreenSelectCourse::DrawPrimitives()
void ScreenSelectCourse::TweenOnScreen() void ScreenSelectCourse::TweenOnScreen()
{ {
Actor* pActorsInCourseInfoFrame[] = { &m_sprBannerFrame, &m_Banner, &m_textNumSongs, &m_textTime }; m_sprExplanation.FadeOn( 0.5f, "left bounce", TWEEN_TIME );
const int iNumActorsInGroupInfoFrame = sizeof(pActorsInCourseInfoFrame) / sizeof(Actor*); m_sprBannerFrame.FadeOn( 0, "left bounce", TWEEN_TIME );
int i; m_Banner.FadeOn( 0, "left bounce", TWEEN_TIME );
for( i=0; i<iNumActorsInGroupInfoFrame; i++ ) m_textNumSongs.FadeOn( 0, "left bounce", TWEEN_TIME );
m_textTime.FadeOn( 0, "left bounce", TWEEN_TIME );
m_CourseContentsFrame.FadeOn( 0, "foldy", TWEEN_TIME );
for( int p=0; p<NUM_PLAYERS; p++ )
{ {
float fOriginalX = pActorsInCourseInfoFrame[i]->GetX(); m_sprHighScoreFrame[p].FadeOn( 0, "right bounce", TWEEN_TIME );
pActorsInCourseInfoFrame[i]->SetX( fOriginalX-400 ); m_HighScore[p].FadeOn( 0, "right bounce", TWEEN_TIME );
pActorsInCourseInfoFrame[i]->BeginTweening( TWEEN_TIME, TWEEN_BOUNCE_END );
pActorsInCourseInfoFrame[i]->SetTweenX( fOriginalX );
} }
m_CourseContentsFrame.SetXY( CONTENTS_X - 400, CONTENTS_Y );
m_CourseContentsFrame.BeginTweening( TWEEN_TIME, Actor::TWEEN_BIAS_END );
m_CourseContentsFrame.SetTweenXY( CONTENTS_X, CONTENTS_Y );
Actor* pActorsInScore[] = { &m_sprHighScoreFrame[0], &m_sprHighScoreFrame[1], &m_HighScore[0], &m_HighScore[1] };
const int iNumActorsInScore = sizeof(pActorsInScore) / sizeof(Actor*);
for( i=0; i<iNumActorsInScore; i++ )
{
float fOriginalX = pActorsInScore[i]->GetX();
pActorsInScore[i]->SetX( fOriginalX+400 );
pActorsInScore[i]->BeginTweening( TWEEN_TIME, TWEEN_BIAS_END );
pActorsInScore[i]->SetTweenX( fOriginalX );
}
m_MusicWheel.TweenOnScreen(); m_MusicWheel.TweenOnScreen();
} }
void ScreenSelectCourse::TweenOffScreen() void ScreenSelectCourse::TweenOffScreen()
{ {
Actor* pActorsInCourseInfoFrame[] = { &m_sprBannerFrame, &m_Banner, &m_textNumSongs, &m_textTime }; m_sprExplanation.FadeOff( 0, "left bounce", TWEEN_TIME );
const int iNumActorsInGroupInfoFrame = sizeof(pActorsInCourseInfoFrame) / sizeof(Actor*); m_sprBannerFrame.FadeOff( 0, "left bounce", TWEEN_TIME );
int i; m_Banner.FadeOff( 0, "left bounce", TWEEN_TIME );
for( i=0; i<iNumActorsInGroupInfoFrame; i++ ) m_textNumSongs.FadeOff( 0, "left bounce", TWEEN_TIME );
m_textTime.FadeOff( 0, "left bounce", TWEEN_TIME );
m_CourseContentsFrame.FadeOff( 0, "foldy", TWEEN_TIME );
for( int p=0; p<NUM_PLAYERS; p++ )
{ {
pActorsInCourseInfoFrame[i]->BeginTweening( TWEEN_TIME, TWEEN_BOUNCE_BEGIN ); m_sprHighScoreFrame[p].FadeOff( 0, "right bounce", TWEEN_TIME );
pActorsInCourseInfoFrame[i]->SetTweenX( pActorsInCourseInfoFrame[i]->GetX()-400 ); m_HighScore[p].FadeOff( 0, "right bounce", TWEEN_TIME );
} }
m_CourseContentsFrame.BeginTweening( TWEEN_TIME, Actor::TWEEN_BOUNCE_BEGIN );
m_CourseContentsFrame.SetTweenXY( CONTENTS_X - 400, CONTENTS_Y );
Actor* pActorsInScore[] = { &m_sprHighScoreFrame[0], &m_sprHighScoreFrame[1], &m_HighScore[0], &m_HighScore[1] };
const int iNumActorsInScore = sizeof(pActorsInScore) / sizeof(Actor*);
for( i=0; i<iNumActorsInScore; i++ )
{
pActorsInScore[i]->BeginTweening( TWEEN_TIME, TWEEN_BIAS_BEGIN );
pActorsInScore[i]->SetTweenX( pActorsInScore[i]->GetX()+400 );
}
m_MusicWheel.TweenOffScreen(); m_MusicWheel.TweenOffScreen();
} }
+1
View File
@@ -46,6 +46,7 @@ protected:
MenuElements m_Menu; MenuElements m_Menu;
Sprite m_sprExplanation;
Sprite m_sprBannerFrame; Sprite m_sprBannerFrame;
FadingBanner m_Banner; FadingBanner m_Banner;
BitmapText m_textNumSongs; BitmapText m_textNumSongs;