Merge remote-tracking branch 'public/main'

This commit is contained in:
⍚~Nex
2024-09-14 16:03:38 +02:00
8 changed files with 27 additions and 22 deletions
+2 -2
View File
@@ -38,12 +38,12 @@ jobs:
- name: Tar files
run: tar -zcvf CodenameEngine.tar.gz -C export/release/linux/bin .
- name: Uploading artifact (entire build)
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: Codename Engine
path: CodenameEngine.tar.gz
# - name: Uploading artifact (executable)
# uses: actions/upload-artifact@v2
# uses: actions/upload-artifact@v4
# with:
# name: Update-Linux
# path: export/release/linux/bin/CodenameEngine
+2 -2
View File
@@ -35,12 +35,12 @@ jobs:
- name: Tar files
run: tar -zcvf CodenameEngine.tar.gz -C export/release/macos/bin .
- name: Uploading artifact (entire build)
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: Codename Engine
path: CodenameEngine.tar.gz
# - name: Uploading artifact (executable)
# uses: actions/upload-artifact@v2
# uses: actions/upload-artifact@v4
# with:
# name: Update-Mac
# path: export/release/macos/bin/CodenameEngine
+2 -2
View File
@@ -33,12 +33,12 @@ jobs:
run: |
haxelib run lime build windows
- name: Uploading artifact (entire build)
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: Codename Engine
path: export/release/windows/bin
# - name: Uploading artifact (executable)
# uses: actions/upload-artifact@v2
# uses: actions/upload-artifact@v4
# with:
# name: Update-Windows
# path: export/release/windows/bin/CodenameEngine.exe
+7 -7
View File
@@ -18,17 +18,17 @@ void main() {
return;
vec4 color = getColor(camPos);
float fsteps = steps;
for(float inside = 1.0; inside < stepsInside+1.0; inside++) {
float fsteps = float(steps);
for(float inside = 1.0; inside < float(stepsInside)+1.0; inside++) {
for(int i = 0; i < steps; i++) {
float fi = i;
float fi = float(i);
color += getColor(camPos + vec2(
strength * (inside / stepsInside) * cos(fi / fsteps * (PI * 2.0)),
strength * (inside / stepsInside) * sin(fi / fsteps * (PI * 2.0))
strength * (inside / float(stepsInside)) * cos(fi / fsteps * (PI * 2.0)),
strength * (inside / float(stepsInside)) * sin(fi / fsteps * (PI * 2.0))
));
}
}
color /= steps * stepsInside;
color /= vec4(steps * stepsInside);
gl_FragColor = color;
}
}
+1
View File
@@ -197,6 +197,7 @@
<haxedef name="HXCPP_CHECK_POINTER" if="release" />
<haxedef name="HXCPP_STACK_LINE" if="release" />
<haxedef name="HXCPP_DEBUG_LINK" if="release" />
<haxedef name="HXCPP_CATCH_SEGV" />
<haxedef name="hscriptPos" /> <!-- for logging -->
</project>
+1 -1
View File
@@ -133,7 +133,7 @@ class FunkinSprite extends FlxSkewedSprite implements IBeatReceiver implements I
// TODO: find a solution without countedBeat
var anim = beatAnims[FlxMath.wrap(countedBeat++, 0, beatAnims.length - 1)];
if (anim.name != null && anim.name != "null" && anim.name != "none")
playAnim(anim.name);
playAnim(anim.name, anim.forced);
}
}
+11 -8
View File
@@ -4,6 +4,7 @@ import flixel.util.FlxColor;
import flixel.util.typeLimit.OneOfTwo;
import funkin.backend.FunkinSprite.XMLAnimType;
import funkin.backend.FunkinSprite;
import funkin.game.Character;
import funkin.backend.system.ErrorCode;
import funkin.backend.system.interfaces.IOffsetCompatible;
import haxe.xml.Access;
@@ -170,8 +171,7 @@ class XMLUtil {
animType: spr.spriteAnimType,
x: 0,
y: 0,
indices: [for(i in 0...spr.frames.frames.length) i],
forced: (node.has.forced && node.att.forced == "true") || (!node.has.forced && spr.spriteAnimType == BEAT)
indices: [for(i in 0...spr.frames.frames.length) i]
});
}
}
@@ -197,8 +197,7 @@ class XMLUtil {
animType: animType,
x: 0,
y: 0,
indices: [],
forced: false,
indices: []
};
if (anim.has.name) animData.name = anim.att.name;
@@ -254,24 +253,28 @@ class XMLUtil {
if (sprite is FunkinSprite) {
var xmlSpr = cast(sprite, FunkinSprite);
var name = animData.name;
switch(animData.animType) {
case BEAT:
xmlSpr.beatAnims.push({
name: animData.name,
forced: animData.forced.getDefault(false)
name: name,
forced: animData.forced.getDefault(defaultForcedCheck(name, xmlSpr))
});
case LOOP:
xmlSpr.playAnim(animData.name, animData.forced.getDefault(false));
xmlSpr.playAnim(name, animData.forced.getDefault(defaultForcedCheck(name, xmlSpr)));
default:
// nothing
}
xmlSpr.animDatas.set(animData.name, animData);
xmlSpr.animDatas.set(name, animData);
}
return OK;
}
return MISSING_PROPERTY;
}
public static inline function defaultForcedCheck(animName:String, sprite:FunkinSprite):Bool
return sprite is Character && (animName.startsWith("idle") || animName.startsWith("danceLeft") || animName.startsWith("danceRight")) ? false : sprite.spriteAnimType == BEAT;
public static inline function fixXMLText(text:String) {
var v:String;
return [for(l in text.split("\n")) if ((v = l.trim()) != "") v].join("\n");
+1
View File
@@ -306,6 +306,7 @@ class Character extends FunkinSprite implements IBeatReceiver implements IOffset
public inline function buildCharacter(xml:Access) {
this.xml = xml; // Modders wassup :D
sprite = curCharacter;
spriteAnimType = BEAT;
if (xml.x.exists("isPlayer")) playerOffsets = (xml.x.get("isPlayer") == "true");
if (xml.x.exists("x")) globalOffset.x = Std.parseFloat(xml.x.get("x"));