From f0143f056f281909b6b167b1742347a22bfb00aa Mon Sep 17 00:00:00 2001 From: Yoshman29 Date: Mon, 31 Oct 2022 14:48:35 +0100 Subject: [PATCH] alphabet --- assets/data/alphabet.xml | 4 +- buildnumber.txt | 2 +- source/funkin/game/PlayState.hx | 2 +- source/funkin/menus/MainMenuState.hx | 4 +- source/funkin/ui/Alphabet.hx | 78 +--------------------------- 5 files changed, 8 insertions(+), 82 deletions(-) diff --git a/assets/data/alphabet.xml b/assets/data/alphabet.xml index b8b107bc..281b7f18 100644 --- a/assets/data/alphabet.xml +++ b/assets/data/alphabet.xml @@ -1,6 +1,6 @@ - + @@ -29,7 +29,7 @@ - + diff --git a/buildnumber.txt b/buildnumber.txt index 9a943a23..707e2574 100644 --- a/buildnumber.txt +++ b/buildnumber.txt @@ -1 +1 @@ -849 \ No newline at end of file +853 \ No newline at end of file diff --git a/source/funkin/game/PlayState.hx b/source/funkin/game/PlayState.hx index 768a0d01..59367445 100644 --- a/source/funkin/game/PlayState.hx +++ b/source/funkin/game/PlayState.hx @@ -1154,7 +1154,7 @@ class PlayState extends MusicBeatState var e = separatedScore.charAt(i); - var numScore:FlxSprite = new FlxSprite().loadGraphic(Paths.image('game/${prefix}num$e$suffix')); + var numScore:FlxSprite = new FlxSprite().loadGraphic(Paths.image('game/${prefix}score/num$e$suffix')); numScore.screenCenter(); numScore.x = comboPos.x + (43 * i) - 90; numScore.y += 80; diff --git a/source/funkin/menus/MainMenuState.hx b/source/funkin/menus/MainMenuState.hx index f66ccac1..6c572880 100644 --- a/source/funkin/menus/MainMenuState.hx +++ b/source/funkin/menus/MainMenuState.hx @@ -79,11 +79,11 @@ class MainMenuState extends MusicBeatState menuItems = new FlxTypedGroup(); add(menuItems); - + for (i in 0...optionShit.length) { var menuItem:FlxSprite = new FlxSprite(0, 60 + (i * 160)); - menuItem.frames = Paths.getSparrowAtlas('menus/mainmenu/${optionShit[i]}');; + menuItem.frames = Paths.getSparrowAtlas('menus/mainmenu/${optionShit[i]}'); menuItem.animation.addByPrefix('idle', optionShit[i] + " basic", 24); menuItem.animation.addByPrefix('selected', optionShit[i] + " white", 24); menuItem.animation.play('idle'); diff --git a/source/funkin/ui/Alphabet.hx b/source/funkin/ui/Alphabet.hx index ae05f88c..d7520a81 100644 --- a/source/funkin/ui/Alphabet.hx +++ b/source/funkin/ui/Alphabet.hx @@ -40,7 +40,6 @@ class Alphabet extends FlxSpriteGroup // amp, backslash, question mark, apostrophy, comma, angry faic, period var lastSprite:AlphaCharacter; var xPosResetted:Bool = false; - var lastWasSpace:Bool = false; var splitWords:Array = []; @@ -137,8 +136,6 @@ class Alphabet extends FlxSpriteGroup var xPos:Float = 0; for (character in splitWords) { - lastWasSpace = character == " "; - if (lastSprite != null) xPos = lastSprite.x + lastSprite.width - x; @@ -188,79 +185,6 @@ class Alphabet extends FlxSpriteGroup xPos = 0; curRow += 1; } - - if (splitWords[loopNum] == " ") - { - lastWasSpace = true; - } - - // #if (haxe >= "4.0.0") - // var isNumber:Bool = AlphaCharacter.numbers.contains(splitWords[loopNum]); - // var isSymbol:Bool = AlphaCharacter.symbols.contains(splitWords[loopNum]); - // #else - // var isNumber:Bool = AlphaCharacter.numbers.indexOf(splitWords[loopNum]) != -1; - // var isSymbol:Bool = AlphaCharacter.symbols.indexOf(splitWords[loopNum]) != -1; - // #end - - // if (AlphaCharacter.alphabet.indexOf(splitWords[loopNum].toLowerCase()) != -1 || isNumber || isSymbol) - // // if (AlphaCharacter.alphabet.contains(splitWords[loopNum].toLowerCase()) || isNumber || isSymbol) - - // { - // if (lastSprite != null && !xPosResetted) - // { - // lastSprite.updateHitbox(); - // xPos += lastSprite.width + 3; - // // if (isBold) - // // xPos -= 80; - // } - // else - // { - // xPosResetted = false; - // } - - // if (lastWasSpace) - // { - // xPos += 20; - // lastWasSpace = false; - // } - // // trace(_finalText.fastCodeAt(loopNum) + " " + _finalText.charAt(loopNum)); - - // // var letter:AlphaCharacter = new AlphaCharacter(30 * loopNum, 0); - // var letter:AlphaCharacter = new AlphaCharacter(xPos, 55 * yMulti); - // letter.row = curRow; - // if (isBold) - // { - // letter.createBold(splitWords[loopNum]); - // } - // else - // { - // if (isNumber) - // { - // letter.createNumber(splitWords[loopNum]); - // } - // else if (isSymbol) - // { - // letter.createSymbol(splitWords[loopNum]); - // } - // else - // { - // letter.createLetter(splitWords[loopNum]); - // } - - // letter.x += 90; - // } - - // if (FlxG.random.bool(40)) - // { - // var daSound:String = "GF_"; - // FlxG.sound.play(Paths.soundRandom(daSound, 1, 4)); - // } - - // add(letter); - - // lastSprite = letter; - // } - loopNum += 1; tmr.time = FlxG.random.float(0.04, 0.09); @@ -327,6 +251,7 @@ class AlphaCharacter extends FlxSprite letter = letter.toUpperCase(); if (boldAnims[letter] == null) { visible = false; + width = 40; return; } frames = Paths.getSparrowAtlas(boldAlphabetPath); @@ -339,6 +264,7 @@ class AlphaCharacter extends FlxSprite { if (letterAnims[letter] == null) { visible = false; + width = 40; return; } frames = Paths.getSparrowAtlas(letterAlphabetPath);