tweaks
This commit is contained in:
Alberto Ramos
2010-08-22 15:53:15 -06:00
parent ce94c8a041
commit 2e7bb5457c
4 changed files with 85 additions and 83 deletions
+12 -2
View File
@@ -8,6 +8,11 @@ Noteskin.bBlanks = {
["Roll Tail Inactive"] = true;
["Roll Tail Inactive"] = true;
}
Noteskin.PartsToRotate = {
--["elemenu"] = true|false;
["Roll Head Active"] = false;
["Roll Head Inactive"] = false;
}
Noteskin.ElementRedirs = {
--["element"] = "redirected_element";
["Hold Head Active"] = "Tap Note";
@@ -89,8 +94,13 @@ local function func()
local t = LoadActor(path)
t.BaseRotationX=Noteskin.BaseRotX[sButton]
t.BaseRotationY=Noteskin.BaseRotY[sButton]
local bRotate = Noteskin.PartsToRotate[ElementToLoad]
--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
end
+3
View File
@@ -97,6 +97,8 @@ void GhostArrowRow::DidTapNote( int iCol, TapNoteScore tns, bool bBright )
Message msg("ColumnJudgment");
msg.SetParam( "TapNoteScore", tns );
// This may be useful for popn styled judgment :) -DaisuMaster
msg.SetParam( "Column", iCol );
if( bBright )
msg.SetParam( "Bright", true );
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() );
Message msg("ColumnJudgment");
msg.SetParam( "HoldNoteScore", hns );
msg.SetParam( "Column", iCol );
if( bBright )
msg.SetParam( "Bright", true );
m_Ghost[iCol]->HandleMessage( msg );
+1 -3
View File
@@ -942,9 +942,7 @@ void NoteField::FadeToFail()
// 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::SetPressed( int iCol ) {
m_pCurDisplay->m_ReceptorArrowRow.SetPressed( iCol );
}
void NoteField::SetPressed( int 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::DidHoldNote( int iCol, HoldNoteScore score, bool bBright ) { m_pCurDisplay->m_GhostArrowRow.DidHoldNote( iCol, score, bBright ); }
+69 -78
View File
@@ -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
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() );
return false;
//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") )
{
// These don't have to be worried about here: the changes and stops were already added.
continue;
}
else if ( BeginsWith(sRowString, "|T") )
{
RString temp = sRowString.substr(2,sRowString.size()-3);
newTick = atoi(temp);
bTickChangeNeeded = true;
continue;
}
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.",
// sRowString.c_str() );
//return false;
continue;
}
LOG->UserLog( "Song file", sPath, "has illegal syntax \"%s\" which can't be in KIU complient files.",
sRowString.c_str() );
return false;
//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") )
{
// These don't have to be worried about here: the changes and stops were already added.
continue;
}
else if ( BeginsWith(sRowString, "|T") )
{
RString temp = sRowString.substr(2,sRowString.size()-3);
newTick = atoi(temp);
bTickChangeNeeded = true;
continue;
}
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.",
// sRowString.c_str() );
//return false;
continue;
}
// 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.
if( NoteRowString.size() != 13)
if (BeginsWith(NoteRowString, "|T") || BeginsWith(NoteRowString, "|B") ||
BeginsWith(NoteRowString, "|D") || BeginsWith(NoteRowString, "|E") )
{
if (BeginsWith(NoteRowString, "|T") || BeginsWith(NoteRowString, "|B") ||
BeginsWith(NoteRowString, "|D") || BeginsWith(NoteRowString, "|E") )
bDMRequired = true;
RString temp = NoteRowString.substr(2,NoteRowString.size()-3);
float numTemp = StringToFloat(temp);
if (BeginsWith(NoteRowString, "|T"))
{
bDMRequired = true;
RString temp = NoteRowString.substr(2,NoteRowString.size()-3);
float numTemp = StringToFloat(temp);
if (BeginsWith(NoteRowString, "|T"))
{
iTickCount = (int)numTemp;
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
iTickCount = (int)numTemp;
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
{
//ignore whatever else...
continue;
}
fCurBeat += 1.0f / iTickCount;