DevKitty-io / USB-Nugget

Run DuckyScript payloads on a USB Nugget!
https://usbnugget.com
MIT License
163 stars 19 forks source link

Store cat graphics individually to make edits easier #60

Closed brandonpaiz closed 2 years ago

brandonpaiz commented 2 years ago

Currently, graphics.h stores char arrays encoding the cat bitmap graphics. For example, the variable high_signal_bits stores this image:

Image

Updating or adding images causes toil; to update an image, you'd need to copy the corresponding char array to a file and save it with the .xbm extension. The file can then be opened in an image editor like gimp. Once saved, the file contents have to be recopied to graphics.h. We can do better!

Instead, let's store each cat graphic as an a seperate .xbm, and include each in graphics.h (yes, you can #include "foobar.xbm"!). Then, the image update process becomes: edit the image in gimp, and then you're done.

https://en.wikipedia.org/wiki/X_BitMap