retro-esp32 / RetroESP32

Retro ESP32 is a turbo charged Odroid Go Launcher, Emulator and ROM Manager
Creative Commons Attribution Share Alike 4.0 International
597 stars 92 forks source link

Use COMPONENT_EMBED_FILES to embed binary resources (icons and fonts) #61

Closed KorKozan closed 4 years ago

32teeth commented 4 years ago

We use the header files for icons to easily change colours and append when needed What are the benefits of RAW?

And thank you in advance for your contributions

KorKozan commented 4 years ago

You don't lose anything when using raw binary files, you can still change colors. My change is close to 100% compatible with the existing code, and I've also added a bash script to convert your assets to raw + corresponding headers. The primary benefit is that you don't clobber the source files with binary data that's pretty much useless to the programmer. When you put data into the header you pretty much go through these stages: gif -> raw data in the header -> compiled back into binary form -> linked into the app whereas with my change you go: gif -> raw binary data -> linked into the app thus bypassing the need to have the compiler convert your data from source form (again, totally useless for the programmer, nobody really expects to inspect or manually change that data).

I have more changes coming, there's at least one memory leak in the code and I'm also bothered by the flickery animations and refreshes and the slugishness of the user interface. The reason I got the odroid go is because you can program closer to the metal and thus squeeze every bit of performance but that's not what I'm seeing in this launcher. I love its ui and features, though, so instead of just giving up I decided to do something about it. Thanks!

32teeth commented 4 years ago

Merged