diff --git a/stepmania/src/Actor.cpp b/stepmania/src/Actor.cpp index 07f99d9bcb..67365f19d5 100644 --- a/stepmania/src/Actor.cpp +++ b/stepmania/src/Actor.cpp @@ -18,6 +18,7 @@ #include "RageMath.h" #include "GameConstantsAndTypes.h" #include "RageLog.h" +#include "StepMania.h" /* This is Reset instead of Init since many derived classes have Init() functions * that shouldn't change the position of the actor. */ @@ -637,15 +638,6 @@ void Actor::Fade( float fSleepSeconds, CString sFadeString, float fFadeSeconds, } } -static CString GetParam( const CStringArray& sParams, int iIndex, int& iMaxIndexAccessed ) -{ - iMaxIndexAccessed = max( iIndex, iMaxIndexAccessed ); - if( iIndex < int(sParams.size()) ) - return sParams[iIndex]; - else - return ""; -} - void Actor::AddRotationH( float rot ) { RageQuatMultiply( &DestTweenState().quat, DestTweenState().quat, RageQuatFromH(rot) ); @@ -677,115 +669,126 @@ float Actor::Command( CString sCommandString ) for(unsigned d=0; d < asTokens.size(); d++) { - TrimLeft(asTokens[d]); TrimRight(asTokens[d]); + TrimLeft(asTokens[d]); + TrimRight(asTokens[d]); } - int iMaxIndexAccessed = 0; + + if( asTokens[0].size() == 0 ) + continue; + + this->HandleCommand( asTokens ); + } + + return GetTweenTimeLeft(); +} + +inline CString GetParam( const CStringArray& sParams, int iIndex, int& iMaxIndexAccessed ) +{ + iMaxIndexAccessed = max( iIndex, iMaxIndexAccessed ); + if( iIndex < int(sParams.size()) ) + return sParams[iIndex]; + else + return ""; +} + +void Actor::HandleCommand( const CStringArray &asTokens ) +{ + int iMaxIndexAccessed = 0; #define sParam(i) (GetParam(asTokens,i,iMaxIndexAccessed)) #define fParam(i) ((float)atof(sParam(i))) #define iParam(i) (atoi(sParam(i))) #define bParam(i) (iParam(i)!=0) - CString& sName = asTokens[0]; + const CString& sName = asTokens[0]; - if( sName.size() == 0 ) - continue; - - // Commands that go in the tweening queue: - if ( sName=="sleep" ) { BeginTweening( fParam(1), TWEEN_LINEAR ); BeginTweening( 0, TWEEN_LINEAR ); } - else if( sName=="linear" ) BeginTweening( fParam(1), TWEEN_LINEAR ); - else if( sName=="accelerate" ) BeginTweening( fParam(1), TWEEN_ACCELERATE ); - else if( sName=="decelerate" ) BeginTweening( fParam(1), TWEEN_DECELERATE ); - else if( sName=="bouncebegin" ) BeginTweening( fParam(1), TWEEN_BOUNCE_BEGIN ); - else if( sName=="bounceend" ) BeginTweening( fParam(1), TWEEN_BOUNCE_END ); - else if( sName=="spring" ) BeginTweening( fParam(1), TWEEN_SPRING ); - else if( sName=="stoptweening" ) { StopTweening(); BeginTweening( 0.0001f, TWEEN_LINEAR ); } - else if( sName=="x" ) SetX( fParam(1) ); - else if( sName=="y" ) SetY( fParam(1) ); - else if( sName=="z" ) SetZ( fParam(1) ); - else if( sName=="addx" ) SetX( GetX()+fParam(1) ); - else if( sName=="addy" ) SetY( GetY()+fParam(1) ); - else if( sName=="addz" ) SetZ( GetZ()+fParam(1) ); - else if( sName=="zoom" ) SetZoom( fParam(1) ); - else if( sName=="zoomx" ) SetZoomX( fParam(1) ); - else if( sName=="zoomy" ) SetZoomY( fParam(1) ); + // Commands that go in the tweening queue: + if ( sName=="sleep" ) { BeginTweening( fParam(1), TWEEN_LINEAR ); BeginTweening( 0, TWEEN_LINEAR ); } + else if( sName=="linear" ) BeginTweening( fParam(1), TWEEN_LINEAR ); + else if( sName=="accelerate" ) BeginTweening( fParam(1), TWEEN_ACCELERATE ); + else if( sName=="decelerate" ) BeginTweening( fParam(1), TWEEN_DECELERATE ); + else if( sName=="bouncebegin" ) BeginTweening( fParam(1), TWEEN_BOUNCE_BEGIN ); + else if( sName=="bounceend" ) BeginTweening( fParam(1), TWEEN_BOUNCE_END ); + else if( sName=="spring" ) BeginTweening( fParam(1), TWEEN_SPRING ); + else if( sName=="stoptweening" ) { StopTweening(); BeginTweening( 0.0001f, TWEEN_LINEAR ); } + else if( sName=="x" ) SetX( fParam(1) ); + else if( sName=="y" ) SetY( fParam(1) ); + else if( sName=="z" ) SetZ( fParam(1) ); + else if( sName=="addx" ) SetX( GetX()+fParam(1) ); + else if( sName=="addy" ) SetY( GetY()+fParam(1) ); + else if( sName=="addz" ) SetZ( GetZ()+fParam(1) ); + else if( sName=="zoom" ) SetZoom( fParam(1) ); + else if( sName=="zoomx" ) SetZoomX( fParam(1) ); + else if( sName=="zoomy" ) SetZoomY( fParam(1) ); // else if( sName=="zoomz" ) SetZoomZ( fParam(1) ); - else if( sName=="zoomtowidth" ) ZoomToWidth( fParam(1) ); - else if( sName=="zoomtoheight" ) ZoomToHeight( fParam(1) ); - else if( sName=="cropleft" ) SetCropLeft( fParam(1) ); - else if( sName=="croptop" ) SetCropTop( fParam(1) ); - else if( sName=="cropright" ) SetCropRight( fParam(1) ); - else if( sName=="cropbottom" ) SetCropBottom( fParam(1) ); - else if( sName=="diffuse" ) SetDiffuse( RageColor(fParam(1),fParam(2),fParam(3),fParam(4)) ); - else if( sName=="diffuseleftedge" ) SetDiffuseLeftEdge( RageColor(fParam(1),fParam(2),fParam(3),fParam(4)) ); - else if( sName=="diffuserightedge" ) SetDiffuseRightEdge( RageColor(fParam(1),fParam(2),fParam(3),fParam(4)) ); - else if( sName=="diffusetopedge" ) SetDiffuseTopEdge( RageColor(fParam(1),fParam(2),fParam(3),fParam(4)) ); - else if( sName=="diffusebottomedge" ) SetDiffuseBottomEdge( RageColor(fParam(1),fParam(2),fParam(3),fParam(4)) ); - /* Add left/right/top/bottom for alpha if needed. */ - else if( sName=="diffusealpha" ) SetDiffuseAlpha( fParam(1) ); - else if( sName=="glow" ) SetGlow( RageColor(fParam(1),fParam(2),fParam(3),fParam(4)) ); - else if( sName=="glowmode" ) { - if(!sParam(1).CompareNoCase("whiten")) - SetGlowMode( GLOW_WHITEN ); - else if(!sParam(1).CompareNoCase("brighten")) - SetGlowMode( GLOW_BRIGHTEN ); - else ASSERT(0); - } - else if( sName=="rotationx" ) SetRotationX( fParam(1) ); - else if( sName=="rotationy" ) SetRotationY( fParam(1) ); - else if( sName=="rotationz" ) SetRotationZ( fParam(1) ); - else if( sName=="heading" ) AddRotationH( fParam(1) ); - else if( sName=="pitch" ) AddRotationP( fParam(1) ); - else if( sName=="roll" ) AddRotationR( fParam(1) ); - else if( sName=="shadowlength" ) SetShadowLength( fParam(1) ); - else if( sName=="horizalign" ) SetHorizAlign( sParam(1) ); - else if( sName=="vertalign" ) SetVertAlign( sParam(1) ); - else if( sName=="diffuseblink" ) SetEffectDiffuseBlink(); - else if( sName=="diffuseshift" ) SetEffectDiffuseShift(); - else if( sName=="glowblink" ) SetEffectGlowBlink(); - else if( sName=="glowshift" ) SetEffectGlowShift(); - else if( sName=="rainbow" ) SetEffectRainbow(); - else if( sName=="wag" ) SetEffectWag(); - else if( sName=="bounce" ) SetEffectBounce(); - else if( sName=="bob" ) SetEffectBob(); - else if( sName=="pulse" ) SetEffectPulse(); - else if( sName=="spin" ) SetEffectSpin(); - else if( sName=="vibrate" ) SetEffectVibrate(); - else if( sName=="stopeffect" ) SetEffectNone(); - else if( sName=="effectcolor1" ) SetEffectColor1( RageColor(fParam(1),fParam(2),fParam(3),fParam(4)) ); - else if( sName=="effectcolor2" ) SetEffectColor2( RageColor(fParam(1),fParam(2),fParam(3),fParam(4)) ); - else if( sName=="effectperiod" ) SetEffectPeriod( fParam(1) ); - else if( sName=="effectmagnitude" ) SetEffectMagnitude( RageVector3(fParam(1),fParam(2),fParam(3)) ); - else if( sName=="scaletocover" ) { RectI R(iParam(1), iParam(2), iParam(3), iParam(4)); ScaleToCover(R); } - // Commands that take effect immediately (ignoring the tweening queue): - else if( sName=="animate" ) EnableAnimation( bParam(1) ); - else if( sName=="texturewrapping" ) SetTextureWrapping( bParam(1) ); - else if( sName=="additiveblend" ) SetBlendMode( bParam(1) ? BLEND_ADD : BLEND_NORMAL ); - else if( sName=="blend" ) SetBlendMode( sParam(1) ); - else if( sName=="zbuffer" ) SetUseZBuffer( bParam(1) ); - else - { - CString sError = ssprintf( "Unrecognized command name '%s' in command string '%s'.", sName.c_str(), sCommandString.c_str() ); - LOG->Warn( sError ); -#if defined(WIN32) // XXX arch? - if( DISPLAY->IsWindowed() ) - MessageBox(NULL, sError, "Actor::Command", MB_OK); -#endif - } - - - if( iMaxIndexAccessed != (int)asTokens.size()-1 ) - { - CString sError = ssprintf( "Wrong number of parameters in command '%s'. Expected %d but there are %d.", join(",",asTokens).c_str(), iMaxIndexAccessed+1, (int)asTokens.size() ); - LOG->Warn( sError ); -#if defined(WIN32) // XXX arch? - if( DISPLAY->IsWindowed() ) - MessageBox(NULL, sError, "Actor::Command", MB_OK); -#endif - } + else if( sName=="zoomtowidth" ) ZoomToWidth( fParam(1) ); + else if( sName=="zoomtoheight" ) ZoomToHeight( fParam(1) ); + else if( sName=="cropleft" ) SetCropLeft( fParam(1) ); + else if( sName=="croptop" ) SetCropTop( fParam(1) ); + else if( sName=="cropright" ) SetCropRight( fParam(1) ); + else if( sName=="cropbottom" ) SetCropBottom( fParam(1) ); + else if( sName=="diffuse" ) SetDiffuse( RageColor(fParam(1),fParam(2),fParam(3),fParam(4)) ); + else if( sName=="diffuseleftedge" ) SetDiffuseLeftEdge( RageColor(fParam(1),fParam(2),fParam(3),fParam(4)) ); + else if( sName=="diffuserightedge" ) SetDiffuseRightEdge( RageColor(fParam(1),fParam(2),fParam(3),fParam(4)) ); + else if( sName=="diffusetopedge" ) SetDiffuseTopEdge( RageColor(fParam(1),fParam(2),fParam(3),fParam(4)) ); + else if( sName=="diffusebottomedge" ) SetDiffuseBottomEdge( RageColor(fParam(1),fParam(2),fParam(3),fParam(4)) ); + /* Add left/right/top/bottom for alpha if needed. */ + else if( sName=="diffusealpha" ) SetDiffuseAlpha( fParam(1) ); + else if( sName=="glow" ) SetGlow( RageColor(fParam(1),fParam(2),fParam(3),fParam(4)) ); + else if( sName=="glowmode" ) { + if(!sParam(1).CompareNoCase("whiten")) + SetGlowMode( GLOW_WHITEN ); + else if(!sParam(1).CompareNoCase("brighten")) + SetGlowMode( GLOW_BRIGHTEN ); + else ASSERT(0); + } + else if( sName=="rotationx" ) SetRotationX( fParam(1) ); + else if( sName=="rotationy" ) SetRotationY( fParam(1) ); + else if( sName=="rotationz" ) SetRotationZ( fParam(1) ); + else if( sName=="heading" ) AddRotationH( fParam(1) ); + else if( sName=="pitch" ) AddRotationP( fParam(1) ); + else if( sName=="roll" ) AddRotationR( fParam(1) ); + else if( sName=="shadowlength" ) SetShadowLength( fParam(1) ); + else if( sName=="horizalign" ) SetHorizAlign( sParam(1) ); + else if( sName=="vertalign" ) SetVertAlign( sParam(1) ); + else if( sName=="diffuseblink" ) SetEffectDiffuseBlink(); + else if( sName=="diffuseshift" ) SetEffectDiffuseShift(); + else if( sName=="glowblink" ) SetEffectGlowBlink(); + else if( sName=="glowshift" ) SetEffectGlowShift(); + else if( sName=="rainbow" ) SetEffectRainbow(); + else if( sName=="wag" ) SetEffectWag(); + else if( sName=="bounce" ) SetEffectBounce(); + else if( sName=="bob" ) SetEffectBob(); + else if( sName=="pulse" ) SetEffectPulse(); + else if( sName=="spin" ) SetEffectSpin(); + else if( sName=="vibrate" ) SetEffectVibrate(); + else if( sName=="stopeffect" ) SetEffectNone(); + else if( sName=="effectcolor1" ) SetEffectColor1( RageColor(fParam(1),fParam(2),fParam(3),fParam(4)) ); + else if( sName=="effectcolor2" ) SetEffectColor2( RageColor(fParam(1),fParam(2),fParam(3),fParam(4)) ); + else if( sName=="effectperiod" ) SetEffectPeriod( fParam(1) ); + else if( sName=="effectmagnitude" ) SetEffectMagnitude( RageVector3(fParam(1),fParam(2),fParam(3)) ); + else if( sName=="scaletocover" ) { RectI R(iParam(1), iParam(2), iParam(3), iParam(4)); ScaleToCover(R); } + // Commands that take effect immediately (ignoring the tweening queue): + else if( sName=="animate" ) EnableAnimation( bParam(1) ); + else if( sName=="texturewrapping" ) SetTextureWrapping( bParam(1) ); + else if( sName=="additiveblend" ) SetBlendMode( bParam(1) ? BLEND_ADD : BLEND_NORMAL ); + else if( sName=="blend" ) SetBlendMode( sParam(1) ); + else if( sName=="zbuffer" ) SetUseZBuffer( bParam(1) ); + else + { + CString sError = ssprintf( "Actor::HandleCommand: Unrecognized command name '%s'.", sName.c_str() ); + LOG->Warn( sError ); + if( DISPLAY->IsWindowed() ) + HOOKS->MessageBoxOK( sError ); } - return GetTweenTimeLeft(); + if( iMaxIndexAccessed != (int)asTokens.size()-1 ) + { + CString sError = ssprintf( "Actor::HandleCommand: Wrong number of parameters in command '%s'. Expected %d but there are %d.", join(",",asTokens).c_str(), iMaxIndexAccessed+1, (int)asTokens.size() ); + LOG->Warn( sError ); + if( DISPLAY->IsWindowed() ) + HOOKS->MessageBoxOK( sError ); + } } float Actor::GetCommandLength( CString command ) diff --git a/stepmania/src/Actor.h b/stepmania/src/Actor.h index 8a45f93f5b..9e90176957 100644 --- a/stepmania/src/Actor.h +++ b/stepmania/src/Actor.h @@ -257,7 +257,8 @@ public: void FadeOn( float fSleepSeconds, CString sFadeString, float fFadeSeconds ) { Fade(fSleepSeconds,sFadeString,fFadeSeconds,false); }; void FadeOff( float fSleepSeconds, CString sFadeString, float fFadeSeconds ) { Fade(fSleepSeconds,sFadeString,fFadeSeconds,true); }; - virtual float Command( CString sCommandString ); // return length in seconds to execute command + float Command( CString sCommandString ); // return length in seconds to execute command + virtual void HandleCommand( const CStringArray &asTokens ); // derivable static float GetCommandLength( CString command ); virtual void SetState( int iNewState ) {}; diff --git a/stepmania/src/ActorUtil.cpp b/stepmania/src/ActorUtil.cpp new file mode 100644 index 0000000000..084d05d651 --- /dev/null +++ b/stepmania/src/ActorUtil.cpp @@ -0,0 +1,54 @@ +#include "global.h" // testing updates +/* +----------------------------------------------------------------------------- + Class: ActorUtil + + Desc: See header. + + Copyright (c) 2001-2002 by the person(s) listed below. All rights reserved. + Chris Danford +----------------------------------------------------------------------------- +*/ + +#include "ActorUtil.h" +#include "Sprite.h" +#include "BitmapText.h" +#include "Model.h" + + +Actor* MakeActor( CString sPath ) +{ + CString sDir, sFName, sExt; + splitrelpath( sPath, sDir, sFName, sExt ); + sExt.MakeLower(); + + + if( sExt=="png" || + sExt=="jpg" || + sExt=="gif" || + sExt=="bmp" || + sExt=="avi" || + sExt=="mpeg" || + sExt=="mpg" ) + { + Sprite* pSprite = new Sprite; + pSprite->Load( sPath ); + return pSprite; + } + if( sExt=="ini" ) + { + BitmapText* pBitmapText = new BitmapText; + pBitmapText->LoadFromFont( sPath ); + return pBitmapText; + } + if( sExt=="txt" ) + { + Model* pModel = new Model; + pModel->LoadMilkshapeAscii( sPath ); + return pModel; + } + + ASSERT(0); + return NULL; +} + diff --git a/stepmania/src/ActorUtil.h b/stepmania/src/ActorUtil.h index 9512e85fe0..6b42a50f1f 100644 --- a/stepmania/src/ActorUtil.h +++ b/stepmania/src/ActorUtil.h @@ -12,6 +12,7 @@ */ #include "Actor.h" +#include "ThemeManager.h" #define SET_XY( actor ) UtilSetXY( actor, m_sName ) @@ -55,4 +56,7 @@ inline float UtilSetXYAndOnCommand( Actor& actor, CString sClassName ) return UtilOnCommand( actor, sClassName ); } +// Return a Sprite, BitmapText, or Model depending on the file type +Actor* MakeActor( CString sPath ); + #endif diff --git a/stepmania/src/BGAnimation.cpp b/stepmania/src/BGAnimation.cpp index b5b1bce784..c96a0e7082 100644 --- a/stepmania/src/BGAnimation.cpp +++ b/stepmania/src/BGAnimation.cpp @@ -65,6 +65,9 @@ void BGAnimation::LoadFromAniDir( CString sAniDir ) IniFile ini(sPathToIni); ini.ReadFile(); + m_fLengthSeconds = -1; + ini.GetValueF( "BGAnimation", "LengthSeconds", m_fLengthSeconds ); + unsigned i; for( i=0; iLoadBG( ID ); - m_Sprites.back()->StretchTo( RectI(SCREEN_LEFT,SCREEN_TOP,SCREEN_RIGHT,SCREEN_BOTTOM) ); + Sprite* pSprite = new Sprite; + pSprite->LoadBG( ID ); + pSprite->StretchTo( RectI(SCREEN_LEFT,SCREEN_TOP,SCREEN_RIGHT,SCREEN_BOTTOM) ); + m_pActors.push_back( pSprite ); } void BGAnimationLayer::LoadFromMovie( CString sMoviePath ) { Init(); - m_Sprites.push_back(new Sprite); - m_Sprites.back()->LoadBG( sMoviePath ); - m_Sprites.back()->StretchTo( RectI(SCREEN_LEFT,SCREEN_TOP,SCREEN_RIGHT,SCREEN_BOTTOM) ); - m_Sprites.back()->GetTexture()->Play(); + Sprite* pSprite = new Sprite; + pSprite->LoadBG( sMoviePath ); + pSprite->StretchTo( RectI(SCREEN_LEFT,SCREEN_TOP,SCREEN_RIGHT,SCREEN_BOTTOM) ); + pSprite->GetTexture()->Play(); SDL_Delay( 50 ); // decode a frame so we don't see a black flash at the beginning - m_Sprites.back()->GetTexture()->Pause(); + pSprite->GetTexture()->Pause(); + m_pActors.push_back( pSprite ); } void BGAnimationLayer::LoadFromVisualization( CString sMoviePath ) { Init(); - m_Sprites.push_back(new Sprite); - m_Sprites.back()->LoadBG( sMoviePath ); - m_Sprites.back()->StretchTo( RectI(SCREEN_LEFT,SCREEN_TOP,SCREEN_RIGHT,SCREEN_BOTTOM) ); - m_Sprites.back()->SetBlendMode( BLEND_ADD ); + Sprite* pSprite = new Sprite; + m_pActors.push_back( pSprite ); + pSprite->LoadBG( sMoviePath ); + pSprite->StretchTo( RectI(SCREEN_LEFT,SCREEN_TOP,SCREEN_RIGHT,SCREEN_BOTTOM) ); + pSprite->SetBlendMode( BLEND_ADD ); } @@ -192,10 +197,13 @@ void BGAnimationLayer::LoadFromAniLayerFile( CString sPath ) switch( effect ) { case EFFECT_CENTER: - m_Type = TYPE_SPRITE; - m_Sprites.push_back(new Sprite); - m_Sprites.back()->Load( sPath ); - m_Sprites.back()->SetXY( CENTER_X, CENTER_Y ); + { + m_Type = TYPE_SPRITE; + Sprite* pSprite = new Sprite; + m_pActors.push_back( pSprite ); + pSprite->Load( sPath ); + pSprite->SetXY( CENTER_X, CENTER_Y ); + } break; case EFFECT_STRETCH_STILL: case EFFECT_STRETCH_SCROLL_LEFT: @@ -207,12 +215,13 @@ void BGAnimationLayer::LoadFromAniLayerFile( CString sPath ) case EFFECT_STRETCH_TWIST: { m_Type = TYPE_STRETCH; - m_Sprites.push_back(new Sprite); + Sprite* pSprite = new Sprite; + m_pActors.push_back( pSprite ); RageTextureID ID(sPath); ID.bStretch = true; - m_Sprites.back()->LoadBG( ID ); - m_Sprites.back()->StretchTo( RectI(SCREEN_LEFT,SCREEN_TOP,SCREEN_RIGHT,SCREEN_BOTTOM) ); - m_Sprites.back()->SetCustomTextureRect( RectF(0,0,1,1) ); + pSprite->LoadBG( ID ); + pSprite->StretchTo( RectI(SCREEN_LEFT,SCREEN_TOP,SCREEN_RIGHT,SCREEN_BOTTOM) ); + pSprite->SetCustomTextureRect( RectF(0,0,1,1) ); switch( effect ) { @@ -227,26 +236,27 @@ void BGAnimationLayer::LoadFromAniLayerFile( CString sPath ) case EFFECT_STRETCH_SPIN: { m_Type = TYPE_STRETCH; - m_Sprites.push_back(new Sprite); - m_Sprites.back()->LoadBG( sPath ); - m_Sprites.back()->ScaleToCover( RectI(SCREEN_LEFT-200,SCREEN_TOP-200,SCREEN_RIGHT+200,SCREEN_BOTTOM+200) ); - m_Sprites.back()->SetEffectSpin( RageVector3(0,0,60) ); + Sprite* pSprite = new Sprite; + m_pActors.push_back( pSprite ); + pSprite->LoadBG( sPath ); + pSprite->ScaleToCover( RectI(SCREEN_LEFT-200,SCREEN_TOP-200,SCREEN_RIGHT+200,SCREEN_BOTTOM+200) ); + pSprite->SetEffectSpin( RageVector3(0,0,60) ); } break; case EFFECT_PARTICLES_SPIRAL_OUT: case EFFECT_PARTICLES_SPIRAL_IN: /* { m_Type = TYPE_PARTICLES; - m_Sprites.back()->Load( sPath ); - int iSpriteArea = int( m_Sprites.back()->GetUnzoomedWidth()*m_Sprites.back()->GetUnzoomedHeight() ); + pSprite->Load( sPath ); + int iSpriteArea = int( pSprite->GetUnzoomedWidth()*pSprite->GetUnzoomedHeight() ); int iMaxArea = SCREEN_WIDTH*SCREEN_HEIGHT; m_iNumSprites = m_iNumParticles = iMaxArea / iSpriteArea; m_iNumSprites = m_iNumParticles = min( m_iNumSprites, MAX_SPRITES ); for( unsigned i=0; iLoad( sPath ); - m_Sprites.back()->SetZoom( 0.7f + 0.6f*i/(float)m_iNumParticles ); - m_Sprites.back()->SetX( randomf( GetGuardRailLeft(m_Sprites.back()), GetGuardRailRight(m_Sprites.back()) ) ); - m_Sprites.back()->SetY( randomf( GetGuardRailTop(m_Sprites.back()), GetGuardRailBottom(m_Sprites.back()) ) ); + Sprite* pSprite = new Sprite; + m_pActors.push_back( pSprite ); + pSprite->Load( sPath ); + pSprite->SetZoom( 0.7f + 0.6f*i/(float)m_iNumParticles ); + pSprite->SetX( randomf( GetGuardRailLeft(pSprite), GetGuardRailRight(pSprite) ) ); + pSprite->SetY( randomf( GetGuardRailTop(pSprite), GetGuardRailBottom(pSprite) ) ); switch( effect ) { case EFFECT_PARTICLES_FLOAT_UP: case EFFECT_PARTICLES_SPIRAL_OUT: - m_vParticleVelocity[i] = RageVector3( 0, -PARTICLE_SPEED*m_Sprites.back()->GetZoom(), 0 ); + m_vParticleVelocity[i] = RageVector3( 0, -PARTICLE_SPEED*pSprite->GetZoom(), 0 ); break; case EFFECT_PARTICLES_FLOAT_DOWN: case EFFECT_PARTICLES_SPIRAL_IN: - m_vParticleVelocity[i] = RageVector3( 0, PARTICLE_SPEED*m_Sprites.back()->GetZoom(), 0 ); + m_vParticleVelocity[i] = RageVector3( 0, PARTICLE_SPEED*pSprite->GetZoom(), 0 ); break; case EFFECT_PARTICLES_FLOAT_LEFT: - m_vParticleVelocity[i] = RageVector3( -PARTICLE_SPEED*m_Sprites.back()->GetZoom(), 0, 0 ); + m_vParticleVelocity[i] = RageVector3( -PARTICLE_SPEED*pSprite->GetZoom(), 0, 0 ); break; case EFFECT_PARTICLES_FLOAT_RIGHT: - m_vParticleVelocity[i] = RageVector3( +PARTICLE_SPEED*m_Sprites.back()->GetZoom(), 0, 0 ); + m_vParticleVelocity[i] = RageVector3( +PARTICLE_SPEED*pSprite->GetZoom(), 0, 0 ); break; case EFFECT_PARTICLES_BOUNCE: m_bParticlesBounce = true; - m_Sprites.back()->SetZoom( 1 ); + pSprite->SetZoom( 1 ); m_vParticleVelocity[i] = RageVector3( randomf(), randomf(), 0 ); RageVec3Normalize( &m_vParticleVelocity[i], &m_vParticleVelocity[i] ); break; @@ -328,9 +339,10 @@ void BGAnimationLayer::LoadFromAniLayerFile( CString sPath ) { for( int y=0; yLoad( ID ); - m_Sprites.back()->SetTextureWrapping( true ); // gets rid of some "cracks" + Sprite* pSprite = new Sprite; + m_pActors.push_back( pSprite ); + pSprite->Load( ID ); + pSprite->SetTextureWrapping( true ); // gets rid of some "cracks" switch( effect ) { @@ -349,13 +361,13 @@ void BGAnimationLayer::LoadFromAniLayerFile( CString sPath ) m_fTileVelocityY = +PARTICLE_SPEED; break; case EFFECT_TILE_FLIP_X: - m_Sprites.back()->SetEffectSpin( RageVector3(2,0,0) ); + pSprite->SetEffectSpin( RageVector3(2,0,0) ); break; case EFFECT_TILE_FLIP_Y: - m_Sprites.back()->SetEffectSpin( RageVector3(0,2,0) ); + pSprite->SetEffectSpin( RageVector3(0,2,0) ); break; case EFFECT_TILE_PULSE: - m_Sprites.back()->SetEffectPulse( 1, 0.3f, 1.f ); + pSprite->SetEffectPulse( 1, 0.3f, 1.f ); break; default: ASSERT(0); @@ -372,24 +384,24 @@ void BGAnimationLayer::LoadFromAniLayerFile( CString sPath ) sPath.MakeLower(); if( sPath.Find("cyclecolor") != -1 ) - for( unsigned i=0; iSetEffectRainbow( 5 ); + for( unsigned i=0; iSetEffectRainbow( 5 ); if( sPath.Find("cyclealpha") != -1 ) - for( unsigned i=0; iSetEffectDiffuseShift( 2, RageColor(1,1,1,1), RageColor(1,1,1,0) ); + for( unsigned i=0; iSetEffectDiffuseShift( 2, RageColor(1,1,1,1), RageColor(1,1,1,0) ); if( sPath.Find("startonrandomframe") != -1 ) - for( unsigned i=0; iSetState( rand()%m_Sprites[i]->GetNumStates() ); + for( unsigned i=0; iSetState( rand()%m_pActors[i]->GetNumStates() ); if( sPath.Find("dontanimate") != -1 ) - for( unsigned i=0; iStopAnimating(); + for( unsigned i=0; iStopAnimating(); if( sPath.Find("add") != -1 ) - for( unsigned i=0; iSetBlendMode( BLEND_ADD ); + for( unsigned i=0; iSetBlendMode( BLEND_ADD ); /* CString sDir, sFName, sExt; @@ -417,23 +429,23 @@ void BGAnimationLayer::LoadFromAniLayerFile( CString sPath ) if(m_ShowTime != 0) // they don't want to show until a certain point... hide it all { - m_Sprites[0].SetDiffuse(RageColor(0,0,0,0)); + m_pActors[0].SetDiffuse(RageColor(0,0,0,0)); } if(m_PosX != 0) { - m_Sprites[0].SetX(m_PosX); + m_pActors[0].SetX(m_PosX); } if(m_PosY != 0) { - m_Sprites[0].SetY(m_PosY); + m_pActors[0].SetY(m_PosY); } if(m_Zoom != 0) { - m_Sprites[0].SetZoom(m_Zoom); + m_pActors[0].SetZoom(m_Zoom); } if(m_Rot != 0) { - m_Sprites[0].SetRotationZ(m_Rot); + m_pActors[0].SetRotationZ(m_Rot); } */ } @@ -503,6 +515,7 @@ void BGAnimationLayer::LoadFromIni( CString sAniDir, CString sLayer ) ini.GetValueI( sLayer, "Type", (int&)m_Type ); ini.GetValue ( sLayer, "Command", m_sCommand ); + ini.GetValueF( sLayer, "FOV", m_fFOV ); ini.GetValueF( sLayer, "StretchTexCoordVelocityX", m_fStretchTexCoordVelocityX ); ini.GetValueF( sLayer, "StretchTexCoordVelocityY", m_fStretchTexCoordVelocityY ); ini.GetValueF( sLayer, "ZoomMin", m_fZoomMin ); @@ -529,28 +542,31 @@ void BGAnimationLayer::LoadFromIni( CString sAniDir, CString sLayer ) switch( m_Type ) { case TYPE_SPRITE: - m_Sprites.push_back( new Sprite ); - m_Sprites.back()->Load( sPath ); - m_Sprites.back()->SetXY( CENTER_X, CENTER_Y ); + { + Actor* pActor = MakeActor( sPath ); + m_pActors.push_back( pActor ); + pActor->SetXY( CENTER_X, CENTER_Y ); + } break; case TYPE_STRETCH: { - m_Sprites.push_back( new Sprite ); + Sprite* pSprite = new Sprite; + m_pActors.push_back( pSprite ); RageTextureID ID(sPath); ID.bStretch = true; - m_Sprites.back()->LoadBG( ID ); - m_Sprites.back()->StretchTo( RectI(SCREEN_LEFT,SCREEN_TOP,SCREEN_RIGHT,SCREEN_BOTTOM) ); - m_Sprites.back()->SetCustomTextureRect( RectF(0,0,1,1) ); + pSprite->LoadBG( ID ); + pSprite->StretchTo( RectI(SCREEN_LEFT,SCREEN_TOP,SCREEN_RIGHT,SCREEN_BOTTOM) ); + pSprite->SetCustomTextureRect( RectF(0,0,1,1) ); } break; case TYPE_PARTICLES: { for( int i=0; iLoad( sPath ); - m_Sprites.back()->SetXY( randomf(SCREEN_LEFT,SCREEN_RIGHT), randomf(SCREEN_TOP,SCREEN_BOTTOM) ); - m_Sprites.back()->SetZoom( randomf(m_fZoomMin,m_fZoomMax) ); + Actor* pActor = MakeActor( sPath ); + m_pActors.push_back( pActor ); + pActor->SetXY( randomf(SCREEN_LEFT,SCREEN_RIGHT), randomf(SCREEN_TOP,SCREEN_BOTTOM) ); + pActor->SetZoom( randomf(m_fZoomMin,m_fZoomMax) ); m_vParticleVelocity[i] = RageVector3( randomf(m_fVelocityXMin,m_fVelocityXMax), randomf(m_fVelocityYMin,m_fVelocityYMax), @@ -578,10 +594,11 @@ void BGAnimationLayer::LoadFromIni( CString sAniDir, CString sLayer ) unsigned NumSprites = m_iNumTilesWide * m_iNumTilesHigh; for( unsigned i=0; iLoad( ID ); - m_Sprites.back()->SetTextureWrapping( true ); // gets rid of some "cracks" - m_Sprites.back()->SetZoom( randomf(m_fZoomMin,m_fZoomMax) ); + Sprite* pSprite = new Sprite; + m_pActors.push_back( pSprite ); + pSprite->Load( ID ); + pSprite->SetTextureWrapping( true ); // gets rid of some "cracks" + pSprite->SetZoom( randomf(m_fZoomMin,m_fZoomMax) ); } } break; @@ -593,14 +610,14 @@ void BGAnimationLayer::LoadFromIni( CString sAniDir, CString sLayer ) ini.GetValueB( sLayer, "StartOnRandomFrame", bStartOnRandomFrame ); if( bStartOnRandomFrame ) { - for( unsigned i=0; iSetState( rand()%m_Sprites[i]->GetNumStates() ); + for( unsigned i=0; iSetState( rand()%m_pActors[i]->GetNumStates() ); } if( m_sCommand != "" ) { - for( unsigned i=0; iCommand( m_sCommand ); + for( unsigned i=0; iCommand( m_sCommand ); } } @@ -608,8 +625,8 @@ float BGAnimationLayer::GetMaxTweenTimeLeft() const { float ret = 0; - for( unsigned i=0; iGetTweenTimeLeft()); + for( unsigned i=0; iGetTweenTimeLeft()); return ret; } @@ -621,8 +638,8 @@ void BGAnimationLayer::Update( float fDeltaTime ) const float fSongBeat = GAMESTATE->m_fSongBeat; unsigned i; - for( i=0; iUpdate( fDeltaTime ); + for( i=0; iUpdate( fDeltaTime ); switch( m_Type ) @@ -630,10 +647,12 @@ void BGAnimationLayer::Update( float fDeltaTime ) case TYPE_SPRITE: break; case TYPE_STRETCH: - for( i=0; iGetActiveTextureCoords( fTexCoords ); + // FIXME: Very dangerous. How could we handle this better? + Sprite* pSprite = (Sprite*)m_pActors[i]; + pSprite->GetActiveTextureCoords( fTexCoords ); for( int j=0; j<8; j+=2 ) { @@ -641,81 +660,81 @@ void BGAnimationLayer::Update( float fDeltaTime ) fTexCoords[j+1] += fDeltaTime*m_fStretchTexCoordVelocityY; } - m_Sprites[i]->SetCustomTextureCoords( fTexCoords ); + pSprite->SetCustomTextureCoords( fTexCoords ); } break; /* case EFFECT_PARTICLES_SPIRAL_OUT: for( i=0; i SPIRAL_MAX_ZOOM ) - m_Sprites[i].SetZoom( SPIRAL_MIN_ZOOM ); + m_pActors[i].SetZoom( m_pActors[i].GetZoom() + fDeltaTime ); + if( m_pActors[i].GetZoom() > SPIRAL_MAX_ZOOM ) + m_pActors[i].SetZoom( SPIRAL_MIN_ZOOM ); - m_Sprites[i].SetRotationZ( m_Sprites[i].GetRotationZ() + fDeltaTime ); + m_pActors[i].SetRotationZ( m_pActors[i].GetRotationZ() + fDeltaTime ); - float fRadius = (m_Sprites[i].GetZoom()-SPIRAL_MIN_ZOOM); + float fRadius = (m_pActors[i].GetZoom()-SPIRAL_MIN_ZOOM); fRadius *= fRadius; fRadius *= 200; - m_Sprites[i].SetX( CENTER_X + cosf(m_Sprites[i].GetRotationZ())*fRadius ); - m_Sprites[i].SetY( CENTER_Y + sinf(m_Sprites[i].GetRotationZ())*fRadius ); + m_pActors[i].SetX( CENTER_X + cosf(m_pActors[i].GetRotationZ())*fRadius ); + m_pActors[i].SetY( CENTER_Y + sinf(m_pActors[i].GetRotationZ())*fRadius ); } break; case EFFECT_PARTICLES_SPIRAL_IN: for( i=0; iSetX( m_Sprites[i]->GetX() + fDeltaTime*m_vParticleVelocity[i].x ); - m_Sprites[i]->SetY( m_Sprites[i]->GetY() + fDeltaTime*m_vParticleVelocity[i].y ); - m_Sprites[i]->SetZ( m_Sprites[i]->GetZ() + fDeltaTime*m_vParticleVelocity[i].z ); + m_pActors[i]->SetX( m_pActors[i]->GetX() + fDeltaTime*m_vParticleVelocity[i].x ); + m_pActors[i]->SetY( m_pActors[i]->GetY() + fDeltaTime*m_vParticleVelocity[i].y ); + m_pActors[i]->SetZ( m_pActors[i]->GetZ() + fDeltaTime*m_vParticleVelocity[i].z ); if( m_bParticlesBounce ) { - if( HitGuardRailLeft(m_Sprites[i]) ) + if( HitGuardRailLeft(m_pActors[i]) ) { m_vParticleVelocity[i].x *= -1; - m_Sprites[i]->SetX( GetGuardRailLeft(m_Sprites[i]) ); + m_pActors[i]->SetX( GetGuardRailLeft(m_pActors[i]) ); } - if( HitGuardRailRight(m_Sprites[i]) ) + if( HitGuardRailRight(m_pActors[i]) ) { m_vParticleVelocity[i].x *= -1; - m_Sprites[i]->SetX( GetGuardRailRight(m_Sprites[i]) ); + m_pActors[i]->SetX( GetGuardRailRight(m_pActors[i]) ); } - if( HitGuardRailTop(m_Sprites[i]) ) + if( HitGuardRailTop(m_pActors[i]) ) { m_vParticleVelocity[i].y *= -1; - m_Sprites[i]->SetY( GetGuardRailTop(m_Sprites[i]) ); + m_pActors[i]->SetY( GetGuardRailTop(m_pActors[i]) ); } - if( HitGuardRailBottom(m_Sprites[i]) ) + if( HitGuardRailBottom(m_pActors[i]) ) { m_vParticleVelocity[i].y *= -1; - m_Sprites[i]->SetY( GetGuardRailBottom(m_Sprites[i]) ); + m_pActors[i]->SetY( GetGuardRailBottom(m_pActors[i]) ); } } else // !m_bParticlesBounce { - if( m_vParticleVelocity[i].x<0 && IsOffScreenLeft(m_Sprites[i]) ) - m_Sprites[i]->SetX( GetOffScreenRight(m_Sprites[i]) ); - if( m_vParticleVelocity[i].x>0 && IsOffScreenRight(m_Sprites[i]) ) - m_Sprites[i]->SetX( GetOffScreenLeft(m_Sprites[i]) ); - if( m_vParticleVelocity[i].y<0 && IsOffScreenTop(m_Sprites[i]) ) - m_Sprites[i]->SetY( GetOffScreenBottom(m_Sprites[i]) ); - if( m_vParticleVelocity[i].y>0 && IsOffScreenBottom(m_Sprites[i]) ) - m_Sprites[i]->SetY( GetOffScreenTop(m_Sprites[i]) ); + if( m_vParticleVelocity[i].x<0 && IsOffScreenLeft(m_pActors[i]) ) + m_pActors[i]->SetX( GetOffScreenRight(m_pActors[i]) ); + if( m_vParticleVelocity[i].x>0 && IsOffScreenRight(m_pActors[i]) ) + m_pActors[i]->SetX( GetOffScreenLeft(m_pActors[i]) ); + if( m_vParticleVelocity[i].y<0 && IsOffScreenTop(m_pActors[i]) ) + m_pActors[i]->SetY( GetOffScreenBottom(m_pActors[i]) ); + if( m_vParticleVelocity[i].y>0 && IsOffScreenBottom(m_pActors[i]) ) + m_pActors[i]->SetY( GetOffScreenTop(m_pActors[i]) ); } } break; @@ -725,7 +744,7 @@ void BGAnimationLayer::Update( float fDeltaTime ) float fTotalWidth = m_iNumTilesWide * m_fTilesSpacingX; float fTotalHeight = m_iNumTilesHigh * m_fTilesSpacingY; - ASSERT( int(m_Sprites.size()) == m_iNumTilesWide * m_iNumTilesHigh ); + ASSERT( int(m_pActors.size()) == m_iNumTilesWide * m_iNumTilesHigh ); for( int x=0; xSetX( fX ); - m_Sprites[i]->SetY( fY ); + m_pActors[i]->SetX( fX ); + m_pActors[i]->SetY( fY ); } } /* for( i=0; iSetZoom( sinf( fSongBeat*PI/2 ) ); + for( i=0; iSetZoom( sinf( fSongBeat*PI/2 ) ); break; default: @@ -784,7 +803,7 @@ void BGAnimationLayer::Update( float fDeltaTime ) m_TweenStartTime -= fDeltaTime; if(m_TweenStartTime <= 0) // if we've gone past the magic point... show the beast.... { - // m_Sprites[0].SetXY( m_TweenX, m_TweenY); + // m_pActors[0].SetXY( m_TweenX, m_TweenY); // WHAT WOULD BE NICE HERE: // Set the Sprite Tweening To m_TweenX and m_TweenY @@ -808,25 +827,25 @@ void BGAnimationLayer::Update( float fDeltaTime ) { if(m_TweenPassedY != 1) // Check to see if we still need to Tween Along the Y Axis { - if(m_Sprites[0].GetY() < m_TweenY) // it needs to travel down + if(m_pActors[0].GetY() < m_TweenY) // it needs to travel down { // Speed = Distance / Time.... // Take away from the current position... the distance it has to travel divided by the time they want it done in... - m_Sprites[0].SetY(m_Sprites[0].GetY() + ((m_TweenY - m_PosY)/(m_TweenSpeed*60))); + m_pActors[0].SetY(m_pActors[0].GetY() + ((m_TweenY - m_PosY)/(m_TweenSpeed*60))); - if(m_Sprites[0].GetY() > m_TweenY) // passed the location we wanna go to? + if(m_pActors[0].GetY() > m_TweenY) // passed the location we wanna go to? { - m_Sprites[0].SetY(m_TweenY); // set it to the exact location we want + m_pActors[0].SetY(m_TweenY); // set it to the exact location we want m_TweenPassedY = 1; // say we passed it. } } else // travelling up { - m_Sprites[0].SetY(m_Sprites[0].GetY() - ((m_TweenY + m_PosY)/(m_TweenSpeed*60))); + m_pActors[0].SetY(m_pActors[0].GetY() - ((m_TweenY + m_PosY)/(m_TweenSpeed*60))); - if(m_Sprites[0].GetY() < m_TweenY) + if(m_pActors[0].GetY() < m_TweenY) { - m_Sprites[0].SetY(m_TweenY); + m_pActors[0].SetY(m_TweenY); m_TweenPassedY = 1; } } @@ -834,21 +853,21 @@ void BGAnimationLayer::Update( float fDeltaTime ) if(m_TweenPassedX != 1) // Check to see if we still need to Tween Along the X Axis { - if(m_Sprites[0].GetX() < m_TweenX) // it needs to travel right + if(m_pActors[0].GetX() < m_TweenX) // it needs to travel right { - m_Sprites[0].SetX(m_Sprites[0].GetX() + ((m_TweenX - m_PosX)/(m_TweenSpeed*60))); - if(m_Sprites[0].GetX() > m_TweenX) + m_pActors[0].SetX(m_pActors[0].GetX() + ((m_TweenX - m_PosX)/(m_TweenSpeed*60))); + if(m_pActors[0].GetX() > m_TweenX) { - m_Sprites[0].SetX(m_TweenX); + m_pActors[0].SetX(m_TweenX); m_TweenPassedX = 1; } } else // travelling left { - m_Sprites[0].SetX(m_Sprites[0].GetX() - ((m_TweenX + m_PosX)/(m_TweenSpeed*60))); - if(m_Sprites[0].GetX() < m_TweenX) + m_pActors[0].SetX(m_pActors[0].GetX() - ((m_TweenX + m_PosX)/(m_TweenSpeed*60))); + if(m_pActors[0].GetX() < m_TweenX) { - m_Sprites[0].SetX(m_TweenX); + m_pActors[0].SetX(m_TweenX); m_TweenPassedX = 1; } } @@ -865,7 +884,7 @@ void BGAnimationLayer::Update( float fDeltaTime ) m_ShowTime -= fDeltaTime; if(m_ShowTime <= 0) // if we've gone past the magic point... show the beast.... { - m_Sprites[0].SetDiffuse( RageColor(1,1,1,1) ); + m_pActors[0].SetDiffuse( RageColor(1,1,1,1) ); } } if(m_HideTime != 0 && !(m_HideTime < 0)) // make sure it's not 0 or less than 0... @@ -873,7 +892,7 @@ void BGAnimationLayer::Update( float fDeltaTime ) m_HideTime -= fDeltaTime; if(m_HideTime <= 0) // if we've gone past the magic point... hide the beast.... { - m_Sprites[0].SetDiffuse( RageColor(0,0,0,0) ); + m_pActors[0].SetDiffuse( RageColor(0,0,0,0) ); } } @@ -882,32 +901,41 @@ void BGAnimationLayer::Update( float fDeltaTime ) void BGAnimationLayer::Draw() { - for( unsigned i=0; iDraw(); + DISPLAY->LoadMenuPerspective( m_fFOV ); + for( unsigned i=0; iDraw(); + DISPLAY->LoadMenuPerspective( 0 ); } void BGAnimationLayer::SetDiffuse( RageColor c ) { - for(unsigned i=0; iSetDiffuse(c); + for(unsigned i=0; iSetDiffuse(c); } void BGAnimationLayer::GainingFocus( float fRate, bool bRewindMovie, bool bLoop ) { m_fUpdateRate = fRate; - m_Sprites.back()->GetTexture()->SetPlaybackRate(fRate); + + // FIXME: Very dangerous. How could we handle this better? + Sprite* pSprite = (Sprite*)m_pActors[0]; + + pSprite->GetTexture()->SetPlaybackRate(fRate); if( bRewindMovie ) - m_Sprites[0]->GetTexture()->SetPosition( 0 ); - m_Sprites.back()->GetTexture()->SetLooping(bLoop); + pSprite->GetTexture()->SetPosition( 0 ); + pSprite->GetTexture()->SetLooping(bLoop); // if movie texture, pause and play movie so we don't waste CPU cycles decoding frames that won't be shown - m_Sprites[0]->GetTexture()->Play(); + pSprite->GetTexture()->Play(); - for( unsigned i=0; iCommand( m_sCommand ); + for( unsigned i=0; iCommand( m_sCommand ); } void BGAnimationLayer::LosingFocus() { - m_Sprites[0]->GetTexture()->Pause(); + // FIXME: Very dangerous. How could we handle this better? + Sprite* pSprite = (Sprite*)m_pActors[0]; + + pSprite->GetTexture()->Pause(); } diff --git a/stepmania/src/BGAnimationLayer.h b/stepmania/src/BGAnimationLayer.h index 7cf4ec474b..2b3879f9ff 100644 --- a/stepmania/src/BGAnimationLayer.h +++ b/stepmania/src/BGAnimationLayer.h @@ -45,7 +45,7 @@ public: void LosingFocus(); protected: - vector m_Sprites; + vector m_pActors; RageVector3 m_vParticleVelocity[MAX_SPRITES]; enum Effect { @@ -97,6 +97,7 @@ protected: // common stuff CString m_sCommand; float m_fUpdateRate; // get by GainingFocus + float m_fFOV; // stretch stuff float m_fStretchTexCoordVelocityX; @@ -123,7 +124,6 @@ protected: float m_fTileVelocityX; float m_fTileVelocityY; - }; #endif diff --git a/stepmania/src/BitmapText.cpp b/stepmania/src/BitmapText.cpp index e8bf785907..85ff548f33 100644 --- a/stepmania/src/BitmapText.cpp +++ b/stepmania/src/BitmapText.cpp @@ -178,7 +178,7 @@ void BitmapText::BuildChars() for( unsigned j=0; jGetGlyph(szLine[j]); /* set vertex positions */ diff --git a/stepmania/src/BitmapText.h b/stepmania/src/BitmapText.h index e0026c9be3..73d0c8a9fa 100644 --- a/stepmania/src/BitmapText.h +++ b/stepmania/src/BitmapText.h @@ -58,7 +58,7 @@ protected: bool m_bRainbow; - vector verts; + vector verts; vector tex; void BuildChars(); diff --git a/stepmania/src/GrooveGraph.cpp b/stepmania/src/GrooveGraph.cpp index 5275b13d97..dda7beca6d 100644 --- a/stepmania/src/GrooveGraph.cpp +++ b/stepmania/src/GrooveGraph.cpp @@ -120,7 +120,7 @@ void GrooveGraph::Mountain::DrawPrimitives() { DISPLAY->SetTexture( NULL ); DISPLAY->SetTextureModeModulate(); - RageVertex v[4]; + RageSpriteVertex v[4]; for( int i=NUM_DIFFICULTIES-1; i>=0; i-- ) { diff --git a/stepmania/src/GrooveRadar.cpp b/stepmania/src/GrooveRadar.cpp index 655b3aaf80..f8439c79c7 100644 --- a/stepmania/src/GrooveRadar.cpp +++ b/stepmania/src/GrooveRadar.cpp @@ -151,7 +151,7 @@ void GrooveRadar::GrooveRadarValueMap::DrawPrimitives() DISPLAY->SetTexture( NULL ); DISPLAY->SetTextureModeModulate(); - RageVertex v[12]; // needed to draw 5 fan primitives and 10 strip primitives + RageSpriteVertex v[12]; // needed to draw 5 fan primitives and 10 strip primitives for( int p=0; pGetVertexBuffer(); - RAGEVERTEX* v; + RageSpriteVertex* v; pVB->Lock( 0, 0, (BYTE**)&v, 0 ); int iNumV = 0; @@ -570,8 +570,8 @@ void LifeStream::DrawPrimitives() // finally! Pump those triangles! - pd3dDevice->SetVertexShader( D3DFVF_RAGEVERTEX ); - pd3dDevice->SetStreamSource( 0, pVB, sizeof(RAGEVERTEX) ); + pd3dDevice->SetVertexShader( D3DFVF_RageSpriteVertex ); + pd3dDevice->SetStreamSource( 0, pVB, sizeof(RageSpriteVertex) ); pd3dDevice->DrawPrimitive( D3DPT_TRIANGLESTRIP, 0, iNumV-2 ); } diff --git a/stepmania/src/Model.cpp b/stepmania/src/Model.cpp index c1e770eaed..4856c7cb2d 100644 --- a/stepmania/src/Model.cpp +++ b/stepmania/src/Model.cpp @@ -614,7 +614,7 @@ void Model::DrawPrimitives() for (int i = 0; i < (int)m_Meshes.size(); i++) { msMesh *pMesh = &m_Meshes[i]; - RageVertexVector& TempVertices = m_vTempVerticesByBone[i]; + RageModelVertexVector& TempVertices = m_vTempVerticesByBone[i]; // apply material if( pMesh->nMaterialIndex != -1 ) @@ -647,11 +647,9 @@ void Model::DrawPrimitives() // process vertices for (int j = 0; j < (int)pMesh->Vertices.size(); j++) { - RageVertex& tempVert = TempVertices[j]; + RageModelVertex& tempVert = TempVertices[j]; msVertex& originalVert = pMesh->Vertices[j]; - tempVert.c = RageColor(1,1,1,1); - memcpy( &tempVert.t, originalVert.uv, sizeof(originalVert.uv) ); if( originalVert.nBoneIndex == -1 ) diff --git a/stepmania/src/Model.h b/stepmania/src/Model.h index 1b2d41775a..df907ef5bf 100644 --- a/stepmania/src/Model.h +++ b/stepmania/src/Model.h @@ -68,8 +68,8 @@ private: RageVector3 m_vMins, m_vMaxs; myBone_t *m_pBones; - typedef vector RageVertexVector; - vector m_vTempVerticesByBone; + typedef vector RageModelVertexVector; + vector m_vTempVerticesByBone; float m_fCurrFrame; }; diff --git a/stepmania/src/NoteDisplay.cpp b/stepmania/src/NoteDisplay.cpp index b1f4cc7296..b05c4cc2c6 100644 --- a/stepmania/src/NoteDisplay.cpp +++ b/stepmania/src/NoteDisplay.cpp @@ -412,7 +412,7 @@ void NoteDisplay::DrawHold( const HoldNote& hn, const bool bActive, const float /* The body and caps should have no overlap, so their order doesn't matter. * Draw the head last, so it appears on top. */ const int size = 4096; - static RageVertex queue[size]; + static RageSpriteVertex queue[size]; // // Draw the bottom cap (always wavy) @@ -421,7 +421,7 @@ void NoteDisplay::DrawHold( const HoldNote& hn, const bool bActive, const float Sprite* pBottomCap = GetHoldBottomCapSprite( hn.fStartBeat, bActive ); // draw manually in small segments - RageVertex *v = &queue[0]; + RageSpriteVertex *v = &queue[0]; RageTexture* pTexture = pBottomCap->GetTexture(); const RectF *pRect = pBottomCap->GetCurrentTextureCoordRect(); DISPLAY->SetTexture( pTexture ); @@ -490,7 +490,7 @@ void NoteDisplay::DrawHold( const HoldNote& hn, const bool bActive, const float Sprite* pSprBody = GetHoldBodySprite( hn.fStartBeat, bActive ); // draw manually in small segments - RageVertex *v = &queue[0]; + RageSpriteVertex *v = &queue[0]; RageTexture* pTexture = pSprBody->GetTexture(); const RectF *pRect = pSprBody->GetCurrentTextureCoordRect(); DISPLAY->SetTexture( pTexture ); @@ -572,7 +572,7 @@ void NoteDisplay::DrawHold( const HoldNote& hn, const bool bActive, const float Sprite* pSprTopCap = GetHoldTopCapSprite( hn.fStartBeat, bActive ); // draw manually in small segments - RageVertex *v = &queue[0]; + RageSpriteVertex *v = &queue[0]; RageTexture* pTexture = pSprTopCap->GetTexture(); const RectF *pRect = pSprTopCap->GetCurrentTextureCoordRect(); DISPLAY->SetTexture( pTexture ); diff --git a/stepmania/src/RageBitmapTexture.cpp b/stepmania/src/RageBitmapTexture.cpp index 3cfb986e43..414328a53a 100644 --- a/stepmania/src/RageBitmapTexture.cpp +++ b/stepmania/src/RageBitmapTexture.cpp @@ -153,6 +153,7 @@ apply_color_key: if( HintString.Find("4alphaonly") != -1 ) actualID.iTransparencyOnly = 4; else if( HintString.Find("8alphaonly") != -1 ) actualID.iTransparencyOnly = 8; if( HintString.Find("dither") != -1 ) actualID.bDither = true; + if( HintString.Find("stretch") != -1 ) actualID.bStretch = true; if( actualID.iTransparencyOnly ) actualID.iColorDepth = 32; /* Treat the image as 32-bit, so we don't lose any alpha precision. */ @@ -312,6 +313,8 @@ apply_color_key: // HACK: Don't check song graphics. Many of them are weird dimensions. if( (actualID.filename.length()>=6 && actualID.filename.Left(6)=="Songs/") ) bRunCheck = false; + if( (actualID.filename.length()>=6 && actualID.filename.Left(9)=="CDTitles/") ) + bRunCheck = false; if( bRunCheck ) { diff --git a/stepmania/src/RageDisplay.cpp b/stepmania/src/RageDisplay.cpp index 8393ccdb39..933e0840fa 100644 --- a/stepmania/src/RageDisplay.cpp +++ b/stepmania/src/RageDisplay.cpp @@ -127,7 +127,7 @@ void RageDisplay::StatsAddVerts( int iNumVertsRendered ) { g_iVertsRenderedSince /* Draw a line as a quad. GL_LINES with antialiasing off can draw line * ends at odd angles--they're forced to axis-alignment regardless of the * angle of the line. */ -void RageDisplay::DrawPolyLine(const RageVertex &p1, const RageVertex &p2, float LineWidth ) +void RageDisplay::DrawPolyLine(const RageSpriteVertex &p1, const RageSpriteVertex &p2, float LineWidth ) { /* soh cah toa strikes strikes again! */ float opp = p2.p.x - p1.p.x; @@ -137,7 +137,7 @@ void RageDisplay::DrawPolyLine(const RageVertex &p1, const RageVertex &p2, float float lsin = opp/hyp; float lcos = adj/hyp; - RageVertex v[4]; + RageSpriteVertex v[4]; v[0] = v[1] = p1; v[2] = v[3] = p2; @@ -158,7 +158,7 @@ void RageDisplay::DrawPolyLine(const RageVertex &p1, const RageVertex &p2, float } -void RageDisplay::DrawLineStrip( const RageVertex v[], int iNumVerts, float LineWidth ) +void RageDisplay::DrawLineStrip( const RageSpriteVertex v[], int iNumVerts, float LineWidth ) { ASSERT( iNumVerts >= 2 ); @@ -174,10 +174,10 @@ void RageDisplay::DrawLineStrip( const RageVertex v[], int iNumVerts, float Line DrawCircle( v[i], LineWidth/2 ); } -void RageDisplay::DrawCircle( const RageVertex &p, float radius ) +void RageDisplay::DrawCircle( const RageSpriteVertex &p, float radius ) { const int subdivisions = 32; - RageVertex v[subdivisions+2]; + RageSpriteVertex v[subdivisions+2]; v[0] = p; for(int i = 0; i < subdivisions+1; ++i) diff --git a/stepmania/src/RageDisplay.h b/stepmania/src/RageDisplay.h index a92d246367..4d14dc4ee9 100644 --- a/stepmania/src/RageDisplay.h +++ b/stepmania/src/RageDisplay.h @@ -30,7 +30,7 @@ struct SDL_Surface; RageVector3& Normal( int index ); RageVector3& Position( int index ); // convenience. Remove this later! - void Set( int index, const RageVertex& v ); + void Set( int index, const RageSpriteVertex& v ); struct Impl; Impl* pImpl; @@ -170,15 +170,15 @@ public: RageVector3 dir ) = 0; - void DrawQuad( const RageVertex v[] ) { DrawQuads(v,4); } /* alias. upper-left, upper-right, lower-left, lower-right */ - virtual void DrawQuads( const RageVertex v[], int iNumVerts ) = 0; - virtual void DrawFan( const RageVertex v[], int iNumVerts ) = 0; - virtual void DrawStrip( const RageVertex v[], int iNumVerts ) = 0; - virtual void DrawTriangles( const RageVertex v[], int iNumVerts ) = 0; - virtual void DrawIndexedTriangles( const RageVertex v[], int iNumVerts, const Uint16* pIndices, int iNumIndices ) = 0; - virtual void DrawLineStrip( const RageVertex v[], int iNumVerts, float LineWidth ); + void DrawQuad( const RageSpriteVertex v[] ) { DrawQuads(v,4); } /* alias. upper-left, upper-right, lower-left, lower-right */ + virtual void DrawQuads( const RageSpriteVertex v[], int iNumVerts ) = 0; + virtual void DrawFan( const RageSpriteVertex v[], int iNumVerts ) = 0; + virtual void DrawStrip( const RageSpriteVertex v[], int iNumVerts ) = 0; + virtual void DrawTriangles( const RageSpriteVertex v[], int iNumVerts ) = 0; + virtual void DrawIndexedTriangles( const RageModelVertex v[], int iNumVerts, const Uint16* pIndices, int iNumIndices ) = 0; + virtual void DrawLineStrip( const RageSpriteVertex v[], int iNumVerts, float LineWidth ); - void DrawCircle( const RageVertex &v, float radius ); + void DrawCircle( const RageSpriteVertex &v, float radius ); virtual void SaveScreenshot( CString sPath ) = 0; @@ -192,7 +192,7 @@ protected: virtual void SetViewport(int shift_left, int shift_down) = 0; - void DrawPolyLine(const RageVertex &p1, const RageVertex &p2, float LineWidth ); + void DrawPolyLine(const RageSpriteVertex &p1, const RageSpriteVertex &p2, float LineWidth ); // Stuff in RageDisplay.cpp void SetDefaultRenderStates(); diff --git a/stepmania/src/RageDisplay_D3D.cpp b/stepmania/src/RageDisplay_D3D.cpp index b6d90d2333..73c7b55807 100644 --- a/stepmania/src/RageDisplay_D3D.cpp +++ b/stepmania/src/RageDisplay_D3D.cpp @@ -127,7 +127,8 @@ static void SetPalette( unsigned TexResource ) #endif } -#define D3DFVF_RAGEVERTEX (D3DFVF_XYZ|D3DFVF_NORMAL|D3DFVF_DIFFUSE|D3DFVF_TEX1) // D3D FVF flags which describe our vertex structure +#define D3DFVF_RageSpriteVertex (D3DFVF_XYZ|D3DFVF_NORMAL|D3DFVF_DIFFUSE|D3DFVF_TEX1) +#define D3DFVF_RageModelVertex (D3DFVF_XYZ|D3DFVF_NORMAL|D3DFVF_TEX1) static const PixelFormatDesc PIXEL_FORMAT_DESC[NUM_PIX_FORMATS] = { @@ -601,7 +602,7 @@ RageDisplay::VideoModeParams RageDisplay_D3D::GetVideoModeParams() const { retur g_pd3dDevice->SetTransform( D3DTS_WORLD, (D3DMATRIX*)&m ); -void RageDisplay_D3D::DrawQuads( const RageVertex v[], int iNumVerts ) +void RageDisplay_D3D::DrawQuads( const RageSpriteVertex v[], int iNumVerts ) { ASSERT( (iNumVerts%4) == 0 ); @@ -628,7 +629,7 @@ void RageDisplay_D3D::DrawQuads( const RageVertex v[], int iNumVerts ) vIndices[i*6+5] = i*4+0; } - g_pd3dDevice->SetVertexShader( D3DFVF_RAGEVERTEX ); + g_pd3dDevice->SetVertexShader( D3DFVF_RageSpriteVertex ); SEND_CURRENT_MATRICES; g_pd3dDevice->DrawIndexedPrimitiveUP( D3DPT_TRIANGLELIST, // PrimitiveType @@ -638,60 +639,60 @@ void RageDisplay_D3D::DrawQuads( const RageVertex v[], int iNumVerts ) &vIndices[0], // pIndexData, D3DFMT_INDEX16, // IndexDataFormat, v, // pVertexStreamZeroData, - sizeof(RageVertex) // VertexStreamZeroStride + sizeof(RageSpriteVertex) // VertexStreamZeroStride ); StatsAddVerts( iNumVerts ); } -void RageDisplay_D3D::DrawFan( const RageVertex v[], int iNumVerts ) +void RageDisplay_D3D::DrawFan( const RageSpriteVertex v[], int iNumVerts ) { ASSERT( iNumVerts >= 3 ); - g_pd3dDevice->SetVertexShader( D3DFVF_RAGEVERTEX ); + g_pd3dDevice->SetVertexShader( D3DFVF_RageSpriteVertex ); SEND_CURRENT_MATRICES; g_pd3dDevice->DrawPrimitiveUP( D3DPT_TRIANGLEFAN, // PrimitiveType iNumVerts-2, // PrimitiveCount, v, // pVertexStreamZeroData, - sizeof(RageVertex) + sizeof(RageSpriteVertex) ); StatsAddVerts( iNumVerts ); } -void RageDisplay_D3D::DrawStrip( const RageVertex v[], int iNumVerts ) +void RageDisplay_D3D::DrawStrip( const RageSpriteVertex v[], int iNumVerts ) { ASSERT( iNumVerts >= 3 ); - g_pd3dDevice->SetVertexShader( D3DFVF_RAGEVERTEX ); + g_pd3dDevice->SetVertexShader( D3DFVF_RageSpriteVertex ); SEND_CURRENT_MATRICES; g_pd3dDevice->DrawPrimitiveUP( D3DPT_TRIANGLESTRIP, // PrimitiveType iNumVerts-2, // PrimitiveCount, v, // pVertexStreamZeroData, - sizeof(RageVertex) + sizeof(RageSpriteVertex) ); StatsAddVerts( iNumVerts ); } -void RageDisplay_D3D::DrawTriangles( const RageVertex v[], int iNumVerts ) +void RageDisplay_D3D::DrawTriangles( const RageSpriteVertex v[], int iNumVerts ) { if( iNumVerts == 0 ) return; ASSERT( iNumVerts >= 3 ); - g_pd3dDevice->SetVertexShader( D3DFVF_RAGEVERTEX ); + g_pd3dDevice->SetVertexShader( D3DFVF_RageSpriteVertex ); SEND_CURRENT_MATRICES; g_pd3dDevice->DrawPrimitiveUP( D3DPT_TRIANGLELIST, // PrimitiveType iNumVerts/3, // PrimitiveCount, v, // pVertexStreamZeroData, - sizeof(RageVertex) + sizeof(RageSpriteVertex) ); StatsAddVerts( iNumVerts ); } -void RageDisplay_D3D::DrawIndexedTriangles( const RageVertex v[], int iNumVerts, const Uint16 pIndices[], int iNumIndices ) +void RageDisplay_D3D::DrawIndexedTriangles( const RageModelVertex v[], int iNumVerts, const Uint16 pIndices[], int iNumIndices ) { if( iNumIndices == 0 ) return; - g_pd3dDevice->SetVertexShader( D3DFVF_RAGEVERTEX ); + g_pd3dDevice->SetVertexShader( D3DFVF_RageModelVertex ); SEND_CURRENT_MATRICES; g_pd3dDevice->DrawIndexedPrimitiveUP( D3DPT_TRIANGLELIST, // PrimitiveType @@ -701,7 +702,7 @@ void RageDisplay_D3D::DrawIndexedTriangles( const RageVertex v[], int iNumVerts, pIndices, // pIndexData, D3DFMT_INDEX16, // IndexDataFormat, v, // pVertexStreamZeroData, - sizeof(RageVertex) // VertexStreamZeroStride + sizeof(RageModelVertex) // VertexStreamZeroStride ); StatsAddVerts( iNumIndices ); } @@ -709,17 +710,17 @@ void RageDisplay_D3D::DrawIndexedTriangles( const RageVertex v[], int iNumVerts, /* Use the default poly-based implementation. D3D lines apparently don't support * AA with greater-than-one widths. */ /* -void RageDisplay_D3D::DrawLineStrip( const RageVertex v[], int iNumVerts, float LineWidth ) +void RageDisplay_D3D::DrawLineStrip( const RageSpriteVertex v[], int iNumVerts, float LineWidth ) { ASSERT( iNumVerts >= 2 ); g_pd3dDevice->SetRenderState( D3DRS_POINTSIZE, *((DWORD*)&LineWidth) ); // funky cast. See D3DRENDERSTATETYPE doc - g_pd3dDevice->SetVertexShader( D3DFVF_RAGEVERTEX ); + g_pd3dDevice->SetVertexShader( D3DFVF_RageSpriteVertex ); SEND_CURRENT_MATRICES; g_pd3dDevice->DrawPrimitiveUP( D3DPT_LINESTRIP, // PrimitiveType iNumVerts-1, // PrimitiveCount, v, // pVertexStreamZeroData, - sizeof(RageVertex) + sizeof(RageSpriteVertex) ); StatsAddVerts( iNumVerts ); } diff --git a/stepmania/src/RageDisplay_D3D.h b/stepmania/src/RageDisplay_D3D.h index a694f9188d..bc33af33a3 100644 --- a/stepmania/src/RageDisplay_D3D.h +++ b/stepmania/src/RageDisplay_D3D.h @@ -55,12 +55,12 @@ public: RageColor specular, RageVector3 dir ); - void DrawQuads( const RageVertex v[], int iNumVerts ); - void DrawFan( const RageVertex v[], int iNumVerts ); - void DrawStrip( const RageVertex v[], int iNumVerts ); - void DrawTriangles( const RageVertex v[], int iNumVerts ); - void DrawIndexedTriangles( const RageVertex v[], int iNumVerts, const Uint16* pIndices, int iNumIndices ); -// void DrawLineStrip( const RageVertex v[], int iNumVerts, float LineWidth ); + void DrawQuads( const RageSpriteVertex v[], int iNumVerts ); + void DrawFan( const RageSpriteVertex v[], int iNumVerts ); + void DrawStrip( const RageSpriteVertex v[], int iNumVerts ); + void DrawTriangles( const RageSpriteVertex v[], int iNumVerts ); + void DrawIndexedTriangles( const RageModelVertex v[], int iNumVerts, const Uint16* pIndices, int iNumIndices ); +// void DrawLineStrip( const RageSpriteVertex v[], int iNumVerts, float LineWidth ); void SaveScreenshot( CString sPath ); protected: diff --git a/stepmania/src/RageDisplay_OGL.cpp b/stepmania/src/RageDisplay_OGL.cpp index 369fa84615..6880124e32 100644 --- a/stepmania/src/RageDisplay_OGL.cpp +++ b/stepmania/src/RageDisplay_OGL.cpp @@ -94,7 +94,7 @@ set g_glExts; /* We don't actually use normals (we don't tunr on lighting), there's just * no GL_T2F_C4F_V3F. */ -const GLenum RageVertexFormat = GL_T2F_C4F_N3F_V3F; +const GLenum RageSpriteVertexFormat = GL_T2F_C4F_N3F_V3F; LowLevelWindow *wind; @@ -605,7 +605,7 @@ void RageDisplay_OGL::SaveScreenshot( CString sPath ) RageDisplay::VideoModeParams RageDisplay_OGL::GetVideoModeParams() const { return wind->GetVideoModeParams(); } -static void SetupVertices( const RageVertex v[], int iNumVerts ) +static void SetupVertices( const RageSpriteVertex v[], int iNumVerts ) { static float *Vertex, *Texture, *Normal; static GLubyte *Color; @@ -651,7 +651,45 @@ static void SetupVertices( const RageVertex v[], int iNumVerts ) glNormalPointer(GL_FLOAT, 0, Normal); } -void RageDisplay_OGL::DrawQuads( const RageVertex v[], int iNumVerts ) +static void SetupVertices( const RageModelVertex v[], int iNumVerts ) +{ + static float *Vertex, *Texture, *Normal; + static int Size = 0; + if(iNumVerts > Size) + { + Size = iNumVerts; + delete [] Vertex; + delete [] Texture; + delete [] Normal; + Vertex = new float[Size*3]; + Texture = new float[Size*2]; + Normal = new float[Size*3]; + } + + for(unsigned i = 0; i < unsigned(iNumVerts); ++i) + { + Vertex[i*3+0] = v[i].p[0]; + Vertex[i*3+1] = v[i].p[1]; + Vertex[i*3+2] = v[i].p[2]; + Texture[i*2+0] = v[i].t[0]; + Texture[i*2+1] = v[i].t[1]; + Normal[i*3+0] = v[i].n[0]; + Normal[i*3+1] = v[i].n[1]; + Normal[i*3+2] = v[i].n[2]; + } + glEnableClientState(GL_VERTEX_ARRAY); + glVertexPointer(3, GL_FLOAT, 0, Vertex); + + glDisableClientState(GL_COLOR_ARRAY); + + glEnableClientState(GL_TEXTURE_COORD_ARRAY); + glTexCoordPointer(2, GL_FLOAT, 0, Texture); + + glEnableClientState(GL_NORMAL_ARRAY); + glNormalPointer(GL_FLOAT, 0, Normal); +} + +void RageDisplay_OGL::DrawQuads( const RageSpriteVertex v[], int iNumVerts ) { ASSERT( (iNumVerts%4) == 0 ); @@ -669,7 +707,7 @@ void RageDisplay_OGL::DrawQuads( const RageVertex v[], int iNumVerts ) StatsAddVerts( iNumVerts ); } -void RageDisplay_OGL::DrawFan( const RageVertex v[], int iNumVerts ) +void RageDisplay_OGL::DrawFan( const RageSpriteVertex v[], int iNumVerts ) { ASSERT( iNumVerts >= 3 ); glMatrixMode( GL_PROJECTION ); @@ -681,7 +719,7 @@ void RageDisplay_OGL::DrawFan( const RageVertex v[], int iNumVerts ) StatsAddVerts( iNumVerts ); } -void RageDisplay_OGL::DrawStrip( const RageVertex v[], int iNumVerts ) +void RageDisplay_OGL::DrawStrip( const RageSpriteVertex v[], int iNumVerts ) { ASSERT( iNumVerts >= 3 ); glMatrixMode( GL_PROJECTION ); @@ -693,7 +731,7 @@ void RageDisplay_OGL::DrawStrip( const RageVertex v[], int iNumVerts ) StatsAddVerts( iNumVerts ); } -void RageDisplay_OGL::DrawTriangles( const RageVertex v[], int iNumVerts ) +void RageDisplay_OGL::DrawTriangles( const RageSpriteVertex v[], int iNumVerts ) { if( iNumVerts == 0 ) return; @@ -707,7 +745,7 @@ void RageDisplay_OGL::DrawTriangles( const RageVertex v[], int iNumVerts ) StatsAddVerts( iNumVerts ); } -void RageDisplay_OGL::DrawIndexedTriangles( const RageVertex v[], int iNumVerts, const Uint16 pIndices[], int iNumIndices ) +void RageDisplay_OGL::DrawIndexedTriangles( const RageModelVertex v[], int iNumVerts, const Uint16 pIndices[], int iNumIndices ) { if( iNumIndices == 0 ) return; @@ -718,12 +756,12 @@ void RageDisplay_OGL::DrawIndexedTriangles( const RageVertex v[], int iNumVerts, glLoadMatrixf( (const float*)GetModelViewTop() ); SetupVertices( v, iNumVerts ); -// glInterleavedArrays( RageVertexFormat, sizeof(RageVertex), v ); +// glInterleavedArrays( RageSpriteVertexFormat, sizeof(RageSpriteVertex), v ); glDrawElements( GL_TRIANGLES, iNumIndices, GL_UNSIGNED_SHORT, pIndices ); StatsAddVerts( iNumIndices ); } -void RageDisplay_OGL::DrawLineStrip( const RageVertex v[], int iNumVerts, float LineWidth ) +void RageDisplay_OGL::DrawLineStrip( const RageSpriteVertex v[], int iNumVerts, float LineWidth ) { ASSERT( iNumVerts >= 2 ); @@ -795,9 +833,15 @@ void RageDisplay_OGL::DrawLineStrip( const RageVertex v[], int iNumVerts, float void RageDisplay_OGL::SetTexture( RageTexture* pTexture ) { - glEnable( GL_TEXTURE_2D ); - unsigned id = pTexture ? pTexture->GetTexHandle() : 0; - glBindTexture( GL_TEXTURE_2D, id ); + if( pTexture ) + { + glEnable( GL_TEXTURE_2D ); + glBindTexture( GL_TEXTURE_2D, pTexture->GetTexHandle() ); + } + else + { + glDisable( GL_TEXTURE_2D ); + } } void RageDisplay_OGL::SetTextureModeModulate() { diff --git a/stepmania/src/RageDisplay_OGL.h b/stepmania/src/RageDisplay_OGL.h index e62cc8a557..4759fda483 100644 --- a/stepmania/src/RageDisplay_OGL.h +++ b/stepmania/src/RageDisplay_OGL.h @@ -51,12 +51,12 @@ public: RageColor specular, RageVector3 dir ); - void DrawQuads( const RageVertex v[], int iNumVerts ); - void DrawFan( const RageVertex v[], int iNumVerts ); - void DrawStrip( const RageVertex v[], int iNumVerts ); - void DrawTriangles( const RageVertex v[], int iNumVerts ); - void DrawIndexedTriangles( const RageVertex v[], int iNumVerts, const Uint16* pIndices, int iNumIndices ); - void DrawLineStrip( const RageVertex v[], int iNumVerts, float LineWidth ); + void DrawQuads( const RageSpriteVertex v[], int iNumVerts ); + void DrawFan( const RageSpriteVertex v[], int iNumVerts ); + void DrawStrip( const RageSpriteVertex v[], int iNumVerts ); + void DrawTriangles( const RageSpriteVertex v[], int iNumVerts ); + void DrawIndexedTriangles( const RageModelVertex v[], int iNumVerts, const Uint16* pIndices, int iNumIndices ); + void DrawLineStrip( const RageSpriteVertex v[], int iNumVerts, float LineWidth ); CString GetTextureDiagnostics( unsigned id ) const; diff --git a/stepmania/src/RageSound.cpp b/stepmania/src/RageSound.cpp index 27b02d613f..0d11a1e6d2 100644 --- a/stepmania/src/RageSound.cpp +++ b/stepmania/src/RageSound.cpp @@ -182,6 +182,8 @@ bool RageSound::Load(CString sSoundFilePath, int precache) // Check for "loop" hint if( m_sFilePath.Find("loop") != -1 ) SetStopMode( M_LOOP ); + else + SetStopMode( M_STOP ); SoundReader_FileReader *NewSample = new RageSoundReader_LowLevel; diff --git a/stepmania/src/RageTypes.h b/stepmania/src/RageTypes.h index 7ecb14e96c..362d71d561 100644 --- a/stepmania/src/RageTypes.h +++ b/stepmania/src/RageTypes.h @@ -185,11 +185,12 @@ public: typedef Rect RectI; typedef Rect RectF; -// A structure for our custom vertex type. Note that these data structes have the same layout that D3D expects. -struct RageVertex +/* Structure for our custom vertex type. Note that these data structes + * have the same layout that D3D expects. */ +struct RageSpriteVertex // has color { /* Zero out by default. */ - RageVertex(): + RageSpriteVertex(): p(0,0,0), n(0,0,0), t(0,0) @@ -200,6 +201,19 @@ struct RageVertex RageVector2 t; // texture coordinates }; +struct RageModelVertex // doesn't have color. Relies on material color +{ + /* Zero out by default. */ + RageModelVertex(): + p(0,0,0), + n(0,0,0), + t(0,0) + { } + RageVector3 p; // position + RageVector3 n; // normal + RageVector2 t; // texture coordinates +}; + /* nonstandard extension used : nameless struct/union * It is, in fact, nonstandard. G++ 3.x can handle it. 2.95.x can not. XXX */ #if defined(_MSC_VER) diff --git a/stepmania/src/ScreenSandbox.cpp b/stepmania/src/ScreenSandbox.cpp index 7762f0d979..a08a75096c 100644 --- a/stepmania/src/ScreenSandbox.cpp +++ b/stepmania/src/ScreenSandbox.cpp @@ -24,33 +24,32 @@ ScreenSandbox::ScreenSandbox() : Screen("ScreenSandbox") { - m_quad1.StretchTo( RectI(SCREEN_LEFT, SCREEN_TOP, SCREEN_RIGHT, SCREEN_BOTTOM) ); - m_quad1.SetDiffuse( RageColor(0,0,1,1) ); - m_quad1.SetZ( 0 ); - m_quad1.SetUseZBuffer( true ); - this->AddChild( &m_quad1 ); +// m_quad1.StretchTo( RectI(SCREEN_LEFT, SCREEN_TOP, SCREEN_RIGHT, SCREEN_BOTTOM) ); +// m_quad1.SetDiffuse( RageColor(0,0,1,1) ); +// m_quad1.SetZ( 0 ); +// m_quad1.SetUseZBuffer( true ); +// this->AddChild( &m_quad1 ); - m_quad2.StretchTo( RectI(SCREEN_LEFT, SCREEN_TOP, SCREEN_RIGHT, SCREEN_BOTTOM) ); - m_quad2.SetDiffuse( RageColor(0,1,0,1) ); - m_quad2.SetZ( -1 ); - m_quad2.SetUseZBuffer( true ); - this->AddChild( &m_quad2 ); +// m_quad2.StretchTo( RectI(SCREEN_LEFT, SCREEN_TOP, SCREEN_RIGHT, SCREEN_BOTTOM) ); +// m_quad2.SetDiffuse( RageColor(0,1,0,1) ); +// m_quad2.SetZ( -1 ); +// m_quad2.SetUseZBuffer( true ); +// this->AddChild( &m_quad2 ); // m_sprite.Load( "C:\\stepmania\\stepmania\\RandomMovies\\cm301[1].avi" ); // m_sprite.SetXY( CENTER_X, CENTER_Y ); // this->AddChild( &m_sprite ); -// m_model.SetXY(CENTER_X, CENTER_Y); -// m_model.SetZoom(3); -// //m_model.SetZoomY(-1); -// m_model.LoadMilkshapeAscii( "Down Tap Note 4th.txt" ); -// m_model.LoadMilkshapeAsciiBones( "D:\\Dev\\ddrpc char hacking\\DDRPCRip\\models\\howtoplay.bones.txt" ); -// this->AddChild(&m_model); + m_model.LoadMilkshapeAscii( "C:\\stepmania\\stepmania\\Themes\\groove\\BGAnimations\\ScreenCaution background\\2 platforms and backbar.txt" ); + m_model.SetXY(CENTER_X, CENTER_Y); + m_model.SetZoom(15); + this->AddChild(&m_model); + m_model.AddRotationH( 90 ); // m_model.SetEffectSpin( RageVector3(0,90,90) ); - this->AddChild( &m_In ); +// this->AddChild( &m_In ); - this->AddChild( &m_Out ); +// this->AddChild( &m_Out ); } void ScreenSandbox::HandleScreenMessage( const ScreenMessage SM ) @@ -69,28 +68,28 @@ void ScreenSandbox::Update( float fDeltaTime ) void ScreenSandbox::DrawPrimitives() { -// DISPLAY->SetLighting( true ); -// DISPLAY->SetLightDirectional( -// 0, -// RageColor(0,0,0,0), -// RageColor(1,1,1,1), -// RageColor(0,0,0,1), -// RageVector3(0, -1, 0) ); + 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) ); Screen::DrawPrimitives(); -// DISPLAY->SetLightOff( 0 ); -// DISPLAY->SetLighting( false ); + DISPLAY->SetLightOff( 0 ); + DISPLAY->SetLighting( false ); } void ScreenSandbox::MenuLeft( PlayerNumber pn ) { - m_In.Load( THEME->GetPathToB("_menu in") ); - m_In.StartTransitioning(); +// m_In.Load( THEME->GetPathToB("_menu in") ); +// m_In.StartTransitioning(); } void ScreenSandbox::MenuRight( PlayerNumber pn ) { - m_Out.Load( THEME->GetPathToB("_menu out") ); - m_Out.StartTransitioning(); +// m_Out.Load( THEME->GetPathToB("_menu out") ); +// m_Out.StartTransitioning(); } diff --git a/stepmania/src/ScreenSandbox.h b/stepmania/src/ScreenSandbox.h index fa227882be..ad2475ab29 100644 --- a/stepmania/src/ScreenSandbox.h +++ b/stepmania/src/ScreenSandbox.h @@ -29,12 +29,12 @@ public: void MenuLeft( PlayerNumber pn ); void MenuRight( PlayerNumber pn ); -/// Model m_model; - Quad m_quad1; - Quad m_quad2; - Transition m_In; - Transition m_Out; - Sprite m_text; + Model m_model; +// Quad m_quad1; +// Quad m_quad2; +// Transition m_In; +// Transition m_Out; +// Sprite m_text; }; diff --git a/stepmania/src/ScreenTitleMenu.cpp b/stepmania/src/ScreenTitleMenu.cpp index f04cde0d8c..096b37801c 100644 --- a/stepmania/src/ScreenTitleMenu.cpp +++ b/stepmania/src/ScreenTitleMenu.cpp @@ -131,6 +131,9 @@ ScreenTitleMenu::ScreenTitleMenu() : Screen("ScreenTitleMenu") m_Out.Load( THEME->GetPathToB("ScreenTitleMenu out") ); this->AddChild( &m_Out ); + m_BeginOut.Load( THEME->GetPathToB("ScreenTitleMenu begin out") ); + this->AddChild( &m_BeginOut ); + SOUNDMAN->PlayOnceFromDir( ANNOUNCER->GetPathTo("title menu game name") ); @@ -152,6 +155,7 @@ ScreenTitleMenu::ScreenTitleMenu() : Screen("ScreenTitleMenu") this->MoveToTail( &m_In ); // put it in the back so it covers up the stuff we just added this->MoveToTail( &m_Out ); // put it in the back so it covers up the stuff we just added + this->MoveToTail( &m_BeginOut ); // put it in the back so it covers up the stuff we just added } ScreenTitleMenu::~ScreenTitleMenu() @@ -182,7 +186,7 @@ void ScreenTitleMenu::Input( const DeviceInput& DeviceI, const InputEventType ty case MENU_BUTTON_UP: if( PREFSMAN->m_iCoinMode != COIN_HOME ) break; - if( m_In.IsTransitioning() || m_Out.IsTransitioning() ) + if( m_In.IsTransitioning() || m_Out.IsTransitioning() || m_BeginOut.IsTransitioning() ) break; TimeToDemonstration.GetDeltaTime(); /* Reset the demonstration timer when a key is pressed. */ LoseFocus( m_Choice ); @@ -195,7 +199,7 @@ void ScreenTitleMenu::Input( const DeviceInput& DeviceI, const InputEventType ty case MENU_BUTTON_DOWN: if( PREFSMAN->m_iCoinMode != COIN_HOME ) break; - if( m_In.IsTransitioning() || m_Out.IsTransitioning() ) + if( m_In.IsTransitioning() || m_Out.IsTransitioning() || m_BeginOut.IsTransitioning() ) break; TimeToDemonstration.GetDeltaTime(); /* Reset the demonstration timer when a key is pressed. */ LoseFocus( m_Choice ); @@ -206,7 +210,7 @@ void ScreenTitleMenu::Input( const DeviceInput& DeviceI, const InputEventType ty GainFocus( m_Choice ); break; case MENU_BUTTON_BACK: - if( m_In.IsTransitioning() || m_Out.IsTransitioning() ) + if( m_In.IsTransitioning() || m_Out.IsTransitioning() || m_BeginOut.IsTransitioning() ) break; m_Out.StartTransitioning( SM_GoToAttractLoop ); break; @@ -232,8 +236,8 @@ void ScreenTitleMenu::Input( const DeviceInput& DeviceI, const InputEventType ty } if( Screen::JoinInput( DeviceI, type, GameI, MenuI, StyleI ) ) - if( !m_Out.IsTransitioning() ) - m_Out.StartTransitioning( SM_GoToNextScreen ); + if( !m_Out.IsTransitioning() && !m_BeginOut.IsTransitioning() ) + m_BeginOut.StartTransitioning( SM_GoToNextScreen ); } // detect codes diff --git a/stepmania/src/ScreenTitleMenu.h b/stepmania/src/ScreenTitleMenu.h index 736e79ce7d..c98cd8daf6 100644 --- a/stepmania/src/ScreenTitleMenu.h +++ b/stepmania/src/ScreenTitleMenu.h @@ -85,6 +85,7 @@ private: Transition m_In; Transition m_Out; + Transition m_BeginOut; }; diff --git a/stepmania/src/Sprite.cpp b/stepmania/src/Sprite.cpp index 5c48d779fc..421fac94b6 100644 --- a/stepmania/src/Sprite.cpp +++ b/stepmania/src/Sprite.cpp @@ -22,6 +22,7 @@ #include "RageDisplay.h" #include "GameConstantsAndTypes.h" #include "SDL_utils.h" +#include "StepMania.h" Sprite::Sprite() { @@ -252,7 +253,7 @@ void Sprite::Update( float fDelta ) } } -static void TexCoordsFromArray(RageVertex *v, const float *f) +static void TexCoordsFromArray(RageSpriteVertex *v, const float *f) { v[0].t = RageVector2( f[0], f[1] ); // top left v[1].t = RageVector2( f[2], f[3] ); // bottom left @@ -316,7 +317,7 @@ void Sprite::DrawPrimitives() - static RageVertex v[4]; + static RageSpriteVertex v[4]; v[0].p = RageVector3( croppedQuadVerticies.left, croppedQuadVerticies.top, 0 ); // top left v[1].p = RageVector3( croppedQuadVerticies.left, croppedQuadVerticies.bottom, 0 ); // bottom left v[2].p = RageVector3( croppedQuadVerticies.right, croppedQuadVerticies.bottom, 0 ); // bottom right @@ -592,3 +593,44 @@ bool Sprite::IsDiagonalBanner( int iWidth, int iHeight ) /* A diagonal banner is a square. Give a couple pixels of leeway. */ return iWidth >= 100 && abs(iWidth - iHeight) < 2; } + +inline CString GetParam( const CStringArray& sParams, int iIndex, int& iMaxIndexAccessed ) +{ + iMaxIndexAccessed = max( iIndex, iMaxIndexAccessed ); + if( iIndex < int(sParams.size()) ) + return sParams[iIndex]; + else + return ""; +} + +void Sprite::HandleCommand( const CStringArray &asTokens ) +{ + int iMaxIndexAccessed = 0; + +#define sParam(i) (GetParam(asTokens,i,iMaxIndexAccessed)) +#define fParam(i) ((float)atof(sParam(i))) +#define iParam(i) (atoi(sParam(i))) +#define bParam(i) (iParam(i)!=0) + + const CString& sName = asTokens[0]; + + // Commands that go in the tweening queue: + /* Add left/right/top/bottom for alpha if needed. */ + // Commands that take effect immediately (ignoring the tweening queue): + if( sName=="customtexturerect" ) SetCustomTextureRect( RectF(fParam(1),fParam(2),fParam(3),fParam(4)) ); + else if( sName=="texcoordvelocity" ) SetTexCoordVelocity( fParam(1),fParam(2) ); + else if( sName=="scaletoclipped" ) ScaleToClipped( fParam(1),fParam(2) ); + else + { + Actor::HandleCommand( asTokens ); + return; + } + + if( iMaxIndexAccessed != (int)asTokens.size()-1 ) + { + CString sError = ssprintf( "Actor::HandleCommand: Wrong number of parameters in command '%s'. Expected %d but there are %d.", join(",",asTokens).c_str(), iMaxIndexAccessed+1, (int)asTokens.size() ); + LOG->Warn( sError ); + if( DISPLAY->IsWindowed() ) + HOOKS->MessageBoxOK( sError ); + } +} diff --git a/stepmania/src/Sprite.h b/stepmania/src/Sprite.h index 86f00e3143..0d7b8c9a4c 100644 --- a/stepmania/src/Sprite.h +++ b/stepmania/src/Sprite.h @@ -56,6 +56,7 @@ public: void ScaleToClipped( float fWidth, float fHeight ); static bool IsDiagonalBanner( int iWidth, int iHeight ); + virtual void HandleCommand( const CStringArray &asTokens ); protected: virtual bool LoadFromTexture( RageTextureID ID ); diff --git a/stepmania/src/StepMania.dsp b/stepmania/src/StepMania.dsp index 2d0375910e..ec3bfb8647 100644 --- a/stepmania/src/StepMania.dsp +++ b/stepmania/src/StepMania.dsp @@ -1,5 +1,5 @@ # Microsoft Developer Studio Project File - Name="StepMania" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# Microsoft Developer Studio Generated Build File, Format Version 60000 # ** DO NOT EDIT ** # TARGTYPE "Win32 (x86) Application" 0x0101 @@ -61,10 +61,10 @@ LINK32=link.exe # SUBTRACT LINK32 /verbose /profile /pdb:none /incremental:no /nodefaultlib # Begin Special Build Tool IntDir=.\../Debug6 -TargetDir=\temp\stepmania +TargetDir=\stepmania\stepmania TargetName=StepMania-debug SOURCE="$(InputPath)" -PreLink_Cmds=disasm\verinc cl /Zl /nologo /c verstub.cpp /Fo$(IntDir)\ +PreLink_Cmds=disasm\verinc cl /Zl /nologo /c verstub.cpp /Fo$(IntDir)\ PostBuild_Cmds=disasm\mapconv $(IntDir)\$(TargetName).map $(TargetDir)\StepMania.vdi ia32.vdi # End Special Build Tool @@ -82,29 +82,29 @@ PostBuild_Cmds=disasm\mapconv $(IntDir)\$(TargetName).map $(TargetDir)\StepMania # PROP Intermediate_Dir "StepMania___Xbox_Debug___VC6" # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" -XBCP=xbecopy.exe -# ADD BASE XBCP /NOLOGO -# ADD XBCP /NOLOGO -XBE=imagebld.exe -# ADD BASE XBE /nologo /stack:0x10000 /debug -# ADD XBE /nologo /stack:0x10000 /debug +CPP=cl.exe +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /I "." /I "SDL-1.2.5\include" /I "SDL_image-1.2" /I "plib-1.6.0" /D "WIN32" /D "_XBOX" /D "_DEBUG" /Fr /YX"global.h" /FD /c +# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "." /I "SDL-1.2.5\include" /I "SDL_image-1.2" /I "plib-1.6.0" /D "WIN32" /D "_XBOX" /D "_DEBUG" /Fr /YX"global.h" /FD /c +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 $(intdir)\verstub.obj kernel32.lib shell32.lib user32.lib gdi32.lib advapi32.lib winmm.lib /nologo /pdb:"../debug6/StepMania-debug.pdb" /map /debug /machine:IX86 /nodefaultlib:"libcmtd.lib" /out:"../StepMania-debug.exe" # SUBTRACT BASE LINK32 /verbose /profile /pdb:none /incremental:no /nodefaultlib # ADD LINK32 $(intdir)\verstub.obj kernel32.lib shell32.lib user32.lib gdi32.lib advapi32.lib winmm.lib /nologo /pdb:"../debug6/StepMania-debug.pdb" /map /debug /machine:IX86 /nodefaultlib:"libcmtd.lib" /out:"../StepMania-debug.exe" # SUBTRACT LINK32 /verbose /profile /pdb:none /incremental:no /nodefaultlib -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -CPP=cl.exe -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /I "." /I "SDL-1.2.5\include" /I "SDL_image-1.2" /I "plib-1.6.0" /D "WIN32" /D "_XBOX" /D "_DEBUG" /Fr /YX"global.h" /FD /c -# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "." /I "SDL-1.2.5\include" /I "SDL_image-1.2" /I "plib-1.6.0" /D "WIN32" /D "_XBOX" /D "_DEBUG" /Fr /YX"global.h" /FD /c +XBE=imagebld.exe +# ADD BASE XBE /nologo /stack:0x10000 /debug +# ADD XBE /nologo /stack:0x10000 /debug +XBCP=xbecopy.exe +# ADD BASE XBCP /NOLOGO +# ADD XBCP /NOLOGO # Begin Special Build Tool IntDir=.\StepMania___Xbox_Debug___VC6 TargetDir=.\StepMania___Xbox_Debug___VC6 TargetName=StepMania SOURCE="$(InputPath)" -PreLink_Cmds=disasm\verinc cl /Zl /nologo /c verstub.cpp /Fo$(IntDir)\ +PreLink_Cmds=disasm\verinc cl /Zl /nologo /c verstub.cpp /Fo$(IntDir)\ PostBuild_Cmds=disasm\mapconv $(IntDir)\$(TargetName).map $(TargetDir)\StepMania.vdi ia32.vdi # End Special Build Tool @@ -141,10 +141,10 @@ LINK32=link.exe # SUBTRACT LINK32 /verbose /pdb:none # Begin Special Build Tool IntDir=.\../Release6 -TargetDir=\temp\stepmania +TargetDir=\stepmania\stepmania TargetName=StepMania SOURCE="$(InputPath)" -PreLink_Cmds=disasm\verinc cl /Zl /nologo /c verstub.cpp /Fo$(IntDir)\ +PreLink_Cmds=disasm\verinc cl /Zl /nologo /c verstub.cpp /Fo$(IntDir)\ PostBuild_Cmds=disasm\mapconv $(IntDir)\$(TargetName).map $(TargetDir)\StepMania.vdi ia32.vdi # End Special Build Tool @@ -2009,6 +2009,19 @@ SOURCE=.\ActorScroller.h # End Source File # Begin Source File +SOURCE=.\ActorUtil.cpp + +!IF "$(CFG)" == "StepMania - Win32 Debug" + +!ELSEIF "$(CFG)" == "StepMania - Xbox Debug" + +!ELSEIF "$(CFG)" == "StepMania - Win32 Release" + +!ENDIF + +# End Source File +# Begin Source File + SOURCE=.\ActorUtil.h # End Source File # Begin Source File diff --git a/stepmania/src/StepMania.vcproj b/stepmania/src/StepMania.vcproj index d02bed119a..fcfd07a199 100644 --- a/stepmania/src/StepMania.vcproj +++ b/stepmania/src/StepMania.vcproj @@ -1677,6 +1677,9 @@ cl /Zl /nologo /c verstub.cpp /Fo"$(IntDir)"\ + +