From a1a68b5beb4f18a62d7e10f4a93a119298550faa Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Fri, 28 Nov 2003 23:27:12 +0000 Subject: [PATCH] fix tweening when switching receptor note skins --- stepmania/src/Actor.cpp | 7 +++++++ stepmania/src/Actor.h | 2 +- stepmania/src/GhostArrowRow.cpp | 13 +++++++++++++ stepmania/src/GhostArrowRow.h | 1 + stepmania/src/GrayArrowRow.cpp | 6 ++++++ stepmania/src/GrayArrowRow.h | 1 + stepmania/src/NoteField.cpp | 15 +++++++++++++++ stepmania/src/NoteField.h | 2 ++ 8 files changed, 46 insertions(+), 1 deletion(-) diff --git a/stepmania/src/Actor.cpp b/stepmania/src/Actor.cpp index 5377522a25..a666193191 100644 --- a/stepmania/src/Actor.cpp +++ b/stepmania/src/Actor.cpp @@ -952,3 +952,10 @@ void Actor::SetBlendMode( CString s ) else ASSERT(0); } +void Actor::CopyTweening( const Actor &from ) +{ + m_current = from.m_current; + m_start = from.m_start; + m_TweenStates = from.m_TweenStates; + m_TweenInfo = from.m_TweenInfo; +} diff --git a/stepmania/src/Actor.h b/stepmania/src/Actor.h index adae159353..b9199ef238 100644 --- a/stepmania/src/Actor.h +++ b/stepmania/src/Actor.h @@ -63,7 +63,7 @@ public: bool IsFirstUpdate(); virtual void Update( float fDeltaTime ); virtual void UpdateTweening( float fDeltaTime ); - + virtual void CopyTweening( const Actor &from ); CString m_sName, m_sID; diff --git a/stepmania/src/GhostArrowRow.cpp b/stepmania/src/GhostArrowRow.cpp index 431a79a209..2a08fc2a6b 100644 --- a/stepmania/src/GhostArrowRow.cpp +++ b/stepmania/src/GhostArrowRow.cpp @@ -125,3 +125,16 @@ void GhostArrowRow::DidTapMine( int iCol, TapNoteScore score ) { m_GhostMine[iCol].Step( score ); } + + +void GhostArrowRow::CopyTweening( const GhostArrowRow &from ) +{ + for( int c=0; cm_GhostArrowRow.CopyTweening( LastDisplay->m_GhostArrowRow ); + cur->m_GrayArrowRow.CopyTweening( LastDisplay->m_GrayArrowRow ); + } + + LastDisplay = cur; + } + cur->m_GrayArrowRow.Update( fDeltaTime ); cur->m_GhostArrowRow.Update( fDeltaTime ); diff --git a/stepmania/src/NoteField.h b/stepmania/src/NoteField.h index 47d639567d..951cc1cd9b 100644 --- a/stepmania/src/NoteField.h +++ b/stepmania/src/NoteField.h @@ -93,6 +93,8 @@ protected: NDMap m_BeatToNoteDisplays; + NoteDisplayCols *LastDisplay; + // used in MODE_EDIT Sprite m_sprBars; // 4 frames: Measure, 4th, 8th, 16th BitmapText m_textMeasureNumber;