diff --git a/assets/songs/spookeez/Inst.ogg b/assets/songs/spookeez/Inst.ogg index e14fd8b5c..86bb13064 100644 Binary files a/assets/songs/spookeez/Inst.ogg and b/assets/songs/spookeez/Inst.ogg differ diff --git a/assets/songs/spookeez/Voices.ogg b/assets/songs/spookeez/Voices.ogg index 1429044f5..70a3882a3 100644 Binary files a/assets/songs/spookeez/Voices.ogg and b/assets/songs/spookeez/Voices.ogg differ diff --git a/source/BackgroundDancer.hx b/source/BackgroundDancer.hx index a619dacc2..43a68c145 100644 --- a/source/BackgroundDancer.hx +++ b/source/BackgroundDancer.hx @@ -13,6 +13,7 @@ class BackgroundDancer extends FlxSprite animation.addByIndices('danceLeft', 'bg dancer sketch PINK', [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14], "", 24, false); animation.addByIndices('danceRight', 'bg dancer sketch PINK', [15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29], "", 24, false); animation.play('danceLeft'); + animation.finish(); antialiasing = true; } diff --git a/source/BackgroundGirls.hx b/source/BackgroundGirls.hx index c37b16f91..1a6030362 100644 --- a/source/BackgroundGirls.hx +++ b/source/BackgroundGirls.hx @@ -16,6 +16,7 @@ class BackgroundGirls extends FlxSprite animation.addByIndices('danceRight', 'BG girls group', CoolUtil.numberArray(30, 15), "", 24, false); animation.play('danceLeft'); + animation.finish(); } var danceDir:Bool = false; @@ -25,6 +26,7 @@ class BackgroundGirls extends FlxSprite animation.addByIndices('danceLeft', 'BG fangirls dissuaded', CoolUtil.numberArray(14), "", 24, false); animation.addByIndices('danceRight', 'BG fangirls dissuaded', CoolUtil.numberArray(30, 15), "", 24, false); dance(); + animation.finish(); } public function dance():Void diff --git a/source/Character.hx b/source/Character.hx index fcb1be91d..860fc7317 100644 --- a/source/Character.hx +++ b/source/Character.hx @@ -38,17 +38,17 @@ class Character extends FlxSprite // GIRLFRIEND CODE tex = Paths.getSparrowAtlas('characters/GF_assets'); 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); + quickAnimAdd('cheer', 'GF Cheer'); + quickAnimAdd('singLEFT', 'GF left note'); + quickAnimAdd('singRIGHT', 'GF Right Note'); + quickAnimAdd('singUP', 'GF Up Note'); + quickAnimAdd('singDOWN', 'GF Down Note'); 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); + animation.addByPrefix('scared', 'GF FEAR', 24, true); loadOffsetFile(curCharacter); @@ -57,17 +57,17 @@ class Character extends FlxSprite case 'gf-christmas': tex = Paths.getSparrowAtlas('christmas/gfChristmas'); 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); + quickAnimAdd('cheer', 'GF Cheer'); + quickAnimAdd('singLEFT', 'GF left note'); + quickAnimAdd('singRIGHT', 'GF Right Note'); + quickAnimAdd('singUP', 'GF Up Note'); + quickAnimAdd('singDOWN', 'GF Down Note'); 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); + animation.addByPrefix('scared', 'GF FEAR', 24, true); addOffset('cheer'); addOffset('sad', -2, -21); @@ -112,9 +112,11 @@ class Character extends FlxSprite 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); addOffset('danceLeft', 0); addOffset('danceRight', 0); + addOffset('idleHair', 0); playAnim('danceRight'); @@ -138,11 +140,11 @@ class Character extends FlxSprite // DAD ANIMATION LOADING CODE tex = Paths.getSparrowAtlas('DADDY_DEAREST'); frames = tex; - animation.addByPrefix('idle', 'Dad idle dance', 24); - animation.addByPrefix('singUP', 'Dad Sing Note UP', 24); - animation.addByPrefix('singRIGHT', 'Dad Sing Note RIGHT', 24); - animation.addByPrefix('singDOWN', 'Dad Sing Note DOWN', 24); - animation.addByPrefix('singLEFT', 'Dad Sing Note LEFT', 24); + quickAnimAdd('idle', 'Dad idle dance'); + quickAnimAdd('singUP', 'Dad Sing Note UP'); + quickAnimAdd('singRIGHT', 'Dad Sing Note RIGHT'); + quickAnimAdd('singDOWN', 'Dad Sing Note DOWN'); + quickAnimAdd('singLEFT', 'Dad Sing Note LEFT'); addOffset('idle'); addOffset("singUP", -6, 50); @@ -154,10 +156,10 @@ class Character extends FlxSprite case 'spooky': tex = Paths.getSparrowAtlas('spooky_kids_assets'); 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); + quickAnimAdd('singUP', 'spooky UP NOTE'); + quickAnimAdd('singDOWN', 'spooky DOWN note'); + quickAnimAdd('singLEFT', 'note sing left'); + quickAnimAdd('singRIGHT', 'spooky sing right'); animation.addByIndices('danceLeft', 'spooky dance idle', [0, 2, 6], "", 12, false); animation.addByIndices('danceRight', 'spooky dance idle', [8, 10, 12, 14], "", 12, false); @@ -174,13 +176,13 @@ class Character extends FlxSprite tex = Paths.getSparrowAtlas('Mom_Assets'); 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); + quickAnimAdd('idle', "Mom Idle"); + quickAnimAdd('singUP', "Mom Up Pose"); + quickAnimAdd('singDOWN', "MOM DOWN POSE"); + quickAnimAdd('singLEFT', 'Mom Left Pose'); // ANIMATION IS CALLED MOM LEFT POSE BUT ITS FOR THE RIGHT // CUZ DAVE IS DUMB! - animation.addByPrefix('singRIGHT', 'Mom Pose Left', 24, false); + quickAnimAdd('singRIGHT', 'Mom Pose Left'); addOffset('idle'); addOffset("singUP", 14, 71); @@ -194,29 +196,31 @@ class Character extends FlxSprite tex = Paths.getSparrowAtlas('momCar'); 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); + quickAnimAdd('idle', "Mom Idle"); + quickAnimAdd('singUP', "Mom Up Pose"); + quickAnimAdd('singDOWN', "MOM DOWN POSE"); + quickAnimAdd('singLEFT', 'Mom Left Pose'); // ANIMATION IS CALLED MOM LEFT POSE BUT ITS FOR THE RIGHT // CUZ DAVE IS DUMB! - animation.addByPrefix('singRIGHT', 'Mom Pose Left', 24, false); + quickAnimAdd('singRIGHT', 'Mom Pose Left'); + animation.addByIndices('idleHair', "Mom Idle", [10, 11, 12, 13], "", 24, true); addOffset('idle'); addOffset("singUP", 14, 71); addOffset("singRIGHT", 10, -60); addOffset("singLEFT", 250, -23); addOffset("singDOWN", 20, -160); + addOffset('idleHair'); playAnim('idle'); case 'monster': tex = Paths.getSparrowAtlas('Monster_Assets'); 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); + quickAnimAdd('idle', 'monster idle'); + quickAnimAdd('singUP', 'monster up note'); + quickAnimAdd('singDOWN', 'monster down'); + quickAnimAdd('singLEFT', 'Monster left note'); + quickAnimAdd('singRIGHT', 'Monster Right note'); addOffset('idle'); addOffset("singUP", -20, 94); @@ -227,11 +231,11 @@ class Character extends FlxSprite case 'monster-christmas': tex = Paths.getSparrowAtlas('christmas/monsterChristmas'); 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); + quickAnimAdd('idle', 'monster idle'); + quickAnimAdd('singUP', 'monster up note'); + quickAnimAdd('singDOWN', 'monster down'); + quickAnimAdd('singLEFT', 'Monster left note'); + quickAnimAdd('singRIGHT', 'Monster Right note'); addOffset('idle'); addOffset("singUP", -20, 50); @@ -242,27 +246,27 @@ class Character extends FlxSprite case 'pico': tex = Paths.getSparrowAtlas('Pico_FNF_assetss'); frames = tex; - animation.addByPrefix('idle', "Pico Idle Dance", 24); - animation.addByPrefix('singUP', 'pico Up note0', 24, false); - animation.addByPrefix('singDOWN', 'Pico Down Note0', 24, false); + quickAnimAdd('idle', "Pico Idle Dance"); + quickAnimAdd('singUP', 'pico Up note0'); + quickAnimAdd('singDOWN', 'Pico Down Note0'); 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); + quickAnimAdd('singLEFT', 'Pico NOTE LEFT0'); + quickAnimAdd('singRIGHT', 'Pico Note Right0'); + quickAnimAdd('singRIGHTmiss', 'Pico Note Right Miss'); + quickAnimAdd('singLEFTmiss', 'Pico NOTE LEFT miss'); } 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); + quickAnimAdd('singLEFT', 'Pico Note Right0'); + quickAnimAdd('singRIGHT', 'Pico NOTE LEFT0'); + quickAnimAdd('singRIGHTmiss', 'Pico NOTE LEFT miss'); + quickAnimAdd('singLEFTmiss', 'Pico Note Right Miss'); } - animation.addByPrefix('singUPmiss', 'pico Up note miss', 24); - animation.addByPrefix('singDOWNmiss', 'Pico Down Note MISS', 24); + quickAnimAdd('singUPmiss', 'pico Up note miss'); + quickAnimAdd('singDOWNmiss', 'Pico Down Note MISS'); addOffset('idle'); addOffset("singUP", -29, 27); @@ -295,22 +299,22 @@ class Character extends FlxSprite case 'bf': var tex = Paths.getSparrowAtlas('characters/BOYFRIEND'); 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); + quickAnimAdd('idle', 'BF idle dance'); + quickAnimAdd('singUP', 'BF NOTE UP0'); + quickAnimAdd('singLEFT', 'BF NOTE LEFT0'); + quickAnimAdd('singRIGHT', 'BF NOTE RIGHT0'); + quickAnimAdd('singDOWN', 'BF NOTE DOWN0'); + quickAnimAdd('singUPmiss', 'BF NOTE UP MISS'); + quickAnimAdd('singLEFTmiss', 'BF NOTE LEFT MISS'); + quickAnimAdd('singRIGHTmiss', 'BF NOTE RIGHT MISS'); + quickAnimAdd('singDOWNmiss', 'BF NOTE DOWN MISS'); + quickAnimAdd('hey', 'BF HEY'); - animation.addByPrefix('firstDeath', "BF dies", 24, false); + quickAnimAdd('firstDeath', "BF dies"); animation.addByPrefix('deathLoop', "BF Dead Loop", 24, true); - animation.addByPrefix('deathConfirm', "BF Dead confirm", 24, false); + quickAnimAdd('deathConfirm', "BF Dead confirm"); - animation.addByPrefix('scared', 'BF idle shaking', 24); + animation.addByPrefix('scared', 'BF idle shaking', 24, true); loadOffsetFile(curCharacter); @@ -323,16 +327,16 @@ class Character extends FlxSprite case 'bf-christmas': var tex = Paths.getSparrowAtlas('christmas/bfChristmas'); 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); + quickAnimAdd('idle', 'BF idle dance'); + quickAnimAdd('singUP', 'BF NOTE UP0'); + quickAnimAdd('singLEFT', 'BF NOTE LEFT0'); + quickAnimAdd('singRIGHT', 'BF NOTE RIGHT0'); + quickAnimAdd('singDOWN', 'BF NOTE DOWN0'); + quickAnimAdd('singUPmiss', 'BF NOTE UP MISS'); + quickAnimAdd('singLEFTmiss', 'BF NOTE LEFT MISS'); + quickAnimAdd('singRIGHTmiss', 'BF NOTE RIGHT MISS'); + quickAnimAdd('singDOWNmiss', 'BF NOTE DOWN MISS'); + quickAnimAdd('hey', 'BF HEY'); addOffset('idle', -5); addOffset("singUP", -29, 27); @@ -351,15 +355,16 @@ class Character extends FlxSprite case 'bf-car': var tex = Paths.getSparrowAtlas('bfCar'); 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); + quickAnimAdd('idle', 'BF idle dance'); + quickAnimAdd('singUP', 'BF NOTE UP0'); + quickAnimAdd('singLEFT', 'BF NOTE LEFT0'); + quickAnimAdd('singRIGHT', 'BF NOTE RIGHT0'); + quickAnimAdd('singDOWN', 'BF NOTE DOWN0'); + quickAnimAdd('singUPmiss', 'BF NOTE UP MISS'); + quickAnimAdd('singLEFTmiss', 'BF NOTE LEFT MISS'); + quickAnimAdd('singRIGHTmiss', 'BF NOTE RIGHT MISS'); + quickAnimAdd('singDOWNmiss', 'BF NOTE DOWN MISS'); + animation.addByIndices('idleHair', 'BF idle dance', [10, 11, 12, 13], "", 24, true); addOffset('idle', -5); addOffset("singUP", -29, 27); @@ -370,20 +375,21 @@ class Character extends FlxSprite addOffset("singRIGHTmiss", -30, 21); addOffset("singLEFTmiss", 12, 24); addOffset("singDOWNmiss", -11, -19); + addOffset('idleHair', -5); playAnim('idle'); flipX = true; case 'bf-pixel': frames = Paths.getSparrowAtlas('weeb/bfPixel'); - 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); + quickAnimAdd('idle', 'BF IDLE'); + quickAnimAdd('singUP', 'BF UP NOTE'); + quickAnimAdd('singLEFT', 'BF LEFT NOTE'); + quickAnimAdd('singRIGHT', 'BF RIGHT NOTE'); + quickAnimAdd('singDOWN', 'BF DOWN NOTE'); + quickAnimAdd('singUPmiss', 'BF UP MISS'); + quickAnimAdd('singLEFTmiss', 'BF LEFT MISS'); + quickAnimAdd('singRIGHTmiss', 'BF RIGHT MISS'); + quickAnimAdd('singDOWNmiss', 'BF DOWN MISS'); addOffset('idle'); addOffset("singUP"); @@ -408,10 +414,10 @@ class Character extends FlxSprite flipX = true; case 'bf-pixel-dead': frames = Paths.getSparrowAtlas('weeb/bfPixelsDEAD'); - animation.addByPrefix('singUP', "BF Dies pixel", 24, false); - animation.addByPrefix('firstDeath', "BF Dies pixel", 24, false); + quickAnimAdd('singUP', "BF Dies pixel"); + quickAnimAdd('firstDeath', "BF Dies pixel"); animation.addByPrefix('deathLoop', "Retry Loop", 24, true); - animation.addByPrefix('deathConfirm', "RETRY CONFIRM", 24, false); + quickAnimAdd('deathConfirm', "RETRY CONFIRM"); animation.play('firstDeath'); addOffset('firstDeath'); @@ -426,11 +432,16 @@ class Character extends FlxSprite case 'senpai': frames = Paths.getSparrowAtlas('weeb/senpai'); - 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); + quickAnimAdd('idle', 'Senpai Idle'); + // at framerate 16.8 animation plays over 2 beats at 144bpm, + // but if the game lags or the bpm is > 144 (mods etc.) + // he may miss his next dance + // animation.getByName('idle').frameRate = 16.8; + + quickAnimAdd('singUP', 'SENPAI UP NOTE'); + quickAnimAdd('singLEFT', 'SENPAI LEFT NOTE'); + quickAnimAdd('singRIGHT', 'SENPAI RIGHT NOTE'); + quickAnimAdd('singDOWN', 'SENPAI DOWN NOTE'); addOffset('idle'); addOffset("singUP", 5, 37); @@ -446,11 +457,11 @@ class Character extends FlxSprite antialiasing = false; case 'senpai-angry': frames = Paths.getSparrowAtlas('weeb/senpai'); - 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); + quickAnimAdd('idle', 'Angry Senpai Idle'); + quickAnimAdd('singUP', 'Angry Senpai UP NOTE'); + quickAnimAdd('singLEFT', 'Angry Senpai LEFT NOTE'); + quickAnimAdd('singRIGHT', 'Angry Senpai RIGHT NOTE'); + quickAnimAdd('singDOWN', 'Angry Senpai DOWN NOTE'); addOffset('idle'); addOffset("singUP", 5, 37); @@ -466,11 +477,11 @@ class Character extends FlxSprite case 'spirit': frames = Paths.getPackerAtlas('weeb/spirit'); - 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); + quickAnimAdd('idle', "idle spirit_"); + quickAnimAdd('singUP', "up_"); + quickAnimAdd('singRIGHT', "right_"); + quickAnimAdd('singLEFT', "left_"); + quickAnimAdd('singDOWN', "spirit down_"); addOffset('idle', -220, -280); addOffset('singUP', -220, -240); @@ -487,17 +498,17 @@ class Character extends FlxSprite case 'parents-christmas': frames = Paths.getSparrowAtlas('christmas/mom_dad_christmas_assets'); - 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); + quickAnimAdd('idle', 'Parent Christmas Idle'); + quickAnimAdd('singUP', 'Parent Up Note Dad'); + quickAnimAdd('singDOWN', 'Parent Down Note Dad'); + quickAnimAdd('singLEFT', 'Parent Left Note Dad'); + quickAnimAdd('singRIGHT', 'Parent Right Note Dad'); - animation.addByPrefix('singUP-alt', 'Parent Up Note Mom', 24, false); + quickAnimAdd('singUP-alt', 'Parent Up Note Mom'); - 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); + quickAnimAdd('singDOWN-alt', 'Parent Down Note Mom'); + quickAnimAdd('singLEFT-alt', 'Parent Left Note Mom'); + quickAnimAdd('singRIGHT-alt', 'Parent Right Note Mom'); addOffset('idle'); addOffset("singUP", -47, 24); @@ -513,28 +524,28 @@ class Character extends FlxSprite case 'tankman': frames = Paths.getSparrowAtlas('characters/tankmanCaptain'); - animation.addByPrefix('idle', "Tankman Idle Dance", 24, false); + quickAnimAdd('idle', "Tankman Idle Dance"); if (isPlayer) { - animation.addByPrefix('singLEFT', 'Tankman Note Left0', 24, false); - animation.addByPrefix('singRIGHT', 'Tankman Right Note0', 24, false); - animation.addByPrefix('singLEFTmiss', 'Tankman Note Left MISS', 24, false); - animation.addByPrefix('singRIGHTmiss', 'Tankman Right Note MISS', 24, false); + quickAnimAdd('singLEFT', 'Tankman Note Left0'); + quickAnimAdd('singRIGHT', 'Tankman Right Note0'); + quickAnimAdd('singLEFTmiss', 'Tankman Note Left MISS'); + quickAnimAdd('singRIGHTmiss', 'Tankman Right Note MISS'); } else { // Need to be flipped! REDO THIS LATER - animation.addByPrefix('singLEFT', 'Tankman Right Note0', 24, false); - animation.addByPrefix('singRIGHT', 'Tankman Note Left0', 24, false); - animation.addByPrefix('singLEFTmiss', 'Tankman Right Note MISS', 24, false); - animation.addByPrefix('singRIGHTmiss', 'Tankman Note Left MISS', 24, false); + quickAnimAdd('singLEFT', 'Tankman Right Note0'); + quickAnimAdd('singRIGHT', 'Tankman Note Left0'); + quickAnimAdd('singLEFTmiss', 'Tankman Right Note MISS'); + quickAnimAdd('singRIGHTmiss', 'Tankman Note Left MISS'); } - animation.addByPrefix('singUP', 'Tankman UP note0', 24, false); - animation.addByPrefix('singDOWN', 'Tankman DOWN note0', 24, false); - animation.addByPrefix('singUPmiss', 'Tankman UP note MISS', 24, false); - animation.addByPrefix('singDOWNmiss', 'Tankman DOWN note MISS', 24, false); + quickAnimAdd('singUP', 'Tankman UP note0'); + quickAnimAdd('singDOWN', 'Tankman DOWN note0'); + quickAnimAdd('singUPmiss', 'Tankman UP note MISS'); + quickAnimAdd('singDOWNmiss', 'Tankman DOWN note MISS'); loadOffsetFile(curCharacter); @@ -544,6 +555,7 @@ class Character extends FlxSprite } dance(); + animation.finish(); if (isPlayer) { @@ -621,6 +633,13 @@ class Character extends FlxSprite } } + if (curCharacter.endsWith('-car')) + { + // looping hair anims after idle finished + if (!animation.curAnim.name.startsWith('sing') && animation.curAnim.finished) + playAnim('idleHair'); + } + switch (curCharacter) { case 'gf': @@ -661,7 +680,7 @@ class Character extends FlxSprite { switch (curCharacter) { - case 'gf': + case 'gf' | 'gf-christmas' | 'gf-car' | 'gf-pixel': if (!animation.curAnim.name.startsWith('hair')) { danced = !danced; @@ -672,37 +691,6 @@ class Character extends FlxSprite playAnim('danceLeft'); } - case 'gf-christmas': - if (!animation.curAnim.name.startsWith('hair')) - { - danced = !danced; - - if (danced) - playAnim('danceRight'); - else - playAnim('danceLeft'); - } - - case 'gf-car': - if (!animation.curAnim.name.startsWith('hair')) - { - danced = !danced; - - if (danced) - playAnim('danceRight'); - else - playAnim('danceLeft'); - } - case 'gf-pixel': - if (!animation.curAnim.name.startsWith('hair')) - { - danced = !danced; - - if (danced) - playAnim('danceRight'); - else - playAnim('danceLeft'); - } case 'pico-speaker': // lol weed // playAnim('shoot' + FlxG.random.int(1, 4), true); diff --git a/source/ChartingState.hx b/source/ChartingState.hx index 64a0de8fb..49ab32380 100644 --- a/source/ChartingState.hx +++ b/source/ChartingState.hx @@ -28,8 +28,6 @@ import haxe.Json; import lime.utils.Assets; import openfl.events.Event; import openfl.events.IOErrorEvent; -import openfl.events.IOErrorEvent; -import openfl.events.IOErrorEvent; import openfl.media.Sound; import openfl.net.FileReference; import openfl.utils.ByteArray; @@ -76,7 +74,7 @@ class ChartingState extends MusicBeatState **/ var curSelectedNote:Array; - var tempBpm:Int = 0; + var tempBpm:Float = 0; var vocals:FlxSound; @@ -171,6 +169,7 @@ class ChartingState extends MusicBeatState add(curRenderedNotes); add(curRenderedSustains); + changeSection(); super.create(); } @@ -217,11 +216,11 @@ class ChartingState extends MusicBeatState var loadAutosaveBtn:FlxButton = new FlxButton(reloadSongJson.x, reloadSongJson.y + 30, 'load autosave', loadAutosave); - var stepperSpeed:FlxUINumericStepper = new FlxUINumericStepper(10, 80, 0.1, 1, 0.1, 10, 1); + var stepperSpeed:FlxUINumericStepper = new FlxUINumericStepper(10, 80, 0.1, 1, 0.1, 10, 2); stepperSpeed.value = _song.speed; stepperSpeed.name = 'song_speed'; - var stepperBPM:FlxUINumericStepper = new FlxUINumericStepper(10, 65, 1, 1, 1, 339, 0); + var stepperBPM:FlxUINumericStepper = new FlxUINumericStepper(10, 65, 1, 100, 1, 999, 3); stepperBPM.value = Conductor.bpm; stepperBPM.name = 'song_bpm'; @@ -230,14 +229,15 @@ class ChartingState extends MusicBeatState var player1DropDown = new FlxUIDropDownMenu(10, 100, FlxUIDropDownMenu.makeStrIdLabelArray(characters, true), function(character:String) { _song.player1 = characters[Std.parseInt(character)]; + updateHeads(); }); player1DropDown.selectedLabel = _song.player1; var player2DropDown = new FlxUIDropDownMenu(140, 100, FlxUIDropDownMenu.makeStrIdLabelArray(characters, true), function(character:String) { _song.player2 = characters[Std.parseInt(character)]; + updateHeads(); }); - player2DropDown.selectedLabel = _song.player2; var tab_group_song = new FlxUI(null, UI_box); @@ -276,7 +276,7 @@ class ChartingState extends MusicBeatState stepperLength.value = _song.notes[curSection].lengthInSteps; stepperLength.name = "section_length"; - stepperSectionBPM = new FlxUINumericStepper(10, 80, 1, Conductor.bpm, 0, 999, 0); + stepperSectionBPM = new FlxUINumericStepper(10, 80, 1, Conductor.bpm, 1, 999, 3); stepperSectionBPM.value = Conductor.bpm; stepperSectionBPM.name = 'section_bpm'; @@ -425,9 +425,9 @@ class ChartingState extends MusicBeatState } else if (wname == 'song_bpm') { - tempBpm = Std.int(nums.value); + tempBpm = nums.value; Conductor.mapBPMChanges(_song); - Conductor.changeBPM(Std.int(nums.value)); + Conductor.changeBPM(nums.value); } else if (wname == 'note_susLength') { @@ -436,7 +436,7 @@ class ChartingState extends MusicBeatState } else if (wname == 'section_bpm') { - _song.notes[curSection].bpm = Std.int(nums.value); + _song.notes[curSection].bpm = nums.value; updateGrid(); } } @@ -456,7 +456,7 @@ class ChartingState extends MusicBeatState }*/ function sectionStartTime():Float { - var daBPM:Int = _song.bpm; + var daBPM:Float = _song.bpm; var daPos:Float = 0; for (i in 0...curSection) { @@ -793,13 +793,13 @@ class ChartingState extends MusicBeatState { if (check_mustHitSection.checked) { - leftIcon.animation.play('bf'); - rightIcon.animation.play('dad'); + leftIcon.changeIcon(_song.player1); + rightIcon.changeIcon(_song.player2); } else { - leftIcon.animation.play('dad'); - rightIcon.animation.play('bf'); + leftIcon.changeIcon(_song.player2); + rightIcon.changeIcon(_song.player1); } } @@ -831,7 +831,7 @@ class ChartingState extends MusicBeatState else { // get last bpm - var daBPM:Int = _song.bpm; + var daBPM:Float = _song.bpm; for (i in 0...curSection) if (_song.notes[i].changeBPM) daBPM = _song.notes[i].bpm; diff --git a/source/Conductor.hx b/source/Conductor.hx index a182070b0..9f3f50031 100644 --- a/source/Conductor.hx +++ b/source/Conductor.hx @@ -11,12 +11,12 @@ typedef BPMChangeEvent = { var stepTime:Int; var songTime:Float; - var bpm:Int; + var bpm:Float; } class Conductor { - public static var bpm:Int = 100; + public static var bpm:Float = 100; public static var crochet:Float = ((60 / bpm) * 1000); // beats in milliseconds public static var stepCrochet:Float = crochet / 4; // steps in milliseconds public static var songPosition:Float; @@ -36,7 +36,7 @@ class Conductor { bpmChangeMap = []; - var curBPM:Int = song.bpm; + var curBPM:Float = song.bpm; var totalSteps:Int = 0; var totalPos:Float = 0; for (i in 0...song.notes.length) @@ -59,7 +59,7 @@ class Conductor trace("new BPM map BUDDY " + bpmChangeMap); } - public static function changeBPM(newBpm:Int) + public static function changeBPM(newBpm:Float) { bpm = newBpm; diff --git a/source/HealthIcon.hx b/source/HealthIcon.hx index 46adbcec3..883d3525c 100644 --- a/source/HealthIcon.hx +++ b/source/HealthIcon.hx @@ -11,7 +11,7 @@ class HealthIcon extends FlxSprite */ public var sprTracker:FlxSprite; - var char:String = 'bf'; + var char:String = ''; var isPlayer:Bool = false; public function new(char:String = 'bf', isPlayer:Bool = false) @@ -19,9 +19,8 @@ class HealthIcon extends FlxSprite super(); this.isPlayer = isPlayer; - this.char = char; - loadIcon(char); + changeIcon(char); antialiasing = true; scrollFactor.set(); } @@ -33,29 +32,26 @@ class HealthIcon extends FlxSprite isOldIcon = !isOldIcon; if (isOldIcon) - { - loadGraphic(Paths.image('icons/icon-bf-old'), true, 150, 150); - animation.add('bf-old', [0, 1], 0, false, isPlayer); - animation.play('bf-old'); - } + changeIcon('bf-old'); else - loadIcon(char); + changeIcon('bf'); } - function loadIcon(char:String):Void + public function changeIcon(newChar:String):Void { - var realChar:String = ""; - switch (char) - { - case 'bf-pixel': - realChar = char; - default: - realChar = char.split('-')[0].trim(); - } + if (newChar != 'bf-pixel' && newChar != 'bf-old') + newChar = newChar.split('-')[0].trim(); - loadGraphic(Paths.image('icons/icon-' + realChar), true, 150, 150); - animation.add(realChar, [0, 1], 0, false, isPlayer); - animation.play(realChar); + if (newChar != char) + { + if (animation.getByName(newChar) == null) + { + loadGraphic(Paths.image('icons/icon-' + newChar), true, 150, 150); + animation.add(newChar, [0, 1], 0, false, isPlayer); + } + animation.play(newChar); + char = newChar; + } } override function update(elapsed:Float) diff --git a/source/PlayState.hx b/source/PlayState.hx index b930a9846..725154eb4 100644 --- a/source/PlayState.hx +++ b/source/PlayState.hx @@ -994,7 +994,7 @@ class PlayState extends MusicBeatState { case 0: - FlxG.sound.play(Paths.sound('intro3'), 0.6); + FlxG.sound.play(Paths.sound('intro3' + altSuffix), 0.6); case 1: var ready:FlxSprite = new FlxSprite().loadGraphic(Paths.image(introAlts[0])); ready.scrollFactor.set(); @@ -1012,7 +1012,7 @@ class PlayState extends MusicBeatState ready.destroy(); } }); - FlxG.sound.play(Paths.sound('intro2'), 0.6); + FlxG.sound.play(Paths.sound('intro2' + altSuffix), 0.6); case 2: var set:FlxSprite = new FlxSprite().loadGraphic(Paths.image(introAlts[1])); set.scrollFactor.set(); @@ -1029,7 +1029,7 @@ class PlayState extends MusicBeatState set.destroy(); } }); - FlxG.sound.play(Paths.sound('intro1'), 0.6); + FlxG.sound.play(Paths.sound('intro1' + altSuffix), 0.6); case 3: var go:FlxSprite = new FlxSprite().loadGraphic(Paths.image(introAlts[2])); go.scrollFactor.set(); @@ -1048,13 +1048,12 @@ class PlayState extends MusicBeatState go.destroy(); } }); - FlxG.sound.play(Paths.sound('introGo'), 0.6); - case 4: + FlxG.sound.play(Paths.sound('introGo' + altSuffix), 0.6); } swagCounter += 1; // generateSong('fresh'); - }, 5); + }, 4); } var previousFrameTime:Int = 0; @@ -2013,157 +2012,92 @@ class PlayState extends MusicBeatState private function keyShit():Void { - // HOLDING - var up = controls.NOTE_UP; - var right = controls.NOTE_RIGHT; - var down = controls.NOTE_DOWN; - var left = controls.NOTE_LEFT; + // control arrays, order L D R U + var holdArray:Array = [controls.NOTE_LEFT, controls.NOTE_DOWN, controls.NOTE_UP, controls.NOTE_RIGHT]; + var pressArray:Array = [controls.NOTE_LEFT_P, controls.NOTE_DOWN_P, controls.NOTE_UP_P, controls.NOTE_RIGHT_P]; + var releaseArray:Array = [controls.NOTE_LEFT_R, controls.NOTE_DOWN_R, controls.NOTE_UP_R, controls.NOTE_RIGHT_R]; - var upP = controls.NOTE_UP_P; - var rightP = controls.NOTE_RIGHT_P; - var downP = controls.NOTE_DOWN_P; - var leftP = controls.NOTE_LEFT_P; - - var upR = controls.NOTE_UP_R; - var rightR = controls.NOTE_RIGHT_R; - var downR = controls.NOTE_DOWN_R; - var leftR = controls.NOTE_LEFT_R; - - var controlArray:Array = [leftP, downP, upP, rightP]; - - // FlxG.watch.addQuick('asdfa', upP); - if ((upP || rightP || downP || leftP) && generatedMusic) + // HOLDS, check for sustain notes + if (holdArray.contains(true) && /*!boyfriend.stunned && */ generatedMusic) { - // note to self, used to have stunned - // && !boyfriend.stunned + notes.forEachAlive(function(daNote:Note) + { + if (daNote.isSustainNote && daNote.canBeHit && daNote.mustPress && holdArray[daNote.noteData]) + goodNoteHit(daNote); + }); + } + // PRESSES, check for note hits + if (pressArray.contains(true) && /*!boyfriend.stunned && */ generatedMusic) + { boyfriend.holdTimer = 0; - var possibleNotes:Array = []; - - var ignoreList:Array = []; + var possibleNotes:Array = []; // notes that can be hit + var directionList:Array = []; // directions that can be hit + var dumbNotes:Array = []; // notes to kill later notes.forEachAlive(function(daNote:Note) { if (daNote.canBeHit && daNote.mustPress && !daNote.tooLate && !daNote.wasGoodHit) { - // the sorting probably doesn't need to be in here? who cares lol - possibleNotes.push(daNote); - possibleNotes.sort((a, b) -> Std.int(a.strumTime - b.strumTime)); - - ignoreList.push(daNote.noteData); - } - }); - - if (possibleNotes.length > 0) - { - var daNote = possibleNotes[0]; - - if (perfectMode) - noteCheck(true, daNote); - - // Jump notes - if (possibleNotes.length >= 2) - { - if (possibleNotes[0].strumTime == possibleNotes[1].strumTime) + if (directionList.contains(daNote.noteData)) { for (coolNote in possibleNotes) { - if (controlArray[coolNote.noteData]) - goodNoteHit(coolNote); - else - { - var inIgnoreList:Bool = false; - for (shit in 0...ignoreList.length) - { - if (controlArray[ignoreList[shit]]) - inIgnoreList = true; - } - if (!inIgnoreList) - badNoteCheck(); + if (coolNote.noteData == daNote.noteData && Math.abs(daNote.strumTime - coolNote.strumTime) < 10) + { // if it's the same note twice at < 10ms distance, just delete it + // EXCEPT u cant delete it in this loop cuz it fucks with the collection lol + dumbNotes.push(daNote); + break; + } + else if (coolNote.noteData == daNote.noteData && daNote.strumTime < coolNote.strumTime) + { // if daNote is earlier than existing note (coolNote), replace + possibleNotes.remove(coolNote); + possibleNotes.push(daNote); + break; } } } - else if (possibleNotes[0].noteData == possibleNotes[1].noteData) - { - noteCheck(controlArray[daNote.noteData], daNote); - } else { - for (coolNote in possibleNotes) - { - noteCheck(controlArray[coolNote.noteData], coolNote); - } - } - } - else // regular notes? - { - noteCheck(controlArray[daNote.noteData], daNote); - } - /* - if (controlArray[daNote.noteData]) - goodNoteHit(daNote); - */ - // trace(daNote.noteData); - /* - switch (daNote.noteData) - { - case 2: // NOTES YOU JUST PRESSED - if (upP || rightP || downP || leftP) - noteCheck(upP, daNote); - case 3: - if (upP || rightP || downP || leftP) - noteCheck(rightP, daNote); - case 1: - if (upP || rightP || downP || leftP) - noteCheck(downP, daNote); - case 0: - if (upP || rightP || downP || leftP) - noteCheck(leftP, daNote); - } - - //this is already done in noteCheck / goodNoteHit - if (daNote.wasGoodHit) - { - daNote.kill(); - notes.remove(daNote, true); - daNote.destroy(); - } - */ - } - else - { - badNoteCheck(); - } - } - - if ((up || right || down || left) && /*!boyfriend.stunned && */ generatedMusic) - { - notes.forEachAlive(function(daNote:Note) - { - if (daNote.canBeHit && daNote.mustPress && daNote.isSustainNote) - { - switch (daNote.noteData) - { - // NOTES YOU ARE HOLDING - case 0: - if (left) - goodNoteHit(daNote); - case 1: - if (down) - goodNoteHit(daNote); - case 2: - if (up) - goodNoteHit(daNote); - case 3: - if (right) - goodNoteHit(daNote); + possibleNotes.push(daNote); + directionList.push(daNote.noteData); } } }); + + for (note in dumbNotes) + { + FlxG.log.add("killing dumb ass note at "+note.strumTime); + note.kill(); + notes.remove(note, true); + note.destroy(); + } + + possibleNotes.sort((a, b) -> Std.int(a.strumTime - b.strumTime)); + + if (perfectMode) + goodNoteHit(possibleNotes[0]); + else if (possibleNotes.length > 0) + { + for (shit in 0...pressArray.length) + { // if a direction is hit that shouldn't be + if (pressArray[shit] && !directionList.contains(shit)) + badNoteHit(); + } + for (coolNote in possibleNotes) + { + if (pressArray[coolNote.noteData]) + goodNoteHit(coolNote); + } + } + else + { + badNoteHit(); + } } - if (boyfriend.holdTimer > Conductor.stepCrochet * 4 * 0.001 && !up && !down && !right && !left) + if (boyfriend.holdTimer > Conductor.stepCrochet * 4 * 0.001 && !holdArray.contains(true)) { if (boyfriend.animation.curAnim.name.startsWith('sing') && !boyfriend.animation.curAnim.name.endsWith('miss')) { @@ -2173,29 +2107,10 @@ class PlayState extends MusicBeatState playerStrums.forEach(function(spr:FlxSprite) { - switch (spr.ID) - { - case 0: - if (leftP && spr.animation.curAnim.name != 'confirm') - spr.animation.play('pressed'); - if (leftR) - spr.animation.play('static'); - case 1: - if (downP && spr.animation.curAnim.name != 'confirm') - spr.animation.play('pressed'); - if (downR) - spr.animation.play('static'); - case 2: - if (upP && spr.animation.curAnim.name != 'confirm') - spr.animation.play('pressed'); - if (upR) - spr.animation.play('static'); - case 3: - if (rightP && spr.animation.curAnim.name != 'confirm') - spr.animation.play('pressed'); - if (rightR) - spr.animation.play('static'); - } + if (pressArray[spr.ID] && spr.animation.curAnim.name != 'confirm') + spr.animation.play('pressed'); + if (!holdArray[spr.ID]) + spr.animation.play('static'); if (spr.animation.curAnim.name == 'confirm' && !curStage.startsWith('school')) { @@ -2247,14 +2162,14 @@ class PlayState extends MusicBeatState } } - function badNoteCheck() + function badNoteHit() { // just double pasting this shit cuz fuk u // REDO THIS SYSTEM! + var leftP = controls.NOTE_LEFT_P; + var downP = controls.NOTE_DOWN_P; var upP = controls.NOTE_UP_P; var rightP = controls.NOTE_RIGHT_P; - var downP = controls.NOTE_DOWN_P; - var leftP = controls.NOTE_LEFT_P; if (leftP) noteMiss(0); @@ -2266,16 +2181,6 @@ class PlayState extends MusicBeatState noteMiss(3); } - function noteCheck(keyP:Bool, note:Note):Void - { - if (keyP) - goodNoteHit(note); - else - { - badNoteCheck(); - } - } - function goodNoteHit(note:Note):Void { if (!note.wasGoodHit) @@ -2413,7 +2318,7 @@ class PlayState extends MusicBeatState override function stepHit() { super.stepHit(); - if (FlxG.sound.music.time > Conductor.songPosition + 20 || FlxG.sound.music.time < Conductor.songPosition - 20) + if (Math.abs(FlxG.sound.music.time - Conductor.songPosition) > 20 || (SONG.needsVoices && Math.abs(vocals.time - Conductor.songPosition) > 20)) { resyncVocals(); } diff --git a/source/Section.hx b/source/Section.hx index c859f6f31..f153da54f 100644 --- a/source/Section.hx +++ b/source/Section.hx @@ -6,7 +6,7 @@ typedef SwagSection = var lengthInSteps:Int; var typeOfSection:Int; var mustHitSection:Bool; - var bpm:Int; + var bpm:Float; var changeBPM:Bool; var altAnim:Bool; } diff --git a/source/Song.hx b/source/Song.hx index 407abb2db..2ea2a2f81 100644 --- a/source/Song.hx +++ b/source/Song.hx @@ -11,7 +11,7 @@ typedef SwagSong = { var song:String; var notes:Array; - var bpm:Int; + var bpm:Float; var needsVoices:Bool; var speed:Float; @@ -24,7 +24,7 @@ class Song { public var song:String; public var notes:Array; - public var bpm:Int; + public var bpm:Float; public var needsVoices:Bool = true; public var speed:Float = 1; diff --git a/source/StoryMenuState.hx b/source/StoryMenuState.hx index 013c171d3..4e9444075 100644 --- a/source/StoryMenuState.hx +++ b/source/StoryMenuState.hx @@ -227,6 +227,9 @@ class StoryMenuState extends MusicBeatState // scoreText.setFormat('VCR OSD Mono', 32); lerpScore = Math.floor(FlxMath.lerp(lerpScore, intendedScore, 0.5)); + if (Math.abs(lerpScore - intendedScore) <= 10) + lerpScore = intendedScore; + scoreText.text = "WEEK SCORE:" + lerpScore; txtWeekTitle.text = weekNames[curWeek].toUpperCase();