diff --git a/app.js b/app.js
index 43eed8e..838a136 100644
--- a/app.js
+++ b/app.js
@@ -33,6 +33,7 @@ document.addEventListener('DOMContentLoaded', function () {
const afGroup = afSelect.closest('.form-group');
const rendererSelect = document.getElementById('renderer-select');
const hdTextures = document.getElementById('check-hd-textures');
+ const widescreenBgs = document.getElementById('check-widescreen-bgs');
// --- Sound Toggle ---
function updateSoundEmojiState() {
@@ -212,12 +213,22 @@ document.addEventListener('DOMContentLoaded', function () {
}
}
- if (hdTextures) {
+ if (hdTextures || widescreenBgs) {
iniContent += "[extensions]\n";
+ }
+
+ if (hdTextures) {
value = hdTextures.checked ? 'YES' : 'NO';
iniContent += `${hdTextures.name}=${value}\n`;
}
+ siFiles = getSiFiles();
+ if (siFiles.length > 0) {
+ iniContent += `SI Loader=YES\n`;
+ iniContent += "[si loader]\n";
+ iniContent += `files=${siFiles.join(',')}\n`;
+ }
+
const workerCode = `
self.onmessage = async (e) => {
if (e.data.action === 'save') {
@@ -292,6 +303,11 @@ document.addEventListener('DOMContentLoaded', function () {
applyConfigToForm(config) {
const elements = this.form.elements;
for (const key in config) {
+ if (key == "files") {
+ elements["Widescreen Backgrounds"].checked = config[key].includes("widescreen.si");
+ continue;
+ }
+
const element = elements[key];
if (!element) continue;
@@ -473,6 +489,10 @@ document.addEventListener('DOMContentLoaded', function () {
checkInitialCacheStatus();
});
+ widescreenBgs.addEventListener('change', () => {
+ checkInitialCacheStatus();
+ });
+
rendererSelect.addEventListener('change', () => {
showOrHideGraphicsOptions();
});
@@ -491,12 +511,21 @@ document.addEventListener('DOMContentLoaded', function () {
}
}
+ function getSiFiles() {
+ siFiles = [];
+ if (widescreenBgs && widescreenBgs.checked) {
+ siFiles.push('/LEGO/extra/widescreen.si');
+ }
+ return siFiles;
+ }
+
function checkInitialCacheStatus() {
if (navigator.serviceWorker.controller) {
navigator.serviceWorker.controller.postMessage({
action: 'check_cache_status',
language: languageSelect.value,
- hdTextures: hdTextures.checked
+ hdTextures: hdTextures.checked,
+ siFiles: getSiFiles(),
});
}
}
diff --git a/index.html b/index.html
index a271002..988baa7 100644
--- a/index.html
+++ b/index.html
@@ -426,6 +426,10 @@
HD Textures: Enhance the game's visuals with
high-definition textures. An extra 25MB download is
+ required when this is enabled.
+ Widescreen Backgrounds (work-in-progress): Adapts the game's background art
+ for modern widescreen monitors, eliminating unwanted 3D backgrounds on the
+ sides of the screen. An extra 1MB download is
required when this is enabled.
@@ -438,6 +442,13 @@
HD Textures
+