Added NoteColorMode ProgressOnBeatAtEnd

Almost the same as progress, but 4ths use the last frame rather than the first.
This lets rainbow and vivid from DDR be made properly.
This commit is contained in:
Flameshadowxeroshin
2018-01-16 22:06:32 -06:00
parent e509fffc62
commit 1c75c52614
2 changed files with 9 additions and 0 deletions
+8
View File
@@ -41,6 +41,7 @@ LuaXType( NotePart );
static const char *NoteColorTypeNames[] = {
"Denominator",
"Progress",
"ProgressOnBeatAtEnd"
};
XToString( NoteColorType );
StringToX( NoteColorType );
@@ -1331,6 +1332,13 @@ void NoteDisplay::DrawActor(const TapNote& tn, Actor* pActor, NotePart part,
color = float( BeatToNoteType( fBeat ) );
color = clamp( color, 0, (cache->m_iNoteColorCount[part]-1) );
break;
case NoteColorType_ProgressOnBeatAtEnd:
//if we're at the very beginning of the beat, it should be the last color.
if ( fBeat-int64_t(fBeat) == 0.0f ) {
color = float(cache->m_iNoteColorCount[part]-1);
break;
}
//otherwise, handle it the same as Progress.
case NoteColorType_Progress:
color = fmodf( ceilf( fBeat * cache->m_iNoteColorCount[part] ), (float)cache->m_iNoteColorCount[part] );
break;