Skip to content

Commit b33075c

Browse files
committed
e
1 parent 4eb72c3 commit b33075c

File tree

3 files changed

+49
-0
lines changed

3 files changed

+49
-0
lines changed

source/Main.hx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -871,6 +871,15 @@ class CommandPrompt
871871
case "aprilFools":
872872
yutautil.AprilFools.debug = true;
873873
print("April Fools debug mode enabled.");
874+
case "flip":
875+
{
876+
var flip = !backend.MusicBeatState.APFlip;
877+
var targetAngle = flip ? 180 : 0;
878+
FlxTween.tween(FlxG.camera, {angle: targetAngle}, 0.5, {
879+
ease: FlxEase.quadOut
880+
});
881+
backend.MusicBeatState.APFlip = flip;
882+
}
874883
default:
875884
print("Error: Unknown debug argument.");
876885
}

source/backend/MusicBeatState.hx

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ class MusicBeatState extends FlxState
1313
private var curStep:Int = 0;
1414
private var curBeat:Int = 0;
1515

16+
public static var APFlip:Bool = false;
17+
1618
private var curDecStep:Float = 0;
1719
private var curDecBeat:Float = 0;
1820

@@ -111,6 +113,27 @@ class MusicBeatState extends FlxState
111113
playErrorSound = false;
112114
FlxG.sound.play(Paths.sound('error'), 1, false);
113115
}
116+
if (APFlip || (yutautil.AprilFools.allowAF && FlxG.random.bool()))
117+
{
118+
FlxTween.tween(FlxG.camera, {angle: 180}, 0.5, {
119+
ease: FlxEase.quadOut,
120+
onComplete: function(tween:FlxTween)
121+
{
122+
if (this is PlayState)
123+
{
124+
FlxTween.tween(PlayState.instance.camHUD, {angle: -180}, 0.5, {
125+
ease: FlxEase.quadOut,
126+
onComplete: function(tween:FlxTween)
127+
{
128+
FlxTween.tween(PlayState.instance.camOther, {angle: 180}, 0.5, {
129+
ease: FlxEase.quadOut
130+
});
131+
}
132+
});
133+
}
134+
}
135+
});
136+
}
114137
}
115138

116139
public static var firstRun:Bool = true;

source/options/ArchipelagoSettingsSubState.hx

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,23 @@ class ArchipelagoSettingsSubState extends BaseOptionsMenu
2626
};
2727
addOption(option);
2828

29+
var flip:Option = new Option('Flip Screen',
30+
"if checked, the screen will be flipped upside down.\nWARNING: THIS MAY CAUSE ISSUES WITH THE GAME.",
31+
'flipScreen',
32+
BOOL);
33+
flip.onChange = function()
34+
{
35+
if (archipelago.APEntryState.inArchipelagoMode)
36+
{
37+
var targetAngle = flip.getValue() ? 180 : 0;
38+
FlxTween.tween(FlxG.camera, {angle: targetAngle}, 0.5, {
39+
ease: FlxEase.quadOut
40+
});
41+
backend.MusicBeatState.APFlip = flip.getValue();
42+
}
43+
};
44+
addOption(flip);
45+
2946
super();
3047
}
3148

0 commit comments

Comments
 (0)