This commit is contained in:
Yoshman29
2022-11-09 23:19:40 +01:00
parent 1d422c4b9c
commit 94d2a3c30d
4 changed files with 13 additions and 5 deletions
+9 -1
View File
@@ -7,6 +7,7 @@ public var enableCameraHacks = true;
public var enablePauseMenu = true;
public var isSpooky = false;
var oldStageQuality = FlxG.game.stage.quality;
static var daPixelZoom = 6;
/**
@@ -81,7 +82,7 @@ function createPost() {
if (enableCameraHacks) {
FlxG.camera.antialiasing = false;
FlxG.camera.pixelPerfectRender = true;
FlxG.game.stage.quality = 2;
iconP1.antialiasing = false;
iconP2.antialiasing = false;
@@ -123,6 +124,13 @@ public function makeCameraPixely(cam) {
pixellyCameras.push(cam);
pixellyShaders.push(shad);
FlxG.game.stage.quality = 2;
}
function destroy() {
// resets the stage quality
FlxG.game.stage.quality = oldStageQuality;
}
function pixelCam(cam) {
+1 -1
View File
@@ -3,7 +3,7 @@
uniform float pixelZoom;
// zooms the game 6 times
void main() {
vec2 camPos = getCamPos(floor(openfl_TextureCoordv * openfl_TextureSize) / openfl_TextureSize);
vec2 camPos = getCamPos(openfl_TextureCoordv);
camPos = vec2(0.5, 0.5) + ((camPos - vec2(0.5, 0.5)) * pixelZoom);
+1 -1
View File
@@ -1 +1 @@
1251
1252
+2 -2
View File
@@ -156,7 +156,7 @@ class Options
if (!__eventAdded) {
Lib.application.onExit.add(function(i:Int) {
trace("saving settings...");
trace("Saving settings...");
save();
});
__eventAdded = true;
@@ -166,7 +166,7 @@ class Options
public static function applySettings() {
PlayerSettings.player1.setKeyboardScheme(Solo);
FlxG.game.stage.quality = (FlxG.forceNoAntialiasing = !antialiasing) ? 2 : 0;
FlxG.game.stage.quality = (FlxG.forceNoAntialiasing = !antialiasing) ? LOW : BEST;
FlxG.autoPause = autoPause;
FlxG.sound.volume = volume;
}