Skip to content

Commit

Permalink
Merge pull request #20 from SonolusHaniwa/develop
Browse files Browse the repository at this point in the history
Upte Split Line
  • Loading branch information
LittleYang0531 authored Mar 20, 2024
2 parents bdefc55 + 3d65c48 commit 9099072
Show file tree
Hide file tree
Showing 21 changed files with 118 additions and 86 deletions.
9 changes: 6 additions & 3 deletions convert.h
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ string fromSUS(string text) {
// }
while (tmp2[1].size() < 4) tmp2[1] = '0' + tmp2[1];
while (tmp3[0].size() < 2) tmp3[0] = '0' + tmp3[0];
while (tmp3[1].size() < 5) tmp3[1] += '0'; // upd: 解决部分 Ched 保存 HiSpeed 不会保留五位小数的问题 2024/01/13
while (tmp3[1].size() < 5) tmp3[1] = '0' + tmp3[1]; // upd: 解决部分 Ched 保存 HiSpeed 不会保留五位小数的问题 2024/01/13
exp[i] = tmp2[0] + "'" + tmp2[1] + ":" + tmp3[0] + "." + tmp3[1];
}
sort(exp.begin(), exp.end(), [](string a, string b){
Expand All @@ -400,7 +400,7 @@ string fromSUS(string text) {
int lines = atoi(tmp3[0].c_str()), types = atoi(tmp3[1].c_str());
if (currentSplitLine != 0) { // 分割线终点
// cout << currentSplitLine << " " << currentSplitLineType << endl;
if (currentSplitLine * 10 != lines || currentSplitLineType != types)
if (currentSplitLine * -1 != lines || currentSplitLineType != types)
throw runtime_error("Overlapped Split Line: " + exp[i]);
currentSplitLine = 0; currentSplitLineType = 0;
} else {
Expand Down Expand Up @@ -443,11 +443,12 @@ string fromSUS(string text) {
mainData.push_back({head, 0, 1, body});
continue;
}
for (int j = 0; j < body.size(); j += 2)
for (int j = 0; j < body.size(); j += 2) if (body.substr(j, 2) != "00")
mainData.push_back({head, j / 2, max(1, int(body.size()) / 2), body.substr(j, 2)});
}

// 音符排序
// cout << mainData.size() << endl;
sort(mainData.begin(), mainData.end(), [](
tuple<string, int, int, string> a,
tuple<string, int, int, string> b){
Expand All @@ -461,6 +462,8 @@ string fromSUS(string text) {
return a4 < b4;
});

// exit(0);

// 处理主数据
stringstream txt; map<double, vector<tuple<string, int, int, string> > > noteList[13][13];
for (int i = 0; i < mainData.size(); i++) {
Expand Down
Binary file modified dist/EngineData
Binary file not shown.
Binary file modified dist/EngineWatchData
Binary file not shown.
Binary file modified dist/SkinData
Binary file not shown.
Binary file modified dist/SkinTexture
Binary file not shown.
3 changes: 3 additions & 0 deletions engine/getSplitLine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,9 @@ SonolusApi getSplitLine(let id) {
{10600, setSplitLine({Sprites.SplitLine_10600})},
{10610, setSplitLine({Sprites.SplitLine_10610})},
{10620, setSplitLine({Sprites.SplitLine_10620})},
{10630, setSplitLine({Sprites.SplitLine_10630})},
{10631, setSplitLine({Sprites.SplitLine_10631})},
{10640, setSplitLine({Sprites.SplitLine_10640})},
}));
return VOID;
}
6 changes: 4 additions & 2 deletions engine/play/holdNotes/HoldEnd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,10 @@ class SiriusHoldEnd: public Archetype {
SonolusApi updateParallel() {
FUNCBEGIN
drawHoldEighth(Sprites.Hold, lane, enLane, TimeToScaledTime(stBeat), TimeToScaledTime(beat), isHolding);
IF (times.now > stBeat && times.now < beat) drawNormalNote(Sprites.HoldNote, lane, enLane, times.scaled); FI
IF (times.now > beat - appearTime) drawNormalNote(Sprites.HoldNote, lane, enLane, TimeToScaledTime(beat)); FI
IF (times.scaled > TimeToScaledTime(stBeat) && times.scaled < TimeToScaledTime(beat))
drawNormalNote(Sprites.HoldNote, lane, enLane, times.scaled); FI
IF (times.scaled > TimeToScaledTime(beat) - appearTime)
drawNormalNote(Sprites.HoldNote, lane, enLane, TimeToScaledTime(beat)); FI
return VOID;
}
};
8 changes: 5 additions & 3 deletions engine/play/holdNotes/ScratchHoldEnd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -128,9 +128,11 @@ class SiriusScratchHoldEnd: public Archetype {
SonolusApi updateParallel() {
FUNCBEGIN
drawHoldEighth(Sprites.Scratch, lane, enLane, TimeToScaledTime(stBeat), TimeToScaledTime(beat), isHolding);
IF (times.now > stBeat && times.now < beat) drawNormalNote(Sprites.ScratchNote, lane, enLane, times.scaled); FI
IF (times.now > beat - appearTime) drawNormalNote(Sprites.ScratchNote, scratchLane, scratchEnLane, TimeToScaledTime(beat)); FI
IF (times.now > beat - appearTime) {
IF (times.scaled > TimeToScaledTime(stBeat) && times.scaled < TimeToScaledTime(beat))
drawNormalNote(Sprites.ScratchNote, lane, enLane, times.scaled); FI
IF (times.scaled > TimeToScaledTime(beat) - appearTime)
drawNormalNote(Sprites.ScratchNote, scratchLane, scratchEnLane, TimeToScaledTime(beat)); FI
IF (times.scaled > TimeToScaledTime(beat) - appearTime) {
IF (scratchLength > 0) drawRightArrow(scratchLane, scratchEnLane, TimeToScaledTime(beat)); FI
IF (scratchLength < 0) drawLeftArrow(scratchLane, scratchEnLane, TimeToScaledTime(beat)); FI
IF (scratchLength == 0) drawArrow(scratchLane, scratchEnLane, TimeToScaledTime(beat)); FI
Expand Down
164 changes: 91 additions & 73 deletions engine/skins.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -460,79 +460,88 @@ class Sprites {
int SplitLine_10620 = 454;
int SplitLineTrans1_10620 = 455;
int SplitLineTrans2_10620 = 456;
int SplitLine_2 = 457;
int SplitLineTrans1_2 = 458;
int SplitLineTrans2_2 = 459;
int SplitLine_2010 = 460;
int SplitLineTrans1_2010 = 461;
int SplitLineTrans2_2010 = 462;
int SplitLine_2020 = 463;
int SplitLineTrans1_2020 = 464;
int SplitLineTrans2_2020 = 465;
int SplitLine_2030 = 466;
int SplitLineTrans1_2030 = 467;
int SplitLineTrans2_2030 = 468;
int SplitLine_2040a = 469;
int SplitLineTrans1_2040a = 470;
int SplitLineTrans2_2040a = 471;
int SplitLine_2040b = 472;
int SplitLineTrans1_2040b = 473;
int SplitLineTrans2_2040b = 474;
int SplitLine_2050 = 475;
int SplitLineTrans1_2050 = 476;
int SplitLineTrans2_2050 = 477;
int SplitLine_3 = 478;
int SplitLineTrans1_3 = 479;
int SplitLineTrans2_3 = 480;
int SplitLine_3010 = 481;
int SplitLineTrans1_3010 = 482;
int SplitLineTrans2_3010 = 483;
int SplitLine_3020 = 484;
int SplitLineTrans1_3020 = 485;
int SplitLineTrans2_3020 = 486;
int SplitLine_3030 = 487;
int SplitLineTrans1_3030 = 488;
int SplitLineTrans2_3030 = 489;
int SplitLine_3040 = 490;
int SplitLineTrans1_3040 = 491;
int SplitLineTrans2_3040 = 492;
int SplitLine_3050 = 493;
int SplitLineTrans1_3050 = 494;
int SplitLineTrans2_3050 = 495;
int SplitLine_4 = 496;
int SplitLineTrans1_4 = 497;
int SplitLineTrans2_4 = 498;
int SplitLine_4010 = 499;
int SplitLineTrans1_4010 = 500;
int SplitLineTrans2_4010 = 501;
int SplitLine_4020 = 502;
int SplitLineTrans1_4020 = 503;
int SplitLineTrans2_4020 = 504;
int SplitLine_4030 = 505;
int SplitLineTrans1_4030 = 506;
int SplitLineTrans2_4030 = 507;
int SplitLine_4040 = 508;
int SplitLineTrans1_4040 = 509;
int SplitLineTrans2_4040 = 510;
int SplitLine_4050 = 511;
int SplitLineTrans1_4050 = 512;
int SplitLineTrans2_4050 = 513;
int SplitLine_5 = 514;
int SplitLineTrans1_5 = 515;
int SplitLineTrans2_5 = 516;
int SplitLine_6 = 517;
int SplitLineTrans1_6 = 518;
int SplitLineTrans2_6 = 519;
int SplitLine_7 = 520;
int SplitLineTrans1_7 = 521;
int SplitLineTrans2_7 = 522;
int SplitLine_8 = 523;
int SplitLineTrans1_8 = 524;
int SplitLineTrans2_8 = 525;
int SplitLine_9 = 526;
int SplitLineTrans1_9 = 527;
int SplitLineTrans2_9 = 528;
int GridYellow = 529;
int SplitLine_10630 = 457;
int SplitLineTrans1_10630 = 458;
int SplitLineTrans2_10630 = 459;
int SplitLine_10631 = 460;
int SplitLineTrans1_10631 = 461;
int SplitLineTrans2_10631 = 462;
int SplitLine_10640 = 463;
int SplitLineTrans1_10640 = 464;
int SplitLineTrans2_10640 = 465;
int SplitLine_2 = 466;
int SplitLineTrans1_2 = 467;
int SplitLineTrans2_2 = 468;
int SplitLine_2010 = 469;
int SplitLineTrans1_2010 = 470;
int SplitLineTrans2_2010 = 471;
int SplitLine_2020 = 472;
int SplitLineTrans1_2020 = 473;
int SplitLineTrans2_2020 = 474;
int SplitLine_2030 = 475;
int SplitLineTrans1_2030 = 476;
int SplitLineTrans2_2030 = 477;
int SplitLine_2040a = 478;
int SplitLineTrans1_2040a = 479;
int SplitLineTrans2_2040a = 480;
int SplitLine_2040b = 481;
int SplitLineTrans1_2040b = 482;
int SplitLineTrans2_2040b = 483;
int SplitLine_2050 = 484;
int SplitLineTrans1_2050 = 485;
int SplitLineTrans2_2050 = 486;
int SplitLine_3 = 487;
int SplitLineTrans1_3 = 488;
int SplitLineTrans2_3 = 489;
int SplitLine_3010 = 490;
int SplitLineTrans1_3010 = 491;
int SplitLineTrans2_3010 = 492;
int SplitLine_3020 = 493;
int SplitLineTrans1_3020 = 494;
int SplitLineTrans2_3020 = 495;
int SplitLine_3030 = 496;
int SplitLineTrans1_3030 = 497;
int SplitLineTrans2_3030 = 498;
int SplitLine_3040 = 499;
int SplitLineTrans1_3040 = 500;
int SplitLineTrans2_3040 = 501;
int SplitLine_3050 = 502;
int SplitLineTrans1_3050 = 503;
int SplitLineTrans2_3050 = 504;
int SplitLine_4 = 505;
int SplitLineTrans1_4 = 506;
int SplitLineTrans2_4 = 507;
int SplitLine_4010 = 508;
int SplitLineTrans1_4010 = 509;
int SplitLineTrans2_4010 = 510;
int SplitLine_4020 = 511;
int SplitLineTrans1_4020 = 512;
int SplitLineTrans2_4020 = 513;
int SplitLine_4030 = 514;
int SplitLineTrans1_4030 = 515;
int SplitLineTrans2_4030 = 516;
int SplitLine_4040 = 517;
int SplitLineTrans1_4040 = 518;
int SplitLineTrans2_4040 = 519;
int SplitLine_4050 = 520;
int SplitLineTrans1_4050 = 521;
int SplitLineTrans2_4050 = 522;
int SplitLine_5 = 523;
int SplitLineTrans1_5 = 524;
int SplitLineTrans2_5 = 525;
int SplitLine_6 = 526;
int SplitLineTrans1_6 = 527;
int SplitLineTrans2_6 = 528;
int SplitLine_7 = 529;
int SplitLineTrans1_7 = 530;
int SplitLineTrans2_7 = 531;
int SplitLine_8 = 532;
int SplitLineTrans1_8 = 533;
int SplitLineTrans2_8 = 534;
int SplitLine_9 = 535;
int SplitLineTrans1_9 = 536;
int SplitLineTrans2_9 = 537;
int GridYellow = 538;
}Sprites;

auto skins = defineSkins<class Sprites>({
Expand Down Expand Up @@ -990,6 +999,15 @@ auto skins = defineSkins<class Sprites>({
{"Sirius Split Line #10620", Sprites.SplitLine_10620},
{"Sirius Split Line Transform 1 #10620", Sprites.SplitLineTrans1_10620},
{"Sirius Split Line Transform 2 #10620", Sprites.SplitLineTrans2_10620},
{"Sirius Split Line #10630", Sprites.SplitLine_10630},
{"Sirius Split Line Transform 1 #10630", Sprites.SplitLineTrans1_10630},
{"Sirius Split Line Transform 2 #10630", Sprites.SplitLineTrans2_10630},
{"Sirius Split Line #10631", Sprites.SplitLine_10631},
{"Sirius Split Line Transform 1 #10631", Sprites.SplitLineTrans1_10631},
{"Sirius Split Line Transform 2 #10631", Sprites.SplitLineTrans2_10631},
{"Sirius Split Line #10640", Sprites.SplitLine_10640},
{"Sirius Split Line Transform 1 #10640", Sprites.SplitLineTrans1_10640},
{"Sirius Split Line Transform 2 #10640", Sprites.SplitLineTrans2_10640},
{"Sirius Split Line #2", Sprites.SplitLine_2},
{"Sirius Split Line Transform 1 #2", Sprites.SplitLineTrans1_2},
{"Sirius Split Line Transform 2 #2", Sprites.SplitLineTrans2_2},
Expand Down
6 changes: 4 additions & 2 deletions engine/watch/holdNotes/HoldEnd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,10 @@
} ELSE {
drawHoldEighth(Sprites.Hold, lane, enLane, TimeToScaledTime(stBeat), TimeToScaledTime(beat), times.now > stBeat && times.now < beat);
} FI
IF (times.now > stBeat && times.now < beat) drawNormalNote(Sprites.HoldNote, lane, enLane, times.scaled); FI
IF (times.now > beat - appearTime) drawNormalNote(Sprites.HoldNote, lane, enLane, TimeToScaledTime(beat)); FI
IF (times.scaled > TimeToScaledTime(stBeat) && times.scaled < TimeToScaledTime(beat))
drawNormalNote(Sprites.HoldNote, lane, enLane, times.scaled); FI
IF (times.scaled > TimeToScaledTime(beat) - appearTime)
drawNormalNote(Sprites.HoldNote, lane, enLane, TimeToScaledTime(beat)); FI
return VOID;
}
};
8 changes: 5 additions & 3 deletions engine/watch/holdNotes/ScratchHoldEnd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -147,9 +147,11 @@
} ELSE {
drawHoldEighth(Sprites.Scratch, lane, enLane, TimeToScaledTime(stBeat), TimeToScaledTime(beat), stBeat <= times.now && times.now <= beat);
} FI
IF (times.now > stBeat && times.now < beat) drawNormalNote(Sprites.ScratchNote, lane, enLane, times.scaled); FI
IF (times.now > beat - appearTime) drawNormalNote(Sprites.ScratchNote, scratchLane, scratchEnLane, TimeToScaledTime(beat)); FI
IF (times.now > beat - appearTime) {
IF (times.scaled > TimeToScaledTime(stBeat) && times.scaled < TimeToScaledTime(beat))
drawNormalNote(Sprites.ScratchNote, lane, enLane, times.scaled); FI
IF (times.scaled > TimeToScaledTime(beat) - appearTime)
drawNormalNote(Sprites.ScratchNote, scratchLane, scratchEnLane, TimeToScaledTime(beat)); FI
IF (times.scaled > TimeToScaledTime(beat) - appearTime) {
IF (scratchLength > 0) drawRightArrow(scratchLane, scratchEnLane, TimeToScaledTime(beat)); FI
IF (scratchLength < 0) drawLeftArrow(scratchLane, scratchEnLane, TimeToScaledTime(beat)); FI
IF (scratchLength == 0) drawArrow(scratchLane, scratchEnLane, TimeToScaledTime(beat)); FI
Expand Down
Binary file modified main
Binary file not shown.
Binary file added skin/Sirius Split Line #10630.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added skin/Sirius Split Line #10631.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added skin/Sirius Split Line #10640.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added skin/Sirius Split Line Transform 1 #10630.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added skin/Sirius Split Line Transform 1 #10631.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added skin/Sirius Split Line Transform 1 #10640.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added skin/Sirius Split Line Transform 2 #10630.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added skin/Sirius Split Line Transform 2 #10631.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added skin/Sirius Split Line Transform 2 #10640.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 9099072

Please sign in to comment.