Merge remote-tracking branch 'upstream/main' into pr/397

This commit is contained in:
Ralty
2025-06-30 22:34:03 +07:00
9 changed files with 70 additions and 12 deletions
+1 -1
View File
@@ -7,7 +7,7 @@ jobs:
build:
name: Linux Build
permissions: write-all
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- name: Pulling the source
uses: actions/checkout@v2
-1
View File
@@ -82,7 +82,6 @@ In the future (when the engine won't be a WIP anymore) we're gonna also publish
<details>
<summary><h2>Credits</h2></summary>
- Credits to [Ne_Eo](https://twitter.com/Ne_Eo_Twitch) and the [3D-HaxeFlixel](https://github.com/lunarcleint/3D-HaxeFlixel) repository for Away3D Flixel support
- Credits to the [FlxAnimate](https://github.com/Dot-Stuff/flxanimate) team for the Animate Atlas support
- Credits to Smokey555 for the backup Animate Atlas to spritesheet code
- Credits to MAJigsaw77 for [hxvlc](https://github.com/MAJigsaw77/hxvlc) (video cutscene/mp4 support) and [hxdiscord_rpc](https://github.com/MAJigsaw77/hxdiscord_rpc) (discord rpc integration)
+1 -1
View File
@@ -1,4 +1,4 @@
{
"clientID": "1027994136193810442",
"clientID": "1383853614589673472",
"logoKey": "icon"
}
+1 -1
View File
@@ -87,7 +87,7 @@ class DiscordUtil
config.logoKey = config.logoKey.getDefault("icon");
config.logoText = config.logoText.getDefault(Application.current.meta.get('title'));
config.clientID = config.clientID.getDefault("1027994136193810442");
config.clientID = config.clientID.getDefault("1383853614589673472");
currentID = config.clientID;
#end
}
+3 -1
View File
@@ -154,7 +154,9 @@ class Note extends FlxSprite
case 0:
animation.addByPrefix('scroll', 'purple0');
animation.addByPrefix('hold', 'purple hold piece');
animation.addByPrefix('holdend', 'pruple end hold');
animation.addByPrefix('holdend', 'purple hold end');
if (frames.getByName("pruple end hold") != null)
animation.addByPrefix("holdend", "pruple end hold");
case 1:
animation.addByPrefix('scroll', 'blue0');
animation.addByPrefix('hold', 'blue hold piece');
+39
View File
@@ -0,0 +1,39 @@
package funkin.game;
class Splash extends FunkinSprite
{
/**
* The current splash strum
* WARNING: It can be null
*/
public var strum:Null<Strum>;
/**
* Shortcut to `strum.ID`
* WARNING: It can be null
*/
public var strumID:Null<Int>;
public static function copyFrom(source:Splash):Splash
{
var spr = new Splash();
@:privateAccess {
spr.setPosition(source.x, source.y);
spr.frames = source.frames;
if (source.animateAtlas != null && source.atlasPath != null)
spr.loadSprite(source.atlasPath);
spr.animation.copyFrom(source.animation);
spr.visible = source.visible;
spr.alpha = source.alpha;
spr.antialiasing = source.antialiasing;
spr.scale.set(source.scale.x, source.scale.y);
spr.scrollFactor.set(source.scrollFactor.x, source.scrollFactor.y);
spr.skew.set(source.skew.x, source.skew.y);
spr.transformMatrix = source.transformMatrix;
spr.matrixExposed = source.matrixExposed;
spr.zoomFactor = source.zoomFactor;
spr.animOffsets = source.animOffsets.copy();
}
return spr;
}
}
+11 -6
View File
@@ -2,7 +2,7 @@ package funkin.game;
import haxe.xml.Access;
class SplashGroup extends FlxTypedGroup<FunkinSprite> {
class SplashGroup extends FlxTypedGroup<Splash> {
/**
* Whenever the splash group has successfully loaded or not.
*/
@@ -46,7 +46,7 @@ class SplashGroup extends FlxTypedGroup<FunkinSprite> {
}
function createSplash(imagePath:String) {
var splash = new FunkinSprite();
var splash = new Splash();
splash.antialiasing = true;
splash.active = splash.visible = false;
splash.loadSprite(Paths.image(imagePath));
@@ -56,7 +56,7 @@ class SplashGroup extends FlxTypedGroup<FunkinSprite> {
return splash;
}
function setupAnims(xml:Access, splash:FunkinSprite) {
function setupAnims(xml:Access, splash:Splash) {
for(strum in xml.nodes.strum) {
var id:Null<Int> = Std.parseInt(strum.att.id);
if (id != null) {
@@ -85,12 +85,14 @@ class SplashGroup extends FlxTypedGroup<FunkinSprite> {
};
}
function pregenerateSplashes(splash:FunkinSprite) {
function pregenerateSplashes(splash:Splash) {
// make 7 additional splashes
for(i in 0...7) {
var spr = FunkinSprite.copyFrom(splash);
var spr = Splash.copyFrom(splash);
spr.animation.finishCallback = function(name:String) {
spr.active = spr.visible = false;
spr.strum = null;
spr.strumID = null;
};
add(spr);
}
@@ -103,11 +105,14 @@ class SplashGroup extends FlxTypedGroup<FunkinSprite> {
return animationNames[id][FlxG.random.int(0, animationNames[id].length - 1)];
}
var __splash:FunkinSprite;
var __splash:Splash;
public function showOnStrum(strum:Strum) {
if (!valid) return null;
__splash = recycle();
__splash.strum = strum;
__splash.strumID = strum.ID;
__splash.cameras = strum.lastDrawCameras;
__splash.setPosition(strum.x + ((strum.width - __splash.width) / 2), strum.y + ((strum.height - __splash.height) / 2));
__splash.active = __splash.visible = true;
+1 -1
View File
@@ -1,7 +1,7 @@
package funkin.game;
class SplashHandler extends FlxTypedGroup<FunkinSprite> {
class SplashHandler extends FlxTypedGroup<Splash> {
/**
* Map containing all of the splashes group.
*/
+13
View File
@@ -11,9 +11,15 @@ class ModSwitchMenu extends MusicBeatSubstate {
var alphabets:FlxTypedGroup<Alphabet>;
var curSelected:Int = 0;
var subCam:FlxCamera;
public override function create() {
super.create();
camera = subCam = new FlxCamera();
subCam.bgColor = 0;
FlxG.cameras.add(subCam, false);
var bg = new FlxSprite(0, 0).makeSolid(FlxG.width, FlxG.height, 0xFF000000);
bg.updateHitbox();
bg.scrollFactor.set();
@@ -63,5 +69,12 @@ class ModSwitchMenu extends MusicBeatSubstate {
}
alphabets.members[curSelected].alpha = 1;
}
override function destroy() {
super.destroy();
if (FlxG.cameras.list.contains(subCam))
FlxG.cameras.remove(subCam);
}
}
#end