Skip to content

Commit

Permalink
fix video cutscenes
Browse files Browse the repository at this point in the history
  • Loading branch information
Vortex2Oblivion committed Sep 2, 2024
1 parent 9759410 commit 32c5686
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
4 changes: 2 additions & 2 deletions source/game/Note.hx
Original file line number Diff line number Diff line change
Expand Up @@ -126,13 +126,13 @@ class Note extends FlxSkewedSprite {
if (Assets.exists(Paths.image('ui skins/' + song.ui_Skin + "/arrows/" + arrow_Type, 'shared'))) {
frames = Paths.getSparrowAtlas('ui skins/' + song.ui_Skin + "/arrows/" + arrow_Type, 'shared');
} else {
frames = Paths.getSparrowAtlas('ui skins/default/arrows/default', 'shared');
frames = Paths.getSparrowAtlas('ui skins/${song.ui_Skin}/arrows/default', 'shared');
}
} else {
if (Assets.exists(Paths.image("ui skins/default/arrows/" + arrow_Type, 'shared'))) {
frames = Paths.getSparrowAtlas("ui skins/default/arrows/" + arrow_Type, 'shared');
} else {
frames = Paths.getSparrowAtlas("ui skins/default/arrows/default", 'shared');
frames = Paths.getSparrowAtlas('ui skins/${song.ui_Skin}/arrows/default', 'shared');
}
}

Expand Down
6 changes: 1 addition & 5 deletions source/game/StrumNote.hx
Original file line number Diff line number Diff line change
Expand Up @@ -110,12 +110,8 @@ class StrumNote extends FlxSkewedSprite {
colorSwap.b = noteColor[2];
}

offset.x = frameWidth / 2;
offset.y = frameHeight / 2;

var scale:Float = Std.parseFloat(ui_settings[0]) * (Std.parseFloat(ui_settings[2]) - (Std.parseFloat(mania_size[keyCount - 1])));

offset.x -= 156 * scale / 2;
offset.y -= 156 * scale / 2;
centerOffsets();
}
}
7 changes: 5 additions & 2 deletions source/states/PlayState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -1232,13 +1232,16 @@ class PlayState extends MusicBeatState {
var video_handler:FlxVideo = new FlxVideo();

video_handler.onEndReached.add(function() {
video_handler.dispose();
FlxG.removeChild(video_handler);
bruhDialogue(endSongVar);
return;
}, true);
video_handler.onEndReached.add(video_handler.dispose);
video_handler.load(PolymodAssets.getPath(Paths.video(name, ext)));
if (video_handler.load(PolymodAssets.getPath(Paths.video(name, ext))))
FlxTimer.wait(0.001, () -> video_handler.play());
video_handler.play();
video_handler.mute = false;
FlxG.addChildBelowMouse(video_handler);
#else
bruhDialogue(endSongVar);
trace("Videos aren't supported on this platform!", ERROR);
Expand Down

0 comments on commit 32c5686

Please sign in to comment.