mirror of
https://github.com/FunkinCrew/Funkin.git
synced 2025-02-17 04:11:23 -05:00
LIP SYNC
This commit is contained in:
parent
84c2185027
commit
fdd28336c1
2 changed files with 35 additions and 1 deletions
|
@ -64,6 +64,8 @@ class FlxAnimate extends FlxSymbol
|
|||
// fix render order of ALL layers!
|
||||
// seperate frameList into layers
|
||||
// go thru animate file to see how it should all be ordered
|
||||
// per frame symbol stuff to fix lip sync (in ParseAnimate?)
|
||||
// definitely need to dig through Animate.json stuff
|
||||
|
||||
function actualFrameRender()
|
||||
{
|
||||
|
|
|
@ -96,6 +96,8 @@ class ParseAnimate
|
|||
public static var matrixHelp:Array<Array<Float>> = [];
|
||||
public static var trpHelpIDK:Array<Array<Float>> = [];
|
||||
|
||||
public static var loopedFrameShit:Int = 0;
|
||||
|
||||
public static function resetFrameList()
|
||||
{
|
||||
frameList = [];
|
||||
|
@ -127,11 +129,30 @@ class ParseAnimate
|
|||
if (frameInput == null)
|
||||
frameInput = 0;
|
||||
|
||||
var oldFrm:Int = frameInput;
|
||||
|
||||
if (curLoopType == "SF")
|
||||
{
|
||||
trace(layer.LN);
|
||||
|
||||
trace(frameArray);
|
||||
trace(frameInput);
|
||||
trace(curLoopType);
|
||||
}
|
||||
|
||||
if (curLoopType == "LP")
|
||||
frameInput = frameArray[frameInput % frameArray.length];
|
||||
else if (curLoopType == "SF")
|
||||
{
|
||||
frameInput = frameArray[loopedFrameShit];
|
||||
|
||||
// see what happens when something has more than 2 layer?
|
||||
}
|
||||
else
|
||||
frameInput = frameArray[frameInput];
|
||||
|
||||
// trace(frameMap.get(frameInput));
|
||||
|
||||
var frame:Frame = frameMap.get(frameInput);
|
||||
|
||||
for (element in frame.E)
|
||||
|
@ -154,6 +175,7 @@ class ParseAnimate
|
|||
|
||||
depthTypeBeat = "";
|
||||
curLoopType = "";
|
||||
loopedFrameShit = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -161,7 +183,17 @@ class ParseAnimate
|
|||
trpHelpIDK.push([element.SI.TRP.x, element.SI.TRP.y]);
|
||||
depthTypeBeat += "->" + element.SI.SN;
|
||||
curLoopType = element.SI.LP;
|
||||
parseTimeline(symbolMap.get(element.SI.SN).TL, tabbed + 1, element.SI.FF);
|
||||
|
||||
var inputFrame:Int = element.SI.FF;
|
||||
|
||||
// JANKY FIX, MAY NOT ACCOUNT FOR ALL SCENARIOS!
|
||||
if (curLoopType == "SF")
|
||||
{
|
||||
trace("LOOP SHIT: " + inputFrame);
|
||||
loopedFrameShit = inputFrame;
|
||||
}
|
||||
|
||||
parseTimeline(symbolMap.get(element.SI.SN).TL, tabbed + 1, inputFrame);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue