Merge branch '5_1-new' of https://github.com/stepmania/stepmania into 5_1-new

This commit is contained in:
ListenerJubatus
2018-01-18 19:20:01 -06:00
8 changed files with 22 additions and 4 deletions
Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

+5
View File
@@ -0,0 +1,5 @@
[Global]
FallbackNoteSkin=midi-solo
[NoteDisplay]
TapNoteNoteColorType=ProgressAlternate
+1 -1
View File
@@ -1,6 +1,6 @@
return Def.Sprite { return Def.Sprite {
Texture=NOTESKIN:GetPath( '_down', 'tap note' ); Texture=NOTESKIN:GetPath( '_down', 'tap note' );
Frames = Sprite.LinearFrames( 8, 1 ); Frames = Sprite.LinearFrames( 4, 1 );
InitCommand=cmd(setstate,2); InitCommand=cmd(setstate,2);
DrawTapNoteMessageCommand=function(self,parent) DrawTapNoteMessageCommand=function(self,parent)
parent:spin(); parent:spin();
Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

+3 -2
View File
@@ -3,6 +3,7 @@ FallbackNoteSkin=midi-note
[NoteDisplay] [NoteDisplay]
TapNoteAnimationIsVivid=0 TapNoteAnimationIsVivid=0
TapNoteNoteColorCount=4
DrawHoldHeadForTapsOnSameRow=0 DrawHoldHeadForTapsOnSameRow=0
TapNoteAnimationLength=4 TapNoteAnimationLength=4
TapAdditionAnimationLength=4 TapAdditionAnimationLength=4
@@ -29,10 +30,10 @@ FlipHoldBodyWhenReverse=1
TopHoldAnchorWhenReverse=1 TopHoldAnchorWhenReverse=1
TapNoteNoteColorTextureCoordSpacingX=0 TapNoteNoteColorTextureCoordSpacingX=0
TapNoteNoteColorTextureCoordSpacingY=0.125 TapNoteNoteColorTextureCoordSpacingY=0.25
TapFakeNoteColorTextureCoordSpacingX=0 TapFakeNoteColorTextureCoordSpacingX=0
TapFakeNoteColorTextureCoordSpacingY=0.125 TapFakeNoteColorTextureCoordSpacingY=0.25
HoldHeadNoteColorTextureCoordSpacingX=0 HoldHeadNoteColorTextureCoordSpacingX=0
HoldHeadNoteColorTextureCoordSpacingY=0 HoldHeadNoteColorTextureCoordSpacingY=0
+11
View File
@@ -41,6 +41,7 @@ LuaXType( NotePart );
static const char *NoteColorTypeNames[] = { static const char *NoteColorTypeNames[] = {
"Denominator", "Denominator",
"Progress", "Progress",
"ProgressAlternate"
}; };
XToString( NoteColorType ); XToString( NoteColorType );
StringToX( NoteColorType ); StringToX( NoteColorType );
@@ -1325,6 +1326,8 @@ void NoteDisplay::DrawActor(const TapNote& tn, Actor* pActor, NotePart part,
{ {
DISPLAY->TexturePushMatrix(); DISPLAY->TexturePushMatrix();
float color = 0.0f; float color = 0.0f;
//this is only used for ProgressAlternate but must be declared here
float fScaledBeat = 0.0f;
switch( cache->m_NoteColorType[part] ) switch( cache->m_NoteColorType[part] )
{ {
case NoteColorType_Denominator: case NoteColorType_Denominator:
@@ -1334,6 +1337,14 @@ void NoteDisplay::DrawActor(const TapNote& tn, Actor* pActor, NotePart part,
case NoteColorType_Progress: case NoteColorType_Progress:
color = fmodf( ceilf( fBeat * cache->m_iNoteColorCount[part] ), (float)cache->m_iNoteColorCount[part] ); color = fmodf( ceilf( fBeat * cache->m_iNoteColorCount[part] ), (float)cache->m_iNoteColorCount[part] );
break; break;
case NoteColorType_ProgressAlternate:
fScaledBeat = fBeat * cache->m_iNoteColorCount[part];
if( fScaledBeat - int64_t(fScaledBeat) == 0.0f )
//we're on a boundary, so move to the previous frame.
//doing it this way ensures that fScaledBeat is never negative so fmodf works.
fScaledBeat += cache->m_iNoteColorCount[part] - 1;
color = fmodf( ceilf( fScaledBeat ), (float)cache->m_iNoteColorCount[part] );
break;
default: default:
FAIL_M(ssprintf("Invalid NoteColorType: %i", cache->m_NoteColorType[part])); FAIL_M(ssprintf("Invalid NoteColorType: %i", cache->m_NoteColorType[part]));
} }
+1
View File
@@ -36,6 +36,7 @@ enum NoteColorType
{ {
NoteColorType_Denominator, /**< Color by note type. */ NoteColorType_Denominator, /**< Color by note type. */
NoteColorType_Progress, /**< Color by progress. */ NoteColorType_Progress, /**< Color by progress. */
NoteColorType_ProgressAlternate, /**< Color by progress, except the frame boundaries are slightly later. */
NUM_NoteColorType, NUM_NoteColorType,
NoteColorType_Invalid NoteColorType_Invalid
}; };