diff --git a/dist/EngineConfiguration b/dist/EngineConfiguration index d5a8e58..67752e1 100644 Binary files a/dist/EngineConfiguration and b/dist/EngineConfiguration differ diff --git a/dist/EngineData b/dist/EngineData index 4c9b810..e7b879b 100644 Binary files a/dist/EngineData and b/dist/EngineData differ diff --git a/engine/buckets.cpp b/engine/buckets.cpp new file mode 100755 index 0000000..7214732 --- /dev/null +++ b/engine/buckets.cpp @@ -0,0 +1,347 @@ +using namespace std; + +class Buckets { + public: + + int NormalNote = 0; + int CriticalNote = 1; + int FlickNote = 2; + int HoldStart = 3; + int CriticalHoldStart = 4; + // int NormalHoldEighth = 5; + int HoldEnd = 5; + int Sound = 6; + int ScratchHoldStart = 7; + int ScratchCriticalHoldStart = 8; + // int ScratchHoldEighth = 10; + int ScratchHoldEnd = 9; + int ScratchSound = 10; +}Buckets; + +auto bucket = defineBuckets({ + { + sprites: { + { + id: Sprites.NormalNote, + x: 0, + y: 0, + w: 2.0, + h: 1.0, + rotation: 270 + } + }, + unit: UnitText.Millisecond + }, { + sprites: { + { + id: Sprites.CriticalNote, + x: 0, + y: 0, + w: 2.0, + h: 1.0, + rotation: 270 + } + }, + unit: UnitText.Millisecond + }, { + sprites: { + { + id: Sprites.ScratchNote, + x: -0.35, + y: 0, + w: 2.0, + h: 1.0, + rotation: 270 + }, { + id: Sprites.ScratchArrow, + x: 0.25, + y: 0.8, + w: 0.4, + h: 1.2, + rotation: 270 + }, { + id: Sprites.ScratchArrow, + x: 0.25, + y: 0.6, + w: 0.4, + h: 1.2, + rotation: 270 + }, { + id: Sprites.ScratchArrow, + x: 0.25, + y: 0.4, + w: 0.4, + h: 1.2, + rotation: 270 + }, { + id: Sprites.ScratchArrow, + x: 0.25, + y: 0.2, + w: 0.4, + h: 1.2, + rotation: 270 + }, { + id: Sprites.ScratchArrow, + x: 0.25, + y: -0.8, + w: 0.4, + h: 1.2, + rotation: 90 + }, { + id: Sprites.ScratchArrow, + x: 0.25, + y: -0.6, + w: 0.4, + h: 1.2, + rotation: 90 + }, { + id: Sprites.ScratchArrow, + x: 0.25, + y: -0.4, + w: 0.4, + h: 1.2, + rotation: 90 + }, { + id: Sprites.ScratchArrow, + x: 0.25, + y: -0.2, + w: 0.4, + h: 1.2, + rotation: 90 + } + }, + unit: UnitText.Millisecond + }, { + sprites: { + { + id: Sprites.Hold, + x: 0.25, + y: 0.0, + w: 1.8, + h: 6.0, + rotation: 270 + }, { + id: Sprites.HoldNote, + x: -2.75, + y: 0.0, + w: 2.0, + h: 1.0, + rotation: 270 + } + }, + unit: UnitText.Millisecond + }, { + sprites: { + { + id: Sprites.Hold, + x: 0.25, + y: 0.0, + w: 1.8, + h: 6.0, + rotation: 270 + }, { + id: Sprites.CriticalNote, + x: -2.75, + y: 0.0, + w: 2.0, + h: 1.0, + rotation: 270 + } + }, + unit: UnitText.Millisecond + }, { + // sprites: { + // { + // id: Sprites.Hold, + // x: 0.0, + // y: 0.0, + // w: 1.8, + // h: 6.0, + // rotation: 270 + // } + // }, + // unit: UnitText.Millisecond + // }, { + sprites: { + { + id: Sprites.Hold, + x: -0.25, + y: 0.0, + w: 1.8, + h: 6.0, + rotation: 270 + }, { + id: Sprites.HoldNote, + x: 2.75, + y: 0.0, + w: 2.0, + h: 1.0, + rotation: 270 + } + }, + unit: UnitText.Millisecond + }, { + sprites: { + { + id: Sprites.Hold, + x: 0.0, + y: 0.0, + w: 1.8, + h: 6.0, + rotation: 270 + }, { + id: Sprites.TouchTick, + x: 0.0, + y: 0.0, + w: 1.0, + h: 1.0, + rotation: 270 + } + }, + unit: UnitText.Millisecond + }, { + sprites: { + { + id: Sprites.Scratch, + x: 0.25, + y: 0.0, + w: 1.8, + h: 6.0, + rotation: 270 + }, { + id: Sprites.ScratchNote, + x: -2.75, + y: 0.0, + w: 2.0, + h: 1.0, + rotation: 270 + } + }, + unit: UnitText.Millisecond + }, { + sprites: { + { + id: Sprites.Scratch, + x: 0.25, + y: 0.0, + w: 1.8, + h: 6.0, + rotation: 270 + }, { + id: Sprites.CriticalNote, + x: -2.75, + y: 0.0, + w: 2.0, + h: 1.0, + rotation: 270 + } + }, + unit: UnitText.Millisecond + }, { + // sprites: { + // { + // id: Sprites.Scratch, + // x: 0.0, + // y: 0.0, + // w: 1.8, + // h: 6.0, + // rotation: 270 + // } + // }, + // unit: UnitText.Millisecond + // }, { + sprites: { + { + id: Sprites.Scratch, + x: -0.6, + y: 0.0, + w: 1.8, + h: 6.0, + rotation: 270 + }, { + id: Sprites.ScratchNote, + x: 2.4, + y: 0.0, + w: 2.0, + h: 1.0, + rotation: 270 + }, { + id: Sprites.ScratchArrow, + x: 3.0, + y: 0.8, + w: 0.4, + h: 1.2, + rotation: 270 + }, { + id: Sprites.ScratchArrow, + x: 3.0, + y: 0.6, + w: 0.4, + h: 1.2, + rotation: 270 + }, { + id: Sprites.ScratchArrow, + x: 3.0, + y: 0.4, + w: 0.4, + h: 1.2, + rotation: 270 + }, { + id: Sprites.ScratchArrow, + x: 3.0, + y: 0.2, + w: 0.4, + h: 1.2, + rotation: 270 + }, { + id: Sprites.ScratchArrow, + x: 3.0, + y: -0.8, + w: 0.4, + h: 1.2, + rotation: 90 + }, { + id: Sprites.ScratchArrow, + x: 3.0, + y: -0.6, + w: 0.4, + h: 1.2, + rotation: 90 + }, { + id: Sprites.ScratchArrow, + x: 3.0, + y: -0.4, + w: 0.4, + h: 1.2, + rotation: 90 + }, { + id: Sprites.ScratchArrow, + x: 3.0, + y: -0.2, + w: 0.4, + h: 1.2, + rotation: 90 + } + }, + unit: UnitText.Millisecond + }, { + sprites: { + { + id: Sprites.Scratch, + x: 0.0, + y: 0.0, + w: 1.8, + h: 6.0, + rotation: 270 + }, { + id: Sprites.TouchScratchTick, + x: 0.0, + y: 0.0, + w: 1.0, + h: 1.0, + rotation: 270 + } + }, + unit: UnitText.Millisecond + } +}); diff --git a/engine/engine.cpp b/engine/engine.cpp index b51ad86..b819b8c 100755 --- a/engine/engine.cpp +++ b/engine/engine.cpp @@ -18,7 +18,7 @@ using namespace watchData; #include"skins.cpp" #include"effects.cpp" #include"particles.cpp" -// #include"data/buckets.cpp" +#include"buckets.cpp" #include"constants.cpp" #include"types.cpp" #include"utils.cpp" diff --git a/engine/play/FlickNote.cpp b/engine/play/FlickNote.cpp index cd9e2b3..7317df4 100644 --- a/engine/play/FlickNote.cpp +++ b/engine/play/FlickNote.cpp @@ -34,6 +34,7 @@ class FlickNote : public Archetype { IF (t != -1 && t != inputTimeMax) res = 1, res2 = 1; FI EntityInput.set(0, res2); EntityInput.set(1, t - beat); + EntityInput.set(2, Buckets.FlickNote); EntityInput.set(3, t - beat); IF (res2 == 1) Play(Clips.Scratch, minSFXDistance); FI IF (res2 == 2) Play(Clips.CriticalGood, minSFXDistance); FI diff --git a/engine/play/Initialization.cpp b/engine/play/Initialization.cpp index 0728138..608e2e3 100644 --- a/engine/play/Initialization.cpp +++ b/engine/play/Initialization.cpp @@ -62,7 +62,6 @@ class Initialization: public Archetype { for (int i = 3; i <= 9; i++) lifes[i].set(0, 0, 0, -80); for (int i = 10; i <= 11; i++) lifes[i].set(0, 0, 0, -40); for (int i = 12; i <= 13; i++) lifes[i].set(0, 0, 0, -80); - EntityDespawn.set(0, 1); // return Execute({ // LevelScore.set(0, score.perfect); // LevelScore.set(1, score.great); @@ -78,20 +77,21 @@ class Initialization: public Archetype { // lifes[11].set(0, 0, 0, -40); // lifes[12].set(0, 0, 0, -80); // lifes[13].set(0, 0, 0, -80); - // buckets[0].set(-1 * judgment.perfect, judgment.perfect, -1 * judgment.great, judgment.great, -1 * judgment.good, judgment.good); - // buckets[1].set(-1 * judgment.perfect, judgment.perfect, -1 * judgment.great, judgment.great, -1 * judgment.good, judgment.good); - // buckets[2].set(-1 * judgment.perfect, judgment.perfect, -1 * judgment.good, judgment.good, -1 * judgment.good, judgment.good); - // buckets[3].set(-1 * judgment.perfect, judgment.perfect, -1 * judgment.great, judgment.great, -1 * judgment.good, judgment.good); - // buckets[4].set(-1 * judgment.perfect, judgment.perfect, -1 * judgment.great, judgment.great, -1 * judgment.good, judgment.good); - // buckets[5].set(-1 * judgment.perfect, judgment.perfect, -1 * judgment.great, judgment.great, -1 * judgment.good, judgment.good); - // buckets[6].set(-1 * judgment.perfect, judgment.perfect, -1 * judgment.great, judgment.great, -1 * judgment.good, judgment.good); - // buckets[7].set(-1 * judgment.perfect, judgment.perfect, -1 * judgment.great, judgment.great, -1 * judgment.good, judgment.good); - // buckets[8].set(-1 * judgment.perfect, judgment.perfect, -1 * judgment.great, judgment.great, -1 * judgment.good, judgment.good); - // buckets[9].set(-1 * judgment.perfect, judgment.perfect, -1 * judgment.great, judgment.great, -1 * judgment.good, judgment.good); - // buckets[10].set(-1 * judgment.perfect, judgment.perfect, -1 * judgment.great, judgment.great, -1 * judgment.good, judgment.good); - // buckets[11].set(-1 * judgment.perfect, judgment.perfect, -1 * judgment.great, judgment.great, -1 * judgment.good, judgment.good); - // buckets[12].set(-1 * judgment.perfect, judgment.perfect, -1 * judgment.great, judgment.great, -1 * judgment.good, judgment.good); + buckets[0].set(-1 * judgment.perfect, judgment.perfect, -1 * judgment.great, judgment.great, -1 * judgment.good, judgment.good); + buckets[1].set(-1 * judgment.perfect, judgment.perfect, -1 * judgment.great, judgment.great, -1 * judgment.good, judgment.good); + buckets[2].set(-1 * judgment.perfect, judgment.perfect, -1 * judgment.good, judgment.good, -1 * judgment.good, judgment.good); + buckets[3].set(-1 * judgment.perfect, judgment.perfect, -1 * judgment.great, judgment.great, -1 * judgment.good, judgment.good); + buckets[4].set(-1 * judgment.perfect, judgment.perfect, -1 * judgment.great, judgment.great, -1 * judgment.good, judgment.good); + buckets[5].set(-1 * judgment.perfect, judgment.perfect, -1 * judgment.great, judgment.great, -1 * judgment.good, judgment.good); + buckets[6].set(-1 * judgment.perfect, judgment.perfect, -1 * judgment.great, judgment.great, -1 * judgment.good, judgment.good); + buckets[7].set(-1 * judgment.perfect, judgment.perfect, -1 * judgment.great, judgment.great, -1 * judgment.good, judgment.good); + buckets[8].set(-1 * judgment.perfect, judgment.perfect, -1 * judgment.great, judgment.great, -1 * judgment.good, judgment.good); + buckets[9].set(-1 * judgment.perfect, judgment.perfect, -1 * judgment.great, judgment.great, -1 * judgment.good, judgment.good); + buckets[10].set(-1 * judgment.perfect, judgment.perfect, -1 * judgment.great, judgment.great, -1 * judgment.good, judgment.good); + buckets[11].set(-1 * judgment.perfect, judgment.perfect, -1 * judgment.great, judgment.great, -1 * judgment.good, judgment.good); + buckets[12].set(-1 * judgment.perfect, judgment.perfect, -1 * judgment.great, judgment.great, -1 * judgment.good, judgment.good); // }); + EntityDespawn.set(0, 1); return VOID; } diff --git a/engine/play/flatNotes/CriticalHoldStart.cpp b/engine/play/flatNotes/CriticalHoldStart.cpp index 1681afe..566795c 100644 --- a/engine/play/flatNotes/CriticalHoldStart.cpp +++ b/engine/play/flatNotes/CriticalHoldStart.cpp @@ -3,6 +3,7 @@ class SiriusCriticalHoldStart: public FlatNote { static constexpr const char* name = "Sirius Critical Hold Start"; let getSprite() { return Sprites.CriticalNote; } + let getBucket() { return Buckets.CriticalHoldStart; } ClipsArray getClips() { return { perfect: Clips.CriticalPerfect, great: Clips.CriticalPerfect, diff --git a/engine/play/flatNotes/CriticalNote.cpp b/engine/play/flatNotes/CriticalNote.cpp index 0b8e4fb..7ef3490 100644 --- a/engine/play/flatNotes/CriticalNote.cpp +++ b/engine/play/flatNotes/CriticalNote.cpp @@ -3,6 +3,7 @@ class CriticalNote: public FlatNote { static constexpr const char* name = "Sirius Critical Note"; let getSprite() { return Sprites.CriticalNote; } + let getBucket() { return Buckets.CriticalNote; } ClipsArray getClips() { return { perfect: Clips.CriticalPerfect, great: Clips.CriticalPerfect, diff --git a/engine/play/flatNotes/CriticalScratchHoldStart.cpp b/engine/play/flatNotes/CriticalScratchHoldStart.cpp index 17604bd..c584679 100644 --- a/engine/play/flatNotes/CriticalScratchHoldStart.cpp +++ b/engine/play/flatNotes/CriticalScratchHoldStart.cpp @@ -3,6 +3,7 @@ class SiriusCriticalScratchHoldStart: public FlatNote { static constexpr const char* name = "Sirius Critical Scratch Hold Start"; let getSprite() { return Sprites.CriticalNote; } + let getBucket() { return Buckets.ScratchHoldStart; } ClipsArray getClips() { return { perfect: Clips.Perfect, great: Clips.Perfect, diff --git a/engine/play/flatNotes/FlatNote.cpp b/engine/play/flatNotes/FlatNote.cpp index d6812c5..31d61a7 100644 --- a/engine/play/flatNotes/FlatNote.cpp +++ b/engine/play/flatNotes/FlatNote.cpp @@ -41,6 +41,7 @@ class FlatNote : public Archetype { IF (Abs(t - beat) <= judgment.perfectPlus) res = 1, res2 = 1; FI EntityInput.set(0, res2); EntityInput.set(1, t - beat); + EntityInput.set(2, getBucket()); EntityInput.set(3, t - beat); // IF (res2 == 0) DebugPause(); FI IF (res2 == 1) Play(getClips().perfect, minSFXDistance); FI diff --git a/engine/play/flatNotes/HoldStart.cpp b/engine/play/flatNotes/HoldStart.cpp index f257cce..6a9910d 100644 --- a/engine/play/flatNotes/HoldStart.cpp +++ b/engine/play/flatNotes/HoldStart.cpp @@ -3,6 +3,7 @@ class SiriusHoldStart: public FlatNote { static constexpr const char* name = "Sirius Hold Start"; let getSprite() { return Sprites.HoldNote; } + let getBucket() { return Buckets.HoldStart; } ClipsArray getClips() { return { perfect: Clips.Perfect, great: Clips.Perfect, diff --git a/engine/play/flatNotes/NormalNote.cpp b/engine/play/flatNotes/NormalNote.cpp index 15cc47b..73026fc 100644 --- a/engine/play/flatNotes/NormalNote.cpp +++ b/engine/play/flatNotes/NormalNote.cpp @@ -3,6 +3,7 @@ class NormalNote: public FlatNote { static constexpr const char* name = "Sirius Normal Note"; let getSprite() { return Sprites.NormalNote; } + let getBucket() { return Buckets.NormalNote; } ClipsArray getClips() { return { perfect: Clips.Perfect, great: Clips.Perfect, diff --git a/engine/play/flatNotes/ScratchHoldStart.cpp b/engine/play/flatNotes/ScratchHoldStart.cpp index 4614c51..ae1274c 100644 --- a/engine/play/flatNotes/ScratchHoldStart.cpp +++ b/engine/play/flatNotes/ScratchHoldStart.cpp @@ -3,6 +3,7 @@ class SiriusScratchHoldStart: public FlatNote { static constexpr const char* name = "Sirius Scratch Hold Start"; let getSprite() { return Sprites.ScratchNote; } + let getBucket() { return Buckets.ScratchHoldStart; } ClipsArray getClips() { return { perfect: Clips.Perfect, great: Clips.Perfect, diff --git a/engine/play/holdNotes/HoldEnd.cpp b/engine/play/holdNotes/HoldEnd.cpp index 97e7cfc..dc892d9 100644 --- a/engine/play/holdNotes/HoldEnd.cpp +++ b/engine/play/holdNotes/HoldEnd.cpp @@ -47,6 +47,7 @@ class SiriusHoldEnd: public Archetype { IF (Abs(t - beat) <= judgment.perfectPlus) res = 1, res2 = 1; FI EntityInput.set(0, res2); EntityInput.set(1, t - beat); + EntityInput.set(2, Buckets.HoldEnd); EntityInput.set(3, t - beat); IF (res2 == 1) Play(Clips.Perfect, minSFXDistance); FI IF (res2 == 2) Play(Clips.Perfect, minSFXDistance); FI diff --git a/engine/play/holdNotes/ScratchHoldEnd.cpp b/engine/play/holdNotes/ScratchHoldEnd.cpp index add8a79..a45def6 100644 --- a/engine/play/holdNotes/ScratchHoldEnd.cpp +++ b/engine/play/holdNotes/ScratchHoldEnd.cpp @@ -49,6 +49,7 @@ class SiriusScratchHoldEnd: public Archetype { IF (t > inputTimeMin) res = 1, res2 = 1; FI EntityInput.set(0, res2); EntityInput.set(1, t - beat); + EntityInput.set(2, Buckets.ScratchHoldEnd); EntityInput.set(3, t - beat); IF (res2 == 1) Play(Clips.Scratch, minSFXDistance); FI IF (res2 == 2) Play(Clips.CriticalGood, minSFXDistance); FI diff --git a/engine/play/holdNotes/Sound.cpp b/engine/play/holdNotes/Sound.cpp index 5d9e2d1..2eb3e60 100644 --- a/engine/play/holdNotes/Sound.cpp +++ b/engine/play/holdNotes/Sound.cpp @@ -39,6 +39,7 @@ class SiriusSound: public Archetype { IF (Abs(t - beat) <= judgment.perfectPlus) res = 1, res2 = 1; FI EntityInput.set(0, res2); EntityInput.set(1, t - beat); + EntityInput.set(2, If(holdType == 100 || holdType == 101, Buckets.Sound, Buckets.ScratchSound)); EntityInput.set(3, t - beat); IF (res != 0) Play(Clips.Sound, minSFXDistance); FI IF (res == 0) SpawnSubJudgeText(Sprites.JudgeMiss); FI diff --git a/main b/main index b889928..8eb1979 100755 Binary files a/main and b/main differ