Skip to content

Commit

Permalink
e
Browse files Browse the repository at this point in the history
Fixed a crash on the offset adjusting state
Added editor music and sound effects to every editor
  • Loading branch information
JordanSantiagoYT committed Feb 25, 2024
1 parent a0dccee commit 24bd57f
Show file tree
Hide file tree
Showing 23 changed files with 403 additions and 20 deletions.
2 changes: 1 addition & 1 deletion assets/preload/data/botplayText.txt
Original file line number Diff line number Diff line change
Expand Up @@ -272,4 +272,4 @@ can i stay so i can hate you? yes? ok!
you suck- i ran out of ideas
[INSERT HATEFUL BOTPLAY TEXT]
i have no idea how you still uses botplay text
i cringe on your botplay
i cringe on your botplay
8 changes: 7 additions & 1 deletion assets/preload/gameRenders/readme.txt
Original file line number Diff line number Diff line change
@@ -1 +1,7 @@
Frames captured by the ingame Renderer will go here. You'll need FFmpeg to convert them into MP4s! Don't worry about organizing the folders by song name too, the engine will do it automatically :)
Frames captured by the ingame Renderer will go here. You'll need FFmpeg to convert them into MP4s! Don't worry about organizing the folders by song name too, the engine will do it automatically :)

For converting, here's the command I use:

ffmpeg -r 60 -i ./phobiaphobia/%07d.jpg LOL.mp4

Replace phobiaphobia with the name of the song you rendered, and you can name the file whatever you want instead of "LOL"
Binary file added assets/preload/music/editorMusic/0.ogg
Binary file not shown.
Binary file added assets/preload/music/editorMusic/1.ogg
Binary file not shown.
Binary file added assets/preload/music/editorMusic/2.ogg
Binary file not shown.
Binary file added assets/preload/music/editorMusic/3.ogg
Binary file not shown.
Binary file added assets/preload/music/editorMusic/4.ogg
Binary file not shown.
Binary file added assets/preload/sounds/click.ogg
Binary file not shown.
Binary file added assets/shared/sounds/FunnyVanish.ogg
Binary file not shown.
Binary file added assets/shared/sounds/addedNote.ogg
Binary file not shown.
Binary file added assets/shared/sounds/click.ogg
Binary file not shown.
Binary file added assets/shared/sounds/removeNote.ogg
Binary file not shown.
Binary file added assets/shared/sounds/selectNote.ogg
Binary file not shown.
2 changes: 1 addition & 1 deletion source/Character.hx
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ class Character extends FlxSprite
holdTimer += elapsed;
}

if (holdTimer >= Conductor.stepCrochet * (0.0011 / (FlxG.sound.music != null ? FlxG.sound.music.pitch : 1)) * singDuration * PlayState.instance.singDurMult)
if (holdTimer >= Conductor.stepCrochet * (0.0011 / (FlxG.sound.music != null ? FlxG.sound.music.pitch : 1)) * singDuration * (PlayState.instance != null ? PlayState.instance.singDurMult : 1))
{
dance();
holdTimer = 0;
Expand Down
1 change: 1 addition & 0 deletions source/PlayState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -2228,6 +2228,7 @@ class PlayState extends MusicBeatState
renderedTxt.setFormat(Paths.font("vcr.ttf"), 40, FlxColor.WHITE, CENTER, FlxTextBorderStyle.OUTLINE, FlxColor.BLACK);
renderedTxt.scrollFactor.set();
renderedTxt.borderSize = 1.25;
renderedTxt.cameras = [camHUD];
renderedTxt.visible = ClientPrefs.showRendered;

if (ClientPrefs.downScroll) renderedTxt.y = healthBar.y + 50;
Expand Down
2 changes: 1 addition & 1 deletion source/StrumNote.hx
Original file line number Diff line number Diff line change
Expand Up @@ -293,4 +293,4 @@ class StrumNote extends FlxSprite
!PlayState.opponentChart ? cast(this.shader, ColoredNoteShader).setColors(PlayState.instance.dad.healthColorArray[0], PlayState.instance.dad.healthColorArray[1], PlayState.instance.dad.healthColorArray[2]) : cast(this.shader, ColoredNoteShader).setColors(PlayState.instance.boyfriend.healthColorArray[0], PlayState.instance.boyfriend.healthColorArray[1], PlayState.instance.boyfriend.healthColorArray[2]);
}
}
}
}
20 changes: 18 additions & 2 deletions source/editors/CharacterEditorState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ using StringTools;
*/
class CharacterEditorState extends MusicBeatState
{
var music:EditingMusic;
var char:Character;
var ghostChar:Character;
var textAnim:FlxText;
Expand Down Expand Up @@ -79,8 +80,8 @@ class CharacterEditorState extends MusicBeatState
var healthBarBG:FlxSprite;

override function create()
{
//FlxG.sound.playMusic(Paths.music('breakfast'), 0.5);
{
music = new EditingMusic();

camEditor = new FlxCamera();
camHUD = new FlxCamera();
Expand Down Expand Up @@ -1272,6 +1273,7 @@ class CharacterEditorState extends MusicBeatState

override function update(elapsed:Float)
{
if (FlxG.mouse.justPressed) FlxG.sound.play(Paths.sound('click'));
MusicBeatState.camBeat = FlxG.camera;
if(char.animationsArray[curAnim] != null) {
textAnim.text = char.animationsArray[curAnim].anim;
Expand Down Expand Up @@ -1315,6 +1317,7 @@ class CharacterEditorState extends MusicBeatState
FlxG.sound.playMusic(Paths.music('freakyMenu-' + ClientPrefs.daMenuMusic));
}
FlxG.mouse.visible = false;
music.destroy();
return;
}

Expand Down Expand Up @@ -1506,4 +1509,17 @@ class CharacterEditorState extends MusicBeatState
var text:String = prefix + Clipboard.text.replace('\n', '');
return text;
}

override public function onFocusLost():Void
{
music.pauseMusic();

super.onFocusLost();
}
override public function onFocus():Void
{
music.unpauseMusic();

super.onFocus();
}
}
Loading

0 comments on commit 24bd57f

Please sign in to comment.