Merge branch 'master' of https://github.com/KadeDev/Kade-Engine
This commit is contained in:
commit
15b3278514
@ -1,2 +1,2 @@
|
||||
### RELOCATED
|
||||
Relocated to [here](https://github.com/KadeDev/Kade-Engine/wiki/)
|
||||
Relocated to [here](https://github.com/KadeDev/Kade-Engine/wiki/)
|
||||
|
@ -202,27 +202,20 @@ class FreeplayState extends MusicBeatState
|
||||
|
||||
if (accepted)
|
||||
{
|
||||
// pre lowercasing the song name (update)
|
||||
var songLowercase = StringTools.replace(songs[curSelected].songName, " ", "-").toLowerCase();
|
||||
switch (songLowercase) {
|
||||
case 'dad-battle': songLowercase = 'dadbattle';
|
||||
case 'philly-nice': songLowercase = 'philly';
|
||||
}
|
||||
// adjusting the highscore song name to be compatible (update)
|
||||
// would read original scores if we didn't change packages
|
||||
var songHighscore = StringTools.replace(songs[curSelected].songName, " ", "-");
|
||||
switch (songHighscore) {
|
||||
case 'Dad-Battle': songHighscore = 'Dadbattle';
|
||||
case 'Philly-Nice': songHighscore = 'Philly';
|
||||
// adjusting the song name to be compatible
|
||||
var songFormat = StringTools.replace(songs[curSelected].songName, " ", "-");
|
||||
switch (songFormat) {
|
||||
case 'Dad-Battle': songFormat = 'Dadbattle';
|
||||
case 'Philly-Nice': songFormat = 'Philly';
|
||||
}
|
||||
|
||||
trace(songLowercase);
|
||||
trace(songs[curSelected].songName);
|
||||
|
||||
var poop:String = Highscore.formatSong(songHighscore, curDifficulty);
|
||||
var poop:String = Highscore.formatSong(songFormat, curDifficulty);
|
||||
|
||||
trace(poop);
|
||||
|
||||
PlayState.SONG = Song.loadFromJson(poop, songLowercase);
|
||||
PlayState.SONG = Song.loadFromJson(poop, songs[curSelected].songName);
|
||||
PlayState.isStoryMode = false;
|
||||
PlayState.storyDifficulty = curDifficulty;
|
||||
PlayState.storyWeek = songs[curSelected].week;
|
||||
|
@ -81,6 +81,9 @@ class KadeEngineData
|
||||
if (FlxG.save.data.customStrumLine == null)
|
||||
FlxG.save.data.customStrumLine = 0;
|
||||
|
||||
if (FlxG.save.data.camzoom == null)
|
||||
FlxG.save.data.camzoom = true;
|
||||
|
||||
Conductor.recalculateTimings();
|
||||
PlayerSettings.player1.controls.loadKeyBinds();
|
||||
KeyBinds.keyCheck();
|
||||
|
@ -80,7 +80,7 @@ class LoadReplayState extends MusicBeatState
|
||||
}
|
||||
|
||||
|
||||
versionShit = new FlxText(5, FlxG.height - 34, 0, "Replay Loader (ESCAPE TO GO BACK)\nNOTICE!!!! Replays are in a beta stage, and they are probably not 100% correct. expect misses and other stuff that isn't there!", 12);
|
||||
versionShit = new FlxText(5, FlxG.height - 34, 0, "Replay Loader (ESCAPE TO GO BACK)\nNOTICE!!!! Replays are in a beta stage, and they are probably not 100% correct. expect misses and other stuff that isn't there!\n", 12);
|
||||
versionShit.scrollFactor.set();
|
||||
versionShit.setFormat("VCR OSD Mono", 16, FlxColor.WHITE, LEFT, FlxTextBorderStyle.OUTLINE, FlxColor.BLACK);
|
||||
add(versionShit);
|
||||
@ -102,7 +102,7 @@ class LoadReplayState extends MusicBeatState
|
||||
for (i in 0...songs.length)
|
||||
{
|
||||
var pog:FreeplayState.SongMetadata = songs[i];
|
||||
if (pog.songName.toLowerCase() == songName)
|
||||
if (pog.songName == songName)
|
||||
week = pog.week;
|
||||
}
|
||||
return week;
|
||||
@ -148,9 +148,19 @@ class LoadReplayState extends MusicBeatState
|
||||
|
||||
PlayState.loadRep = true;
|
||||
|
||||
var poop:String = Highscore.formatSong(PlayState.rep.replay.songName.toLowerCase(), PlayState.rep.replay.songDiff);
|
||||
// adjusting the song name to be compatible
|
||||
var songFormat = StringTools.replace(PlayState.rep.replay.songName, " ", "-");
|
||||
switch (songFormat) {
|
||||
case 'Dad-Battle': songFormat = 'Dadbattle';
|
||||
case 'Philly-Nice': songFormat = 'Philly';
|
||||
// Replay v1.0 support
|
||||
case 'dad-battle': songFormat = 'Dadbattle';
|
||||
case 'philly-nice': songFormat = 'Philly';
|
||||
}
|
||||
|
||||
PlayState.SONG = Song.loadFromJson(poop, PlayState.rep.replay.songName.toLowerCase());
|
||||
var poop:String = Highscore.formatSong(songFormat, PlayState.rep.replay.songDiff);
|
||||
|
||||
PlayState.SONG = Song.loadFromJson(poop, PlayState.rep.replay.songName);
|
||||
PlayState.isStoryMode = false;
|
||||
PlayState.storyDifficulty = PlayState.rep.replay.songDiff;
|
||||
PlayState.storyWeek = getWeekNumbFromSong(PlayState.rep.replay.songName);
|
||||
@ -177,7 +187,7 @@ class LoadReplayState extends MusicBeatState
|
||||
|
||||
var rep:Replay = Replay.LoadReplay(actualNames[curSelected]);
|
||||
|
||||
poggerDetails.text = "Replay Details - \nDate Created: " + rep.replay.timestamp + "\nSong: " + rep.replay.songName + "\nReplay Version: " + (rep.replay.replayGameVer != Replay.version ? "OUTDATED" : "Latest");
|
||||
poggerDetails.text = "Replay Details - \nDate Created: " + rep.replay.timestamp + "\nSong: " + rep.replay.songName + "\nReplay Version: " + rep.replay.replayGameVer + ' (' + (rep.replay.replayGameVer != Replay.version ? "OUTDATED but still usable" : "Latest") + ')\n';
|
||||
|
||||
// selector.y = (70 * curSelected) + 30;
|
||||
|
||||
|
@ -256,11 +256,18 @@ class ModchartState
|
||||
function makeAnimatedLuaSprite(spritePath:String,names:Array<String>,prefixes:Array<String>,startAnim:String, id:String)
|
||||
{
|
||||
#if sys
|
||||
var data:BitmapData = BitmapData.fromFile(Sys.getCwd() + "assets/data/" + PlayState.SONG.song.toLowerCase() + '/' + spritePath + ".png");
|
||||
// pre lowercasing the song name (makeAnimatedLuaSprite)
|
||||
var songLowercase = StringTools.replace(PlayState.SONG.song, " ", "-").toLowerCase();
|
||||
switch (songLowercase) {
|
||||
case 'dad-battle': songLowercase = 'dadbattle';
|
||||
case 'philly-nice': songLowercase = 'philly';
|
||||
}
|
||||
|
||||
var data:BitmapData = BitmapData.fromFile(Sys.getCwd() + "assets/data/" + songLowercase + '/' + spritePath + ".png");
|
||||
|
||||
var sprite:FlxSprite = new FlxSprite(0,0);
|
||||
|
||||
sprite.frames = FlxAtlasFrames.fromSparrow(FlxGraphic.fromBitmapData(data), Sys.getCwd() + "assets/data/" + PlayState.SONG.song.toLowerCase() + "/" + spritePath + ".xml");
|
||||
sprite.frames = FlxAtlasFrames.fromSparrow(FlxGraphic.fromBitmapData(data), Sys.getCwd() + "assets/data/" + songLowercase + "/" + spritePath + ".xml");
|
||||
|
||||
trace(sprite.frames.frames.length);
|
||||
|
||||
@ -283,7 +290,14 @@ class ModchartState
|
||||
function makeLuaSprite(spritePath:String,toBeCalled:String, drawBehind:Bool)
|
||||
{
|
||||
#if sys
|
||||
var data:BitmapData = BitmapData.fromFile(Sys.getCwd() + "assets/data/" + PlayState.SONG.song.toLowerCase() + '/' + spritePath + ".png");
|
||||
// pre lowercasing the song name (makeLuaSprite)
|
||||
var songLowercase = StringTools.replace(PlayState.SONG.song, " ", "-").toLowerCase();
|
||||
switch (songLowercase) {
|
||||
case 'dad-battle': songLowercase = 'dadbattle';
|
||||
case 'philly-nice': songLowercase = 'philly';
|
||||
}
|
||||
|
||||
var data:BitmapData = BitmapData.fromFile(Sys.getCwd() + "assets/data/" + songLowercase + '/' + spritePath + ".png");
|
||||
|
||||
var sprite:FlxSprite = new FlxSprite(0,0);
|
||||
var imgWidth:Float = FlxG.width / data.width;
|
||||
@ -346,7 +360,14 @@ class ModchartState
|
||||
|
||||
//shaders = new Array<LuaShader>();
|
||||
|
||||
var result = LuaL.dofile(lua, Paths.lua(PlayState.SONG.song.toLowerCase() + "/modchart")); // execute le file
|
||||
// pre lowercasing the song name (new)
|
||||
var songLowercase = StringTools.replace(PlayState.SONG.song, " ", "-").toLowerCase();
|
||||
switch (songLowercase) {
|
||||
case 'dad-battle': songLowercase = 'dadbattle';
|
||||
case 'philly-nice': songLowercase = 'philly';
|
||||
}
|
||||
|
||||
var result = LuaL.dofile(lua, Paths.lua(songLowercase + "/modchart")); // execute le file
|
||||
|
||||
if (result != 0)
|
||||
{
|
||||
@ -362,6 +383,8 @@ class ModchartState
|
||||
setVar("scrollspeed", FlxG.save.data.scrollSpeed != 1 ? FlxG.save.data.scrollSpeed : PlayState.SONG.speed);
|
||||
setVar("fpsCap", FlxG.save.data.fpsCap);
|
||||
setVar("downscroll", FlxG.save.data.downscroll);
|
||||
setVar("flashing", FlxG.save.data.flashing);
|
||||
setVar("distractions", FlxG.save.data.distractions);
|
||||
|
||||
setVar("curStep", 0);
|
||||
setVar("curBeat", 0);
|
||||
|
@ -59,7 +59,14 @@ class Note extends FlxSprite
|
||||
|
||||
var daStage:String = PlayState.curStage;
|
||||
|
||||
switch (PlayState.SONG.noteStyle)
|
||||
//defaults if no noteStyle was found in chart
|
||||
var noteTypeCheck:String = 'normal';
|
||||
|
||||
if (PlayState.SONG.noteStyle == null) {
|
||||
switch(PlayState.storyWeek) {case 6: noteTypeCheck = 'pixel';}
|
||||
} else {noteTypeCheck = PlayState.SONG.noteStyle;}
|
||||
|
||||
switch (noteTypeCheck)
|
||||
{
|
||||
case 'pixel':
|
||||
loadGraphic(Paths.image('weeb/pixelUI/arrows-pixels','week6'), true, 17, 17);
|
||||
|
@ -614,3 +614,23 @@ class BotPlay extends Option
|
||||
private override function updateDisplay():String
|
||||
return "BotPlay " + (FlxG.save.data.botplay ? "on" : "off");
|
||||
}
|
||||
|
||||
class CamZoomOption extends Option
|
||||
{
|
||||
public function new(desc:String)
|
||||
{
|
||||
super();
|
||||
description = desc;
|
||||
}
|
||||
public override function press():Bool
|
||||
{
|
||||
FlxG.save.data.camzoom = !FlxG.save.data.camzoom;
|
||||
display = updateDisplay();
|
||||
return true;
|
||||
}
|
||||
|
||||
private override function updateDisplay():String
|
||||
{
|
||||
return "Camera Zoom " + (!FlxG.save.data.camzoom ? "off" : "on");
|
||||
}
|
||||
}
|
||||
|
@ -39,15 +39,14 @@ class OptionsMenu extends MusicBeatState
|
||||
new CustomizeGameplay("Drag'n'Drop Gameplay Modules around to your preference")
|
||||
]),
|
||||
new OptionCategory("Appearance", [
|
||||
#if desktop
|
||||
new DistractionsAndEffectsOption("Toggle stage distractions that can hinder your gameplay."),
|
||||
new CamZoomOption("Toggle the camera zoom in-game."),
|
||||
#if desktop
|
||||
new RainbowFPSOption("Make the FPS Counter Rainbow"),
|
||||
new AccuracyOption("Display accuracy information."),
|
||||
new NPSDisplayOption("Shows your current Notes Per Second."),
|
||||
new SongPositionOption("Show the songs current position (as a bar)"),
|
||||
new CpuStrums("CPU's strumline lights up when a note hits it."),
|
||||
#else
|
||||
new DistractionsAndEffectsOption("Toggle stage distractions that can hinder your gameplay.")
|
||||
#end
|
||||
]),
|
||||
|
||||
|
@ -104,7 +104,14 @@ class PauseSubState extends MusicBeatSubstate
|
||||
var rightP = controls.RIGHT_P;
|
||||
var accepted = controls.ACCEPT;
|
||||
var oldOffset:Float = 0;
|
||||
var songPath = 'assets/data/' + PlayState.SONG.song.toLowerCase() + '/';
|
||||
|
||||
// pre lowercasing the song name (update)
|
||||
var songLowercase = StringTools.replace(PlayState.SONG.song, " ", "-").toLowerCase();
|
||||
switch (songLowercase) {
|
||||
case 'dad-battle': songLowercase = 'dadbattle';
|
||||
case 'philly-nice': songLowercase = 'philly';
|
||||
}
|
||||
var songPath = 'assets/data/' + songLowercase + '/';
|
||||
|
||||
if (upP)
|
||||
{
|
||||
|
@ -239,10 +239,10 @@ class PlayState extends MusicBeatState
|
||||
|
||||
// pre lowercasing the song name (create)
|
||||
var songLowercase = StringTools.replace(PlayState.SONG.song, " ", "-").toLowerCase();
|
||||
switch (songLowercase) {
|
||||
case 'dad-battle': songLowercase = 'dadbattle';
|
||||
case 'philly-nice': songLowercase = 'philly';
|
||||
}
|
||||
switch (songLowercase) {
|
||||
case 'dad-battle': songLowercase = 'dadbattle';
|
||||
case 'philly-nice': songLowercase = 'philly';
|
||||
}
|
||||
|
||||
#if windows
|
||||
executeModchart = FileSystem.exists(Paths.lua(songLowercase + "/modchart"));
|
||||
@ -310,7 +310,7 @@ class PlayState extends MusicBeatState
|
||||
persistentDraw = true;
|
||||
|
||||
if (SONG == null)
|
||||
SONG = Song.loadFromJson('tutorial');
|
||||
SONG = Song.loadFromJson('tutorial', 'tutorial');
|
||||
|
||||
Conductor.mapBPMChanges(SONG);
|
||||
Conductor.changeBPM(SONG.bpm);
|
||||
@ -345,7 +345,22 @@ class PlayState extends MusicBeatState
|
||||
dialogue = CoolUtil.coolTextFile(Paths.txt('thorns/thornsDialogue'));
|
||||
}
|
||||
|
||||
switch(SONG.stage)
|
||||
//defaults if no stage was found in chart
|
||||
var stageCheck:String = 'stage';
|
||||
|
||||
if (SONG.stage == null) {
|
||||
switch(storyWeek)
|
||||
{
|
||||
case 2: stageCheck = 'halloween';
|
||||
case 3: stageCheck = 'philly';
|
||||
case 4: stageCheck = 'limo';
|
||||
case 5: if (songLowercase == 'winter-horrorland') {stageCheck = 'mallEvil';} else {stageCheck = 'mall';}
|
||||
case 6: if (songLowercase == 'thorns') {stageCheck = 'schoolEvil';} else {stageCheck = 'school';}
|
||||
//i should check if its stage (but this is when none is found in chart anyway)
|
||||
}
|
||||
} else {stageCheck = SONG.stage;}
|
||||
|
||||
switch(stageCheck)
|
||||
{
|
||||
case 'halloween':
|
||||
{
|
||||
@ -724,21 +739,33 @@ class PlayState extends MusicBeatState
|
||||
add(stageCurtains);
|
||||
}
|
||||
}
|
||||
var gfVersion:String = 'gf';
|
||||
|
||||
switch (SONG.gfVersion)
|
||||
//defaults if no gf was found in chart
|
||||
var gfCheck:String = 'gf';
|
||||
|
||||
if (SONG.gfVersion == null) {
|
||||
switch(storyWeek)
|
||||
{
|
||||
case 4: gfCheck = 'gf-car';
|
||||
case 5: gfCheck = 'gf-christmas';
|
||||
case 6: gfCheck = 'gf-pixel';
|
||||
}
|
||||
} else {gfCheck = SONG.gfVersion;}
|
||||
|
||||
var curGf:String = '';
|
||||
switch (gfCheck)
|
||||
{
|
||||
case 'gf-car':
|
||||
gfVersion = 'gf-car';
|
||||
curGf = 'gf-car';
|
||||
case 'gf-christmas':
|
||||
gfVersion = 'gf-christmas';
|
||||
curGf = 'gf-christmas';
|
||||
case 'gf-pixel':
|
||||
gfVersion = 'gf-pixel';
|
||||
curGf = 'gf-pixel';
|
||||
default:
|
||||
gfVersion = 'gf';
|
||||
curGf = 'gf';
|
||||
}
|
||||
|
||||
gf = new Character(400, 130, gfVersion);
|
||||
gf = new Character(400, 130, curGf);
|
||||
gf.scrollFactor.set(0.95, 0.95);
|
||||
|
||||
dad = new Character(100, 100, SONG.player2);
|
||||
@ -1079,17 +1106,11 @@ class PlayState extends MusicBeatState
|
||||
senpaiEvil.updateHitbox();
|
||||
senpaiEvil.screenCenter();
|
||||
|
||||
// pre lowercasing the song name (schoolIntro)
|
||||
var songLowercase = StringTools.replace(PlayState.SONG.song, " ", "-").toLowerCase();
|
||||
switch (songLowercase) {
|
||||
case 'dad-battle': songLowercase = 'dadbattle';
|
||||
case 'philly-nice': songLowercase = 'philly';
|
||||
}
|
||||
if (songLowercase == 'roses' || songLowercase == 'thorns')
|
||||
if (StringTools.replace(PlayState.SONG.song, " ", "-").toLowerCase() == 'roses' || StringTools.replace(PlayState.SONG.song, " ", "-").toLowerCase() == 'thorns')
|
||||
{
|
||||
remove(black);
|
||||
|
||||
if (songLowercase == 'thorns')
|
||||
if (StringTools.replace(PlayState.SONG.song, " ", "-").toLowerCase() == 'thorns')
|
||||
{
|
||||
add(red);
|
||||
}
|
||||
@ -1109,7 +1130,7 @@ class PlayState extends MusicBeatState
|
||||
{
|
||||
inCutscene = true;
|
||||
|
||||
if (songLowercase == 'thorns')
|
||||
if (StringTools.replace(PlayState.SONG.song, " ", "-").toLowerCase() == 'thorns')
|
||||
{
|
||||
add(senpaiEvil);
|
||||
senpaiEvil.alpha = 0;
|
||||
@ -1170,10 +1191,16 @@ class PlayState extends MusicBeatState
|
||||
|
||||
|
||||
#if windows
|
||||
// pre lowercasing the song name (startCountdown)
|
||||
var songLowercase = StringTools.replace(PlayState.SONG.song, " ", "-").toLowerCase();
|
||||
switch (songLowercase) {
|
||||
case 'dad-battle': songLowercase = 'dadbattle';
|
||||
case 'philly-nice': songLowercase = 'philly';
|
||||
}
|
||||
if (executeModchart)
|
||||
{
|
||||
luaModchart = ModchartState.createModchartState();
|
||||
luaModchart.executeState('start',[PlayState.SONG.song]);
|
||||
luaModchart.executeState('start',[songLowercase]);
|
||||
}
|
||||
#end
|
||||
|
||||
@ -1385,14 +1412,15 @@ class PlayState extends MusicBeatState
|
||||
|
||||
var playerCounter:Int = 0;
|
||||
|
||||
// pre lowercasing the song name (generateSong)
|
||||
var songLowercase = StringTools.replace(PlayState.SONG.song, " ", "-").toLowerCase();
|
||||
switch (songLowercase) {
|
||||
case 'dad-battle': songLowercase = 'dadbattle';
|
||||
case 'philly-nice': songLowercase = 'philly';
|
||||
}
|
||||
// Per song offset check
|
||||
#if windows
|
||||
// pre lowercasing the song name (generateSong)
|
||||
var songLowercase = StringTools.replace(PlayState.SONG.song, " ", "-").toLowerCase();
|
||||
switch (songLowercase) {
|
||||
case 'dad-battle': songLowercase = 'dadbattle';
|
||||
case 'philly-nice': songLowercase = 'philly';
|
||||
}
|
||||
|
||||
var songPath = 'assets/data/' + songLowercase + '/';
|
||||
|
||||
for(file in sys.FileSystem.readDirectory(songPath))
|
||||
@ -1495,7 +1523,14 @@ class PlayState extends MusicBeatState
|
||||
// FlxG.log.add(i);
|
||||
var babyArrow:FlxSprite = new FlxSprite(0, strumLine.y);
|
||||
|
||||
switch (SONG.noteStyle)
|
||||
//defaults if no noteStyle was found in chart
|
||||
var noteTypeCheck:String = 'normal';
|
||||
|
||||
if (SONG.noteStyle == null) {
|
||||
switch(storyWeek) {case 6: noteTypeCheck = 'pixel';}
|
||||
} else {noteTypeCheck = SONG.noteStyle;}
|
||||
|
||||
switch (noteTypeCheck)
|
||||
{
|
||||
case 'pixel':
|
||||
babyArrow.loadGraphic(Paths.image('weeb/pixelUI/arrows-pixels'), true, 17, 17);
|
||||
@ -1835,9 +1870,9 @@ class PlayState extends MusicBeatState
|
||||
|
||||
super.update(elapsed);
|
||||
|
||||
scoreTxt.text = Ratings.CalculateRanking(songScore,songScoreDef,nps,maxNPS,accuracy);
|
||||
if (!FlxG.save.data.accuracyDisplay)
|
||||
scoreTxt.text = "Score: " + songScore;
|
||||
scoreTxt.text = Ratings.CalculateRanking(songScore,songScoreDef,nps,maxNPS,accuracy);
|
||||
if (!FlxG.save.data.accuracyDisplay)
|
||||
scoreTxt.text = "Score: " + songScore;
|
||||
|
||||
if (FlxG.keys.justPressed.ENTER && startedCountdown && canPause)
|
||||
{
|
||||
@ -2555,30 +2590,20 @@ class PlayState extends MusicBeatState
|
||||
}
|
||||
else
|
||||
{
|
||||
var difficulty:String = "";
|
||||
|
||||
// adjusting the song name to be compatible
|
||||
var songFormat = StringTools.replace(PlayState.storyPlaylist[0], " ", "-");
|
||||
switch (songFormat) {
|
||||
case 'Dad-Battle': songFormat = 'Dadbattle';
|
||||
case 'Philly-Nice': songFormat = 'Philly';
|
||||
}
|
||||
|
||||
if (storyDifficulty == 0)
|
||||
difficulty = '-easy';
|
||||
|
||||
if (storyDifficulty == 2)
|
||||
difficulty = '-hard';
|
||||
var poop:String = Highscore.formatSong(songFormat, storyDifficulty);
|
||||
|
||||
trace('LOADING NEXT SONG');
|
||||
// pre lowercasing the next story song name
|
||||
var nextSongLowercase = StringTools.replace(PlayState.storyPlaylist[0], " ", "-").toLowerCase();
|
||||
switch (nextSongLowercase) {
|
||||
case 'dad-battle': nextSongLowercase = 'dadbattle';
|
||||
case 'philly-nice': nextSongLowercase = 'philly';
|
||||
}
|
||||
trace(nextSongLowercase + difficulty);
|
||||
trace(poop);
|
||||
|
||||
// pre lowercasing the song name (endSong)
|
||||
var songLowercase = StringTools.replace(PlayState.SONG.song, " ", "-").toLowerCase();
|
||||
switch (songLowercase) {
|
||||
case 'dad-battle': songLowercase = 'dadbattle';
|
||||
case 'philly-nice': songLowercase = 'philly';
|
||||
}
|
||||
if (songLowercase == 'eggnog')
|
||||
if (StringTools.replace(PlayState.storyPlaylist[0], " ", "-").toLowerCase() == 'eggnog')
|
||||
{
|
||||
var blackShit:FlxSprite = new FlxSprite(-FlxG.width * FlxG.camera.zoom,
|
||||
-FlxG.height * FlxG.camera.zoom).makeGraphic(FlxG.width * 3, FlxG.height * 3, FlxColor.BLACK);
|
||||
@ -2593,7 +2618,8 @@ class PlayState extends MusicBeatState
|
||||
FlxTransitionableState.skipNextTransOut = true;
|
||||
prevCamFollow = camFollow;
|
||||
|
||||
PlayState.SONG = Song.loadFromJson(nextSongLowercase + difficulty, PlayState.storyPlaylist[0]);
|
||||
|
||||
PlayState.SONG = Song.loadFromJson(poop, PlayState.storyPlaylist[0]);
|
||||
FlxG.sound.music.stop();
|
||||
|
||||
LoadingState.loadAndSwitchState(new PlayState());
|
||||
@ -3556,25 +3582,28 @@ class PlayState extends MusicBeatState
|
||||
// FlxG.log.add('change bpm' + SONG.notes[Std.int(curStep / 16)].changeBPM);
|
||||
wiggleShit.update(Conductor.crochet);
|
||||
|
||||
// HARDCODING FOR MILF ZOOMS!
|
||||
if (curSong.toLowerCase() == 'milf' && curBeat >= 168 && curBeat < 200 && camZooming && FlxG.camera.zoom < 1.35)
|
||||
if (FlxG.save.data.camzoom)
|
||||
{
|
||||
FlxG.camera.zoom += 0.015;
|
||||
camHUD.zoom += 0.03;
|
||||
// HARDCODING FOR MILF ZOOMS!
|
||||
if (curSong.toLowerCase() == 'milf' && curBeat >= 168 && curBeat < 200 && camZooming && FlxG.camera.zoom < 1.35)
|
||||
{
|
||||
FlxG.camera.zoom += 0.015;
|
||||
camHUD.zoom += 0.03;
|
||||
}
|
||||
|
||||
if (camZooming && FlxG.camera.zoom < 1.35 && curBeat % 4 == 0)
|
||||
{
|
||||
FlxG.camera.zoom += 0.015;
|
||||
camHUD.zoom += 0.03;
|
||||
}
|
||||
|
||||
iconP1.setGraphicSize(Std.int(iconP1.width + 30));
|
||||
iconP2.setGraphicSize(Std.int(iconP2.width + 30));
|
||||
|
||||
iconP1.updateHitbox();
|
||||
iconP2.updateHitbox();
|
||||
}
|
||||
|
||||
if (camZooming && FlxG.camera.zoom < 1.35 && curBeat % 4 == 0)
|
||||
{
|
||||
FlxG.camera.zoom += 0.015;
|
||||
camHUD.zoom += 0.03;
|
||||
}
|
||||
|
||||
iconP1.setGraphicSize(Std.int(iconP1.width + 30));
|
||||
iconP2.setGraphicSize(Std.int(iconP2.width + 30));
|
||||
|
||||
iconP1.updateHitbox();
|
||||
iconP2.updateHitbox();
|
||||
|
||||
if (curBeat % gfSpeed == 0)
|
||||
{
|
||||
gf.dance();
|
||||
|
104
source/Replay.hx
104
source/Replay.hx
@ -13,79 +13,79 @@ import openfl.utils.Dictionary;
|
||||
|
||||
typedef ReplayJSON =
|
||||
{
|
||||
public var replayGameVer:String;
|
||||
public var timestamp:Date;
|
||||
public var songName:String;
|
||||
public var songDiff:Int;
|
||||
public var songNotes:Array<Float>;
|
||||
public var replayGameVer:String;
|
||||
public var timestamp:Date;
|
||||
public var songName:String;
|
||||
public var songDiff:Int;
|
||||
public var songNotes:Array<Float>;
|
||||
public var noteSpeed:Float;
|
||||
public var isDownscroll:Bool;
|
||||
}
|
||||
|
||||
class Replay
|
||||
{
|
||||
public static var version:String = "1.0"; // replay file version
|
||||
public static var version:String = "1.1"; // replay file version
|
||||
|
||||
public var path:String = "";
|
||||
public var replay:ReplayJSON;
|
||||
public function new(path:String)
|
||||
{
|
||||
this.path = path;
|
||||
replay = {
|
||||
songName: "Tutorial",
|
||||
songDiff: 1,
|
||||
public var path:String = "";
|
||||
public var replay:ReplayJSON;
|
||||
public function new(path:String)
|
||||
{
|
||||
this.path = path;
|
||||
replay = {
|
||||
songName: "No Song Found",
|
||||
songDiff: 1,
|
||||
noteSpeed: 1.5,
|
||||
isDownscroll: false,
|
||||
songNotes: [],
|
||||
replayGameVer: version,
|
||||
timestamp: Date.now()
|
||||
};
|
||||
}
|
||||
replayGameVer: version,
|
||||
timestamp: Date.now()
|
||||
};
|
||||
}
|
||||
|
||||
public static function LoadReplay(path:String):Replay
|
||||
public static function LoadReplay(path:String):Replay
|
||||
{
|
||||
var rep:Replay = new Replay(path);
|
||||
var rep:Replay = new Replay(path);
|
||||
|
||||
rep.LoadFromJSON();
|
||||
rep.LoadFromJSON();
|
||||
|
||||
trace('basic replay data:\nSong Name: ' + rep.replay.songName + '\nSong Diff: ' + rep.replay.songDiff + '\nNotes Length: ' + rep.replay.songNotes.length);
|
||||
trace('basic replay data:\nSong Name: ' + rep.replay.songName + '\nSong Diff: ' + rep.replay.songDiff + '\nNotes Length: ' + rep.replay.songNotes.length);
|
||||
|
||||
return rep;
|
||||
}
|
||||
return rep;
|
||||
}
|
||||
|
||||
public function SaveReplay(notearray:Array<Float>)
|
||||
{
|
||||
var json = {
|
||||
"songName": PlayState.SONG.song.toLowerCase(),
|
||||
"songDiff": PlayState.storyDifficulty,
|
||||
public function SaveReplay(notearray:Array<Float>)
|
||||
{
|
||||
var json = {
|
||||
"songName": PlayState.SONG.song,
|
||||
"songDiff": PlayState.storyDifficulty,
|
||||
"noteSpeed": (FlxG.save.data.scrollSpeed > 1 ? FlxG.save.data.scrollSpeed : PlayState.SONG.speed),
|
||||
"isDownscroll": FlxG.save.data.downscroll,
|
||||
"songNotes": notearray,
|
||||
"timestamp": Date.now(),
|
||||
"replayGameVer": version
|
||||
};
|
||||
"timestamp": Date.now(),
|
||||
"replayGameVer": version
|
||||
};
|
||||
|
||||
var data:String = Json.stringify(json);
|
||||
var data:String = Json.stringify(json);
|
||||
|
||||
#if sys
|
||||
File.saveContent("assets/replays/replay-" + PlayState.SONG.song + "-time" + Date.now().getTime() + ".kadeReplay", data);
|
||||
#end
|
||||
}
|
||||
#if sys
|
||||
File.saveContent("assets/replays/replay-" + PlayState.SONG.song + "-time" + Date.now().getTime() + ".kadeReplay", data);
|
||||
#end
|
||||
}
|
||||
|
||||
public function LoadFromJSON()
|
||||
{
|
||||
#if sys
|
||||
trace('loading ' + Sys.getCwd() + 'assets/replays/' + path + ' replay...');
|
||||
try
|
||||
{
|
||||
var repl:ReplayJSON = cast Json.parse(File.getContent(Sys.getCwd() + "assets/replays/" + path));
|
||||
replay = repl;
|
||||
}
|
||||
catch(e)
|
||||
{
|
||||
trace('failed!\n' + e.message);
|
||||
}
|
||||
#end
|
||||
}
|
||||
public function LoadFromJSON()
|
||||
{
|
||||
#if sys
|
||||
trace('loading ' + Sys.getCwd() + 'assets/replays/' + path + ' replay...');
|
||||
try
|
||||
{
|
||||
var repl:ReplayJSON = cast Json.parse(File.getContent(Sys.getCwd() + "assets/replays/" + path));
|
||||
replay = repl;
|
||||
}
|
||||
catch(e)
|
||||
{
|
||||
trace('failed!\n' + e.message);
|
||||
}
|
||||
#end
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -33,9 +33,9 @@ class Song
|
||||
|
||||
public var player1:String = 'bf';
|
||||
public var player2:String = 'dad';
|
||||
public var gfVersion:String = 'gf';
|
||||
public var noteStyle:String = 'normal';
|
||||
public var stage:String = 'stage';
|
||||
public var gfVersion:String = '';
|
||||
public var noteStyle:String = '';
|
||||
public var stage:String = '';
|
||||
|
||||
public function new(song, notes, bpm)
|
||||
{
|
||||
@ -47,8 +47,8 @@ class Song
|
||||
public static function loadFromJson(jsonInput:String, ?folder:String):SwagSong
|
||||
{
|
||||
trace(jsonInput);
|
||||
|
||||
// pre lowercasing the song name (update)
|
||||
|
||||
// pre lowercasing the folder name
|
||||
var folderLowercase = StringTools.replace(folder, " ", "-").toLowerCase();
|
||||
switch (folderLowercase) {
|
||||
case 'dad-battle': folderLowercase = 'dadbattle';
|
||||
|
@ -285,19 +285,19 @@ class StoryMenuState extends MusicBeatState
|
||||
PlayState.isStoryMode = true;
|
||||
selectedWeek = true;
|
||||
|
||||
var diffic = "";
|
||||
|
||||
switch (curDifficulty)
|
||||
{
|
||||
case 0:
|
||||
diffic = '-easy';
|
||||
case 2:
|
||||
diffic = '-hard';
|
||||
}
|
||||
|
||||
PlayState.storyDifficulty = curDifficulty;
|
||||
|
||||
PlayState.SONG = Song.loadFromJson(StringTools.replace(PlayState.storyPlaylist[0]," ", "-").toLowerCase() + diffic, StringTools.replace(PlayState.storyPlaylist[0]," ", "-").toLowerCase());
|
||||
// adjusting the song name to be compatible
|
||||
var songFormat = StringTools.replace(PlayState.storyPlaylist[0], " ", "-");
|
||||
switch (songFormat) {
|
||||
case 'Dad-Battle': songFormat = 'Dadbattle';
|
||||
case 'Philly-Nice': songFormat = 'Philly';
|
||||
}
|
||||
|
||||
var poop:String = Highscore.formatSong(songFormat, curDifficulty);
|
||||
|
||||
PlayState.SONG = Song.loadFromJson(poop, PlayState.storyPlaylist[0]);
|
||||
PlayState.storyWeek = curWeek;
|
||||
PlayState.campaignScore = 0;
|
||||
new FlxTimer().start(1, function(tmr:FlxTimer)
|
||||
|
Loading…
x
Reference in New Issue
Block a user