From 200d20344d22bcd0eb9d915b3282cabee7a69171 Mon Sep 17 00:00:00 2001 From: HarryPeach <4750998+HarryPeach@users.noreply.github.com> Date: Fri, 3 Nov 2023 12:31:21 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20=20@=2096eba?= =?UTF-8?q?d46a61e2ea61b204d5df7956cd0905d086b=20=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- asset-manifest.json | 8 ++++---- index.html | 2 +- ... precache-manifest.65434c65a97e6ab86d98fcf1ecd9b118.js | 8 ++++---- service-worker.js | 2 +- .../js/{main.06f366a5.chunk.js => main.2d20a402.chunk.js} | 4 ++-- ...n.06f366a5.chunk.js.map => main.2d20a402.chunk.js.map} | 2 +- 6 files changed, 13 insertions(+), 13 deletions(-) rename precache-manifest.c18880cb4d73bb7709c998936f4028ad.js => precache-manifest.65434c65a97e6ab86d98fcf1ecd9b118.js (73%) rename static/js/{main.06f366a5.chunk.js => main.2d20a402.chunk.js} (85%) rename static/js/{main.06f366a5.chunk.js.map => main.2d20a402.chunk.js.map} (99%) diff --git a/asset-manifest.json b/asset-manifest.json index 283f798..0703940 100644 --- a/asset-manifest.json +++ b/asset-manifest.json @@ -1,14 +1,14 @@ { "files": { "main.css": "/bootscreennx/static/css/main.1661d9ac.chunk.css", - "main.js": "/bootscreennx/static/js/main.06f366a5.chunk.js", - "main.js.map": "/bootscreennx/static/js/main.06f366a5.chunk.js.map", + "main.js": "/bootscreennx/static/js/main.2d20a402.chunk.js", + "main.js.map": "/bootscreennx/static/js/main.2d20a402.chunk.js.map", "runtime-main.js": "/bootscreennx/static/js/runtime-main.d1e65ec7.js", "runtime-main.js.map": "/bootscreennx/static/js/runtime-main.d1e65ec7.js.map", "static/js/2.0a6bb398.chunk.js": "/bootscreennx/static/js/2.0a6bb398.chunk.js", "static/js/2.0a6bb398.chunk.js.map": "/bootscreennx/static/js/2.0a6bb398.chunk.js.map", "index.html": "/bootscreennx/index.html", - "precache-manifest.c18880cb4d73bb7709c998936f4028ad.js": "/bootscreennx/precache-manifest.c18880cb4d73bb7709c998936f4028ad.js", + "precache-manifest.65434c65a97e6ab86d98fcf1ecd9b118.js": "/bootscreennx/precache-manifest.65434c65a97e6ab86d98fcf1ecd9b118.js", "service-worker.js": "/bootscreennx/service-worker.js", "static/css/main.1661d9ac.chunk.css.map": "/bootscreennx/static/css/main.1661d9ac.chunk.css.map", "static/js/2.0a6bb398.chunk.js.LICENSE.txt": "/bootscreennx/static/js/2.0a6bb398.chunk.js.LICENSE.txt" @@ -17,6 +17,6 @@ "static/js/runtime-main.d1e65ec7.js", "static/js/2.0a6bb398.chunk.js", "static/css/main.1661d9ac.chunk.css", - "static/js/main.06f366a5.chunk.js" + "static/js/main.2d20a402.chunk.js" ] } \ No newline at end of file diff --git a/index.html b/index.html index e34c82e..e6a7376 100644 --- a/index.html +++ b/index.html @@ -1 +1 @@ -OSBSG
\ No newline at end of file +OSBSG
\ No newline at end of file diff --git a/precache-manifest.c18880cb4d73bb7709c998936f4028ad.js b/precache-manifest.65434c65a97e6ab86d98fcf1ecd9b118.js similarity index 73% rename from precache-manifest.c18880cb4d73bb7709c998936f4028ad.js rename to precache-manifest.65434c65a97e6ab86d98fcf1ecd9b118.js index 81d8fd9..76b0cd2 100644 --- a/precache-manifest.c18880cb4d73bb7709c998936f4028ad.js +++ b/precache-manifest.65434c65a97e6ab86d98fcf1ecd9b118.js @@ -1,10 +1,10 @@ self.__precacheManifest = (self.__precacheManifest || []).concat([ { - "revision": "ed8470b3dbc5d6c4b78863e4d6d1308b", + "revision": "bda8d583f36820683d2b832bd3425596", "url": "/bootscreennx/index.html" }, { - "revision": "539073b9261c8d5eb302", + "revision": "3976c98cda785fa18bc2", "url": "/bootscreennx/static/css/main.1661d9ac.chunk.css" }, { @@ -16,8 +16,8 @@ self.__precacheManifest = (self.__precacheManifest || []).concat([ "url": "/bootscreennx/static/js/2.0a6bb398.chunk.js.LICENSE.txt" }, { - "revision": "539073b9261c8d5eb302", - "url": "/bootscreennx/static/js/main.06f366a5.chunk.js" + "revision": "3976c98cda785fa18bc2", + "url": "/bootscreennx/static/js/main.2d20a402.chunk.js" }, { "revision": "bedebfeda838c36c2d91", diff --git a/service-worker.js b/service-worker.js index 57bd2f5..35407df 100644 --- a/service-worker.js +++ b/service-worker.js @@ -14,7 +14,7 @@ importScripts("https://storage.googleapis.com/workbox-cdn/releases/4.3.1/workbox-sw.js"); importScripts( - "/bootscreennx/precache-manifest.c18880cb4d73bb7709c998936f4028ad.js" + "/bootscreennx/precache-manifest.65434c65a97e6ab86d98fcf1ecd9b118.js" ); self.addEventListener('message', (event) => { diff --git a/static/js/main.06f366a5.chunk.js b/static/js/main.2d20a402.chunk.js similarity index 85% rename from static/js/main.06f366a5.chunk.js rename to static/js/main.2d20a402.chunk.js index 81df49d..b8cee60 100644 --- a/static/js/main.06f366a5.chunk.js +++ b/static/js/main.2d20a402.chunk.js @@ -1,2 +1,2 @@ -(this.webpackJsonpbootscreennx=this.webpackJsonpbootscreennx||[]).push([[0],{14:function(e,t,a){e.exports=a(34)},19:function(e,t,a){},2:function(e,t,a){e.exports={container:"HowToUse_container__2xikJ",title:"HowToUse_title__30q3A",text:"HowToUse_text__irhpz"}},20:function(e,t,a){},3:function(e,t,a){e.exports={element:"CustomDropdown_element__3Ck2P",select:"CustomDropdown_select__31IZN",textBox:"CustomDropdown_textBox__1rdJx",icon:"CustomDropdown_icon__3mXDy",label:"CustomDropdown_label__3synm"}},34:function(e,t,a){"use strict";a.r(t);var o=a(0),n=a.n(o),r=a(12),c=a.n(r),l=(a(19),a(20),a(1)),i=a(4),s=a.n(i),m=a(6);function d(e,t){var a=n.a.useState(e),o=Object(l.a)(a,2),r=o[0],c=o[1],i=n.a.useState(!1),s=Object(l.a)(i,2),d=s[0],u=s[1];return[d?r:m[t][r],function(e,t){c(e),u(t)}]}var u=a(8),b=a(3),h=a.n(b);function g(e){var t=n.a.useState(!1),a=Object(l.a)(t,2),o=a[0],r=a[1],c=function(e){r(!o)},i=function(t){o?e.customSet(t.target.value,!0):e.customSet(t.target.selectedIndex,!1)};return n.a.createElement(n.a.Fragment,null,n.a.createElement("form",{className:h.a.element},n.a.createElement("label",{className:h.a.label,htmlFor:e.deviceDataId},e.label),!e.disableCustom&&(o?n.a.createElement(u.b,{onClick:c,className:h.a.icon}):n.a.createElement(u.a,{onClick:c,className:h.a.icon})),o&&!e.disableCustom?n.a.createElement("input",{id:e.deviceDataId,type:"text",onChange:i,className:h.a.textBox}):n.a.createElement("select",{id:e.deviceDataId,onChange:i,className:h.a.select},m[e.deviceDataId].map((function(e,t){return n.a.createElement("option",{key:t,value:e},e)})))))}var f=a(13),_=a.n(f),p=a(5),S=a.n(p);function E(e,t,a,o){var n=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"gray";e.fillStyle=n,e.textBaseline="top";for(var r=0,c=0;c4&&void 0!==arguments[4]?arguments[4]:"gray";e.fillStyle=n,e.textBaseline="top";for(var r=0,c=0;c {\n\t\tsetSelectedId(custom ? val : val);\n\t\tsetCustomInfo(custom);\n\t};\n\n\treturn [\n\t\tcustomInfo ? selectedId : DeviceData[deviceDataId][selectedId],\n\t\tsetValue,\n\t];\n}\n","import React from \"react\";\nimport { MdEdit, MdInput } from \"react-icons/md\";\n\nimport styles from \"./CustomDropdown.module.css\";\n\nimport DeviceData from \"../device_data.json\";\n\nexport default function CustomDropdown(props) {\n\t// const checkbox = React.useRef();\n\tconst [customInput, setCustomInput] = React.useState(false);\n\n\tconst onCheckboxChange = (e) => {\n\t\tsetCustomInput(!customInput);\n\t};\n\n\tconst onValueChange = (e) => {\n\t\tif (customInput) {\n\t\t\tprops.customSet(e.target.value, true);\n\t\t} else {\n\t\t\tprops.customSet(e.target.selectedIndex, false);\n\t\t}\n\t};\n\n\treturn (\n\t\t<>\n\t\t\t
\n\t\t\t\t\n\t\t\t\t{!props.disableCustom &&\n\t\t\t\t\t(customInput ? (\n\t\t\t\t\t\t\n\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t))}\n\t\t\t\t{customInput && !props.disableCustom ? (\n\t\t\t\t\t\n\t\t\t\t) : (\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t{DeviceData[props.deviceDataId].map((el, index) => (\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\n\t\t\t\t\t)}\n\t\t\t\n\t\t\n\t);\n}\n","import React, { useEffect } from \"react\";\nimport Jimp from \"jimp\";\nimport styles from \"./BootScreenCanvas.module.css\";\n\nconst CANVAS_WIDTH = 1280;\nconst CANVAS_HEIGHT = 720;\n\nfunction drawText(context, text, x, y, color = \"gray\") {\n\tcontext.fillStyle = color;\n\tcontext.textBaseline = \"top\";\n\n\tvar backspace = 0;\n\tfor (var i = 0; i < text.length; i++) {\n\t\tif (text.charAt(i) === \"_\") {\n\t\t\tif (context.fillStyle === \"#ffffff\") context.fillStyle = color;\n\t\t\telse context.fillStyle = \"white\";\n\t\t\tbackspace++;\n\t\t\tcontinue;\n\t\t}\n\t\tcontext.fillText(text.charAt(i), x + i * 16 - backspace * 16, y);\n\t}\n}\n\nfunction scaleCanvas(origin, destination) {\n\tdestination.current\n\t\t.getContext(\"2d\")\n\t\t.drawImage(\n\t\t\torigin.current,\n\t\t\t0,\n\t\t\t0,\n\t\t\t1280,\n\t\t\t720,\n\t\t\t0,\n\t\t\t0,\n\t\t\tdestination.current.width,\n\t\t\tdestination.current.height\n\t\t);\n}\n\nexport default function BootScreenCanvas(props) {\n\tconst [symbols, setSymbols] = React.useState(new Image());\n\tconst canvas = React.useRef();\n\tconst context = React.useRef();\n\tconst scaledCanvas = React.useRef();\n\tconst scaledContext = React.useRef();\n\n\tuseEffect(() => {\n\t\tcontext.current = canvas.current.getContext(\"2d\");\n\t\tscaledContext.current = scaledCanvas.current.getContext(\"2d\");\n\t\tcontext.current.imageSmoothingEnabled = false;\n\t\tscaledContext.current.imageSmoothingEnabled = false;\n\t\tlet img = new Image();\n\t\timg.src = process.env.PUBLIC_URL + \"/symbols.png\";\n\t\timg.onload = () => setSymbols(img);\n\t}, []);\n\n\tuseEffect(() => {\n\t\tconst ctx = context.current;\n\t\tcontext.current.fillStyle = \"black\";\n\t\tcontext.current.fillRect(0, 0, CANVAS_WIDTH, CANVAS_HEIGHT);\n\t\tctx.font = \"32px PerfectDOSVGA437Win\";\n\t\tctx.fillStyle = \"white\";\n\n\t\tctx.drawImage(symbols, 40, 10, 21, 29, 8, 16, 42, 58);\n\n\t\tswitch (props.sideLogo) {\n\t\t\tcase \"Energy Star\":\n\t\t\t\tctx.drawImage(symbols, 0, 0, 133, 84, 966, 16, 266, 168);\n\t\t\t\tctx.fillStyle = \"black\";\n\t\t\t\tctx.fillRect(1040, 36, 50, 60);\n\t\t\t\tbreak;\n\t\t\tcase \"Energy Star Atmosphere\":\n\t\t\t\tctx.drawImage(symbols, 0, 84, 133, 84, 966, 16, 266, 168);\n\t\t\t\tbreak;\n\t\t\tcase \"Atmosphere\":\n\t\t\t\tctx.drawImage(symbols, 30, 168, 101, 84, 1100, 16, 151, 134);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t}\n\n\t\tdrawText(ctx, props.firmware, 64, 16);\n\t\tdrawText(ctx, \"Copyright (C) 2021, \" + props.copyrightHolder, 64, 48);\n\n\t\tdrawText(ctx, `Nintendo Switch (ver ${props.version})`, 32, 160);\n\t\tdrawText(ctx, \"Main Processor : Nvidia Tegra X1 SoC\", 32, 224);\n\t\tdrawText(ctx, \"Memory Test : 65920K OK\", 32, 256);\n\t\tdrawText(ctx, \"Plug and Play BIOS Extension, v1.0A\", 32, 320);\n\t\tdrawText(\n\t\t\tctx,\n\t\t\t\"Detecting Primary Master ... \" +\n\t\t\tprops.storage +\n\t\t\t\" Internal Storage\",\n\t\t\t64,\n\t\t\t352\n\t\t);\n\t\tdrawText(\n\t\t\tctx,\n\t\t\t\"Detecting Primary Slave ... \" + props.sdSize + \" SD Card\",\n\t\t\t64,\n\t\t\t384\n\t\t);\n\t\tdrawText(ctx, \"Detecting Secondary Master ... None\", 64, 416);\n\t\tdrawText(ctx, \"Detecting Secondary Slave ... None\", 64, 448);\n\n\t\tdrawText(\n\t\t\tctx,\n\t\t\t\"Hold _\" +\n\t\t\tprops.bootloaderKeybind +\n\t\t\t\"_ \" +\n\t\t\tprops.bootloaderTiming +\n\t\t\t\" to enter _\" +\n\t\t\tprops.bootloaderName +\n\t\t\t\"_.\",\n\t\t\t16,\n\t\t\tCANVAS_HEIGHT - 40\n\t\t);\n\n\t\tscaleCanvas(canvas, scaledCanvas);\n\t}, [\n\t\tprops.version,\n\t\tprops.storage,\n\t\tprops.sdSize,\n\t\tprops.sideLogo,\n\t\tprops.firmware,\n\t\tprops.bootloaderKeybind,\n\t\tprops.bootloaderTiming,\n\t\tprops.bootloaderName,\n\t\tprops.copyrightHolder,\n\t\tsymbols,\n\t]);\n\n\tconst downloadPNG = () => {\n\t\tconst png = canvas.current.toDataURL(\"image/png\");\n\t\tconst download = document.createElement(\"a\");\n\t\tdownload.href = png;\n\t\tdownload.download = \"bootlogo.png\";\n\t\tdownload.click();\n\t};\n\n\tconst downloadBitmap = () => {\n\t\tJimp.read(canvas.current.toDataURL(\"image/png\"))\n\t\t\t.then((image) => {\n\t\t\t\treturn image.rotate(90);\n\t\t\t})\n\t\t\t.then((image) => {\n\t\t\t\tconst download = document.createElement(\"a\");\n\t\t\t\timage.getBase64Async(\"image/bmp\").then((a) => {\n\t\t\t\t\tdownload.href = a;\n\t\t\t\t\tdownload.download = \"bootlogo.bmp\";\n\t\t\t\t\tdownload.click();\n\t\t\t\t});\n\t\t\t});\n\t};\n\n\treturn (\n\t\t
\n\t\t\t\n\t\t\t\n\t\t\t
\n\t\t\t\t\n\t\t\t\t\n\t\t\t
\n\t\t
\n\t);\n}\n","import React from \"react\";\n\nimport styles from \"./HowToUse.module.css\";\n\nexport default function HowToUse() {\n\treturn (\n\t\t
\n\t\t\t

What is this?

\n\t\t\t

This is a tool to generate Old School / Retro style boot screens for the Nintendo Switch.

\n\n\t\t\t

How do I use this?

\n\t\t\t
\n\t\t\t\t
    \n\t\t\t\t\t
  1. Tweak the bootscreen to your liking
  2. \n\t\t\t\t\t
  3. Download the bitmap file
  4. \n\t\t\t\t\t
  5. Save the image as \"bootlogo.bmp\" and save to the root of your SD card. Certain CFW distributions may change where this file is placed.
  6. \n\t\t\t\t
\n\t\t\t
\n\n\t\t\t

Who made this?

\n\t\t\t

This project was created and maintained by Harry Peach and contributors. The original idea came from here.

\n\n\t\t\t

Can I contribute?

\n\t\t\t

Yes! You can fork the repository on GitHub and then submit a pull request.

\n\t\t
\n\t)\n}","import React from \"react\";\nimport styles from \"./App.module.css\";\nimport useCustomHook from \"./hooks/CustomHook\";\nimport CustomDropdown from \"./components/CustomDropdown\";\nimport BootScreenCanvas from \"./components/BootScreenCanvas\";\nimport HowToUse from \"./components/HowToUse\";\n\nfunction App() {\n\tconst [version, setVersion] = useCustomHook(0, \"version\");\n\tconst [storage, setStorage] = useCustomHook(2, \"storage_size\");\n\tconst [sdSize, setSdSize] = useCustomHook(3, \"sd_size\");\n\tconst [sideLogo, setSideLogo] = useCustomHook(1, \"side_logo\");\n\tconst [firmware, setFirmware] = useCustomHook(0, \"firmware\");\n\tconst [copyrightHolder, setCopyrightHolder] = useCustomHook(\n\t\t0,\n\t\t\"copyright_holder\"\n\t)\n\tconst [bootloaderKeybind, setBootloaderKeybind] = useCustomHook(\n\t\t0,\n\t\t\"bootloader_keybind\"\n\t);\n\tconst [bootloaderTiming, setBootloaderTiming] = useCustomHook(\n\t\t0,\n\t\t\"bootloader_timing\"\n\t);\n\tconst [bootloaderName, setBootloaderName] = useCustomHook(\n\t\t0,\n\t\t\"bootloader_name\"\n\t);\n\n\treturn (\n\t\t
\n\t\t\t
\n\t\t\t\t

\n\t\t\t\t\tOld School Boot Screen Generator\n\t\t\t\t

\n\t\t\t\t

For the Nintendo Switch

\n\t\t\t
\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t
\n\t);\n}\n\nexport default App;\n","import React from \"react\";\nimport ReactDOM from \"react-dom\";\nimport \"./reset.css\";\nimport \"./index.css\";\nimport App from \"./App.js\";\n\nReactDOM.render(, document.getElementById(\"root\"));\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"container\":\"App_container__1MQN3\",\"header\":\"App_header__3ZZ1n\",\"title\":\"App_title__-GfWs\",\"subtitle\":\"App_subtitle__2-DpX\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"container\":\"BootScreenCanvas_container__3xtqS\",\"canvas\":\"BootScreenCanvas_canvas__1HaNs\",\"actions\":\"BootScreenCanvas_actions__1JhXc\"};"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["components/HowToUse.module.css","components/CustomDropdown.module.css","hooks/CustomHook.js","components/CustomDropdown.js","components/BootScreenCanvas.js","components/HowToUse.js","App.js","index.js","App.module.css","components/BootScreenCanvas.module.css"],"names":["module","exports","useCustomHook","initialIndex","deviceDataId","React","useState","selectedId","setSelectedId","customInfo","setCustomInfo","DeviceData","val","custom","CustomDropdown","props","customInput","setCustomInput","onCheckboxChange","e","onValueChange","customSet","target","value","selectedIndex","className","styles","element","label","htmlFor","disableCustom","onClick","icon","id","type","onChange","textBox","select","map","el","index","key","drawText","context","text","x","y","color","fillStyle","textBaseline","backspace","i","length","charAt","fillText","BootScreenCanvas","Image","symbols","setSymbols","canvas","useRef","scaledCanvas","scaledContext","useEffect","current","getContext","imageSmoothingEnabled","img","src","process","onload","origin","destination","ctx","fillRect","font","drawImage","sideLogo","firmware","copyrightHolder","version","storage","sdSize","bootloaderKeybind","bootloaderTiming","bootloaderName","CANVAS_HEIGHT","width","height","container","style","imageRendering","ref","display","actions","png","toDataURL","download","document","createElement","href","click","Jimp","read","then","image","rotate","getBase64Async","a","HowToUse","title","App","setVersion","setStorage","setSdSize","setSideLogo","setFirmware","setCopyrightHolder","setBootloaderKeybind","setBootloaderTiming","setBootloaderName","header","subtitle","ReactDOM","render","getElementById"],"mappings":"wJACAA,EAAOC,QAAU,CAAC,UAAY,4BAA4B,MAAQ,wBAAwB,KAAO,yB,uCCAjGD,EAAOC,QAAU,CAAC,QAAU,gCAAgC,OAAS,+BAA+B,QAAU,gCAAgC,KAAO,6BAA6B,MAAQ,gC,wHCE3K,SAASC,EAAcC,EAAcC,GAAe,IAAD,EAC7BC,IAAMC,SAASH,GADc,mBAC1DI,EAD0D,KAC9CC,EAD8C,OAE7BH,IAAMC,UAAS,GAFc,mBAE1DG,EAF0D,KAE9CC,EAF8C,KASjE,MAAO,CACND,EAAaF,EAAaI,EAAWP,GAAcG,GANnC,SAACK,EAAKC,GACtBL,EAAuBI,GACvBF,EAAcG,K,2BCFD,SAASC,EAAeC,GAAO,MAEPV,IAAMC,UAAS,GAFR,mBAEtCU,EAFsC,KAEzBC,EAFyB,KAIvCC,EAAmB,SAACC,GACzBF,GAAgBD,IAGXI,EAAgB,SAACD,GAClBH,EACHD,EAAMM,UAAUF,EAAEG,OAAOC,OAAO,GAEhCR,EAAMM,UAAUF,EAAEG,OAAOE,eAAe,IAI1C,OACC,oCACC,0BAAMC,UAAWC,IAAOC,SACvB,2BAAOF,UAAWC,IAAOE,MAAOC,QAASd,EAAMX,cAC7CW,EAAMa,QAENb,EAAMe,gBACNd,EACA,kBAAC,IAAD,CACCe,QAASb,EACTO,UAAWC,IAAOM,OAGlB,kBAAC,IAAD,CACCD,QAASb,EACTO,UAAWC,IAAOM,QAGrBhB,IAAgBD,EAAMe,cACtB,2BACCG,GAAIlB,EAAMX,aACV8B,KAAK,OACLC,SAAUf,EACVK,UAAWC,IAAOU,UAGlB,4BACCH,GAAIlB,EAAMX,aACV+B,SAAUf,EACVK,UAAWC,IAAOW,QAEjB1B,EAAWI,EAAMX,cAAckC,KAAI,SAACC,EAAIC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EACjBI,kBAAmBA,EACnBC,iBAAkBA,EAClBC,eAAgBA,IAEjB,kBAACwB,EAAD,QCzFHc,IAASC,OAAO,kBAAC,EAAD,MAAS1B,SAAS2B,eAAe,U,kBCLjD7H,EAAOC,QAAU,CAAC,UAAY,uBAAuB,OAAS,oBAAoB,MAAQ,mBAAmB,SAAW,wB,kBCAxHD,EAAOC,QAAU,CAAC,UAAY,oCAAoC,OAAS,iCAAiC,QAAU,oC","file":"static/js/main.2d20a402.chunk.js","sourcesContent":["// extracted by mini-css-extract-plugin\nmodule.exports = {\"container\":\"HowToUse_container__2xikJ\",\"title\":\"HowToUse_title__30q3A\",\"text\":\"HowToUse_text__irhpz\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"element\":\"CustomDropdown_element__3Ck2P\",\"select\":\"CustomDropdown_select__31IZN\",\"textBox\":\"CustomDropdown_textBox__1rdJx\",\"icon\":\"CustomDropdown_icon__3mXDy\",\"label\":\"CustomDropdown_label__3synm\"};","import React from \"react\";\nimport DeviceData from \"../device_data.json\";\n\nexport default function useCustomHook(initialIndex, deviceDataId) {\n\tconst [selectedId, setSelectedId] = React.useState(initialIndex);\n\tconst [customInfo, setCustomInfo] = React.useState(false);\n\n\tconst setValue = (val, custom) => {\n\t\tsetSelectedId(custom ? val : val);\n\t\tsetCustomInfo(custom);\n\t};\n\n\treturn [\n\t\tcustomInfo ? selectedId : DeviceData[deviceDataId][selectedId],\n\t\tsetValue,\n\t];\n}\n","import React from \"react\";\nimport { MdEdit, MdInput } from \"react-icons/md\";\n\nimport styles from \"./CustomDropdown.module.css\";\n\nimport DeviceData from \"../device_data.json\";\n\nexport default function CustomDropdown(props) {\n\t// const checkbox = React.useRef();\n\tconst [customInput, setCustomInput] = React.useState(false);\n\n\tconst onCheckboxChange = (e) => {\n\t\tsetCustomInput(!customInput);\n\t};\n\n\tconst onValueChange = (e) => {\n\t\tif (customInput) {\n\t\t\tprops.customSet(e.target.value, true);\n\t\t} else {\n\t\t\tprops.customSet(e.target.selectedIndex, false);\n\t\t}\n\t};\n\n\treturn (\n\t\t<>\n\t\t\t
\n\t\t\t\t\n\t\t\t\t{!props.disableCustom &&\n\t\t\t\t\t(customInput ? (\n\t\t\t\t\t\t\n\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t))}\n\t\t\t\t{customInput && !props.disableCustom ? (\n\t\t\t\t\t\n\t\t\t\t) : (\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t{DeviceData[props.deviceDataId].map((el, index) => (\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\n\t\t\t\t\t)}\n\t\t\t\n\t\t\n\t);\n}\n","import React, { useEffect } from \"react\";\nimport Jimp from \"jimp\";\nimport styles from \"./BootScreenCanvas.module.css\";\n\nconst CANVAS_WIDTH = 1280;\nconst CANVAS_HEIGHT = 720;\n\nfunction drawText(context, text, x, y, color = \"gray\") {\n\tcontext.fillStyle = color;\n\tcontext.textBaseline = \"top\";\n\n\tvar backspace = 0;\n\tfor (var i = 0; i < text.length; i++) {\n\t\tif (text.charAt(i) === \"_\") {\n\t\t\tif (context.fillStyle === \"#ffffff\") context.fillStyle = color;\n\t\t\telse context.fillStyle = \"white\";\n\t\t\tbackspace++;\n\t\t\tcontinue;\n\t\t}\n\t\tcontext.fillText(text.charAt(i), x + i * 16 - backspace * 16, y);\n\t}\n}\n\nfunction scaleCanvas(origin, destination) {\n\tdestination.current\n\t\t.getContext(\"2d\")\n\t\t.drawImage(\n\t\t\torigin.current,\n\t\t\t0,\n\t\t\t0,\n\t\t\t1280,\n\t\t\t720,\n\t\t\t0,\n\t\t\t0,\n\t\t\tdestination.current.width,\n\t\t\tdestination.current.height\n\t\t);\n}\n\nexport default function BootScreenCanvas(props) {\n\tconst [symbols, setSymbols] = React.useState(new Image());\n\tconst canvas = React.useRef();\n\tconst context = React.useRef();\n\tconst scaledCanvas = React.useRef();\n\tconst scaledContext = React.useRef();\n\n\tuseEffect(() => {\n\t\tcontext.current = canvas.current.getContext(\"2d\");\n\t\tscaledContext.current = scaledCanvas.current.getContext(\"2d\");\n\t\tcontext.current.imageSmoothingEnabled = false;\n\t\tscaledContext.current.imageSmoothingEnabled = false;\n\t\tlet img = new Image();\n\t\timg.src = process.env.PUBLIC_URL + \"/symbols.png\";\n\t\timg.onload = () => setSymbols(img);\n\t}, []);\n\n\tuseEffect(() => {\n\t\tconst ctx = context.current;\n\t\tcontext.current.fillStyle = \"black\";\n\t\tcontext.current.fillRect(0, 0, CANVAS_WIDTH, CANVAS_HEIGHT);\n\t\tctx.font = \"32px PerfectDOSVGA437Win\";\n\t\tctx.fillStyle = \"white\";\n\n\t\tctx.drawImage(symbols, 40, 10, 21, 29, 8, 16, 42, 58);\n\n\t\tswitch (props.sideLogo) {\n\t\t\tcase \"Energy Star\":\n\t\t\t\tctx.drawImage(symbols, 0, 0, 133, 84, 966, 16, 266, 168);\n\t\t\t\tctx.fillStyle = \"black\";\n\t\t\t\tctx.fillRect(1040, 36, 50, 60);\n\t\t\t\tbreak;\n\t\t\tcase \"Energy Star Atmosphere\":\n\t\t\t\tctx.drawImage(symbols, 0, 84, 133, 84, 966, 16, 266, 168);\n\t\t\t\tbreak;\n\t\t\tcase \"Atmosphere\":\n\t\t\t\tctx.drawImage(symbols, 30, 168, 101, 84, 1100, 16, 151, 134);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t}\n\n\t\tdrawText(ctx, props.firmware, 64, 16);\n\t\tdrawText(ctx, \"Copyright (C) 2021, \" + props.copyrightHolder, 64, 48);\n\n\t\tdrawText(ctx, `Nintendo Switch (ver ${props.version})`, 32, 160);\n\t\tdrawText(ctx, \"Main Processor : Nvidia Tegra X1 SoC\", 32, 224);\n\t\tdrawText(ctx, \"Memory Test : 65920K OK\", 32, 256);\n\t\tdrawText(ctx, \"Plug and Play BIOS Extension, v1.0A\", 32, 320);\n\t\tdrawText(\n\t\t\tctx,\n\t\t\t\"Detecting Primary Master ... \" +\n\t\t\tprops.storage +\n\t\t\t\" Internal Storage\",\n\t\t\t64,\n\t\t\t352\n\t\t);\n\t\tdrawText(\n\t\t\tctx,\n\t\t\t\"Detecting Primary Slave ... \" + props.sdSize + \" SD Card\",\n\t\t\t64,\n\t\t\t384\n\t\t);\n\t\tdrawText(ctx, \"Detecting Secondary Master ... None\", 64, 416);\n\t\tdrawText(ctx, \"Detecting Secondary Slave ... None\", 64, 448);\n\n\t\tdrawText(\n\t\t\tctx,\n\t\t\t\"Hold _\" +\n\t\t\tprops.bootloaderKeybind +\n\t\t\t\"_ \" +\n\t\t\tprops.bootloaderTiming +\n\t\t\t\" to enter _\" +\n\t\t\tprops.bootloaderName +\n\t\t\t\"_.\",\n\t\t\t16,\n\t\t\tCANVAS_HEIGHT - 40\n\t\t);\n\n\t\tscaleCanvas(canvas, scaledCanvas);\n\t}, [\n\t\tprops.version,\n\t\tprops.storage,\n\t\tprops.sdSize,\n\t\tprops.sideLogo,\n\t\tprops.firmware,\n\t\tprops.bootloaderKeybind,\n\t\tprops.bootloaderTiming,\n\t\tprops.bootloaderName,\n\t\tprops.copyrightHolder,\n\t\tsymbols,\n\t]);\n\n\tconst downloadPNG = () => {\n\t\tconst png = canvas.current.toDataURL(\"image/png\");\n\t\tconst download = document.createElement(\"a\");\n\t\tdownload.href = png;\n\t\tdownload.download = \"bootlogo.png\";\n\t\tdownload.click();\n\t};\n\n\tconst downloadBitmap = () => {\n\t\tJimp.read(canvas.current.toDataURL(\"image/png\"))\n\t\t\t.then((image) => {\n\t\t\t\treturn image.rotate(90);\n\t\t\t})\n\t\t\t.then((image) => {\n\t\t\t\tconst download = document.createElement(\"a\");\n\t\t\t\timage.getBase64Async(\"image/bmp\").then((a) => {\n\t\t\t\t\tdownload.href = a;\n\t\t\t\t\tdownload.download = \"bootlogo.bmp\";\n\t\t\t\t\tdownload.click();\n\t\t\t\t});\n\t\t\t});\n\t};\n\n\treturn (\n\t\t
\n\t\t\t\n\t\t\t\n\t\t\t
\n\t\t\t\t\n\t\t\t\t\n\t\t\t
\n\t\t
\n\t);\n}\n","import React from \"react\";\n\nimport styles from \"./HowToUse.module.css\";\n\nexport default function HowToUse() {\n\treturn (\n\t\t
\n\t\t\t

What is this?

\n\t\t\t

This is a tool to generate Old School / Retro style boot screens for the Nintendo Switch.

\n\n\t\t\t

How do I use this?

\n\t\t\t
\n\t\t\t\t
    \n\t\t\t\t\t
  1. Tweak the bootscreen to your liking
  2. \n\t\t\t\t\t
  3. Download the bitmap file
  4. \n\t\t\t\t\t
  5. Save the image as \"bootlogo.bmp\" and save to the root of your SD card. Certain CFW distributions may change where this file is placed.
  6. \n\t\t\t\t
\n\t\t\t
\n\n\t\t\t

Who made this?

\n\t\t\t

This project was created and maintained by Harry Peach and contributors. The original idea came from here.

\n\n\t\t\t

Can I contribute?

\n\t\t\t

Yes! You can fork the repository on GitHub and then submit a pull request.

\n\t\t
\n\t)\n}","import React from \"react\";\nimport styles from \"./App.module.css\";\nimport useCustomHook from \"./hooks/CustomHook\";\nimport CustomDropdown from \"./components/CustomDropdown\";\nimport BootScreenCanvas from \"./components/BootScreenCanvas\";\nimport HowToUse from \"./components/HowToUse\";\n\nfunction App() {\n\tconst [version, setVersion] = useCustomHook(0, \"version\");\n\tconst [storage, setStorage] = useCustomHook(2, \"storage_size\");\n\tconst [sdSize, setSdSize] = useCustomHook(3, \"sd_size\");\n\tconst [sideLogo, setSideLogo] = useCustomHook(1, \"side_logo\");\n\tconst [firmware, setFirmware] = useCustomHook(0, \"firmware\");\n\tconst [copyrightHolder, setCopyrightHolder] = useCustomHook(\n\t\t0,\n\t\t\"copyright_holder\"\n\t)\n\tconst [bootloaderKeybind, setBootloaderKeybind] = useCustomHook(\n\t\t0,\n\t\t\"bootloader_keybind\"\n\t);\n\tconst [bootloaderTiming, setBootloaderTiming] = useCustomHook(\n\t\t0,\n\t\t\"bootloader_timing\"\n\t);\n\tconst [bootloaderName, setBootloaderName] = useCustomHook(\n\t\t0,\n\t\t\"bootloader_name\"\n\t);\n\n\treturn (\n\t\t
\n\t\t\t
\n\t\t\t\t

\n\t\t\t\t\tOld School Boot Screen Generator\n\t\t\t\t

\n\t\t\t\t

For the Nintendo Switch

\n\t\t\t
\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t
\n\t);\n}\n\nexport default App;\n","import React from \"react\";\nimport ReactDOM from \"react-dom\";\nimport \"./reset.css\";\nimport \"./index.css\";\nimport App from \"./App.js\";\n\nReactDOM.render(, document.getElementById(\"root\"));\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"container\":\"App_container__1MQN3\",\"header\":\"App_header__3ZZ1n\",\"title\":\"App_title__-GfWs\",\"subtitle\":\"App_subtitle__2-DpX\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"container\":\"BootScreenCanvas_container__3xtqS\",\"canvas\":\"BootScreenCanvas_canvas__1HaNs\",\"actions\":\"BootScreenCanvas_actions__1JhXc\"};"],"sourceRoot":""} \ No newline at end of file