diff --git a/.github/ISSUE_TEMPLATE/bug.md b/.github/ISSUE_TEMPLATE/bug.md index 27c14b5e45a..07b3346f32a 100644 --- a/.github/ISSUE_TEMPLATE/bug.md +++ b/.github/ISSUE_TEMPLATE/bug.md @@ -14,6 +14,8 @@ Windows (`x86`), Windows (`x86_64`), Linux, or macOS? Specify below. ## What version of the game are you using? Look in the bottom left corner of the main menu. -## Have you identified any steps to reproduce the bug? If so, please describe them below. Use images if possible. - ## Please describe your issue. Provide extensive detail and images if possible. + +## Please check the `logs` folder within your game directory, and upload the most recent game logs if you can. + +## Have you identified any steps to reproduce the bug? If so, please describe them below. Use images if possible. diff --git a/.github/workflows/html5.yml b/.github/workflows/html5.yml index bf1844688bc..592cb1b34c6 100644 --- a/.github/workflows/html5.yml +++ b/.github/workflows/html5.yml @@ -18,7 +18,7 @@ jobs: - uses: actions/checkout@v2 - uses: krdlab/setup-haxe@v1 with: - haxe-version: 4.1.5 + haxe-version: 4.2.3 # Runs a set of commands using the runners shell - name: script run line haha run: | diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 924795d799a..fb2ab451841 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -18,7 +18,7 @@ jobs: - uses: actions/checkout@v2 - uses: krdlab/setup-haxe@v1 with: - haxe-version: 4.1.5 + haxe-version: 4.2.3 # Runs a set of commands using the runners shell - name: script run line haha run: | diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 93a69869998..7c169860d1d 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -18,11 +18,11 @@ jobs: - uses: actions/checkout@v2 - uses: krdlab/setup-haxe@v1 with: - haxe-version: 4.1.5 + haxe-version: 4.2.3 # Runs a set of commands using the runners shell - name: script run line haha run: | - cinst haxe --version 4.1.5 -y + cinst haxe --version 4.2.3 -y RefreshEnv mkdir "%HAXELIB_ROOT%" haxelib setup "%HAXELIB_ROOT%" diff --git a/.vscode/tasks.json b/.vscode/tasks.json index 012d4d784b8..0341aacc834 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -21,6 +21,26 @@ "isDefault": true } }, + { + "label": "Build Linux (Debug)", + "type": "lime", + "targetConfiguration": "Build Linux (Debug)", + "command": "build", + "group": { + "kind": "build", + "isDefault": true + } + }, + { + "label": "Build Linux (Release)", + "type": "lime", + "targetConfiguration": "Build Linux (Release)", + "command": "build", + "group": { + "kind": "build", + "isDefault": true + } + }, { "label": "Build HTML5 (Debug)", "type": "lime", @@ -42,9 +62,9 @@ } }, { - "label": "Build Linux (Debug)", + "label": "Build Windows (Neko Debug)", "type": "lime", - "targetConfiguration": "Build Linux (Debug)", + "targetConfiguration": "Build Neko (Debug)", "command": "build", "group": { "kind": "build", @@ -52,9 +72,29 @@ } }, { - "label": "Build Linux (Release)", + "label": "Build Windows (Neko Release)", "type": "lime", - "targetConfiguration": "Build Linux (Release)", + "targetConfiguration": "Build Windows (Neko Release)", + "command": "build", + "group": { + "kind": "build", + "isDefault": true + } + }, + { + "label": "Build Windows (Hashlink Debug)", + "type": "lime", + "targetConfiguration": "Build Hashlink (Debug)", + "command": "build", + "group": { + "kind": "build", + "isDefault": true + } + }, + { + "label": "Build Windows (Hashlink Release)", + "type": "lime", + "targetConfiguration": "Build Hashlink (Release)", "command": "build", "group": { "kind": "build", diff --git a/Project.xml b/Project.xml index 7b87057ddaa..36a2b79a78a 100644 --- a/Project.xml +++ b/Project.xml @@ -133,6 +133,8 @@ + + diff --git a/appveyor-linux.yml b/appveyor-linux.yml index 2e8404a6a49..e6819893bf0 100644 --- a/appveyor-linux.yml +++ b/appveyor-linux.yml @@ -10,9 +10,9 @@ install: - sudo add-apt-repository ppa:haxe/releases -y - sudo apt update - sudo apt install neko tar gcc-7 g++-7 gcc-7-multilib g++-7-multilib -y - - wget https://github.com/HaxeFoundation/haxe/releases/download/4.1.5/haxe-4.1.5-linux64.tar.gz + - wget https://github.com/HaxeFoundation/haxe/releases/download/4.2.3/haxe-4.2.3-linux64.tar.gz - mkdir $HAXE_INSTALLDIR - - tar -xf haxe-4.1.5-linux64.tar.gz -C $HAXE_INSTALLDIR + - tar -xf haxe-4.2.3-linux64.tar.gz -C $HAXE_INSTALLDIR - export PATH=$PATH:$HAXE_INSTALLDIR/haxe_20201231082044_5e33a78aa - mkdir $HAXELIB_ROOT && haxelib setup $HAXELIB_ROOT - haxelib install lime 7.9.0 diff --git a/appveyor-macos.yml b/appveyor-macos.yml index 5631ed61bb3..5712dda2aba 100644 --- a/appveyor-macos.yml +++ b/appveyor-macos.yml @@ -10,9 +10,9 @@ install: - brew install neko - brew install gnu-tar - brew install wget - - wget "https://github.com/HaxeFoundation/haxe/releases/download/4.1.5/haxe-4.1.5-osx.tar.gz" + - wget "https://github.com/HaxeFoundation/haxe/releases/download/4.2.3/haxe-4.2.3-osx.tar.gz" - mkdir $HAXE_INSTALLDIR - - tar -xf haxe-4.1.5-osx.tar.gz -C $HAXE_INSTALLDIR + - tar -xf haxe-4.2.3-osx.tar.gz -C $HAXE_INSTALLDIR - export PATH=$PATH:$HAXE_INSTALLDIR/haxe_20201231082044_5e33a78aa - mkdir $HAXELIB_ROOT && haxelib setup $HAXELIB_ROOT - haxelib install lime 7.9.0 diff --git a/appveyor-windows.yml b/appveyor-windows.yml index 1ac5d6c3e71..e51dfca793c 100644 --- a/appveyor-windows.yml +++ b/appveyor-windows.yml @@ -11,7 +11,7 @@ install: # Install the neko chocolatey package (https://chocolatey.org/packages/neko) - cinst neko --version 2.3.0 -y # Install the haxe chocolatey package (https://chocolatey.org/packages/haxe) - - cinst haxe --version 4.1.5 -y + - cinst haxe --version 4.2.3 -y - RefreshEnv # Setup haxelib - mkdir "%HAXELIB_ROOT%" diff --git a/assets/preload/data/characters/bf-car.json b/assets/preload/data/characters/bf-car.json new file mode 100644 index 00000000000..d26bf5e94cd --- /dev/null +++ b/assets/preload/data/characters/bf-car.json @@ -0,0 +1,62 @@ +{ + "name": "Boyfriend (Car)", + "asset": "characters/bfCar", + "barColor": "#31B0D1", + "flipX": true, + "startingAnim": "idle", + "animations": [ + { + "name": "idle", + "prefix": "BF idle dance", + "nextAnim": "idleLoop", + "offsets": [-5, 0] + }, + { + "name": "idleLoop", + "prefix": "BF idle dance", + "offsets": [-5, 0], + "frameIndices": [10, 11, 12, 13], + "looped": true + }, + { + "name": "singUP", + "prefix": "BF NOTE UP0", + "offsets": [-29, 27] + }, + { + "name": "singLEFT", + "prefix": "BF NOTE LEFT0", + "offsets": [12, -6] + }, + { + "name": "singRIGHT", + "prefix": "BF NOTE RIGHT0", + "offsets": [-38, -7] + }, + { + "name": "singDOWN", + "prefix": "BF NOTE DOWN0", + "offsets": [-10, -50] + }, + { + "name": "singUPmiss", + "prefix": "BF NOTE UP MISS", + "offsets": [-29, 27] + }, + { + "name": "singLEFTmiss", + "prefix": "BF NOTE LEFT MISS", + "offsets": [12, 24] + }, + { + "name": "singRIGHTmiss", + "prefix": "BF NOTE RIGHT MISS", + "offsets": [-30, 21] + }, + { + "name": "singDOWNmiss", + "prefix": "BF NOTE DOWN MISS", + "offsets": [-11, -19] + } + ] +} \ No newline at end of file diff --git a/assets/preload/data/characters/bf-christmas.json b/assets/preload/data/characters/bf-christmas.json new file mode 100644 index 00000000000..13e6ab76302 --- /dev/null +++ b/assets/preload/data/characters/bf-christmas.json @@ -0,0 +1,59 @@ +{ + "name": "Boyfriend (Christmas)", + "asset": "characters/bfChristmas", + "barColor": "#31B0D1", + "flipX": true, + "startingAnim": "idle", + "animations": [ + { + "name": "idle", + "prefix": "BF idle dance", + "offsets": [-5, 0] + }, + { + "name": "singUP", + "prefix": "BF NOTE UP0", + "offsets": [-29, 27] + }, + { + "name": "singLEFT", + "prefix": "BF NOTE LEFT0", + "offsets": [12, -6] + }, + { + "name": "singRIGHT", + "prefix": "BF NOTE RIGHT0", + "offsets": [-38, -7] + }, + { + "name": "singDOWN", + "prefix": "BF NOTE DOWN0", + "offsets": [-10, -50] + }, + { + "name": "singUPmiss", + "prefix": "BF NOTE UP MISS", + "offsets": [-29, 27] + }, + { + "name": "singLEFTmiss", + "prefix": "BF NOTE LEFT MISS", + "offsets": [12, 24] + }, + { + "name": "singRIGHTmiss", + "prefix": "BF NOTE RIGHT MISS", + "offsets": [-30, 21] + }, + { + "name": "singDOWNmiss", + "prefix": "BF NOTE DOWN MISS", + "offsets": [-11, -19] + }, + { + "name": "hey", + "prefix": "BF HEY", + "offsets": [7, 4] + } + ] +} \ No newline at end of file diff --git a/assets/preload/data/characters/bf-pixel-dead.json b/assets/preload/data/characters/bf-pixel-dead.json new file mode 100644 index 00000000000..c905c1450d4 --- /dev/null +++ b/assets/preload/data/characters/bf-pixel-dead.json @@ -0,0 +1,26 @@ +{ + "name": "Boyfriend (Pixel Day) (Game Over)", + "asset": "characters/bfPixelsDEAD", + "barColor": "#31B0D1", + "flipX": true, + "scale": 6, + "antialiasing": false, + "startingAnim": "firstDeath", + "animations": [ + { + "name": "firstDeath", + "prefix": "BF Dies pixel", + "offsets": [0, 0] + }, + { + "name": "deathLoop", + "prefix": "Retry Loop", + "offsets": [-30, -12] + }, + { + "name": "deathConfirm", + "prefix": "RETRY CONFIRM", + "offsets": [-30, -12] + } + ] +} \ No newline at end of file diff --git a/assets/preload/data/characters/bf-pixel.json b/assets/preload/data/characters/bf-pixel.json new file mode 100644 index 00000000000..5c093b81f6f --- /dev/null +++ b/assets/preload/data/characters/bf-pixel.json @@ -0,0 +1,56 @@ +{ + "name": "Boyfriend (Pixel Day)", + "asset": "characters/bfPixel", + "barColor": "#31B0D1", + "flipX": true, + "scale": 6, + "antialiasing": false, + "startingAnim": "idle", + "animations": [ + { + "name": "idle", + "prefix": "BF IDLE", + "offsets": [0, 0] + }, + { + "name": "singUP", + "prefix": "BF UP NOTE", + "offsets": [0, 0] + }, + { + "name": "singLEFT", + "prefix": "BF LEFT NOTE", + "offsets": [0, 0] + }, + { + "name": "singRIGHT", + "prefix": "BF RIGHT NOTE", + "offsets": [0, 0] + }, + { + "name": "singDOWN", + "prefix": "BF DOWN NOTE", + "offsets": [0, 0] + }, + { + "name": "singUPmiss", + "prefix": "BF UP MISS", + "offsets": [0, 0] + }, + { + "name": "singLEFTmiss", + "prefix": "BF LEFT MISS", + "offsets": [0, 0] + }, + { + "name": "singRIGHTmiss", + "prefix": "BF RIGHT MISS", + "offsets": [0, 0] + }, + { + "name": "singDOWNmiss", + "prefix": "BF DOWN MISS", + "offsets": [0, 0] + } + ] +} \ No newline at end of file diff --git a/assets/preload/data/characters/bf.json b/assets/preload/data/characters/bf.json new file mode 100644 index 00000000000..154d08e4594 --- /dev/null +++ b/assets/preload/data/characters/bf.json @@ -0,0 +1,80 @@ +{ + "name": "Boyfriend", + "asset": "characters/BOYFRIEND", + "barColor": "#31B0D1", + "flipX": true, + "startingAnim": "idle", + "animations": [ + { + "name": "idle", + "prefix": "BF idle dance", + "offsets": [-5, 0] + }, + { + "name": "singUP", + "prefix": "BF NOTE UP0", + "offsets": [-29, 27] + }, + { + "name": "singLEFT", + "prefix": "BF NOTE LEFT0", + "offsets": [12, -6] + }, + { + "name": "singRIGHT", + "prefix": "BF NOTE RIGHT0", + "offsets": [-38, -7] + }, + { + "name": "singDOWN", + "prefix": "BF NOTE DOWN0", + "offsets": [-10, -50] + }, + { + "name": "singUPmiss", + "prefix": "BF NOTE UP MISS", + "offsets": [-29, 27] + }, + { + "name": "singLEFTmiss", + "prefix": "BF NOTE LEFT MISS", + "offsets": [12, 24] + }, + { + "name": "singRIGHTmiss", + "prefix": "BF NOTE RIGHT MISS", + "offsets": [-30, 21] + }, + { + "name": "singDOWNmiss", + "prefix": "BF NOTE DOWN MISS", + "offsets": [-11, -19] + }, + { + "name": "hey", + "prefix": "BF HEY", + "offsets": [7, 4] + }, + { + "name": "firstDeath", + "prefix": "BF dies", + "offsets": [37, 11] + }, + { + "name": "deathLoop", + "prefix": "BF Dead Loop", + "offsets": [37, 5] + }, + { + "name": "deathConfirm", + "prefix": "BF Dead confirm", + "offsets": [37, 69] + }, + { + "name": "scared", + "prefix": "BF idle shaking", + "offsets": [-4, 0], + "looped": true + } + ] +} \ No newline at end of file diff --git a/assets/preload/data/characters/dad.json b/assets/preload/data/characters/dad.json new file mode 100644 index 00000000000..a3171d31add --- /dev/null +++ b/assets/preload/data/characters/dad.json @@ -0,0 +1,44 @@ +{ + "name": "Daddy Dearest", + "asset": "characters/DADDY_DEAREST", + "barColor": "#AF66CE", + "startingAnim": "idle", + "holdLength": 6.1, + "camPos": [400, 0], + "animations": [ + { + "name": "idle", + "prefix": "Dad idle dance", + "nextAnim": "idleLoop", + "offsets": [0, 0] + }, + { + "name": "idleLoop", + "prefix": "Dad idle dance", + "offsets": [0, 0], + "frameIndices": [11, 12], + "frameRate": 12, + "looped": true + }, + { + "name": "singUP", + "prefix": "Dad Sing Note UP", + "offsets": [-6, 50] + }, + { + "name": "singLEFT", + "prefix": "Dad Sing Note LEFT", + "offsets": [-10, 10] + }, + { + "name": "singRIGHT", + "prefix": "Dad Sing Note RIGHT", + "offsets": [0, 27] + }, + { + "name": "singDOWN", + "prefix": "Dad Sing Note DOWN", + "offsets": [0, -30] + } + ] +} \ No newline at end of file diff --git a/assets/preload/data/characters/gf-car.json b/assets/preload/data/characters/gf-car.json new file mode 100644 index 00000000000..edaa2185b63 --- /dev/null +++ b/assets/preload/data/characters/gf-car.json @@ -0,0 +1,31 @@ +{ + "name": "Girlfriend (Car)", + "asset": "characters/gfCar", + "barColor": "#A5004D", + "startingAnim": "danceRight", + "isDancing": true, + "replacesGF": true, + "animations": [ + { + "name": "danceLeft", + "prefix": "GF Dancing Beat Hair blowing CAR", + "nextAnim": "idleLoop", + "offsets": [0, 0], + "frameIndices": [30, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14] + }, + { + "name": "danceRight", + "prefix": "GF Dancing Beat Hair blowing CAR", + "nextAnim": "idleLoop", + "offsets": [0, 0], + "frameIndices": [15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29] + }, + { + "name": "idleLoop", + "prefix": "GF Dancing Beat Hair blowing CAR", + "offsets": [0, 0], + "frameIndices": [10, 11, 12, 25, 26, 27], + "looped": true + } + ] +} \ No newline at end of file diff --git a/assets/preload/data/characters/gf-christmas.json b/assets/preload/data/characters/gf-christmas.json new file mode 100644 index 00000000000..acb15d13466 --- /dev/null +++ b/assets/preload/data/characters/gf-christmas.json @@ -0,0 +1,77 @@ +{ + "name": "Girlfriend (Christmas)", + "asset": "characters/gfChristmas", + "barColor": "#A5004D", + "startingAnim": "danceRight", + "isDancing": true, + "holdLength": 4.1, + "replacesGF": true, + "animations": [ + { + "name": "singLEFT", + "prefix": "GF left note", + "offsets": [0, -19] + }, + { + "name": "singRIGHT", + "prefix": "GF Right Note", + "offsets": [0, -20] + }, + { + "name": "singUP", + "prefix": "GF Up Note", + "offsets": [0, 4] + }, + { + "name": "singDOWN", + "prefix": "GF Down Note", + "offsets": [0, -20] + }, + { + "name": "danceLeft", + "prefix": "GF Dancing Beat", + "offsets": [0, -9], + "frameIndices": [30, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14] + }, + { + "name": "danceRight", + "prefix": "GF Dancing Beat", + "offsets": [0, -9], + "frameIndices": [15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29] + }, + { + "name": "cheer", + "prefix": "GF Cheer", + "offsets": [0, 0] + }, + { + "name": "hairBlow", + "prefix": "GF Dancing Beat Hair blowing", + "interrupt": false, + "offsets": [45, -8], + "frameIndices": [0, 1, 2, 3], + "looped": true + }, + { + "name": "hairFall", + "prefix": "GF Dancing Beat Hair Landing", + "nextAnim": "danceRight", + "interrupt": false, + "isDanced": true, + "offsets": [0, -9], + "frameIndices": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11] + }, + { + "name": "sad", + "prefix": "gf sad", + "offsets": [-2, -21], + "frameIndices": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12] + }, + { + "name": "scared", + "prefix": "GF FEAR", + "offsets": [-2, -17], + "looped": true + } + ] +} \ No newline at end of file diff --git a/assets/preload/data/characters/gf-pixel.json b/assets/preload/data/characters/gf-pixel.json new file mode 100644 index 00000000000..b025c29d082 --- /dev/null +++ b/assets/preload/data/characters/gf-pixel.json @@ -0,0 +1,24 @@ +{ + "name": "Girlfriend (Pixel Day)", + "asset": "characters/gfPixel", + "barColor": "#A5004D", + "scale": 6, + "antialiasing": false, + "startingAnim": "danceRight", + "isDancing": true, + "replacesGF": true, + "animations": [ + { + "name": "danceLeft", + "prefix": "GF IDLE", + "offsets": [0, 0], + "frameIndices": [30, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14] + }, + { + "name": "danceRight", + "prefix": "GF IDLE", + "offsets": [0, 0], + "frameIndices": [15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29] + } + ] +} \ No newline at end of file diff --git a/assets/preload/data/characters/gf.json b/assets/preload/data/characters/gf.json index 229f53932cf..54c75c53ff2 100644 --- a/assets/preload/data/characters/gf.json +++ b/assets/preload/data/characters/gf.json @@ -3,6 +3,9 @@ "asset": "characters/GF_assets", "barColor": "#A5004D", "startingAnim": "danceRight", + "isDancing": true, + "holdLength": 4.1, + "replacesGF": true, "animations": [ { "name": "singLEFT", @@ -44,6 +47,7 @@ { "name": "hairBlow", "prefix": "GF Dancing Beat Hair blowing", + "interrupt": false, "offsets": [45, -8], "frameIndices": [0, 1, 2, 3], "looped": true @@ -51,6 +55,9 @@ { "name": "hairFall", "prefix": "GF Dancing Beat Hair Landing", + "nextAnim": "danceRight", + "interrupt": false, + "isDanced": true, "offsets": [0, -9], "frameIndices": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11] }, diff --git a/assets/preload/data/characters/mom-car.json b/assets/preload/data/characters/mom-car.json new file mode 100644 index 00000000000..b0ed5423b67 --- /dev/null +++ b/assets/preload/data/characters/mom-car.json @@ -0,0 +1,42 @@ +{ + "name": "Mommy Mearest (Car)", + "asset": "characters/momCar", + "barColor": "#D8558E", + "startingAnim": "idle", + "camFollow": [0, 100], + "animations": [ + { + "name": "idle", + "prefix": "Mom Idle", + "nextAnim": "idleLoop", + "offsets": [0, 0] + }, + { + "name": "idleLoop", + "prefix": "Mom Idle", + "offsets": [0, 0], + "frameIndices": [10, 11, 12, 13], + "looped": true + }, + { + "name": "singUP", + "prefix": "Mom Up Pose", + "offsets": [14, 71] + }, + { + "name": "singLEFT", + "prefix": "Mom Left Pose", + "offsets": [250, -23] + }, + { + "name": "singRIGHT", + "prefix": "Mom Pose Left", + "offsets": [10, -60] + }, + { + "name": "singDOWN", + "prefix": "MOM DOWN POSE", + "offsets": [20, -160] + } + ] +} \ No newline at end of file diff --git a/assets/preload/data/characters/mom.json b/assets/preload/data/characters/mom.json new file mode 100644 index 00000000000..6700b43a84a --- /dev/null +++ b/assets/preload/data/characters/mom.json @@ -0,0 +1,43 @@ +{ + "name": "Mommy Mearest", + "asset": "characters/Mom_Assets", + "barColor": "#D8558E", + "startingAnim": "idle", + "camFollow": [0, 100], + "animations": [ + { + "name": "idle", + "prefix": "Mom Idle", + "nextAnim": "idleLoop", + "offsets": [0, 0] + }, + { + "name": "idleLoop", + "prefix": "Mom Idle", + "offsets": [0, 0], + "frameIndices": [11, 12], + "frameRate": 12, + "looped": true + }, + { + "name": "singUP", + "prefix": "Mom Up Pose", + "offsets": [14, 71] + }, + { + "name": "singLEFT", + "prefix": "Mom Left Pose", + "offsets": [250, -23] + }, + { + "name": "singRIGHT", + "prefix": "Mom Pose Left", + "offsets": [10, -60] + }, + { + "name": "singDOWN", + "prefix": "MOM DOWN POSE", + "offsets": [20, -160] + } + ] +} \ No newline at end of file diff --git a/assets/preload/data/characters/monster-christmas.json b/assets/preload/data/characters/monster-christmas.json new file mode 100644 index 00000000000..bf04e4c3934 --- /dev/null +++ b/assets/preload/data/characters/monster-christmas.json @@ -0,0 +1,33 @@ +{ + "name": "Monster (Christmas)", + "asset": "characters/monsterChristmas", + "barColor": "#F3FF6E", + "startingAnim": "idle", + "animations": [ + { + "name": "idle", + "prefix": "monster idle", + "offsets": [0, 0] + }, + { + "name": "singUP", + "prefix": "monster up note", + "offsets": [-20, 50] + }, + { + "name": "singLEFT", + "prefix": "Monster left note", + "offsets": [-30, 0] + }, + { + "name": "singRIGHT", + "prefix": "Monster Right note", + "offsets": [-51, 0] + }, + { + "name": "singDOWN", + "prefix": "monster down", + "offsets": [-40, -94] + } + ] +} \ No newline at end of file diff --git a/assets/preload/data/characters/monster.json b/assets/preload/data/characters/monster.json new file mode 100644 index 00000000000..b45f4de57ae --- /dev/null +++ b/assets/preload/data/characters/monster.json @@ -0,0 +1,33 @@ +{ + "name": "Monster", + "asset": "characters/Monster_Assets", + "barColor": "#F3FF6E", + "startingAnim": "idle", + "animations": [ + { + "name": "idle", + "prefix": "monster idle", + "offsets": [0, 0] + }, + { + "name": "singUP", + "prefix": "monster up note", + "offsets": [-20, 94] + }, + { + "name": "singLEFT", + "prefix": "Monster left note", + "offsets": [-30, 20] + }, + { + "name": "singRIGHT", + "prefix": "Monster Right note", + "offsets": [-51, 30] + }, + { + "name": "singDOWN", + "prefix": "monster down", + "offsets": [-50, -80] + } + ] +} \ No newline at end of file diff --git a/assets/preload/data/characters/parents-christmas.json b/assets/preload/data/characters/parents-christmas.json new file mode 100644 index 00000000000..01f544f911a --- /dev/null +++ b/assets/preload/data/characters/parents-christmas.json @@ -0,0 +1,62 @@ +{ + "name": "Parents (Christmas)", + "asset": "characters/mom_dad_christmas_assets", + "barColor": "#9A00F8", + "startingAnim": "idle", + "animations": [ + { + "name": "idle", + "prefix": "Parent Christmas Idle", + "nextAnim": "idleLoop", + "offsets": [0, 0] + }, + { + "name": "idleLoop", + "prefix": "Parent Christmas Idle", + "offsets": [0, 0], + "frameIndices": [11, 12], + "frameRate": 12, + "looped": true + }, + { + "name": "singUP", + "prefix": "Parent Up Note Dad", + "offsets": [-47, 24] + }, + { + "name": "singLEFT", + "prefix": "Parent Left Note Dad", + "offsets": [-30, 16] + }, + { + "name": "singRIGHT", + "prefix": "Parent Right Note Dad", + "offsets": [-1, -23] + }, + { + "name": "singDOWN", + "prefix": "Parent Down Note Dad", + "offsets": [-31, -29] + }, + { + "name": "singUP-alt", + "prefix": "Parent Up Note Mom", + "offsets": [-47, 24] + }, + { + "name": "singLEFT-alt", + "prefix": "Parent Left Note Mom", + "offsets": [-30, 15] + }, + { + "name": "singRIGHT-alt", + "prefix": "Parent Right Note Mom", + "offsets": [-1, -24] + }, + { + "name": "singDOWN-alt", + "prefix": "Parent Down Note Mom", + "offsets": [-30, -27] + } + ] +} \ No newline at end of file diff --git a/assets/preload/data/characters/pico.json b/assets/preload/data/characters/pico.json new file mode 100644 index 00000000000..548cdc2c468 --- /dev/null +++ b/assets/preload/data/characters/pico.json @@ -0,0 +1,55 @@ +{ + "name": "Pico", + "asset": "characters/Pico_FNF_assetss", + "barColor": "#B7D855", + "flipX": true, + "startingAnim": "idle", + "camPos": [600, 0], + "animations": [ + { + "name": "idle", + "prefix": "Pico Idle Dance", + "offsets": [0, 0] + }, + { + "name": "singUP", + "prefix": "pico Up note0", + "offsets": [-29, 27] + }, + { + "name": "singLEFT", + "prefix": "Pico Note Right0", + "offsets": [65, 9] + }, + { + "name": "singRIGHT", + "prefix": "Pico NOTE LEFT0", + "offsets": [-68, -7] + }, + { + "name": "singDOWN", + "prefix": "Pico Down Note0", + "offsets": [200, -70] + }, + { + "name": "singUPmiss", + "prefix": "pico Up note miss", + "offsets": [-19, 67] + }, + { + "name": "singLEFTmiss", + "prefix": "Pico Note Right Miss", + "offsets": [62, 64] + }, + { + "name": "singRIGHTmiss", + "prefix": "Pico NOTE LEFT miss", + "offsets": [-60, 41] + }, + { + "name": "singDOWNmiss", + "prefix": "Pico Down Note MISS", + "offsets": [210, -28] + } + ] +} \ No newline at end of file diff --git a/assets/preload/data/characters/senpai-angry.json b/assets/preload/data/characters/senpai-angry.json new file mode 100644 index 00000000000..d1a6889efc9 --- /dev/null +++ b/assets/preload/data/characters/senpai-angry.json @@ -0,0 +1,37 @@ +{ + "name": "Senpai (Angry)", + "asset": "characters/senpai", + "barColor": "#FFAA6F", + "scale": 6, + "antialiasing": false, + "startingAnim": "idle", + "camPos": [300, 0], + "camFollow": [-250, -330], + "animations": [ + { + "name": "idle", + "prefix": "Angry Senpai Idle", + "offsets": [0, 0] + }, + { + "name": "singUP", + "prefix": "Angry Senpai UP NOTE", + "offsets": [5, 37] + }, + { + "name": "singLEFT", + "prefix": "Angry Senpai LEFT NOTE", + "offsets": [40, 0] + }, + { + "name": "singRIGHT", + "prefix": "Angry Senpai RIGHT NOTE", + "offsets": [0, 0] + }, + { + "name": "singDOWN", + "prefix": "Angry Senpai DOWN NOTE", + "offsets": [14, 0] + } + ] +} \ No newline at end of file diff --git a/assets/preload/data/characters/senpai.json b/assets/preload/data/characters/senpai.json new file mode 100644 index 00000000000..c98452c2a8d --- /dev/null +++ b/assets/preload/data/characters/senpai.json @@ -0,0 +1,37 @@ +{ + "name": "Senpai", + "asset": "characters/senpai", + "barColor": "#FFAA6F", + "scale": 6, + "antialiasing": false, + "startingAnim": "idle", + "camPos": [300, 0], + "camFollow": [-250, -330], + "animations": [ + { + "name": "idle", + "prefix": "Senpai Idle", + "offsets": [0, 0] + }, + { + "name": "singUP", + "prefix": "SENPAI UP NOTE", + "offsets": [5, 37] + }, + { + "name": "singLEFT", + "prefix": "SENPAI LEFT NOTE", + "offsets": [40, 0] + }, + { + "name": "singRIGHT", + "prefix": "SENPAI RIGHT NOTE", + "offsets": [0, 0] + }, + { + "name": "singDOWN", + "prefix": "SENPAI DOWN NOTE", + "offsets": [14, 0] + } + ] +} \ No newline at end of file diff --git a/assets/preload/data/characters/spirit.json b/assets/preload/data/characters/spirit.json new file mode 100644 index 00000000000..e2a84840670 --- /dev/null +++ b/assets/preload/data/characters/spirit.json @@ -0,0 +1,38 @@ +{ + "name": "Spirit", + "asset": "characters/spirit", + "barColor": "#FF3C6E", + "scale": 6, + "antialiasing": false, + "usePackerAtlas": true, + "startingAnim": "idle", + "camPos": [300, 0], + "hasTrail": true, + "animations": [ + { + "name": "idle", + "prefix": "idle spirit_", + "offsets": [-220, -280] + }, + { + "name": "singUP", + "prefix": "up_", + "offsets": [-220, -240] + }, + { + "name": "singLEFT", + "prefix": "left_", + "offsets": [-200, -280] + }, + { + "name": "singRIGHT", + "prefix": "right_", + "offsets": [-220, -280] + }, + { + "name": "singDOWN", + "prefix": "spirit down_", + "offsets": [170, 110] + } + ] +} \ No newline at end of file diff --git a/assets/preload/data/characters/spooky.json b/assets/preload/data/characters/spooky.json new file mode 100644 index 00000000000..9a9c9dc860d --- /dev/null +++ b/assets/preload/data/characters/spooky.json @@ -0,0 +1,44 @@ +{ + "name": "Skid and Pump", + "asset": "characters/spooky_kids_assets", + "barColor": "#D57E00", + "startingAnim": "danceRight", + "isDancing": true, + "holdLength": 4.1, + "animations": [ + { + "name": "danceLeft", + "prefix": "spooky dance idle", + "offsets": [0, 0], + "frameIndices": [0, 2, 6], + "frameRate": 12 + }, + { + "name": "danceRight", + "prefix": "spooky dance idle", + "offsets": [0, 0], + "frameIndices": [8, 10, 12, 14], + "frameRate": 12 + }, + { + "name": "singUP", + "prefix": "spooky UP NOTE", + "offsets": [-20, 26] + }, + { + "name": "singLEFT", + "prefix": "note sing left", + "offsets": [130, -10] + }, + { + "name": "singRIGHT", + "prefix": "spooky sing right", + "offsets": [-130, -14] + }, + { + "name": "singDOWN", + "prefix": "spooky DOWN note", + "offsets": [-50, -130] + } + ] +} \ No newline at end of file diff --git a/assets/shared/images/characters/bf-carOffsets.txt b/assets/shared/images/characters/bf-carOffsets.txt deleted file mode 100644 index bcabd1951b6..00000000000 --- a/assets/shared/images/characters/bf-carOffsets.txt +++ /dev/null @@ -1,10 +0,0 @@ -idle -5 0 -idleHair -5 0 -singUP -29 27 -singRIGHT -38 -7 -singLEFT 12 -6 -singDOWN -10 -50 -singUPmiss -29 27 -singRIGHTmiss -30 21 -singLEFTmiss 12 24 -singDOWNmiss -11 -19 diff --git a/assets/shared/images/characters/bf-christmasOffsets.txt b/assets/shared/images/characters/bf-christmasOffsets.txt deleted file mode 100644 index 01428449062..00000000000 --- a/assets/shared/images/characters/bf-christmasOffsets.txt +++ /dev/null @@ -1,10 +0,0 @@ -idle -5 0 -singUP -29 27 -singRIGHT -38 -7 -singLEFT 12 -6 -singDOWN -10 -50 -singUPmiss -29 27 -singRIGHTmiss -30 21 -singLEFTmiss 12 24 -singDOWNmiss -11 -19 -hey 7 4 diff --git a/assets/shared/images/characters/bf-pixel-deadOffsets.txt b/assets/shared/images/characters/bf-pixel-deadOffsets.txt deleted file mode 100644 index 3544a2c9cc2..00000000000 --- a/assets/shared/images/characters/bf-pixel-deadOffsets.txt +++ /dev/null @@ -1,3 +0,0 @@ -firstDeath 0 0 -deathLoop -30 -12 -deathConfirm -30 -12 diff --git a/assets/shared/images/characters/bf-pixelOffsets.txt b/assets/shared/images/characters/bf-pixelOffsets.txt deleted file mode 100644 index b8a82929bd1..00000000000 --- a/assets/shared/images/characters/bf-pixelOffsets.txt +++ /dev/null @@ -1,9 +0,0 @@ -idle 0 0 -singUP 0 0 -singRIGHT 0 0 -singLEFT 0 0 -singDOWN 0 0 -singUPmiss 0 0 -singRIGHTmiss 0 0 -singLEFTmiss 0 0 -singDOWNmiss 0 0 diff --git a/assets/shared/images/characters/bfOffsets.txt b/assets/shared/images/characters/bfOffsets.txt deleted file mode 100644 index 6ec23219082..00000000000 --- a/assets/shared/images/characters/bfOffsets.txt +++ /dev/null @@ -1,14 +0,0 @@ -idle -5 0 -singUP -29 27 -singRIGHT -38 -7 -singLEFT 12 -6 -singDOWN -10 -50 -singUPmiss -29 27 -singRIGHTmiss -30 21 -singLEFTmiss 12 24 -singDOWNmiss -11 -19 -hey 7 4 -firstDeath 37 11 -deathLoop 37 5 -deathConfirm 37 69 -scared -4 0 diff --git a/assets/shared/images/characters/dadOffsets.txt b/assets/shared/images/characters/dadOffsets.txt deleted file mode 100644 index 87284640e35..00000000000 --- a/assets/shared/images/characters/dadOffsets.txt +++ /dev/null @@ -1,6 +0,0 @@ -idle 0 0 -idleLoop 0 0 -singUP -6 50 -singRIGHT 0 27 -singLEFT -10 10 -singDOWN 0 -30 diff --git a/assets/shared/images/characters/gf-carOffsets.txt b/assets/shared/images/characters/gf-carOffsets.txt deleted file mode 100644 index 7b96a0fe9bc..00000000000 --- a/assets/shared/images/characters/gf-carOffsets.txt +++ /dev/null @@ -1,3 +0,0 @@ -idleHair 0 0 -danceLeft 0 0 -danceRight 0 0 diff --git a/assets/shared/images/characters/gf-christmasOffsets.txt b/assets/shared/images/characters/gf-christmasOffsets.txt deleted file mode 100644 index 05abb7ab842..00000000000 --- a/assets/shared/images/characters/gf-christmasOffsets.txt +++ /dev/null @@ -1,11 +0,0 @@ -cheer 0 0 -sad -2 -21 -danceLeft 0 -9 -danceRight 0 -9 -singUP 0 4 -singRIGHT 0 -20 -singLEFT 0 -19 -singDOWN 0 -20 -hairBlow 45 -8 -hairFall 0 -9 -scared -2 -17 diff --git a/assets/shared/images/characters/gf-pixelOffsets.txt b/assets/shared/images/characters/gf-pixelOffsets.txt deleted file mode 100644 index 9862aaecd78..00000000000 --- a/assets/shared/images/characters/gf-pixelOffsets.txt +++ /dev/null @@ -1,2 +0,0 @@ -danceLeft 0 0 -danceRight 0 0 diff --git a/assets/shared/images/characters/mom-carOffsets.txt b/assets/shared/images/characters/mom-carOffsets.txt deleted file mode 100644 index 1a2ecefcff0..00000000000 --- a/assets/shared/images/characters/mom-carOffsets.txt +++ /dev/null @@ -1,6 +0,0 @@ -idle 0 0 -idleHair 0 0 -singUP 14 71 -singRIGHT 10 -60 -singLEFT 250 -23 -singDOWN 20 -160 diff --git a/assets/shared/images/characters/momOffsets.txt b/assets/shared/images/characters/momOffsets.txt deleted file mode 100644 index 512fcfd63da..00000000000 --- a/assets/shared/images/characters/momOffsets.txt +++ /dev/null @@ -1,6 +0,0 @@ -idle 0 0 -idleLoop 0 0 -singUP 14 71 -singRIGHT 10 -60 -singLEFT 250 -23 -singDOWN 20 -160 diff --git a/assets/shared/images/characters/monster-christmasOffsets.txt b/assets/shared/images/characters/monster-christmasOffsets.txt deleted file mode 100644 index a35704617b7..00000000000 --- a/assets/shared/images/characters/monster-christmasOffsets.txt +++ /dev/null @@ -1,5 +0,0 @@ -idle 0 0 -singUP -20 50 -singRIGHT -51 0 -singLEFT -30 0 -singDOWN -40 -94 diff --git a/assets/shared/images/characters/monsterOffsets.txt b/assets/shared/images/characters/monsterOffsets.txt deleted file mode 100644 index e211a5fdfa9..00000000000 --- a/assets/shared/images/characters/monsterOffsets.txt +++ /dev/null @@ -1,5 +0,0 @@ -idle 0 0 -singUP -20 94 -singRIGHT -51 30 -singLEFT -30 20 -singDOWN -50 -80 diff --git a/assets/shared/images/characters/parents-christmasOffsets.txt b/assets/shared/images/characters/parents-christmasOffsets.txt deleted file mode 100644 index 3b4773d5a10..00000000000 --- a/assets/shared/images/characters/parents-christmasOffsets.txt +++ /dev/null @@ -1,10 +0,0 @@ -idle 0 0 -idleLoop 0 0 -singUP -47 24 -singRIGHT -1 -23 -singLEFT -30 16 -singDOWN -31 -29 -singUP-alt -47 24 -singRIGHT-alt -1 -24 -singLEFT-alt -30 15 -singDOWN-alt -30 -27 diff --git a/assets/shared/images/characters/picoOffsets.txt b/assets/shared/images/characters/picoOffsets.txt deleted file mode 100644 index e209da72357..00000000000 --- a/assets/shared/images/characters/picoOffsets.txt +++ /dev/null @@ -1,9 +0,0 @@ -idle 0 0 -singUP -29 27 -singRIGHT -68 -7 -singLEFT 65 9 -singDOWN 200 -70 -singUPmiss -19 67 -singRIGHTmiss -60 41 -singLEFTmiss 62 64 -singDOWNmiss 210 -28 diff --git a/assets/shared/images/characters/senpai-angryOffsets.txt b/assets/shared/images/characters/senpai-angryOffsets.txt deleted file mode 100644 index c11825906ec..00000000000 --- a/assets/shared/images/characters/senpai-angryOffsets.txt +++ /dev/null @@ -1,5 +0,0 @@ -idle 0 0 -singUP 5 37 -singRIGHT 0 0 -singLEFT 40 0 -singDOWN 14 0 diff --git a/assets/shared/images/characters/senpaiOffsets.txt b/assets/shared/images/characters/senpaiOffsets.txt deleted file mode 100644 index c11825906ec..00000000000 --- a/assets/shared/images/characters/senpaiOffsets.txt +++ /dev/null @@ -1,5 +0,0 @@ -idle 0 0 -singUP 5 37 -singRIGHT 0 0 -singLEFT 40 0 -singDOWN 14 0 diff --git a/assets/shared/images/characters/spiritOffsets.txt b/assets/shared/images/characters/spiritOffsets.txt deleted file mode 100644 index ed2442d754b..00000000000 --- a/assets/shared/images/characters/spiritOffsets.txt +++ /dev/null @@ -1,5 +0,0 @@ -idle -220 -280 -singUP -220 -240 -singRIGHT -220 -280 -singLEFT -200 -280 -singDOWN 170 110 diff --git a/assets/shared/images/characters/spookyOffsets.txt b/assets/shared/images/characters/spookyOffsets.txt deleted file mode 100644 index c14c5e752ee..00000000000 --- a/assets/shared/images/characters/spookyOffsets.txt +++ /dev/null @@ -1,6 +0,0 @@ -danceLeft 0 0 -danceRight 0 0 -singUP -20 26 -singRIGHT -130 -14 -singLEFT 130 -10 -singDOWN -50 -130 diff --git a/docs/building.md b/docs/building.md index d4db8b271c6..1c1353b0cc7 100644 --- a/docs/building.md +++ b/docs/building.md @@ -7,13 +7,13 @@ **Also also note**: To build for *Windows*, you need to be on *Windows*. To build for *Linux*, you need to be on *Linux*. Same goes for macOS. You can build for html5/browsers on any platform. ## Dependencies - 1. [Install Haxe 4.1.5](https://haxe.org/download/version/4.1.5/). You should use 4.1.5 instead of the latest version because the latest version has some problems with Friday Night Funkin': Kade Engine. + 1. [Install Haxe](https://haxe.org/download/). You should use the latest version. 2. After installing Haxe, [Install HaxeFlixel](https://haxeflixel.com/documentation/install-haxeflixel/). 3. Install `git`. - Windows: install from the [git-scm](https://git-scm.com/downloads) website. - Linux: install the `git` package: `sudo apt install git` (ubuntu), `sudo pacman -S git` (arch), etc... (you probably already have it) 4. Install and set up the necessary libraries: - - `haxelib install lime 7.9.0` + - `haxelib install lime` - `haxelib install openfl` - `haxelib install flixel` - `haxelib install flixel-tools` diff --git a/source/Boyfriend.hx b/source/Boyfriend.hx index 8975fd911d7..c89128d08ba 100644 --- a/source/Boyfriend.hx +++ b/source/Boyfriend.hx @@ -21,24 +21,15 @@ class Boyfriend extends Character if (!debugMode) { if (animation.curAnim.name.startsWith('sing')) - { holdTimer += elapsed; - } else holdTimer = 0; if (animation.curAnim.name.endsWith('miss') && animation.curAnim.finished && !debugMode) - { playAnim('idle', true, false, 10); - } - - if (curCharacter.endsWith('-car') && !animation.curAnim.name.startsWith('sing') && animation.curAnim.finished) - playAnim('idleHair'); if (animation.curAnim.name == 'firstDeath' && animation.curAnim.finished) - { playAnim('deathLoop'); - } } super.update(elapsed); diff --git a/source/Character.hx b/source/Character.hx index 9e1a83e7390..9f00068f04e 100644 --- a/source/Character.hx +++ b/source/Character.hx @@ -13,6 +13,9 @@ using StringTools; class Character extends FlxSprite { public var animOffsets:Map>; + public var animInterrupt:Map; + public var animNext:Map; + public var animDanced:Map; public var debugMode:Bool = false; public var isPlayer:Bool = false; @@ -21,378 +24,27 @@ class Character extends FlxSprite public var holdTimer:Float = 0; + public var replacesGF:Bool; + public var hasTrail:Bool; + public var isDancing:Bool; + public var holdLength:Float; + public var charPos:Array; + public var camPos:Array; + public var camFollow:Array; + public function new(x:Float, y:Float, ?character:String = "bf", ?isPlayer:Bool = false) { super(x, y); barColor = isPlayer ? 0xFF66FF33 : 0xFFFF0000; animOffsets = new Map>(); + animInterrupt = new Map(); + animNext = new Map(); + animDanced = new Map(); curCharacter = character; this.isPlayer = isPlayer; - var tex:FlxAtlasFrames; - antialiasing = FlxG.save.data.antialiasing; - - switch (curCharacter) - { - case 'gf-christmas': - tex = Paths.getSparrowAtlas('gfChristmas', 'shared', true); - frames = tex; - animation.addByPrefix('cheer', 'GF Cheer', 24, false); - animation.addByPrefix('singLEFT', 'GF left note', 24, false); - animation.addByPrefix('singRIGHT', 'GF Right Note', 24, false); - animation.addByPrefix('singUP', 'GF Up Note', 24, false); - animation.addByPrefix('singDOWN', 'GF Down Note', 24, false); - animation.addByIndices('sad', 'gf sad', [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12], "", 24, false); - animation.addByIndices('danceLeft', 'GF Dancing Beat', [30, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14], "", 24, false); - animation.addByIndices('danceRight', 'GF Dancing Beat', [15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29], "", 24, false); - animation.addByIndices('hairBlow', "GF Dancing Beat Hair blowing", [0, 1, 2, 3], "", 24); - animation.addByIndices('hairFall', "GF Dancing Beat Hair Landing", [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11], "", 24, false); - animation.addByPrefix('scared', 'GF FEAR', 24); - - loadOffsetFile(curCharacter); - - playAnim('danceRight'); - - case 'gf-car': - tex = Paths.getSparrowAtlas('gfCar', 'shared', true); - frames = tex; - animation.addByIndices('singUP', 'GF Dancing Beat Hair blowing CAR', [0], "", 24, false); - animation.addByIndices('danceLeft', 'GF Dancing Beat Hair blowing CAR', [30, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14], "", 24, false); - animation.addByIndices('danceRight', 'GF Dancing Beat Hair blowing CAR', [15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29], "", 24, - false); - animation.addByIndices('idleHair', 'GF Dancing Beat Hair blowing CAR', [10, 11, 12, 25, 26, 27], "", 24, true); - - loadOffsetFile(curCharacter); - - playAnim('danceRight'); - - case 'gf-pixel': - tex = Paths.getSparrowAtlas('gfPixel', 'shared', true); - frames = tex; - animation.addByIndices('singUP', 'GF IDLE', [2], "", 24, false); - animation.addByIndices('danceLeft', 'GF IDLE', [30, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14], "", 24, false); - animation.addByIndices('danceRight', 'GF IDLE', [15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29], "", 24, false); - - loadOffsetFile(curCharacter); - - playAnim('danceRight'); - - setGraphicSize(Std.int(width * CoolUtil.daPixelZoom)); - updateHitbox(); - antialiasing = false; - - case 'dad': - // DAD ANIMATION LOADING CODE - tex = Paths.getSparrowAtlas('DADDY_DEAREST', 'shared', true); - frames = tex; - animation.addByPrefix('idle', 'Dad idle dance', 24, false); - animation.addByPrefix('singUP', 'Dad Sing Note UP', 24, false); - animation.addByPrefix('singRIGHT', 'Dad Sing Note RIGHT', 24, false); - animation.addByPrefix('singDOWN', 'Dad Sing Note DOWN', 24, false); - animation.addByPrefix('singLEFT', 'Dad Sing Note LEFT', 24, false); - animation.addByIndices('idleLoop', "Dad idle dance", [11, 12], "", 12, true); - - loadOffsetFile(curCharacter); - barColor = 0xFFaf66ce; - - playAnim('idle'); - case 'spooky': - tex = Paths.getSparrowAtlas('spooky_kids_assets', 'shared', true); - frames = tex; - animation.addByPrefix('singUP', 'spooky UP NOTE', 24, false); - animation.addByPrefix('singDOWN', 'spooky DOWN note', 24, false); - animation.addByPrefix('singLEFT', 'note sing left', 24, false); - animation.addByPrefix('singRIGHT', 'spooky sing right', 24, false); - animation.addByIndices('danceLeft', 'spooky dance idle', [0, 2, 6], "", 12, false); - animation.addByIndices('danceRight', 'spooky dance idle', [8, 10, 12, 14], "", 12, false); - - loadOffsetFile(curCharacter); - barColor = 0xFFd57e00; - - playAnim('danceRight'); - case 'mom': - tex = Paths.getSparrowAtlas('Mom_Assets', 'shared', true); - frames = tex; - - animation.addByPrefix('idle', "Mom Idle", 24, false); - animation.addByPrefix('singUP', "Mom Up Pose", 24, false); - animation.addByPrefix('singDOWN', "MOM DOWN POSE", 24, false); - animation.addByPrefix('singLEFT', 'Mom Left Pose', 24, false); - // ANIMATION IS CALLED MOM LEFT POSE BUT ITS FOR THE RIGHT - // CUZ DAVE IS DUMB! - animation.addByPrefix('singRIGHT', 'Mom Pose Left', 24, false); - animation.addByIndices('idleLoop', "Mom Idle", [11, 12], "", 12, true); - - loadOffsetFile(curCharacter); - barColor = 0xFFd8558e; - - playAnim('idle'); - - case 'mom-car': - tex = Paths.getSparrowAtlas('momCar', 'shared', true); - frames = tex; - - animation.addByPrefix('idle', "Mom Idle", 24, false); - animation.addByPrefix('singUP', "Mom Up Pose", 24, false); - animation.addByPrefix('singDOWN', "MOM DOWN POSE", 24, false); - animation.addByPrefix('singLEFT', 'Mom Left Pose', 24, false); - // ANIMATION IS CALLED MOM LEFT POSE BUT ITS FOR THE RIGHT - // CUZ DAVE IS DUMB! - animation.addByPrefix('singRIGHT', 'Mom Pose Left', 24, false); - animation.addByIndices('idleHair', 'Mom Idle', [10, 11, 12, 13], "", 24, true); - - loadOffsetFile(curCharacter); - barColor = 0xFFd8558e; - - playAnim('idle'); - case 'monster': - tex = Paths.getSparrowAtlas('Monster_Assets', 'shared', true); - frames = tex; - animation.addByPrefix('idle', 'monster idle', 24, false); - animation.addByPrefix('singUP', 'monster up note', 24, false); - animation.addByPrefix('singDOWN', 'monster down', 24, false); - animation.addByPrefix('singLEFT', 'Monster left note', 24, false); - animation.addByPrefix('singRIGHT', 'Monster Right note', 24, false); - - loadOffsetFile(curCharacter); - barColor = 0xFFf3ff6e; - playAnim('idle'); - case 'monster-christmas': - tex = Paths.getSparrowAtlas('monsterChristmas', 'shared', true); - frames = tex; - animation.addByPrefix('idle', 'monster idle', 24, false); - animation.addByPrefix('singUP', 'monster up note', 24, false); - animation.addByPrefix('singDOWN', 'monster down', 24, false); - animation.addByPrefix('singLEFT', 'Monster left note', 24, false); - animation.addByPrefix('singRIGHT', 'Monster Right note', 24, false); - - loadOffsetFile(curCharacter); - barColor = 0xFFf3ff6e; - playAnim('idle'); - case 'pico': - tex = Paths.getSparrowAtlas('Pico_FNF_assetss', 'shared', true); - frames = tex; - animation.addByPrefix('idle', "Pico Idle Dance", 24, false); - animation.addByPrefix('singUP', 'pico Up note0', 24, false); - animation.addByPrefix('singDOWN', 'Pico Down Note0', 24, false); - if (isPlayer) - { - animation.addByPrefix('singLEFT', 'Pico NOTE LEFT0', 24, false); - animation.addByPrefix('singRIGHT', 'Pico Note Right0', 24, false); - animation.addByPrefix('singRIGHTmiss', 'Pico Note Right Miss', 24, false); - animation.addByPrefix('singLEFTmiss', 'Pico NOTE LEFT miss', 24, false); - } - else - { - // Need to be flipped! REDO THIS LATER! - animation.addByPrefix('singLEFT', 'Pico Note Right0', 24, false); - animation.addByPrefix('singRIGHT', 'Pico NOTE LEFT0', 24, false); - animation.addByPrefix('singRIGHTmiss', 'Pico NOTE LEFT miss', 24, false); - animation.addByPrefix('singLEFTmiss', 'Pico Note Right Miss', 24, false); - } - - animation.addByPrefix('singUPmiss', 'pico Up note miss', 24); - animation.addByPrefix('singDOWNmiss', 'Pico Down Note MISS', 24); - - loadOffsetFile(curCharacter); - barColor = 0xFFb7d855; - - playAnim('idle'); - - flipX = true; - - case 'bf': - var tex = Paths.getSparrowAtlas('BOYFRIEND', 'shared', true); - frames = tex; - - trace(tex.frames.length); - - animation.addByPrefix('idle', 'BF idle dance', 24, false); - animation.addByPrefix('singUP', 'BF NOTE UP0', 24, false); - animation.addByPrefix('singLEFT', 'BF NOTE LEFT0', 24, false); - animation.addByPrefix('singRIGHT', 'BF NOTE RIGHT0', 24, false); - animation.addByPrefix('singDOWN', 'BF NOTE DOWN0', 24, false); - animation.addByPrefix('singUPmiss', 'BF NOTE UP MISS', 24, false); - animation.addByPrefix('singLEFTmiss', 'BF NOTE LEFT MISS', 24, false); - animation.addByPrefix('singRIGHTmiss', 'BF NOTE RIGHT MISS', 24, false); - animation.addByPrefix('singDOWNmiss', 'BF NOTE DOWN MISS', 24, false); - animation.addByPrefix('hey', 'BF HEY', 24, false); - - animation.addByPrefix('firstDeath', "BF dies", 24, false); - animation.addByPrefix('deathLoop', "BF Dead Loop", 24, false); - animation.addByPrefix('deathConfirm', "BF Dead confirm", 24, false); - - animation.addByPrefix('scared', 'BF idle shaking', 24); - - loadOffsetFile(curCharacter); - - playAnim('idle'); - - barColor = 0xFF31b0d1; - - flipX = true; - - case 'bf-christmas': - var tex = Paths.getSparrowAtlas('bfChristmas', 'shared', true); - frames = tex; - animation.addByPrefix('idle', 'BF idle dance', 24, false); - animation.addByPrefix('singUP', 'BF NOTE UP0', 24, false); - animation.addByPrefix('singLEFT', 'BF NOTE LEFT0', 24, false); - animation.addByPrefix('singRIGHT', 'BF NOTE RIGHT0', 24, false); - animation.addByPrefix('singDOWN', 'BF NOTE DOWN0', 24, false); - animation.addByPrefix('singUPmiss', 'BF NOTE UP MISS', 24, false); - animation.addByPrefix('singLEFTmiss', 'BF NOTE LEFT MISS', 24, false); - animation.addByPrefix('singRIGHTmiss', 'BF NOTE RIGHT MISS', 24, false); - animation.addByPrefix('singDOWNmiss', 'BF NOTE DOWN MISS', 24, false); - animation.addByPrefix('hey', 'BF HEY', 24, false); - - loadOffsetFile(curCharacter); - - playAnim('idle'); - - flipX = true; - case 'bf-car': - var tex = Paths.getSparrowAtlas('bfCar', 'shared', true); - frames = tex; - animation.addByPrefix('idle', 'BF idle dance', 24, false); - animation.addByPrefix('singUP', 'BF NOTE UP0', 24, false); - animation.addByPrefix('singLEFT', 'BF NOTE LEFT0', 24, false); - animation.addByPrefix('singRIGHT', 'BF NOTE RIGHT0', 24, false); - animation.addByPrefix('singDOWN', 'BF NOTE DOWN0', 24, false); - animation.addByPrefix('singUPmiss', 'BF NOTE UP MISS', 24, false); - animation.addByPrefix('singLEFTmiss', 'BF NOTE LEFT MISS', 24, false); - animation.addByPrefix('singRIGHTmiss', 'BF NOTE RIGHT MISS', 24, false); - animation.addByPrefix('singDOWNmiss', 'BF NOTE DOWN MISS', 24, false); - animation.addByIndices('idleHair', 'BF idle dance', [10, 11, 12, 13], "", 24, true); - - loadOffsetFile(curCharacter); - playAnim('idle'); - - barColor = 0xFF31b0d1; - - flipX = true; - case 'bf-pixel': - frames = Paths.getSparrowAtlas('bfPixel', 'shared', true); - animation.addByPrefix('idle', 'BF IDLE', 24, false); - animation.addByPrefix('singUP', 'BF UP NOTE', 24, false); - animation.addByPrefix('singLEFT', 'BF LEFT NOTE', 24, false); - animation.addByPrefix('singRIGHT', 'BF RIGHT NOTE', 24, false); - animation.addByPrefix('singDOWN', 'BF DOWN NOTE', 24, false); - animation.addByPrefix('singUPmiss', 'BF UP MISS', 24, false); - animation.addByPrefix('singLEFTmiss', 'BF LEFT MISS', 24, false); - animation.addByPrefix('singRIGHTmiss', 'BF RIGHT MISS', 24, false); - animation.addByPrefix('singDOWNmiss', 'BF DOWN MISS', 24, false); - - loadOffsetFile(curCharacter); - - setGraphicSize(Std.int(width * 6)); - updateHitbox(); - - playAnim('idle'); - - width -= 100; - height -= 100; - - antialiasing = false; - - barColor = 0xFF31b0d1; - - flipX = true; - case 'bf-pixel-dead': - frames = Paths.getSparrowAtlas('bfPixelsDEAD', 'shared', true); - animation.addByPrefix('singUP', "BF Dies pixel", 24, false); - animation.addByPrefix('firstDeath', "BF Dies pixel", 24, false); - animation.addByPrefix('deathLoop', "Retry Loop", 24, false); - animation.addByPrefix('deathConfirm', "RETRY CONFIRM", 24, false); - animation.play('firstDeath'); - - loadOffsetFile(curCharacter); - playAnim('firstDeath'); - // pixel bullshit - setGraphicSize(Std.int(width * 6)); - updateHitbox(); - antialiasing = false; - flipX = true; - - barColor = 0xFF31b0d1; - - case 'senpai': - frames = Paths.getSparrowAtlas('senpai', 'shared', true); - animation.addByPrefix('idle', 'Senpai Idle', 24, false); - animation.addByPrefix('singUP', 'SENPAI UP NOTE', 24, false); - animation.addByPrefix('singLEFT', 'SENPAI LEFT NOTE', 24, false); - animation.addByPrefix('singRIGHT', 'SENPAI RIGHT NOTE', 24, false); - animation.addByPrefix('singDOWN', 'SENPAI DOWN NOTE', 24, false); - - loadOffsetFile(curCharacter); - barColor = 0xFFffaa6f; - - playAnim('idle'); - - setGraphicSize(Std.int(width * 6)); - updateHitbox(); - - antialiasing = false; - case 'senpai-angry': - frames = Paths.getSparrowAtlas('senpai', 'shared', true); - animation.addByPrefix('idle', 'Angry Senpai Idle', 24, false); - animation.addByPrefix('singUP', 'Angry Senpai UP NOTE', 24, false); - animation.addByPrefix('singLEFT', 'Angry Senpai LEFT NOTE', 24, false); - animation.addByPrefix('singRIGHT', 'Angry Senpai RIGHT NOTE', 24, false); - animation.addByPrefix('singDOWN', 'Angry Senpai DOWN NOTE', 24, false); - - loadOffsetFile(curCharacter); - barColor = 0xFFffaa6f; - playAnim('idle'); - - setGraphicSize(Std.int(width * 6)); - updateHitbox(); - - antialiasing = false; - - case 'spirit': - frames = Paths.getPackerAtlas('spirit', 'shared', true); - animation.addByPrefix('idle', "idle spirit_", 24, false); - animation.addByPrefix('singUP', "up_", 24, false); - animation.addByPrefix('singRIGHT', "right_", 24, false); - animation.addByPrefix('singLEFT', "left_", 24, false); - animation.addByPrefix('singDOWN', "spirit down_", 24, false); - - loadOffsetFile(curCharacter); - barColor = 0xFFff3c6e; - - setGraphicSize(Std.int(width * 6)); - updateHitbox(); - - playAnim('idle'); - - antialiasing = false; - - case 'parents-christmas': - frames = Paths.getSparrowAtlas('mom_dad_christmas_assets', 'shared', true); - animation.addByPrefix('idle', 'Parent Christmas Idle', 24, false); - animation.addByPrefix('singUP', 'Parent Up Note Dad', 24, false); - animation.addByPrefix('singDOWN', 'Parent Down Note Dad', 24, false); - animation.addByPrefix('singLEFT', 'Parent Left Note Dad', 24, false); - animation.addByPrefix('singRIGHT', 'Parent Right Note Dad', 24, false); - - animation.addByPrefix('singUP-alt', 'Parent Up Note Mom', 24, false); - animation.addByPrefix('singDOWN-alt', 'Parent Down Note Mom', 24, false); - animation.addByPrefix('singLEFT-alt', 'Parent Left Note Mom', 24, false); - animation.addByPrefix('singRIGHT-alt', 'Parent Right Note Mom', 24, false); - animation.addByIndices('idleLoop', "Parent Christmas Idle", [11, 12], "", 12, true); - - loadOffsetFile(curCharacter); - barColor = 0xFF9a00f8; - - playAnim('idle'); - default: - parseDataFile(); - } - - if (curCharacter.startsWith('bf')) - dance(); + parseDataFile(); if (isPlayer && frames != null) { @@ -430,8 +82,13 @@ class Character extends FlxSprite } var data:CharacterData = cast jsonData; + var tex:FlxAtlasFrames; + + if (data.usePackerAtlas) + tex = Paths.getPackerAtlas(data.asset, 'shared'); + else + tex = Paths.getSparrowAtlas(data.asset, 'shared'); - var tex:FlxAtlasFrames = Paths.getSparrowAtlas(data.asset, 'shared'); frames = tex; if (frames != null) for (anim in data.animations) @@ -451,22 +108,36 @@ class Character extends FlxSprite } animOffsets[anim.name] = anim.offsets == null ? [0, 0] : anim.offsets; - } + animInterrupt[anim.name] = anim.interrupt == null ? true : anim.interrupt; - barColor = FlxColor.fromString(data.barColor); + if (data.isDancing && anim.isDanced != null) + animDanced[anim.name] = anim.isDanced; - playAnim(data.startingAnim); - } + if (anim.nextAnim != null) + animNext[anim.name] = anim.nextAnim; + } - public function loadOffsetFile(character:String, library:String = 'shared') - { - var offset:Array = CoolUtil.coolTextFile(Paths.txt('images/characters/' + character + "Offsets", library)); + this.replacesGF = data.replacesGF == null ? false : data.replacesGF; + this.hasTrail = data.hasTrail == null ? false : data.hasTrail; + this.isDancing = data.isDancing == null ? false : data.isDancing; + this.charPos = data.charPos == null ? [0, 0] : data.charPos; + this.camPos = data.camPos == null ? [0, 0] : data.camPos; + this.camFollow = data.camFollow == null ? [0, 0] : data.camFollow; + this.holdLength = data.holdLength == null ? 4 : data.holdLength; + + flipX = data.flipX == null ? false : data.flipX; - for (i in 0...offset.length) + if (data.scale != null) { - var data:Array = offset[i].split(' '); - addOffset(data[0], Std.parseInt(data[1]), Std.parseInt(data[2])); + setGraphicSize(Std.int(width * data.scale)); + updateHitbox(); } + + antialiasing = data.antialiasing == null ? FlxG.save.data.antialiasing : data.antialiasing; + + barColor = FlxColor.fromString(data.barColor); + + playAnim(data.startingAnim); } override function update(elapsed:Float) @@ -474,45 +145,28 @@ class Character extends FlxSprite if (!isPlayer) { if (animation.curAnim.name.startsWith('sing')) - { holdTimer += elapsed; - } - if (curCharacter.endsWith('-car') - && !animation.curAnim.name.startsWith('sing') - && animation.curAnim.finished - && animation.getByName('idleHair') != null) - playAnim('idleHair'); - - if (animation.getByName('idleLoop') != null) + if (holdTimer >= Conductor.stepCrochet * holdLength * 0.001) { - if (!animation.curAnim.name.startsWith('sing') && animation.curAnim.finished) - playAnim('idleLoop'); - } - - var dadVar:Float = 4; - - if (curCharacter == 'dad') - dadVar = 6.1; - else if (curCharacter == 'gf' || curCharacter == 'spooky') - dadVar = 4.1; // fix double dances - if (holdTimer >= Conductor.stepCrochet * dadVar * 0.001) - { - if (curCharacter == 'gf' || curCharacter == 'spooky') + if (isDancing) playAnim('danceLeft'); // overridden by dance correctly later dance(); holdTimer = 0; } } - switch (curCharacter) + if (!debugMode) { - case 'gf': - if (animation.curAnim.name == 'hairFall' && animation.curAnim.finished) - { - danced = true; - playAnim('danceRight'); - } + var nextAnim = animNext.get(animation.curAnim.name); + var forceDanced = animDanced.get(animation.curAnim.name); + + if (nextAnim != null && animation.curAnim.finished) + { + if (isDancing && forceDanced != null) + danced = forceDanced; + playAnim(nextAnim); + } } super.update(elapsed); @@ -527,40 +181,36 @@ class Character extends FlxSprite { if (!debugMode) { - switch (curCharacter) + var canInterrupt = animInterrupt.get(animation.curAnim.name); + + if (canInterrupt) { - case 'gf' | 'gf-christmas' | 'gf-car' | 'gf-pixel': - if (!animation.curAnim.name.startsWith('hair') && !animation.curAnim.name.startsWith('sing')) - { - danced = !danced; + if (isDancing) + { + danced = !danced; + if (altAnim && animation.getByName('danceRight-alt') != null && animation.getByName('danceLeft-alt') != null) + { if (danced) - playAnim('danceRight'); + playAnim('danceRight-alt'); else - playAnim('danceLeft'); + playAnim('danceLeft-alt'); } - case 'spooky': - if (!animation.curAnim.name.startsWith('sing')) + else { - danced = !danced; - if (danced) playAnim('danceRight'); else playAnim('danceLeft'); } - /* - // new dance code is gonna end up cutting off animation with the idle - // so here's example code that'll fix it. just adjust it to ya character 'n shit - case 'custom character': - if (!animation.curAnim.name.endsWith('custom animation')) - playAnim('idle', forced); - */ - default: + } + else + { if (altAnim && animation.getByName('idle-alt') != null) playAnim('idle-alt', forced); else playAnim('idle', forced); + } } } } @@ -615,12 +265,61 @@ typedef CharacterData = var asset:String; var startingAnim:String; + var ?charPos:Array; + var ?camPos:Array; + var ?camFollow:Array; + var ?holdLength:Float; + /** * The color of this character's health bar. */ var barColor:String; var animations:Array; + + /** + * Whether this character is flipped horizontally. + * @default false + */ + var ?flipX:Bool; + + /** + * The scale of this character. + * Pixel characters typically use 6. + * @default 1 + */ + var ?scale:Int; + + /** + * Whether this character has antialiasing. + * @default true + */ + var ?antialiasing:Bool; + + /** + * Whether this character uses PackerAtlas. + * @default false + */ + var ?usePackerAtlas:Bool; + + /** + * Whether this character uses a dancing idle instead of a regular idle. + * (ex. gf, spooky) + * @default false + */ + var ?isDancing:Bool; + + /** + * Whether this character has a trail behind them. + * @default false + */ + var ?hasTrail:Bool; + + /** + * Whether this character replaces gf if they are set as dad. + * @default false + */ + var ?replacesGF:Bool; } typedef AnimationData = @@ -645,4 +344,21 @@ typedef AnimationData = var ?frameRate:Int; var ?frameIndices:Array; + + /** + * Whether this animation can be interrupted by the dance function. + * @default true + */ + var ?interrupt:Bool; + + /** + * The animation that this animation will go to after it is finished. + */ + var ?nextAnim:String; + + /** + * Whether this animation sets danced to true or false. + * Only works for characters with isDancing enabled. + */ + var ?isDanced:Bool; } diff --git a/source/ChartingState.hx b/source/ChartingState.hx index e02c9bc3138..f2145a7c76c 100644 --- a/source/ChartingState.hx +++ b/source/ChartingState.hx @@ -1,5 +1,6 @@ package; +import openfl.net.FileFilter; import Song.SongMeta; import openfl.system.System; import lime.app.Application; @@ -166,6 +167,8 @@ class ChartingState extends MusicBeatState FlxG.mouse.visible = true; + PlayState.inDaPlay = false; + instance = this; deezNuts.set(4, 1); @@ -303,8 +306,6 @@ class ChartingState extends MusicBeatState recalculateAllSectionTimes(); - poggers(); - Debug.logTrace("Song length in MS: " + FlxG.sound.music.length); for (i in 0...9000000) // REALLY HIGH BEATS just cuz like ig this is the upper limit, I mean ur chart is probably going to run like ass anyways @@ -739,7 +740,6 @@ class ChartingState extends MusicBeatState Debug.logTrace(i.bpm + " - START: " + i.startBeat + " - END: " + i.endBeat + " - START-TIME: " + i.startTime); recalculateAllSectionTimes(); - poggers(); regenerateLines(); }); @@ -821,7 +821,6 @@ class ChartingState extends MusicBeatState } recalculateAllSectionTimes(); - poggers(); regenerateLines(); }); @@ -1728,6 +1727,8 @@ class ChartingState extends MusicBeatState { var notes = []; + Debug.logTrace("Basing everything on BPM which will in fact fuck up the sections"); + for (section in _song.notes) { var removed = []; @@ -1735,17 +1736,17 @@ class ChartingState extends MusicBeatState for (note in section.sectionNotes) { // commit suicide - var old = note[0]; - note[0] = TimingStruct.getTimeFromBeat(note[4]); - note[2] = TimingStruct.getTimeFromBeat(TimingStruct.getBeatFromTime(note[2])); - if (note[0] < section.startTime) + var old = [note[0], note[1], note[2], note[3], note[4]]; + old[0] = TimingStruct.getTimeFromBeat(old[4]); + old[2] = TimingStruct.getTimeFromBeat(TimingStruct.getBeatFromTime(old[0])); + if (old[0] < section.startTime && old[0] < section.endTime) { - notes.push(note); + notes.push(old); removed.push(note); } - if (note[0] > section.endTime) + if (old[0] > section.endTime && old[0] > section.startTime) { - notes.push(note); + notes.push(old); removed.push(note); } } @@ -1762,7 +1763,7 @@ class ChartingState extends MusicBeatState for (i in notes) { - if (i[0] >= section.startTime && i[0] < section.endTime) + if (i[0] >= section.startTime && i[0] <= section.endTime) { saveRemove.push(i); section.sectionNotes.push(i); diff --git a/source/Debug.hx b/source/Debug.hx index bd1142ac3dc..c0e15c6eab3 100644 --- a/source/Debug.hx +++ b/source/Debug.hx @@ -80,11 +80,12 @@ class Debug */ public static function logTrace(input:Dynamic, ?pos:haxe.PosInfos):Void { + #if debug if (input == null) return; var output = formatOutput(input, pos); - writeToFlxGLog(output, LOG_STYLE_TRACE); writeToLogFile(output, 'TRACE'); + #end } /** diff --git a/source/GameplayCustomizeState.hx b/source/GameplayCustomizeState.hx index 72d76b3c4ab..a8559667637 100644 --- a/source/GameplayCustomizeState.hx +++ b/source/GameplayCustomizeState.hx @@ -195,19 +195,32 @@ class GameplayCustomizeState extends MusicBeatState } } - camPos = new FlxPoint(boyfriend.getMidpoint().x - 100, boyfriend.getMidpoint().y - 100); + gf.x += gf.charPos[0]; + gf.y += gf.charPos[1]; + dad.x += dad.charPos[0]; + dad.y += dad.charPos[1]; + boyfriend.x += boyfriend.charPos[0]; + boyfriend.y += boyfriend.charPos[1]; - switch (dad.curCharacter) + camPos = new FlxPoint(dad.getGraphicMidpoint().x + dad.camPos[0], dad.getGraphicMidpoint().y + dad.camPos[1]); + + if (dad.replacesGF) { - case 'gf': - dad.setPosition(gf.x, gf.y); - gf.visible = false; - case 'spirit': - if (FlxG.save.data.distractions) - { - var evilTrail = new FlxTrail(dad, null, 4, 24, 0.3, 0.069); - add(evilTrail); - } + dad.setPosition(gf.x, gf.y); + gf.visible = false; + } + + if (dad.hasTrail) + { + if (FlxG.save.data.distractions) + { + // trailArea.scrollFactor.set(); + var evilTrail = new FlxTrail(dad, null, 4, 24, 0.3, 0.069); + // evilTrail.changeValuesEnabled(false, false, false, false); + // evilTrail.changeGraphic() + add(evilTrail); + // evilTrail.scrollFactor.set(1.1, 1.1); + } } camFollow = new FlxObject(0, 0, 1, 1); @@ -221,8 +234,8 @@ class GameplayCustomizeState extends MusicBeatState case 'mall': camFollow.y = boyfriend.getMidpoint().y - 200; case 'school' | 'schoolEvil': - camFollow.x = boyfriend.getMidpoint().x - 200; - camFollow.y = boyfriend.getMidpoint().y - 200; + camFollow.x = boyfriend.getMidpoint().x - 300; + camFollow.y = boyfriend.getMidpoint().y - 300; } add(camFollow); @@ -355,8 +368,8 @@ class GameplayCustomizeState extends MusicBeatState if (FlxG.mouse.overlaps(sick) && FlxG.mouse.pressed) { - sick.x = (FlxG.mouse.x - (sick.width + 145)); - sick.y = (FlxG.mouse.y - (sick.height + 145)); + sick.x = (FlxG.mouse.screenX - (sick.width + 145)); + sick.y = (FlxG.mouse.screenY - (sick.height + 145)); } for (i in playerStrums) @@ -490,8 +503,13 @@ class GameplayCustomizeState extends MusicBeatState boyfriend.dance(); dad.dance(); } - else if (dad.curCharacter == 'spooky' || dad.curCharacter == 'gf') - dad.dance(); + else if (curBeat % 2 != 0) + { + if (boyfriend.isDancing) + boyfriend.dance(); + if (dad.isDancing) + dad.dance(); + } gf.dance(); diff --git a/source/KadeEngineData.hx b/source/KadeEngineData.hx index eedd5d560c4..d3cd0a5484c 100644 --- a/source/KadeEngineData.hx +++ b/source/KadeEngineData.hx @@ -36,6 +36,12 @@ class KadeEngineData if (FlxG.save.data.fps == null) FlxG.save.data.fps = false; + if (FlxG.save.data.fpsBorder == null) + FlxG.save.data.fpsBorder = false; + + if (FlxG.save.data.rotateSprites == null) + FlxG.save.data.rotateSprites = true; + if (FlxG.save.data.changedHit == null) { FlxG.save.data.changedHitX = -1; @@ -46,6 +52,9 @@ class KadeEngineData if (FlxG.save.data.fpsRain == null) FlxG.save.data.fpsRain = false; + if (FlxG.save.data.memoryDisplay == null) + FlxG.save.data.memoryDisplay = false; + if (FlxG.save.data.fpsCap == null) FlxG.save.data.fpsCap = 120; @@ -112,6 +121,9 @@ class KadeEngineData if (FlxG.save.data.optimize == null) FlxG.save.data.optimize = false; + if (FlxG.save.data.roundAccuracy == null) + FlxG.save.data.roundAccuracy = false; + FlxG.save.data.cacheImages = false; if (FlxG.save.data.middleScroll == null) diff --git a/source/KadeEngineFPS.hx b/source/KadeEngineFPS.hx index 9a99ae6c9d1..bfb4ddbd926 100644 --- a/source/KadeEngineFPS.hx +++ b/source/KadeEngineFPS.hx @@ -1,3 +1,4 @@ +import openfl.system.System; import flixel.math.FlxMath; import flixel.util.FlxColor; import openfl.Lib; @@ -31,6 +32,8 @@ class KadeEngineFPS extends TextField **/ public var currentFPS(default, null):Int; + public var memoryUsage:Float; + public var bitmap:Bitmap; @:noCompletion private var cacheCount:Int; @@ -62,9 +65,6 @@ class KadeEngineFPS extends TextField __enterFrame(time - currentTime); }); #end - - bitmap = ImageOutline.renderImage(this, 1, 0x000000, 1, true); - (cast(Lib.current.getChildAt(0), Main)).addChild(bitmap); } var array:Array = [ @@ -123,15 +123,22 @@ class KadeEngineFPS extends TextField #end } - visible = true; - - Main.instance.removeChild(bitmap); - - bitmap = ImageOutline.renderImage(this, 2, 0x000000, 1); + if (FlxG.save.data.fpsBorder) + { + visible = true; + Main.instance.removeChild(bitmap); - Main.instance.addChild(bitmap); + bitmap = ImageOutline.renderImage(this, 2, 0x000000, 1); - visible = false; + Main.instance.addChild(bitmap); + visible = false; + } + else + { + visible = true; + if (Main.instance.contains(bitmap)) + Main.instance.removeChild(bitmap); + } cacheCount = currentCount; } diff --git a/source/MainMenuState.hx b/source/MainMenuState.hx index 4bd5188e3d5..344a4fcdb58 100644 --- a/source/MainMenuState.hx +++ b/source/MainMenuState.hx @@ -39,7 +39,7 @@ class MainMenuState extends MusicBeatState public static var nightly:String = ""; - public static var kadeEngineVer:String = "1.8" + nightly; + public static var kadeEngineVer:String = "1.8.1" + nightly; public static var gameVer:String = "0.2.7.1"; var magenta:FlxSprite; diff --git a/source/MusicBeatState.hx b/source/MusicBeatState.hx index 77e952149ef..2a0169a7649 100644 --- a/source/MusicBeatState.hx +++ b/source/MusicBeatState.hx @@ -72,6 +72,8 @@ class MusicBeatState extends FlxUIState Application.current.window.onFocusOut.add(onWindowFocusOut); TimingStruct.clearTimings(); + KeyBinds.keyCheck(); + if (transIn != null) trace('reg ' + transIn.region); @@ -169,8 +171,6 @@ class MusicBeatState extends FlxUIState } } - (cast(Lib.current.getChildAt(0), Main)).setFPSCap(FlxG.save.data.fpsCap); - super.update(elapsed); } diff --git a/source/Note.hx b/source/Note.hx index 45f9aa688c4..3e66441bf70 100644 --- a/source/Note.hx +++ b/source/Note.hx @@ -111,9 +111,6 @@ class Note extends FlxSprite if (this.strumTime < 0) this.strumTime = 0; - if (!inCharter) - y += FlxG.save.data.offset + PlayState.songOffset; - this.noteData = noteData; var daStage:String = ((PlayState.instance != null && !PlayStateChangeables.Optimize) ? PlayState.Stage.curStage : 'stage'); @@ -188,7 +185,7 @@ class Note extends FlxSprite animation.play(dataColor[noteData] + 'Scroll'); originColor = noteData; // The note's origin color will be checked by its sustain notes - if (FlxG.save.data.stepMania && !isSustainNote && !PlayState.instance.executeModchart) + if (FlxG.save.data.stepMania && !isSustainNote && !(PlayState.instance != null ? PlayState.instance.executeModchart : false)) { var col:Int = 0; @@ -210,9 +207,12 @@ class Note extends FlxSprite col = quantityColor[4]; animation.play(dataColor[col] + 'Scroll'); - localAngle -= arrowAngles[col]; - localAngle += arrowAngles[noteData]; - originAngle = localAngle; + if (FlxG.save.data.rotateSprites) + { + localAngle -= arrowAngles[col]; + localAngle += arrowAngles[noteData]; + originAngle = localAngle; + } originColor = col; } @@ -229,7 +229,7 @@ class Note extends FlxSprite if (isSustainNote && prevNote != null) { - noteYOff = Math.round(-stepHeight + swagWidth * 0.5); + noteYOff = Math.round(-stepHeight + swagWidth * 0.5) + FlxG.save.data.offset + PlayState.songOffset; noteScore * 0.2; alpha = 0.6; diff --git a/source/Options.hx b/source/Options.hx index 6f16fda1842..51135909a8a 100644 --- a/source/Options.hx +++ b/source/Options.hx @@ -558,6 +558,34 @@ class ShitMsOption extends Option } } +class RoundAccuracy extends Option +{ + public function new(desc:String) + { + super(); + description = desc; + } + + public override function left():Bool + { + FlxG.save.data.roundAccuracy = !FlxG.save.data.roundAccuracy; + + display = updateDisplay(); + return true; + } + + public override function right():Bool + { + left(); + return true; + } + + private override function updateDisplay():String + { + return "Round Accuracy: < " + (FlxG.save.data.roundAccuracy ? "on" : "off") + " >"; + } +} + class CpuStrums extends Option { public function new(desc:String) @@ -1391,6 +1419,60 @@ class OffsetMenu extends Option } } +class BorderFps extends Option +{ + public function new(desc:String) + { + super(); + description = desc; + } + + public override function left():Bool + { + FlxG.save.data.fpsBorder = !FlxG.save.data.fpsBorder; + display = updateDisplay(); + return true; + } + + public override function right():Bool + { + left(); + return true; + } + + private override function updateDisplay():String + { + return "FPS Border: < " + (!FlxG.save.data.fpsBorder ? "off" : "on") + " >"; + } +} + +class DisplayMemory extends Option +{ + public function new(desc:String) + { + super(); + description = desc; + } + + public override function left():Bool + { + FlxG.save.data.memoryDisplay = !FlxG.save.data.memoryDisplay; + display = updateDisplay(); + return true; + } + + public override function right():Bool + { + left(); + return true; + } + + private override function updateDisplay():String + { + return "Memory Display: < " + (!FlxG.save.data.memoryDisplay ? "off" : "on") + " >"; + } +} + class OffsetThing extends Option { public function new(desc:String) @@ -1422,12 +1504,12 @@ class OffsetThing extends Option private override function updateDisplay():String { - return "Note offset: < " + HelperFunctions.truncateFloat(FlxG.save.data.offset, 0) + " >"; + return "Visual offset: < " + HelperFunctions.truncateFloat(FlxG.save.data.offset, 0) + " >"; } public override function getValue():String { - return "Note offset: < " + HelperFunctions.truncateFloat(FlxG.save.data.offset, 0) + " >"; + return "Visual offset: < " + HelperFunctions.truncateFloat(FlxG.save.data.offset, 0) + " >"; } } @@ -1553,6 +1635,38 @@ class MiddleScrollOption extends Option } } +class RotateSpritesOption extends Option +{ + public function new(desc:String) + { + super(); + if (OptionsMenu.isInPause) + description = "This option cannot be toggled in the pause menu."; + else + description = desc; + } + + public override function left():Bool + { + if (OptionsMenu.isInPause) + return false; + FlxG.save.data.rotateSprites = !FlxG.save.data.rotateSprites; + display = updateDisplay(); + return true; + } + + public override function right():Bool + { + left(); + return true; + } + + private override function updateDisplay():String + { + return "Rotate Sprites: < " + (FlxG.save.data.rotateSprites ? "Enabled" : "Disabled") + " >"; + } +} + class NoteskinOption extends Option { public function new(desc:String) @@ -1815,6 +1929,7 @@ class ResetSettings extends Option FlxG.save.data.flashing = null; FlxG.save.data.resetButton = null; FlxG.save.data.botplay = null; + FlxG.save.data.roundAccuracy = null; FlxG.save.data.cpuStrums = null; FlxG.save.data.strumline = null; FlxG.save.data.customStrumLine = null; diff --git a/source/OptionsMenu.hx b/source/OptionsMenu.hx index cbb7108f155..61bc983d859 100644 --- a/source/OptionsMenu.hx +++ b/source/OptionsMenu.hx @@ -119,7 +119,7 @@ class OptionsMenu extends FlxSubState options = [ new OptionCata(50, 40, "Gameplay", [ new ScrollSpeedOption("Change your scroll speed. (1 = Chart dependent)"), - new OffsetThing("Change the note audio offset (how many milliseconds a note is offset in a chart)"), + new OffsetThing("Change the note visual offset (how many milliseconds a note looks like it is offset in a chart)"), new AccuracyDOption("Change how accuracy is calculated. (Accurate = Simple, Complex = Milisecond Based)"), new GhostTapOption("Toggle counting pressing a directional input when no arrow is there as a miss."), new DownscrollOption("Toggle making the notes scroll down rather than up."), @@ -135,17 +135,21 @@ class OptionsMenu extends FlxSubState new CustomizeGameplay("Drag and drop gameplay modules to your prefered positions!") ]), new OptionCata(345, 40, "Appearance", [ - new NoteskinOption("Change your current noteskin"), new EditorRes("Not showing the editor grid will greatly increase editor performance"), + new NoteskinOption("Change your current noteskin"), + new RotateSpritesOption("Should the game rotate the sprites to do color quantization (turn off for bar skins)"), + new EditorRes("Not showing the editor grid will greatly increase editor performance"), new DistractionsAndEffectsOption("Toggle stage distractions that can hinder your gameplay."), new MiddleScrollOption("Put your lane in the center or on the right."), new HealthBarOption("Toggles health bar visibility"), new JudgementCounter("Show your judgements that you've gotten in the song"), new LaneUnderlayOption("How transparent your lane is, higher = more visible."), new StepManiaOption("Sets the colors of the arrows depending on quantization instead of direction."), new AccuracyOption("Display accuracy information on the info bar."), + new RoundAccuracy("Round your accuracy to the nearest whole number for the score text (cosmetic only)."), new SongPositionOption("Show the song's current position as a scrolling bar."), new Colour("The color behind icons now fit with their theme. (e.g. Pico = green)"), new NPSDisplayOption("Shows your current Notes Per Second on the info bar."), new RainbowFPSOption("Make the FPS Counter flicker through rainbow colors."), + new BorderFps("Draw a border around the FPS Text (Consumes a lot of CPU Resources)"), new CpuStrums("Toggle the CPU's strumline lighting up when it hits a note."), ]), new OptionCata(640, 40, "Misc", [ diff --git a/source/PlayState.hx b/source/PlayState.hx index 8dd1f29986a..5d61a396951 100644 --- a/source/PlayState.hx +++ b/source/PlayState.hx @@ -624,42 +624,41 @@ class PlayState extends MusicBeatState } } - camPos = new FlxPoint(dad.getGraphicMidpoint().x, dad.getGraphicMidpoint().y); + gf.x += gf.charPos[0]; + gf.y += gf.charPos[1]; + dad.x += dad.charPos[0]; + dad.y += dad.charPos[1]; + boyfriend.x += boyfriend.charPos[0]; + boyfriend.y += boyfriend.charPos[1]; - switch (dad.curCharacter) + camPos = new FlxPoint(dad.getGraphicMidpoint().x + dad.camPos[0], dad.getGraphicMidpoint().y + dad.camPos[1]); + + if (dad.replacesGF) { - case 'gf': - if (!stageTesting) - dad.setPosition(gf.x, gf.y); - gf.visible = false; - if (isStoryMode) - { - camPos.x += 600; - tweenCamIn(); - } - case 'dad': - camPos.x += 400; - case 'pico': + if (!stageTesting) + dad.setPosition(gf.x, gf.y); + gf.visible = false; + if (isStoryMode) + { camPos.x += 600; - case 'senpai': - camPos.set(dad.getGraphicMidpoint().x + 300, dad.getGraphicMidpoint().y); - case 'senpai-angry': - camPos.set(dad.getGraphicMidpoint().x + 300, dad.getGraphicMidpoint().y); - case 'spirit': - if (FlxG.save.data.distractions) + tweenCamIn(); + } + } + + if (dad.hasTrail) + { + if (FlxG.save.data.distractions) + { + // trailArea.scrollFactor.set(); + if (!PlayStateChangeables.Optimize) { - // trailArea.scrollFactor.set(); - if (!PlayStateChangeables.Optimize) - { - var evilTrail = new FlxTrail(dad, null, 4, 24, 0.3, 0.069); - // evilTrail.changeValuesEnabled(false, false, false, false); - // evilTrail.changeGraphic() - add(evilTrail); - } - // evilTrail.scrollFactor.set(1.1, 1.1); + var evilTrail = new FlxTrail(dad, null, 4, 24, 0.3, 0.069); + // evilTrail.changeValuesEnabled(false, false, false, false); + // evilTrail.changeGraphic() + add(evilTrail); } - - camPos.set(dad.getGraphicMidpoint().x + 300, dad.getGraphicMidpoint().y); + // evilTrail.scrollFactor.set(1.1, 1.1); + } } Stage.update(0); @@ -837,6 +836,10 @@ class PlayState extends MusicBeatState Debug.logTrace("Removed " + toBeRemoved.length + " cuz of start time"); } + for (i in 0...unspawnNotes.length) + if (unspawnNotes[i].strumTime < startTime) + unspawnNotes.remove(unspawnNotes[i]); + trace('generated'); // add(strumLine); @@ -892,7 +895,8 @@ class PlayState extends MusicBeatState scoreTxt.screenCenter(X); scoreTxt.scrollFactor.set(); scoreTxt.setFormat(Paths.font("vcr.ttf"), 16, FlxColor.WHITE, FlxTextAlign.CENTER, FlxTextBorderStyle.OUTLINE, FlxColor.BLACK); - scoreTxt.text = Ratings.CalculateRanking(songScore, songScoreDef, nps, maxNPS, accuracy); + scoreTxt.text = Ratings.CalculateRanking(songScore, songScoreDef, nps, maxNPS, + (FlxG.save.data.roundAccuracy ? FlxMath.roundDecimal(accuracy, 0) : accuracy)); if (!FlxG.save.data.healthBar) scoreTxt.y = healthBarBG.y; @@ -1164,8 +1168,13 @@ class PlayState extends MusicBeatState if (idleToBeat) dad.dance(forcedToIdle); } - else if (dad.curCharacter == 'spooky' || dad.curCharacter == 'gf') - dad.dance(); + else if (swagCounter % idleBeat != 0) + { + if (boyfriend.isDancing && !boyfriend.animation.curAnim.name.endsWith("miss")) + boyfriend.dance(); + if (dad.isDancing) + dad.dance(); + } var introAssets:Map> = new Map>(); introAssets.set('default', ['ready', "set", "go"]); @@ -1520,10 +1529,6 @@ class PlayState extends MusicBeatState trace("pitched inst and vocals to " + songMultiplier); #end - for (i in 0...unspawnNotes.length) - if (unspawnNotes[i].strumTime < startTime) - unspawnNotes.remove(unspawnNotes[i]); - if (needSkip) { skipActive = true; @@ -1960,6 +1965,8 @@ class PlayState extends MusicBeatState function resyncVocals():Void { + if (endingSong) + return; vocals.stop(); FlxG.sound.music.stop(); @@ -1978,6 +1985,8 @@ class PlayState extends MusicBeatState #end } + // ballsex - etterna + #if FEATURE_DISCORD DiscordClient.changePresence(detailsText + " " @@ -1995,6 +2004,11 @@ class PlayState extends MusicBeatState #end } + function percentageOfSong():Float + { + return (Conductor.songPosition / songLength) * 100; + } + public var paused:Bool = false; var startedCountdown:Bool = false; @@ -2030,11 +2044,10 @@ class PlayState extends MusicBeatState if (unspawnNotes[0] != null) { - if (unspawnNotes[0].strumTime - Conductor.songPosition < 14000 * songMultiplier) + if (unspawnNotes[0].strumTime - Conductor.songPosition < 14000) { var dunceNote:Note = unspawnNotes[0]; notes.add(dunceNote); - #if FEATURE_LUAMODCHART if (executeModchart) { @@ -2057,8 +2070,7 @@ class PlayState extends MusicBeatState dunceNote.cameras = [camHUD]; } - var index:Int = unspawnNotes.indexOf(dunceNote); - unspawnNotes.splice(index, 1); + unspawnNotes.remove(dunceNote); currentLuaIndex++; } } @@ -2249,21 +2261,20 @@ class PlayState extends MusicBeatState // reverse iterate to remove oldest notes first and not invalidate the iteration // stop iteration as soon as a note is not removed // all notes should be kept in the correct order and this is optimal, safe to do every frame/update + + var balls = notesHitArray.length - 1; + while (balls >= 0) { - var balls = notesHitArray.length - 1; - while (balls >= 0) - { - var cock:Date = notesHitArray[balls]; - if (cock != null && cock.getTime() + 1000 < Date.now().getTime()) - notesHitArray.remove(cock); - else - balls = 0; - balls--; - } - nps = notesHitArray.length; - if (nps > maxNPS) - maxNPS = nps; + var cock:Date = notesHitArray[balls]; + if (cock != null && cock.getTime() + 1000 < Date.now().getTime()) + notesHitArray.remove(cock); + else + balls = 0; + balls--; } + nps = notesHitArray.length; + if (nps > maxNPS) + maxNPS = nps; if (FlxG.keys.justPressed.NINE) iconP1.swapOldIcon(); @@ -2346,8 +2357,9 @@ class PlayState extends MusicBeatState // FlxG.watch.addQuick('VOL', vocals.amplitudeLeft); // FlxG.watch.addQuick('VOLRight', vocals.amplitudeRight); - iconP1.setGraphicSize(Std.int(FlxMath.lerp(150, iconP1.width, 0.50))); - iconP2.setGraphicSize(Std.int(FlxMath.lerp(150, iconP2.width, 0.50))); + var iconLerp = 0.5; + iconP1.setGraphicSize(Std.int(FlxMath.lerp(150, iconP1.width, iconLerp))); + iconP2.setGraphicSize(Std.int(FlxMath.lerp(150, iconP2.width, iconLerp))); iconP1.updateHitbox(); iconP2.updateHitbox(); @@ -2530,6 +2542,9 @@ class PlayState extends MusicBeatState // Conductor.songPosition = FlxG.sound.music.time; Conductor.songPosition += FlxG.elapsed * 1000; Conductor.rawPosition = FlxG.sound.music.time; + + // sync + /*@:privateAccess { FlxG.sound.music._channel. @@ -2700,14 +2715,8 @@ class PlayState extends MusicBeatState #end // camFollow.setPosition(lucky.getMidpoint().x - 120, lucky.getMidpoint().y + 210); - switch (dad.curCharacter) - { - case 'mom' | 'mom-car': - camFollow.y = dad.getMidpoint().y; - case 'senpai' | 'senpai-angry': - camFollow.y = dad.getMidpoint().y - 430; - camFollow.x = dad.getMidpoint().x - 100; - } + camFollow.x += dad.camFollow[0]; + camFollow.y += dad.camFollow[1]; } if (currentSection.mustHitSection && camFollow.x != boyfriend.getMidpoint().x - 100) @@ -2734,13 +2743,13 @@ class PlayState extends MusicBeatState camFollow.x = boyfriend.getMidpoint().x - 300; case 'mall': camFollow.y = boyfriend.getMidpoint().y - 200; - case 'school': - camFollow.x = boyfriend.getMidpoint().x - 200; - camFollow.y = boyfriend.getMidpoint().y - 200; - case 'schoolEvil': - camFollow.x = boyfriend.getMidpoint().x - 200; - camFollow.y = boyfriend.getMidpoint().y - 200; + case 'school' | 'schoolEvil': + camFollow.x = boyfriend.getMidpoint().x - 300; + camFollow.y = boyfriend.getMidpoint().y - 300; } + + camFollow.x += boyfriend.camFollow[0]; + camFollow.y += boyfriend.camFollow[1]; } } @@ -2927,15 +2936,6 @@ class PlayState extends MusicBeatState daNote.clipRect = swagRect; } } - - if (daNote.isParent) - { - for (i in 0...daNote.children.length) - { - var slide = daNote.children[i]; - slide.y = daNote.y - slide.height; - } - } } else { @@ -3164,6 +3164,8 @@ class PlayState extends MusicBeatState } else if (!daNote.wasGoodHit && !daNote.isSustainNote) { + misses++; + updateAccuracy(); health -= 0.15; } } @@ -3216,6 +3218,8 @@ class PlayState extends MusicBeatState } else if (!daNote.wasGoodHit && !daNote.isSustainNote) { + misses++; + updateAccuracy(); health -= 0.15; } } @@ -4227,7 +4231,8 @@ class PlayState extends MusicBeatState accuracy = Math.max(0, totalNotesHit / totalPlayed * 100); accuracyDefault = Math.max(0, totalNotesHitDefault / totalPlayed * 100); - scoreTxt.text = Ratings.CalculateRanking(songScore, songScoreDef, nps, maxNPS, accuracy); + scoreTxt.text = Ratings.CalculateRanking(songScore, songScoreDef, nps, maxNPS, + (FlxG.save.data.roundAccuracy ? FlxMath.roundDecimal(accuracy, 0) : accuracy)); judgementCounter.text = 'Sicks: ${sicks}\nGoods: ${goods}\nBads: ${bads}\nShits: ${shits}\nMisses: ${misses}'; } @@ -4403,7 +4408,8 @@ class PlayState extends MusicBeatState override function stepHit() { super.stepHit(); - if (FlxG.sound.music.time > Conductor.rawPosition + 20 || FlxG.sound.music.time < Conductor.rawPosition - 20) + if (Conductor.songPosition * songMultiplier > FlxG.sound.music.time + 25 + || Conductor.songPosition * songMultiplier < FlxG.sound.music.time - 25) { resyncVocals(); } @@ -4442,8 +4448,13 @@ class PlayState extends MusicBeatState if (idleToBeat && !boyfriend.animation.curAnim.name.startsWith('sing')) boyfriend.dance(forcedToIdle, currentSection.playerAltAnim); } - else if ((dad.curCharacter == 'spooky' || dad.curCharacter == 'gf') && !dad.animation.curAnim.name.startsWith('sing')) - dad.dance(forcedToIdle, currentSection.CPUAltAnim); + else if (curBeat % idleBeat != 0) + { + if (boyfriend.isDancing && !boyfriend.animation.curAnim.name.startsWith('sing')) + boyfriend.dance(forcedToIdle, currentSection.CPUAltAnim); + if (dad.isDancing && !dad.animation.curAnim.name.startsWith('sing')) + dad.dance(forcedToIdle, currentSection.CPUAltAnim); + } } // FlxG.log.add('change bpm' + SONG.notes[Std.int(curStep / 16)].changeBPM); wiggleShit.update(Conductor.crochet); @@ -4465,8 +4476,8 @@ class PlayState extends MusicBeatState } if (songMultiplier == 1) { - iconP1.setGraphicSize(Std.int(iconP1.width + 30)); - iconP2.setGraphicSize(Std.int(iconP2.width + 30)); + iconP1.setGraphicSize(Std.int(iconP1.width + 45)); + iconP2.setGraphicSize(Std.int(iconP2.width + 45)); iconP1.updateHitbox(); iconP2.updateHitbox(); diff --git a/source/Stage.hx b/source/Stage.hx index 867015a1f2a..b731ee86cfc 100644 --- a/source/Stage.hx +++ b/source/Stage.hx @@ -73,6 +73,7 @@ class Stage extends MusicBeatState { var bg:FlxSprite = new FlxSprite(-100).loadGraphic(Paths.loadImage('philly/sky', 'week3')); bg.scrollFactor.set(0.1, 0.1); + bg.antialiasing = FlxG.save.data.antialiasing; swagBacks['bg'] = bg; toAdd.push(bg); @@ -80,6 +81,7 @@ class Stage extends MusicBeatState city.scrollFactor.set(0.3, 0.3); city.setGraphicSize(Std.int(city.width * 0.85)); city.updateHitbox(); + city.antialiasing = FlxG.save.data.antialiasing; swagBacks['city'] = city; toAdd.push(city); @@ -102,10 +104,12 @@ class Stage extends MusicBeatState } var streetBehind:FlxSprite = new FlxSprite(-40, 50).loadGraphic(Paths.loadImage('philly/behindTrain', 'week3')); + streetBehind.antialiasing = FlxG.save.data.antialiasing; swagBacks['streetBehind'] = streetBehind; toAdd.push(streetBehind); var phillyTrain = new FlxSprite(2000, 360).loadGraphic(Paths.loadImage('philly/train', 'week3')); + phillyTrain.antialiasing = FlxG.save.data.antialiasing; if (FlxG.save.data.distractions) { swagBacks['phillyTrain'] = phillyTrain; @@ -118,6 +122,7 @@ class Stage extends MusicBeatState // var cityLights:FlxSprite = new FlxSprite().loadGraphic(AssetPaths.win0.png); var street:FlxSprite = new FlxSprite(-40, streetBehind.y).loadGraphic(Paths.loadImage('philly/street', 'week3')); + street.antialiasing = FlxG.save.data.antialiasing; swagBacks['street'] = street; toAdd.push(street); } diff --git a/source/StageDebugState.hx b/source/StageDebugState.hx index fbec31360cb..b5bfda0a2a9 100644 --- a/source/StageDebugState.hx +++ b/source/StageDebugState.hx @@ -111,19 +111,21 @@ class StageDebugState extends FlxState posText.cameras = [camHUD]; add(posText); - addHelpText(); + addHelpText(); } - var helpText:FlxText; - function addHelpText():Void { - var helpTextValue = "Help:\nQ/E : Zoom in and out\nI/J/K/L : Pan Camera\nSpace : Cycle Object\nShift : Switch Mode (Char/Stage)\nClick and Drag : Move Active Object\nZ/X : Rotate Object\nR : Reset Rotation\nCTRL-S : Save Offsets to File\nESC : Return to Stage\nPress F1 to hide/show this!\n"; - helpText = new FlxText(940, 0, 0, helpTextValue, 15); - helpText.scrollFactor.set(); + var helpText:FlxText; + + function addHelpText():Void + { + var helpTextValue = "Help:\nQ/E : Zoom in and out\nI/J/K/L : Pan Camera\nSpace : Cycle Object\nShift : Switch Mode (Char/Stage)\nClick and Drag : Move Active Object\nZ/X : Rotate Object\nR : Reset Rotation\nCTRL-S : Save Offsets to File\nESC : Return to Stage\nPress F1 to hide/show this!\n"; + helpText = new FlxText(940, 0, 0, helpTextValue, 15); + helpText.scrollFactor.set(); helpText.cameras = [camHUD]; - helpText.color = FlxColor.WHITE; + helpText.color = FlxColor.WHITE; - add(helpText); - } + add(helpText); + } override public function update(elapsed:Float) { @@ -242,10 +244,10 @@ class StageDebugState extends FlxState if (FlxG.keys.pressed.CONTROL && FlxG.keys.justPressed.S) saveBoyPos(); - if (FlxG.keys.justPressed.F1) + if (FlxG.keys.justPressed.F1) FlxG.save.data.showHelp = !FlxG.save.data.showHelp; - helpText.visible = FlxG.save.data.showHelp; + helpText.visible = FlxG.save.data.showHelp; super.update(elapsed); }