Currently, graphics.h stores char arrays encoding the cat bitmap graphics. For example, the variable high_signal_bits stores this 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.
Currently,
graphics.h
stores char arrays encoding the cat bitmap graphics. For example, the variablehigh_signal_bits
stores this 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 tographics.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