1
0
Fork 0
mirror of https://github.com/ninjamuffin99/Funkin.git synced 2024-12-25 22:47:52 +00:00

darnell and other stuf in progress lol

This commit is contained in:
Cameron Taylor 2021-09-06 14:50:04 -04:00
parent 1480335bcb
commit a5ed25fc31
7 changed files with 88 additions and 4 deletions

View file

@ -60,6 +60,7 @@
<library name="week5" preload="true" />
<library name="week6" preload="true" />
<library name="week7" preload="true" />
<library name="week8" preload="true" />
</section>
<section if="NO_PRELOAD_ALL">
@ -73,6 +74,7 @@
<library name="week5" preload="false" />
<library name="week6" preload="false" />
<library name="week7" preload="false" />
<library name="week8" preload="false" />
</section>
<assets path="assets/songs" library="songs" exclude="*.fla|*.ogg" if="web"/>
@ -95,6 +97,8 @@
<assets path="assets/week6" library="week6" exclude="*.fla|*.mp3" unless="web"/>
<assets path="assets/week7" library="week7" exclude="*.fla|*.ogg" if="web"/>
<assets path="assets/week7" library="week7" exclude="*.fla|*.mp3" unless="web"/>
<assets path="assets/week8" library="week8" exclude="*.fla|*.ogg" if="web"/>
<assets path="assets/week8" library="week8" exclude="*.fla|*.mp3" unless="web"/>
<!-- <assets path='example_mods' rename='mods' embed='false'/> -->

View file

@ -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();

View file

@ -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

View file

@ -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,

View file

@ -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;
}

View file

@ -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;

View file

@ -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([]);
}