diff --git a/Project.xml b/Project.xml index 289c6215e..461e9364e 100644 --- a/Project.xml +++ b/Project.xml @@ -60,6 +60,7 @@ +
@@ -73,6 +74,7 @@ +
@@ -95,6 +97,8 @@ + + diff --git a/source/ChartingState.hx b/source/ChartingState.hx index d58870c67..f0580baa1 100644 --- a/source/ChartingState.hx +++ b/source/ChartingState.hx @@ -24,6 +24,7 @@ import flixel.ui.FlxButton; import flixel.ui.FlxSpriteButton; import flixel.util.FlxColor; import haxe.Json; +import lime.media.AudioBuffer; import lime.utils.Assets; import openfl.events.Event; import openfl.events.IOErrorEvent; @@ -81,10 +82,61 @@ class ChartingState extends MusicBeatState var leftIcon:HealthIcon; var rightIcon:HealthIcon; + var audioBuf:AudioBuffer = new AudioBuffer(); + + var playheadTest:FlxSprite; + override function create() { curSection = lastSection; + // trace(audioBuf.data.length); + audioBuf = AudioBuffer.fromFile(Paths.file('music/Voices.ogg')); + + trace(audioBuf.data.length); + + var bits:String = ""; + + playheadTest = new FlxSprite(0, 0).makeGraphic(2, 255, FlxColor.RED); + playheadTest.scrollFactor.set(); + add(playheadTest); + + for (thing in 0...444) + { + var weed:Int = thing % 4; + + // BITS + // first 2 ints are left channel, 2nd 2 ints are right + // left channel + if (weed == 0) + { + trace(audioBuf.data[thing]); + } + } + + for (shit in 0...FlxG.width) + { + var remap:Int = Math.floor(FlxMath.remapToRange(shit, 0, FlxG.width * 4, 0, audioBuf.data.length)); + + if (remap % 4 == 1) + { + var barThing:FlxSprite = new FlxSprite(shit / 4, audioBuf.data[remap]).makeGraphic(2, 2, FlxColor.PURPLE); + barThing.scrollFactor.set(); + add(barThing); + } + + if (remap % 4 == 0) + { + var barThing:FlxSprite = new FlxSprite(shit / 4, audioBuf.data[remap]).makeGraphic(2, 2, FlxColor.YELLOW); + barThing.scrollFactor.set(); + add(barThing); + } + } + + // sys.io.File.saveContent('./bitShit.txt', "swag"); + + trace(audioBuf.sampleRate); + gridBG = FlxGridOverlay.create(GRID_SIZE, GRID_SIZE, GRID_SIZE * 8, GRID_SIZE * 16); add(gridBG); @@ -499,8 +551,17 @@ class ChartingState extends MusicBeatState Conductor.songPosition = FlxG.sound.music.time; _song.song = typingShit.text; + playheadTest.x = FlxMath.remapToRange(Conductor.songPosition, 0, FlxG.sound.music.length, 0, FlxG.width); + strumLine.y = getYfromStrum((Conductor.songPosition - sectionStartTime()) % (Conductor.stepCrochet * _song.notes[curSection].lengthInSteps)); + if (FlxG.sound.music.playing) + { + var normalizedShitIDK:Int = Std.int(FlxMath.remapToRange(Conductor.songPosition, 0, FlxG.sound.music.length, 0, audioBuf.data.length)); + FlxG.watch.addQuick('WEIRD AUDIO SHIT LOL', audioBuf.data[normalizedShitIDK]); + // leftIcon.scale.x = FlxMath.remapToRange(audioBuf.data[normalizedShitIDK], 0, 255, 1, 2); + } + if (FlxG.keys.justPressed.X) toggleAltAnimNote(); diff --git a/source/FreeplayState.hx b/source/FreeplayState.hx index 68a70cc83..ec59ca7ce 100644 --- a/source/FreeplayState.hx +++ b/source/FreeplayState.hx @@ -98,6 +98,8 @@ class FreeplayState extends MusicBeatState if (StoryMenuState.weekUnlocked[7] || isDebug) addWeek(['Ugh', 'Guns', 'Stress'], 7, ['tankman']); + addWeek(["Darnell"], 8, ['darnell']); + // LOAD MUSIC // LOAD CHARACTERS diff --git a/source/Main.hx b/source/Main.hx index 11000f64d..a394d5dd1 100644 --- a/source/Main.hx +++ b/source/Main.hx @@ -48,7 +48,7 @@ class Main extends Sprite frameworkParams: { assetLibraryPaths: [ "songs" => "songs", "shared" => "shared", "tutorial" => "tutorial", "week1" => "week1", "week2" => "week2", "week3" => "week3", - "week4" => "week4", "week5" => "week5", "week6" => "week6", "week7" => "week7", "tanky" => "tanky", "tankBG" => "tankBG" + "week4" => "week4", "week5" => "week5", "week6" => "week6", "week7" => "week7", "week8" => "week8" ] }, framework: OPENFL, diff --git a/source/PlayState.hx b/source/PlayState.hx index f87fc6343..51ea7d0d1 100644 --- a/source/PlayState.hx +++ b/source/PlayState.hx @@ -485,6 +485,9 @@ class PlayState extends MusicBeatState var fgTank3:BGSprite = new BGSprite('tank3', 1300, 1200, 3.5, 2.5, ['fg']); foregroundSprites.add(fgTank3); + case "darnell": + loadStage('phillyStreets'); + default: loadStage('stage'); } @@ -619,7 +622,7 @@ class PlayState extends MusicBeatState gf.x -= 170; gf.y -= 75; } - case 'stage': + case 'stage' | 'phillyStreets': dad.y = 870 - dad.height; } diff --git a/source/animate/FlxAnimate.hx b/source/animate/FlxAnimate.hx index 245d125d4..8cd6ae864 100644 --- a/source/animate/FlxAnimate.hx +++ b/source/animate/FlxAnimate.hx @@ -96,7 +96,7 @@ class FlxAnimate extends FlxSymbol spr.transformMatrix.concat(alsoSwag); } - spr.alpha = 0.3; + // spr.alpha = 0.3; spr.origin.set(); spr.antialiasing = true; // spr.alpha = 0.5; diff --git a/source/animate/ParseAnimate.hx b/source/animate/ParseAnimate.hx index deffb28ac..beb1e72a8 100644 --- a/source/animate/ParseAnimate.hx +++ b/source/animate/ParseAnimate.hx @@ -173,6 +173,13 @@ class ParseAnimate var frame:Frame = frameMap.get(frameInput); + // get somethin sorted per element list, which would essentially be per symbol things properly sorted + // seperate data types if symbol or atlassymbolinstance? would probably be maybe slightly less memory intensive? i dunno + + // goes thru each layer, and then each element + // after it gets thru each element it adds to the layer frame stuff. + // make somethin that works recursively, maybe thats the symbol dictionary type shit? + for (element in frame.E) { if (Reflect.hasField(element, "ASI")) @@ -217,11 +224,18 @@ class ParseAnimate loopedFrameShit = inputFrame; } + // condense the animation code, so it automatically already fills up animation shit per symbol + parseTimeline(symbolMap.get(element.SI.SN).TL, tabbed + 1, inputFrame); } } - frameList.push([]); + if (tabbed == 0) + { + frameList[frameList.length - 1].reverse(); + frameList.push([]); // new layer essentially + } + matrixHelp.push([]); }