astronautlevel2 / Anemone3DS

A theme and boot splash manager for the Nintendo 3DS console
GNU General Public License v3.0
908 stars 44 forks source link

assemble a splash preview if none was found #277

Closed Jan200101 closed 5 months ago

Jan200101 commented 2 years ago

generates a preview for splash screens if no suitable preview.png was found

Code is very ugly right now because the core preview drawing code expects to deal with a single texture instead of two, one for each screen and some of the code smells funny.

I welcome suggestions from other contributors and maintainers into how this would be best implemented to be compatible with the current architecture, that isn't just converting splash screens to pngs.

Here are some zip files to test every combination of events out Preview.zip NoPreview.zip NoTop.zip NoBottom.zip NoNothing.zip

Jan200101 commented 2 years ago

reworked the previewing code to deal with raw agbr buffers instead of the contents of png files

so instead of doing bin -> rgba -> png -> agbr -> texture png -> agbr -> texture

we now do

bin -> agbr -> texture png -> agbr -> texture

this removes the overhead when generating a preview from the splash binaries and would simplify changes or additions to the previewing code (like moving to a different preview file format or generating theme previews)

Jan200101 commented 7 months ago

rebased onto master because compilation was borked :/

might or might not work still, untested

astronautlevel2 commented 7 months ago

Looks good - I'll merge once I've tested

Jan200101 commented 7 months ago

needs #296 to build

Jan200101 commented 7 months ago

Tested on my New 2DS XL

Preview.zip (has preview.png) ![IMG_20240227_205820.jpg](https://github.com/astronautlevel2/Anemone3DS/assets/15076013/4939a17d-4e61-401e-9b99-75a66ce9489a)
NoPreview.zip (no preview.png, only splash .bin's ) ![IMG_20240227_205813.jpg](https://github.com/astronautlevel2/Anemone3DS/assets/15076013/2c6274c9-b726-4fa9-a9eb-ee783d07d1e5)
NoTop.zip (no preview.png, only splashbottom.bin) ![IMG_20240227_205826.jpg](https://github.com/astronautlevel2/Anemone3DS/assets/15076013/bcbbbcf2-e07b-4123-b2cc-9123e7537783)
NoBottom.zip (no preview.png, only splash.bin) ![IMG_20240227_205834.jpg](https://github.com/astronautlevel2/Anemone3DS/assets/15076013/04d7b725-9ba0-4431-b758-337eea3b2a08)
NoPreview.zip (no preview.png, no splash bin) ![IMG_20240227_205842.jpg](https://github.com/astronautlevel2/Anemone3DS/assets/15076013/3a4e5283-c0cf-4001-b405-130c583daaf6)

the splash images are a test pattern generated from this script https://github.com/Jan200101/3ds-splash/blob/master/generate_splash.py

I also tested a real theme

New 3DS XL Neon (preview.png removed) [link](https://themeplaza.art/item/52319) ![IMG_20240227_205850.jpg](https://github.com/astronautlevel2/Anemone3DS/assets/15076013/c83531d2-12b9-43d4-9c51-2470d7fd9120)