Merge remote-tracking branch 'upstream/main' into new-editors-main
# Conflicts: # commandline/commands/Compiler.hx # source/funkin/backend/FunkinSprite.hx # source/funkin/backend/MusicBeatState.hx # source/funkin/backend/MusicBeatSubstate.hx # source/funkin/backend/chart/Chart.hx # source/funkin/backend/chart/EventsData.hx # source/funkin/backend/scripting/GlobalScript.hx # source/funkin/backend/system/Controls.hx # source/funkin/backend/system/MainState.hx # source/funkin/backend/utils/AudioAnalyzer.hx # source/funkin/backend/utils/CoolUtil.hx # source/funkin/editors/character/CharacterInfoScreen.hx # source/funkin/editors/charter/Charter.hx # source/funkin/editors/charter/CharterSelection.hx # source/funkin/editors/charter/CharterStrumline.hx # source/funkin/editors/charter/CharterStrumlineButton.hx # source/funkin/editors/charter/SongCreationScreen.hx # source/funkin/editors/ui/UIDropDown.hx # source/funkin/editors/ui/UIFileExplorer.hx # source/funkin/game/Note.hx # source/funkin/game/PlayState.hx # source/funkin/game/SplashGroup.hx # source/funkin/game/Stage.hx # source/funkin/game/Strum.hx # source/funkin/menus/FreeplayState.hx # source/funkin/options/Options.hx # source/funkin/options/keybinds/KeybindsOptions.hx
This commit is contained in:
@@ -18,9 +18,7 @@ public var daPixelZoom = PlayState.daPixelZoom;
|
||||
* UI
|
||||
*/
|
||||
function onNoteCreation(event) {
|
||||
if (event.note.strumLine == playerStrums && !pixelNotesForBF) return;
|
||||
if (event.note.strumLine == cpuStrums && !pixelNotesForDad) return;
|
||||
|
||||
if ((event.note.strumLine == playerStrums && !pixelNotesForBF) || (event.note.strumLine == cpuStrums && !pixelNotesForDad)) return;
|
||||
event.cancel();
|
||||
|
||||
var note = event.note;
|
||||
@@ -38,18 +36,14 @@ function onNoteCreation(event) {
|
||||
var strumScale = event.note.strumLine.strumScale;
|
||||
note.scale.set(daPixelZoom*strumScale, daPixelZoom*strumScale);
|
||||
note.updateHitbox();
|
||||
note.antialiasing = false;
|
||||
}
|
||||
|
||||
function onPostNoteCreation(event) {
|
||||
var splashes = event.note;
|
||||
if (pixelSplashes)
|
||||
splashes.splash = "pixel-default";
|
||||
}
|
||||
function onPostNoteCreation(event) if (pixelSplashes)
|
||||
event.note.splash = "pixel-default";
|
||||
|
||||
function onStrumCreation(event) {
|
||||
if (event.player == 1 && !pixelNotesForBF) return;
|
||||
if (event.player == 0 && !pixelNotesForDad) return;
|
||||
|
||||
if ((event.player == 1 && !pixelNotesForBF) || (event.player == 0 && !pixelNotesForDad)) return;
|
||||
event.cancel();
|
||||
|
||||
var strum = event.strum;
|
||||
@@ -64,6 +58,7 @@ function onStrumCreation(event) {
|
||||
var strumScale = strumLines.members[event.player].strumScale;
|
||||
strum.scale.set(daPixelZoom*strumScale, daPixelZoom*strumScale);
|
||||
strum.updateHitbox();
|
||||
strum.antialiasing = false;
|
||||
}
|
||||
|
||||
function onCountdown(event) {
|
||||
@@ -94,9 +89,9 @@ function onPlayerHit(event:NoteHitEvent) {
|
||||
* CAMERA HACKS!!
|
||||
*/
|
||||
function postCreate() {
|
||||
if (enablePauseMenu) {
|
||||
if (enablePauseMenu)
|
||||
PauseSubState.script = 'data/scripts/week6-pause';
|
||||
}
|
||||
|
||||
if (enableCameraHacks) {
|
||||
camGame.pixelPerfectRender = true;
|
||||
camGame.antialiasing = false;
|
||||
@@ -105,9 +100,6 @@ function postCreate() {
|
||||
defaultCamZoom /= daPixelZoom;
|
||||
}
|
||||
|
||||
iconP1.antialiasing = false;
|
||||
iconP2.antialiasing = false;
|
||||
|
||||
if (enablePixelGameOver) {
|
||||
gameOverSong = "pixel/gameOver";
|
||||
lossSFX = "pixel/gameOverSFX";
|
||||
@@ -115,8 +107,8 @@ function postCreate() {
|
||||
}
|
||||
}
|
||||
|
||||
function onStartCountdown() {
|
||||
/*var newNoteCamera = new HudCamera();
|
||||
/*function onStartCountdown() {
|
||||
var newNoteCamera = new HudCamera();
|
||||
newNoteCamera.bgColor = 0; // transparent
|
||||
FlxG.cameras.add(newNoteCamera, false);
|
||||
|
||||
@@ -130,8 +122,8 @@ function onStartCountdown() {
|
||||
i++;
|
||||
}
|
||||
}
|
||||
makeCameraPixely(newNoteCamera);*/
|
||||
}
|
||||
makeCameraPixely(newNoteCamera);
|
||||
}*/
|
||||
|
||||
/**
|
||||
* Use this to make any camera pixelly (you wont be able to zoom with it anymore!)
|
||||
@@ -156,33 +148,29 @@ function destroy() {
|
||||
FlxG.game.stage.quality = oldStageQuality;
|
||||
}
|
||||
|
||||
function pixelCam(cam) {
|
||||
function pixelCam(cam)
|
||||
makeCameraPixely(cam);
|
||||
}
|
||||
|
||||
var pixellyCameras = [];
|
||||
var pixellyShaders = [];
|
||||
|
||||
function postUpdate(elapsed) {
|
||||
for(e in pixellyCameras) {
|
||||
if (Std.isOfType(e, HudCamera))
|
||||
e.downscroll = camHUD.downscroll;
|
||||
}
|
||||
if (enableCameraHacks) {
|
||||
for(p in strumLines)
|
||||
p.notes.forEach(function(n) {
|
||||
if(n.isSustainNote) return; // hacky fix for hold
|
||||
n.y -= n.y % daPixelZoom;
|
||||
n.x -= n.x % daPixelZoom;
|
||||
});
|
||||
function postUpdate() {
|
||||
for (e in pixellyCameras) if (Std.isOfType(e, HudCamera))
|
||||
e.downscroll = camHUD.downscroll;
|
||||
|
||||
if (enableCameraHacks) for (p in strumLines) {
|
||||
p.notes.forEach(function(n) {
|
||||
if(n.isSustainNote) return; // hacky fix for hold
|
||||
n.y -= n.y % daPixelZoom;
|
||||
n.x -= n.x % daPixelZoom;
|
||||
});
|
||||
}
|
||||
|
||||
var zoom = 1 / daPixelZoom / Math.min(FlxG.scaleMode.scale.x, FlxG.scaleMode.scale.y);
|
||||
for(e in pixellyCameras) {
|
||||
for (e in pixellyCameras) {
|
||||
if (!e.exists) continue;
|
||||
e.zoom = zoom;
|
||||
}
|
||||
for(e in pixellyShaders) {
|
||||
for (e in pixellyShaders)
|
||||
e.pixelZoom = zoom;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user