mirror of
https://github.com/ninjamuffin99/Funkin.git
synced 2024-09-12 05:07:06 +00:00
Merge branch 'rewrite/master' into rewrite/bugfix/anim-editor-crash-fix
This commit is contained in:
commit
6fc56ffd77
17
Project.xml
17
Project.xml
|
@ -156,7 +156,6 @@
|
||||||
<haxedef name="HXCPP_CHECK_POINTER" />
|
<haxedef name="HXCPP_CHECK_POINTER" />
|
||||||
<haxedef name="HXCPP_STACK_LINE" />
|
<haxedef name="HXCPP_STACK_LINE" />
|
||||||
<haxedef name="HXCPP_STACK_TRACE" />
|
<haxedef name="HXCPP_STACK_TRACE" />
|
||||||
<haxedef name="openfl-enable-handle-error" />
|
|
||||||
<!-- This macro allows addition of new functionality to existing Flixel. -->
|
<!-- This macro allows addition of new functionality to existing Flixel. -->
|
||||||
<haxeflag name="--macro" value="addMetadata('@:build(funkin.util.macro.FlxMacro.buildFlxBasic())', 'flixel.FlxBasic')" />
|
<haxeflag name="--macro" value="addMetadata('@:build(funkin.util.macro.FlxMacro.buildFlxBasic())', 'flixel.FlxBasic')" />
|
||||||
<!--Place custom nodes like icons here (higher priority to override the HaxeFlixel icon)-->
|
<!--Place custom nodes like icons here (higher priority to override the HaxeFlixel icon)-->
|
||||||
|
@ -196,6 +195,22 @@
|
||||||
<haxedef name="REDIRECT_ASSETS_FOLDER" />
|
<haxedef name="REDIRECT_ASSETS_FOLDER" />
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
|
||||||
|
<section>
|
||||||
|
<!--
|
||||||
|
This flag enables the popup/crashlog error handler.
|
||||||
|
However, it also messes with breakpoints on some platforms.
|
||||||
|
-->
|
||||||
|
<haxedef name="openfl-enable-handle-error" />
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section>
|
||||||
|
<!-- TODO: Add a flag to Github Actions to turn this on or something. -->
|
||||||
|
|
||||||
|
<!-- Forces the version string to include the Git hash even on release builds (which are used for performance reasons). -->
|
||||||
|
<haxedef name="FORCE_DEBUG_VERSION" />
|
||||||
|
</section>
|
||||||
|
|
||||||
<!-- Run a script before and after building. -->
|
<!-- Run a script before and after building. -->
|
||||||
<postbuild haxe="source/Prebuild.hx"/> -->
|
<postbuild haxe="source/Prebuild.hx"/> -->
|
||||||
<postbuild haxe="source/Postbuild.hx"/> -->
|
<postbuild haxe="source/Postbuild.hx"/> -->
|
||||||
|
|
|
@ -570,7 +570,7 @@ class FreeplayState extends MusicBeatSubState
|
||||||
var randomCapsule:SongMenuItem = grpCapsules.recycle(SongMenuItem);
|
var randomCapsule:SongMenuItem = grpCapsules.recycle(SongMenuItem);
|
||||||
randomCapsule.init(FlxG.width, 0, "Random");
|
randomCapsule.init(FlxG.width, 0, "Random");
|
||||||
randomCapsule.onConfirm = function() {
|
randomCapsule.onConfirm = function() {
|
||||||
trace("RANDOM SELECTED");
|
capsuleOnConfirmRandom(randomCapsule);
|
||||||
};
|
};
|
||||||
randomCapsule.y = randomCapsule.intendedY(0) + 10;
|
randomCapsule.y = randomCapsule.intendedY(0) + 10;
|
||||||
randomCapsule.targetPos.x = randomCapsule.x;
|
randomCapsule.targetPos.x = randomCapsule.x;
|
||||||
|
@ -643,6 +643,8 @@ class FreeplayState extends MusicBeatSubState
|
||||||
var spamTimer:Float = 0;
|
var spamTimer:Float = 0;
|
||||||
var spamming:Bool = false;
|
var spamming:Bool = false;
|
||||||
|
|
||||||
|
var busy:Bool = false; // Set to true once the user has pressed enter to select a song.
|
||||||
|
|
||||||
override function update(elapsed:Float)
|
override function update(elapsed:Float)
|
||||||
{
|
{
|
||||||
super.update(elapsed);
|
super.update(elapsed);
|
||||||
|
@ -690,11 +692,13 @@ class FreeplayState extends MusicBeatSubState
|
||||||
fp.updateScore(Std.int(lerpScore));
|
fp.updateScore(Std.int(lerpScore));
|
||||||
|
|
||||||
txtCompletion.text = Math.floor(lerpCompletion * 100) + "%";
|
txtCompletion.text = Math.floor(lerpCompletion * 100) + "%";
|
||||||
// trace(Highscore.getCompletion(songs[curSelected].songName, curDifficulty));
|
|
||||||
|
|
||||||
// trace(intendedScore);
|
handleInputs(elapsed);
|
||||||
// trace(lerpScore);
|
}
|
||||||
// Highscore.getAllScores();
|
|
||||||
|
function handleInputs(elapsed:Float):Void
|
||||||
|
{
|
||||||
|
if (busy) return;
|
||||||
|
|
||||||
var upP = controls.UI_UP_P;
|
var upP = controls.UI_UP_P;
|
||||||
var downP = controls.UI_DOWN_P;
|
var downP = controls.UI_DOWN_P;
|
||||||
|
@ -949,6 +953,13 @@ class FreeplayState extends MusicBeatSubState
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function capsuleOnConfirmRandom(cap:SongMenuItem):Void
|
||||||
|
{
|
||||||
|
trace("RANDOM SELECTED");
|
||||||
|
|
||||||
|
busy = true;
|
||||||
|
}
|
||||||
|
|
||||||
function capsuleOnConfirmDefault(cap:SongMenuItem):Void
|
function capsuleOnConfirmDefault(cap:SongMenuItem):Void
|
||||||
{
|
{
|
||||||
// var poop:String = songs[curSelected].songName.toLowerCase();
|
// var poop:String = songs[curSelected].songName.toLowerCase();
|
||||||
|
@ -963,6 +974,8 @@ class FreeplayState extends MusicBeatSubState
|
||||||
curDifficulty = 1;
|
curDifficulty = 1;
|
||||||
}*/
|
}*/
|
||||||
|
|
||||||
|
busy = true;
|
||||||
|
|
||||||
PlayStatePlaylist.isStoryMode = false;
|
PlayStatePlaylist.isStoryMode = false;
|
||||||
|
|
||||||
var songId:String = cap.songTitle.toLowerCase();
|
var songId:String = cap.songTitle.toLowerCase();
|
||||||
|
|
|
@ -150,6 +150,11 @@ class PauseSubState extends MusicBeatSubState
|
||||||
|
|
||||||
super.update(elapsed);
|
super.update(elapsed);
|
||||||
|
|
||||||
|
handleInputs();
|
||||||
|
}
|
||||||
|
|
||||||
|
function handleInputs():Void
|
||||||
|
{
|
||||||
var upP = controls.UI_UP_P;
|
var upP = controls.UI_UP_P;
|
||||||
var downP = controls.UI_DOWN_P;
|
var downP = controls.UI_DOWN_P;
|
||||||
var accepted = controls.ACCEPT;
|
var accepted = controls.ACCEPT;
|
||||||
|
@ -229,9 +234,14 @@ class PauseSubState extends MusicBeatSubState
|
||||||
FlxTransitionableState.skipNextTransIn = true;
|
FlxTransitionableState.skipNextTransIn = true;
|
||||||
FlxTransitionableState.skipNextTransOut = true;
|
FlxTransitionableState.skipNextTransOut = true;
|
||||||
|
|
||||||
if (PlayStatePlaylist.isStoryMode) openSubState(new funkin.ui.StickerSubState(null, STORY));
|
if (PlayStatePlaylist.isStoryMode)
|
||||||
|
{
|
||||||
|
openSubState(new funkin.ui.StickerSubState(null, STORY));
|
||||||
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
openSubState(new funkin.ui.StickerSubState(null, FREEPLAY));
|
openSubState(new funkin.ui.StickerSubState(null, FREEPLAY));
|
||||||
|
}
|
||||||
|
|
||||||
case 'Exit to Chart Editor':
|
case 'Exit to Chart Editor':
|
||||||
this.close();
|
this.close();
|
||||||
|
|
|
@ -206,6 +206,8 @@ class StickerSubState extends MusicBeatSubState
|
||||||
sticker.timing = FlxMath.remapToRange(ind, 0, grpStickers.members.length, 0, 0.9);
|
sticker.timing = FlxMath.remapToRange(ind, 0, grpStickers.members.length, 0, 0.9);
|
||||||
|
|
||||||
new FlxTimer().start(sticker.timing, _ -> {
|
new FlxTimer().start(sticker.timing, _ -> {
|
||||||
|
if (grpStickers == null) return;
|
||||||
|
|
||||||
sticker.visible = true;
|
sticker.visible = true;
|
||||||
var daSound:String = FlxG.random.getObject(sounds);
|
var daSound:String = FlxG.random.getObject(sounds);
|
||||||
FlxG.sound.play(Paths.sound(daSound));
|
FlxG.sound.play(Paths.sound(daSound));
|
||||||
|
@ -269,10 +271,10 @@ class StickerSubState extends MusicBeatSubState
|
||||||
{
|
{
|
||||||
super.update(elapsed);
|
super.update(elapsed);
|
||||||
|
|
||||||
if (FlxG.keys.justPressed.ANY)
|
// if (FlxG.keys.justPressed.ANY)
|
||||||
{
|
// {
|
||||||
regenStickers();
|
// regenStickers();
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
var switchingState:Bool = false;
|
var switchingState:Bool = false;
|
||||||
|
|
|
@ -1920,33 +1920,33 @@ class ChartEditorState extends HaxeUIState
|
||||||
// Mouse Wheel = Scroll
|
// Mouse Wheel = Scroll
|
||||||
if (FlxG.mouse.wheel != 0 && !FlxG.keys.pressed.CONTROL)
|
if (FlxG.mouse.wheel != 0 && !FlxG.keys.pressed.CONTROL)
|
||||||
{
|
{
|
||||||
scrollAmount = -10 * FlxG.mouse.wheel;
|
scrollAmount = -50 * FlxG.mouse.wheel;
|
||||||
shouldPause = true;
|
shouldPause = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Up Arrow = Scroll Up
|
// Up Arrow = Scroll Up
|
||||||
if (upKeyHandler.activated && currentLiveInputStyle == None)
|
if (upKeyHandler.activated && currentLiveInputStyle == None)
|
||||||
{
|
{
|
||||||
scrollAmount = -GRID_SIZE * 0.25 * 5.0;
|
scrollAmount = -GRID_SIZE * 0.25 * 25.0;
|
||||||
shouldPause = true;
|
shouldPause = true;
|
||||||
}
|
}
|
||||||
// Down Arrow = Scroll Down
|
// Down Arrow = Scroll Down
|
||||||
if (downKeyHandler.activated && currentLiveInputStyle == None)
|
if (downKeyHandler.activated && currentLiveInputStyle == None)
|
||||||
{
|
{
|
||||||
scrollAmount = GRID_SIZE * 0.25 * 5.0;
|
scrollAmount = GRID_SIZE * 0.25 * 25.0;
|
||||||
shouldPause = true;
|
shouldPause = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// W = Scroll Up (doesn't work with Ctrl+Scroll)
|
// W = Scroll Up (doesn't work with Ctrl+Scroll)
|
||||||
if (wKeyHandler.activated && currentLiveInputStyle == None && !FlxG.keys.pressed.CONTROL)
|
if (wKeyHandler.activated && currentLiveInputStyle == None && !FlxG.keys.pressed.CONTROL)
|
||||||
{
|
{
|
||||||
scrollAmount = -GRID_SIZE * 0.25 * 5.0;
|
scrollAmount = -GRID_SIZE * 0.25 * 25.0;
|
||||||
shouldPause = true;
|
shouldPause = true;
|
||||||
}
|
}
|
||||||
// S = Scroll Down (doesn't work with Ctrl+Scroll)
|
// S = Scroll Down (doesn't work with Ctrl+Scroll)
|
||||||
if (sKeyHandler.activated && currentLiveInputStyle == None && !FlxG.keys.pressed.CONTROL)
|
if (sKeyHandler.activated && currentLiveInputStyle == None && !FlxG.keys.pressed.CONTROL)
|
||||||
{
|
{
|
||||||
scrollAmount = GRID_SIZE * 0.25 * 5.0;
|
scrollAmount = GRID_SIZE * 0.25 * 25.0;
|
||||||
shouldPause = true;
|
shouldPause = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2011,7 +2011,7 @@ class ChartEditorState extends HaxeUIState
|
||||||
// SHIFT + Scroll = Scroll Fast
|
// SHIFT + Scroll = Scroll Fast
|
||||||
if (FlxG.keys.pressed.SHIFT)
|
if (FlxG.keys.pressed.SHIFT)
|
||||||
{
|
{
|
||||||
scrollAmount *= 5;
|
scrollAmount *= 2;
|
||||||
}
|
}
|
||||||
// CONTROL + Scroll = Scroll Precise
|
// CONTROL + Scroll = Scroll Precise
|
||||||
if (FlxG.keys.pressed.CONTROL)
|
if (FlxG.keys.pressed.CONTROL)
|
||||||
|
@ -3287,7 +3287,7 @@ class ChartEditorState extends HaxeUIState
|
||||||
*/
|
*/
|
||||||
function handleTestKeybinds():Void
|
function handleTestKeybinds():Void
|
||||||
{
|
{
|
||||||
if (!isHaxeUIDialogOpen && FlxG.keys.justPressed.ENTER)
|
if (!isHaxeUIDialogOpen && !isCursorOverHaxeUI && FlxG.keys.justPressed.ENTER)
|
||||||
{
|
{
|
||||||
var minimal = FlxG.keys.pressed.SHIFT;
|
var minimal = FlxG.keys.pressed.SHIFT;
|
||||||
testSongInPlayState(minimal);
|
testSongInPlayState(minimal);
|
||||||
|
|
|
@ -39,7 +39,7 @@ class Constants
|
||||||
*/
|
*/
|
||||||
public static final VERSION_SUFFIX:String = ' PROTOTYPE';
|
public static final VERSION_SUFFIX:String = ' PROTOTYPE';
|
||||||
|
|
||||||
#if debug
|
#if (debug || FORCE_DEBUG_VERSION)
|
||||||
static function get_VERSION():String
|
static function get_VERSION():String
|
||||||
{
|
{
|
||||||
return 'v${Application.current.meta.get('version')} (${GIT_BRANCH} : ${GIT_HASH})' + VERSION_SUFFIX;
|
return 'v${Application.current.meta.get('version')} (${GIT_BRANCH} : ${GIT_HASH})' + VERSION_SUFFIX;
|
||||||
|
@ -71,7 +71,7 @@ class Constants
|
||||||
*/
|
*/
|
||||||
// ==============================
|
// ==============================
|
||||||
|
|
||||||
#if debug
|
#if (debug || FORCE_DEBUG_VERSION)
|
||||||
/**
|
/**
|
||||||
* The current Git branch.
|
* The current Git branch.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
package funkin.util.macro;
|
package funkin.util.macro;
|
||||||
|
|
||||||
#if debug
|
#if (debug || FORCE_DEBUG_VERSION)
|
||||||
class GitCommit
|
class GitCommit
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue