Important rendering bug fix + optimizations
This commit is contained in:
@@ -101,7 +101,7 @@ class AsyncUpdater {
|
||||
progress.files = files.length;
|
||||
progress.step = DOWNLOADING_ASSETS;
|
||||
trace('starting assets download');
|
||||
doFile([for(e in files) e], [for(e in fileNames) e], function() {
|
||||
doFile(files.copy(), fileNames.copy(), function() {
|
||||
progress.curFile = -1;
|
||||
progress.curFileName = null;
|
||||
progress.files = 1;
|
||||
|
||||
@@ -1657,7 +1657,7 @@ class Charter extends UIState {
|
||||
changeNoteSustain(-1);
|
||||
|
||||
function _note_selectall(_) {
|
||||
selection = [for (note in notesGroup.members) note];
|
||||
selection = cast notesGroup.members.copy();
|
||||
}
|
||||
|
||||
function _note_selectmeasure(_) {
|
||||
|
||||
@@ -253,7 +253,7 @@ class CharterBackdropDummy extends UISprite {
|
||||
|
||||
public override function draw() {
|
||||
@:privateAccess
|
||||
__lastDrawCameras = [for(c in cameras) c];
|
||||
__lastDrawCameras = cameras.copy();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -69,7 +69,7 @@ class UISprite extends FlxSprite {
|
||||
|
||||
public function drawSuper() {
|
||||
super.draw();
|
||||
__lastDrawCameras = [for(c in cameras) c];
|
||||
__lastDrawCameras = cameras.copy();
|
||||
}
|
||||
|
||||
public function drawMembers() {
|
||||
|
||||
@@ -98,6 +98,9 @@ class Note extends FlxSprite
|
||||
return __customNoteTypeExists[path];
|
||||
return __customNoteTypeExists[path] = Assets.exists(path);
|
||||
}
|
||||
|
||||
static var DEFAULT_FIELDS:Array<String> = ["time", "id", "type", "sLen"];
|
||||
|
||||
public function new(strumLine:StrumLine, noteData:ChartNote, sustain:Bool = false, sustainLength:Float = 0, sustainOffset:Float = 0, ?prev:Note)
|
||||
{
|
||||
super();
|
||||
@@ -115,7 +118,7 @@ class Note extends FlxSprite
|
||||
this.sustainLength = sustainLength;
|
||||
this.strumLine = strumLine;
|
||||
for(field in Reflect.fields(noteData)) {
|
||||
if(!["time", "id", "type", "sLen"].contains(field)) {
|
||||
if(!DEFAULT_FIELDS.contains(field)) {
|
||||
this.extra.set(field, Reflect.field(noteData, field));
|
||||
}
|
||||
}
|
||||
@@ -290,7 +293,7 @@ class Note extends FlxSprite
|
||||
setClipRect(swagRect);
|
||||
}
|
||||
|
||||
public function setClipRect(rect:FlxRect) {
|
||||
public inline function setClipRect(rect:FlxRect) {
|
||||
this.clipRect = rect;
|
||||
}
|
||||
|
||||
|
||||
@@ -74,7 +74,7 @@ class Strum extends FlxSprite {
|
||||
}
|
||||
|
||||
public override function draw() {
|
||||
lastDrawCameras = [for(c in cameras) c];
|
||||
lastDrawCameras = cameras.copy();
|
||||
super.draw();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user