Skip to content

Commit fb7588c

Browse files
committed
Merge branch 'main' into stage-rewrite
2 parents c0f5844 + 58cbb46 commit fb7588c

11 files changed

Lines changed: 115 additions & 86 deletions

File tree

assets/languages/en/Options.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,9 @@
193193
<str id="showConsole-name">Show Console</str>
194194
<str id="showConsole-desc">Select this to show the debug console, which contains log information about the game.</str>
195195

196+
<str id="useNativeConsole-name">Use Native Console</str>
197+
<str id="useNativeConsole-desc">If checked, will always use the native console instead of the ImGui console when pressing its keybind.</str>
198+
196199
<str id="editorsResizable-name">Resizable Editors</str>
197200
<str id="editorsResizable-desc">If checked, this will allow the editors to render beyond the base 1280x720 resolution of FNF (allowing for more detail and space...)</str>
198201

assets/languages/es/Editors.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@
9999
<str id="songData">Data de la Canción</str>
100100
<str id="songName">Nombre de la Canción</str>
101101
<str id="timeSignature">Marca de Tiempo</str>
102-
<str id="menusData">Info. de los Menús (Juego Libre/Historia)</str>
102+
<str id="menusData">Info. de los Menús (Modo Libre/Historia)</str>
103103
<str id="displayName">Nombre Visual</str>
104104
<str id="icon">Ícono</str>
105105
<str id="modesAllowed">Modos Permitidos</str>
-46.4 KB
Loading
Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,17 @@
1-
<?xml version="1.0" encoding="UTF-8"?>
2-
<!--
3-
Created with Funkin Packer v0.1.3 https://neeeoo.github.io/funkin-packer/
4-
-->
5-
<TextureAtlas imagePath="freeplay.png" width="4474" height="195">
6-
<SubTexture name="freeplay basic0000" x="5" y="5" width="579" height="122" frameX="-0" frameY="-0" frameWidth="579" frameHeight="122"/>
7-
<SubTexture name="freeplay basic0001" x="5" y="5" width="579" height="122" frameX="-0" frameY="-0" frameWidth="579" frameHeight="122"/>
8-
<SubTexture name="freeplay basic0002" x="5" y="5" width="579" height="122" frameX="-0" frameY="-0" frameWidth="579" frameHeight="122"/>
9-
<SubTexture name="freeplay basic0003" x="589" y="5" width="579" height="122" frameX="-0" frameY="-0" frameWidth="579" frameHeight="122"/>
10-
<SubTexture name="freeplay basic0004" x="589" y="5" width="579" height="122" frameX="-0" frameY="-0" frameWidth="579" frameHeight="122"/>
11-
<SubTexture name="freeplay basic0005" x="589" y="5" width="579" height="122" frameX="-0" frameY="-0" frameWidth="579" frameHeight="122"/>
12-
<SubTexture name="freeplay basic0006" x="1173" y="5" width="579" height="122" frameX="-0" frameY="-0" frameWidth="579" frameHeight="122"/>
13-
<SubTexture name="freeplay basic0007" x="1173" y="5" width="579" height="122" frameX="-0" frameY="-0" frameWidth="579" frameHeight="122"/>
14-
<SubTexture name="freeplay basic0008" x="1173" y="5" width="579" height="122" frameX="-0" frameY="-0" frameWidth="579" frameHeight="122"/>
15-
<SubTexture name="freeplay white0000" x="1757" y="5" width="898" height="182" frameX="-1" frameY="23" frameWidth="905" frameHeight="187"/>
16-
<SubTexture name="freeplay white0001" x="2660" y="5" width="903" height="182" frameX="-0" frameY="20" frameWidth="905" frameHeight="187"/>
17-
<SubTexture name="freeplay white0002" x="3568" y="5" width="901" height="185" frameX="-4" frameY="25" frameWidth="905" frameHeight="187"/>
18-
</TextureAtlas>
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<TextureAtlas imagePath="freeplay.png">
3+
<!-- Created with Adobe Animate version 22.0.6.202 -->
4+
<!-- http://www.adobe.com/products/animate.html -->
5+
<SubTexture name="freeplay basic0000" x="7" y="7" width="522" height="113"/>
6+
<SubTexture name="freeplay basic0001" x="7" y="7" width="522" height="113"/>
7+
<SubTexture name="freeplay basic0002" x="7" y="7" width="522" height="113"/>
8+
<SubTexture name="freeplay basic0003" x="571" y="7" width="522" height="113"/>
9+
<SubTexture name="freeplay basic0004" x="571" y="7" width="522" height="113"/>
10+
<SubTexture name="freeplay basic0005" x="571" y="7" width="522" height="113"/>
11+
<SubTexture name="freeplay basic0006" x="1135" y="7" width="522" height="113"/>
12+
<SubTexture name="freeplay basic0007" x="1135" y="7" width="522" height="113"/>
13+
<SubTexture name="freeplay basic0008" x="1135" y="7" width="522" height="113"/>
14+
<SubTexture name="freeplay white0000" x="7" y="162" width="812" height="176" frameX="-1" frameY="-3" frameWidth="819" frameHeight="181"/>
15+
<SubTexture name="freeplay white0001" x="861" y="162" width="817" height="179" frameX="0" frameY="-2" frameWidth="819" frameHeight="181"/>
16+
<SubTexture name="freeplay white0002" x="7" y="383" width="819" height="180" frameX="0" frameY="0" frameWidth="819" frameHeight="181"/>
17+
</TextureAtlas>

source/funkin/backend/system/Main.hx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -234,10 +234,11 @@ class Main extends Sprite
234234
scaleMode.resetSize();
235235
}
236236
public static function onUpdate() {
237-
#if !IMGUI_ENABLED
238-
if (PlayerSettings.solo.controls.DEV_CONSOLE)
237+
if (#if IMGUI_ENABLED Options.useNativeConsole && #end
238+
PlayerSettings.solo.controls.DEV_CONSOLE)
239239
NativeAPI.allocConsole();
240-
#else
240+
241+
#if IMGUI_ENABLED
241242
if ((ImGuiIO.configFlags & ImGuiConfigFlags.ViewportsEnable) != 0)
242243
{
243244
if (ImGui.isAnyWindowMultiViewport()) {

source/funkin/backend/system/console/ConsoleUI.hx

Lines changed: 79 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,11 @@ typedef ConsoleLogData = {
3333

3434
class ConsoleUI {
3535

36-
static final CONSOLE_BG_COLOR = 0xFF380051;
37-
static final SEARCH_HIGHLIGHT_COLOR = 0xFF00FF00;
38-
static final SEARCH_SELECTED_COLOR = 0xFFE2D302;
39-
static final SEARCH_DESC_COLOR = 0xFF636363;
40-
static final SEARCH_ARGS_COLOR = 0xFF58804F;
36+
static final CONSOLE_BG_COLOR = new ImGuiFloat3Ptr(0.22, 0.0, 0.32);
37+
static final SEARCH_HIGHLIGHT_COLOR = new ImGuiFloat3Ptr(0.0, 1.0, 0.0);
38+
static final SEARCH_SELECTED_COLOR = new ImGuiFloat3Ptr(0.888, 0.83, 0.008);
39+
static final SEARCH_DESC_COLOR = new ImGuiFloat3Ptr(0.6, 0.6, 0.6);
40+
static final SEARCH_ARGS_COLOR = new ImGuiFloat3Ptr(0.35, 0.5, 0.31);
4141

4242
static final CONSOLE_MAX_OUPUT = 100;
4343
static final SEARCH_MAX_OUTPUT = 25;
@@ -71,6 +71,7 @@ class ConsoleUI {
7171

7272
#if IMGUI_ENABLED
7373
var settingsOpen:ImGuiBoolPtr = new ImGuiBoolPtr(false);
74+
var stylesOpen:ImGuiBoolPtr = new ImGuiBoolPtr(false);
7475

7576
var timeFilter:ImGuiBoolPtr = new ImGuiBoolPtr(true);
7677
var typeFilter:ImGuiBoolPtr = new ImGuiBoolPtr(true);
@@ -210,6 +211,35 @@ class ConsoleUI {
210211
#end
211212
}
212213

214+
private static final CONSOLE_COLOR_ORDER:Array<ConsoleColor> = [
215+
BLACK, DARKBLUE, DARKGREEN, DARKCYAN, DARKRED, DARKMAGENTA, DARKYELLOW, LIGHTGRAY,
216+
GRAY, BLUE, GREEN, CYAN, RED, MAGENTA, YELLOW, WHITE
217+
];
218+
219+
public static final consoleColors:Map<ConsoleColor, ImGuiFloat3Ptr> = [
220+
BLACK => new ImGuiFloat3Ptr(0.0, 0.0, 0.0),
221+
DARKBLUE => new ImGuiFloat3Ptr(0.04, 0.04, 0.76),
222+
DARKGREEN => new ImGuiFloat3Ptr(0.0, 0.53, 0.0),
223+
DARKCYAN => new ImGuiFloat3Ptr(0.0, 0.53, 0.53),
224+
DARKRED => new ImGuiFloat3Ptr(0.53, 0.0, 0.0),
225+
DARKMAGENTA => new ImGuiFloat3Ptr(0.6, 0.11, 0.77),
226+
DARKYELLOW => new ImGuiFloat3Ptr(0.74, 0.74, 0.0),
227+
LIGHTGRAY => new ImGuiFloat3Ptr(0.83, 0.83, 0.83),
228+
///////////////////////////////////////////////////////
229+
GRAY => new ImGuiFloat3Ptr(0.64, 0.64, 0.64),
230+
BLUE => new ImGuiFloat3Ptr(0.16, 0.29, 0.92),
231+
GREEN => new ImGuiFloat3Ptr(0.0, 1.0, 0.0),
232+
CYAN => new ImGuiFloat3Ptr(0.0, 0.54, 1.0),
233+
RED => new ImGuiFloat3Ptr(1.0, 0.0, 0.0),
234+
MAGENTA => new ImGuiFloat3Ptr(1.0, 0.0, 1.0),
235+
YELLOW => new ImGuiFloat3Ptr(1.0, 1.0, 0.0),
236+
WHITE => new ImGuiFloat3Ptr(1.0, 1.0, 1.0),
237+
];
238+
239+
public static function consoleColorToImColor(color:ConsoleColor) {
240+
return (consoleColors.get(color) ?? consoleColors.get(WHITE)).toImColor();
241+
}
242+
213243
public function displayUI() {
214244
#if IMGUI_ENABLED
215245
if (!Options.devMode) {
@@ -219,8 +249,10 @@ class ConsoleUI {
219249
}
220250

221251
var toggled:Bool = false;
222-
for (key in Options.SOLO_DEV_CONSOLE) {
223-
if (ImGui.isKeyPressed(key.toImGuiKey(), false)) toggled = true;
252+
if (!Options.useNativeConsole) {
253+
for (key in Options.SOLO_DEV_CONSOLE) {
254+
if (ImGui.isKeyPressed(key.toImGuiKey(), false)) toggled = true;
255+
}
224256
}
225257
if (toggled) toggleUI();
226258

@@ -237,6 +269,9 @@ class ConsoleUI {
237269
ImGui.setNextWindowPos(ImGuiUtil.getWindowSpaceX() + Lib.application.window.width - 240, ImGuiUtil.getWindowSpaceY(), ImGuiCond.FirstUseEver);
238270
ImGui.setNextWindowSize(240, 405, ImGuiCond.FirstUseEver);
239271
if (ImGui.begin("Console Settings", settingsOpen, 0)) {
272+
if (ImGui.button("Open Style Editor")) {
273+
stylesOpen.value = !stylesOpen.value;
274+
}
240275
//ImGui.checkbox("Count duplicated output##Console Settings", countDuplicatedOutput); ImGui.setItemTooltip("Toggles if duplicated logs add a counter instead of displaying again");
241276
ImGui.separatorText("Log Filter:");
242277
ImGui.checkbox("Time##Console Settings", timeFilter); ImGui.setItemTooltip("Toggles if timestamp shows in each log");
@@ -259,6 +294,27 @@ class ConsoleUI {
259294
saveSettings();
260295
}
261296

297+
if (stylesOpen.value) {
298+
if (ImGui.begin("Style Editor")) {
299+
ImGui.textWrapped("THIS WILL NOT SAVE !!! (yet)");
300+
ImGui.textWrapped("Expect cool stuff to share with people once you're able to save though");
301+
ImGui.separator();
302+
ImGui.separatorText("Console Colors");
303+
ImGui.colorEdit3("Input BG Color##Style Editor", CONSOLE_BG_COLOR, ImGuiColorEditFlags.NoInputs);
304+
ImGui.colorEdit3("Search Highlight##Style Editor", SEARCH_HIGHLIGHT_COLOR, ImGuiColorEditFlags.NoInputs);
305+
ImGui.colorEdit3("Search Selection##Style Editor", SEARCH_SELECTED_COLOR, ImGuiColorEditFlags.NoInputs);
306+
ImGui.colorEdit3("Search Description##Style Editor", SEARCH_DESC_COLOR, ImGuiColorEditFlags.NoInputs);
307+
ImGui.colorEdit3("Search Arguments##Style Editor", SEARCH_ARGS_COLOR, ImGuiColorEditFlags.NoInputs);
308+
ImGui.separatorText("Text Colors");
309+
for (x => i in CONSOLE_COLOR_ORDER) {
310+
ImGui.colorEdit3("Text Color #${x+1}##$x", consoleColors[i], ImGuiColorEditFlags.NoInputs | ImGuiColorEditFlags.NoLabel);
311+
if ((x + 1) % Std.int(CONSOLE_COLOR_ORDER.length / 2) != 0) ImGui.sameLine(0, 2);
312+
}
313+
ImGui.showStyleEditor();
314+
}
315+
ImGui.end();
316+
}
317+
262318
ImGui.setNextWindowPos(ImGuiUtil.getWindowSpaceX(), ImGuiUtil.getWindowSpaceY() + (Lib.application.window.height-250), ImGuiCond.FirstUseEver);
263319
ImGui.setNextWindowSize(Lib.application.window.width, 250, ImGuiCond.FirstUseEver);
264320
ImGui.setNextWindowDockID(0, ImGuiCond.FirstUseEver);
@@ -321,18 +377,23 @@ class ConsoleUI {
321377
}
322378
}
323379

380+
// TODO: text wraping
381+
inline function drawText(text:String) {
382+
ImGui.textUnformatted(text);
383+
}
384+
324385
for (textIndex => t in consoleOutput[i].log) {
325386
if (indicesToIgnore.contains(textIndex)) continue;
326387
if (!timeFilter.value && textIndex == 0) { //fix padding
327388
ImGui.sameLine(0, 0);
328389
ImGui.pushStyleColor(ImGuiCol.Text, consoleColorToImColor(t.color));
329-
ImGui.textUnformatted("[");
390+
drawText("[");
330391
ImGui.popStyleColor();
331392
continue;
332393
} else if (!typeFilter.value && textIndex == 4) {
333394
ImGui.sameLine(0, 0);
334395
ImGui.pushStyleColor(ImGuiCol.Text, consoleColorToImColor(t.color));
335-
ImGui.textUnformatted(" ] ");
396+
drawText(" ] ");
336397
ImGui.popStyleColor();
337398
continue;
338399
}
@@ -341,14 +402,14 @@ class ConsoleUI {
341402
ImGui.pushStyleColor(ImGuiCol.Text, consoleColorToImColor(t.color));
342403
var lines = t.text.split("\n");
343404
for (i => l in lines) {
344-
ImGui.textUnformatted(l);
405+
drawText(l);
345406
}
346407
ImGui.popStyleColor();
347408
}
348409

349410
if (countDuplicatedOutput.value && consoleOutput[i].times > 1) {
350411
ImGui.sameLine(0, 0);
351-
ImGui.textUnformatted(" ("+consoleOutput[i].times +"x)");
412+
drawText(" ("+consoleOutput[i].times +"x)");
352413
}
353414

354415
ImGui.newLine();
@@ -402,7 +463,7 @@ class ConsoleUI {
402463
if (end < SEARCH_MAX_OUTPUT) end = SEARCH_MAX_OUTPUT;
403464
if (end > commandSearch.length) end = commandSearch.length;
404465

405-
ImGui.pushStyleColor(ImGuiCol.WindowBg, CONSOLE_BG_COLOR);
466+
ImGui.pushStyleColor(ImGuiCol.WindowBg, CONSOLE_BG_COLOR.toImColor());
406467
ImGui.setNextWindowPos(inputTextCursorPos.x, inputTextCursorPos.y - (ImGui.getTextLineHeightWithSpacing() * (end-start))-12);
407468
if (ImGui.begin("Command Search window", null, ImGuiWindowFlags.NoDecoration | ImGuiWindowFlags.AlwaysAutoResize | ImGuiWindowFlags.NoInputs | ImGuiWindowFlags.NoFocusOnAppearing)) {
408469
ImGui.bringNamedWindowToDisplayFront("Command Search window");
@@ -415,16 +476,16 @@ class ConsoleUI {
415476
var after:String = cmdName.substring(cmd.searchIndex+inputName.length, cmdName.length);
416477

417478
if (before != "") {
418-
if (i == commandSearch.length-1) ImGui.pushStyleColor(ImGuiCol.Text, SEARCH_SELECTED_COLOR);
479+
if (i == commandSearch.length-1) ImGui.pushStyleColor(ImGuiCol.Text, SEARCH_SELECTED_COLOR.toImColor());
419480
ImGui.textUnformatted(before);
420481
ImGui.sameLine(0, 0);
421482
if (i == commandSearch.length-1) ImGui.popStyleColor();
422483
}
423-
ImGui.pushStyleColor(ImGuiCol.Text, SEARCH_HIGHLIGHT_COLOR);
484+
ImGui.pushStyleColor(ImGuiCol.Text, SEARCH_HIGHLIGHT_COLOR.toImColor());
424485
ImGui.textUnformatted(cmdName.substring(cmd.searchIndex, cmd.searchIndex+inputName.length));
425486
ImGui.popStyleColor();
426487
if (after != "") {
427-
if (i == commandSearch.length-1) ImGui.pushStyleColor(ImGuiCol.Text, SEARCH_SELECTED_COLOR);
488+
if (i == commandSearch.length-1) ImGui.pushStyleColor(ImGuiCol.Text, SEARCH_SELECTED_COLOR.toImColor());
428489
ImGui.sameLine(0, 0);
429490
ImGui.textUnformatted(after);
430491
if (i == commandSearch.length-1) ImGui.popStyleColor();
@@ -435,20 +496,20 @@ class ConsoleUI {
435496
ImGui.textUnformatted("(TAB to Autocomplete)");
436497
}
437498
} else {
438-
if (i == cycleIndex) ImGui.pushStyleColor(ImGuiCol.Text, SEARCH_SELECTED_COLOR);
499+
if (i == cycleIndex) ImGui.pushStyleColor(ImGuiCol.Text, SEARCH_SELECTED_COLOR.toImColor());
439500
ImGui.textUnformatted(cmd.name);
440501
if (i == cycleIndex) ImGui.popStyleColor();
441502
}
442503

443504
if (cmd.argsDesc != null && cmd.argsDesc != "") {
444505
ImGui.sameLine();
445-
ImGui.pushStyleColor(ImGuiCol.Text, SEARCH_ARGS_COLOR);
506+
ImGui.pushStyleColor(ImGuiCol.Text, SEARCH_ARGS_COLOR.toImColor());
446507
ImGui.textUnformatted(cmd.argsDesc);
447508
ImGui.popStyleColor();
448509
}
449510
if (cmd.desc != "") {
450511
ImGui.sameLine();
451-
ImGui.pushStyleColor(ImGuiCol.Text, SEARCH_DESC_COLOR);
512+
ImGui.pushStyleColor(ImGuiCol.Text, SEARCH_DESC_COLOR.toImColor());
452513
ImGui.textUnformatted(cmd.desc);
453514
ImGui.popStyleColor();
454515
}
@@ -676,25 +737,4 @@ class ConsoleUI {
676737
Logs.infos(Std.string(consoleHscript.tryExecute(str)), LIGHTGRAY, "Console");
677738
}
678739
}
679-
680-
public static function consoleColorToImColor(color:ConsoleColor) {
681-
return switch(color) {
682-
case BLACK: 0xFF000000;
683-
case DARKBLUE: 0xFF0909C3;
684-
case DARKGREEN: 0xFF008800;
685-
case DARKCYAN: 0xFF008888;
686-
case DARKRED: 0xFF880000;
687-
case DARKMAGENTA: 0xFF9A1CC5;
688-
case DARKYELLOW: 0xFFBCBC00;
689-
case LIGHTGRAY: 0xFFD4D4D4;
690-
case GRAY: 0xFFA4A4A4;
691-
case BLUE: 0xFF2A4AEA;
692-
case GREEN: 0xFF00FF00;
693-
case CYAN: 0xFF008CFF;
694-
case RED: 0xFFFF0000;
695-
case MAGENTA: 0xFFFF00FF;
696-
case YELLOW: 0xFFFFFF00;
697-
case WHITE | _: 0xFFFFFFFF;
698-
}
699-
}
700740
}

source/funkin/editors/charter/Charter.hx

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ package funkin.editors.charter;
55
import flixel.input.keyboard.FlxKey;
66
import flixel.math.FlxPoint;
77
import flixel.sound.FlxSound;
8+
import flixel.sound.FlxSoundData;
89
import flixel.util.FlxSort;
910
import funkin.backend.chart.*;
1011
import funkin.backend.chart.ChartData;
@@ -622,25 +623,10 @@ class Charter extends UIState {
622623
Conductor.setupSong(PlayState.SONG);
623624
noteTypes = PlayState.SONG.noteTypes;
624625

625-
FlxG.sound.setMusic(FlxG.sound.load(Paths.inst(__song, __diff, PlayState.SONG.meta.instSuffix)));
626-
627-
// force full load the audio datas for waveform, maybe in the future dont do this and
628-
// make it so it continously loads the only necessary waveform data in preview?
629-
630-
if (FlxG.sound.music.data?.buffer != null && FlxG.sound.music.data.buffer.data == null) {
631-
FlxG.sound.music.data.buffer.load();
632-
FlxG.sound.music.data.buffer.decoder?.dispose();
633-
FlxG.sound.music.data.buffer.decoder = null;
634-
}
626+
FlxG.sound.setMusic(FlxG.sound.load(FlxSoundData.fromAssetKey(Paths.inst(__song, __diff, PlayState.SONG.meta.instSuffix), false)));
635627

636628
if (Assets.exists(Paths.voices(__song, __diff, PlayState.SONG.meta.vocalsSuffix))) {
637-
vocals = FlxG.sound.load(Paths.voices(__song, __diff, PlayState.SONG.meta.vocalsSuffix));
638-
639-
if (vocals.data?.buffer != null && vocals.data.buffer.data == null) {
640-
vocals.data.buffer.load();
641-
vocals.data.buffer.decoder?.dispose();
642-
vocals.data.buffer.decoder = null;
643-
}
629+
vocals = FlxG.sound.load(FlxSoundData.fromAssetKey(Paths.voices(__song, __diff, PlayState.SONG.meta.vocalsSuffix)));
644630
}
645631
else
646632
vocals = new FlxSound();

source/funkin/editors/charter/CharterStrumline.hx

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import funkin.editors.ui.UIContextMenu.UIContextMenuOption;
44
import flixel.util.FlxColor;
55
import flixel.group.FlxSpriteGroup;
66
import flixel.sound.FlxSound;
7+
import flixel.sound.FlxSoundData;
78
import funkin.backend.chart.ChartData.ChartStrumLine;
89
import funkin.backend.shaders.CustomShader;
910
import funkin.editors.ui.UITopMenu.UITopMenuButton;
@@ -137,7 +138,7 @@ class CharterStrumline extends UISprite {
137138

138139
regenerateIcons(icons);
139140

140-
var asset = strumLine.vocalsSuffix.length > 0 ? Assets.getSound(Paths.voices(PlayState.SONG.meta.name, PlayState.difficulty, strumLine.vocalsSuffix)) : null;
141+
var asset = strumLine.vocalsSuffix.length > 0 ? FlxSoundData.fromAssetKey(Paths.voices(PlayState.SONG.meta.name, PlayState.difficulty, strumLine.vocalsSuffix), false) : null;
141142

142143
if (vocals == null) FlxG.sound.list.add(vocals = new FlxSound());
143144
if (asset != null) {
@@ -151,12 +152,6 @@ class CharterStrumline extends UISprite {
151152
}
152153
vocals.group = FlxG.sound.defaultMusicGroup;
153154

154-
if (vocals.data?.buffer != null && vocals.data.buffer.data == null) {
155-
vocals.data.buffer.load();
156-
vocals.data.buffer.decoder?.dispose();
157-
vocals.data.buffer.decoder = null;
158-
}
159-
160155
highlightColor = 0xFFFFFFFF;
161156
if (icons[0] != null) {
162157
var characterXML = Character.getXMLFromCharName(icons[0]);

source/funkin/game/PlayState.hx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1184,7 +1184,7 @@ class PlayState extends MusicBeatState
11841184
curSong = songData.meta.name.toLowerCase();
11851185
curSongID = curSong.replace(" ", "-");
11861186

1187-
FlxG.sound.setMusic(inst = FlxG.sound.load(Assets.getMusic(Paths.inst(SONG.meta.name, difficulty, SONG.meta.instSuffix))));
1187+
FlxG.sound.setMusic(inst = FlxG.sound.load(Paths.inst(SONG.meta.name, difficulty, SONG.meta.instSuffix)));
11881188

11891189
var vocalsPath = Paths.voices(SONG.meta.name, difficulty, SONG.meta.vocalsSuffix);
11901190
if (SONG.meta.needsVoices && Assets.exists(vocalsPath))

source/funkin/options/Options.hx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,8 @@ class Options
143143
public static var consoleScriptsFilter:Bool = true;
144144
public static var consoleCountDuplicatedOutput:Bool = true;
145145

146+
public static var useNativeConsole:Bool = false;
147+
146148
#if IMGUI_ENABLED
147149
/**
148150
* IMGUI

0 commit comments

Comments
 (0)