Merge remote-tracking branch 'origin/rewrite/master' into rewrite/feature/chart-editor-erect-template
This commit is contained in:
@@ -0,0 +1,74 @@
|
||||
package funkin.ui.title;
|
||||
|
||||
import flixel.FlxSprite;
|
||||
import funkin.shaderslmfao.BlendModesShader;
|
||||
import openfl.display.BitmapData;
|
||||
import flixel.FlxCamera;
|
||||
import flixel.FlxG;
|
||||
import flixel.graphics.frames.FlxFrame.FlxFrameAngle;
|
||||
|
||||
class FlxSpriteOverlay extends FlxSprite
|
||||
{
|
||||
var blendShader:BlendModesShader;
|
||||
var dipshitBitmap:BitmapData;
|
||||
var temp:FlxSprite;
|
||||
|
||||
public function new(x:Float, y:Float)
|
||||
{
|
||||
super(x, y);
|
||||
temp = new FlxSprite().makeGraphic(FlxG.width, FlxG.height, 0xFF000000);
|
||||
blendShader = new BlendModesShader();
|
||||
dipshitBitmap = new BitmapData(2180, 1720, true, 0xFFCC00CC);
|
||||
}
|
||||
|
||||
override function drawComplex(camera:FlxCamera):Void
|
||||
{
|
||||
_frame.prepareMatrix(_matrix, FlxFrameAngle.ANGLE_0, checkFlipX(), checkFlipY());
|
||||
_matrix.translate(-origin.x, -origin.y);
|
||||
_matrix.scale(scale.x, scale.y);
|
||||
if (bakedRotationAngle <= 0)
|
||||
{
|
||||
updateTrig();
|
||||
if (angle != 0) _matrix.rotateWithTrig(_cosAngle, _sinAngle);
|
||||
}
|
||||
getScreenPosition(_point, camera).subtractPoint(offset);
|
||||
_point.add(origin.x, origin.y);
|
||||
_matrix.translate(_point.x, _point.y);
|
||||
if (isPixelPerfectRender(camera))
|
||||
{
|
||||
_matrix.tx = Math.floor(_matrix.tx);
|
||||
_matrix.ty = Math.floor(_matrix.ty);
|
||||
}
|
||||
|
||||
var sprRect = getScreenBounds();
|
||||
|
||||
// dipshitBitmap.draw(camera.canvas, camera.canvas.transform.matrix);
|
||||
// blendShader.setCamera(dipshitBitmap);
|
||||
|
||||
// FlxG.bitmapLog.add(dipshitBitmap);
|
||||
|
||||
camera.drawPixels(_frame, framePixels, _matrix, colorTransform, blend, antialiasing, shader);
|
||||
}
|
||||
|
||||
function copyToFlash(rect):openfl.geom.Rectangle
|
||||
{
|
||||
var flashRect = new openfl.geom.Rectangle();
|
||||
flashRect.x = rect.x;
|
||||
flashRect.y = rect.y;
|
||||
flashRect.width = rect.width;
|
||||
flashRect.height = rect.height;
|
||||
return flashRect;
|
||||
}
|
||||
|
||||
override public function isSimpleRender(?camera:FlxCamera):Bool
|
||||
{
|
||||
if (FlxG.renderBlit)
|
||||
{
|
||||
return super.isSimpleRender(camera);
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -23,6 +23,7 @@ import openfl.events.MouseEvent;
|
||||
import openfl.events.NetStatusEvent;
|
||||
import openfl.media.Video;
|
||||
import openfl.net.NetStream;
|
||||
import openfl.display.BlendMode;
|
||||
|
||||
#if desktop
|
||||
#end
|
||||
@@ -101,7 +102,7 @@ class TitleState extends MusicBeatState
|
||||
var logoBl:FlxSprite;
|
||||
var outlineShaderShit:TitleOutline;
|
||||
|
||||
var gfDance:FlxSprite;
|
||||
var gfDance:FlxSpriteOverlay;
|
||||
var danceLeft:Bool = false;
|
||||
var titleText:FlxSprite;
|
||||
var maskShader = new LeftMaskShader();
|
||||
@@ -124,13 +125,11 @@ class TitleState extends MusicBeatState
|
||||
|
||||
outlineShaderShit = new TitleOutline();
|
||||
|
||||
gfDance = new FlxSprite(FlxG.width * 0.4, FlxG.height * 0.07);
|
||||
gfDance = new FlxSpriteOverlay(FlxG.width * 0.4, FlxG.height * 0.07);
|
||||
gfDance.frames = Paths.getSparrowAtlas('gfDanceTitle');
|
||||
gfDance.animation.addByIndices('danceLeft', 'gfDance', [30, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14], "", 24, false);
|
||||
gfDance.animation.addByIndices('danceRight', 'gfDance', [15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29], "", 24, false);
|
||||
|
||||
add(gfDance);
|
||||
|
||||
// maskShader.swagSprX = gfDance.x;
|
||||
// maskShader.swagMaskX = gfDance.x + 200;
|
||||
// maskShader.frameUV = gfDance.frame.uv;
|
||||
@@ -142,6 +141,8 @@ class TitleState extends MusicBeatState
|
||||
|
||||
add(logoBl);
|
||||
|
||||
add(gfDance);
|
||||
|
||||
titleText = new FlxSprite(100, FlxG.height * 0.8);
|
||||
titleText.frames = Paths.getSparrowAtlas('titleEnter');
|
||||
titleText.animation.addByPrefix('idle', "Press Enter to Begin", 24);
|
||||
@@ -245,6 +246,8 @@ class TitleState extends MusicBeatState
|
||||
|
||||
override function update(elapsed:Float)
|
||||
{
|
||||
FlxG.bitmapLog.add(FlxG.camera.buffer);
|
||||
|
||||
#if HAS_PITCH
|
||||
if (FlxG.keys.pressed.UP) FlxG.sound.music.pitch += 0.5 * elapsed;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user