mirror of
https://github.com/FunkinCrew/Funkin.git
synced 2024-11-21 10:48:21 -05:00
Compare commits
12 commits
8248dae5e9
...
fe9cd1f354
Author | SHA1 | Date | |
---|---|---|---|
|
fe9cd1f354 | ||
|
0d8e4a5330 | ||
|
6321983eba | ||
|
101b9f59b3 | ||
|
e570dfb8e7 | ||
|
e6b6b41766 | ||
|
090ddd1f1c | ||
|
76c8c8b520 | ||
|
20d9016984 | ||
|
144ba00377 | ||
|
7159cad2c1 | ||
|
8bed49eb4b |
9 changed files with 67 additions and 169 deletions
|
@ -382,7 +382,7 @@ which would remove their rank if they had a lower one.
|
|||
- Improvements to video cutscenes and dialogue, allowing them to be easily skipped or restarted.
|
||||
- Updated Polymod by several major versions, allowing for fully dynamic asset replacement and support for scripted classes.
|
||||
- Completely refactored almost every part of the game's code for performance, stability, and extensibility.
|
||||
- This is not the Ludem Dare game held together with sticks and glue you played three years ago.
|
||||
- This is not the Ludum Dare game held together with sticks and glue you played three years ago.
|
||||
- Characters, stages, songs, story levels, and dialogue are now built from JSON data registries rather than being hardcoded.
|
||||
- All of these also support attaching scripts for custom behavior, more documentation on this soon.
|
||||
- You can forcibly reload the game's JSON data and scripts by pressing F5.
|
||||
|
|
2
art
2
art
|
@ -1 +1 @@
|
|||
Subproject commit fbd3e3df77734606d88516770b71b56e6fa04bce
|
||||
Subproject commit 66572f85d826ce2ec1d45468c12733b161237ffa
|
2
assets
2
assets
|
@ -1 +1 @@
|
|||
Subproject commit 4abd6cc06e56c6d56440fa858262932db118250c
|
||||
Subproject commit c1899ffbefb9a7c98b030c75a33623431d7ea6ba
|
|
@ -1,17 +1,13 @@
|
|||
package funkin.play;
|
||||
|
||||
import flixel.addons.display.FlxPieDial;
|
||||
import flixel.addons.transition.FlxTransitionableState;
|
||||
import flixel.addons.transition.Transition;
|
||||
import flixel.FlxCamera;
|
||||
import flixel.FlxObject;
|
||||
import flixel.FlxState;
|
||||
import flixel.FlxSubState;
|
||||
import flixel.math.FlxMath;
|
||||
import flixel.math.FlxPoint;
|
||||
import flixel.math.FlxRect;
|
||||
import flixel.text.FlxText;
|
||||
import flixel.tweens.FlxEase;
|
||||
import flixel.tweens.FlxTween;
|
||||
import flixel.ui.FlxBar;
|
||||
import flixel.util.FlxColor;
|
||||
|
@ -22,7 +18,6 @@ import funkin.audio.FunkinSound;
|
|||
import funkin.audio.VoicesGroup;
|
||||
import funkin.data.dialogue.conversation.ConversationRegistry;
|
||||
import funkin.data.event.SongEventRegistry;
|
||||
import funkin.data.notestyle.NoteStyleData;
|
||||
import funkin.data.notestyle.NoteStyleRegistry;
|
||||
import funkin.data.song.SongData.SongCharacterData;
|
||||
import funkin.data.song.SongData.SongEventData;
|
||||
|
@ -45,7 +40,6 @@ import funkin.play.cutscene.VanillaCutscenes;
|
|||
import funkin.play.cutscene.VideoCutscene;
|
||||
import funkin.play.notes.NoteDirection;
|
||||
import funkin.play.notes.notekind.NoteKindManager;
|
||||
import funkin.play.notes.NoteSplash;
|
||||
import funkin.play.notes.NoteSprite;
|
||||
import funkin.play.notes.notestyle.NoteStyle;
|
||||
import funkin.play.notes.Strumline;
|
||||
|
@ -58,15 +52,9 @@ import funkin.ui.debug.charting.ChartEditorState;
|
|||
import funkin.ui.debug.stage.StageOffsetSubState;
|
||||
import funkin.ui.mainmenu.MainMenuState;
|
||||
import funkin.ui.MusicBeatSubState;
|
||||
import funkin.ui.options.PreferencesMenu;
|
||||
import funkin.ui.story.StoryMenuState;
|
||||
import funkin.ui.transition.LoadingState;
|
||||
import funkin.util.SerializerUtil;
|
||||
import haxe.Int64;
|
||||
import lime.ui.Haptic;
|
||||
import openfl.display.BitmapData;
|
||||
import openfl.geom.Rectangle;
|
||||
import openfl.Lib;
|
||||
#if FEATURE_DISCORD_RPC
|
||||
import funkin.api.discord.DiscordClient;
|
||||
#end
|
||||
|
@ -760,24 +748,6 @@ class PlayState extends MusicBeatSubState
|
|||
refresh();
|
||||
}
|
||||
|
||||
public override function draw():Void
|
||||
{
|
||||
// if (FlxG.renderBlit)
|
||||
// {
|
||||
// camGame.fill(BACKGROUND_COLOR);
|
||||
// }
|
||||
// else if (FlxG.renderTile)
|
||||
// {
|
||||
// FlxG.log.warn("PlayState background not displayed properly on tile renderer!");
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// FlxG.log.warn("PlayState background not displayed properly, unknown renderer!");
|
||||
// }
|
||||
|
||||
super.draw();
|
||||
}
|
||||
|
||||
function assertChartExists():Bool
|
||||
{
|
||||
// Returns null if the song failed to load or doesn't have the selected difficulty.
|
||||
|
|
|
@ -67,6 +67,7 @@ class DebugMenuSubState extends MusicBeatSubState
|
|||
#if sys
|
||||
createItem("OPEN CRASH LOG FOLDER", openLogFolder);
|
||||
#end
|
||||
onMenuChange(items.members[0]);
|
||||
FlxG.camera.focusOn(new FlxPoint(camFocusPoint.x, camFocusPoint.y + 500));
|
||||
}
|
||||
|
||||
|
|
|
@ -571,7 +571,7 @@ class DebugBoundingState extends FlxState
|
|||
_file.addEventListener(Event.COMPLETE, onSaveComplete);
|
||||
_file.addEventListener(Event.CANCEL, onSaveCancel);
|
||||
_file.addEventListener(IOErrorEvent.IO_ERROR, onSaveError);
|
||||
_file.save(saveString,);
|
||||
_file.save(saveString, fileName);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -94,6 +94,7 @@ import funkin.ui.mainmenu.MainMenuState;
|
|||
import funkin.ui.transition.LoadingState;
|
||||
import funkin.util.Constants;
|
||||
import funkin.util.FileUtil;
|
||||
import funkin.util.MathUtil;
|
||||
import funkin.util.logging.CrashHandler;
|
||||
import funkin.util.SortUtil;
|
||||
import funkin.util.WindowUtil;
|
||||
|
@ -244,7 +245,7 @@ class ChartEditorState extends UIState // UIState derives from MusicBeatState
|
|||
/**
|
||||
* Duration, in seconds, for the scroll easing animation.
|
||||
*/
|
||||
public static final SCROLL_EASE_DURATION:Float = 0.2;
|
||||
public static final SCROLL_EASE_DURATION:Float = 0.4;
|
||||
|
||||
// Other
|
||||
|
||||
|
@ -773,9 +774,8 @@ class ChartEditorState extends UIState // UIState derives from MusicBeatState
|
|||
|
||||
/**
|
||||
* The current process that is lerping the scroll position.
|
||||
* Used to cancel the previous lerp if the user scrolls again.
|
||||
*/
|
||||
var currentScrollEase:Null<VarTween>;
|
||||
var currentScrollEase:Null<Float>;
|
||||
|
||||
/**
|
||||
* The position where the user middle clicked to place a scroll anchor.
|
||||
|
@ -2707,6 +2707,7 @@ class ChartEditorState extends UIState // UIState derives from MusicBeatState
|
|||
playbarHeadLayout.playbarHead.width = FlxG.width;
|
||||
playbarHeadLayout.playbarHead.height = 10;
|
||||
playbarHeadLayout.playbarHead.styleString = 'padding-left: 0px; padding-right: 0px; border-left: 0px; border-right: 0px;';
|
||||
playbarHeadLayout.playbarHead.min = 0;
|
||||
|
||||
playbarHeadLayout.playbarHead.onDragStart = function(_:DragEvent) {
|
||||
playbarHeadDragging = true;
|
||||
|
@ -2723,13 +2724,12 @@ class ChartEditorState extends UIState // UIState derives from MusicBeatState
|
|||
}
|
||||
}
|
||||
|
||||
playbarHeadLayout.playbarHead.onDrag = function(_:DragEvent) {
|
||||
playbarHeadLayout.playbarHead.onDrag = function(d:DragEvent) {
|
||||
if (playbarHeadDragging)
|
||||
{
|
||||
// Set the song position to where the playhead was moved to.
|
||||
scrollPositionInPixels = (songLengthInPixels) * playbarHeadLayout.playbarHead.value / 100;
|
||||
// Update the conductor and audio tracks to match.
|
||||
moveSongToScrollPosition();
|
||||
currentScrollEase = d.value;
|
||||
easeSongToScrollPosition(currentScrollEase);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2740,8 +2740,9 @@ class ChartEditorState extends UIState // UIState derives from MusicBeatState
|
|||
if (playbarHeadDraggingWasPlaying)
|
||||
{
|
||||
playbarHeadDraggingWasPlaying = false;
|
||||
|
||||
// Disabled code to resume song playback on drag.
|
||||
// startAudioPlayback();
|
||||
startAudioPlayback();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3417,10 +3418,14 @@ class ChartEditorState extends UIState // UIState derives from MusicBeatState
|
|||
audioInstTrack.time = -Conductor.instance.instrumentalOffset;
|
||||
}
|
||||
}
|
||||
|
||||
if (!audioInstTrack.isPlaying && currentScrollEase != scrollPositionInPixels) easeSongToScrollPosition(currentScrollEase);
|
||||
}
|
||||
|
||||
if (audioInstTrack != null && audioInstTrack.isPlaying)
|
||||
{
|
||||
currentScrollEase = scrollPositionInPixels;
|
||||
|
||||
if (FlxG.keys.pressed.ALT)
|
||||
{
|
||||
// If middle mouse panning during song playback, we move ONLY the playhead, without scrolling. Neat!
|
||||
|
@ -3869,7 +3874,7 @@ class ChartEditorState extends UIState // UIState derives from MusicBeatState
|
|||
}
|
||||
|
||||
// Mouse Wheel = Scroll
|
||||
if (FlxG.mouse.wheel != 0 && !FlxG.keys.pressed.CONTROL)
|
||||
if (FlxG.mouse.wheel != 0)
|
||||
{
|
||||
scrollAmount = -50 * FlxG.mouse.wheel;
|
||||
shouldPause = true;
|
||||
|
@ -4057,27 +4062,13 @@ class ChartEditorState extends UIState // UIState derives from MusicBeatState
|
|||
shouldPause = true;
|
||||
}
|
||||
|
||||
if (Math.abs(scrollAmount) > GRID_SIZE * 8)
|
||||
{
|
||||
shouldEase = true;
|
||||
}
|
||||
shouldEase = true;
|
||||
if (shouldPause) stopAudioPlayback();
|
||||
|
||||
// Resync the conductor and audio tracks.
|
||||
if (scrollAmount != 0 || playheadAmount != 0)
|
||||
{
|
||||
this.playheadPositionInPixels += playheadAmount;
|
||||
if (shouldEase)
|
||||
{
|
||||
easeSongToScrollPosition(this.scrollPositionInPixels + scrollAmount);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Apply the scroll amount.
|
||||
this.scrollPositionInPixels += scrollAmount;
|
||||
moveSongToScrollPosition();
|
||||
}
|
||||
}
|
||||
if (shouldPause) stopAudioPlayback();
|
||||
if (playheadAmount != 0) this.playheadPositionInPixels += playheadAmount;
|
||||
|
||||
if (scrollAmount != 0) currentScrollEase += scrollAmount;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -4333,15 +4324,13 @@ class ChartEditorState extends UIState // UIState derives from MusicBeatState
|
|||
{
|
||||
// Scroll up.
|
||||
var diff:Float = MENU_BAR_HEIGHT - FlxG.mouse.viewY;
|
||||
scrollPositionInPixels -= diff * 0.5; // Too fast!
|
||||
moveSongToScrollPosition();
|
||||
currentScrollEase -= diff * 0.5; // Too fast!
|
||||
}
|
||||
else if (FlxG.mouse.viewY > (playbarHeadLayout?.y ?? 0.0))
|
||||
{
|
||||
// Scroll down.
|
||||
var diff:Float = FlxG.mouse.viewY - (playbarHeadLayout?.y ?? 0.0);
|
||||
scrollPositionInPixels += diff * 0.5; // Too fast!
|
||||
moveSongToScrollPosition();
|
||||
currentScrollEase += (diff * 0.5); // Too fast!
|
||||
}
|
||||
|
||||
// Render the selection box.
|
||||
|
@ -4480,8 +4469,8 @@ class ChartEditorState extends UIState // UIState derives from MusicBeatState
|
|||
var clickedPosInPixels:Float = FlxMath.remapToRange(FlxG.mouse.viewY, (notePreview?.y ?? 0.0), (notePreview?.y ?? 0.0) + (notePreview?.height ?? 0.0),
|
||||
0, songLengthInPixels);
|
||||
|
||||
scrollPositionInPixels = clickedPosInPixels;
|
||||
moveSongToScrollPosition();
|
||||
currentScrollEase = clickedPosInPixels;
|
||||
easeSongToScrollPosition(currentScrollEase);
|
||||
}
|
||||
else if (scrollAnchorScreenPos != null)
|
||||
{
|
||||
|
@ -4540,15 +4529,13 @@ class ChartEditorState extends UIState // UIState derives from MusicBeatState
|
|||
{
|
||||
// Scroll up.
|
||||
var diff:Float = MENU_BAR_HEIGHT - FlxG.mouse.viewY;
|
||||
scrollPositionInPixels -= diff * 0.5; // Too fast!
|
||||
moveSongToScrollPosition();
|
||||
currentScrollEase -= (diff * 0.5);
|
||||
}
|
||||
else if (FlxG.mouse.viewY > (playbarHeadLayout?.y ?? 0.0))
|
||||
{
|
||||
// Scroll down.
|
||||
var diff:Float = FlxG.mouse.viewY - (playbarHeadLayout?.y ?? 0.0);
|
||||
scrollPositionInPixels += diff * 0.5; // Too fast!
|
||||
moveSongToScrollPosition();
|
||||
currentScrollEase += (diff * 0.5);
|
||||
}
|
||||
|
||||
// Calculate distance between the position dragged to and the original position.
|
||||
|
@ -5142,18 +5129,15 @@ class ChartEditorState extends UIState // UIState derives from MusicBeatState
|
|||
{
|
||||
if (playbarHeadLayout == null) throw "ERROR: Tried to handle playbar, but playbarHeadLayout is null!";
|
||||
|
||||
// Move the playhead to match the song position, if we aren't dragging it.
|
||||
playbarHeadLayout.playbarHead.pos = currentScrollEase;
|
||||
|
||||
playbarHeadLayout.playbarHead.max = songLengthInPixels;
|
||||
|
||||
// Make sure the playbar is never nudged out of the correct spot.
|
||||
playbarHeadLayout.x = 4;
|
||||
playbarHeadLayout.y = FlxG.height - 48 - 8;
|
||||
|
||||
// Move the playhead to match the song position, if we aren't dragging it.
|
||||
if (!playbarHeadDragging)
|
||||
{
|
||||
var songPosPercent = scrollPositionInPixels / (songLengthInPixels) * 100;
|
||||
|
||||
if (playbarHeadLayout.playbarHead.value != songPosPercent) playbarHeadLayout.playbarHead.value = songPosPercent;
|
||||
}
|
||||
|
||||
var songPos:Float = Conductor.instance.songPosition + Conductor.instance.instrumentalOffset;
|
||||
var songPosMilliseconds:String = Std.string(Math.floor(Math.abs(songPos) % 1000)).lpad('0', 2).substr(0, 2);
|
||||
var songPosSeconds:String = Std.string(Math.floor((Math.abs(songPos) / 1000) % 60)).lpad('0', 2);
|
||||
|
@ -6134,43 +6118,12 @@ class ChartEditorState extends UIState // UIState derives from MusicBeatState
|
|||
*/
|
||||
function easeSongToScrollPosition(targetScrollPosition:Float):Void
|
||||
{
|
||||
if (currentScrollEase != null) cancelScrollEase(currentScrollEase);
|
||||
|
||||
currentScrollEase = FlxTween.tween(this, {scrollPositionInPixels: targetScrollPosition}, SCROLL_EASE_DURATION,
|
||||
{
|
||||
ease: FlxEase.quintInOut,
|
||||
onUpdate: this.onScrollEaseUpdate,
|
||||
onComplete: this.cancelScrollEase,
|
||||
type: ONESHOT
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Callback function executed every frame that the scroll position is being eased.
|
||||
* @param _
|
||||
*/
|
||||
function onScrollEaseUpdate(_:FlxTween):Void
|
||||
{
|
||||
currentScrollEase = Math.max(0, targetScrollPosition);
|
||||
currentScrollEase = Math.min(currentScrollEase, songLengthInPixels);
|
||||
scrollPositionInPixels = MathUtil.smoothLerp(scrollPositionInPixels, currentScrollEase, FlxG.elapsed, SCROLL_EASE_DURATION, 1 / 1000);
|
||||
moveSongToScrollPosition();
|
||||
}
|
||||
|
||||
/**
|
||||
* Callback function executed when cancelling an existing scroll position ease.
|
||||
* Ensures that the ease is immediately cancelled and the scroll position is set to the target value.
|
||||
*/
|
||||
function cancelScrollEase(_:FlxTween):Void
|
||||
{
|
||||
if (currentScrollEase != null)
|
||||
{
|
||||
@:privateAccess
|
||||
var targetScrollPosition:Float = currentScrollEase._properties.scrollPositionInPixels;
|
||||
|
||||
currentScrollEase.cancel();
|
||||
currentScrollEase = null;
|
||||
this.scrollPositionInPixels = targetScrollPosition;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Fix the current scroll position after exiting the PlayState used when testing.
|
||||
*/
|
||||
|
@ -6351,6 +6304,8 @@ class ChartEditorState extends UIState // UIState derives from MusicBeatState
|
|||
{
|
||||
if (audioInstTrack == null) return;
|
||||
|
||||
currentScrollEase = this.scrollPositionInPixels;
|
||||
|
||||
if (audioInstTrack.isPlaying)
|
||||
{
|
||||
// Pause
|
||||
|
|
|
@ -253,42 +253,23 @@ class ChartEditorThemeHandler
|
|||
var bottomTickY:Float = state.measureTickBitmap.height - (measureTickWidth / 2);
|
||||
state.measureTickBitmap.fillRect(new Rectangle(0, bottomTickY, state.measureTickBitmap.width, measureTickWidth / 2), GRID_MEASURE_DIVIDER_COLOR_LIGHT);
|
||||
|
||||
// Draw the beat ticks.
|
||||
var beatTick2Y:Float = state.measureTickBitmap.height * 1 / Conductor.instance.beatsPerMeasure - (beatTickWidth / 2);
|
||||
var beatTick3Y:Float = state.measureTickBitmap.height * 2 / Conductor.instance.beatsPerMeasure - (beatTickWidth / 2);
|
||||
var beatTick4Y:Float = state.measureTickBitmap.height * 3 / Conductor.instance.beatsPerMeasure - (beatTickWidth / 2);
|
||||
var beatTickLength:Float = state.measureTickBitmap.width * 2 / 3;
|
||||
state.measureTickBitmap.fillRect(new Rectangle(0, beatTick2Y, beatTickLength, beatTickWidth), GRID_MEASURE_DIVIDER_COLOR_LIGHT);
|
||||
state.measureTickBitmap.fillRect(new Rectangle(0, beatTick3Y, beatTickLength, beatTickWidth), GRID_MEASURE_DIVIDER_COLOR_LIGHT);
|
||||
state.measureTickBitmap.fillRect(new Rectangle(0, beatTick4Y, beatTickLength, beatTickWidth), GRID_MEASURE_DIVIDER_COLOR_LIGHT);
|
||||
|
||||
// Draw the step ticks.
|
||||
// TODO: Make this a loop or something.
|
||||
var stepTick2Y:Float = state.measureTickBitmap.height * 1 / Conductor.instance.stepsPerMeasure - (stepTickWidth / 2);
|
||||
var stepTick3Y:Float = state.measureTickBitmap.height * 2 / Conductor.instance.stepsPerMeasure - (stepTickWidth / 2);
|
||||
var stepTick4Y:Float = state.measureTickBitmap.height * 3 / Conductor.instance.stepsPerMeasure - (stepTickWidth / 2);
|
||||
var stepTick6Y:Float = state.measureTickBitmap.height * 5 / Conductor.instance.stepsPerMeasure - (stepTickWidth / 2);
|
||||
var stepTick7Y:Float = state.measureTickBitmap.height * 6 / Conductor.instance.stepsPerMeasure - (stepTickWidth / 2);
|
||||
var stepTick8Y:Float = state.measureTickBitmap.height * 7 / Conductor.instance.stepsPerMeasure - (stepTickWidth / 2);
|
||||
var stepTick10Y:Float = state.measureTickBitmap.height * 9 / Conductor.instance.stepsPerMeasure - (stepTickWidth / 2);
|
||||
var stepTick11Y:Float = state.measureTickBitmap.height * 10 / Conductor.instance.stepsPerMeasure - (stepTickWidth / 2);
|
||||
var stepTick12Y:Float = state.measureTickBitmap.height * 11 / Conductor.instance.stepsPerMeasure - (stepTickWidth / 2);
|
||||
var stepTick14Y:Float = state.measureTickBitmap.height * 13 / Conductor.instance.stepsPerMeasure - (stepTickWidth / 2);
|
||||
var stepTick15Y:Float = state.measureTickBitmap.height * 14 / Conductor.instance.stepsPerMeasure - (stepTickWidth / 2);
|
||||
var stepTick16Y:Float = state.measureTickBitmap.height * 15 / Conductor.instance.stepsPerMeasure - (stepTickWidth / 2);
|
||||
var stepTickLength:Float = state.measureTickBitmap.width * 1 / 3;
|
||||
state.measureTickBitmap.fillRect(new Rectangle(0, stepTick2Y, stepTickLength, stepTickWidth), GRID_MEASURE_DIVIDER_COLOR_LIGHT);
|
||||
state.measureTickBitmap.fillRect(new Rectangle(0, stepTick3Y, stepTickLength, stepTickWidth), GRID_MEASURE_DIVIDER_COLOR_LIGHT);
|
||||
state.measureTickBitmap.fillRect(new Rectangle(0, stepTick4Y, stepTickLength, stepTickWidth), GRID_MEASURE_DIVIDER_COLOR_LIGHT);
|
||||
state.measureTickBitmap.fillRect(new Rectangle(0, stepTick6Y, stepTickLength, stepTickWidth), GRID_MEASURE_DIVIDER_COLOR_LIGHT);
|
||||
state.measureTickBitmap.fillRect(new Rectangle(0, stepTick7Y, stepTickLength, stepTickWidth), GRID_MEASURE_DIVIDER_COLOR_LIGHT);
|
||||
state.measureTickBitmap.fillRect(new Rectangle(0, stepTick8Y, stepTickLength, stepTickWidth), GRID_MEASURE_DIVIDER_COLOR_LIGHT);
|
||||
state.measureTickBitmap.fillRect(new Rectangle(0, stepTick10Y, stepTickLength, stepTickWidth), GRID_MEASURE_DIVIDER_COLOR_LIGHT);
|
||||
state.measureTickBitmap.fillRect(new Rectangle(0, stepTick11Y, stepTickLength, stepTickWidth), GRID_MEASURE_DIVIDER_COLOR_LIGHT);
|
||||
state.measureTickBitmap.fillRect(new Rectangle(0, stepTick12Y, stepTickLength, stepTickWidth), GRID_MEASURE_DIVIDER_COLOR_LIGHT);
|
||||
state.measureTickBitmap.fillRect(new Rectangle(0, stepTick14Y, stepTickLength, stepTickWidth), GRID_MEASURE_DIVIDER_COLOR_LIGHT);
|
||||
state.measureTickBitmap.fillRect(new Rectangle(0, stepTick15Y, stepTickLength, stepTickWidth), GRID_MEASURE_DIVIDER_COLOR_LIGHT);
|
||||
state.measureTickBitmap.fillRect(new Rectangle(0, stepTick16Y, stepTickLength, stepTickWidth), GRID_MEASURE_DIVIDER_COLOR_LIGHT);
|
||||
// Draw the beat and step ticks. No need for two seperate loops thankfully.
|
||||
// This'll be fun to update when beat tuplets become functional.
|
||||
for (i in 1...(Conductor.instance.stepsPerMeasure))
|
||||
{
|
||||
if ((i % Constants.STEPS_PER_BEAT) == 0) // If we're on a beat, draw a beat tick.
|
||||
{
|
||||
var beatTickY:Float = state.measureTickBitmap.height * i / Conductor.instance.stepsPerMeasure - (beatTickWidth / 2);
|
||||
var beatTickLength:Float = state.measureTickBitmap.width * 2 / 3;
|
||||
state.measureTickBitmap.fillRect(new Rectangle(0, beatTickY, beatTickLength, beatTickWidth), GRID_MEASURE_DIVIDER_COLOR_LIGHT);
|
||||
}
|
||||
else // Else, draw a step tick.
|
||||
{
|
||||
var stepTickY:Float = state.measureTickBitmap.height * i / Conductor.instance.stepsPerMeasure - (stepTickWidth / 2);
|
||||
var stepTickLength:Float = state.measureTickBitmap.width * 1 / 3;
|
||||
state.measureTickBitmap.fillRect(new Rectangle(0, stepTickY, stepTickLength, stepTickWidth), GRID_MEASURE_DIVIDER_COLOR_LIGHT);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -314,23 +295,16 @@ class ChartEditorThemeHandler
|
|||
state.offsetTickBitmap.fillRect(new Rectangle(rightTickX, 0, majorTickWidth / 2, majorTickLength), GRID_MEASURE_DIVIDER_COLOR_LIGHT);
|
||||
|
||||
// Draw the minor ticks.
|
||||
var minorTick2X:Float = state.offsetTickBitmap.width * 1 / 10 - (minorTickWidth / 2);
|
||||
var minorTick3X:Float = state.offsetTickBitmap.width * 2 / 10 - (minorTickWidth / 2);
|
||||
var minorTick4X:Float = state.offsetTickBitmap.width * 3 / 10 - (minorTickWidth / 2);
|
||||
var minorTick5X:Float = state.offsetTickBitmap.width * 4 / 10 - (minorTickWidth / 2);
|
||||
var minorTick7X:Float = state.offsetTickBitmap.width * 6 / 10 - (minorTickWidth / 2);
|
||||
var minorTick8X:Float = state.offsetTickBitmap.width * 7 / 10 - (minorTickWidth / 2);
|
||||
var minorTick9X:Float = state.offsetTickBitmap.width * 8 / 10 - (minorTickWidth / 2);
|
||||
var minorTick10X:Float = state.offsetTickBitmap.width * 9 / 10 - (minorTickWidth / 2);
|
||||
var minorTickLength:Float = state.offsetTickBitmap.height * 1 / 3;
|
||||
state.offsetTickBitmap.fillRect(new Rectangle(minorTick2X, 0, minorTickWidth, minorTickLength), GRID_MEASURE_DIVIDER_COLOR_LIGHT);
|
||||
state.offsetTickBitmap.fillRect(new Rectangle(minorTick3X, 0, minorTickWidth, minorTickLength), GRID_MEASURE_DIVIDER_COLOR_LIGHT);
|
||||
state.offsetTickBitmap.fillRect(new Rectangle(minorTick4X, 0, minorTickWidth, minorTickLength), GRID_MEASURE_DIVIDER_COLOR_LIGHT);
|
||||
state.offsetTickBitmap.fillRect(new Rectangle(minorTick5X, 0, minorTickWidth, minorTickLength), GRID_MEASURE_DIVIDER_COLOR_LIGHT);
|
||||
state.offsetTickBitmap.fillRect(new Rectangle(minorTick7X, 0, minorTickWidth, minorTickLength), GRID_MEASURE_DIVIDER_COLOR_LIGHT);
|
||||
state.offsetTickBitmap.fillRect(new Rectangle(minorTick8X, 0, minorTickWidth, minorTickLength), GRID_MEASURE_DIVIDER_COLOR_LIGHT);
|
||||
state.offsetTickBitmap.fillRect(new Rectangle(minorTick9X, 0, minorTickWidth, minorTickLength), GRID_MEASURE_DIVIDER_COLOR_LIGHT);
|
||||
state.offsetTickBitmap.fillRect(new Rectangle(minorTick10X, 0, minorTickWidth, minorTickLength), GRID_MEASURE_DIVIDER_COLOR_LIGHT);
|
||||
for (i in 1...11)
|
||||
{
|
||||
if (i % 5 == 0)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
var minorTickX:Float = state.offsetTickBitmap.width * i / 10 - (minorTickWidth / 2);
|
||||
var minorTickLength:Float = state.offsetTickBitmap.height * 1 / 3;
|
||||
state.offsetTickBitmap.fillRect(new Rectangle(minorTickX, 0, minorTickWidth, minorTickLength), GRID_MEASURE_DIVIDER_COLOR_LIGHT);
|
||||
}
|
||||
|
||||
// Draw the offset ticks.
|
||||
// var ticksWidth:Int = Std.int(ChartEditorState.GRID_SIZE * TOTAL_COLUMN_COUNT); // 1 grid squares wide.
|
||||
|
|
|
@ -136,8 +136,6 @@ class FunkinPreloader extends FlxBasePreloader
|
|||
// We can't even call trace() yet, until Flixel loads.
|
||||
trace('Initializing custom preloader...');
|
||||
|
||||
funkin.util.CLIUtil.resetWorkingDir();
|
||||
|
||||
this.siteLockTitleText = Constants.SITE_LOCK_TITLE;
|
||||
this.siteLockBodyText = Constants.SITE_LOCK_DESC;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue