cleanup
tweaks
This commit is contained in:
@@ -8,6 +8,11 @@ Noteskin.bBlanks = {
|
|||||||
["Roll Tail Inactive"] = true;
|
["Roll Tail Inactive"] = true;
|
||||||
["Roll Tail Inactive"] = true;
|
["Roll Tail Inactive"] = true;
|
||||||
}
|
}
|
||||||
|
Noteskin.PartsToRotate = {
|
||||||
|
--["elemenu"] = true|false;
|
||||||
|
["Roll Head Active"] = false;
|
||||||
|
["Roll Head Inactive"] = false;
|
||||||
|
}
|
||||||
Noteskin.ElementRedirs = {
|
Noteskin.ElementRedirs = {
|
||||||
--["element"] = "redirected_element";
|
--["element"] = "redirected_element";
|
||||||
["Hold Head Active"] = "Tap Note";
|
["Hold Head Active"] = "Tap Note";
|
||||||
@@ -89,8 +94,13 @@ local function func()
|
|||||||
|
|
||||||
local t = LoadActor(path)
|
local t = LoadActor(path)
|
||||||
|
|
||||||
t.BaseRotationX=Noteskin.BaseRotX[sButton]
|
local bRotate = Noteskin.PartsToRotate[ElementToLoad]
|
||||||
t.BaseRotationY=Noteskin.BaseRotY[sButton]
|
--rotate by default
|
||||||
|
if bRotate == nil then bRotate = true end
|
||||||
|
if bRotate then
|
||||||
|
t.BaseRotationX=Noteskin.BaseRotX[sButton]
|
||||||
|
t.BaseRotationY=Noteskin.BaseRotY[sButton]
|
||||||
|
end
|
||||||
|
|
||||||
return t
|
return t
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -97,6 +97,8 @@ void GhostArrowRow::DidTapNote( int iCol, TapNoteScore tns, bool bBright )
|
|||||||
|
|
||||||
Message msg("ColumnJudgment");
|
Message msg("ColumnJudgment");
|
||||||
msg.SetParam( "TapNoteScore", tns );
|
msg.SetParam( "TapNoteScore", tns );
|
||||||
|
// This may be useful for popn styled judgment :) -DaisuMaster
|
||||||
|
msg.SetParam( "Column", iCol );
|
||||||
if( bBright )
|
if( bBright )
|
||||||
msg.SetParam( "Bright", true );
|
msg.SetParam( "Bright", true );
|
||||||
m_Ghost[iCol]->HandleMessage( msg );
|
m_Ghost[iCol]->HandleMessage( msg );
|
||||||
@@ -115,6 +117,7 @@ void GhostArrowRow::DidHoldNote( int iCol, HoldNoteScore hns, bool bBright )
|
|||||||
ASSERT( iCol >= 0 && iCol < (int) m_Ghost.size() );
|
ASSERT( iCol >= 0 && iCol < (int) m_Ghost.size() );
|
||||||
Message msg("ColumnJudgment");
|
Message msg("ColumnJudgment");
|
||||||
msg.SetParam( "HoldNoteScore", hns );
|
msg.SetParam( "HoldNoteScore", hns );
|
||||||
|
msg.SetParam( "Column", iCol );
|
||||||
if( bBright )
|
if( bBright )
|
||||||
msg.SetParam( "Bright", true );
|
msg.SetParam( "Bright", true );
|
||||||
m_Ghost[iCol]->HandleMessage( msg );
|
m_Ghost[iCol]->HandleMessage( msg );
|
||||||
|
|||||||
+1
-3
@@ -942,9 +942,7 @@ void NoteField::FadeToFail()
|
|||||||
// don't fade all over again if this is called twice
|
// don't fade all over again if this is called twice
|
||||||
}
|
}
|
||||||
void NoteField::Step( int iCol, TapNoteScore score ) { m_pCurDisplay->m_ReceptorArrowRow.Step( iCol, score ); }
|
void NoteField::Step( int iCol, TapNoteScore score ) { m_pCurDisplay->m_ReceptorArrowRow.Step( iCol, score ); }
|
||||||
void NoteField::SetPressed( int iCol ) {
|
void NoteField::SetPressed( int iCol ) { m_pCurDisplay->m_ReceptorArrowRow.SetPressed( iCol ); }
|
||||||
m_pCurDisplay->m_ReceptorArrowRow.SetPressed( iCol );
|
|
||||||
}
|
|
||||||
void NoteField::DidTapNote( int iCol, TapNoteScore score, bool bBright ) { m_pCurDisplay->m_GhostArrowRow.DidTapNote( iCol, score, bBright ); }
|
void NoteField::DidTapNote( int iCol, TapNoteScore score, bool bBright ) { m_pCurDisplay->m_GhostArrowRow.DidTapNote( iCol, score, bBright ); }
|
||||||
void NoteField::DidHoldNote( int iCol, HoldNoteScore score, bool bBright ) { m_pCurDisplay->m_GhostArrowRow.DidHoldNote( iCol, score, bBright ); }
|
void NoteField::DidHoldNote( int iCol, HoldNoteScore score, bool bBright ) { m_pCurDisplay->m_GhostArrowRow.DidHoldNote( iCol, score, bBright ); }
|
||||||
|
|
||||||
|
|||||||
+68
-77
@@ -220,36 +220,34 @@ static bool LoadFromKSFFile( const RString &sPath, Steps &out, const Song &song,
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Why do this? Rows made with precise DM05 tags can go up to 13 too -DaisuMaster
|
// Why do this? Rows made with precise DM05 tags can go up to 13 too -DaisuMaster
|
||||||
if( sRowString.size() != 13 )
|
//if( sRowString.size() != 13 )
|
||||||
|
if( bKIUCompliant )
|
||||||
{
|
{
|
||||||
if( bKIUCompliant )
|
LOG->UserLog( "Song file", sPath, "has illegal syntax \"%s\" which can't be in KIU complient files.",
|
||||||
{
|
sRowString.c_str() );
|
||||||
LOG->UserLog( "Song file", sPath, "has illegal syntax \"%s\" which can't be in KIU complient files.",
|
return false;
|
||||||
sRowString.c_str() );
|
//In other words: you can't mix ksf's with DM05 tags and ksf's without any DM05 tags
|
||||||
return false;
|
//Either one set or another will be read...
|
||||||
//In other words: you can't mix ksf's with DM05 tags and ksf's without any DM05 tags
|
}
|
||||||
//Either one set or another will be read...
|
if( BeginsWith(sRowString, "|B") || BeginsWith(sRowString, "|D") || BeginsWith(sRowString, "|E") )
|
||||||
}
|
{
|
||||||
if( BeginsWith(sRowString, "|B") || BeginsWith(sRowString, "|D") || BeginsWith(sRowString, "|E") )
|
// These don't have to be worried about here: the changes and stops were already added.
|
||||||
{
|
continue;
|
||||||
// These don't have to be worried about here: the changes and stops were already added.
|
}
|
||||||
continue;
|
else if ( BeginsWith(sRowString, "|T") )
|
||||||
}
|
{
|
||||||
else if ( BeginsWith(sRowString, "|T") )
|
RString temp = sRowString.substr(2,sRowString.size()-3);
|
||||||
{
|
newTick = atoi(temp);
|
||||||
RString temp = sRowString.substr(2,sRowString.size()-3);
|
bTickChangeNeeded = true;
|
||||||
newTick = atoi(temp);
|
continue;
|
||||||
bTickChangeNeeded = true;
|
}
|
||||||
continue;
|
else
|
||||||
}
|
{
|
||||||
else
|
// Is this why improper ksf or some kiucompilant ksf mixed with dm05 ksf are ignored?? -DaisuMaster
|
||||||
{
|
//LOG->UserLog( "Song file", sPath, "has a RowString with an improper length \"%s\"; corrupt notes ignored.",
|
||||||
// Is this why improper ksf or some kiucompilant ksf mixed with dm05 ksf are ignored?? -DaisuMaster
|
// sRowString.c_str() );
|
||||||
//LOG->UserLog( "Song file", sPath, "has a RowString with an improper length \"%s\"; corrupt notes ignored.",
|
//return false;
|
||||||
// sRowString.c_str() );
|
continue;
|
||||||
//return false;
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Half-doubles is offset; "0011111100000".
|
// Half-doubles is offset; "0011111100000".
|
||||||
@@ -555,59 +553,52 @@ static bool LoadGlobalData( const RString &sPath, Song &out, bool &bKIUCompliant
|
|||||||
}
|
}
|
||||||
|
|
||||||
// This is where the DMRequired test will take place.
|
// This is where the DMRequired test will take place.
|
||||||
if( NoteRowString.size() != 13)
|
if (BeginsWith(NoteRowString, "|T") || BeginsWith(NoteRowString, "|B") ||
|
||||||
|
BeginsWith(NoteRowString, "|D") || BeginsWith(NoteRowString, "|E") )
|
||||||
{
|
{
|
||||||
if (BeginsWith(NoteRowString, "|T") || BeginsWith(NoteRowString, "|B") ||
|
bDMRequired = true;
|
||||||
BeginsWith(NoteRowString, "|D") || BeginsWith(NoteRowString, "|E") )
|
RString temp = NoteRowString.substr(2,NoteRowString.size()-3);
|
||||||
|
float numTemp = StringToFloat(temp);
|
||||||
|
if (BeginsWith(NoteRowString, "|T"))
|
||||||
{
|
{
|
||||||
bDMRequired = true;
|
iTickCount = (int)numTemp;
|
||||||
RString temp = NoteRowString.substr(2,NoteRowString.size()-3);
|
TimeSignatureSegment seg;
|
||||||
float numTemp = StringToFloat(temp);
|
seg.m_iStartRow = BeatToNoteRow(fCurBeat);
|
||||||
if (BeginsWith(NoteRowString, "|T"))
|
seg.m_iNumerator = iTickCount > ROWS_PER_BEAT ? ROWS_PER_BEAT : iTickCount;
|
||||||
{
|
seg.m_iDenominator = 4;
|
||||||
iTickCount = (int)numTemp;
|
out.m_Timing.AddTimeSignatureSegment( seg );
|
||||||
TimeSignatureSegment seg;
|
|
||||||
seg.m_iStartRow = BeatToNoteRow(fCurBeat);
|
|
||||||
seg.m_iNumerator = iTickCount > ROWS_PER_BEAT ? ROWS_PER_BEAT : iTickCount;
|
|
||||||
seg.m_iDenominator = 4;
|
|
||||||
out.m_Timing.AddTimeSignatureSegment( seg );
|
|
||||||
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
else if (BeginsWith(NoteRowString, "|B"))
|
|
||||||
{
|
|
||||||
float fCurBpm = (float)numTemp;
|
|
||||||
//out.m_Timing.AddBPMSegment( BPMSegment( BeatToNoteRow(fCurBeat), (float)numTemp ) );
|
|
||||||
out.m_Timing.SetBPMAtBeat( fCurBeat, fCurBpm );
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
else if (BeginsWith(NoteRowString, "|E"))
|
|
||||||
{
|
|
||||||
//Finally! the |E| tag is working as it should. I can die happy now -DaisuMaster
|
|
||||||
bool bDelay = true;
|
|
||||||
float fCurDelay = 60 / out.m_Timing.GetBPMAtBeat(fCurBeat) * (float)numTemp / iTickCount;
|
|
||||||
fCurDelay += out.m_Timing.GetStopAtRow(BeatToNoteRow(fCurBeat), bDelay);
|
|
||||||
out.m_Timing.SetStopAtBeat( fCurBeat, fCurDelay, true );
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
else if (BeginsWith(NoteRowString, "|D"))
|
|
||||||
{
|
|
||||||
bool bDelay = true;
|
|
||||||
float fCurDelay = out.m_Timing.GetStopAtRow(BeatToNoteRow(fCurBeat), bDelay);
|
|
||||||
fCurDelay += (float)numTemp / 1000;
|
|
||||||
out.m_Timing.SetStopAtBeat( fCurBeat, fCurDelay, true );
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
// Quit while we're ahead if any bad syntax is spotted.
|
|
||||||
//LOG->UserLog( "Song file", sPath, "has an invalid RowString \"%s\".",
|
|
||||||
// NoteRowString.c_str() );
|
|
||||||
//return false;
|
|
||||||
//how about no? :D -DaisuMaster
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
else if (BeginsWith(NoteRowString, "|B"))
|
||||||
|
{
|
||||||
|
float fCurBpm = (float)numTemp;
|
||||||
|
//out.m_Timing.AddBPMSegment( BPMSegment( BeatToNoteRow(fCurBeat), (float)numTemp ) );
|
||||||
|
out.m_Timing.SetBPMAtBeat( fCurBeat, fCurBpm );
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
else if (BeginsWith(NoteRowString, "|E"))
|
||||||
|
{
|
||||||
|
//Finally! the |E| tag is working as it should. I can die happy now -DaisuMaster
|
||||||
|
bool bDelay = true;
|
||||||
|
float fCurDelay = 60 / out.m_Timing.GetBPMAtBeat(fCurBeat) * (float)numTemp / iTickCount;
|
||||||
|
fCurDelay += out.m_Timing.GetStopAtRow(BeatToNoteRow(fCurBeat), bDelay);
|
||||||
|
out.m_Timing.SetStopAtBeat( fCurBeat, fCurDelay, true );
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
else if (BeginsWith(NoteRowString, "|D"))
|
||||||
|
{
|
||||||
|
bool bDelay = true;
|
||||||
|
float fCurDelay = out.m_Timing.GetStopAtRow(BeatToNoteRow(fCurBeat), bDelay);
|
||||||
|
fCurDelay += (float)numTemp / 1000;
|
||||||
|
out.m_Timing.SetStopAtBeat( fCurBeat, fCurDelay, true );
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
//ignore whatever else...
|
||||||
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
fCurBeat += 1.0f / iTickCount;
|
fCurBeat += 1.0f / iTickCount;
|
||||||
|
|||||||
Reference in New Issue
Block a user