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