Skip to content

Commit 9a48fc0

Browse files
author
Lily
committed
Merge remote-tracking branch 'origin/main' into mobile
2 parents 8a292b3 + 6ca660f commit 9a48fc0

File tree

3 files changed

+72
-73
lines changed

3 files changed

+72
-73
lines changed

assets/videos/haxe.mp4

151 KB
Binary file not shown.

source/PlayState.hx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2853,10 +2853,10 @@ class PlayState extends MusicBeatState
28532853
{
28542854
case 0:
28552855
var boyfriendToGrab:Boyfriend = boyfriendMap.get(charChangeNames[0]);
2856-
if (boyfriendToGrab != null) bfNoteskin = boyfriendToGrab.noteskin;
2856+
if (boyfriendToGrab != null && boyfriendToGrab.noteskin.length > 0) bfNoteskin = boyfriendToGrab.noteskin;
28572857
case 1:
28582858
var dadToGrab:Character = dadMap.get(charChangeNames[0]);
2859-
if (dadToGrab != null) dadNoteskin = dadToGrab.noteskin;
2859+
if (dadToGrab != null && dadToGrab.noteskin.length > 0) dadNoteskin = dadToGrab.noteskin;
28602860
}
28612861
charChangeTimes.shift();
28622862
charChangeNames.shift();
@@ -4493,7 +4493,7 @@ class PlayState extends MusicBeatState
44934493
if (ClientPrefs.bfIconStyle == "SB Engine") iconP1.changeIcon('bfsb');
44944494
if (ClientPrefs.bfIconStyle == "OS 'Engine'") iconP1.changeIcon('bfos');
44954495
}
4496-
bfNoteskin = boyfriend.noteskin;
4496+
if (boyfriend.noteskin.length > 0) bfNoteskin = boyfriend.noteskin;
44974497
}
44984498
setOnLuas('boyfriendName', boyfriend.curCharacter);
44994499

@@ -4527,7 +4527,7 @@ class PlayState extends MusicBeatState
45274527
}
45284528
if (dadAnim != '') dad.playAnim(dadAnim, true);
45294529
}
4530-
dadNoteskin = dad.noteskin;
4530+
if (dad.noteskin.length > 0) dadNoteskin = dad.noteskin;
45314531
setOnLuas('dadName', dad.curCharacter);
45324532

45334533
case 2:
@@ -5797,7 +5797,7 @@ class PlayState extends MusicBeatState
57975797
camHUD.shake(playerChar.shakeIntensity / 2, playerChar.shakeDuration / playbackRate);
57985798
}
57995799
note.wasGoodHit = true;
5800-
if (ClientPrefs.noteSplashes && note.isSustainNote && splashesPerFrame[3] <= 4) spawnHoldSplashOnNote(note);
5800+
if (!ClientPrefs.lessBotLag && ClientPrefs.noteSplashes && note.isSustainNote && splashesPerFrame[3] <= 4) spawnHoldSplashOnNote(note);
58015801
if (SONG.needsVoices && !ffmpegMode)
58025802
if (opponentChart && opponentVocals != null && opponentVocals.volume != 1) opponentVocals.volume = 1;
58035803
else if (!opponentChart && vocals.volume != 1 || vocals.volume != 1) vocals.volume = 1;

source/StartupState.hx

Lines changed: 67 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -46,80 +46,79 @@ class StartupState extends MusicBeatState
4646
FlxTween.tween(skipTxt, {alpha: 1}, 1);
4747

4848
new FlxTimer().start(0.1, function(tmr:FlxTimer) {
49-
switch (theIntro) {
50-
case 0:
51-
FlxG.sound.play(Paths.sound('startup', 'splash'));
52-
logo.scale.set(0.1,0.1);
53-
logo.updateHitbox();
54-
logo.screenCenter();
55-
FlxTween.tween(logo, {alpha: 1, "scale.x": 1, "scale.y": 1}, 0.95, {ease: FlxEase.expoOut, onComplete: _ -> onIntroDone()});
56-
case 1:
57-
FlxG.sound.play(Paths.sound('startup', 'splash'));
58-
FlxG.sound.play(Paths.sound('FIREINTHEHOLE', 'splash'));
59-
logo.loadGraphic(Paths.image('lobotomy', 'splash'));
60-
logo.scale.set(0.1,0.1);
61-
logo.updateHitbox();
62-
logo.screenCenter();
63-
FlxTween.tween(logo, {alpha: 1, "scale.x": 1, "scale.y": 1}, 1.35, {ease: FlxEase.expoOut, onComplete: _ -> onIntroDone()});
64-
case 2:
65-
FlxG.sound.play(Paths.sound('screwedEngine', 'splash'));
66-
logo.loadGraphic(Paths.image('ScrewedLogo', 'splash'));
67-
logo.scale.set(0.1,0.1);
68-
logo.updateHitbox();
69-
logo.screenCenter();
70-
FlxTween.tween(logo, {alpha: 1, "scale.x": 1, "scale.y": 1}, 1.35, {ease: FlxEase.expoOut, onComplete: _ -> onIntroDone(0.6)});
71-
case 3:
72-
// secret muaahahhahhahaahha
73-
FlxG.sound.play(Paths.sound('tada', 'splash'));
74-
logo.loadGraphic(Paths.image('JavaScriptLogo', 'splash'));
75-
logo.scale.set(0.1,0.1);
76-
logo.updateHitbox();
77-
logo.screenCenter();
78-
FlxTween.tween(logo, {alpha: 1, "scale.x": 1, "scale.y": 1}, 1.35, {ease: FlxEase.expoOut, onComplete: _ -> onIntroDone(0.6)});
79-
case 4:
80-
#if VIDEOS_ALLOWED
81-
var vidSprite = new MP4Handler(); // it plays but it doesn't show???
82-
#if (hxCodec < "3.0.0")
83-
vidSprite.playVideo(Paths.video('bambiStartup'), false, false);
84-
vidSprite.finishCallback = function()
85-
{
86-
try { vidSprite.dispose(); }
87-
catch (e) {}
88-
FlxG.switchState(TitleState.new);
89-
};
90-
#else
91-
vidSprite.play(Paths.video('bambiStartup'));
92-
vidSprite.onEndReached.add(function(){
93-
vidSprite.dispose();
94-
FlxG.switchState(TitleState.new);
95-
});
96-
#end
97-
#end
98-
case 5:
99-
#if VIDEOS_ALLOWED
100-
var vidSprite = new MP4Handler(); // it plays but it doesn't show???
101-
#if (hxCodec < "3.0.0")
102-
vidSprite.playVideo(Paths.video('broCopiedDenpa'), false, false);
103-
vidSprite.finishCallback = function()
104-
{
105-
try { vidSprite.dispose(); }
106-
catch (e) {}
107-
FlxG.switchState(TitleState.new);
108-
};
109-
#else
110-
vidSprite.play(Paths.video('broCopiedDenpa'));
111-
vidSprite.onEndReached.add(function(){
112-
vidSprite.dispose();
113-
FlxG.switchState(TitleState.new);
114-
});
115-
#end
116-
#end
49+
if (!FlxG.random.bool(0.1)){
50+
switch (theIntro) {
51+
case 0:
52+
FlxG.sound.play(Paths.sound('startup', 'splash'));
53+
logo.scale.set(0.1,0.1);
54+
logo.updateHitbox();
55+
logo.screenCenter();
56+
FlxTween.tween(logo, {alpha: 1, "scale.x": 1, "scale.y": 1}, 0.95, {ease: FlxEase.expoOut, onComplete: _ -> onIntroDone()});
57+
case 1:
58+
FlxG.sound.play(Paths.sound('startup', 'splash'));
59+
FlxG.sound.play(Paths.sound('FIREINTHEHOLE', 'splash'));
60+
logo.loadGraphic(Paths.image('lobotomy', 'splash'));
61+
logo.scale.set(0.1,0.1);
62+
logo.updateHitbox();
63+
logo.screenCenter();
64+
FlxTween.tween(logo, {alpha: 1, "scale.x": 1, "scale.y": 1}, 1.35, {ease: FlxEase.expoOut, onComplete: _ -> onIntroDone()});
65+
case 2:
66+
FlxG.sound.play(Paths.sound('screwedEngine', 'splash'));
67+
logo.loadGraphic(Paths.image('ScrewedLogo', 'splash'));
68+
logo.scale.set(0.1,0.1);
69+
logo.updateHitbox();
70+
logo.screenCenter();
71+
FlxTween.tween(logo, {alpha: 1, "scale.x": 1, "scale.y": 1}, 1.35, {ease: FlxEase.expoOut, onComplete: _ -> onIntroDone(0.6)});
72+
case 3:
73+
// secret muaahahhahhahaahha
74+
FlxG.sound.play(Paths.sound('tada', 'splash'));
75+
logo.loadGraphic(Paths.image('JavaScriptLogo', 'splash'));
76+
logo.scale.set(0.1,0.1);
77+
logo.updateHitbox();
78+
logo.screenCenter();
79+
FlxTween.tween(logo, {alpha: 1, "scale.x": 1, "scale.y": 1}, 1.35, {ease: FlxEase.expoOut, onComplete: _ -> onIntroDone(0.6)});
80+
case 4:
81+
playVideo('bambiStartup');
82+
case 5:
83+
playVideo('broCopiedDenpa');
84+
}
11785
}
86+
else
87+
playVideo('haxe'); // Lily wanted this
11888
});
11989

12090
super.create();
12191
}
12292

93+
// shorter & cleaner code = better :3
94+
private function playVideo(name:String, ?callback:Void->Void):Void
95+
{
96+
#if VIDEOS_ALLOWED
97+
var vidSprite = new MP4Handler(); // it plays but it doesn't show???
98+
#if (hxCodec < "3.0.0")
99+
vidSprite.playVideo(Paths.video(name), false, false);
100+
vidSprite.finishCallback = function()
101+
{
102+
try { vidSprite.dispose(); }
103+
catch (e) {}
104+
if (callback != null)
105+
callback();
106+
else
107+
FlxG.switchState(TitleState.new);
108+
};
109+
#else
110+
vidSprite.play(Paths.video(name));
111+
vidSprite.onEndReached.add(function(){
112+
vidSprite.dispose();
113+
if (callback != null)
114+
callback();
115+
else
116+
FlxG.switchState(TitleState.new);
117+
});
118+
#end
119+
#end
120+
}
121+
123122
function onIntroDone(?fadeDelay:Float = 0) {
124123
FlxTween.tween(logo, {alpha: 0}, 1, {
125124
startDelay: fadeDelay,

0 commit comments

Comments
 (0)