diff --git a/assets/data/characters/senpai-angry.xml b/assets/data/characters/senpai-angry.xml index 1dad661f..24812311 100644 --- a/assets/data/characters/senpai-angry.xml +++ b/assets/data/characters/senpai-angry.xml @@ -1,5 +1,5 @@ - + diff --git a/assets/data/characters/senpai.xml b/assets/data/characters/senpai.xml index c2ce7849..70ace2d6 100644 --- a/assets/data/characters/senpai.xml +++ b/assets/data/characters/senpai.xml @@ -1,5 +1,5 @@ - + diff --git a/assets/data/charts/test/modchart.hx b/assets/data/charts/test/modchart.hx index 1aa48d27..26f274aa 100644 --- a/assets/data/charts/test/modchart.hx +++ b/assets/data/charts/test/modchart.hx @@ -1,6 +1,7 @@ function create() { importScript("data/scripts/pixel"); pixelNotesForBF = false; + enablePixelUI = false; } function updatePost(elapsed) { diff --git a/assets/data/scripts/pixel.hx b/assets/data/scripts/pixel.hx index 3ca47f1f..63eabca2 100644 --- a/assets/data/scripts/pixel.hx +++ b/assets/data/scripts/pixel.hx @@ -1,5 +1,6 @@ public var pixelNotesForBF = true; public var pixelNotesForDad = true; +public var enablePixelUI = true; var daPixelZoom = 6; @@ -21,6 +22,7 @@ function onNoteCreation(event) { note.scale.set(daPixelZoom, daPixelZoom); note.updateHitbox(); } + function onStrumCreation(event) { if (event.player == 1 && !pixelNotesForBF) return; if (event.player == 0 && !pixelNotesForDad) return; @@ -35,4 +37,18 @@ function onStrumCreation(event) { strum.scale.set(daPixelZoom, daPixelZoom); strum.updateHitbox(); +} + +function onCountdown(event) { + if (!enablePixelUI) return; + + if (event.soundPath != null) event.soundPath = 'pixel/' + event.soundPath; + event.antialiasing = false; + event.scale = 6; + event.spritePath = switch(event.swagCounter) { + case 0: null; + case 1: 'stages/school/ui/ready'; + case 2: 'stages/school/ui/set'; + case 3: 'stages/school/ui/go'; + }; } \ No newline at end of file diff --git a/assets/data/stages/school.hx b/assets/data/stages/school.hx index a7886b1f..0aee3088 100644 --- a/assets/data/stages/school.hx +++ b/assets/data/stages/school.hx @@ -1,3 +1,5 @@ function create() { importScript("data/scripts/pixel"); + trace(treeLeaves.width); + trace(bgSky.width); } \ No newline at end of file diff --git a/assets/data/stages/school.xml b/assets/data/stages/school.xml index 361015eb..7f135727 100644 --- a/assets/data/stages/school.xml +++ b/assets/data/stages/school.xml @@ -1,7 +1,25 @@ - - - - - + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/assets/images/stages/school/ui/bad-pixel.png b/assets/images/stages/school/ui/bad.png similarity index 100% rename from assets/images/stages/school/ui/bad-pixel.png rename to assets/images/stages/school/ui/bad.png diff --git a/assets/images/stages/school/ui/combo-pixel.png b/assets/images/stages/school/ui/combo.png similarity index 100% rename from assets/images/stages/school/ui/combo-pixel.png rename to assets/images/stages/school/ui/combo.png diff --git a/assets/images/stages/school/ui/date-pixel.png b/assets/images/stages/school/ui/go.png similarity index 100% rename from assets/images/stages/school/ui/date-pixel.png rename to assets/images/stages/school/ui/go.png diff --git a/assets/images/stages/school/ui/good-pixel.png b/assets/images/stages/school/ui/good.png similarity index 100% rename from assets/images/stages/school/ui/good-pixel.png rename to assets/images/stages/school/ui/good.png diff --git a/assets/images/stages/school/ui/num0-pixel.png b/assets/images/stages/school/ui/num0.png similarity index 100% rename from assets/images/stages/school/ui/num0-pixel.png rename to assets/images/stages/school/ui/num0.png diff --git a/assets/images/stages/school/ui/num1-pixel.png b/assets/images/stages/school/ui/num1.png similarity index 100% rename from assets/images/stages/school/ui/num1-pixel.png rename to assets/images/stages/school/ui/num1.png diff --git a/assets/images/stages/school/ui/num2-pixel.png b/assets/images/stages/school/ui/num2.png similarity index 100% rename from assets/images/stages/school/ui/num2-pixel.png rename to assets/images/stages/school/ui/num2.png diff --git a/assets/images/stages/school/ui/num3-pixel.png b/assets/images/stages/school/ui/num3.png similarity index 100% rename from assets/images/stages/school/ui/num3-pixel.png rename to assets/images/stages/school/ui/num3.png diff --git a/assets/images/stages/school/ui/num4-pixel.png b/assets/images/stages/school/ui/num4.png similarity index 100% rename from assets/images/stages/school/ui/num4-pixel.png rename to assets/images/stages/school/ui/num4.png diff --git a/assets/images/stages/school/ui/num5-pixel.png b/assets/images/stages/school/ui/num5.png similarity index 100% rename from assets/images/stages/school/ui/num5-pixel.png rename to assets/images/stages/school/ui/num5.png diff --git a/assets/images/stages/school/ui/num6-pixel.png b/assets/images/stages/school/ui/num6.png similarity index 100% rename from assets/images/stages/school/ui/num6-pixel.png rename to assets/images/stages/school/ui/num6.png diff --git a/assets/images/stages/school/ui/num7-pixel.png b/assets/images/stages/school/ui/num7.png similarity index 100% rename from assets/images/stages/school/ui/num7-pixel.png rename to assets/images/stages/school/ui/num7.png diff --git a/assets/images/stages/school/ui/num8-pixel.png b/assets/images/stages/school/ui/num8.png similarity index 100% rename from assets/images/stages/school/ui/num8-pixel.png rename to assets/images/stages/school/ui/num8.png diff --git a/assets/images/stages/school/ui/num9-pixel.png b/assets/images/stages/school/ui/num9.png similarity index 100% rename from assets/images/stages/school/ui/num9-pixel.png rename to assets/images/stages/school/ui/num9.png diff --git a/assets/images/stages/school/ui/ready-pixel.png b/assets/images/stages/school/ui/ready.png similarity index 100% rename from assets/images/stages/school/ui/ready-pixel.png rename to assets/images/stages/school/ui/ready.png diff --git a/assets/images/stages/school/ui/set-pixel.png b/assets/images/stages/school/ui/set.png similarity index 100% rename from assets/images/stages/school/ui/set-pixel.png rename to assets/images/stages/school/ui/set.png diff --git a/assets/images/stages/school/ui/shit-pixel.png b/assets/images/stages/school/ui/shit.png similarity index 100% rename from assets/images/stages/school/ui/shit-pixel.png rename to assets/images/stages/school/ui/shit.png diff --git a/assets/images/stages/school/ui/sick-pixel.png b/assets/images/stages/school/ui/sick.png similarity index 100% rename from assets/images/stages/school/ui/sick-pixel.png rename to assets/images/stages/school/ui/sick.png diff --git a/assets/sounds/intro1-pixel.mp3 b/assets/sounds/pixel/intro1.mp3 similarity index 100% rename from assets/sounds/intro1-pixel.mp3 rename to assets/sounds/pixel/intro1.mp3 diff --git a/assets/sounds/intro1-pixel.ogg b/assets/sounds/pixel/intro1.ogg similarity index 100% rename from assets/sounds/intro1-pixel.ogg rename to assets/sounds/pixel/intro1.ogg diff --git a/assets/sounds/intro2-pixel.mp3 b/assets/sounds/pixel/intro2.mp3 similarity index 100% rename from assets/sounds/intro2-pixel.mp3 rename to assets/sounds/pixel/intro2.mp3 diff --git a/assets/sounds/intro2-pixel.ogg b/assets/sounds/pixel/intro2.ogg similarity index 100% rename from assets/sounds/intro2-pixel.ogg rename to assets/sounds/pixel/intro2.ogg diff --git a/assets/sounds/intro3-pixel.mp3 b/assets/sounds/pixel/intro3.mp3 similarity index 100% rename from assets/sounds/intro3-pixel.mp3 rename to assets/sounds/pixel/intro3.mp3 diff --git a/assets/sounds/intro3-pixel.ogg b/assets/sounds/pixel/intro3.ogg similarity index 100% rename from assets/sounds/intro3-pixel.ogg rename to assets/sounds/pixel/intro3.ogg diff --git a/assets/sounds/introGo-pixel.mp3 b/assets/sounds/pixel/introGo.mp3 similarity index 100% rename from assets/sounds/introGo-pixel.mp3 rename to assets/sounds/pixel/introGo.mp3 diff --git a/assets/sounds/introGo-pixel.ogg b/assets/sounds/pixel/introGo.ogg similarity index 100% rename from assets/sounds/introGo-pixel.ogg rename to assets/sounds/pixel/introGo.ogg diff --git a/buildnumber.txt b/buildnumber.txt index 5568a077..63192f72 100644 --- a/buildnumber.txt +++ b/buildnumber.txt @@ -1 +1 @@ -1118 \ No newline at end of file +1124 \ No newline at end of file diff --git a/source/funkin/game/PlayState.hx b/source/funkin/game/PlayState.hx index 89110717..c5108e4b 100644 --- a/source/funkin/game/PlayState.hx +++ b/source/funkin/game/PlayState.hx @@ -355,6 +355,7 @@ class PlayState extends MusicBeatState boyfriend.dance(); var event:CountdownEvent = scripts.event("onCountdown", new CountdownEvent( + swagCounter, introSprites[swagCounter], introSounds[swagCounter], 1, 0.6, true)); @@ -370,6 +371,7 @@ class PlayState extends MusicBeatState sprite = new FlxSprite().loadGraphic(spr); sprite.scrollFactor.set(); + sprite.scale.set(event.scale, event.scale); sprite.updateHitbox(); sprite.screenCenter(); add(sprite); diff --git a/source/funkin/game/Stage.hx b/source/funkin/game/Stage.hx index db31ab38..6356d04d 100644 --- a/source/funkin/game/Stage.hx +++ b/source/funkin/game/Stage.hx @@ -51,15 +51,10 @@ class Stage extends FlxBasic implements IBeatReceiver { var spr = new StageSprite(); spr.antialiasing = true; - var addDefAnim = true; if (!node.has.sprite || !node.has.name || !node.has.x || !node.has.y) continue; - - if (Assets.exists(Paths.file('images/$spritesParentFolder${node.att.sprite}.xml', TEXT))) { - spr.frames = Paths.getSparrowAtlas('$spritesParentFolder${node.att.sprite}'); - } else { - addDefAnim = false; - spr.loadGraphic(Paths.image('$spritesParentFolder${node.att.sprite}')); - } + + spr.loadAnimatedGraphic(Paths.image('$spritesParentFolder${node.att.sprite}')); + var x:Null = Std.parseFloat(node.att.x); var y:Null = Std.parseFloat(node.att.y); if (x != null) spr.x = x; @@ -77,6 +72,7 @@ class Stage extends FlxBasic implements IBeatReceiver { if (scroll != null) spr.scrollFactor.y = scroll; } } + if (node.has.antialiasing) spr.antialiasing = node.att.antialiasing == "true"; if (node.has.scale) { var scale:Null = Std.parseFloat(node.att.scale); if (scale != null) spr.scale.set(scale, scale); @@ -84,7 +80,6 @@ class Stage extends FlxBasic implements IBeatReceiver { if (node.has.updateHitbox && node.att.updateHitbox == "true") spr.updateHitbox(); for(anim in node.nodes.anim) { - addDefAnim = false; if (anim.has.name) spr.beatAnims.push(anim.att.name); XMLUtil.addXMLAnimation(spr, anim); } @@ -92,9 +87,6 @@ class Stage extends FlxBasic implements IBeatReceiver { if (node.has.anim) { spr.animation.play(node.att.anim); - } else if (addDefAnim) { - spr.animation.addByPrefix("anim", "", 24, true); - spr.animation.play("anim"); } stageSprites.set(node.att.name, spr); diff --git a/source/funkin/scripting/events/CountdownEvent.hx b/source/funkin/scripting/events/CountdownEvent.hx index 05a68473..640860ac 100644 --- a/source/funkin/scripting/events/CountdownEvent.hx +++ b/source/funkin/scripting/events/CountdownEvent.hx @@ -44,8 +44,9 @@ class CountdownEvent extends CancellableEvent { */ public var sound:FlxSound; - public function new(spritePath:String, soundPath:String, scale:Float = 1, volume:Float = 1, antialiasing:Bool = true) { + public function new(swagCounter:Int, spritePath:String, soundPath:String, scale:Float = 1, volume:Float = 1, antialiasing:Bool = true) { super(); + this.swagCounter = swagCounter; this.volume = volume; this.soundPath = soundPath; this.spritePath = spritePath;