Merge branch 'main' into new-editors
This commit is contained in:
@@ -181,10 +181,12 @@ class FunkinSprite extends FlxSkewedSprite implements IBeatReceiver implements I
|
||||
animateAtlas.flipX = flipX;
|
||||
animateAtlas.flipY = flipY;
|
||||
animateAtlas.shader = shader;
|
||||
animateAtlas.shaderEnabled = shaderEnabled;
|
||||
animateAtlas.antialiasing = antialiasing;
|
||||
animateAtlas.skew = skew;
|
||||
animateAtlas.transformMatrix = transformMatrix;
|
||||
animateAtlas.matrixExposed = matrixExposed;
|
||||
animateAtlas.colorTransform = colorTransform;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -457,14 +457,7 @@ vec4 flixel_texture2D(sampler2D bitmap, vec2 coord)
|
||||
}
|
||||
|
||||
color = vec4(color.rgb / color.a, color.a);
|
||||
|
||||
mat4 colorMultiplier = mat4(0);
|
||||
colorMultiplier[0][0] = openfl_ColorMultiplierv.x;
|
||||
colorMultiplier[1][1] = openfl_ColorMultiplierv.y;
|
||||
colorMultiplier[2][2] = openfl_ColorMultiplierv.z;
|
||||
colorMultiplier[3][3] = openfl_ColorMultiplierv.w;
|
||||
|
||||
color = clamp(openfl_ColorOffsetv + (color * colorMultiplier), 0.0, 1.0);
|
||||
color = clamp(openfl_ColorOffsetv + (color * openfl_ColorMultiplierv), 0.0, 1.0);
|
||||
|
||||
if (color.a > 0.0)
|
||||
{
|
||||
@@ -491,39 +484,9 @@ vec4 textureCam(sampler2D bitmap, vec2 pos) {
|
||||
return flixel_texture2D(bitmap, camToOg(pos));
|
||||
}";
|
||||
|
||||
public static final fragBody:String = "vec4 color = texture2D (bitmap, openfl_TextureCoordv);
|
||||
|
||||
if (color.a == 0.0) {
|
||||
|
||||
gl_FragColor = vec4 (0.0, 0.0, 0.0, 0.0);
|
||||
|
||||
} else if (openfl_HasColorTransform) {
|
||||
|
||||
color = vec4 (color.rgb / color.a, color.a);
|
||||
|
||||
mat4 colorMultiplier = mat4 (0);
|
||||
colorMultiplier[0][0] = openfl_ColorMultiplierv.x;
|
||||
colorMultiplier[1][1] = openfl_ColorMultiplierv.y;
|
||||
colorMultiplier[2][2] = openfl_ColorMultiplierv.z;
|
||||
colorMultiplier[3][3] = 1.0; // openfl_ColorMultiplierv.w;
|
||||
|
||||
color = clamp (openfl_ColorOffsetv + (color * colorMultiplier), 0.0, 1.0);
|
||||
|
||||
if (color.a > 0.0) {
|
||||
|
||||
gl_FragColor = vec4 (color.rgb * color.a * openfl_Alphav, color.a * openfl_Alphav);
|
||||
|
||||
} else {
|
||||
|
||||
gl_FragColor = vec4 (0.0, 0.0, 0.0, 0.0);
|
||||
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
gl_FragColor = color * openfl_Alphav;
|
||||
|
||||
}";
|
||||
public static final fragBody:String = "vec4 color = flixel_texture2D (bitmap, openfl_TextureCoordv);
|
||||
gl_FragColor = color;
|
||||
";
|
||||
public static final vertHeader:String = "attribute float openfl_Alpha;
|
||||
attribute vec4 openfl_ColorMultiplier;
|
||||
attribute vec4 openfl_ColorOffset;
|
||||
|
||||
@@ -75,18 +75,18 @@ const int EFFECT_TYPE_FLAG = 4;
|
||||
uniform int effectType;
|
||||
|
||||
/**
|
||||
* How fast the waves move over time
|
||||
*/
|
||||
* How fast the waves move over time
|
||||
*/
|
||||
uniform float uSpeed;
|
||||
|
||||
/**
|
||||
* Number of waves over time
|
||||
*/
|
||||
* Number of waves over time
|
||||
*/
|
||||
uniform float uFrequency;
|
||||
|
||||
/**
|
||||
* How much the pixels are going to stretch over the waves
|
||||
*/
|
||||
* How much the pixels are going to stretch over the waves
|
||||
*/
|
||||
uniform float uWaveAmplitude;
|
||||
|
||||
vec2 sineWave(vec2 pt)
|
||||
|
||||
@@ -148,6 +148,11 @@ class StrumLine extends FlxTypedGroup<Strum> {
|
||||
}
|
||||
}
|
||||
notes.sortNotes();
|
||||
|
||||
var scrollSpeed = strumLine.scrollSpeed;
|
||||
if(scrollSpeed == null) if (PlayState.instance != null) scrollSpeed = PlayState.instance.scrollSpeed;
|
||||
if(scrollSpeed == null) scrollSpeed = 1;
|
||||
notes.limit = 1500 / scrollSpeed;
|
||||
}
|
||||
|
||||
public override function update(elapsed:Float) {
|
||||
@@ -179,10 +184,11 @@ class StrumLine extends FlxTypedGroup<Strum> {
|
||||
if (__updateNote_event.cancelled) return;
|
||||
|
||||
if (__updateNote_event.__updateHitWindow) {
|
||||
daNote.canBeHit = (daNote.strumTime > __updateNote_songPos - (PlayState.instance.hitWindow * daNote.latePressWindow)
|
||||
&& daNote.strumTime < __updateNote_songPos + (PlayState.instance.hitWindow * daNote.earlyPressWindow));
|
||||
var hitWindow = PlayState.instance.hitWindow;
|
||||
daNote.canBeHit = (daNote.strumTime > __updateNote_songPos - (hitWindow * daNote.latePressWindow)
|
||||
&& daNote.strumTime < __updateNote_songPos + (hitWindow * daNote.earlyPressWindow));
|
||||
|
||||
if (daNote.strumTime < __updateNote_songPos - PlayState.instance.hitWindow && !daNote.wasGoodHit)
|
||||
if (daNote.strumTime < __updateNote_songPos - hitWindow && !daNote.wasGoodHit)
|
||||
daNote.tooLate = true;
|
||||
}
|
||||
|
||||
|
||||
@@ -19,8 +19,10 @@ class MainMenuState extends MusicBeatState
|
||||
|
||||
var optionShit:Array<String> = CoolUtil.coolTextFile(Paths.txt("config/menuItems"));
|
||||
|
||||
var bg:FlxSprite;
|
||||
var magenta:FlxSprite;
|
||||
var camFollow:FlxObject;
|
||||
var versionText:FunkinText;
|
||||
|
||||
public var canAccessDebugMenus:Bool = true;
|
||||
|
||||
@@ -32,7 +34,7 @@ class MainMenuState extends MusicBeatState
|
||||
|
||||
CoolUtil.playMenuSong();
|
||||
|
||||
var bg:FlxSprite = new FlxSprite(-80).loadAnimatedGraphic(Paths.image('menus/menuBG'));
|
||||
bg = new FlxSprite(-80).loadAnimatedGraphic(Paths.image('menus/menuBG'));
|
||||
add(bg);
|
||||
|
||||
camFollow = new FlxObject(0, 0, 1, 1);
|
||||
@@ -70,15 +72,16 @@ class MainMenuState extends MusicBeatState
|
||||
|
||||
FlxG.camera.follow(camFollow, null, 0.06);
|
||||
|
||||
var versionShit:FunkinText = new FunkinText(5, FlxG.height - 2, 0, 'Codename Engine v${Application.current.meta.get('version')}\nCommit ${funkin.backend.system.macros.GitCommitMacro.commitNumber} (${funkin.backend.system.macros.GitCommitMacro.commitHash})\n[${controls.getKeyName(SWITCHMOD)}] Open Mods menu\n');
|
||||
versionShit.y -= versionShit.height;
|
||||
versionShit.scrollFactor.set();
|
||||
add(versionShit);
|
||||
versionText = new FunkinText(5, FlxG.height - 2, 0, 'Codename Engine v${Application.current.meta.get('version')}\nCommit ${funkin.backend.system.macros.GitCommitMacro.commitNumber} (${funkin.backend.system.macros.GitCommitMacro.commitHash})\n[${controls.getKeyName(SWITCHMOD)}] Open Mods menu\n');
|
||||
versionText.y -= versionText.height;
|
||||
versionText.scrollFactor.set();
|
||||
add(versionText);
|
||||
|
||||
changeItem();
|
||||
}
|
||||
|
||||
var selectedSomethin:Bool = false;
|
||||
var forceCenterX:Bool = true;
|
||||
|
||||
override function update(elapsed:Float)
|
||||
{
|
||||
@@ -127,6 +130,7 @@ class MainMenuState extends MusicBeatState
|
||||
|
||||
super.update(elapsed);
|
||||
|
||||
if (forceCenterX)
|
||||
menuItems.forEach(function(spr:FlxSprite)
|
||||
{
|
||||
spr.screenCenter(X);
|
||||
|
||||
Reference in New Issue
Block a user