yooo fuckin linux game
This commit is contained in:
parent
7d5d0912b3
commit
46de02de95
@ -127,7 +127,7 @@
|
||||
<haxelib name="faxe" if='switch'/>
|
||||
<haxelib name="polymod"/>
|
||||
<haxelib name="discord_rpc" if="windows"/>
|
||||
<haxelib name="linc_luajit" if="windows"/>
|
||||
<haxelib name="linc_luajit"/>
|
||||
|
||||
<!-- <haxelib name="hxcpp-debug-server" if="desktop"/> -->
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
import openfl.display3D.textures.VideoTexture;
|
||||
import flixel.graphics.FlxGraphic;
|
||||
import flixel.graphics.frames.FlxAtlasFrames;
|
||||
#if windows
|
||||
#if cpp
|
||||
import flixel.tweens.FlxEase;
|
||||
import openfl.filters.ShaderFilter;
|
||||
import flixel.tweens.FlxTween;
|
||||
|
@ -69,10 +69,10 @@ import lime.utils.Assets;
|
||||
import openfl.display.BlendMode;
|
||||
import openfl.display.StageQuality;
|
||||
import openfl.filters.ShaderFilter;
|
||||
#if windows
|
||||
#if cpp
|
||||
import Discord.DiscordClient;
|
||||
#end
|
||||
#if windows
|
||||
#if cpp
|
||||
import Sys;
|
||||
import sys.FileSystem;
|
||||
#end
|
||||
@ -113,7 +113,7 @@ class PlayState extends MusicBeatState
|
||||
var songLength:Float = 0;
|
||||
var kadeEngineWatermark:FlxText;
|
||||
|
||||
#if windows
|
||||
#if cpp
|
||||
// Discord RPC variables
|
||||
var storyDifficultyText:String = "";
|
||||
var iconRPC:String = "";
|
||||
@ -197,8 +197,8 @@ class PlayState extends MusicBeatState
|
||||
|
||||
var notesHitArray:Array<Date> = [];
|
||||
var currentFrames:Int = 0;
|
||||
var idleToBeat:Bool = false; // change if bf and dad would idle to the beat of the song
|
||||
var idleBeat:Int = 4; // how frequently bf and dad would play their idle animation(1 - every beat, 2 - every 2 beats and so on)
|
||||
var idleToBeat:Bool = true; // change if bf and dad would idle to the beat of the song
|
||||
var idleBeat:Int = 2; // how frequently bf and dad would play their idle animation(1 - every beat, 2 - every 2 beats and so on)
|
||||
|
||||
public var dialogue:Array<String> = ['dad:blah blah blah', 'bf:coolswag'];
|
||||
|
||||
@ -329,7 +329,7 @@ class PlayState extends MusicBeatState
|
||||
|
||||
removedVideo = false;
|
||||
|
||||
#if windows
|
||||
#if cpp
|
||||
executeModchart = FileSystem.exists(Paths.lua(songLowercase + "/modchart"));
|
||||
if (isSM)
|
||||
executeModchart = FileSystem.exists(pathToSm + "/modchart.lua");
|
||||
@ -1394,7 +1394,7 @@ class PlayState extends MusicBeatState
|
||||
|
||||
var luaWiggles:Array<WiggleEffect> = [];
|
||||
|
||||
#if windows
|
||||
#if cpp
|
||||
public static var luaModchart:ModchartState = null;
|
||||
#end
|
||||
|
||||
@ -1408,7 +1408,7 @@ class PlayState extends MusicBeatState
|
||||
|
||||
|
||||
|
||||
#if windows
|
||||
#if cpp
|
||||
// pre lowercasing the song name (startCountdown)
|
||||
var songLowercase = StringTools.replace(PlayState.SONG.song, " ", "-").toLowerCase();
|
||||
switch (songLowercase)
|
||||
@ -1837,7 +1837,7 @@ class PlayState extends MusicBeatState
|
||||
var playerCounter:Int = 0;
|
||||
|
||||
// Per song offset check
|
||||
#if windows
|
||||
#if cpp
|
||||
// pre lowercasing the song name (generateSong)
|
||||
var songLowercase = StringTools.replace(PlayState.SONG.song, " ", "-").toLowerCase();
|
||||
switch (songLowercase)
|
||||
@ -2109,7 +2109,7 @@ class PlayState extends MusicBeatState
|
||||
vocals.pause();
|
||||
}
|
||||
|
||||
#if windows
|
||||
#if cpp
|
||||
DiscordClient.changePresence("PAUSED on "
|
||||
+ SONG.song
|
||||
+ " ("
|
||||
@ -2143,7 +2143,7 @@ class PlayState extends MusicBeatState
|
||||
startTimer.active = true;
|
||||
paused = false;
|
||||
|
||||
#if windows
|
||||
#if cpp
|
||||
if (startTimer.finished)
|
||||
{
|
||||
DiscordClient.changePresence(detailsText
|
||||
@ -2181,7 +2181,7 @@ class PlayState extends MusicBeatState
|
||||
vocals.time = Conductor.songPosition;
|
||||
vocals.play();
|
||||
|
||||
#if windows
|
||||
#if cpp
|
||||
DiscordClient.changePresence(detailsText
|
||||
+ " "
|
||||
+ SONG.song
|
||||
@ -2288,7 +2288,7 @@ class PlayState extends MusicBeatState
|
||||
}
|
||||
}
|
||||
|
||||
#if windows
|
||||
#if cpp
|
||||
if (executeModchart && luaModchart != null && songStarted)
|
||||
{
|
||||
luaModchart.setVar('songPos', Conductor.songPosition);
|
||||
@ -2429,7 +2429,7 @@ class PlayState extends MusicBeatState
|
||||
removedVideo = true;
|
||||
}
|
||||
cannotDie = true;
|
||||
#if windows
|
||||
#if cpp
|
||||
DiscordClient.changePresence("Chart Editor", null, null, true);
|
||||
#end
|
||||
|
||||
@ -2437,7 +2437,7 @@ class PlayState extends MusicBeatState
|
||||
clean();
|
||||
FlxG.stage.removeEventListener(KeyboardEvent.KEY_DOWN, handleInput);
|
||||
FlxG.stage.removeEventListener(KeyboardEvent.KEY_UP, releaseInput);
|
||||
#if windows
|
||||
#if cpp
|
||||
if (luaModchart != null)
|
||||
{
|
||||
luaModchart.die();
|
||||
@ -2491,7 +2491,7 @@ class PlayState extends MusicBeatState
|
||||
clean();
|
||||
FlxG.stage.removeEventListener(KeyboardEvent.KEY_DOWN, handleInput);
|
||||
FlxG.stage.removeEventListener(KeyboardEvent.KEY_UP, releaseInput);
|
||||
#if windows
|
||||
#if cpp
|
||||
if (luaModchart != null)
|
||||
{
|
||||
luaModchart.die();
|
||||
@ -2506,7 +2506,7 @@ class PlayState extends MusicBeatState
|
||||
clean();
|
||||
FlxG.stage.removeEventListener(KeyboardEvent.KEY_DOWN, handleInput);
|
||||
FlxG.stage.removeEventListener(KeyboardEvent.KEY_UP, releaseInput);
|
||||
#if windows
|
||||
#if cpp
|
||||
if (luaModchart != null)
|
||||
{
|
||||
luaModchart.die();
|
||||
@ -2709,7 +2709,7 @@ class PlayState extends MusicBeatState
|
||||
}
|
||||
}
|
||||
|
||||
#if windows
|
||||
#if cpp
|
||||
if (luaModchart != null)
|
||||
luaModchart.setVar("mustHit", PlayState.SONG.notes[Std.int(curStep / 16)].mustHitSection);
|
||||
#end
|
||||
@ -2718,7 +2718,7 @@ class PlayState extends MusicBeatState
|
||||
{
|
||||
var offsetX = 0;
|
||||
var offsetY = 0;
|
||||
#if windows
|
||||
#if cpp
|
||||
if (luaModchart != null)
|
||||
{
|
||||
offsetX = luaModchart.getVar("followXOffset", "float");
|
||||
@ -2726,7 +2726,7 @@ class PlayState extends MusicBeatState
|
||||
}
|
||||
#end
|
||||
camFollow.setPosition(dad.getMidpoint().x + 150 + offsetX, dad.getMidpoint().y - 100 + offsetY);
|
||||
#if windows
|
||||
#if cpp
|
||||
if (luaModchart != null)
|
||||
luaModchart.executeState('playerTwoTurn', []);
|
||||
#end
|
||||
@ -2746,7 +2746,7 @@ class PlayState extends MusicBeatState
|
||||
{
|
||||
var offsetX = 0;
|
||||
var offsetY = 0;
|
||||
#if windows
|
||||
#if cpp
|
||||
if (luaModchart != null)
|
||||
{
|
||||
offsetX = luaModchart.getVar("followXOffset", "float");
|
||||
@ -2755,7 +2755,7 @@ class PlayState extends MusicBeatState
|
||||
#end
|
||||
camFollow.setPosition(boyfriend.getMidpoint().x - 100 + offsetX, boyfriend.getMidpoint().y - 100 + offsetY);
|
||||
|
||||
#if windows
|
||||
#if cpp
|
||||
if (luaModchart != null)
|
||||
luaModchart.executeState('playerOneTurn', []);
|
||||
#end
|
||||
@ -2853,7 +2853,7 @@ class PlayState extends MusicBeatState
|
||||
|
||||
openSubState(new GameOverSubstate(boyfriend.getScreenPosition().x, boyfriend.getScreenPosition().y));
|
||||
|
||||
#if windows
|
||||
#if cpp
|
||||
// Game Over doesn't get his own variable because it's only used here
|
||||
DiscordClient.changePresence("GAME OVER -- "
|
||||
+ SONG.song
|
||||
@ -2889,7 +2889,7 @@ class PlayState extends MusicBeatState
|
||||
|
||||
openSubState(new GameOverSubstate(boyfriend.getScreenPosition().x, boyfriend.getScreenPosition().y));
|
||||
|
||||
#if windows
|
||||
#if cpp
|
||||
// Game Over doesn't get his own variable because it's only used here
|
||||
DiscordClient.changePresence("GAME OVER -- "
|
||||
+ SONG.song
|
||||
@ -3066,7 +3066,7 @@ class PlayState extends MusicBeatState
|
||||
});
|
||||
}
|
||||
|
||||
#if windows
|
||||
#if cpp
|
||||
if (luaModchart != null)
|
||||
luaModchart.executeState('playerTwoSing', [Math.abs(daNote.noteData), Conductor.songPosition]);
|
||||
#end
|
||||
@ -3101,7 +3101,7 @@ class PlayState extends MusicBeatState
|
||||
});
|
||||
}
|
||||
|
||||
#if windows
|
||||
#if cpp
|
||||
if (luaModchart != null)
|
||||
luaModchart.executeState('playerTwoSing', [Math.abs(daNote.noteData), Conductor.songPosition]);
|
||||
#end
|
||||
@ -3125,7 +3125,10 @@ class PlayState extends MusicBeatState
|
||||
if (!daNote.isSustainNote)
|
||||
daNote.modAngle = playerStrums.members[Math.floor(Math.abs(daNote.noteData))].angle;
|
||||
if (daNote.sustainActive)
|
||||
daNote.alpha = playerStrums.members[Math.floor(Math.abs(daNote.noteData))].alpha;
|
||||
{
|
||||
if (executeModchart)
|
||||
daNote.alpha = playerStrums.members[Math.floor(Math.abs(daNote.noteData))].alpha;
|
||||
}
|
||||
daNote.modAngle = playerStrums.members[Math.floor(Math.abs(daNote.noteData))].angle;
|
||||
}
|
||||
else if (!daNote.wasGoodHit && !daNote.modifiedByLua)
|
||||
@ -3135,7 +3138,10 @@ class PlayState extends MusicBeatState
|
||||
if (!daNote.isSustainNote)
|
||||
daNote.modAngle = strumLineNotes.members[Math.floor(Math.abs(daNote.noteData))].angle;
|
||||
if (daNote.sustainActive)
|
||||
daNote.alpha = strumLineNotes.members[Math.floor(Math.abs(daNote.noteData))].alpha;
|
||||
{
|
||||
if (executeModchart)
|
||||
daNote.alpha = playerStrums.members[Math.floor(Math.abs(daNote.noteData))].alpha;
|
||||
}
|
||||
daNote.modAngle = strumLineNotes.members[Math.floor(Math.abs(daNote.noteData))].angle;
|
||||
}
|
||||
|
||||
@ -3331,7 +3337,7 @@ class PlayState extends MusicBeatState
|
||||
if (FlxG.save.data.fpsCap > 290)
|
||||
(cast(Lib.current.getChildAt(0), Main)).setFPSCap(290);
|
||||
|
||||
#if windows
|
||||
#if cpp
|
||||
if (luaModchart != null)
|
||||
{
|
||||
luaModchart.die();
|
||||
@ -3409,7 +3415,7 @@ class PlayState extends MusicBeatState
|
||||
clean();
|
||||
}
|
||||
|
||||
#if windows
|
||||
#if cpp
|
||||
if (luaModchart != null)
|
||||
{
|
||||
luaModchart.die();
|
||||
@ -3820,7 +3826,7 @@ class PlayState extends MusicBeatState
|
||||
var pressArray:Array<Bool> = [controls.LEFT_P, controls.DOWN_P, controls.UP_P, controls.RIGHT_P];
|
||||
var releaseArray:Array<Bool> = [controls.LEFT_R, controls.DOWN_R, controls.UP_R, controls.RIGHT_R];
|
||||
var keynameArray:Array<String> = ['left', 'down', 'up', 'right'];
|
||||
#if windows
|
||||
#if cpp
|
||||
if (luaModchart != null)
|
||||
{
|
||||
for (i in 0...pressArray.length) {
|
||||
@ -4212,7 +4218,7 @@ class PlayState extends MusicBeatState
|
||||
// Hole switch statement replaced with a single line :)
|
||||
boyfriend.playAnim('sing' + dataSuffix[direction] + 'miss', true);
|
||||
|
||||
#if windows
|
||||
#if cpp
|
||||
if (luaModchart != null)
|
||||
luaModchart.executeState('playerOneMiss', [direction, Conductor.songPosition]);
|
||||
#end
|
||||
@ -4364,7 +4370,7 @@ class PlayState extends MusicBeatState
|
||||
|
||||
boyfriend.playAnim('sing' + dataSuffix[note.noteData] + altAnim, true);
|
||||
|
||||
#if windows
|
||||
#if cpp
|
||||
if (luaModchart != null)
|
||||
luaModchart.executeState('playerOneSing', [note.noteData, Conductor.songPosition]);
|
||||
#end
|
||||
@ -4517,7 +4523,7 @@ class PlayState extends MusicBeatState
|
||||
resyncVocals();
|
||||
}
|
||||
|
||||
#if windows
|
||||
#if cpp
|
||||
if (executeModchart && luaModchart != null)
|
||||
{
|
||||
luaModchart.setVar('curStep', curStep);
|
||||
@ -4563,7 +4569,7 @@ class PlayState extends MusicBeatState
|
||||
notes.sort(FlxSort.byY, (PlayStateChangeables.useDownscroll ? FlxSort.ASCENDING : FlxSort.DESCENDING));
|
||||
}
|
||||
|
||||
#if windows
|
||||
#if cpp
|
||||
if (executeModchart && luaModchart != null)
|
||||
{
|
||||
luaModchart.executeState('beatHit', [curBeat]);
|
||||
|
Loading…
x
Reference in New Issue
Block a user