Skip to content

Commit 64efe98

Browse files
committed
restore 2x scaling of images for non-hd
1 parent 29d8e6a commit 64efe98

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

src/scripts/playback.js

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -569,9 +569,19 @@ class BipsiPlayback extends EventTarget {
569569
scene.push({ layer: 2, func: upscaler(() => drawEventLayer(TEMP_ROOM, tileset, tileToFrame, palette, room.events)) });
570570
}
571571

572+
/**
573+
*
574+
* @param {*} scene
575+
* @param {CanvasRenderingContext2D} dest
576+
* @param {number} frame
577+
*/
572578
addImagesToScene(scene, dest, frame) {
579+
// 2x scale for images for non-hd
580+
const scale = BIPSI_HD ? 1 : 2;
581+
573582
function drawImage({ image, x, y }) {
574-
dest.drawImage(image[frame % image.length], x, y);
583+
const source = image[frame % image.length]
584+
dest.drawImage(source, x, y, source.width * scale, source.height * scale);
575585
}
576586

577587
const images = [...this.images.values()];

0 commit comments

Comments
 (0)