diff --git a/art/flashFiles/RECOVER_NOTE_assets.fla b/art/flashFiles/RECOVER_NOTE_assets.fla index 32a9b700..96bc1a23 100644 Binary files a/art/flashFiles/RECOVER_NOTE_assets.fla and b/art/flashFiles/RECOVER_NOTE_assets.fla differ diff --git a/assets/images/editors/charter/note.png b/assets/images/editors/charter/note.png index 703ec056..c30bc664 100644 Binary files a/assets/images/editors/charter/note.png and b/assets/images/editors/charter/note.png differ diff --git a/assets/shaders/engine/charterNote.frag b/assets/shaders/engine/charterNote.frag deleted file mode 100644 index 8e0c60f0..00000000 --- a/assets/shaders/engine/charterNote.frag +++ /dev/null @@ -1,9 +0,0 @@ -#pragma header - -uniform vec3 noteColor; - -void main() { - vec4 finalColor = flixel_texture2D(bitmap, openfl_TextureCoordv); - float diff = finalColor.r - ((finalColor.g + finalColor.b) / 2.0); - gl_FragColor = vec4(((finalColor.g + finalColor.b) / 2.0) + (noteColor.r * diff), finalColor.g + (noteColor.g * diff), finalColor.b + (noteColor.b * diff), finalColor.a); -} \ No newline at end of file diff --git a/buildnumber.txt b/buildnumber.txt index 917c81e5..e39b4bbb 100644 --- a/buildnumber.txt +++ b/buildnumber.txt @@ -1 +1 @@ -2663 \ No newline at end of file +2673 \ No newline at end of file diff --git a/source/funkin/editors/charter/Charter.hx b/source/funkin/editors/charter/Charter.hx index 97ee2f96..acc541b4 100644 --- a/source/funkin/editors/charter/Charter.hx +++ b/source/funkin/editors/charter/Charter.hx @@ -143,7 +143,7 @@ class Charter extends UIState { gridBackdrop = new CharterBackdrop(); - gridBackdrop.setPosition(0, 0); + // gridBackdrop.setPosition(-78, 1); notesGroup.cameras = gridBackdrop.cameras = [charterCamera]; @@ -183,5 +183,14 @@ class Charter extends UIState { // TODO: remove this bs!! if (controls.BACK) FlxG.switchState(new funkin.menus.MainMenuState()); + + if (controls.LEFT) + FlxG.camera.scroll.x -= 100 * elapsed; + if (controls.RIGHT) + FlxG.camera.scroll.x += 100 * elapsed; + if (controls.UP) + FlxG.camera.scroll.y -= 100 * elapsed; + if (controls.DOWN) + FlxG.camera.scroll.y += 100 * elapsed; } } \ No newline at end of file diff --git a/source/funkin/editors/charter/CharterBackdrop.hx b/source/funkin/editors/charter/CharterBackdrop.hx index a6e750af..26f12c4b 100644 --- a/source/funkin/editors/charter/CharterBackdrop.hx +++ b/source/funkin/editors/charter/CharterBackdrop.hx @@ -1,5 +1,6 @@ package funkin.editors.charter; +import openfl.geom.Rectangle; import flixel.addons.display.FlxBackdrop; class CharterBackdrop extends FlxBackdrop { @@ -8,14 +9,14 @@ class CharterBackdrop extends FlxBackdrop { public function new() { super(null, 1, 1, false, true); - makeGraphic(4, 4, 0xFF272727, true); + makeGraphic(160, 160, 0xFF272727, true); pixels.lock(); for(y in 0...4) for(x in 0...2) - pixels.setPixel32((x*2)+(y%2), y, 0xFF545454); + pixels.fillRect(new Rectangle(40*((x*2)+(y%2)), 40*y, 40, 40), 0xFF545454); + pixels.fillRect(new Rectangle(0, 0, 1, 160), 0xFFDDDDDD); + pixels.fillRect(new Rectangle(159, 0, 1, 160), 0xFFDDDDDD); pixels.unlock(); - scale.set(40, 40); - updateHitbox(); loadFrame(frame); } diff --git a/source/funkin/editors/charter/CharterNote.hx b/source/funkin/editors/charter/CharterNote.hx index a4a284dd..44396b3c 100644 --- a/source/funkin/editors/charter/CharterNote.hx +++ b/source/funkin/editors/charter/CharterNote.hx @@ -5,76 +5,32 @@ import funkin.shaders.CustomShader; import flixel.util.FlxColor; class CharterNote extends UISprite { - private static var colors:Array = [ - 0xFFC24B99, // purple - 0xFF00FFFF, // cyan - 0xFF12FA05, // green - 0xFFF9393F // red - ]; - private static var colorsRotation:Array; - - public static final noteScaleX:Float = 40 / 154; - public static final noteScaleY:Float = 40 / 157; - - public var charterNoteShader:CustomShader; - var angleTween:FlxTween; public function new() { super(); antialiasing = true; - loadGraphic(Paths.image('editors/charter/note')); - scale.set(noteScaleX, noteScaleY); - updateHitbox(); - scale.set(noteScaleY, noteScaleY); - - shader = charterNoteShader = new CustomShader('engine/charterNote'); - - if (colorsRotation == null) colorsRotation = [ - colors[2], - colors[3], - colors[1], - colors[0] - ]; + loadGraphic(Paths.image('editors/charter/note'), true, 157, 154); + animation.add("note", [for(i in 0...frames.frames.length) i], 0, true); + animation.play("note"); + this.setUnstretchedGraphicSize(40, 40, false); angle = 45; // green-red inbetween } - private override function set_angle(v:Float):Float { - if (charterNoteShader != null) { - var v2:Float = v; - var o:Int = 0; - - // make sure the note isnt negative - while(v2 < 0) { - v2 += 90; - o -= 1; - } - // make sure the note is under 90 degrees - while(v2 > 90) { - v2 -= 90; - o += 1; - } - var c:FlxColor = FlxColor.interpolate(colorsRotation[FlxMath.wrap(o, 0, 3)], colorsRotation[FlxMath.wrap(o+1, 0, 3)], v2 / 90); - - charterNoteShader.hset('noteColor', [c.redFloat, c.greenFloat, c.blueFloat]); - } - return super.set_angle(v); - } - public function updatePos(step:Float, id:Int, susLength:Float = 0, type:Int = 0) { x = id * 40; y = step * 40; if (angleTween != null) angleTween.cancel(); - angleTween = FlxTween.tween(this, {angle: switch(id % 4) { + angleTween = FlxTween.tween(this, {angle: switch(animation.curAnim.curFrame = (id % 4)) { case 0: -90; case 1: 180; case 2: 0; case 3: 90; default: 0; // how is that even possible - }}, 1, {ease: function(t) { + }}, 2/3, {ease: function(t) { return ((Math.sin(t * Math.PI) * 0.35) * 3 * t * Math.sqrt(1 - t)) + t; }}); }