mirror of
https://github.com/FunkinCrew/Funkin.git
synced 2024-11-27 01:55:52 -05:00
Merge branch 'rewrite/master' of https://github.com/funkincrew/funkin-secret into feature/chart-waveform
This commit is contained in:
commit
73810a5059
10 changed files with 99 additions and 33 deletions
2
assets
2
assets
|
@ -1 +1 @@
|
||||||
Subproject commit 2dd4ab0eb9979422c1c4cb849ebe899b7bf1758a
|
Subproject commit f3e9cd8355f20445fcad7030fdb6363a2325adb3
|
|
@ -1,6 +1,12 @@
|
||||||
# Troubleshooting Common Issues
|
# Troubleshooting Common Issues
|
||||||
|
|
||||||
- Weird macro error with a very tall call stack: Restart Visual Studio Code
|
- Weird macro error with a very tall call stack: Restart Visual Studio Code
|
||||||
|
- NOTE: This is caused by Polymod somewhere, and seems to only occur when there is another compile error somewhere in the program. There is a bounty up for it.
|
||||||
|
|
||||||
- `Get Thread Context Failed`: Turn off other expensive applications while building
|
- `Get Thread Context Failed`: Turn off other expensive applications while building
|
||||||
|
|
||||||
- `Type not found: T1`: This is thrown by `json2object`, make sure the data type of `@:default` is correct.
|
- `Type not found: T1`: This is thrown by `json2object`, make sure the data type of `@:default` is correct.
|
||||||
- NOTE: `flixel.util.typeLimit.OneOfTwo` isn't supported.
|
- NOTE: `flixel.util.typeLimit.OneOfTwo` isn't supported.
|
||||||
|
|
||||||
|
- `Class lists not properly generated. Try cleaning out your export folder, restarting your IDE, and rebuilding your project.`
|
||||||
|
- This is a bug specific to HTML5. Simply perform the steps listed (don't forget to restart the IDE too).
|
||||||
|
|
6
hmm.json
6
hmm.json
|
@ -11,7 +11,7 @@
|
||||||
"name": "flixel",
|
"name": "flixel",
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"dir": null,
|
"dir": null,
|
||||||
"ref": "8437a86aa5dafdb3f5dcb91d212cb10a4ee6e53b",
|
"ref": "da04cbda49a4c5eebe93fb61296dbaf4f0f1b556",
|
||||||
"url": "https://github.com/EliteMasterEric/flixel"
|
"url": "https://github.com/EliteMasterEric/flixel"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -49,7 +49,7 @@
|
||||||
"name": "haxeui-core",
|
"name": "haxeui-core",
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"dir": null,
|
"dir": null,
|
||||||
"ref": "bfdb49886f256a8c37edfc4f46586727d68e2756",
|
"ref": "91ed8d7867c52af5ea2a9513204057d69ab33c8e",
|
||||||
"url": "https://github.com/haxeui/haxeui-core"
|
"url": "https://github.com/haxeui/haxeui-core"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -144,7 +144,7 @@
|
||||||
"name": "polymod",
|
"name": "polymod",
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"dir": null,
|
"dir": null,
|
||||||
"ref": "e8a07b81e3bc535238ad8649e38f5d43c46f1b65",
|
"ref": "80d1d309803c1b111866524f9769325e3b8b0b1b",
|
||||||
"url": "https://github.com/larsiusprime/polymod"
|
"url": "https://github.com/larsiusprime/polymod"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
@ -35,15 +35,15 @@ class Conductor
|
||||||
static var timeChanges:Array<SongTimeChange> = [];
|
static var timeChanges:Array<SongTimeChange> = [];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The current time change.
|
* The most recent time change for the current song position.
|
||||||
*/
|
*/
|
||||||
static var currentTimeChange:SongTimeChange;
|
public static var currentTimeChange(default, null):SongTimeChange;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The current position in the song in milliseconds.
|
* The current position in the song in milliseconds.
|
||||||
* Updated every frame based on the audio position.
|
* Update this every frame based on the audio position using `Conductor.update()`.
|
||||||
*/
|
*/
|
||||||
public static var songPosition:Float = 0;
|
public static var songPosition(default, null):Float = 0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Beats per minute of the current song at the current time.
|
* Beats per minute of the current song at the current time.
|
||||||
|
|
|
@ -2088,10 +2088,34 @@ class ChartEditorState extends UIState // UIState derives from MusicBeatState
|
||||||
if (noteSnapQuantIndex < 0) noteSnapQuantIndex = SNAP_QUANTS.length - 1;
|
if (noteSnapQuantIndex < 0) noteSnapQuantIndex = SNAP_QUANTS.length - 1;
|
||||||
};
|
};
|
||||||
playbarNoteSnap.onClick = _ -> {
|
playbarNoteSnap.onClick = _ -> {
|
||||||
noteSnapQuantIndex++;
|
if (FlxG.keys.pressed.SHIFT)
|
||||||
if (noteSnapQuantIndex >= SNAP_QUANTS.length) noteSnapQuantIndex = 0;
|
{
|
||||||
|
noteSnapQuantIndex = BASE_QUANT_INDEX;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
noteSnapQuantIndex++;
|
||||||
|
if (noteSnapQuantIndex >= SNAP_QUANTS.length) noteSnapQuantIndex = 0;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
playbarBPM.onClick = _ -> {
|
||||||
|
if (FlxG.keys.pressed.CONTROL)
|
||||||
|
{
|
||||||
|
this.setToolboxState(CHART_EDITOR_TOOLBOX_METADATA_LAYOUT, true);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Conductor.currentTimeChange.bpm += 1;
|
||||||
|
refreshMetadataToolbox();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
playbarBPM.onRightClick = _ -> {
|
||||||
|
Conductor.currentTimeChange.bpm -= 1;
|
||||||
|
refreshMetadataToolbox();
|
||||||
|
}
|
||||||
|
|
||||||
// Add functionality to the menu items.
|
// Add functionality to the menu items.
|
||||||
|
|
||||||
// File
|
// File
|
||||||
|
@ -2202,8 +2226,11 @@ class ChartEditorState extends UIState // UIState derives from MusicBeatState
|
||||||
#if sys
|
#if sys
|
||||||
menubarItemGoToBackupsFolder.onClick = _ -> this.openBackupsFolder();
|
menubarItemGoToBackupsFolder.onClick = _ -> this.openBackupsFolder();
|
||||||
#else
|
#else
|
||||||
// Disable if no file system or command access
|
|
||||||
menubarItemGoToBackupsFolder.disabled = true;
|
// Disable the menu item if we're not on a desktop platform.
|
||||||
|
var menubarItemGoToBackupsFolder = findComponent('menubarItemGoToBackupsFolder', MenuItem);
|
||||||
|
if (menubarItemGoToBackupsFolder != null) menubarItemGoToBackupsFolder.disabled = true;
|
||||||
|
|
||||||
#end
|
#end
|
||||||
|
|
||||||
menubarItemUserGuide.onClick = _ -> this.openUserGuideDialog();
|
menubarItemUserGuide.onClick = _ -> this.openUserGuideDialog();
|
||||||
|
@ -2264,6 +2291,10 @@ class ChartEditorState extends UIState // UIState derives from MusicBeatState
|
||||||
menubarLabelPlaybackSpeed.text = 'Playback Speed - ${pitchDisplay}x';
|
menubarLabelPlaybackSpeed.text = 'Playback Speed - ${pitchDisplay}x';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
playbarDifficulty.onClick = _ -> {
|
||||||
|
this.setToolboxState(CHART_EDITOR_TOOLBOX_DIFFICULTY_LAYOUT, true);
|
||||||
|
}
|
||||||
|
|
||||||
menubarItemToggleToolboxDifficulty.onChange = event -> this.setToolboxState(CHART_EDITOR_TOOLBOX_DIFFICULTY_LAYOUT, event.value);
|
menubarItemToggleToolboxDifficulty.onChange = event -> this.setToolboxState(CHART_EDITOR_TOOLBOX_DIFFICULTY_LAYOUT, event.value);
|
||||||
menubarItemToggleToolboxMetadata.onChange = event -> this.setToolboxState(CHART_EDITOR_TOOLBOX_METADATA_LAYOUT, event.value);
|
menubarItemToggleToolboxMetadata.onChange = event -> this.setToolboxState(CHART_EDITOR_TOOLBOX_METADATA_LAYOUT, event.value);
|
||||||
menubarItemToggleToolboxNotes.onChange = event -> this.setToolboxState(CHART_EDITOR_TOOLBOX_NOTEDATA_LAYOUT, event.value);
|
menubarItemToggleToolboxNotes.onChange = event -> this.setToolboxState(CHART_EDITOR_TOOLBOX_NOTEDATA_LAYOUT, event.value);
|
||||||
|
@ -2344,9 +2375,13 @@ class ChartEditorState extends UIState // UIState derives from MusicBeatState
|
||||||
*/
|
*/
|
||||||
function openBackupsFolder():Void
|
function openBackupsFolder():Void
|
||||||
{
|
{
|
||||||
|
#if sys
|
||||||
// TODO: Is there a way to open a folder and highlight a file in it?
|
// TODO: Is there a way to open a folder and highlight a file in it?
|
||||||
var absoluteBackupsPath:String = Path.join([Sys.getCwd(), ChartEditorImportExportHandler.BACKUPS_PATH]);
|
var absoluteBackupsPath:String = Path.join([Sys.getCwd(), ChartEditorImportExportHandler.BACKUPS_PATH]);
|
||||||
WindowUtil.openFolder(absoluteBackupsPath);
|
WindowUtil.openFolder(absoluteBackupsPath);
|
||||||
|
#else
|
||||||
|
trace('No file system access, cannot open backups folder.');
|
||||||
|
#end
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -3975,6 +4010,8 @@ class ChartEditorState extends UIState // UIState derives from MusicBeatState
|
||||||
if (playbarSongRemaining.value != songRemainingString) playbarSongRemaining.value = songRemainingString;
|
if (playbarSongRemaining.value != songRemainingString) playbarSongRemaining.value = songRemainingString;
|
||||||
|
|
||||||
playbarNoteSnap.text = '1/${noteSnapQuant}';
|
playbarNoteSnap.text = '1/${noteSnapQuant}';
|
||||||
|
playbarDifficulty.text = "Difficulty: " + selectedDifficulty.toTitleCase();
|
||||||
|
playbarBPM.text = "BPM: " + Conductor.currentTimeChange.bpm;
|
||||||
}
|
}
|
||||||
|
|
||||||
function handlePlayhead():Void
|
function handlePlayhead():Void
|
||||||
|
|
|
@ -83,10 +83,18 @@ class ChartEditorWelcomeDialog extends ChartEditorBaseDialog
|
||||||
public function addRecentFilePath(state:ChartEditorState, chartPath:String):Void
|
public function addRecentFilePath(state:ChartEditorState, chartPath:String):Void
|
||||||
{
|
{
|
||||||
var linkRecentChart:Link = new Link();
|
var linkRecentChart:Link = new Link();
|
||||||
|
|
||||||
var fileNamePattern:EReg = new EReg("([^/\\\\]+)$", "");
|
var fileNamePattern:EReg = new EReg("([^/\\\\]+)$", "");
|
||||||
var fileName:String = fileNamePattern.match(chartPath) ? fileNamePattern.matched(1) : chartPath;
|
var fileName:String = fileNamePattern.match(chartPath) ? fileNamePattern.matched(1) : chartPath;
|
||||||
linkRecentChart.text = fileName;
|
linkRecentChart.text = fileName;
|
||||||
|
|
||||||
linkRecentChart.tooltip = chartPath;
|
linkRecentChart.tooltip = chartPath;
|
||||||
|
|
||||||
|
#if sys
|
||||||
|
var lastModified:String = "Last Modified: " + sys.FileSystem.stat(chartPath).mtime.toString();
|
||||||
|
linkRecentChart.tooltip += "\n" + lastModified;
|
||||||
|
#end
|
||||||
|
|
||||||
linkRecentChart.onClick = function(_event) {
|
linkRecentChart.onClick = function(_event) {
|
||||||
this.hideDialog(DialogButton.CANCEL);
|
this.hideDialog(DialogButton.CANCEL);
|
||||||
|
|
||||||
|
|
|
@ -267,7 +267,7 @@ class LatencyState extends MusicBeatSubState
|
||||||
|
|
||||||
function generateBeatStuff()
|
function generateBeatStuff()
|
||||||
{
|
{
|
||||||
Conductor.songPosition = swagSong.getTimeWithDiff();
|
Conductor.update(swagSong.getTimeWithDiff());
|
||||||
|
|
||||||
var closestBeat:Int = Math.round(Conductor.songPosition / Conductor.beatLengthMs) % diffGrp.members.length;
|
var closestBeat:Int = Math.round(Conductor.songPosition / Conductor.beatLengthMs) % diffGrp.members.length;
|
||||||
var getDiff:Float = Conductor.songPosition - (closestBeat * Conductor.beatLengthMs);
|
var getDiff:Float = Conductor.songPosition - (closestBeat * Conductor.beatLengthMs);
|
||||||
|
|
|
@ -38,12 +38,19 @@ class CapsuleText extends FlxSpriteGroup
|
||||||
|
|
||||||
function set_text(value:String):String
|
function set_text(value:String):String
|
||||||
{
|
{
|
||||||
|
if (value == null) return value;
|
||||||
|
if (blurredText == null || whiteText == null)
|
||||||
|
{
|
||||||
|
trace('WARN: Capsule not initialized properly');
|
||||||
|
return text = value;
|
||||||
|
}
|
||||||
|
|
||||||
blurredText.text = value;
|
blurredText.text = value;
|
||||||
whiteText.text = value;
|
whiteText.text = value;
|
||||||
whiteText.textField.filters = [
|
whiteText.textField.filters = [
|
||||||
new openfl.filters.GlowFilter(0x00ccff, 1, 5, 5, 210, BitmapFilterQuality.MEDIUM),
|
new openfl.filters.GlowFilter(0x00ccff, 1, 5, 5, 210, BitmapFilterQuality.MEDIUM),
|
||||||
// new openfl.filters.BlurFilter(5, 5, BitmapFilterQuality.LOW)
|
// new openfl.filters.BlurFilter(5, 5, BitmapFilterQuality.LOW)
|
||||||
];
|
];
|
||||||
return value;
|
return text = value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -998,6 +998,11 @@ class FreeplayState extends MusicBeatSubState
|
||||||
PlayStatePlaylist.isStoryMode = false;
|
PlayStatePlaylist.isStoryMode = false;
|
||||||
|
|
||||||
var targetSong:Song = SongRegistry.instance.fetchEntry(cap.songData.songId);
|
var targetSong:Song = SongRegistry.instance.fetchEntry(cap.songData.songId);
|
||||||
|
if (targetSong == null)
|
||||||
|
{
|
||||||
|
FlxG.log.warn('WARN: could not find song with id (${cap.songData.songId})');
|
||||||
|
return;
|
||||||
|
}
|
||||||
var targetDifficulty:String = currentDifficulty;
|
var targetDifficulty:String = currentDifficulty;
|
||||||
|
|
||||||
// TODO: Implement Pico into the interface properly.
|
// TODO: Implement Pico into the interface properly.
|
||||||
|
|
|
@ -1,24 +1,25 @@
|
||||||
package funkin.ui.transition;
|
package funkin.ui.transition;
|
||||||
|
|
||||||
import funkin.play.PlayStatePlaylist;
|
|
||||||
import flixel.FlxSprite;
|
import flixel.FlxSprite;
|
||||||
import flixel.FlxState;
|
import flixel.FlxState;
|
||||||
import funkin.graphics.shaders.ScreenWipeShader;
|
|
||||||
import flixel.math.FlxMath;
|
import flixel.math.FlxMath;
|
||||||
|
import flixel.tweens.FlxEase;
|
||||||
|
import flixel.tweens.FlxTween;
|
||||||
import flixel.util.FlxTimer;
|
import flixel.util.FlxTimer;
|
||||||
|
import funkin.graphics.shaders.ScreenWipeShader;
|
||||||
import funkin.play.PlayState;
|
import funkin.play.PlayState;
|
||||||
|
import funkin.play.PlayStatePlaylist;
|
||||||
|
import funkin.play.song.Song.SongDifficulty;
|
||||||
|
import funkin.ui.mainmenu.MainMenuState;
|
||||||
|
import funkin.ui.MusicBeatState;
|
||||||
import haxe.io.Path;
|
import haxe.io.Path;
|
||||||
import lime.app.Future;
|
import lime.app.Future;
|
||||||
import flixel.tweens.FlxTween;
|
|
||||||
import funkin.ui.MusicBeatState;
|
|
||||||
import lime.app.Promise;
|
import lime.app.Promise;
|
||||||
import lime.utils.AssetLibrary;
|
import lime.utils.AssetLibrary;
|
||||||
import flixel.tweens.FlxEase;
|
|
||||||
import lime.utils.AssetManifest;
|
import lime.utils.AssetManifest;
|
||||||
import lime.utils.Assets as LimeAssets;
|
import lime.utils.Assets as LimeAssets;
|
||||||
import openfl.utils.Assets;
|
|
||||||
import funkin.ui.mainmenu.MainMenuState;
|
|
||||||
import openfl.filters.ShaderFilter;
|
import openfl.filters.ShaderFilter;
|
||||||
|
import openfl.utils.Assets;
|
||||||
|
|
||||||
class LoadingState extends MusicBeatState
|
class LoadingState extends MusicBeatState
|
||||||
{
|
{
|
||||||
|
@ -59,18 +60,20 @@ class LoadingState extends MusicBeatState
|
||||||
initSongsManifest().onComplete(function(lib) {
|
initSongsManifest().onComplete(function(lib) {
|
||||||
callbacks = new MultiCallback(onLoad);
|
callbacks = new MultiCallback(onLoad);
|
||||||
var introComplete = callbacks.add('introComplete');
|
var introComplete = callbacks.add('introComplete');
|
||||||
// checkLoadSong(getSongPath());
|
|
||||||
// if (PlayState.currentSong.needsVoices)
|
if (Std.isOfType(target, PlayState))
|
||||||
// {
|
{
|
||||||
// var files = PlayState.currentSong.voiceList;
|
var targetPlayState:PlayState = cast target;
|
||||||
//
|
var targetChart:SongDifficulty = targetPlayState.currentChart;
|
||||||
// if (files == null) files = ['']; // loads with no file name assumption, to load 'Voices.ogg' or whatev normally
|
var instPath:String = Paths.inst(targetChart.song.id);
|
||||||
//
|
var voicesPaths:Array<String> = targetChart.buildVoiceList();
|
||||||
// for (sndFile in files)
|
|
||||||
// {
|
checkLoadSong(instPath);
|
||||||
// checkLoadSong(getVocalPath(sndFile));
|
for (voicePath in voicesPaths)
|
||||||
// }
|
{
|
||||||
// }
|
checkLoadSong(voicePath);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
checkLibrary('shared');
|
checkLibrary('shared');
|
||||||
checkLibrary(PlayStatePlaylist.campaignId);
|
checkLibrary(PlayStatePlaylist.campaignId);
|
||||||
|
|
Loading…
Reference in a new issue