Skip to content

Commit

Permalink
Update Split Line
Browse files Browse the repository at this point in the history
  • Loading branch information
LittleYang0531 committed Apr 26, 2024
1 parent 5585aba commit e76acf4
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 13 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
dist/*
!dist/thumbnail.jpg
!dist/banner.jpg
!dist/banner.jpg
main
12 changes: 6 additions & 6 deletions engine/play/SplitLine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class SplitLine: public Archetype {
defineImports(color);

SonolusApi spawnOrder() { return 1000 + beat - splitLineAnimationStart + appearTime; }
SonolusApi shouldSpawn() { return times.scaled > beat - splitLineAnimationStart; }
SonolusApi shouldSpawn() { return times.scaled > TimeToScaledTime(beat) - splitLineAnimationStart; }

SonolusApi preprocess() {
FUNCBEGIN
Expand All @@ -23,11 +23,11 @@ class SplitLine: public Archetype {
FUNCBEGIN
IF (split < 1 && split > 6) Return(0); FI
getSplitLine(color);
IF (times.scaled > endBeat) {
drawDisappearLine(times.scaled - endBeat, split);
IF (times.scaled > TimeToScaledTime(endBeat)) {
drawDisappearLine(times.scaled - TimeToScaledTime(endBeat), split);
} ELSE {
IF (times.scaled < beat) {
drawAppearLine(splitLineAnimationStart - beat + times.scaled, split);
IF (times.scaled < TimeToScaledTime(beat)) {
drawAppearLine(splitLineAnimationStart - TimeToScaledTime(beat) + times.scaled, split);
} ELSE {
drawSplitLine(split);
} FI
Expand All @@ -37,7 +37,7 @@ class SplitLine: public Archetype {

SonolusApi updateParallel() {
FUNCBEGIN
IF (times.scaled > endBeat + splitLineAnimationEnd) {
IF (times.now > TimeToScaledTime(endBeat) + splitLineAnimationEnd) {
EntityDespawn.set(0, 1);
} FI
return VOID;
Expand Down
12 changes: 6 additions & 6 deletions engine/watch/SplitLine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ class SplitLine: public Archetype {
defineImports(split);
defineImports(color);

SonolusApi spawnTime() { return beat - splitLineAnimationStart; }
SonolusApi despawnTime() { return endBeat + splitLineAnimationEnd; }
SonolusApi spawnTime() { return TimeToScaledTime(beat) - splitLineAnimationStart; }
SonolusApi despawnTime() { return TimeToScaledTime(endBeat) + splitLineAnimationEnd; }

SonolusApi preprocess() {
FUNCBEGIN
Expand All @@ -23,11 +23,11 @@ class SplitLine: public Archetype {
FUNCBEGIN
IF (split < 1 || split > 6) Return(0); FI
getSplitLine(color);
IF (times.scaled > endBeat) {
drawDisappearLine(times.scaled - endBeat, split);
IF (times.scaled > TimeToScaledTime(endBeat)) {
drawDisappearLine(times.scaled - TimeToScaledTime(endBeat), split);
} ELSE {
IF (times.scaled < beat) {
drawAppearLine(splitLineAnimationStart - beat + times.scaled, split);
IF (times.scaled < TimeToScaledTime(beat)) {
drawAppearLine(splitLineAnimationStart - TimeToScaledTime(beat) + times.scaled, split);
} ELSE {
drawSplitLine(split);
} FI
Expand Down
Binary file removed main
Binary file not shown.

0 comments on commit e76acf4

Please sign in to comment.