Skip to content

Commit

Permalink
Add: Fallback Skin Sprite & Change Scheduled SFX Time
Browse files Browse the repository at this point in the history
  • Loading branch information
LittleYang0531 committed Sep 9, 2024
1 parent b9f558d commit c4ae482
Show file tree
Hide file tree
Showing 18 changed files with 167 additions and 53 deletions.
5 changes: 3 additions & 2 deletions engine/constants.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ double holdBodyRatio = 989.0 / 1950.0;
double hlHoldHeadRatio = 1062.0 / 97.0;
double hlHoldBodyRatio = 1062.0 / 1951.0;
double hlHoldOffset = 1062.0 / 49.0;
double fallBackNoteRatio = 8;
double judgeDistanceLimit = baseNoteWidth * 0.875;
double effectDurationTime = 0.4;
double effectWidth = baseNoteWidth * 0.75;
Expand All @@ -36,7 +37,7 @@ double timeBarHeight = 0.01;
double timeMagic = 1.875;
double judgelineIdTextHeight = 0.05;
double tipRatio = 2015.0 / 157.0;
double scheduledSFXTime = 0.3;
double scheduledSFXTime = 0.5;

#if play || watch
let strictMode = LevelOption.get(Options.StrictMode);
Expand All @@ -45,7 +46,7 @@ let levelSpeed = LevelOption.get(Options.LevelSpeed);
let noteWidth2 = baseNoteWidth * LevelOption.get(Options.NoteSize);
let hasSFX = LevelOption.get(Options.HasSFX);
let hasSimul = LevelOption.get(Options.HasSimul);
let hasIndicator = LevelOption.get(Options.HasIndicator);
let hasIndicator = LevelOption.get(Options.HasIndicator) && HasSkinSprite(Sprites.AllPerfectJudgeline) && HasSkinSprite(Sprites.FullComboJudgeline);
let background = LevelOption.get(Options.Background);
let sonolusPause = LevelOption.get(Options.SystemPause);
let sonolusCombo = LevelOption.get(Options.SystemCombo);
Expand Down
8 changes: 4 additions & 4 deletions engine/play/StageController.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@ class StageController: public Archetype {
let screenR = 10000;
let screenT = 10000;
let screenB = -10000;
Draw(Sprites.Blocker, screenL, screenB, screenL, screenT, stage.l, screenT, stage.l, screenB, 20000, 1);
Draw(Sprites.Blocker, stage.r, screenB, stage.r, screenT, screenR, screenT, screenR, screenB, 20000, 1);
Draw(Sprites.Blocker, screenL, screenB, screenL, stage.b, screenR, stage.b, screenR, screenB, 20000, 1);
Draw(Sprites.Blocker, screenL, stage.t, screenL, screenT, screenR, screenT, screenR, stage.t, 20000, 1);
Draw(Sprites.Blocker, screenL, screenB, screenL, screenT, stage.l, screenT, stage.l, screenB, 20000000, 1);
Draw(Sprites.Blocker, stage.r, screenB, stage.r, screenT, screenR, screenT, screenR, screenB, 20000000, 1);
Draw(Sprites.Blocker, screenL, screenB, screenL, stage.b, screenR, stage.b, screenR, screenB, 20000000, 1);
Draw(Sprites.Blocker, screenL, stage.t, screenL, screenT, screenR, screenT, screenR, stage.t, 20000000, 1);

var numberDistance = 0.0068 * stage.h;
IF (combo > 2 && !sonolusCombo && HasSkinSprite(Sprites.ComboText) && HasSkinSprite(Sprites.Combo0)) {
Expand Down
18 changes: 15 additions & 3 deletions engine/play/notes/DragNote.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -135,9 +135,21 @@ class DragNote: public Archetype {
var x = r * Cos(newAngle) + line.get(1), y = r * Sin(newAngle) + line.get(2);
var x0 = dx * Cos(rotate) + line.get(1), y0 = dx * Sin(rotate) + line.get(2);

var vec1Length = noteWidth * size * If(isMulti, 1089.0 / 989.0, 1), vec1X = vec1Length * Cos(rotate), vec1Y = vec1Length * Sin(rotate);
var sprite = If(
HasSkinSprite(Sprites.NormalDrag),
If(isMulti, Sprites.HLDrag, Sprites.NormalDrag),
Sprites.FallbackNormalDrag
);
var ratio = If(
HasSkinSprite(Sprites.NormalDrag),
If(isMulti, hlDragRatio, dragRatio),
fallBackNoteRatio
);
var vec1Length = noteWidth * size
/ If(isMulti && HasSkinSprite(Sprites.NormalDrag), 1, 1)
* If(HasSkinSprite(Sprites.NormalDrag), 1, 0.5), vec1X = vec1Length * Cos(rotate), vec1Y = vec1Length * Sin(rotate);
var x1 = x - vec1X, y1 = y - vec1Y, x2 = x + vec1X, y2 = y + vec1Y;
var vec2Length = noteWidth * size * If(isMulti, 1089.0 / 989.0, 1) / If(isMulti, hlDragRatio, dragRatio);
var vec2Length = vec1Length / ratio;
var vec2X = vec2Length * Cos(rotate + PI / 2), vec2Y = vec2Length * Sin(rotate + PI / 2);
var x3 = x1 - vec2X, y3 = y1 - vec2Y;
var x4 = x1 + vec2X, y4 = y1 + vec2Y;
Expand All @@ -149,7 +161,7 @@ class DragNote: public Archetype {
effectX3 = x0 + effectWidth, effectY3 = y0 + effectWidth;
effectX4 = x0 + effectWidth, effectY4 = y0 - effectWidth;

Draw(If(isMulti, Sprites.HLDrag, Sprites.NormalDrag), x3, y3, x4, y4, x5, y5, x6, y6, 10000 + 1000 - time + EntityInfo.get(0) / 10000, If(times.now > time, Max(1 - (times.now - time) / judgment.great, 0), 1) * alpha);
Draw(sprite, x3, y3, x4, y4, x5, y5, x6, y6, 10000 + 1000 - time + EntityInfo.get(0) / 10000, If(times.now > time, Max(1 - (times.now - time) / judgment.great, 0), 1) * alpha);
return VOID;
}
};
Expand Down
18 changes: 15 additions & 3 deletions engine/play/notes/FlickNote.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -138,9 +138,21 @@ class FlickNote: public Archetype {
var x = r * Cos(newAngle) + line.get(1), y = r * Sin(newAngle) + line.get(2);
var x0 = dx * Cos(rotate) + line.get(1), y0 = dx * Sin(rotate) + line.get(2);

var vec1Length = noteWidth * size * If(isMulti, 1089.0 / 989.0, 1), vec1X = vec1Length * Cos(rotate), vec1Y = vec1Length * Sin(rotate);
var sprite = If(
HasSkinSprite(Sprites.NormalFlick),
If(isMulti, Sprites.HLFlick, Sprites.NormalFlick),
Sprites.FallbackNormalFlick
);
var ratio = If(
HasSkinSprite(Sprites.NormalFlick),
If(isMulti, hlFlickRatio, flickRatio),
fallBackNoteRatio
);
var vec1Length = noteWidth * size
/ If(isMulti && HasSkinSprite(Sprites.NormalFlick), 1, 1)
* If(HasSkinSprite(Sprites.NormalFlick), 1, 0.5), vec1X = vec1Length * Cos(rotate), vec1Y = vec1Length * Sin(rotate);
var x1 = x - vec1X, y1 = y - vec1Y, x2 = x + vec1X, y2 = y + vec1Y;
var vec2Length = noteWidth * size * If(isMulti, 1089.0 / 989.0, 1) / If(isMulti, hlFlickRatio, flickRatio);
var vec2Length = vec1Length / ratio;
var vec2X = vec2Length * Cos(rotate + PI / 2), vec2Y = vec2Length * Sin(rotate + PI / 2);
var x3 = x1 - vec2X, y3 = y1 - vec2Y;
var x4 = x1 + vec2X, y4 = y1 + vec2Y;
Expand All @@ -153,7 +165,7 @@ class FlickNote: public Archetype {
effectX4 = x0 + effectWidth, effectY4 = y0 - effectWidth;
// IF (x3 >= 0 && x3 <= stage.r && y3 <= 0 && y3 >= stage.b) Debuglog(EntityInfo.get(0)); FI

Draw(If(isMulti, Sprites.HLFlick, Sprites.NormalFlick), x3, y3, x4, y4, x5, y5, x6, y6, 12000 + 1000 - time + EntityInfo.get(0) / 10000, If(times.now > time, Max(1 - (times.now - time) / judgment.great, 0), 1) * alpha);
Draw(sprite, x3, y3, x4, y4, x5, y5, x6, y6, 12000 + 1000 - time + EntityInfo.get(0) / 10000, If(times.now > time, Max(1 - (times.now - time) / judgment.great, 0), 1) * alpha);
return VOID;
}
};
Expand Down
18 changes: 15 additions & 3 deletions engine/play/notes/NormalNote.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -155,9 +155,21 @@ class NormalNote: public Archetype {
var x = r * Cos(newAngle) + line.get(1), y = r * Sin(newAngle) + line.get(2);
var x0 = dx * Cos(rotate) + line.get(1), y0 = dx * Sin(rotate) + line.get(2);

var vec1Length = noteWidth * size * If(isMulti, 1089.0 / 989.0, 1), vec1X = vec1Length * Cos(rotate), vec1Y = vec1Length * Sin(rotate);
var sprite = If(
HasSkinSprite(Sprites.NormalNote),
If(isMulti, Sprites.HLNote, Sprites.NormalNote),
Sprites.FallbackNormalNote
);
var ratio = If(
HasSkinSprite(Sprites.NormalNote),
If(isMulti, hlNoteRatio, noteRatio),
fallBackNoteRatio
);
var vec1Length = noteWidth * size
/ If(isMulti && HasSkinSprite(Sprites.NormalNote), 1, 1)
* If(HasSkinSprite(Sprites.NormalNote), 1, 0.5), vec1X = vec1Length * Cos(rotate), vec1Y = vec1Length * Sin(rotate);
var x1 = x - vec1X, y1 = y - vec1Y, x2 = x + vec1X, y2 = y + vec1Y;
var vec2Length = noteWidth * size * If(isMulti, 1089.0 / 989.0, 1) / If(isMulti, hlNoteRatio, noteRatio);
var vec2Length = vec1Length / ratio;
var vec2X = vec2Length * Cos(rotate + PI / 2), vec2Y = vec2Length * Sin(rotate + PI / 2);
var x3 = x1 - vec2X, y3 = y1 - vec2Y;
var x4 = x1 + vec2X, y4 = y1 + vec2Y;
Expand All @@ -169,7 +181,7 @@ class NormalNote: public Archetype {
effectX3 = x0 + effectWidth, effectY3 = y0 + effectWidth;
effectX4 = x0 + effectWidth, effectY4 = y0 - effectWidth;

Draw(If(isMulti, Sprites.HLNote, Sprites.NormalNote), x3, y3, x4, y4, x5, y5, x6, y6, 11000 + 1000 - time + EntityInfo.get(0) / 10000, If(times.now > time, Max(1 - (times.now - time) / judgment.great, 0), 1) * alpha);
Draw(sprite, x3, y3, x4, y4, x5, y5, x6, y6, 11000 + 1000 - time + EntityInfo.get(0) / 10000, If(times.now > time, Max(1 - (times.now - time) / judgment.great, 0), 1) * alpha);
return VOID;
}
};
Expand Down
12 changes: 9 additions & 3 deletions engine/skins.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,15 @@ class Sprites {
int FullComboJudgeline = 1002;
int NormalNote = 1;
int HLNote = 2;
int FallbackNormalNote = 2001;
int NormalDrag = 3;
int HLDrag = 4;
int FallbackNormalDrag = 2003;
int NormalHoldHead = 5;
int HLHoldHead = 6;
int NormalFlick = 7;
int HLFlick = 8;
int FallbackNormalFlick = 2005;
int NormalHoldBody = 9;
int HLHoldBody = 10;
int PauseButton = 11;
Expand All @@ -36,10 +39,13 @@ auto skins = defineSkins<class Sprites>({
{SkinSpriteName.JudgmentLine, Sprites.NormalJudgeline},
{"Judgeline AllPerfect", Sprites.AllPerfectJudgeline},
{"Judgeline FullCombo", Sprites.FullComboJudgeline},
{SkinSpriteName.NoteHeadCyan, Sprites.NormalNote},
{SkinSpriteName.NoteHeadYellow, Sprites.NormalDrag},
{"Phigros Normal Note", Sprites.NormalNote},
{"Phigros Normal Drag", Sprites.NormalDrag},
{"Phigros Normal Flick", Sprites.NormalFlick},
{SkinSpriteName.NoteHeadCyan, Sprites.FallbackNormalNote},
{SkinSpriteName.NoteHeadYellow, Sprites.FallbackNormalDrag},
{SkinSpriteName.NoteHeadBlue, Sprites.NormalHoldHead},
{SkinSpriteName.NoteHeadRed, Sprites.NormalFlick},
{SkinSpriteName.NoteHeadRed, Sprites.FallbackNormalFlick},
{SkinSpriteName.NoteTailCyan, Sprites.HLNote},
{SkinSpriteName.NoteTailYellow, Sprites.HLDrag},
{SkinSpriteName.NoteTailBlue, Sprites.HLHoldHead},
Expand Down
26 changes: 17 additions & 9 deletions engine/tutorial/Initialization.cpp
Original file line number Diff line number Diff line change
@@ -1,14 +1,22 @@
SonolusApi Initialization() {
FUNCBEGIN
let menuL = stage.l + 0.005 * stage.w;
let menuR = stage.l + 0.05 * stage.w;
let menuT = stage.t + 1.0 / 1080.0 * stage.h;
let menuB = stage.t - 0.095 * stage.h;
let menuX = (menuR + menuL) / 2;
let menuY = (menuT + menuB) / 2;
let menuWidth = menuR - menuL;
let menuHeight = menuT - menuB;
ui.menu.set(menuX, menuY, 0.5, 0.5, menuWidth, menuHeight, 0, 0, true);
IF (HasSkinSprite(Sprites.PauseButton)) {
let menuL = stage.l + 0.005 * stage.w;
let menuR = stage.l + 0.05 * stage.w;
let menuT = stage.t + 1.0 / 1080.0 * stage.h;
let menuB = stage.t - 0.095 * stage.h;
let menuX = (menuR + menuL) / 2;
let menuY = (menuT + menuB) / 2;
let menuWidth = menuR - menuL;
let menuHeight = menuT - menuB;
ui.menu.set(menuX, menuY, 0.5, 0.5, menuWidth, menuHeight, 0, 0, true);
} ELSE {
let menuWidth = 0.15;
let menuHeight = 0.15;
let menuX = stage.l + interfaceGap;
let menuY = stage.t - interfaceGap;
ui.menu.set(menuX, menuY, 0, 1, menuWidth, menuHeight, 0, 1, true);
} FI

var previousWidth = 0.15 * ui.navigationConfiguration.scale;
var previousHeight = 0.15 * ui.navigationConfiguration.scale;
Expand Down
5 changes: 4 additions & 1 deletion engine/tutorial/Judgeline.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ SonolusApi drawJudgeline(let, let) {
let x = 0, y = stage.b + stage.h * 0.2;
let l = stage.l, r = stage.r;
let b = y - judgelineHeight / 2, t = y + judgelineHeight / 2;
Draw(Sprites.AllPerfectJudgeline, l, b, l, t, r, t, r, b, 1000, 1);
Draw(
If(HasSkinSprite(Sprites.AllPerfectJudgeline), Sprites.AllPerfectJudgeline, Sprites.NormalJudgeline),
l, b, l, t, r, t, r, b, 1000, 1
);
return VOID;
}
16 changes: 12 additions & 4 deletions engine/tutorial/notes/DragNote.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,13 @@ SonolusApi DragNoteFall(let time, let sum) {
let t = stage.t;
let b = t - 0.8 * stage.h;
let x = 0, y = Lerp(t, b, time / sum);
let w = baseNoteWidth * 2, h = w / dragRatio;
let w = baseNoteWidth * If(HasSkinSprite(Sprites.NormalDrag), 2, 1),
h = w / If(HasSkinSprite(Sprites.NormalDrag), dragRatio, fallBackNoteRatio);
let L = x - w / 2, R = x + w / 2, B = y - h / 2, T = y + h / 2;
Draw(Sprites.NormalDrag, L, B, L, T, R, T, R, B, 10000, 1);
Draw(
If(HasSkinSprite(Sprites.NormalDrag), Sprites.NormalDrag, Sprites.FallbackNormalDrag),
L, B, L, T, R, T, R, B, 10000, 1
);
return VOID;
}

Expand All @@ -16,9 +20,13 @@ SonolusApi DragNoteFrozen(let time, let sum) {
instruction = Texts.Drag;
spawnedEffect = 0;
let x = 0, y = stage.t - 0.8 * stage.h;
let w = baseNoteWidth * 2, h = w / dragRatio;
let w = baseNoteWidth * If(HasSkinSprite(Sprites.NormalDrag), 2, 1),
h = w / If(HasSkinSprite(Sprites.NormalDrag), dragRatio, fallBackNoteRatio);
let L = x - w / 2, R = x + w / 2, B = y - h / 2, T = y + h / 2;
Draw(Sprites.NormalDrag, L, B, L, T, R, T, R, B, 10000, 1);
Draw(
If(HasSkinSprite(Sprites.NormalDrag), Sprites.NormalDrag, Sprites.FallbackNormalDrag),
L, B, L, T, R, T, R, B, 10000, 1
);
drawFrozenHand(Icons.hand, x, y, time / (sum / 4) % 1);
return VOID;
}
Expand Down
16 changes: 12 additions & 4 deletions engine/tutorial/notes/FlickNote.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,13 @@ SonolusApi FlickNoteFall(let time, let sum) {
let t = stage.t;
let b = t - 0.8 * stage.h;
let x = 0, y = Lerp(t, b, time / sum);
let w = baseNoteWidth * 2, h = w / flickRatio;
let w = baseNoteWidth * If(HasSkinSprite(Sprites.NormalFlick), 2, 1),
h = w / If(HasSkinSprite(Sprites.NormalFlick), flickRatio, fallBackNoteRatio);
let L = x - w / 2, R = x + w / 2, B = y - h / 2, T = y + h / 2;
Draw(Sprites.NormalFlick, L, B, L, T, R, T, R, B, 10000, 1);
Draw(
If(HasSkinSprite(Sprites.NormalFlick), Sprites.NormalFlick, Sprites.FallbackNormalFlick),
L, B, L, T, R, T, R, B, 10000, 1
);
return VOID;
}

Expand All @@ -16,9 +20,13 @@ SonolusApi FlickNoteFrozen(let time, let sum) {
instruction = Texts.Flick;
spawnedEffect = 0;
let x = 0, y = stage.t - 0.8 * stage.h;
let w = baseNoteWidth * 2, h = w / flickRatio;
let w = baseNoteWidth * If(HasSkinSprite(Sprites.NormalFlick), 2, 1),
h = w / If(HasSkinSprite(Sprites.NormalFlick), flickRatio, fallBackNoteRatio);
let L = x - w / 2, R = x + w / 2, B = y - h / 2, T = y + h / 2;
Draw(Sprites.NormalFlick, L, B, L, T, R, T, R, B, 10000, 1);
Draw(
If(HasSkinSprite(Sprites.NormalFlick), Sprites.NormalFlick, Sprites.FallbackNormalFlick),
L, B, L, T, R, T, R, B, 10000, 1
);
drawUpperHand(Icons.hand, x, y, time / (sum / 4) % 1, handEndAngle);
return VOID;
}
Expand Down
16 changes: 12 additions & 4 deletions engine/tutorial/notes/NormalNote.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,13 @@ SonolusApi NormalNoteFall(let time, let sum) {
let t = stage.t;
let b = t - 0.8 * stage.h;
let x = 0, y = Lerp(t, b, time / sum);
let w = baseNoteWidth * 2, h = w / noteRatio;
let w = baseNoteWidth * If(HasSkinSprite(Sprites.NormalNote), 2, 1),
h = w / If(HasSkinSprite(Sprites.NormalNote), noteRatio, fallBackNoteRatio);
let L = x - w / 2, R = x + w / 2, B = y - h / 2, T = y + h / 2;
Draw(Sprites.NormalNote, L, B, L, T, R, T, R, B, 10000, 1);
Draw(
If(HasSkinSprite(Sprites.NormalNote), Sprites.NormalNote, Sprites.FallbackNormalNote),
L, B, L, T, R, T, R, B, 10000, 1
);
return VOID;
}

Expand All @@ -16,9 +20,13 @@ SonolusApi NormalNoteFrozen(let time, let sum) {
instruction = Texts.Tap;
spawnedEffect = 0;
let x = 0, y = stage.t - 0.8 * stage.h;
let w = baseNoteWidth * 2, h = w / noteRatio;
let w = baseNoteWidth * If(HasSkinSprite(Sprites.NormalNote), 2, 1),
h = w / If(HasSkinSprite(Sprites.NormalNote), noteRatio, fallBackNoteRatio);
let L = x - w / 2, R = x + w / 2, B = y - h / 2, T = y + h / 2;
Draw(Sprites.NormalNote, L, B, L, T, R, T, R, B, 10000, 1);
Draw(
If(HasSkinSprite(Sprites.NormalNote), Sprites.NormalNote, Sprites.FallbackNormalNote),
L, B, L, T, R, T, R, B, 10000, 1
);
drawFrozenHand(Icons.hand, x, y, time / (sum / 4) % 1);
return VOID;
}
Expand Down
8 changes: 4 additions & 4 deletions engine/watch/StageController.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,10 @@ class StageController: public Archetype {
let screenR = 10000;
let screenT = 10000;
let screenB = -10000;
Draw(Sprites.Blocker, screenL, screenB, screenL, screenT, stage.l, screenT, stage.l, screenB, 20000, 1);
Draw(Sprites.Blocker, stage.r, screenB, stage.r, screenT, screenR, screenT, screenR, screenB, 20000, 1);
Draw(Sprites.Blocker, screenL, screenB, screenL, stage.b, screenR, stage.b, screenR, screenB, 20000, 1);
Draw(Sprites.Blocker, screenL, stage.t, screenL, screenT, screenR, screenT, screenR, stage.t, 20000, 1);
Draw(Sprites.Blocker, screenL, screenB, screenL, screenT, stage.l, screenT, stage.l, screenB, 20000000, 1);
Draw(Sprites.Blocker, stage.r, screenB, stage.r, screenT, screenR, screenT, screenR, screenB, 20000000, 1);
Draw(Sprites.Blocker, screenL, screenB, screenL, stage.b, screenR, stage.b, screenR, screenB, 20000000, 1);
Draw(Sprites.Blocker, screenL, stage.t, screenL, screenT, screenR, screenT, screenR, stage.t, 20000000, 1);

var numberDistance = 0.0068 * stage.h;
IF (combo > 2 && !sonolusCombo && HasSkinSprite(Sprites.ComboText) && HasSkinSprite(Sprites.Combo0)) {
Expand Down
18 changes: 15 additions & 3 deletions engine/watch/notes/DragNote.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -144,9 +144,21 @@ class DragNote: public Archetype {
var x = r * Cos(newAngle) + line.get(1), y = r * Sin(newAngle) + line.get(2);
var x0 = dx * Cos(rotate) + line.get(1), y0 = dx * Sin(rotate) + line.get(2);

var vec1Length = noteWidth * size, vec1X = vec1Length * Cos(rotate), vec1Y = vec1Length * Sin(rotate);
var sprite = If(
HasSkinSprite(Sprites.NormalDrag),
If(isMulti, Sprites.HLDrag, Sprites.NormalDrag),
Sprites.FallbackNormalDrag
);
var ratio = If(
HasSkinSprite(Sprites.NormalDrag),
If(isMulti, hlDragRatio, dragRatio),
fallBackNoteRatio
);
var vec1Length = noteWidth * size
/ If(isMulti && HasSkinSprite(Sprites.NormalDrag), 1, 1)
* If(HasSkinSprite(Sprites.NormalDrag), 1, 0.5), vec1X = vec1Length * Cos(rotate), vec1Y = vec1Length * Sin(rotate);
var x1 = x - vec1X, y1 = y - vec1Y, x2 = x + vec1X, y2 = y + vec1Y;
var vec2Length = noteWidth * size / If(isMulti, hlDragRatio, dragRatio);
var vec2Length = vec1Length / ratio;
var vec2X = vec2Length * Cos(rotate + PI / 2), vec2Y = vec2Length * Sin(rotate + PI / 2);
var x3 = x1 - vec2X, y3 = y1 - vec2Y;
var x4 = x1 + vec2X, y4 = y1 + vec2Y;
Expand All @@ -158,7 +170,7 @@ class DragNote: public Archetype {
effectX3 = x0 + effectWidth, effectY3 = y0 + effectWidth;
effectX4 = x0 + effectWidth, effectY4 = y0 - effectWidth;

Draw(If(isMulti, Sprites.HLDrag, Sprites.NormalDrag), x3, y3, x4, y4, x5, y5, x6, y6, 10000 + 1000 - time + EntityInfo.get(0) / 10000, If(times.now > time, Max(1 - (times.now - time) / judgment.great, 0), 1) * alpha);
Draw(sprite, x3, y3, x4, y4, x5, y5, x6, y6, 10000 + 1000 - time + EntityInfo.get(0) / 10000, If(times.now > time, Max(1 - (times.now - time) / judgment.great, 0), 1) * alpha);
return VOID;
}
};
Expand Down
Loading

0 comments on commit c4ae482

Please sign in to comment.