Merge branch 'main' into new-editors
|
Before Width: | Height: | Size: 44 KiB |
|
After Width: | Height: | Size: 3.3 KiB |
|
After Width: | Height: | Size: 4.6 KiB |
|
After Width: | Height: | Size: 2.6 KiB |
|
After Width: | Height: | Size: 2.9 KiB |
|
After Width: | Height: | Size: 2.7 KiB |
|
After Width: | Height: | Size: 5.9 KiB |
|
After Width: | Height: | Size: 6.2 KiB |
|
After Width: | Height: | Size: 3.4 KiB |
|
After Width: | Height: | Size: 2.4 KiB |
@@ -64,6 +64,7 @@
|
||||
<assets path="assets/" rename="assets" exclude="*.mp3" unless="web"/>
|
||||
</section>
|
||||
|
||||
<!-- TODO: make it copy this manually, instead of using assets node, so it doesn't manually check for fonts -->
|
||||
<assets path='mods' rename='mods' embed='false'/>
|
||||
<assets path='art/readme.txt' rename='do NOT readme.txt' />
|
||||
|
||||
@@ -150,7 +151,7 @@
|
||||
<!-- Comment this out to disable dark mode windows -->
|
||||
<define name="DARK_MODE_WINDOW"/>
|
||||
|
||||
<haxedef name="analyzer-optimize" />
|
||||
<haxedef name="analyzer-optimize" unless="debug" />
|
||||
|
||||
<haxedef name="VIDEO_CUTSCENES" if="VIDEO_CUTSCENES" />
|
||||
<haxedef name="UPDATE_CHECKING" if="UPDATE_CHECKING" />
|
||||
|
||||
@@ -31,7 +31,7 @@ final class EventsData {
|
||||
{name: "Time (Steps)", type: TFloat(0.25, 9999, 0.25, 2), defValue: 4},
|
||||
{name: "Camera", type: TDropDown(['camGame', 'camHUD']), defValue: "camHUD"}
|
||||
],
|
||||
"BPM Change" => [{name: "Target BPM", type: TFloat(1), defValue: 100}],
|
||||
"BPM Change" => [{name: "Target BPM", type: TFloat(1.00, null, 0.001, 3), defValue: 100}],
|
||||
"Scroll Speed Change" => [
|
||||
{name: "Tween Speed?", type: TBool, defValue: true},
|
||||
{name: "New Speed", type: TFloat(0.01, 99, 0.01, 2), defValue: 1.},
|
||||
|
||||
@@ -101,11 +101,15 @@ class HScript extends Script {
|
||||
|
||||
private function _errorHandler(error:Error) {
|
||||
var fileName = error.origin;
|
||||
var oldfn = '$fileName:${error.line}: ';
|
||||
if(remappedNames.exists(fileName))
|
||||
fileName = remappedNames.get(fileName);
|
||||
var fn = '$fileName:${error.line}: ';
|
||||
var err = error.toString();
|
||||
while(err.startsWith(oldfn) || err.startsWith(fn)) {
|
||||
if (err.startsWith(oldfn)) err = err.substr(oldfn.length);
|
||||
if (err.startsWith(fn)) err = err.substr(fn.length);
|
||||
}
|
||||
|
||||
Logs.traceColored([
|
||||
Logs.logText(fn, GREEN),
|
||||
|
||||
@@ -9,29 +9,29 @@ class EditorPicker extends MusicBeatSubstate {
|
||||
public var options:Array<Editor> = [
|
||||
{
|
||||
name: "Chart Editor",
|
||||
iconID: 0,
|
||||
id: "chart",
|
||||
state: funkin.editors.charter.CharterSelection
|
||||
},
|
||||
{
|
||||
name: "Character Editor",
|
||||
iconID: 1,
|
||||
id: "character",
|
||||
state: funkin.editors.character.CharacterSelection
|
||||
},
|
||||
{
|
||||
name: "Stage Editor",
|
||||
iconID: 2,
|
||||
id: "stage",
|
||||
state: funkin.editors.stage.StageSelection
|
||||
},
|
||||
#if debug
|
||||
{
|
||||
name: "UI Debug State",
|
||||
iconID: 3,
|
||||
id: "uiDebug",
|
||||
state: UIDebugState
|
||||
},
|
||||
#end
|
||||
{
|
||||
name: "Wiki",
|
||||
iconID: 5,
|
||||
id: "wiki",
|
||||
state: null,
|
||||
onClick: function() {
|
||||
CoolUtil.openURL("https://codename-engine.com/");
|
||||
@@ -39,7 +39,7 @@ class EditorPicker extends MusicBeatSubstate {
|
||||
},
|
||||
{
|
||||
name: "Debug Options",
|
||||
iconID: 4,
|
||||
id: "debugOptions",
|
||||
state: DebugOptions
|
||||
}
|
||||
];
|
||||
@@ -74,7 +74,7 @@ class EditorPicker extends MusicBeatSubstate {
|
||||
|
||||
optionHeight = FlxG.height / options.length;
|
||||
for(k=>o in options) {
|
||||
var spr = new EditorPickerOption(o.name, o.iconID, optionHeight);
|
||||
var spr = new EditorPickerOption(o.name, o.id, optionHeight);
|
||||
spr.y = k * optionHeight;
|
||||
add(spr);
|
||||
sprites.push(spr);
|
||||
@@ -155,7 +155,7 @@ class EditorPicker extends MusicBeatSubstate {
|
||||
|
||||
typedef Editor = {
|
||||
var name:String;
|
||||
var iconID:Int;
|
||||
var id:String;
|
||||
var state:Class<MusicBeatState>;
|
||||
var ?onClick:Void->Void;
|
||||
}
|
||||
@@ -171,19 +171,14 @@ class EditorPickerOption extends FlxTypedSpriteGroup<FlxSprite> {
|
||||
public var selectionLerp:Float = 0;
|
||||
|
||||
public var iconRotationCycle:Float = 0;
|
||||
public function new(name:String, iconID:Int, height:Float) {
|
||||
public function new(name:String, iconID:String, height:Float) {
|
||||
super();
|
||||
|
||||
FlxG.mouse.visible = true;
|
||||
iconSpr = new FlxSprite();
|
||||
iconSpr.loadGraphic(Paths.image('editors/icons'), true, 128, 128);
|
||||
iconSpr.animation.add("icon", [iconID], 24, true);
|
||||
iconSpr.animation.play("icon");
|
||||
iconSpr.loadGraphic(Paths.image('editors/icons/$iconID'));
|
||||
iconSpr.antialiasing = true;
|
||||
if (height < 150) {
|
||||
iconSpr.scale.set(height / 150, height / 150);
|
||||
iconSpr.updateHitbox();
|
||||
}
|
||||
iconSpr.setUnstretchedGraphicSize(110, 110, false);
|
||||
iconSpr.x = 25 + ((height - iconSpr.width) / 2);
|
||||
iconSpr.y = (height - iconSpr.height) / 2;
|
||||
|
||||
|
||||
@@ -340,6 +340,7 @@ class StrumLine extends FlxTypedGroup<Strum> {
|
||||
super.destroy();
|
||||
if(startingPos != null)
|
||||
startingPos.put();
|
||||
notes = FlxDestroyUtil.destroy(notes);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -30,14 +30,14 @@ class DialogueCutscene extends ScriptedCutscene {
|
||||
public static var cutscene:DialogueCutscene;
|
||||
public var dialogueScript(get, set):Script;
|
||||
|
||||
public function set_curLine(val:DialogueLine) {
|
||||
public inline function set_curLine(val:DialogueLine) {
|
||||
lastLine = curLine;
|
||||
return curLine = val;
|
||||
}
|
||||
|
||||
// Backwards compat funcs - Nex
|
||||
public function set_dialogueScript(val:Script) return script = val;
|
||||
public function get_dialogueScript() return script;
|
||||
public inline function set_dialogueScript(val:Script) return script = val;
|
||||
public inline function get_dialogueScript() return script;
|
||||
|
||||
public function new(dialoguePath:String, callback:Void->Void) {
|
||||
super(this.dialoguePath = dialoguePath, callback);
|
||||
|
||||
@@ -62,6 +62,14 @@ class VideoCutscene extends Cutscene {
|
||||
video.antialiasing = true;
|
||||
video.autoPause = false; // Imma handle it better inside this class, mainly because of the pause menu - Nex
|
||||
video.bitmap.onEndReached.add(close);
|
||||
video.bitmap.onFormatSetup.add(function() if (video.bitmap != null && video.bitmap.bitmapData != null) {
|
||||
final width = video.bitmap.bitmapData.width;
|
||||
final height = video.bitmap.bitmapData.height;
|
||||
final scale:Float = Math.min(FlxG.width / width, FlxG.height / height);
|
||||
video.setGraphicSize(Std.int(width * scale), Std.int(height * scale));
|
||||
video.updateHitbox();
|
||||
video.screenCenter();
|
||||
});
|
||||
|
||||
//cover = new FlxSprite(0, FlxG.height * 0.85).makeSolid(FlxG.width + 50, FlxG.height + 50, 0xFF000000);
|
||||
//cover.scrollFactor.set(0, 0);
|
||||
@@ -236,6 +244,7 @@ class VideoCutscene extends Cutscene {
|
||||
|
||||
public override function destroy() {
|
||||
FlxG.cameras.remove(cutsceneCamera, true);
|
||||
video.destroy();
|
||||
super.destroy();
|
||||
}
|
||||
#end
|
||||
|
||||
@@ -12,7 +12,7 @@ class CreditsMain extends TreeMenu {
|
||||
var items:Array<OptionType> = [];
|
||||
|
||||
public override function create() {
|
||||
bg = new FlxSprite(-80).loadGraphic(Paths.image('menus/menuBGBlue'));
|
||||
bg = new FlxSprite(-80).loadAnimatedGraphic(Paths.image('menus/menuBGBlue'));
|
||||
// bg.scrollFactor.set();
|
||||
bg.scale.set(1.15, 1.15);
|
||||
bg.updateHitbox();
|
||||
|
||||
@@ -32,6 +32,8 @@ class OptionsMenu extends TreeMenu {
|
||||
}
|
||||
];
|
||||
|
||||
var bg:FlxSprite;
|
||||
|
||||
public override function create() {
|
||||
super.create();
|
||||
|
||||
@@ -39,7 +41,7 @@ class OptionsMenu extends TreeMenu {
|
||||
|
||||
DiscordUtil.call("onMenuLoaded", ["Options Menu"]);
|
||||
|
||||
var bg:FlxSprite = new FlxSprite(-80).loadAnimatedGraphic(Paths.image('menus/menuBGBlue'));
|
||||
bg = new FlxSprite(-80).loadAnimatedGraphic(Paths.image('menus/menuBGBlue'));
|
||||
// bg.scrollFactor.set();
|
||||
bg.scale.set(1.15, 1.15);
|
||||
bg.updateHitbox();
|
||||
|
||||