mirror of
https://github.com/ninjamuffin99/Funkin.git
synced 2025-04-01 15:25:25 +00:00
Merge branch 'master' of github.com:ninjamuffin99/Funkin-secret into nitpix
This commit is contained in:
commit
e6e3779d1c
|
@ -40,7 +40,7 @@
|
|||
|
||||
<classpath name="source" />
|
||||
|
||||
<assets path='assets/preload/music' include="*mp4" embed='false' />
|
||||
<!-- <assets path='assets/preload/music' include="*mp4" embed='false' /> -->
|
||||
|
||||
<assets path="assets/preload" rename="assets" exclude="*.ogg" if="web"/>
|
||||
<assets path="assets/preload" rename="assets" exclude="*.mp3" unless="web"/>
|
||||
|
|
62
source/FlxVideo.hx
Normal file
62
source/FlxVideo.hx
Normal file
|
@ -0,0 +1,62 @@
|
|||
package;
|
||||
|
||||
import flixel.FlxBasic;
|
||||
import flixel.FlxG;
|
||||
import flixel.FlxSprite;
|
||||
import openfl.events.NetStatusEvent;
|
||||
import openfl.media.Video;
|
||||
import openfl.net.NetConnection;
|
||||
import openfl.net.NetStream;
|
||||
|
||||
class FlxVideo extends FlxBasic
|
||||
{
|
||||
var video:Video;
|
||||
var netStream:NetStream;
|
||||
|
||||
public var finishCallback:Void->Void;
|
||||
|
||||
/**
|
||||
* Doesn't actually interact with Flixel shit, only just a pleasant to use class
|
||||
*/
|
||||
public function new(vidSrc:String)
|
||||
{
|
||||
super();
|
||||
|
||||
video = new Video();
|
||||
video.x = 0;
|
||||
video.y = 0;
|
||||
|
||||
FlxG.addChildBelowMouse(video);
|
||||
|
||||
var netConnection = new NetConnection();
|
||||
netConnection.connect(null);
|
||||
|
||||
netStream = new NetStream(netConnection);
|
||||
netStream.client = {onMetaData: client_onMetaData};
|
||||
netConnection.addEventListener(NetStatusEvent.NET_STATUS, netConnection_onNetStatus);
|
||||
netStream.play(Paths.file(vidSrc));
|
||||
}
|
||||
|
||||
public function finishVideo():Void
|
||||
{
|
||||
netStream.dispose();
|
||||
FlxG.removeChild(video);
|
||||
|
||||
if (finishCallback != null)
|
||||
finishCallback();
|
||||
}
|
||||
|
||||
public function client_onMetaData(metaData:Dynamic)
|
||||
{
|
||||
video.attachNetStream(netStream);
|
||||
|
||||
video.width = FlxG.width;
|
||||
video.height = FlxG.height;
|
||||
}
|
||||
|
||||
private function netConnection_onNetStatus(event:NetStatusEvent):Void
|
||||
{
|
||||
if (event.info.code == 'NetStream.Play.Complete')
|
||||
finishVideo();
|
||||
}
|
||||
}
|
|
@ -105,10 +105,13 @@ class GameOverSubstate extends MusicBeatSubstate
|
|||
if (bf.animation.curAnim.name == 'firstDeath' && bf.animation.curAnim.finished && !playingDeathSound)
|
||||
{
|
||||
playingDeathSound = true;
|
||||
|
||||
bf.startedDeath = true;
|
||||
coolStartDeath(0.2);
|
||||
|
||||
FlxG.sound.play(Paths.sound('jeffGameover/jeffGameover-' + randomGameover), 1, false, null, true, function()
|
||||
{
|
||||
bf.startedDeath = true;
|
||||
coolStartDeath();
|
||||
FlxG.sound.music.fadeIn(4, 0.2, 1);
|
||||
});
|
||||
}
|
||||
default:
|
||||
|
@ -125,9 +128,9 @@ class GameOverSubstate extends MusicBeatSubstate
|
|||
}
|
||||
}
|
||||
|
||||
private function coolStartDeath():Void
|
||||
private function coolStartDeath(?vol:Float = 1):Void
|
||||
{
|
||||
FlxG.sound.playMusic(Paths.music('gameOver' + stageSuffix));
|
||||
FlxG.sound.playMusic(Paths.music('gameOver' + stageSuffix), vol);
|
||||
}
|
||||
|
||||
override function beatHit()
|
||||
|
|
|
@ -25,6 +25,7 @@ class LoadingState extends MusicBeatState
|
|||
var danceLeft = false;
|
||||
|
||||
var loadBar:FlxSprite;
|
||||
var funkay:FlxSprite;
|
||||
|
||||
function new(target:FlxState, stopMusic:Bool)
|
||||
{
|
||||
|
@ -38,7 +39,7 @@ class LoadingState extends MusicBeatState
|
|||
var bg:FlxSprite = new FlxSprite().makeGraphic(FlxG.width, FlxG.height, 0xFFcaff4d);
|
||||
add(bg);
|
||||
|
||||
var funkay:FlxSprite = new FlxSprite();
|
||||
funkay = new FlxSprite();
|
||||
funkay.loadGraphic(Paths.image('funkay'));
|
||||
funkay.setGraphicSize(0, FlxG.height);
|
||||
funkay.updateHitbox();
|
||||
|
@ -124,6 +125,19 @@ class LoadingState extends MusicBeatState
|
|||
{
|
||||
super.update(elapsed);
|
||||
|
||||
funkay.setGraphicSize(Std.int(FlxMath.lerp(FlxG.width * 0.88, funkay.width, 0.9)));
|
||||
funkay.updateHitbox();
|
||||
// funkay.updateHitbox();
|
||||
|
||||
if (controls.ACCEPT)
|
||||
{
|
||||
funkay.setGraphicSize(Std.int(funkay.width + 60));
|
||||
funkay.updateHitbox();
|
||||
// funkay.setGraphicSize(0, Std.int(funkay.height + 50));
|
||||
// funkay.updateHitbox();
|
||||
// funkay.screenCenter();
|
||||
}
|
||||
|
||||
if (callbacks != null)
|
||||
{
|
||||
targetShit = FlxMath.remapToRange(callbacks.numRemaining / callbacks.length, 1, 0, 0, 1);
|
||||
|
|
|
@ -23,6 +23,7 @@ import flixel.graphics.atlas.FlxAtlas;
|
|||
import flixel.graphics.frames.FlxAtlasFrames;
|
||||
import flixel.group.FlxGroup.FlxTypedGroup;
|
||||
import flixel.group.FlxGroup;
|
||||
import flixel.math.FlxAngle;
|
||||
import flixel.math.FlxMath;
|
||||
import flixel.math.FlxPoint;
|
||||
import flixel.math.FlxRect;
|
||||
|
@ -43,6 +44,8 @@ import openfl.display.BitmapData;
|
|||
import openfl.display.BlendMode;
|
||||
import openfl.display.StageQuality;
|
||||
import openfl.filters.ShaderFilter;
|
||||
import shaderslmfao.BuildingShaders.BuildingShader;
|
||||
import shaderslmfao.BuildingShaders;
|
||||
import shaderslmfao.ColorSwap;
|
||||
import ui.PreferencesMenu;
|
||||
|
||||
|
@ -131,6 +134,7 @@ class PlayState extends MusicBeatState
|
|||
var gfCutsceneLayer:FlxGroup;
|
||||
var bfTankCutsceneLayer:FlxGroup;
|
||||
var tankWatchtower:BGSprite;
|
||||
var tankGround:BGSprite;
|
||||
|
||||
var talking:Bool = true;
|
||||
var songScore:Int = 0;
|
||||
|
@ -157,6 +161,7 @@ class PlayState extends MusicBeatState
|
|||
#end
|
||||
|
||||
var camPos:FlxPoint;
|
||||
var lightFadeShader:BuildingShaders;
|
||||
|
||||
override public function create()
|
||||
{
|
||||
|
@ -254,7 +259,9 @@ class PlayState extends MusicBeatState
|
|||
city.updateHitbox();
|
||||
add(city);
|
||||
|
||||
lightFadeShader = new BuildingShaders();
|
||||
phillyCityLights = new FlxTypedGroup<FlxSprite>();
|
||||
|
||||
add(phillyCityLights);
|
||||
|
||||
for (i in 0...5)
|
||||
|
@ -265,6 +272,7 @@ class PlayState extends MusicBeatState
|
|||
light.setGraphicSize(Std.int(light.width * 0.85));
|
||||
light.updateHitbox();
|
||||
light.antialiasing = true;
|
||||
light.shader = lightFadeShader.shader;
|
||||
phillyCityLights.add(light);
|
||||
}
|
||||
|
||||
|
@ -548,9 +556,15 @@ class PlayState extends MusicBeatState
|
|||
var smokeRight:BGSprite = new BGSprite('smokeRight', 1100, -100, 0.4, 0.4, ['SmokeRight'], true);
|
||||
add(smokeRight);
|
||||
|
||||
// tankGround.
|
||||
|
||||
tankWatchtower = new BGSprite('tankWatchtower', 100, 50, 0.5, 0.5, ['watchtower gradient color']);
|
||||
add(tankWatchtower);
|
||||
|
||||
tankGround = new BGSprite('tankRolling', 300, 300, 0.5, 0.5, ['BG tank w lighting'], true);
|
||||
add(tankGround);
|
||||
tankGround.active = false;
|
||||
|
||||
tankmanRun = new FlxTypedGroup<TankmenBG>();
|
||||
add(tankmanRun);
|
||||
|
||||
|
@ -559,12 +573,14 @@ class PlayState extends MusicBeatState
|
|||
tankGround.updateHitbox();
|
||||
add(tankGround);
|
||||
|
||||
moveTank();
|
||||
|
||||
// smokeLeft.screenCenter();
|
||||
|
||||
var fgTank0:BGSprite = new BGSprite('tank0', -500, 650, 1.7, 1.5, ['fg']);
|
||||
foregroundSprites.add(fgTank0);
|
||||
|
||||
var fgTank1:BGSprite = new BGSprite('tank1', -300, 700, 2, 0.2, ['fg']);
|
||||
var fgTank1:BGSprite = new BGSprite('tank1', -300, 750, 2, 0.2, ['fg']);
|
||||
foregroundSprites.add(fgTank1);
|
||||
|
||||
// just called 'foreground' just cuz small inconsistency no bbiggei
|
||||
|
@ -577,7 +593,7 @@ class PlayState extends MusicBeatState
|
|||
var fgTank5:BGSprite = new BGSprite('tank5', 1800, 900, 1.5, 1.5, ['fg']);
|
||||
foregroundSprites.add(fgTank5);
|
||||
|
||||
var fgTank3:BGSprite = new BGSprite('tank3', 1300, 1430, 3.5, 2.5, ['fg']);
|
||||
var fgTank3:BGSprite = new BGSprite('tank3', 1300, 1400, 3.5, 2.5, ['fg']);
|
||||
foregroundSprites.add(fgTank3);
|
||||
|
||||
default:
|
||||
|
@ -918,8 +934,8 @@ class PlayState extends MusicBeatState
|
|||
switch (curSong.toLowerCase())
|
||||
{
|
||||
// REMOVE THIS LATER
|
||||
// case 'stress':
|
||||
// stressIntro();
|
||||
case 'stress':
|
||||
stressIntro();
|
||||
|
||||
default:
|
||||
startCountdown();
|
||||
|
@ -933,6 +949,25 @@ class PlayState extends MusicBeatState
|
|||
{
|
||||
inCutscene = true;
|
||||
|
||||
var blackShit:FlxSprite = new FlxSprite(-200, -200).makeGraphic(FlxG.width * 2, FlxG.height * 2, FlxColor.BLACK);
|
||||
blackShit.scrollFactor.set();
|
||||
add(blackShit);
|
||||
|
||||
var vid:FlxVideo = new FlxVideo('music/ughCutscene.mp4');
|
||||
vid.finishCallback = function()
|
||||
{
|
||||
remove(blackShit);
|
||||
FlxTween.tween(FlxG.camera, {zoom: defaultCamZoom}, (Conductor.crochet / 1000) * 5, {ease: FlxEase.quadInOut});
|
||||
startCountdown();
|
||||
cameraMovement();
|
||||
};
|
||||
|
||||
FlxG.camera.zoom = defaultCamZoom * 1.2;
|
||||
|
||||
camFollow.x += 100;
|
||||
camFollow.y += 100;
|
||||
|
||||
/*
|
||||
FlxG.sound.playMusic(Paths.music('DISTORTO'), 0);
|
||||
FlxG.sound.music.fadeIn(5, 0, 0.5);
|
||||
|
||||
|
@ -962,7 +997,8 @@ class PlayState extends MusicBeatState
|
|||
{
|
||||
boyfriend.playAnim('singUP');
|
||||
// play sound
|
||||
FlxG.sound.play(Paths.sound('bfBeep'), function() {
|
||||
FlxG.sound.play(Paths.sound('bfBeep'), function()
|
||||
{
|
||||
boyfriend.playAnim('idle');
|
||||
});
|
||||
});
|
||||
|
@ -989,15 +1025,31 @@ class PlayState extends MusicBeatState
|
|||
cameraMovement();
|
||||
|
||||
startCountdown();
|
||||
camHUD.visible = true;
|
||||
});
|
||||
});
|
||||
});
|
||||
});*/
|
||||
}
|
||||
|
||||
function gunsIntro()
|
||||
{
|
||||
inCutscene = true;
|
||||
|
||||
var blackShit:FlxSprite = new FlxSprite(-200, -200).makeGraphic(FlxG.width * 2, FlxG.height * 2, FlxColor.BLACK);
|
||||
blackShit.scrollFactor.set();
|
||||
add(blackShit);
|
||||
|
||||
var vid:FlxVideo = new FlxVideo('music/gunsCutscene.mp4');
|
||||
vid.finishCallback = function()
|
||||
{
|
||||
remove(blackShit);
|
||||
|
||||
FlxTween.tween(FlxG.camera, {zoom: defaultCamZoom}, (Conductor.crochet / 1000) * 5, {ease: FlxEase.quadInOut});
|
||||
startCountdown();
|
||||
cameraMovement();
|
||||
};
|
||||
|
||||
/*
|
||||
camFollow.setPosition(camPos.x, camPos.y);
|
||||
|
||||
camHUD.visible = false;
|
||||
|
@ -1038,7 +1090,9 @@ class PlayState extends MusicBeatState
|
|||
dad.visible = true;
|
||||
gfCutsceneLayer.remove(tankCutscene);
|
||||
});
|
||||
});
|
||||
|
||||
camHUD.visible = true;
|
||||
});*/
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1056,13 +1110,30 @@ class PlayState extends MusicBeatState
|
|||
{
|
||||
inCutscene = true;
|
||||
|
||||
var blackShit:FlxSprite = new FlxSprite(-200, -200).makeGraphic(FlxG.width * 2, FlxG.height * 2, FlxColor.BLACK);
|
||||
blackShit.scrollFactor.set();
|
||||
add(blackShit);
|
||||
|
||||
var vid:FlxVideo = new FlxVideo('music/stressCutscene.mp4');
|
||||
vid.finishCallback = function()
|
||||
{
|
||||
remove(blackShit);
|
||||
|
||||
FlxTween.tween(FlxG.camera, {zoom: defaultCamZoom}, (Conductor.crochet / 1000) * 5, {ease: FlxEase.quadInOut});
|
||||
startCountdown();
|
||||
cameraMovement();
|
||||
};
|
||||
|
||||
/*
|
||||
camHUD.visible = false;
|
||||
|
||||
// for story mode shit
|
||||
camFollow.setPosition(camPos.x, camPos.y);
|
||||
|
||||
var dummyLoaderShit:FlxGroup = new FlxGroup();
|
||||
|
||||
add(dummyLoaderShit);
|
||||
/*
|
||||
|
||||
for (i in 0...7)
|
||||
{
|
||||
var dummyLoader:FlxSprite = new FlxSprite();
|
||||
|
@ -1073,8 +1144,6 @@ class PlayState extends MusicBeatState
|
|||
// dummyLoader.drawFrame(true);
|
||||
}
|
||||
|
||||
*/
|
||||
|
||||
dad.visible = false;
|
||||
|
||||
// gf.y += 300;
|
||||
|
@ -1289,7 +1358,7 @@ class PlayState extends MusicBeatState
|
|||
|
||||
gfCutsceneLayer.remove(cutsceneShit);
|
||||
});
|
||||
});
|
||||
});*/
|
||||
}
|
||||
|
||||
function initDiscord():Void
|
||||
|
@ -1931,7 +2000,12 @@ class PlayState extends MusicBeatState
|
|||
trainFrameTiming = 0;
|
||||
}
|
||||
}
|
||||
|
||||
lightFadeShader.update((Conductor.crochet / 1000) * FlxG.elapsed * 1.5);
|
||||
// phillyCityLights.members[curLight].alpha -= (Conductor.crochet / 1000) * FlxG.elapsed;
|
||||
|
||||
case 'tank':
|
||||
moveTank();
|
||||
}
|
||||
|
||||
super.update(elapsed);
|
||||
|
@ -2314,7 +2388,8 @@ class PlayState extends MusicBeatState
|
|||
camHUD.visible = false;
|
||||
inCutscene = true;
|
||||
|
||||
FlxG.sound.play(Paths.sound('Lights_Shut_off'), function(){
|
||||
FlxG.sound.play(Paths.sound('Lights_Shut_off'), function()
|
||||
{
|
||||
// no camFollow so it centers on horror tree
|
||||
SONG = Song.loadFromJson(storyPlaylist[0].toLowerCase() + difficulty, storyPlaylist[0]);
|
||||
LoadingState.loadAndSwitchState(new PlayState());
|
||||
|
@ -2809,6 +2884,25 @@ class PlayState extends MusicBeatState
|
|||
});
|
||||
}
|
||||
|
||||
function moveTank():Void
|
||||
{
|
||||
if (!inCutscene)
|
||||
{
|
||||
var daAngleOffset:Float = 1;
|
||||
tankAngle += FlxG.elapsed * tankSpeed;
|
||||
tankGround.angle = tankAngle - 90 + 15;
|
||||
|
||||
tankGround.x = tankX + Math.cos(FlxAngle.asRadians((tankAngle * daAngleOffset) + 180)) * 1500;
|
||||
tankGround.y = 1300 + Math.sin(FlxAngle.asRadians((tankAngle * daAngleOffset) + 180)) * 1100;
|
||||
}
|
||||
}
|
||||
|
||||
var tankResetShit:Bool = false;
|
||||
var tankMoving:Bool = false;
|
||||
var tankAngle:Float = FlxG.random.int(-90, 45);
|
||||
var tankSpeed:Float = FlxG.random.float(5, 7);
|
||||
var tankX:Float = 400;
|
||||
|
||||
var trainMoving:Bool = false;
|
||||
var trainFrameTiming:Float = 0;
|
||||
|
||||
|
@ -2995,6 +3089,8 @@ class PlayState extends MusicBeatState
|
|||
|
||||
if (curBeat % 4 == 0)
|
||||
{
|
||||
lightFadeShader.reset();
|
||||
|
||||
phillyCityLights.forEach(function(light:FlxSprite)
|
||||
{
|
||||
light.visible = false;
|
||||
|
|
|
@ -29,6 +29,8 @@ import openfl.events.NetStatusEvent;
|
|||
import openfl.media.Video;
|
||||
import openfl.net.NetConnection;
|
||||
import openfl.net.NetStream;
|
||||
import shaderslmfao.BuildingShaders.BuildingShader;
|
||||
import shaderslmfao.BuildingShaders;
|
||||
import shaderslmfao.ColorSwap;
|
||||
import ui.PreferencesMenu;
|
||||
|
||||
|
@ -45,7 +47,7 @@ import sys.thread.Thread;
|
|||
|
||||
class TitleState extends MusicBeatState
|
||||
{
|
||||
static var initialized:Bool = false;
|
||||
public static var initialized:Bool = false;
|
||||
|
||||
var blackScreen:FlxSprite;
|
||||
var credGroup:FlxGroup;
|
||||
|
@ -57,6 +59,7 @@ class TitleState extends MusicBeatState
|
|||
var wackyImage:FlxSprite;
|
||||
var lastBeat:Int = 0;
|
||||
var swagShader:ColorSwap;
|
||||
var alphaShader:BuildingShaders;
|
||||
var thingie:FlxSprite;
|
||||
|
||||
var video:Video;
|
||||
|
@ -73,6 +76,7 @@ class TitleState extends MusicBeatState
|
|||
FlxG.game.focusLostFramerate = 60;
|
||||
|
||||
swagShader = new ColorSwap();
|
||||
alphaShader = new BuildingShaders();
|
||||
|
||||
FlxG.sound.muteKeys = [ZERO];
|
||||
|
||||
|
@ -105,6 +109,11 @@ class TitleState extends MusicBeatState
|
|||
StoryMenuState.weekUnlocked[0] = true;
|
||||
}
|
||||
|
||||
if (FlxG.save.data.seenVideo != null)
|
||||
{
|
||||
VideoState.seenVideo = FlxG.save.data.seenVideo;
|
||||
}
|
||||
|
||||
#if FREEPLAY
|
||||
FlxG.switchState(new FreeplayState());
|
||||
#elseif ANIMATE
|
||||
|
@ -249,6 +258,7 @@ class TitleState extends MusicBeatState
|
|||
logoBl.updateHitbox();
|
||||
|
||||
logoBl.shader = swagShader.shader;
|
||||
// logoBl.shader = alphaShader.shader;
|
||||
|
||||
// trace();
|
||||
// logoBl.screenCenter();
|
||||
|
@ -465,11 +475,13 @@ class TitleState extends MusicBeatState
|
|||
if (controls.UI_LEFT)
|
||||
{
|
||||
swagShader.update(-elapsed * 0.1);
|
||||
// alphaShader.update(-elapsed * 0.1);
|
||||
}
|
||||
|
||||
if (controls.UI_RIGHT)
|
||||
{
|
||||
swagShader.update(elapsed * 0.1);
|
||||
// alphaShader.update(elapsed * 0.1);
|
||||
}
|
||||
|
||||
super.update(elapsed);
|
||||
|
|
|
@ -23,6 +23,9 @@ class VideoState extends MusicBeatState
|
|||
|
||||
seenVideo = true;
|
||||
|
||||
FlxG.save.data.seenVideo = true;
|
||||
FlxG.save.flush();
|
||||
|
||||
if (FlxG.sound.music != null)
|
||||
FlxG.sound.music.stop();
|
||||
|
||||
|
@ -61,6 +64,7 @@ class VideoState extends MusicBeatState
|
|||
netStream.dispose();
|
||||
FlxG.removeChild(video);
|
||||
|
||||
TitleState.initialized = false;
|
||||
FlxG.switchState(new TitleState());
|
||||
}
|
||||
|
||||
|
|
|
@ -62,18 +62,20 @@ class FlxSymbol extends FlxSprite
|
|||
{
|
||||
if (Reflect.hasField(element, 'ASI'))
|
||||
{
|
||||
var m3d = element.ASI.M3D;
|
||||
var dumbassMatrix:Matrix = new Matrix(m3d[0], m3d[1], m3d[4], m3d[5], m3d[12], m3d[13]);
|
||||
|
||||
var spr:FlxSymbol = new FlxSymbol(0, 0, coolParsed);
|
||||
matrixExposed = true;
|
||||
spr.frames = frames;
|
||||
spr.frame = spr.frames.getByName(element.ASI.N);
|
||||
|
||||
var m3d = element.ASI.M3D;
|
||||
var dumbassMatrix:Matrix = new Matrix(m3d[0], m3d[1], m3d[4], m3d[5], m3d[12], m3d[13]);
|
||||
// dumbassMatrix.translate(origin.x, origin.y);
|
||||
|
||||
dumbassMatrix.concat(_matrix);
|
||||
spr.matrixExposed = true;
|
||||
|
||||
spr.transformMatrix.concat(dumbassMatrix);
|
||||
// spr._matrix.concat(spr.transformMatrix);
|
||||
|
||||
spr.origin.set();
|
||||
spr.origin.x += origin.x;
|
||||
|
@ -85,39 +87,15 @@ class FlxSymbol extends FlxSprite
|
|||
else
|
||||
{
|
||||
var nestedSymbol = symbolMap.get(element.SI.SN);
|
||||
|
||||
// nestedSymbol
|
||||
|
||||
// if (element.SI.M3D[0] == -1 || flipX)
|
||||
// nestedShit.flipX = true;
|
||||
|
||||
// nestedSymbol.TL.L.reverse();
|
||||
|
||||
// _matrix.identity();
|
||||
// _matrix.scale(1, 1);
|
||||
|
||||
var nestedShit:FlxSymbol = new FlxSymbol(x, y, coolParse);
|
||||
var nestedShit:FlxSymbol = new FlxSymbol(0, 0, coolParse);
|
||||
nestedShit.frames = frames;
|
||||
|
||||
var swagMatrix:FlxMatrix = new FlxMatrix(element.SI.M3D[0], element.SI.M3D[1], element.SI.M3D[4], element.SI.M3D[5],
|
||||
element.SI.M3D[12], element.SI.M3D[13]);
|
||||
|
||||
// _matrix.concat(swagMatrix);
|
||||
|
||||
swagMatrix.concat(_matrix);
|
||||
|
||||
nestedShit._matrix.concat(swagMatrix);
|
||||
// nestedShit.x = swagMatrix.tx;
|
||||
// nestedShit.y = swagMatrix.ty;
|
||||
|
||||
// nestedShit._skewMatrix.identity();
|
||||
// nestedShit._skewMatrix.concat(swagMatrix);
|
||||
// _matrix.setTo(element.SI.M3D[0], element.SI.M3D[1], element.SI.M3D[4], element.SI.M3D[5], element.SI.M3D[12], element.SI.M3D[13]);
|
||||
|
||||
// nestedShit.scale.x = Math.sqrt(_matrix.a * _matrix.a + _matrix.b + _matrix.b);
|
||||
// nestedShit.scale.y = Math.sqrt(_matrix.a * _matrix.a + _matrix.b * _matrix.b);
|
||||
// nestedShit.origin.set(element.SI.TRP.x, element.SI.TRP.y);
|
||||
|
||||
nestedShit.origin.set(element.SI.TRP.x, element.SI.TRP.y);
|
||||
// nestedShit.angle += ((180 / Math.PI) * Math.atan2(swagMatrix.b, swagMatrix.a));
|
||||
// nestedShit.angle += angle;
|
||||
|
|
49
source/shaderslmfao/BuildingShaders.hx
Normal file
49
source/shaderslmfao/BuildingShaders.hx
Normal file
|
@ -0,0 +1,49 @@
|
|||
package shaderslmfao;
|
||||
|
||||
import flixel.system.FlxAssets.FlxShader;
|
||||
|
||||
class BuildingShaders
|
||||
{
|
||||
public var shader(default, null):BuildingShader;
|
||||
public var daAlpha:Float = 1;
|
||||
|
||||
public function new():Void
|
||||
{
|
||||
shader = new BuildingShader();
|
||||
shader.alphaShit.value = [0];
|
||||
}
|
||||
|
||||
public function update(elapsed:Float):Void
|
||||
{
|
||||
shader.alphaShit.value[0] += elapsed;
|
||||
}
|
||||
|
||||
public function reset()
|
||||
{
|
||||
shader.alphaShit.value[0] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
class BuildingShader extends FlxShader
|
||||
{
|
||||
@:glFragmentSource('
|
||||
#pragma header
|
||||
|
||||
uniform float alphaShit;
|
||||
|
||||
void main()
|
||||
{
|
||||
vec4 color = flixel_texture2D(bitmap, openfl_TextureCoordv);
|
||||
|
||||
if (color.a > 0.0)
|
||||
color -= alphaShit;
|
||||
|
||||
gl_FragColor = color;
|
||||
}
|
||||
|
||||
')
|
||||
public function new()
|
||||
{
|
||||
super();
|
||||
}
|
||||
}
|
|
@ -31,7 +31,7 @@ class OptionsState extends MusicBeatState
|
|||
var options = addPage(Options, new OptionsMenu(false));
|
||||
var preferences = addPage(Preferences, new PreferencesMenu());
|
||||
var controls = addPage(Controls, new ControlsMenu());
|
||||
var colors = addPage(Colors, new ColorsMenu());
|
||||
// var colors = addPage(Colors, new ColorsMenu());
|
||||
|
||||
#if cpp
|
||||
var mods = addPage(Mods, new ModMenu());
|
||||
|
@ -41,7 +41,7 @@ class OptionsState extends MusicBeatState
|
|||
{
|
||||
options.onExit.add(exitToMainMenu);
|
||||
controls.onExit.add(switchPage.bind(Options));
|
||||
colors.onExit.add(switchPage.bind(Options));
|
||||
// colors.onExit.add(switchPage.bind(Options));
|
||||
preferences.onExit.add(switchPage.bind(Options));
|
||||
|
||||
#if cpp
|
||||
|
@ -179,7 +179,7 @@ class OptionsMenu extends Page
|
|||
add(items = new TextMenuList());
|
||||
createItem('preferences', function() switchPage(Preferences));
|
||||
createItem("controls", function() switchPage(Controls));
|
||||
createItem('colors', function() switchPage(Colors));
|
||||
// createItem('colors', function() switchPage(Colors));
|
||||
#if cpp
|
||||
createItem('mods', function() switchPage(Mods));
|
||||
#end
|
||||
|
|
|
@ -30,7 +30,7 @@ class PreferencesMenu extends ui.OptionsState.Page
|
|||
|
||||
add(items = new TextMenuList());
|
||||
|
||||
createPrefItem('naughtyness', 'censor-naughty', false);
|
||||
createPrefItem('naughtyness', 'censor-naughty', true);
|
||||
createPrefItem('downscroll', 'downscroll', false);
|
||||
createPrefItem('flashing menu', 'flashing-menu', true);
|
||||
createPrefItem('Camera Zooming on Beat', 'camera-zoom', true);
|
||||
|
@ -65,7 +65,7 @@ class PreferencesMenu extends ui.OptionsState.Page
|
|||
|
||||
public static function initPrefs():Void
|
||||
{
|
||||
preferenceCheck('censor-naughty', false);
|
||||
preferenceCheck('censor-naughty', true);
|
||||
preferenceCheck('downscroll', false);
|
||||
preferenceCheck('flashing-menu', true);
|
||||
preferenceCheck('camera-zoom', true);
|
||||
|
|
Loading…
Reference in a new issue